/* Nova · Live Studio
   Art direction: docs/DESIGN.md ("The light in the kitchen").
   Everything inside .screen is laid out on a fixed logical canvas (720x450 for the
   Echo Show 8, 800x450 for the Echo Show 15) and scaled to fit the device. */

:root {
  --ink: #0A0B10;
  --ink-2: #11131A;
  --ink-3: #191C26;
  --ivory: #F4EEE6;
  --paper: #EDE5D8;
  --mist: rgba(244, 238, 230, .62);
  --faint: rgba(244, 238, 230, .38);
  --line: rgba(244, 238, 230, .10);
  --line-2: rgba(244, 238, 230, .18);
  --nova: #3BD1FF;
  --amber: #FFB547;
  --coral: #FF6B57;
  --sage: #9ED9B0;
  --lav: #B9A7FF;
  --ringblue: #59A9FF;

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, Menlo, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  /* Sky, driven by the household clock (app.js) */
  --sky-top: #121833;
  --sky-mid: #1B2347;
  --sky-hor: #2A2F55;
  --day: 0;
  --night: 1;
  --hz: 64%;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--ink); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--sans); font-size: 14px; line-height: 1.45; color: var(--ivory);
  background: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
svg { display: block; }
::selection { background: rgba(59, 209, 255, .3); }
:focus-visible { outline: 2px solid var(--nova); outline-offset: 2px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: rgba(244,238,230,.16) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(244,238,230,.14); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
.mono { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
kbd { font-family: var(--mono); font-size: 10px; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--mist); margin-left: 6px; }

/* Film grain over everything */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

/* ====================================================================== bar */
.bar {
  position: fixed; z-index: 60; top: 14px; left: 18px; right: 18px; height: 62px;
  display: flex; align-items: center; gap: 18px; padding: 0 10px 0 22px;
  border-radius: 20px; background: rgba(12, 13, 19, .38);
  backdrop-filter: blur(22px) saturate(1.35); -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid rgba(244, 238, 230, .1);
  box-shadow: 0 18px 50px -20px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
  transition: background .5s var(--ease), transform .7s var(--ease);
}
body.scrolled .bar, body.day-bright .bar { background: rgba(12, 13, 19, .72); }
body.day-bright .hud-c { border-color: rgba(20, 24, 40, .45); }
.bar-brand { display: flex; align-items: baseline; gap: 12px; flex: none; }
.wordmark { font-family: var(--serif); font-size: 31px; line-height: 1; letter-spacing: -.01em; }
.brand-sub { color: var(--faint); padding-left: 12px; border-left: 1px solid var(--line-2); }

.bar-clock { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 16px; }
.hh-big { display: flex; align-items: baseline; gap: 5px; }
.hh-time { font-family: var(--serif); font-size: 44px; line-height: .9; letter-spacing: -.02em; font-variant-numeric: tabular-nums; min-width: 2.6ch; text-align: right; }
.hh-ampm { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--mist); }
.hh-meta { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.hh-meta .mono { color: var(--faint); }
.hh-lapse { color: var(--amber) !important; display: inline-flex; align-items: center; gap: 6px; }
.hh-lapse b { font-weight: 500; }
.ff { display: inline-flex; }
.ff i { width: 0; height: 0; border-left: 5px solid currentColor; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; animation: ff 1s ease-in-out infinite; }
.ff i + i { animation-delay: .15s; }
@keyframes ff { 50% { opacity: .25; } }

.seg { position: relative; display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(0,0,0,.28); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; border: 0; background: none; width: 46px; height: 26px; border-radius: 9px; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--mist); transition: color .3s; }
.seg button[aria-checked="true"] { color: var(--ink); }
.seg-thumb { position: absolute; z-index: 0; top: 3px; left: 3px; width: 46px; height: 26px; border-radius: 9px; background: var(--ivory);
  transform: translateX(calc(var(--i, 0) * 46px)); transition: transform .45s var(--spring), background .4s; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
body.lapse .seg-thumb { background: var(--amber); }

.bar-right { display: flex; align-items: center; gap: 4px; flex: none; }
.stat { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; border-radius: 10px; border: 0; background: none; color: var(--ivory); max-width: 300px; }
.stat:hover { background: rgba(244,238,230,.06); }
.stat i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.stat[data-state="bedrock"] i { background: var(--nova); box-shadow: 0 0 10px var(--nova); }
.stat[data-state="ok"] i { background: var(--sage); box-shadow: 0 0 10px var(--sage); }
.stat[data-state="rules"] i { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.stat[data-state="off"] i { background: var(--coral); box-shadow: 0 0 10px var(--coral); }
.stat[data-state="pending"] i { animation: blink 1.2s ease-in-out infinite; }
.stat-k { color: var(--faint); }
.stat-v { font-size: 12px; color: var(--mist); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.bar-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 6px; }
@keyframes blink { 50% { opacity: .3; } }
.pill-wrap { position: relative; }
.popover {
  position: absolute; right: 0; top: calc(100% + 14px); width: 380px; z-index: 70; padding: 18px;
  border-radius: 18px; background: rgba(17, 19, 26, .94); border: 1px solid var(--line-2);
  backdrop-filter: blur(20px); box-shadow: 0 30px 70px rgba(0,0,0,.55); animation: rise .35s var(--ease);
}
.popover h4 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 400; }
.popover .pv-url { font-family: var(--mono); font-size: 11px; color: var(--faint); word-break: break-all; margin-top: 2px; }
.popover .pv-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0; font-size: 12.5px; }
.popover .pv-grid span:nth-child(odd) { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding-top: 2px; }
.popover .pv-tools { display: flex; flex-wrap: wrap; gap: 5px; }
.popover .pv-tools code { font-family: var(--mono); font-size: 10.5px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--mist); }
.popover .pv-tools code.ui { border-color: rgba(59,209,255,.4); color: var(--nova); }
.popover .pv-note { margin-top: 10px; font-size: 11.5px; color: var(--faint); }

.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; display: grid; place-items: center; color: var(--mist); flex: none; transition: color .2s, background .2s; }
.icon-btn:hover { color: var(--ivory); background: rgba(244,238,230,.07); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm svg { width: 16px; height: 16px; }
#muteBtn .ico-off { display: none; }
#muteBtn[aria-pressed="true"] { color: var(--amber); }
#muteBtn[aria-pressed="true"] .ico-on { display: none; }
#muteBtn[aria-pressed="true"] .ico-off { display: block; }
.text-btn { border: 0; background: none; height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--mist); white-space: nowrap; transition: color .2s, background .2s; }
.text-btn:hover { color: var(--ivory); background: rgba(244,238,230,.06); }
.text-btn.small { height: 26px; padding: 0 9px; font-size: 12px; }
.text-btn.busy { opacity: .5; pointer-events: none; }
.hood-btn { color: var(--ivory); border: 1px solid var(--line-2); }

/* ==================================================================== scene */
.scene { position: relative; height: 100vh; height: 100svh; min-height: 680px; overflow: hidden; isolation: isolate; }
.sky { position: absolute; inset: 0; z-index: 0; }
.sky-grad { position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) calc(var(--hz) * .55), var(--sky-hor) var(--hz)); }
.stars { position: absolute; left: 0; top: 0; width: 100%; height: var(--hz); opacity: var(--night); transition: opacity .6s; }
.stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: twinkle 4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .25; } }
.sky-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(38vw 30vh at var(--sun-x, 50%) var(--sun-y, 30%), rgba(255, 214, 160, calc(var(--day) * .38)), transparent 70%); }

/* the day's arc: drag the sun (or the moon at night) to scrub the household clock */
.arc { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.arc-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arc-svg path { fill: none; stroke: rgba(244,238,230,.24); stroke-width: 1; stroke-dasharray: 1 7; stroke-linecap: round; }
body.day-bright .arc-svg path { stroke: rgba(20, 24, 40, .28); }
.arc-ticks span, .arc-presets button { position: absolute; }
.arc-ticks span { transform: translate(-50%, 0); font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); white-space: nowrap; margin-top: 12px; }
body.day-bright .arc-ticks span { color: rgba(20, 24, 40, .5); }
.arc-presets button {
  pointer-events: auto; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%;
  border: 1px solid rgba(244,238,230,.6); background: rgba(10,11,16,.35); padding: 0; transition: transform .3s var(--spring), background .2s;
}
.arc-presets button::after { content: attr(data-label); position: absolute; left: 50%; top: 18px; transform: translateX(-50%); white-space: nowrap;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ivory); padding: 3px 8px; border-radius: 999px;
  background: rgba(10,11,16,.6); backdrop-filter: blur(8px); opacity: 0; transition: opacity .25s; pointer-events: none; }
.arc-presets button:hover { transform: scale(1.35); background: var(--ivory); }
.arc-presets button:hover::after { opacity: 1; }
body.day-bright .arc-presets button { border-color: rgba(20,24,40,.55); }
.orb {
  position: absolute; left: 0; top: 0; width: 56px; height: 56px; margin: -28px 0 0 -28px; border: 0; padding: 0; border-radius: 50%;
  background: none; pointer-events: auto; cursor: grab; touch-action: none; transform: translate3d(var(--ox, 50vw), var(--oy, 120px), 0);
}
.orb.dragging { cursor: grabbing; }
.orb-sun, .orb-moon { position: absolute; inset: 10px; border-radius: 50%; transition: opacity .6s, transform .4s var(--spring); }
.orb-sun { background: radial-gradient(circle at 40% 38%, #FFFDF5 0, #FFE9B8 45%, #FFC77D 100%);
  box-shadow: 0 0 22px 8px rgba(255, 214, 150, .55), 0 0 90px 34px rgba(255, 190, 120, .28); }
.orb-moon { inset: 13px; background: radial-gradient(circle at 62% 40%, #F4EEE6 0, #DCD5CB 60%, #B8B0A6 100%); box-shadow: 0 0 18px 4px rgba(220, 225, 255, .28); opacity: 0; }
.orb-moon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 34%, transparent 46%, rgba(10,11,22,.88) 47%); }
.orb.night .orb-sun { opacity: 0; }
.orb.night .orb-moon { opacity: 1; }
.orb:hover .orb-sun, .orb.dragging .orb-sun, .orb:hover .orb-moon, .orb.dragging .orb-moon { transform: scale(1.15); }
.orb::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(244,238,230,.4); opacity: 0; transform: scale(.7); transition: opacity .3s, transform .4s var(--spring); }
.orb:hover::before, .orb.dragging::before { opacity: 1; transform: scale(1); }
.orb-tip { position: absolute; left: 50%; top: 100%; margin-top: 8px; transform: translateX(-50%); white-space: nowrap; color: var(--ivory);
  padding: 4px 10px; border-radius: 999px; background: rgba(10,11,16,.6); backdrop-filter: blur(8px); opacity: 0; transition: opacity .25s; }
.orb:hover .orb-tip, .orb.dragging .orb-tip, .orb:focus-visible .orb-tip { opacity: 1; }

/* the surface the devices stand on */
.surface {
  position: absolute; left: 0; right: 0; top: var(--hz); bottom: 0; z-index: 1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sky-hor) 26%, #0B0C12) 0%, #0B0C12 22%, #08090D 100%);
  box-shadow: 0 -1px 0 rgba(255,255,255,.08), 0 -40px 80px -40px color-mix(in srgb, var(--sky-hor) 40%, transparent);
}
.surface::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 70px; background: linear-gradient(180deg, color-mix(in srgb, var(--sky-hor) 16%, transparent), transparent); }

/* ===================================================================== stage */
.stage { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 40px var(--stage-pb, 46px); transform-origin: 50% 35%;
  pointer-events: none; user-select: none; -webkit-user-select: none; }
.stage > * { pointer-events: auto; }
.stage input { user-select: text; -webkit-user-select: text; }
.devices { display: flex; justify-content: center; align-items: flex-end; gap: var(--gap, 64px); }
.stage-foot { display: flex; justify-content: center; gap: var(--gap, 64px); margin-top: 18px; }
.foot-slot { width: var(--slot-w, 560px); min-width: 0; }

.device-col { position: relative; width: var(--col-w, 560px); display: flex; flex-direction: column; transition: filter .9s var(--ease); }
.devices[data-focus] .device-col:not(.focused) { display: none; }
.focus-btn .ico-collapse { display: none; }
.device-col.focused .focus-btn .ico-expand { display: none; }
.device-col.focused .focus-btn .ico-collapse { display: block; }
.scene.spot .device-col:not(.spot), .scene.spot .stage-foot { filter: brightness(.5) saturate(.7); }

/* --- the 3D object ---------------------------------------------------- */
.obj-wrap { position: relative; width: var(--w); height: var(--h); margin: 0 auto; perspective: 1500px; z-index: 2; }
.obj { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.front { display: flex; flex-direction: column; transform: translateZ(calc(var(--t) / 2)); }
.back { transform: rotateY(180deg) translateZ(calc(var(--t) / 2)); border-radius: var(--radius); }
.side { background: linear-gradient(180deg, #23262E, #121419); }
.s-left, .s-right { width: var(--t); left: calc(50% - var(--t) / 2); top: 8px; bottom: 8px; }
.s-left { transform: rotateY(-90deg) translateZ(calc(var(--w) / 2 - 1px)); }
.s-right { transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 1px)); }
.s-top, .s-bottom { height: var(--t); top: calc(50% - var(--t) / 2); left: 10px; right: 10px; }
.s-top { transform: rotateX(90deg) translateZ(calc(var(--h) / 2 - 1px)); }
.s-bottom { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2 - 1px)); }
/* at rest the object is flat, so the screen text stays razor sharp */
.device-col.flat .obj { transform: none; transform-style: flat; }
.device-col.flat .front { transform: none; }
.device-col.flat .back, .device-col.flat .side { display: none; }
.obj-wrap { cursor: grab; }
.obj-wrap.orbiting { cursor: grabbing; }
.obj-wrap .screen-fit { cursor: auto; }

.bezel {
  position: relative; flex: 1; padding: var(--bz, 14px); border-radius: var(--radius, 22px);
  background: linear-gradient(160deg, #1D2027 0%, #0C0D11 46%, #08090C 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,255,255,.04), inset 0 -2px 6px rgba(0,0,0,.6);
}
.screen-fit { position: relative; width: 100%; height: 100%; border-radius: calc(var(--radius, 22px) * .42); overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(0,0,0,.9); }
.glare { position: absolute; inset: 0; border-radius: var(--radius, 22px); pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(112deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.075) 42%, rgba(255,255,255,.02) 50%, rgba(255,255,255,0) 60%);
  background-size: 260% 100%; background-position: calc(50% + var(--gx, 0) * 1%) 0; }
.camera { position: absolute; z-index: 3; top: calc(var(--bz) * .34); left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4B5E83 0, #0A0D14 68%); box-shadow: 0 0 0 1.5px #1E2128; }
.camera i { position: absolute; inset: -9px; border-radius: 50%; border: 1.5px solid var(--nova); opacity: 0; transform: scale(.4); transition: opacity .3s, transform .4s var(--spring); }
.device-col.drop-ok .camera i { opacity: .6; transform: scale(1); animation: camPulse 1.4s ease-out infinite; }
.device-col.drop-over .camera i { opacity: 1; transform: scale(1.7); border-width: 2px; box-shadow: 0 0 22px var(--nova); }
@keyframes camPulse { 0% { box-shadow: 0 0 0 0 rgba(59,209,255,.55); } 100% { box-shadow: 0 0 0 18px transparent; } }
.drop-hint { position: absolute; z-index: 5; left: 50%; top: -40px; transform: translate(-50%, 6px); padding: 7px 14px; border-radius: 999px; background: rgba(10,11,16,.72);
  backdrop-filter: blur(10px); color: var(--nova); white-space: nowrap; opacity: 0; transition: opacity .3s, transform .45s var(--ease); pointer-events: none; }
.device-col.drop-ok .drop-hint { opacity: 1; transform: translate(-50%, 0); }
.device-col.drop-over .obj-wrap { filter: drop-shadow(0 0 30px rgba(59,209,255,.35)); }

/* Echo Show 8: fabric chin, sides and back */
.show8 .base { height: var(--chin, 18px); margin: -7px 4% 0; border-radius: 0 0 22px 22px;
  background-color: #2A2C31;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 1px, transparent 1px 3px), repeating-linear-gradient(-45deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 6px 8px -4px rgba(0,0,0,.8); }
.show8 .back, .show8 .side { background-color: #2B2D33;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px), repeating-linear-gradient(-45deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px); }
/* Echo Show 15: thin black glass slab with a satin edge */
.show15 .base { display: none; }
.show15 .side { background: linear-gradient(180deg, #5A5E68, #2A2D33 40%, #16181C); }
.show15 .s-left, .show15 .s-right { background: linear-gradient(90deg, #22252B, #5B5F69 50%, #22252B); }
.show15 .back { background: linear-gradient(160deg, #24262C, #141519); }

/* The back is a service panel: this device's live MCP trace */
.back-panel { position: absolute; inset: calc(var(--bz) * .9); display: flex; flex-direction: column; border-radius: calc(var(--radius) * .6);
  background: rgba(8, 9, 13, .95); border: 1px solid var(--line); overflow: hidden; box-shadow: inset 0 0 40px rgba(0,0,0,.6); }
.back-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 8px 14px; border-bottom: 1px solid var(--line); }
.back-title { color: var(--nova); }
.back-head .text-btn { margin-left: auto; }
.back-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 12px; font-size: 12px; cursor: auto; }
.back-empty { color: var(--faint); font-size: 12px; margin: 8px 2px; }
.device-col.flipped .screen { pointer-events: none; }

/* light on the surface and the contact shadow */
.bloom { position: absolute; z-index: 1; left: 50%; top: calc(var(--h) - 50px); width: calc(var(--w) * 1.3); height: 160px; transform: translateX(-50%);
  pointer-events: none; border-radius: 50%; filter: blur(16px);
  background: radial-gradient(50% 50% at 50% 30%, var(--tone-c), transparent 70%);
  opacity: calc(var(--bloom, 0) * (.55 + var(--lvl, 0) * .45)); transition: opacity .6s; mix-blend-mode: screen; }
.contact { position: absolute; z-index: 1; left: 50%; top: calc(var(--h) - 12px); width: calc(var(--w) * .92); height: 28px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(50% 50% at 50% 50%, rgba(0,0,0,.8), transparent 70%); filter: blur(6px); pointer-events: none; }
.device-col { --tone-c: rgba(59, 209, 255, 1); }
.device-col[data-tone="yellow"] { --tone-c: rgba(255, 181, 71, 1); }
.device-col[data-tone="red"] { --tone-c: rgba(255, 107, 87, 1); }
.device-col[data-light="listening"] { --bloom: .45; }
.device-col[data-light="thinking"] { --bloom: .3; }
.device-col[data-light="speaking"] { --bloom: .75; }
.device-col[data-light="notify"] { --bloom: .8; }
.device-col[data-light="notify"] .bloom { animation: bloomPulse 2s ease-in-out infinite; }
@keyframes bloomPulse { 50% { opacity: .2; } }

/* caption under each device */
.caption { position: relative; z-index: 2; margin-top: 28px; }
.cap-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pn { font-family: var(--serif); font-size: 32px; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.dev-state { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.dev-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.dev-state[data-state="listening"], .dev-state[data-state="speaking"], .dev-state[data-state="thinking"] { color: var(--nova); }
.dev-state[data-state="listening"] i, .dev-state[data-state="speaking"] i { background: var(--nova); box-shadow: 0 0 10px var(--nova); }
.dev-state[data-state="thinking"] i { background: var(--nova); animation: blink .8s ease-in-out infinite; }
.dev-state[data-state="notify"] { color: var(--amber); }
.dev-state[data-state="notify"] i { background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: blink 1.9s ease-in-out infinite; }
.dev-state[data-state="notify"][data-tone="red"] { color: var(--coral); }
.dev-state[data-state="notify"][data-tone="red"] i { background: var(--coral); box-shadow: 0 0 10px var(--coral); }
.dev-state[data-state="notify"][data-tone="cyan"] { color: var(--nova); }
.dev-state[data-state="notify"][data-tone="cyan"] i { background: var(--nova); box-shadow: 0 0 10px var(--nova); }
.cap-tools { margin-left: auto; display: flex; gap: 2px; flex: none; }
.person-meta { color: var(--faint); margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bell-btn { position: relative; }
.bell-badge { position: absolute; top: -3px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--amber); color: #241600;
  font-family: var(--mono); font-size: 9.5px; font-weight: 500; display: grid; place-items: center; animation: badgeIn .4s var(--spring) both; }
@keyframes badgeIn { from { transform: scale(.3); opacity: 0; } }
.bell-btn.has-unread { color: var(--amber); }
.device-col.flipped .flip-btn { color: var(--nova); }

/* composer: one hairline */
.composer { position: relative; display: flex; align-items: center; gap: 6px; height: 42px; margin-top: 12px; border-bottom: 1px solid var(--line-2); }
.composer::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--nova); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); box-shadow: 0 0 10px var(--nova); }
.composer:focus-within::after { transform: scaleX(1); }
.say { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 15px; padding: 0 4px; }
.say::placeholder { color: var(--faint); }
.mic, .send { width: 32px; height: 32px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center; background: none; color: var(--mist); transition: color .2s, background .2s, transform .3s var(--ease), opacity .3s; }
.mic svg, .send svg { width: 18px; height: 18px; }
.mic:hover, .send:hover { color: var(--ivory); background: rgba(244,238,230,.06); }
.mic { position: relative; }
.mic.on { color: var(--ink); background: var(--nova); }
.mic.on::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--nova); animation: ring 1.2s ease-out infinite; }
@keyframes ring { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.45); opacity: 0; } }
.no-speech .mic { display: none; }
.send[disabled] { opacity: 0; transform: translateX(-6px); pointer-events: none; }

/* chips: at most two tidy rows of whole chips; the rest live behind "+N" */
.chips-wrap { position: relative; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 3px 1px 2px; }
.chip.more { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--ivory); border-style: dashed; }
.chip.more[aria-expanded="true"] { background: var(--ivory); color: var(--ink); border-style: solid; }
.chip-menu { position: absolute; z-index: 25; right: 0; bottom: calc(100% + 8px); width: min(340px, 100%); padding: 8px; border-radius: 18px;
  background: rgba(14,15,21,.95); border: 1px solid var(--line-2); backdrop-filter: blur(18px); box-shadow: 0 26px 60px rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 2px; animation: rise .35s var(--ease); }
.chip-menu button { text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 10px; font-size: 13px; color: var(--mist); }
.chip-menu button:hover { background: rgba(244,238,230,.06); color: var(--ivory); }
.chip {
  flex: none; height: 30px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(244,238,230,.02);
  font-size: 12.5px; color: var(--mist); white-space: nowrap; transition: border-color .3s, color .3s, background .3s, transform .4s var(--ease);
  transform: translate(var(--mx, 0px), var(--my, 0px));
}
.chip:hover { color: var(--ivory); border-color: rgba(59,209,255,.5); background: rgba(59,209,255,.06); }
.chip[disabled] { opacity: .4; cursor: default; }
.chip.action { display: inline-flex; align-items: center; gap: 7px; background: var(--ivory); color: var(--ink); border-color: var(--ivory); font-weight: 600; }
.chip.action:hover { background: #fff; color: var(--ink); }
.chip.action svg { width: 14px; height: 14px; }

/* notifications drawer (opens upward over the device) */
.drawer { position: absolute; z-index: 30; left: 0; right: 0; top: 0; max-height: calc(var(--h) - 10px); overflow: auto;
  border-radius: 20px; background: rgba(14,15,21,.95); border: 1px solid var(--line-2); backdrop-filter: blur(18px); box-shadow: 0 30px 70px rgba(0,0,0,.6); animation: rise .4s var(--ease); }
.dr-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px 10px; background: rgba(14,15,21,.97); border-bottom: 1px solid var(--line); }
.dr-head b { font-family: var(--serif); font-size: 24px; font-weight: 400; }
.dr-head span { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.dr-item { display: flex; gap: 12px; padding: 12px 16px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; transition: background .2s; }
.dr-item:hover { background: rgba(244,238,230,.03); }
.dr-ico { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; color: var(--tc); border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); }
.dr-ico svg { width: 15px; height: 15px; }
.dr-main { min-width: 0; flex: 1; display: block; }
.dr-top { display: flex; align-items: baseline; gap: 8px; }
.dr-title { font-size: 13.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-time { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--faint); white-space: nowrap; }
.dr-speech { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; color: var(--mist); margin-top: 3px; }
.dr-status { display: block; margin-top: 6px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.dr-item.unread .dr-status { color: var(--amber); }
.dr-empty { padding: 30px 18px; text-align: center; color: var(--faint); font-size: 13px; }
.tc-cyan { --tc: var(--nova); } .tc-yellow { --tc: var(--amber); } .tc-red { --tc: var(--coral); }

/* capture sheet (Show Alexa / Scan paperwork) over the device */
.capture {
  position: absolute; z-index: 20; inset: -6px; display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px;
  border-radius: 24px; background: rgba(12, 13, 19, .92); border: 1px solid var(--line-2); backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 40px 90px rgba(0,0,0,.6); animation: sheetIn .6s var(--ease); cursor: auto;
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(14px) scale(.98); filter: blur(6px); } }
.cap-head { display: flex; align-items: flex-start; gap: 12px; }
.cap-title { font-family: var(--serif); font-size: 28px; line-height: 1; }
.cap-sub { font-size: 12.5px; color: var(--mist); margin-top: 5px; }
.cap-head .icon-btn { margin-left: auto; }
.cap-ico { display: none; }
.cap-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.cap-body.no-cam { grid-template-columns: 1fr; }
.cap-cam { min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.cap-video { position: relative; flex: 1; min-height: 80px; border-radius: 14px; overflow: hidden; background: #050609; border: 1px solid var(--line); display: grid; place-items: center; }
.cap-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cap-ph { display: grid; justify-items: center; gap: 6px; color: var(--faint); font-size: 12px; text-align: center; padding: 8px; }
.cap-ph svg { width: 24px; height: 24px; }
.cap-row { display: flex; gap: 8px; }
.cap-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; border-radius: 999px; border: 1px solid var(--line-2); background: none; font-size: 12.5px; font-weight: 500; white-space: nowrap; transition: background .2s; }
.cap-btn:hover { background: rgba(244,238,230,.06); }
.cap-btn.primary { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.cap-btn svg { width: 15px; height: 15px; }
.cap-side { min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.cap-k { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.cap-samples { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; overflow: auto; min-height: 0; }
.cap-sample { display: flex; flex-direction: column; gap: 5px; padding: 5px; border-radius: 12px; border: 1px solid var(--line); background: rgba(244,238,230,.02); text-align: left; transition: border-color .2s, transform .3s var(--ease); }
.cap-sample:hover { border-color: rgba(59,209,255,.5); transform: translateY(-2px); }
.cap-sample img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #fff; display: block; }
.cap-sample span { font-size: 11px; color: var(--mist); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cap-note { font-size: 12px; color: var(--faint); }

/* ===================================================== screens (logical px) */
.screen {
  position: absolute; left: 0; top: 0; width: var(--lw); height: var(--lh);
  transform: scale(var(--scale, .6)); transform-origin: 0 0; overflow: hidden; color: var(--ivory);
  font-family: var(--sans); background: #06070A; user-select: none;
}
.ambient { position: absolute; inset: 0; transition: opacity .8s var(--ease), transform 1.4s var(--ease);
  background:
    radial-gradient(60% 70% at 82% 90%, var(--s-glow, rgba(255,190,140,.4)), transparent 64%),
    linear-gradient(180deg, var(--s-top, #121833) 0%, var(--s-mid, #1B2347) 55%, var(--s-hor, #2A2F55) 100%); }
.ambient::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80px 80px at 22% 36%, rgba(255,255,255,.07), transparent 70%), radial-gradient(120px 120px at 72% 18%, rgba(255,255,255,.05), transparent 70%), radial-gradient(60px 60px at 52% 64%, rgba(255,255,255,.06), transparent 70%); }
.ambient::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 70% at 12% 92%, rgba(4,6,14,.55), transparent 70%), radial-gradient(120% 100% at 50% 40%, transparent 46%, rgba(0,0,0,.5)); }
.amb-top { position: absolute; z-index: 1; top: 26px; left: 36px; font-family: var(--mono); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.78); text-shadow: 0 1px 10px rgba(0,0,0,.3); }
body.lapse .amb-top::after { content: " · time-lapse"; color: var(--amber); }
.amb-clock { position: absolute; z-index: 1; left: 34px; bottom: 34px; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.amb-time { font-family: var(--serif); font-size: 172px; line-height: .8; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.amb-date { font-size: 22px; font-weight: 500; color: rgba(255,255,255,.86); margin-top: 16px; padding-left: 6px; }
.amb-hint { position: absolute; z-index: 1; right: 30px; bottom: 40px; width: 300px; padding: 18px 22px 20px; border-radius: 22px;
  background: rgba(8, 9, 14, .46); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.amb-hint.swap { opacity: 0; transform: translateY(8px); }
.hint-label { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.62); margin-bottom: 8px; }
.hint-text { display: block; font-family: var(--serif); font-style: italic; font-size: 28px; line-height: 1.12; }

.scrim { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease); pointer-events: none;
  background: radial-gradient(80% 55% at 50% 120%, color-mix(in srgb, var(--lb-main) 22%, transparent), transparent 70%), linear-gradient(180deg, rgba(6,7,11,.9), rgba(7,8,13,.96)); }
.top-strip { position: absolute; top: 20px; left: 32px; right: 32px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: rgba(244,238,230,.5); opacity: 0; transition: opacity .5s; }
.screen.active .scrim, .screen.active .top-strip { opacity: 1; }
.screen.active .ambient { opacity: .85; transform: scale(1.05); }
.amb-top, .amb-clock { transition: opacity .5s var(--ease); }
.screen.active .amb-top, .screen.active .amb-clock, .screen.active .amb-hint { opacity: 0; }
.screen.has-card .top-strip, .screen.has-elicit .top-strip, .screen.has-ann .top-strip, .screen.scanning .top-strip { opacity: 0; }

.convo { position: absolute; left: 46px; right: 46px; top: 54px; bottom: 36px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; opacity: 0; transition: opacity .45s;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 70px); mask-image: linear-gradient(to bottom, transparent 0, #000 70px); }
.screen.active .convo { opacity: 1; }
.screen.has-card .convo, .screen.has-elicit .convo, .screen.has-ann .convo, .screen.scanning .convo { opacity: 0; }
.turns { display: flex; flex-direction: column; gap: 24px; }
.turn .u { font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.25; color: rgba(244,238,230,.4); }
.turn .a { font-size: 18px; line-height: 1.35; color: rgba(244,238,230,.38); margin-top: 4px; }
.turn.latest .u { font-size: 30px; color: rgba(244,238,230,.66); margin-bottom: 10px; }
.turn.latest .u.interim { color: var(--nova); }
.turn.latest .a { font-size: 35px; line-height: 1.2; font-weight: 500; color: var(--ivory); letter-spacing: -.015em; }
.turn.latest .a.long { font-size: 29px; line-height: 1.24; }
.turn.latest .a.xlong { font-size: 24px; line-height: 1.3; }
.turn.latest .a.err { color: #FFC7BD; }
.a .w { display: inline-block; opacity: 0; transform: translateY(.35em); filter: blur(4px); animation: wordIn .7s var(--ease) forwards; animation-delay: calc(var(--i) * 22ms); }
@keyframes wordIn { to { opacity: 1; transform: none; filter: blur(0); } }
.thinking { display: inline-flex; gap: 10px; padding: 12px 0 4px; }
.thinking i { width: 11px; height: 11px; border-radius: 50%; background: var(--nova); opacity: .3; animation: dots 1.2s ease-in-out infinite; }
.thinking i:nth-child(2) { animation-delay: .15s; }
.thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 40% { opacity: 1; transform: translateY(-5px); } }
.tool-status { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-family: var(--mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--nova); min-height: 22px; }
.tool-status:empty { display: none; }
.tool-status::before { content: ""; width: 14px; height: 14px; border-radius: 50%; flex: none; border: 2px solid var(--nova); border-right-color: transparent; animation: spin .9s linear infinite reverse; }
@keyframes spin { to { transform: rotate(-360deg); } }

/* MCP App card: enters with depth */
.card-layer { position: absolute; inset: 0; padding: 12px 14px 20px; display: flex; flex-direction: column; gap: 10px; opacity: 0; pointer-events: none;
  transform: scale(.9); filter: blur(12px); transition: opacity .7s var(--ease), transform .9s var(--ease), filter .7s var(--ease); }
.screen.has-card .card-layer { opacity: 1; pointer-events: auto; transform: none; filter: none; }
.card-caption { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 2px 0 10px; }
.alexa-orb { width: 22px; height: 22px; border-radius: 50%; flex: none; background: conic-gradient(from 200deg, #0A6CFF, var(--nova), #BFF4FF, var(--nova), #0A6CFF);
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px); }
.screen[data-light="speaking"] .alexa-orb, .screen[data-light="thinking"] .alexa-orb { animation: spin 1.6s linear infinite; }
.caption-text { flex: 1; min-width: 0; margin: 0; font-size: 17.5px; line-height: 1.3; color: rgba(244,238,230,.88); font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-close { width: 38px; height: 38px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center; background: rgba(244,238,230,.1); color: var(--ivory); }
.card-close:hover { background: rgba(244,238,230,.18); }
.card-close svg { width: 18px; height: 18px; }
.card-frame { flex: 1; min-height: 0; position: relative; }
.card-frame iframe { display: block; width: 100%; border: 0; border-radius: 18px; background: var(--ink); box-shadow: 0 0 0 1px rgba(244,238,230,.08), 0 24px 50px rgba(0,0,0,.5); transition: height .4s var(--ease); }

/* Elicitation */
.elicit-layer { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(4,5,9,.66); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .4s; }
.screen.has-elicit .elicit-layer { opacity: 1; pointer-events: auto; }
.elicit-card { position: relative; width: min(600px, 100%); max-height: 100%; overflow: auto; padding: 30px 34px; border-radius: 30px; text-align: center;
  background: linear-gradient(180deg, rgba(25,28,38,.96), rgba(13,14,20,.97)); border: 1px solid rgba(59,209,255,.3); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 80px rgba(59,209,255,.08); animation: depthIn .9s var(--ease) both; }
@keyframes depthIn { from { opacity: 0; transform: scale(.8); filter: blur(14px); } }
.elicit-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--nova); }
.elicit-eyebrow .alexa-orb { width: 20px; height: 20px; animation: spin 2.4s linear infinite; }
.elicit-q { margin: 14px 0 24px; font-family: var(--serif); font-size: 38px; line-height: 1.1; letter-spacing: -.01em; }
.elicit-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.e-btn { min-width: 140px; padding: 15px 32px; border-radius: 999px; border: 1px solid rgba(244,238,230,.2); font-size: 21px; font-weight: 600; background: rgba(244,238,230,.06); color: var(--ivory); transition: transform .15s, background .2s; }
.e-btn:hover { background: rgba(244,238,230,.12); }
.e-btn:active { transform: scale(.97); }
.e-btn.primary { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.e-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(244,238,230,.08); color: var(--mist); display: grid; place-items: center; }
.e-close svg { width: 16px; height: 16px; }
.e-fields { display: grid; gap: 14px; text-align: left; margin: -6px 0 22px; }
.e-field label { display: block; font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.e-field .e-desc { font-size: 14px; color: var(--mist); margin: -2px 0 8px; }
.e-field input[type="text"], .e-field input[type="number"] { width: 100%; padding: 12px 14px; border-radius: 14px; font-size: 19px; background: rgba(244,238,230,.06); border: 1px solid rgba(244,238,230,.16); color: var(--ivory); outline: none; }
.e-field input:focus { border-color: var(--nova); }
.e-field.invalid input, .e-field.invalid .e-seg { border-color: var(--coral); }
.e-seg { display: flex; flex-wrap: wrap; gap: 8px; border: 1px solid transparent; border-radius: 16px; }
.e-seg button { padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(244,238,230,.18); background: rgba(244,238,230,.05); font-size: 17px; color: var(--ivory); }
.e-seg button.on { background: var(--ivory); color: var(--ink); border-color: var(--ivory); font-weight: 600; }
.e-toggle { display: flex; align-items: center; gap: 12px; font-size: 18px; cursor: pointer; }
.e-toggle input { width: 26px; height: 26px; accent-color: var(--nova); }

/* Announcement: cinematic entrance, masked word reveal */
.announce-layer { --ann: var(--nova); position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 30px 44px 40px; opacity: 0; pointer-events: none; transition: opacity .7s var(--ease);
  background: radial-gradient(80% 70% at 50% 125%, color-mix(in srgb, var(--ann) 34%, transparent), transparent 70%), linear-gradient(180deg, #05060A, #07080E); }
.screen.has-ann .announce-layer { opacity: 1; pointer-events: auto; }
.screen.has-ann .card-layer { opacity: 0; pointer-events: none; }
.announce-layer.tone-yellow { --ann: var(--amber); }
.announce-layer.tone-red { --ann: var(--coral); }
.ann { position: relative; animation: depthIn 1.1s var(--ease) both; }
.ann-top { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--ann); }
.ann-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--ann); border: 1.5px solid color-mix(in srgb, var(--ann) 60%, transparent); animation: annRing 2.2s ease-out infinite; }
.ann-ico svg { width: 22px; height: 22px; }
@keyframes annRing { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ann) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 18px transparent; } }
.ann-time { margin-left: auto; margin-right: 44px; color: rgba(244,238,230,.5); letter-spacing: .1em; }
.ann-title { font-family: var(--serif); font-size: 58px; line-height: .98; letter-spacing: -.02em; margin-top: 18px; }
.ann-title .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.ann-title .w > span { display: inline-block; transform: translateY(110%); animation: wordUp 1s var(--ease) forwards; animation-delay: calc(200ms + var(--i) * 60ms); }
@keyframes wordUp { to { transform: none; } }
.ann-speech { font-size: 23px; line-height: 1.36; color: rgba(244,238,230,.78); margin-top: 14px; opacity: 0; animation: fadeUp .9s var(--ease) .5s forwards; }
.ann-speech.long { font-size: 19.5px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ann-replies { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; opacity: 0; animation: fadeUp .9s var(--ease) .7s forwards; }
.ann-reply { font-size: 20px; font-weight: 600; padding: 14px 26px; border-radius: 999px; color: var(--ivory); border: 1px solid rgba(244,238,230,.2); background: rgba(244,238,230,.06); transition: background .2s, transform .15s; }
.ann-reply:hover { background: rgba(244,238,230,.12); }
.ann-reply:active { transform: scale(.97); }
.ann-reply.primary { background: var(--ann); border-color: transparent; color: #0E0F14; }
.ann-close { position: absolute; top: -4px; right: -12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(244,238,230,.1); color: var(--ivory); display: grid; place-items: center; }
.ann-close svg { width: 18px; height: 18px; }
.ann-more { margin-top: 16px; font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: rgba(244,238,230,.45); }

/* Vision scan */
.scan-layer { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  background: radial-gradient(70% 60% at 50% 50%, rgba(0,120,200,.16), transparent 70%), rgba(4,5,9,.95); opacity: 0; pointer-events: none; transition: opacity .4s; }
.screen.scanning .scan-layer { opacity: 1; }
.scan-frame { position: relative; height: 300px; max-width: 86%; border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 1px rgba(59,209,255,.35), 0 24px 60px rgba(0,0,0,.6); animation: depthIn .8s var(--ease) both; }
.scan-img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: cover; filter: saturate(.9) brightness(.82); }
.scan-frame::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(59,209,255,.06) 0 1px, transparent 1px 14px), repeating-linear-gradient(90deg, rgba(59,209,255,.06) 0 1px, transparent 1px 14px); }
.scan-line { position: absolute; left: 0; right: 0; height: 80px; top: -80px; z-index: 1; background: linear-gradient(180deg, transparent, rgba(59,209,255,.28) 75%, rgba(200,248,255,.95)); box-shadow: 0 2px 16px rgba(59,209,255,.9); animation: scanMove 1.7s cubic-bezier(.45,.05,.55,.95) infinite alternate; }
@keyframes scanMove { from { top: -80px; } to { top: calc(100% - 4px); } }
.scan-frame .c { position: absolute; width: 30px; height: 30px; border: 3px solid #8FE9FF; z-index: 2; }
.scan-frame .tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.scan-frame .tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.scan-frame .bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.scan-frame .br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.scan-caption { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: #CFF6FF; }
.scan-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--nova); box-shadow: 0 0 12px var(--nova); animation: blink .9s ease-in-out infinite; }

/* The light ring along the bottom edge of the screen */
.screen { --lb-deep: #0A2F8F; --lb-mid: #0A6CFF; --lb-main: #3BD1FF; --lb-hot: #C8F4FF; --lb-glow: rgba(59,209,255,.36); }
.screen[data-tone="yellow"] { --lb-deep: #6B4300; --lb-mid: #D98E00; --lb-main: #FFB547; --lb-hot: #FFF0C8; --lb-glow: rgba(255,181,71,.36); }
.screen[data-tone="red"] { --lb-deep: #6E1408; --lb-mid: #D3402A; --lb-main: #FF6B57; --lb-hot: #FFD2CA; --lb-glow: rgba(255,107,87,.38); }
.lightbar { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; opacity: 0; transform: translateY(4px); transition: opacity .45s, transform .45s; pointer-events: none; }
.lightbar::before { content: ""; position: absolute; left: 4%; right: 4%; bottom: 0; height: 130px; background: radial-gradient(50% 100% at 50% 100%, var(--lb-glow), transparent 72%); opacity: calc(.55 + var(--lvl, 0) * .45); }
.lightbar i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--lb-deep) 0%, var(--lb-mid) 22%, var(--lb-main) 42%, var(--lb-hot) 50%, var(--lb-main) 58%, var(--lb-mid) 78%, var(--lb-deep) 100%);
  box-shadow: 0 0 22px var(--lb-main), 0 0 6px var(--lb-main); transform: scaleY(calc(1 + var(--lvl, 0) * .7)); transform-origin: bottom; }
.screen:not([data-light="idle"]) .lightbar { opacity: 1; transform: none; }
.screen[data-light="listening"] .lightbar i { animation: breathe 1.6s ease-in-out infinite; }
.screen[data-light="thinking"] .lightbar i { background: linear-gradient(90deg, transparent 0%, var(--lb-main) 35%, var(--lb-hot) 50%, var(--lb-main) 65%, transparent 100%) no-repeat, linear-gradient(90deg, var(--lb-deep), var(--lb-mid) 50%, var(--lb-deep));
  background-size: 34% 100%, 100% 100%; animation: sweep 1.1s cubic-bezier(.45,.05,.55,.95) infinite alternate; }
.screen[data-light="notify"] .lightbar { animation: notifyPulse 2s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scaleX(.84); filter: brightness(.9); } 50% { transform: scaleX(1); filter: brightness(1.2); } }
@keyframes sweep { from { background-position: -10% 0, 0 0; } to { background-position: 110% 0, 0 0; } }
@keyframes notifyPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ========================================================== Ring + tray row */
.ring { display: grid; grid-template-columns: 40px minmax(0, 210px) minmax(0, 1fr); gap: 16px; align-items: center; }
.ring-obj { position: relative; width: 40px; height: 112px; border-radius: 20px; background: linear-gradient(180deg, #16181D 0 46%, #2B2E35 46% 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(255,255,255,.05), 0 14px 26px -10px rgba(0,0,0,.9); }
.ro-lens { position: absolute; left: 50%; top: 14px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 36% 34%, #5F7AA8 0, #0B0E15 62%); box-shadow: 0 0 0 2px #0A0B0F, 0 0 0 3px rgba(255,255,255,.06); }
.ro-lens i { position: absolute; left: 4px; top: 4px; width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.55); }
.ro-grille { position: absolute; left: 10px; right: 10px; top: 40px; height: 6px; background: repeating-linear-gradient(90deg, #0A0B0E 0 2px, transparent 2px 4px); opacity: .7; }
.ro-button { position: absolute; left: 50%; bottom: 14px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #3A3E47, #191B20); box-shadow: 0 0 0 2px rgba(89,169,255,.55), 0 0 10px rgba(89,169,255,.35); }
.ring.ev-ding .ro-button { animation: dingRing 1.1s ease-out 3; }
@keyframes dingRing { 0% { box-shadow: 0 0 0 2px var(--ringblue), 0 0 0 0 rgba(89,169,255,.7); } 100% { box-shadow: 0 0 0 2px var(--ringblue), 0 0 0 16px transparent; } }
.ring.ev-motion .ro-button { box-shadow: 0 0 0 2px var(--amber), 0 0 12px rgba(255,181,71,.5); }

.ring { --sky-top: #8EC5F0; --sky-bottom: #E4EFF6; --house-a: #CBB9A5; --house-b: #A7B3BF; --leaf: #4E7F45; --street: #6B7078; --lawn-far: #7FA65F; --lawn-near: #557F3F; --path: #D2C9B8; --bush: #3F6B3A; }
.ring[data-tod="dusk"] { --sky-top: #2E3A6B; --sky-bottom: #F0A270; --house-a: #6E6070; --house-b: #5A6072; --leaf: #2F4A33; --street: #3E4249; --lawn-far: #48633D; --lawn-near: #34502C; --path: #9E9384; --bush: #283F27; }
.ring[data-tod="night"] { --sky-top: #0B1020; --sky-bottom: #1B2238; --house-a: #2D2F3A; --house-b: #262A35; --leaf: #1C2A20; --street: #24272D; --lawn-far: #24331F; --lawn-near: #1B2817; --path: #5E5A54; --bush: #15210F; }
.ring-view { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(244,238,230,.08), 0 18px 40px -16px rgba(0,0,0,.9); }
.ring-view::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 55%, rgba(0,0,0,.6) 100%); }
.porch { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transform: scale(1.06); transition: filter .8s; }
.ring[data-tod="night"] .porch { filter: grayscale(1) brightness(1.35) contrast(1.05); }
.porch .win { fill: #5E6E80; transition: fill .8s; }
.ring[data-tod="night"] .porch .win, .ring[data-tod="dusk"] .porch .win { fill: #FFD27A; }
.porch .porch-glow, .porch .street-lamp-glow { opacity: 0; transition: opacity .8s; }
.ring[data-tod="dusk"] .porch .porch-glow { opacity: .5; }
.ring[data-tod="night"] .porch .porch-glow, .ring[data-tod="night"] .porch .street-lamp-glow, .ring[data-tod="dusk"] .porch .street-lamp-glow { opacity: 1; }
.porch .fig { opacity: 0; transition: opacity .6s ease; }
.ring.show-grace .fig-grace, .ring.show-courier .fig-courier { opacity: 1; animation: approach 1s var(--ease) both; }
.ring.has-box .fig-box { opacity: 1; }
.ring.show-rose .fig-rose { animation: walkAway 7s linear forwards; }
.ring.show-cat .fig-cat { animation: catCross 3.6s linear forwards; }
@keyframes approach { from { transform: translateY(26px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes walkAway { 0% { opacity: 0; transform: translate(160px, 168px) scale(1.2); } 8% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(158px, 82px) scale(.32); } }
@keyframes catCross { 0% { opacity: 1; transform: translate(-30px, 112px); } 100% { opacity: 1; transform: translate(340px, 104px); } }
.rv-live { position: absolute; top: 7px; left: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.5); font-size: 9px; }
.rv-live i { width: 5px; height: 5px; border-radius: 50%; background: #FF4E5E; animation: blink 1.4s ease-in-out infinite; }
.rv-time { position: absolute; bottom: 7px; left: 8px; z-index: 2; padding: 1px 6px; border-radius: 5px; background: rgba(0,0,0,.5); font-size: 9px; letter-spacing: .06em; color: #E6E9EE; }
.rv-detect { position: absolute; z-index: 2; left: 6%; top: 44%; width: 88%; height: 26%; border: 1.5px solid var(--amber); border-radius: 6px; opacity: 0; pointer-events: none; }
.ring.ev-motion .rv-detect { animation: detect 2.4s ease both; }
@keyframes detect { 0%, 100% { opacity: 0; } 10%, 30%, 50%, 70% { opacity: 1; } 20%, 40%, 60% { opacity: .35; } }
.rv-banner { position: absolute; z-index: 3; left: 50%; top: 8px; transform: translate(-50%, -150%); max-width: 92%; padding: 4px 10px; border-radius: 999px; background: rgba(10,11,16,.75); backdrop-filter: blur(6px);
  color: var(--ivory); font-size: 10.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform .5s var(--ease); border: 1px solid rgba(89,169,255,.5); }
.ring.banner-on .rv-banner { transform: translate(-50%, 0); }
.ring.ev-motion .rv-banner { border-color: rgba(255,181,71,.6); }
.ring-side { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.ring-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.ring-title b { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1; white-space: nowrap; }
.ring-title .mono { color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9.5px; }
.ring-last { min-width: 0; }
.rl-v { display: block; font-size: 13px; color: var(--mist); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-v time { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--faint); margin-left: 6px; }
.ring.flash .rl-v { animation: lastFlash 1.4s var(--ease); }
@keyframes lastFlash { 0% { color: var(--ringblue); } }
.ring-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ring-btns button { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(244,238,230,.02); font-size: 12px; color: var(--mist); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: border-color .25s, color .25s, background .25s, transform .4s var(--ease); transform: translate(var(--mx, 0px), var(--my, 0px)); }
.ring-btns button:hover { color: var(--ivory); border-color: rgba(89,169,255,.55); background: rgba(89,169,255,.07); }
.ring-btns button[disabled] { opacity: .45; cursor: default; }

/* The tray: things to show Alexa */
.tray { position: relative; display: flex; flex-direction: column; gap: 6px; }
.tray-head { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.tray-head b { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1; white-space: nowrap; }
.tray-head span { color: var(--faint); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shelf { position: relative; display: flex; align-items: flex-end; gap: 26px; padding: 0 22px; height: 92px; }
.shelf::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 8px; border-radius: 4px;
  background: linear-gradient(180deg, rgba(244,238,230,.16), rgba(244,238,230,.03)); box-shadow: 0 12px 24px -8px rgba(0,0,0,.95), inset 0 1px 0 rgba(255,255,255,.14); }
.thing { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; border: 0; padding: 0; background: none; cursor: grab; touch-action: none; transition: transform .5s var(--spring), opacity .3s; }
.thing:hover { transform: translateY(-5px) rotate(-3deg); }
.thing.lifted { opacity: .15; }
.thing .t-label { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--mist); white-space: nowrap; opacity: 0; transition: opacity .25s; pointer-events: none; }
.thing:hover .t-label, .thing:focus-visible .t-label { opacity: 1; }
.bottle { position: relative; width: 36px; height: 72px; }
.bottle .cap { position: absolute; left: 3px; right: 3px; top: 0; height: 13px; border-radius: 3px 3px 2px 2px; background: linear-gradient(90deg, #BFC4CC, #F6F6F4 40%, #C7CBD2); box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.bottle .cap::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 1px; background: repeating-linear-gradient(90deg, rgba(0,0,0,.25) 0 1px, transparent 1px 3px); }
.bottle .body { position: absolute; left: 0; right: 0; top: 11px; bottom: 0; border-radius: 6px 6px 7px 7px;
  background: linear-gradient(90deg, rgba(120,52,8,.95), rgba(214,120,40,.92) 35%, rgba(242,170,90,.85) 48%, rgba(170,82,20,.95) 80%); box-shadow: inset 0 -6px 10px rgba(0,0,0,.3); }
.bottle .lab { position: absolute; left: 2px; right: 2px; top: 23px; height: 31px; border-radius: 2px; background: linear-gradient(90deg, #DCDAD5, #FFFFFF 40%, #E5E3DE); display: grid; place-items: center; overflow: hidden; }
.bottle .lab span { font-family: var(--mono); font-size: 5.5px; letter-spacing: .02em; color: #222; text-align: center; line-height: 1.15; padding: 0 1px; }
.bottle.blue .cap { background: linear-gradient(90deg, #1A4E9A, #4C86D8 40%, #1A4E9A); }
.bottle.white .body { background: linear-gradient(90deg, #B8BCC4, #F4F4F2 40%, #FFFFFF 50%, #C9CDD3 85%); }
.bottle.otc .lab { background: linear-gradient(90deg, #1A4E9A, #3D78CF 45%, #1A4E9A); }
.bottle.otc .lab span { color: #fff; font-weight: 700; }
.paper { position: relative; width: 56px; height: 72px; transform: rotate(-4deg); border-radius: 3px; background: linear-gradient(180deg, #FBFAF6, #ECE8DF); box-shadow: 0 10px 18px -8px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.4) inset; }
.paper::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 11px; background: #1F4E79; border-radius: 3px 3px 0 0; }
.paper::after { content: ""; position: absolute; left: 7px; right: 9px; top: 17px; bottom: 9px; background: repeating-linear-gradient(180deg, rgba(30,40,60,.35) 0 1.2px, transparent 1.2px 6px); }
.bottle, .paper { display: block; }
.drag-ghost { position: fixed; z-index: 95; left: 0; top: 0; pointer-events: none; display: none; transform-origin: 50% 80%; filter: drop-shadow(0 26px 24px rgba(0,0,0,.6)); }
.drag-ghost .t-label { display: none; }
.drag-ghost > span:first-child { margin: 0 auto; }
.drag-ghost.on { display: block; }
.drag-ghost.fly { transition: transform .6s var(--ease), opacity .6s var(--ease); }

/* spotlight while a device speaks first */
.spotlight { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity 1.1s var(--ease);
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%), transparent 0, transparent 18%, rgba(4,5,9,.45) 56%, rgba(4,5,9,.62) 100%); }
.scene.spot .spotlight { opacity: 1; }

.scroll-cue { position: absolute; z-index: 5; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; color: var(--faint); text-decoration: none; transition: color .3s, opacity .4s; }
.scroll-cue:hover { color: var(--ivory); }
.scroll-cue i { position: relative; width: 1px; height: 18px; background: var(--line-2); overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -18px; width: 1px; height: 18px; background: var(--ivory); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { to { top: 18px; } }

/* ============================================== 02 — Today in the circle */
.circle-sec { position: relative; background: linear-gradient(180deg, #08090D 0%, var(--ink) 30%); }
.circle-pin { position: relative; height: 100vh; min-height: 640px; display: flex; flex-direction: column; justify-content: center; padding: 96px 0 40px; overflow: hidden; }
.sec-head { padding: 0 6vw; position: relative; }
.sec-index { display: flex; width: max-content; align-items: center; gap: 14px; color: var(--faint); }
.sec-index::after { content: ""; width: 80px; height: 1px; background: var(--line-2); }
.display { margin: 14px 0 0; font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 8.4vw, 150px); line-height: .9; letter-spacing: -.025em; }
.display em { font-style: italic; color: var(--nova); }
.display .wd { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; margin-bottom: -.06em; }
.display .wd > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 70ms); }
.display.in .wd > span { transform: none; }
.sec-lede { max-width: 48ch; margin: 20px 0 0; font-size: 18px; line-height: 1.5; color: var(--mist); }
.rail { margin-top: 44px; cursor: grab; touch-action: pan-y; user-select: none; }
.rail.dragging { cursor: grabbing; }
.no-gsap .rail { overflow-x: auto; scrollbar-width: none; }
.no-gsap .rail::-webkit-scrollbar { display: none; }
.rail-track { display: flex; align-items: stretch; gap: 16px; padding: 0 6vw; width: max-content; will-change: transform; }
.rail-progress { margin: 32px 6vw 0; height: 1px; background: var(--line); position: relative; }
.rail-progress i { position: absolute; left: 0; top: 0; height: 1px; width: 100%; background: var(--ivory); transform: scaleX(var(--p, 0)); transform-origin: left; }

.moment { position: relative; flex: none; width: 290px; height: 360px; border-radius: 24px; padding: 22px 22px 20px; display: flex; flex-direction: column; overflow: hidden;
  color: var(--m-ink, var(--ivory)); background: linear-gradient(180deg, var(--m-top) 0%, var(--m-mid) 55%, var(--m-hor) 100%);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.12); transform: perspective(1200px) rotateY(var(--tilt, 0deg)); transition: transform .8s var(--ease); }
.moment::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 80% at 80% 110%, rgba(255,255,255,.18), transparent 60%); mix-blend-mode: soft-light; }
.moment.light { --m-ink: #12141C; }
.moment.fresh { box-shadow: 0 0 0 2px var(--nova), 0 30px 60px -30px rgba(0,0,0,.8); }
.m-top { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .82; }
.m-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.m-sev-watch .m-dot { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.m-sev-urgent .m-dot { background: var(--coral); box-shadow: 0 0 10px var(--coral); }
.m-time { margin-top: 18px; font-family: var(--serif); font-size: 84px; line-height: .82; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.m-time small { font-style: italic; font-size: 26px; margin-left: 4px; letter-spacing: 0; opacity: .8; }
.m-who { margin-top: auto; font-family: var(--serif); font-size: 25px; line-height: 1.05; }
.m-text { margin-top: 8px; font-size: 14.5px; line-height: 1.42; opacity: .9; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.moment.day-card { width: 120px; background: none; box-shadow: none; border: 1px solid var(--line); justify-content: flex-end; color: var(--ivory); }
.moment.day-card::after { display: none; }
.moment.day-card .m-day { font-family: var(--serif); font-size: 44px; line-height: .95; font-style: italic; writing-mode: vertical-rl; transform: rotate(180deg); align-self: flex-start; }
.rail-empty { padding: 0 6vw; color: var(--faint); }

/* ===================================================== 03 — Under the hood */
.hood-sec { position: relative; padding: 140px 0 40px; background: var(--ink); }
.hood-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 5vw; margin-top: 64px; padding: 0 6vw; align-items: start; }
.flow { list-style: none; margin: 0; padding: 0; position: relative; }
.flow::before { content: ""; position: absolute; left: 15px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.flow::after { content: ""; position: absolute; left: 15px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(180deg, var(--nova), rgba(59,209,255,.2)); transform: scaleY(var(--fp, 0)); transform-origin: top; box-shadow: 0 0 10px var(--nova); }
.flow li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 22px; padding: 0 0 36px; }
.flow-n { position: relative; z-index: 1; width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); border: 1px solid var(--line-2); color: var(--mist); font-size: 9.5px; letter-spacing: .06em; }
.flow li.in .flow-n { border-color: var(--nova); color: var(--nova); box-shadow: 0 0 16px rgba(59,209,255,.3); transition: all .6s var(--ease) .2s; }
.flow b { display: block; font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1; letter-spacing: -.01em; }
.flow p { margin: 10px 0 0; color: var(--mist); font-size: 16px; line-height: 1.5; max-width: 42ch; }
.trace-panel { position: sticky; top: 100px; height: min(74vh, 780px); display: flex; flex-direction: column; border-radius: 26px; background: linear-gradient(180deg, rgba(25,28,38,.6), rgba(17,19,26,.75)); border: 1px solid var(--line); overflow: hidden; box-shadow: 0 40px 90px -40px rgba(0,0,0,.9); }
.trace-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px 14px 22px; border-bottom: 1px solid var(--line); color: var(--mist); }
.trace-head .text-btn { margin-left: auto; }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--faint); }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.live[data-state="live"] { color: var(--sage); }
.live[data-state="live"] i { background: var(--sage); box-shadow: 0 0 10px var(--sage); animation: blink 2s ease-in-out infinite; }
.live[data-state="reconnecting"] { color: var(--amber); }
.live[data-state="reconnecting"] i { background: var(--amber); }
.trace-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px 24px; }
.trace-empty { color: var(--faint); font-size: 14px; max-width: 46ch; margin: 6px 4px; }
.page-foot { display: flex; justify-content: space-between; gap: 16px; padding: 90px 6vw 20px; color: var(--faint); }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* --- trace items (section 3 and the backs of the devices) -------------- */
.trace-list { display: flex; flex-direction: column; gap: 14px; }
.tg { position: relative; border-radius: 18px; border: 1px solid var(--line); background: rgba(10,11,16,.45); overflow: hidden; animation: rise .6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.tg-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px 11px; border-bottom: 1px solid var(--line); }
.badge { flex: none; font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; color: var(--ink); background: var(--pc, var(--faint)); margin-top: 1px; }
.tg-text { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.4; color: var(--ivory); }
.tg-text .via { display: inline-block; margin-left: 7px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--nova); }
.tg-text .via.file { text-transform: none; letter-spacing: 0; }
.tg-meta { flex: none; font-family: var(--mono); font-size: 10px; color: var(--faint); text-align: right; margin-top: 2px; }
.tg-meta b { color: var(--mist); font-weight: 500; }
.tg-thumb { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; flex: none; background: #fff; }
.tg-items { padding: 8px 14px 10px; }
.ti { position: relative; padding: 7px 0 9px 22px; }
.ti::before { content: ""; position: absolute; left: 4px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--kc); box-shadow: 0 0 10px color-mix(in srgb, var(--kc) 60%, transparent); }
.ti:not(:last-child)::after { content: ""; position: absolute; left: 7px; top: 24px; bottom: -7px; width: 1px; background: var(--line-2); }
.ti-head { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.ti-tag { flex: none; font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--kc); }
.ti-name { min-width: 0; font-family: var(--mono); font-size: 11.5px; color: var(--ivory); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ti-name.plain { font-family: var(--sans); font-size: 12.5px; }
.ti-ms { margin-left: auto; flex: none; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.ti-body { margin-top: 5px; font-size: 12.8px; color: var(--mist); line-height: 1.5; overflow-wrap: anywhere; }
.ti-body .quote { color: var(--ivory); }
.ti-body .quote::before { content: "\201C"; }
.ti-body .quote::after { content: "\201D"; }
.ti-body .thought { color: var(--faint); font-style: italic; }
.ti-calls { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.call { font-family: var(--mono); font-size: 10.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid rgba(59,209,255,.35); color: var(--nova); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call .ca { color: var(--faint); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.tag-ui { font-family: var(--mono); font-size: 10px; padding: 2px 9px; border-radius: 999px; border: 1px solid rgba(158,217,176,.4); color: var(--sage); }
.tag-ui b { font-weight: 500; letter-spacing: .1em; margin-right: 5px; }
details.json { margin-top: 7px; }
details.json summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); user-select: none; }
details.json summary::-webkit-details-marker { display: none; }
details.json summary::before { content: ""; width: 0; height: 0; border-left: 5px solid currentColor; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; transition: transform .2s; }
details.json[open] summary::before { transform: rotate(90deg); }
details.json summary:hover { color: var(--mist); }
pre.code, code.inline { font-family: var(--mono); font-size: 11px; line-height: 1.6; color: #D7D2CA; }
pre.code { margin: 7px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.4); border: 1px solid var(--line); max-height: 260px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
code.inline { padding: 2px 8px; border-radius: 8px; background: rgba(0,0,0,.35); border: 1px solid var(--line); white-space: pre-wrap; display: inline-block; max-width: 100%; }
.j-key { color: #9FD8FF; } .j-str { color: #C9E4A6; } .j-num { color: #FFC98A; } .j-lit { color: var(--lav); }
.k-user { --kc: var(--mist); } .k-llm { --kc: var(--lav); } .k-tool_call { --kc: var(--nova); } .k-tool_result { --kc: var(--sage); } .k-tool_result.fail { --kc: var(--coral); }
.k-elicit, .k-elicit_answer { --kc: var(--amber); } .k-reply { --kc: var(--ivory); } .k-error { --kc: var(--coral); } .k-app_call { --kc: var(--nova); } .k-other { --kc: var(--faint); }
.k-announcement { --kc: var(--amber); } .k-announcement.sev-urgent { --kc: var(--coral); } .k-announcement.tone-cyan { --kc: var(--nova); }
.k-ann_ack { --kc: var(--faint); } .k-ring_event, .k-ring_result { --kc: var(--ringblue); }
.k-error .ti-body { color: #FFC7BD; }
.ann-t { color: var(--ivory); font-weight: 600; }
.sev-chip { flex: none; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; color: #241600; background: var(--amber); }
.sev-chip.info { background: rgba(244,238,230,.12); color: var(--mist); }
.sev-chip.urgent { background: var(--coral); color: #2A0700; }
.ti-replies { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.ti-replies span { font-size: 11px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--mist); }
.back-list .tg { border-radius: 12px; background: rgba(255,255,255,.02); animation: none; }
.back-list .tg + .tg { margin-top: 8px; }
.back-list .tg-head { padding: 8px 10px; }
.back-list .tg-items { padding: 4px 10px 6px; }
.back-list .ti-body { font-size: 11.5px; }
.back-list pre.code { max-height: 120px; }

/* HUD: corner ticks, timecode, coordinates (fades as the scene scrolls away) */
.hud { position: fixed; inset: 0; z-index: 55; pointer-events: none; transition: opacity .6s var(--ease); }
body.scrolled .hud { opacity: 0; }
.hud-c { position: absolute; width: 18px; height: 18px; border: 0 solid rgba(244,238,230,.4); }
.hud-c.tl { left: 8px; top: 8px; border-left-width: 1px; border-top-width: 1px; }
.hud-c.tr { right: 8px; top: 8px; border-right-width: 1px; border-top-width: 1px; }
.hud-c.bl { left: 8px; bottom: 8px; border-left-width: 1px; border-bottom-width: 1px; }
.hud-c.br { right: 8px; bottom: 8px; border-right-width: 1px; border-bottom-width: 1px; }
.hud-l { position: absolute; bottom: 13px; display: flex; gap: 18px; color: var(--faint); font-size: 9.5px; }
.hud-l b { font-weight: 500; color: var(--mist); font-variant-numeric: tabular-nums; }
.bl-txt { left: 34px; }
.br-txt { right: 34px; }
.rec { display: inline-flex; align-items: center; gap: 6px; color: var(--coral); }
.rec i { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 8px var(--coral); animation: blink 1.6s ease-in-out infinite; }
@media (max-width: 900px) { .hud { display: none; } }

/* Under the hood: slide-over drawer (I). The one trace panel moves between section 03 and here. */
.trace-home { min-height: 200px; }
.trace-home:empty::before { content: "The live trace is open in the drawer. Press I to put it back."; display: block; padding: 30px; border-radius: 26px; border: 1px dashed var(--line-2); color: var(--faint); font-size: 14px; }
.hood-drawer {
  position: fixed; z-index: 70; top: 90px; right: 14px; bottom: 14px; width: min(460px, calc(100vw - 28px));
  display: flex; flex-direction: column; border-radius: 24px; overflow: hidden;
  background: rgba(12, 13, 19, .82); border: 1px solid var(--line-2); backdrop-filter: blur(24px) saturate(1.3); -webkit-backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.9);
  transform: translateX(calc(100% + 30px)); opacity: 0; visibility: hidden;
  transition: transform .9s var(--ease), opacity .5s var(--ease), visibility 0s linear .9s;
}
.hood-drawer.open { transform: none; opacity: 1; visibility: visible; transition: transform .9s var(--ease), opacity .5s var(--ease), visibility 0s; }
.hd-head { display: flex; align-items: flex-end; gap: 12px; padding: 18px 16px 14px 22px; border-bottom: 1px solid var(--line); }
.hd-head > div { flex: 1; min-width: 0; }
.hd-k { display: block; color: var(--nova); }
.hd-title { display: block; margin-top: 6px; font-family: var(--serif); font-weight: 400; font-size: 38px; line-height: .95; letter-spacing: -.015em; }
.hd-title em { color: var(--nova); }
.hd-slot { flex: 1; min-height: 0; display: flex; }
.hd-slot .trace-panel { position: relative; top: 0; flex: 1; height: auto; border: 0; border-radius: 0; background: none; box-shadow: none; opacity: 1; transform: none; }
.hd-slot .trace-head .mono:first-child { display: none; }
body.hood-open .hood-btn { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
body.hood-open .hood-btn kbd { color: var(--ink); border-color: rgba(10,11,16,.3); }

/* ============================================== 3D mode (WebGL stage) */
.scene3d { position: absolute; inset: 0; z-index: 1; display: none; }
.is3d .scene3d { display: block; }
.is3d .sky, .is3d .surface { display: none; }
.is3d .scene { background: var(--ink); }
.scene3d .nova3d-css .screen { position: absolute; left: 0; top: 0; transform: none; }
.is3d .screen .lightbar { display: none; } /* the 3D glass has the real light bar */
/* HUD: the device columns float at the bottom, centred under their Echo */
.is3d .stage { display: block; padding: 0; }
.is3d .devices { position: absolute; inset: 0; display: block; pointer-events: none; }
.is3d .device-col { position: absolute; bottom: 48px; left: var(--hud-x, 0px); width: var(--hud-w, 480px); pointer-events: auto; animation: none; }
.is3d .devices[data-focus] .device-col:not(.focused) { display: flex; } /* focus is a camera move in 3D */
.is3d .obj-wrap, .is3d .bloom, .is3d .contact { display: none; }
.is3d .caption { margin-top: 0; }
.is3d .device-col.drop-over .caption { text-shadow: 0 0 24px rgba(59,209,255,.6); }
.is3d .capture { inset: auto -6px calc(100% + 14px) -6px; height: min(380px, 46vh); }
.is3d .drawer { top: auto; bottom: calc(100% + 12px); max-height: min(420px, 50vh); }
.is3d .stage-foot { position: absolute; inset: 0; display: block; margin: 0; pointer-events: none; }
/* the sun is drawn by the WebGL sky: the orb becomes an invisible handle sitting on it */
.is3d .orb-sun, .is3d .orb-moon { opacity: 0 !important; }
.is3d .arc-svg, .is3d .arc-ticks, .is3d .arc-presets { opacity: 0; transition: opacity .5s var(--ease); }
.is3d .arc.active .arc-svg, .is3d .arc.active .arc-ticks, .is3d .arc.active .arc-presets { opacity: 1; }
.is3d .arc-presets button { pointer-events: none; }
.is3d .arc.active .arc-presets button { pointer-events: auto; }
.is3d .orb::before { border-color: rgba(244,238,230,.55); }
/* the back of a turned-around Echo: its live trace */
.back-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.back3d { position: absolute; opacity: 0; transform: scale(.96); transition: opacity .5s var(--ease), transform .7s var(--ease); --bz: 0px; --radius: 22px; }
.back3d.show { opacity: 1; transform: none; pointer-events: auto; }
.back3d .back-panel { inset: 0; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 96; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 11px 18px; border-radius: 999px; font-size: 13px; max-width: min(560px, calc(100vw - 32px)); background: rgba(17,19,26,.9); border: 1px solid var(--line-2); backdrop-filter: blur(16px); box-shadow: 0 16px 40px rgba(0,0,0,.5); animation: toastIn .5s var(--ease) both; }
.toast.error { border-color: rgba(255,107,87,.5); }
.toast.out { animation: toastOut .35s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }


/* ============================================ progressive disclosure */
/* One focal point at a time: two devices; under each, a name line, one control row, one pill row. */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bar { top: 8px; height: 50px; padding: 0 8px 0 20px; }
.wordmark { font-size: 28px; }
.hh-time { font-size: 38px; }
.hh-ampm { font-size: 17px; }
.hood-drawer { top: 70px; }

.caption { margin-top: 22px; }
.cap-row { gap: 10px; }
.pn { font-size: 28px; }
.dev-state { gap: 0; }
.dev-state i { width: 7px; height: 7px; }
.person-meta { margin-top: 5px; letter-spacing: .14em; }
.controls { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-width: 0; }
.controls .composer { flex: 1; min-width: 0; margin-top: 0; height: 40px; }
.ctl-icons { display: flex; align-items: center; gap: 0; flex: none; }
.vision-btn .ico-doc { display: none; }
.device-col.vk-document .vision-btn .ico-cam { display: none; }
.device-col.vk-document .vision-btn .ico-doc { display: block; }
.vision-btn[aria-expanded="true"] { color: var(--ink); background: var(--ivory); }
.chips-wrap { margin-top: 10px; }
.chips { flex-wrap: wrap; height: 36px; overflow: hidden; }
.chip.more { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0; color: var(--ivory); border-style: solid; }

/* The shelf drawer: a slim band at the bottom edge with just one device's things */
.shelf-drawer {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; height: 200px; pointer-events: none;
  transform: translateY(105%); transition: transform .8s var(--ease);
}
.shelf-drawer.open { transform: none; }
.sd-line { position: absolute; left: 3vw; right: 3vw; bottom: 56px; height: 1px; background: linear-gradient(90deg, transparent, rgba(244,238,230,.35) 12%, rgba(244,238,230,.35) 88%, transparent);
  box-shadow: 0 10px 30px 6px rgba(0,0,0,.55); }
.shelf-drawer::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(6,7,11,.35) 70%, rgba(6,7,11,.6)); pointer-events: none; }
.sd-copy { position: absolute; left: 3vw; bottom: 18px; display: flex; align-items: baseline; gap: 12px; pointer-events: auto; }
.sd-title { font-family: var(--serif); font-weight: 400; font-size: 24px; }
.sd-hint { color: var(--mist); }
.sd-actions { position: absolute; right: 3vw; bottom: 14px; display: flex; align-items: center; gap: 4px; pointer-events: auto; }
.sd-things { position: absolute; left: 0; right: 0; bottom: 57px; height: 120px; display: flex; justify-content: center; align-items: flex-end; gap: 26px; pointer-events: auto; }
.is3d .sd-things { display: none; } /* in 3D the objects are rendered on the shelf by WebGL */
.shelf-open .device-col { opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
.shelf-open .scroll-cue, .shelf-open .ring-mini, .shelf-open .hud-l { opacity: 0; pointer-events: none; }
.hud-l { transition: opacity .35s var(--ease); }

/* Ring: a tiny label with a "more" popover; the porch view only appears during an event */
.ring { position: relative; display: block; }
.ring-mini { position: relative; display: flex; align-items: center; gap: 2px; }
.ring-mini .ring-obj { width: 22px; height: 54px; border-radius: 11px; flex: none; }
.ring-mini .ro-lens { width: 9px; height: 9px; margin-left: -4.5px; top: 8px; }
.ring-mini .ro-lens i { display: none; }
.ring-mini .ro-grille { display: none; }
.ring-mini .ro-button { width: 13px; height: 13px; margin-left: -6.5px; bottom: 8px; }
.is3d .ring-mini .ring-obj { display: none; } /* the real one is in 3D */
.ring-label { color: rgba(244,238,230,.7); white-space: nowrap; font-size: 9px; letter-spacing: .1em; }
.ring-more { width: 22px; height: 22px; }
.ring-pop { position: absolute; z-index: 20; left: -4px; bottom: calc(100% + 10px); width: 164px; padding: 12px 10px 10px; border-radius: 16px;
  background: rgba(14,15,21,.95); border: 1px solid var(--line-2); backdrop-filter: blur(18px); box-shadow: 0 26px 60px rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 8px; animation: rise .35s var(--ease); }
.rp-k { color: var(--faint); font-size: 9.5px; }
.ring-pop .rl-v { font-size: 12.5px; color: var(--mist); }
.ring-pop .ring-btns { display: grid; grid-template-columns: 1fr; gap: 5px; }
.ring-pop .ring-btns button { text-align: left; padding: 0 11px; font-size: 11.5px; }
.is3d .ring-pop { width: var(--ring-pop-w, 164px); }
.ring-pop .rl-v { line-height: 1.35; }
.ring .ring-view { position: absolute; z-index: 15; left: 0; bottom: calc(100% + 12px); width: 240px; aspect-ratio: 16 / 9;
  opacity: 0; transform: translateY(8px) scale(.97); pointer-events: none; transition: opacity .5s var(--ease), transform .6s var(--ease); }
.ring.live-on .ring-view { opacity: 1; transform: none; }
/* in 3D the porch camera opens in the empty sky at the top left, clear of both screens */
.is3d .ring .ring-view { left: calc(16px - var(--ring-x, 16px)); top: calc(74px - var(--ring-top, 400px)); bottom: auto; width: 232px; }
.ring.ev-ding .ring-label, .ring.ev-motion .ring-label { color: var(--ringblue); }

/* footer HUD: small and faint */
.hud-l { color: rgba(244,238,230,.3); font-size: 9px; }
.hud-l b { color: rgba(244,238,230,.45); }
.scroll-cue { bottom: 10px; gap: 8px; font-size: 9px; color: rgba(244,238,230,.32); }
.scroll-cue i { height: 12px; }
.scroll-cue i::after { height: 12px; top: -12px; }
@keyframes cue { to { top: 12px; } }

/* 2D layout: the Ring label sits at the left edge, devices keep clear of it */
.stage-foot { position: absolute; left: 22px; bottom: 40px; margin: 0; display: block; }
.foot-slot { width: auto; }

/* 3D layout */
.is3d .device-col { bottom: 34px; }
.is3d .stage-foot { position: absolute; inset: 0; pointer-events: none; }
.is3d #ringSlot { position: absolute; left: var(--ring-x, 16px); top: var(--ring-top, 400px); pointer-events: auto; }
.is3d .devices[data-focus] .device-col:not(.focused) { display: none; }
.is3d .devices[data-focus] .device-col.focused { width: var(--hud-w, 560px); }
.is3d.focusing .ring-mini { opacity: 0; pointer-events: none; }

/* ?debug=overlap */
.overlap-hit { outline: 2px solid #FF2D55 !important; outline-offset: 1px; }


/* the sun/moon handle lets clicks through while it sits behind a device screen */
.orb.tucked { pointer-events: none; }
.orb.tucked .orb-tip { opacity: 0; }
.overlap-layer { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
.overlap-layer .ob { position: absolute; outline: 1px dashed rgba(59,209,255,.55); }
.overlap-layer .ob.hit { outline: 2px solid #FF2D55; background: rgba(255,45,85,.08); }
.overlap-layer .ob span { position: absolute; left: 2px; top: 1px; font: 9px/1.2 var(--mono); color: rgba(59,209,255,.9); white-space: nowrap; }
.overlap-layer .ob.hit span { color: #FF2D55; }


/* ============================================ review: performance */
/* Blur only on the bar and the small popovers; everything else uses solid or semi-opaque fills.
   No blend modes, no full-screen overlay layers. */
.orb-tip, .amb-hint, .elicit-layer, .drop-hint, .drawer, .rv-banner, .hood-drawer, .toast { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.orb-tip, .drop-hint, .rv-banner { background: rgba(10,11,16,.9); }
.amb-hint { background: rgba(8,9,14,.8); }
.elicit-layer { background: rgba(4,5,9,.88); }
.drawer { background: rgba(14,15,21,.985); }
.hood-drawer { background: rgba(12,13,19,.975); }
.toast { background: rgba(17,19,26,.97); }
.glare, .bloom { mix-blend-mode: normal; }
.glare { opacity: .55; }
.moment::after { mix-blend-mode: normal; opacity: .45; }
.grain { display: none; mix-blend-mode: normal; animation: none; }
#stage, #scene3d, #backLayer { will-change: transform; }
.scene-shade { position: absolute; inset: 0; z-index: 9; background: #0B0C12; opacity: 0; visibility: hidden; pointer-events: none; }
/* the bar sits over a live WebGL canvas: a backdrop blur would be recomputed every frame, so it's a tinted glass instead */
.bar { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: rgba(12,13,19,.84); }
body.bar-away .bar { transform: translateY(calc(-100% - 16px)); opacity: 0; pointer-events: none; transition: transform .5s var(--ease), opacity .3s; }
.bar { transition: background .5s var(--ease), transform .5s var(--ease), opacity .3s; }
body.scrolled .bar, body.day-bright .bar { background: rgba(12,13,19,.9); }
.ring-pop .rp-hook { font-size: 8.5px; line-height: 1.4; letter-spacing: .08em; color: rgba(59,209,255,.8); white-space: normal; }

/* ============================================ review: story rail */
/* Cards start on the heading's left edge and slide under soft edges. */
/* soft edges: two small gradient strips over the rail (cheaper than masking the moving track) */
.rail { position: relative; }
.rail::before, .rail::after { content: ""; position: absolute; top: -10px; bottom: -10px; width: 6vw; z-index: 2; pointer-events: none; }
.rail::before { left: 0; background: linear-gradient(90deg, var(--ink), rgba(10,11,16,0)); }
.rail::after { right: 0; background: linear-gradient(270deg, var(--ink), rgba(10,11,16,0)); }
.no-gsap .rail::before, .no-gsap .rail::after { display: none; }
/* cards: flat at rest (one layer for the whole track), lighter shadows, no overlay pass */
.moment { transform: none; transition: none; box-shadow: 0 18px 30px -18px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.12); }
.moment.fresh { box-shadow: 0 0 0 2px var(--nova), 0 18px 30px -18px rgba(0,0,0,.7); }
.moment::after { display: none; }
.m-text { -webkit-line-clamp: 3; }

/* ============================================ review: MCP App card */
.card-frame { overflow: hidden; border-radius: 18px; }
.card-frame.overflowing::after { content: "Scroll for more"; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; z-index: 2; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; border-radius: 0 0 18px 18px;
  font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(244,238,230,.75);
  background: linear-gradient(180deg, rgba(11,12,18,0), rgba(11,12,18,.92) 70%); }
.caption-text.clamped { cursor: pointer; }
.card-caption.expanded .caption-text { -webkit-line-clamp: unset; display: block; max-height: 9.2em; overflow: auto; }
.card-caption { align-items: flex-start; padding-top: 8px; }
.card-caption .alexa-orb, .card-caption .card-close { margin-top: 1px; }

/* ============================================ review: inspector drawer */
/* The stage slides left and scales so the drawer never covers Maya's Echo Show. */
#scene { transform-origin: 0 50%; transition: transform .9s var(--ease), border-radius .9s var(--ease); }
body.hood-open #scene { transform: translateX(20px) scale(var(--hood-k, .74)); border-radius: 26px; }
@media (prefers-reduced-motion: reduce) { #scene { transition: none; } }


/* ============================================ review: tagline, follow-up pill */
.brand-sub { font-family: var(--sans); font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--mist);
  max-width: clamp(150px, 15vw, 330px); white-space: normal; line-height: 1.2; }
.page-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.page-foot .foot-line { margin: 0; max-width: 62ch; font-size: 14px; line-height: 1.5; color: var(--mist); }
.chip.follow { border-color: rgba(59,209,255,.55); color: var(--nova); background: rgba(59,209,255,.08); }
.chip.follow:hover { background: rgba(59,209,255,.16); }
.bar-brand { align-items: center; }
.hh-meta, #hhDay { white-space: nowrap; }
@media (max-width: 1600px) { .bar .stat-k { display: none; } .bar .stat-v { max-width: 170px; } }
/* the Ring's menu opens from the frame's gutter, inside the Ring's own column */
.is3d .ring-pop { left: calc(16px - var(--ring-x, 16px)); }
body:not(.is3d) .ring-pop { width: 128px; } /* 2D: stays inside the Ring's column */

/* =============================================================== responsive */
@media (max-width: 1340px) {
  .brand-sub, .stat-k { display: none; }
  .stat-v { max-width: 150px; }
  .hh-meta { min-width: 120px; }
}
@media (max-width: 1080px) {
  .bar-right .stat { display: none; }
  .bar-sep { display: none; }
  .hood-grid { grid-template-columns: 1fr; }
  .trace-panel { position: relative; top: 0; }
}
@media (max-width: 900px) {
  .bar { height: auto; flex-wrap: wrap; padding: 8px 10px 8px 16px; gap: 8px 12px; }
  .bar-clock { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .hh-time { font-size: 34px; }
  .bar-right { margin-left: auto; }
  .hood-btn kbd { display: none; }
  .scene { height: auto; min-height: 100vh; overflow: visible; }
  .stage { position: relative; padding: 290px 16px 70px; }
  .devices { flex-direction: column; align-items: stretch; gap: 54px; }
  .stage-foot { flex-direction: column; gap: 34px; }
  .device-col, .foot-slot { width: 100% !important; }
  .ring { grid-template-columns: 34px minmax(0, 1fr); }
  .ring-side { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .wordmark { font-size: 26px; }
  .hood-btn { display: none; }
  .moment { width: 240px; height: 320px; }
  .m-time { font-size: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .display .wd > span { transform: none; }
}

/* top bar: one fast-forward toggle instead of three speeds; the tagline stays on one line */
.ff-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 11px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .28); color: var(--mist); font-family: var(--mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; transition: color .3s, background-color .3s, border-color .3s; }
.ff-btn svg { width: 14px; height: 14px; }
.ff-btn:hover { color: var(--ivory); border-color: rgba(244, 238, 230, .3); }
.ff-btn[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.brand-sub { white-space: nowrap; }
@media (max-width: 1500px) { .brand-sub { display: none; } }

/* ============================================ the story bar (story.js) */
.story { position: absolute; z-index: 40; top: 96px; left: 22px; width: 330px; max-width: calc(100% - 32px); }
.story-card { padding: 16px 18px 16px; border-radius: 18px; background: rgba(12, 13, 19, .78);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(244, 238, 230, .12); box-shadow: 0 18px 50px -20px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); }
.story-head { display: flex; align-items: center; justify-content: space-between; margin: -4px -6px 6px 0; }
.story-k { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--nova); }
.story-title { display: block; font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.08; color: var(--ivory); }
.story-text { margin: 8px 0 12px; font-size: 13px; line-height: 1.45; color: var(--mist); }
.story-dots { display: flex; gap: 6px; margin-bottom: 14px; }
.story-dots i { width: 22px; height: 3px; border-radius: 2px; background: rgba(244,238,230,.16); transition: background .3s; }
.story-dots i.done { background: rgba(59,209,255,.55); }
.story-dots i.on { background: var(--nova); }
.story-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.story-go { border: 0; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--ivory); color: var(--ink);
  font-size: 13px; font-weight: 600; white-space: nowrap; transition: transform .2s var(--ease), opacity .2s; }
.story-go:hover { transform: translateY(-1px); }
.story-go:disabled { opacity: .6; transform: none; cursor: progress; }
.story-pill { display: none; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(244,238,230,.14); background: rgba(12,13,19,.72); color: var(--ivory); font-size: 13px; font-weight: 500;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.story-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--nova); box-shadow: 0 0 10px var(--nova); }
.story.is-collapsed .story-card { display: none; }
.story.is-collapsed .story-pill { display: inline-flex; }
@media (max-width: 900px) { .story { top: auto; bottom: 16px; left: 16px; width: auto; right: 16px; } .story-title { font-size: 21px; } }
