:root{color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#fff;background:#101516;font-synthesis:none;-webkit-font-smoothing:antialiased;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{user-select:none;-webkit-user-select:none}button{font:inherit;cursor:pointer;color:inherit;border:0}button:focus-visible,#stage:focus-visible{outline:3px solid #b1eeff;outline-offset:5px}button:disabled{opacity:.4;cursor:default}[hidden]{display:none!important}svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}#app{position:relative;height:100%;height:100dvh;min-height:270px;isolation:isolate;background:#101516}#stage{position:absolute;inset:0;overflow:hidden;touch-action:none;outline:none}#camera,#frozen{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}#frozen{object-fit:cover}.shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.5),transparent 28%);pointer-events:none}#app[data-mode=opening] .shade,#app[data-mode=error] .shade{display:none}.topbar{position:absolute;top:0;left:0;right:0;z-index:4;display:flex;align-items:center;justify-content:space-between;padding:calc(var(--safe-top) + 23px) 24px 18px;gap:12px;pointer-events:none}.brand{display:flex;gap:10px;align-items:center}.brand img{border-radius:10px}.brand span{font-size:22px;font-weight:780;letter-spacing:1px;text-shadow:0 1px 3px #0008}.gate{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:85px 28px 60px;overflow:hidden;background:radial-gradient(ellipse at 50% 38%,#202d2b 0%,#121a1a 43%,#101516 71%)}.gate-art{position:relative;width:218px;height:218px;margin-bottom:34px;display:grid;place-items:center}.spectrum{position:absolute;inset:28px;border-radius:50%;background:conic-gradient(from 25deg,#ce93d4,#7fbad8,#7cbfa2,#ddc37e,#dc977e,#ce93d4);filter:blur(28px);opacity:.17}.orbit{position:absolute;border:1px solid #ffffff12;border-radius:50%;inset:4px}.orbit-two{inset:26px;border-color:#ffffff16}.iris{display:grid;place-items:center;border:1px solid #ffffff25;border-radius:50%;width:120px;height:120px;background:linear-gradient(145deg,#ffffff0a,#ffffff00);box-shadow:0 12px 32px #0003}.iris svg{width:51px;height:51px;stroke-width:1.4;color:#d9e6dc}.eyebrow{font-size:10px;font-weight:650;letter-spacing:3.1px;color:#a1b1a9;margin-bottom:15px}h1{font-size:clamp(24px,5.5vw,31px);font-weight:560;letter-spacing:-.8px;line-height:1.2;margin:0}.gate p{color:#a1aba6;font-size:13px;line-height:1.6;max-width:290px;margin:13px 0 0}#gate-actions{margin-top:28px;width:100%;max-width:258px}.primary{display:flex;align-items:center;justify-content:center;gap:25px;border-radius:50px;background:#eaf2e7;color:#1c2720;width:100%;height:54px;font-weight:650;font-size:15px}.primary svg{width:18px;height:18px}.text-button{display:block;background:transparent;padding:18px 12px 9px;color:#b9c4bc;margin:auto;font-size:13px}.ellipsis{animation:breathe 1.8s ease-in-out infinite}.capture:active,.primary:active{transform:scale(.97)}#labels{position:absolute;inset:0;pointer-events:none}.color-bubble{position:absolute;display:flex;align-items:center;gap:8px;padding:10px 13px;background:#f9fbf6f2;border:1px solid #fff;border-radius:25px;box-shadow:0 2px 12px #0003;color:#202720;font-size:16px;font-weight:740;line-height:20px;white-space:nowrap;max-width:calc(100vw - 24px);pointer-events:auto;backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px);transform:translate(-50%,-50%);transition:left .24s ease-out,top .24s ease-out}.color-bubble:after{content:"";position:absolute;width:6px;height:6px;bottom:-10px;left:calc(50% - 3px);background:#fff;border-radius:50%;box-shadow:0 0 0 2px #0003}.color-bubble i{height:15px;width:15px;border-radius:50%;border:1px solid #0002;flex:none}#sample-point{position:absolute;width:30px;height:30px;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #0008,0 2px 12px #0003;transform:translate(-50%,-50%);pointer-events:none}#sample-point i{position:absolute;inset:10px;background:white;border-radius:50%;box-shadow:0 0 0 1px #0006}#sample-bubble{pointer-events:none;transition:none;z-index:2}#sample-bubble:after{display:none}#loupe{position:absolute;width:84px;height:84px;border-radius:50%;border:3px solid #fff;box-shadow:0 5px 20px #0005;pointer-events:none;z-index:3}h2{font-size:27px;line-height:1.1;letter-spacing:-.7px;margin:5px 0 7px;font-weight:650}#notice{position:absolute;z-index:8;top:calc(var(--safe-top) + 82px);left:24px;right:24px;margin:auto;max-width:380px;text-align:center;background:#17221ef2;color:#e3e9e5;font-size:12px;padding:12px 18px;border:1px solid #fff2;border-radius:30px;pointer-events:none}@keyframes breathe{50%{opacity:.35}}@media(min-width:700px){.topbar{padding-left:35px;padding-right:35px}.gate-art{width:250px;height:250px;margin-bottom:44px}.iris{width:135px;height:135px}.color-bubble{font-size:17px}}@media(max-height:530px){.topbar{padding-top:calc(var(--safe-top) + 12px)}.gate{padding:60px 25px 20px}.gate-art{width:110px;height:110px;margin-bottom:12px}.orbit-two{inset:15px}.iris{width:75px;height:75px}.iris svg{width:38px;height:38px}.eyebrow{margin-bottom:8px}.gate p{margin-top:7px}#gate-actions{margin-top:13px;display:flex;gap:10px;max-width:340px}.primary{height:44px}.text-button{padding:5px;width:120px}h2{font-size:22px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
.brand{background:transparent;padding:0;pointer-events:auto;border-radius:10px}dialog{width:min(370px,calc(100vw - 40px));border:1px solid #ffffff24;border-radius:29px;padding:36px 29px 28px;background:#17221f;color:#eef3ed;box-shadow:0 20px 90px #0006;text-align:center}dialog::backdrop{background:#030b07a6;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}dialog h2{letter-spacing:2px;font-size:32px}dialog p{font-size:13px;line-height:1.65;color:#b9c8be;margin:19px 0}.close-about{position:absolute;top:13px;right:13px;width:37px;height:37px;display:grid;place-items:center;background:transparent;border-radius:50%;color:#bdc7bf}.close-about svg{width:19px;height:19px}

/* The full header remains on one line; installed app name stays YCSE. */
.topbar{gap:8px}.brand{gap:8px;min-width:0}.brand span{font-size:clamp(12px,3.8vw,18px);letter-spacing:-.25px;white-space:nowrap}.brand img{width:30px;height:30px;flex:none}

/* Pin the app to the viewport and suppress browser page/image dragging. */
/* Do not fix the document root: WebKit can clip it above the home-indicator
   area. Paint the full large viewport; controls still use the visible height. */
:root{--camera-height:100vh;--controls-height:100vh}
@supports(height:100dvh){:root{--camera-height:100lvh;--controls-height:100dvh}}
html,body{position:relative;touch-action:pinch-zoom;overflow:hidden;overflow:clip}
body{height:var(--camera-height)}
#app{height:var(--camera-height)}
body{-webkit-touch-callout:none}
img,video,canvas,a{-webkit-user-drag:none}
dialog{max-height:calc(100dvh - 40px);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom}

/* Keep offline readiness accessible without a visible badge. */
.offline-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;pointer-events:none}

/* One stationary readout/control bar; the camera fills the area behind it. */
.dock{position:relative;width:100%;min-width:0;min-height:0;height:100%;display:grid;grid-template-columns:minmax(0,1fr) 50px;grid-template-rows:minmax(0,1fr);align-items:center;gap:9px;padding:6px 10px;border:1px solid #ffffff35;border-radius:22px;background:#111c1bef;box-shadow:0 8px 28px #0005,inset 0 1px 0 #ffffff08;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.inspector{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:7px;pointer-events:none}
.sample-summary{display:flex;align-items:center;gap:7px;min-width:0}
.detail-swatch{width:21px;height:35px;border:1px solid #ffffff50;border-radius:8px;flex:none;box-shadow:inset 0 0 0 1px #0002}
.detail-copy{min-width:0}
.detail-label{display:block;font-size:8px;font-weight:650;line-height:1.3;letter-spacing:1px;color:#c5d1cb}
.detail-copy h2{font-size:clamp(13px,4.5vw,18px);font-weight:730;line-height:1.12;letter-spacing:-.25px;margin:3px 0 4px;white-space:nowrap}
.color-values{display:flex;flex-wrap:wrap;gap:2px 7px;font-size:9px;line-height:1.3;color:#cad5ce;font-variant-numeric:tabular-nums;letter-spacing:0}
.color-values span{white-space:nowrap}
.capture{width:100%;height:100%;min-height:44px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);place-items:center;padding:0;border-radius:14px;background:#ffffff10;color:#eff5ee;border:1px solid #ffffff26;font-size:10px;font-weight:750}
.capture svg{width:44px;height:44px;stroke-width:2.1}
#center-point{position:absolute;top:calc(var(--controls-height)/2);left:50%;width:12px;height:12px;transform:translate(-50%,-50%);border:1.5px solid #fff9;border-radius:50%;box-shadow:0 0 0 1px #0007;pointer-events:none}
#app:not([data-mode=live]) #center-point{display:none}
@media(max-width:360px){.dock{padding:9px;gap:7px;grid-template-columns:minmax(0,1fr) 44px}.sample-summary{gap:6px}.detail-swatch{width:16px;height:32px}.detail-label{font-size:7.5px;letter-spacing:.7px}.color-values{font-size:8.5px}}
@media(min-width:700px){.dock{padding:3px 14px;gap:18px;border-radius:24px;grid-template-columns:minmax(0,1fr) clamp(44px,7vw,84px)}.inspector{flex-direction:row;justify-content:flex-start;align-items:center;gap:20px}.sample-summary{gap:12px;flex:1}.detail-swatch{width:38.4px;height:38.4px;border-radius:11px}.detail-label{font-size:8px}.detail-copy h2{font-size:22px;margin:2px 0 3px}.color-values{font-size:10px;gap:3px 10px}.capture{font-size:12px;border-radius:15px}}
@media(max-height:530px) and (min-width:600px){.dock{padding-top:2px;padding-bottom:2px}.detail-copy h2{font-size:19px;margin:1px 0}}

/* Two panels share one unchanged-height row, with exact 5px outer/gutter spacing. */
:root{--bar-height:67.6px;--bar-offset:12px}
.controls{position:absolute;z-index:5;left:5px;right:5px;bottom:calc(max(0px,var(--camera-height) - var(--controls-height)) + var(--safe-bottom) + var(--bar-offset));height:var(--bar-height);display:grid;grid-template-columns:max-content minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:5px}
.zoom-panel{min-width:0;height:100%;display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:3px;align-items:center;padding:6px 6px;border:1px solid #ffffff35;border-radius:22px;background:#111c1bef;box-shadow:0 8px 28px #0005,inset 0 1px 0 #ffffff08;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.zoom-main{min-width:0;display:grid;grid-template-rows:12px 32px;align-content:center}
.zoom-main label{display:flex;align-items:center;justify-content:space-between;gap:2px;min-width:0;font-size:7px;font-weight:650;letter-spacing:.3px;color:#c5d1cb}
#zoom-value{font-size:10px;font-weight:750;color:#fff;font-variant-numeric:tabular-nums;letter-spacing:0;white-space:nowrap}
#zoom-slider{appearance:none;-webkit-appearance:none;width:100%;min-width:0;height:32px;margin:0;background:transparent;cursor:ew-resize;touch-action:none}
#zoom-slider::-webkit-slider-runnable-track{height:3px;border-radius:3px;background:#c7d9cd69}
#zoom-slider::-moz-range-track{height:3px;border-radius:3px;background:#c7d9cd69}
#zoom-slider::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:18px;height:18px;border:1px solid #fff;border-radius:50%;background:#e8f0e9;box-shadow:0 1px 5px #0008;margin-top:-7.5px}
#zoom-slider::-moz-range-thumb{width:16px;height:16px;border:1px solid #fff;border-radius:50%;background:#e8f0e9;box-shadow:0 1px 5px #0008}
#zoom-slider:focus-visible{outline:2px solid #b1eeff;outline-offset:2px;border-radius:6px}
.zoom-reset{height:100%;min-height:44px;min-width:44px;width:100%;padding:0;display:grid;place-items:center;color:#eff5ee;background:#ffffff10;border:1px solid #ffffff26;border-radius:14px;touch-action:manipulation}
.zoom-reset svg{width:32px;height:32px;stroke-width:2}
#frozen{object-fit:fill;image-rendering:pixelated;transform:none}
#camera{transform-origin:center;}
#camera.magnified{image-rendering:pixelated}
@media(max-width:360px){:root{--bar-height:75.4px}#zoom-value{font-size:9px}.zoom-main label{font-size:6.5px}}
@media(min-width:700px){:root{--bar-height:62.4px}.zoom-panel{grid-template-columns:minmax(0,1fr) clamp(44px,7vw,84px);padding:3px 12px;gap:10px;border-radius:24px}.zoom-reset{border-radius:15px}.zoom-main label{font-size:8px}.zoom-main output{font-size:12px}}
@media(max-height:530px) and (min-width:600px){:root{--bar-height:54.6px;--bar-offset:9px}.zoom-panel{padding-top:2px;padding-bottom:2px}}

/* Keep phone typography stable
   and the hex/RGB values on two deliberate lines, without wrapping within them. */
@media(max-width:699px){
  .dock{padding-left:6px;padding-right:6px;gap:6px;grid-template-columns:minmax(0,1fr) 44px}
  .sample-summary{display:flex;align-items:center;gap:6px}
  .detail-copy{display:block;flex:1;text-align:left}
  .detail-swatch{--swatch-size:clamp(35.2px,9.6vw,44.8px);width:var(--swatch-size);height:var(--swatch-size);border-radius:8px}
  .detail-label{font-size:8px;line-height:1.1;letter-spacing:.1px;white-space:nowrap}
  .detail-copy h2{font-size:14px;line-height:1;margin:0}
  .color-values{flex-direction:column;align-items:flex-start;gap:0;font-size:9px;line-height:1.05}
}
@media(max-width:360px){
  .dock{padding-top:6px;padding-bottom:6px;gap:5px}
  .sample-summary{gap:4px}
  .detail-swatch{--swatch-size:32px}
  .zoom-panel{padding-left:4px;padding-right:4px}
}

@media(min-width:700px) and (max-width:799px){.color-values{font-size:9px}}

/* Intrinsic sizing reserves every possible readout at its actual system-font
   width. Hidden zero-height samples keep the panel stable as readings change. */
.dock{width:max-content;grid-template-columns:max-content 44px}
.detail-copy{flex:none;width:max-content}
.detail-label{white-space:nowrap}
.color-values{flex-wrap:nowrap}
#detail-label::after,#detail-name::after,#detail-hex::after,#detail-rgb::after{display:block;height:0;overflow:hidden;visibility:hidden;white-space:pre;pointer-events:none}
#detail-label::after{content:"CENTER COLOR\A CENTER PIXEL\A SAMPLED COLOR\A PIXEL COLOR"}
#detail-name::after{content:"Black\A White\A Charcoal\A Dark gray\A Gray\A Light gray\A Off-white\A Burgundy\A Pale pink\A Pink\A Dusty rose\A Dark red\A Red\A Cream\A Beige\A Taupe\A Dark brown\A Brown\A Tan\A Peach\A Terracotta\A Gold\A Orange\A Dark olive\A Olive\A Mustard\A Pale yellow\A Yellow\A Dark green\A Sage green\A Gray-green\A Lime green\A Olive green\A Mint green\A Forest green\A Green\A Dark teal\A Blue-gray\A Teal\A Pale aqua\A Turquoise\A Cyan\A Navy blue\A Pale blue\A Light blue\A Dark blue\A Blue\A Gray-purple\A Dark purple\A Lavender\A Purple\A Plum\A Mauve\A Magenta\A Deep pink"}
#detail-hex::after{content:"#000000\A #AAAAAA\A #BBBBBB\A #CCCCCC\A #DDDDDD\A #EEEEEE\A #FFFFFF"}
#detail-rgb::after{content:"RGB 255 · 255 · 255"}
@media(min-width:700px){.dock{grid-template-columns:max-content clamp(44px,7vw,84px)}}
#photo-upload h2{font-size:24px;letter-spacing:-.4px;margin:7px 0 0}
.brand .upload-arrow{width:.85em;height:.85em;margin-left:.24em;vertical-align:-.04em;opacity:.75}
#app[data-source=photo] .shade{display:none}
#app[data-source=photo] #labels{z-index:1}
#app[data-source=photo] .color-bubble{transition:none}
