/* NEXUS v2 — shared design system
   Direction (refs: rondesignlab Veri / Superpower / Vantary / DroneShield):
   near-black or soft-gray base · vivid aura-gradient cards with grain · dot-matrix numerals ·
   tick rulers with lime pointers · pill navigation on translucent panels · 3D stage with orbit rings */

/* Latin + numerals: Hanken Grotesk (also the NEXUS wordmark). Hangul: NanumSquare Neo by default;
   other Korean candidates can be previewed with ?ko=<id> (see ../_fonts-trial/). Both OFL 1.1. */
@font-face {
  font-family: 'Hanken Grotesk';
  font-weight: 100 900; font-style: normal; font-display: swap;
  src: url('../vendor/HankenGrotesk.woff2') format('woff2');
}
@font-face {
  font-family: 'NanumSquare Neo';
  font-weight: 100 900; font-style: normal; font-display: swap;
  src: url('../vendor/NanumSquareNeo-Variable.woff2') format('woff2');
}
@property --acc { syntax: '<color>'; inherits: true; initial-value: #5B78FF; }
@property --glow { syntax: '<color>'; inherits: true; initial-value: rgba(70, 100, 255, .55); }

:root {
  --nx-css-core: 1; /* boot guard marker */
  --font-ko: 'NanumSquare Neo';
  --font: 'Hanken Grotesk', var(--font-ko), -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui, sans-serif;
  --lime: #E3F35B; --lime-ink: #12150A; --lime-tx: #E3F35B;
  --ok: #4FD69C; --bad: #FF6257;
  --r-xl: 30px; --r-lg: 24px; --r-md: 18px; --r-sm: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #060708; --bg-2: #0c0e11;
  --panel: rgba(16, 18, 22, .64); --panel-2: rgba(255, 255, 255, .045);
  --line: rgba(255, 255, 255, .075); --line-2: rgba(255, 255, 255, .14);
  --ink: #F3F4F6; --ink-2: rgba(243, 244, 246, .66); --ink-3: rgba(243, 244, 246, .42); --ink-4: rgba(243, 244, 246, .16);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .85);
  --card: #121419; --sh-1: inset 0 1px 0 rgba(255, 255, 255, .04), 0 24px 48px -28px rgba(0, 0, 0, .9);
  --floor-dot: rgba(255, 255, 255, .24);
  --tile: rgba(255, 255, 255, .03); --tile-on: rgba(255, 255, 255, .07);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #E8E9EB; --bg-2: #F2F3F5;
  --card: #FFFFFF; --sh-1: 0 1px 2px rgba(16, 18, 24, .04), 0 14px 34px -16px rgba(16, 24, 40, .16);
  --panel: rgba(255, 255, 255, .6); --panel-2: rgba(255, 255, 255, .62);
  --line: rgba(12, 14, 18, .075); --line-2: rgba(12, 14, 18, .14);
  --ink: #101215; --ink-2: rgba(16, 18, 21, .64); --ink-3: rgba(16, 18, 21, .44); --ink-4: rgba(16, 18, 21, .14);
  --shadow: 0 24px 48px -32px rgba(20, 24, 32, .4);
  --floor-dot: rgba(16, 18, 21, .26);
  --tile: rgba(255, 255, 255, .45); --tile-on: #fff;
  --lime: #D9EF2C; --lime-tx: #566300;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  word-break: keep-all; overflow-wrap: break-word; transition: background .5s;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.muted { color: var(--ink-3); }
.mono { font-variant-numeric: tabular-nums; }
::selection { background: var(--lime); color: var(--lime-ink); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* boot guard notice (see NXBoot in the html shell) */
.boot-msg { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; color: var(--ink-3, #8a8f98); font: 400 14px/1.5 var(--font, system-ui); letter-spacing: .01em; }

/* ambient light follows the active space palette */
.amb {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1000px 560px at 50% 30%, color-mix(in srgb, var(--acc) 20%, transparent), transparent 70%),
    radial-gradient(760px 520px at 92% 105%, color-mix(in srgb, var(--acc) 11%, transparent), transparent 70%),
    radial-gradient(600px 420px at 0% 0%, rgba(255, 255, 255, .03), transparent 70%);
  transition: --acc .9s var(--ease);
}
[data-theme="light"] .amb {
  background:
    radial-gradient(1000px 560px at 50% 30%, color-mix(in srgb, var(--acc) 14%, transparent), transparent 70%),
    radial-gradient(760px 520px at 92% 105%, color-mix(in srgb, var(--acc) 8%, transparent), transparent 70%);
}

/* ------------------------------------------------------------ surfaces */
.glass {
  background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(22px) saturate(1.35); backdrop-filter: blur(22px) saturate(1.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), var(--shadow);
}
[data-theme="light"] .glass { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 1px 2px rgba(16, 18, 21, .04), var(--shadow); }
.card { position: relative; border-radius: var(--r-lg); }
.card-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 500; color: var(--ink-2); min-height: 22px; }
.cap { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 0 4px; }

/* aura gradient cards — the signature surface */
.aura {
  --c1: #8BA0FF; --c2: #1F3DDB; --core: rgba(2, 3, 10, .95); --core-mid: rgba(2, 3, 12, .5); --cx: 62%; --cy: 64%;
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background:
    radial-gradient(52% 58% at var(--cx) var(--cy), var(--core) 0%, var(--core-mid) 38%, transparent 72%),
    radial-gradient(85% 75% at 6% 0%, color-mix(in srgb, var(--c1) 85%, white) 0%, transparent 62%),
    linear-gradient(158deg, var(--c1) 0%, var(--c2) 100%);
}
.aura::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain); background-size: 180px; opacity: .3; mix-blend-mode: overlay;
}
.aura--ocean { --c1: #8BA0FF; --c2: #1F3DDB; --core: rgba(2, 3, 10, .95); --core-mid: rgba(2, 3, 12, .5); }
.aura--jade { --c1: #BFE0CF; --c2: #5A9A80; --core: rgba(4, 12, 9, .9); --core-mid: rgba(4, 12, 9, .42); }
.aura--ember { --c1: #FFA46C; --c2: #E2501E; --core: rgba(46, 76, 228, .95); --core-mid: rgba(46, 76, 228, .35); --cx: 74%; --cy: 72%; }
.aura--magenta { --c1: #F9B4DB; --c2: #D24E9A; --core: rgba(96, 8, 58, .92); --core-mid: rgba(96, 8, 58, .42); }
.aura--dusk { --c1: #7D6B95; --c2: #F08270; --core: transparent; --core-mid: transparent; }
.sw { display: inline-block; width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto; }
.sw--lg { width: 36px; height: 36px; border-radius: 12px; }
.sw--sm { width: 18px; height: 18px; }
.sw--xs { width: 12px; height: 12px; }

/* ---------------------------------------------------------- pills, chips */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap;
}
.pill b { color: var(--ink); font-weight: 600; }
.pill--lime { background: var(--lime); color: var(--lime-ink); border-color: transparent; font-weight: 600; }
.pill--dark { background: rgba(0, 0, 0, .3); color: #fff; border-color: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pill--line { background: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); flex: 0 0 auto; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot.live { position: relative; background: var(--lime); }
.dot.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--lime); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }

.sim {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--lime-tx); white-space: nowrap; cursor: help;
  border: 1px solid color-mix(in srgb, var(--lime) 38%, transparent); background: color-mix(in srgb, var(--lime) 8%, transparent);
}
[data-theme="light"] .sim { background: color-mix(in srgb, var(--lime) 30%, transparent); border-color: rgba(86, 99, 0, .25); }
.sim i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.8s steps(2, end) infinite; }
.sim--sm { height: 24px; font-size: 11px; padding: 0 9px 0 8px; }
@keyframes blink { 50% { opacity: .2; } }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 17px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-2);
  transition: background .2s, border-color .2s, transform .15s; white-space: nowrap;
}
.btn:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.btn:active { transform: scale(.97); }
.btn--sm { height: 32px; padding: 0 14px; font-size: 12.5px; }
.btn--lime, .btn--lime:hover { background: var(--lime); color: var(--lime-ink); border-color: transparent; }
.btn--ghost { background: transparent; }
.btn--block { width: 100%; }
.ibtn {
  position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  color: var(--ink-2); background: var(--panel); border: 1px solid var(--line); transition: color .2s, background .2s;
}
.ibtn:hover, .ibtn.on { color: var(--ink); background: color-mix(in srgb, var(--ink) 11%, var(--panel)); }
.ibtn--sm { width: 32px; height: 32px; }
.ibtn--glass { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.badge-dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 14px; color: #fff; flex: 0 0 auto; }
.avatar--btn.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--lime); }
.avatar--lg { width: 52px; height: 52px; font-size: 19px; }
.avatar--xl { width: 92px; height: 92px; font-size: 32px; font-weight: 400; }
.chipbtn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 9px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--ink); white-space: nowrap;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: border-color .2s;
}
.chipbtn:hover, .chipbtn[aria-expanded="true"] { border-color: var(--line-2); }
.chipbtn b { font-weight: 600; }
.chipbtn em { font-style: normal; color: var(--ink-3); }
.chipbtn svg { color: var(--ink-3); }
.link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.link:hover { color: var(--ink); }

.tabs {
  display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.tab { height: 34px; padding: 0 17px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: color .2s, background .2s; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); background: color-mix(in srgb, var(--ink) 12%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
[data-theme="light"] .tab.on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

.tg { width: 46px; height: 28px; border-radius: 999px; background: var(--ink-4); position: relative; transition: background .25s; flex: 0 0 auto; }
.tg i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .28s var(--ease), background .25s; }
.tg.on { background: var(--lime); }
.tg.on i { transform: translateX(18px); background: #111; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); gap: 2px; flex: 0 0 auto; }
.seg-b { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s; white-space: nowrap; }
.seg-b:hover { color: var(--ink); }
.seg-b.on { background: var(--ink); color: var(--bg); }

/* ------------------------------------------------- dot-matrix numerals */
.dn { display: block; overflow: visible; flex: 0 0 auto; }
.dn circle { fill: currentColor; transform-box: fill-box; transform-origin: center; animation: dnIn .55s var(--ease) both; animation-delay: calc(var(--d) * 9ms); }
.dn--ring circle { fill: none; stroke: currentColor; stroke-width: .3; }
.dn--still circle { animation: none; }
@keyframes dnIn { from { opacity: 0; transform: scale(.1); } }

/* --------------------------------------------------------- tick ruler */
.ticks { position: relative; width: 100%; flex: 0 0 auto; }
.ticks svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ticks line { stroke: currentColor; opacity: .3; stroke-width: 1; transition: opacity .4s; }
.ticks line.on { opacity: .95; }
.ticks-ptr { position: absolute; top: -8px; bottom: -2px; width: 0; border-left: 1.5px solid var(--lime); transition: left .9s var(--ease); }
.ticks-ptr::before { content: ""; position: absolute; top: -5px; left: -6.6px; width: 11.5px; height: 9px; background: var(--lime); clip-path: polygon(0 0, 100% 0, 50% 100%); }

/* --------------------------------------------------------------- wave */
.wave { position: relative; height: 56px; }
.wave svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 70%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 70%, transparent); }
.wave .w0 { stroke: currentColor; opacity: .4; stroke-width: 1; }
.wave .w1 { fill: none; stroke: var(--lime); stroke-width: 1.4; }
.wave .w2 { fill: none; stroke: currentColor; opacity: .5; stroke-width: 1; }
.wave-ptr { position: absolute; left: 62%; top: 50%; width: 11px; height: 9px; margin: -11px 0 0 -5.5px; background: var(--lime); clip-path: polygon(0 0, 100% 0, 50% 100%); }

/* ---------------------------------------------------------- hero stage */
.stage { position: absolute; inset: 0; perspective: 1300px; }
.stage-amb { position: absolute; left: 22%; right: 22%; top: 8%; bottom: 8%; background: radial-gradient(closest-side, var(--glow), transparent 78%); filter: blur(36px); opacity: .75; pointer-events: none; }
[data-theme="light"] .stage-amb { opacity: .55; }
.stage-floor {
  position: absolute; left: -30%; right: -30%; top: 54%; height: 120%; transform: rotateX(74deg); transform-origin: 50% 0;
  background-image: radial-gradient(circle at 50% 50%, var(--floor-dot) 1.1px, transparent 1.7px); background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(46% 42% at 50% 22%, #000 18%, transparent 78%); mask-image: radial-gradient(46% 42% at 50% 22%, #000 18%, transparent 78%);
  pointer-events: none;
}
.stage-orbit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.stage-orbit .o1 { fill: none; stroke: var(--ink-2); stroke-width: 1; }
.stage-orbit .o3 { fill: none; stroke: var(--ink-4); stroke-width: 1; stroke-dasharray: 2 6; }
.stage-orbit .o-ticks line { stroke: var(--ink-3); stroke-width: 1; }
.stage-orbit .o-prog { fill: none; stroke: var(--lime); stroke-width: 2; stroke-linecap: round; animation: progIn 1.1s var(--ease) both; }
@keyframes progIn { from { opacity: 0; } }
.o-head { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); pointer-events: none; }
.o-head::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--lime); animation: ping 1.8s var(--ease) infinite; }
.stage-orbit .o-lead { stroke: color-mix(in srgb, var(--acc) 70%, var(--ink)); stroke-width: 1; opacity: .85; }
.stage-orbit .o-pt { fill: var(--acc); }
.stage-shadow { position: absolute; left: 50%; top: 71%; width: 46%; height: 13%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent); filter: blur(8px); pointer-events: none; }
[data-theme="light"] .stage-shadow { background: radial-gradient(closest-side, rgba(20, 24, 32, .32), transparent); }
.stage-obj { position: absolute; inset: 0; pointer-events: none; animation: objIn .9s var(--ease) both; transform-style: preserve-3d; }
@keyframes objIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.stage--object .stage-obj img, .stage--object .dc { position: absolute; left: 50%; bottom: 28.5%; height: 60%; aspect-ratio: 468 / 450; max-width: 54%; width: auto; object-fit: contain; transform: translateX(-50%); }
.stage--vehicle .stage-obj img, .stage--vehicle .dc { position: absolute; left: 50%; bottom: 25.5%; width: min(58%, 640px); aspect-ratio: 672 / 348; height: auto; object-fit: contain; transform: translateX(-50%); }
.stage-obj img { filter: drop-shadow(0 22px 26px rgba(20, 24, 32, .28)); }
.dc { display: block; }
/* no transform here: PlanModel reports ring/pin geometry from offsetLeft/offsetTop */
.stage--plan .pm { position: absolute; left: 12%; top: 11%; width: 76%; height: 72%; }
.stage--compact.stage--plan .pm { left: 6%; top: 8%; width: 88%; height: 74%; }
.stage--plan .stage-shadow { display: none; }
.stage-orbit--plan { animation: ringIn .7s var(--ease) both; }
@keyframes ringIn { from { opacity: 0; } }
/* room pins on the plan model: floor dot + stem + label */
.pin { position: absolute; width: 0; height: 0; pointer-events: none; animation: chipIn .55s var(--ease) both; }
.pin::before { content: ""; position: absolute; left: -5px; top: -3px; width: 10px; height: 6px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 22%, transparent), 0 0 14px var(--acc); }
.pin::after { content: ""; position: absolute; left: 0; top: 0; width: var(--len, 44px); height: 1px; transform-origin: 0 0; transform: rotate(var(--ang, -1.5708rad)); background: linear-gradient(90deg, var(--acc), color-mix(in srgb, var(--acc) 35%, transparent)); }
.hud-chip.hud-chip--pin { left: var(--cx, -43px); top: var(--cy, -76px); bottom: auto; transform: none; }
.scene { position: relative; width: 100%; height: 100%; }
.scene canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.scene canvas.grabbing { cursor: grabbing; }

/* NEXUS wordmark as type (Hanken Grotesk 800) */
.wm { display: inline-block; font-family: 'Hanken Grotesk', var(--font); font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -.012em; color: var(--ink); white-space: nowrap; font-synthesis: none; }
.stage--plan .stage-plate {
  position: absolute; left: 50%; top: 69%; width: min(38%, 52vh); aspect-ratio: 1; transform: translate(-50%, -54%) rotateX(60deg) rotateZ(-36deg);
  border-radius: 6px; overflow: hidden; isolation: isolate;
  background:
    linear-gradient(color-mix(in srgb, var(--acc) 16%, transparent) 1px, transparent 1px) 0 0 / 8.33% 8.33%,
    linear-gradient(90deg, color-mix(in srgb, var(--acc) 16%, transparent) 1px, transparent 1px) 0 0 / 8.33% 8.33%,
    color-mix(in srgb, var(--acc) 10%, #04060c);
  border: 1px solid color-mix(in srgb, var(--acc) 65%, transparent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .03), 0 0 80px -10px var(--glow), inset 0 0 40px color-mix(in srgb, var(--acc) 22%, transparent);
}
.stage--plan .stage-plate img { width: 100%; height: 100%; object-fit: cover; filter: invert(1) contrast(1.3) brightness(.95); mix-blend-mode: screen; opacity: .9; }
.stage--plan .stage-plate::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--acc) 55%, white); mix-blend-mode: multiply; }
[data-theme="light"] .stage--plan .stage-plate { background: linear-gradient(color-mix(in srgb, var(--acc) 14%, transparent) 1px, transparent 1px) 0 0 / 8.33% 8.33%, linear-gradient(90deg, color-mix(in srgb, var(--acc) 14%, transparent) 1px, transparent 1px) 0 0 / 8.33% 8.33%, #f4f5f7; border-color: color-mix(in srgb, var(--acc) 50%, transparent); }
[data-theme="light"] .stage--plan .stage-plate img { filter: contrast(1.25); mix-blend-mode: multiply; }
[data-theme="light"] .stage--plan .stage-plate::after { background: color-mix(in srgb, var(--acc) 30%, white); }
.stage-hud { position: absolute; inset: 0; pointer-events: none; }
.hud-chip {
  position: absolute; transform: translate(-50%, -100%); display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 9px;
  border-radius: 999px; background: var(--panel); border: 1px solid color-mix(in srgb, var(--acc) 45%, var(--line)); white-space: nowrap;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-size: 12px; color: var(--ink); animation: chipIn .55s var(--ease) both;
}
.hud-chip svg { color: color-mix(in srgb, var(--acc) 60%, var(--ink)); }
.hud-chip b { font-weight: 500; }
.hud-chip em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--lime-tx); }
.hud-chip--front { transform: translate(-50%, 0); }
@keyframes chipIn { from { opacity: 0; scale: .88; } }

/* ------------------------------------------------- transition notice */
.transit {
  position: fixed; left: 50%; top: 86px; z-index: 80; display: flex; align-items: center; gap: 14px; width: min(460px, calc(100vw - 32px));
  padding: 9px 16px 9px 9px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: var(--shadow); transform: translateX(-50%); animation: trIn .45s var(--ease) both;
}
@keyframes trIn { from { opacity: 0; transform: translate(-50%, -10px); } }
.transit-orb { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; background: radial-gradient(circle at 35% 30%, #fff 0, var(--acc) 42%, #05060a 100%); box-shadow: 0 0 22px var(--acc); }
.transit-tx { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; flex: 0 1 auto; }
.transit-tx b { font-size: 12.5px; font-weight: 600; }
.transit-tx span { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transit-tx i { font-style: normal; margin: 0 6px; color: var(--ink-3); }
.transit-bar { position: relative; flex: 1 1 60px; min-width: 50px; height: 14px; background: repeating-linear-gradient(90deg, var(--ink-4) 0 1px, transparent 1px 5px); }
.transit-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: repeating-linear-gradient(90deg, var(--lime) 0 1.5px, transparent 1.5px 5px); animation: trBar 1.15s var(--ease) forwards; }
.transit.done .transit-bar i { width: 100%; animation: none; }
@keyframes trBar { to { width: 100%; } }
.transit-st { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.transit.done .transit-st { color: var(--lime-tx); }

/* ------------------------------------------------------------ popovers */
.picker { position: relative; }
.pop { position: absolute; top: calc(100% + 10px); right: 0; z-index: 70; min-width: 300px; padding: 8px; border-radius: 20px; animation: popIn .22s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.pop-cap { display: block; padding: 6px 10px 8px; font-size: 12px; color: var(--ink-3); }
.pop-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 14px; text-align: left; transition: background .15s; }
.pop-row:hover { background: var(--panel-2); }
.pop-row.on { background: color-mix(in srgb, var(--ink) 9%, transparent); }
.pop-tx { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pop-tx b { font-size: 13.5px; font-weight: 600; }
.pop-tx em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.pop-pct { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pop--chat { width: 400px; height: min(620px, calc(100vh - 110px)); padding: 0; overflow: hidden; border-radius: 26px; }

/* -------------------------------------------------------- sync card */
.sync-card { padding: 20px 22px 20px; display: flex; flex-direction: column; gap: 14px; border-radius: var(--r-xl); min-height: 262px; }
.sync-card .card-hd { color: rgba(255, 255, 255, .9); font-size: 14px; }
.sync-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .16); }
.sync-ic.spin svg { animation: spin 2.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sync-num { display: flex; align-items: flex-end; gap: 6px; margin-top: auto; color: #fff; }
.sync-pct { font-size: 22px; font-weight: 300; padding-bottom: 10px; opacity: .9; }
.sync-card .ticks { color: #fff; }
.sync-ft { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.sync-ft p { font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .86); }
.sync-card--c { min-height: 0; border-radius: 28px; }

/* ---------------------------------------------------------- env card */
.env-card { padding: 16px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.env-card .card-hd { padding: 0 4px; }
.env-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.env-row { display: flex; flex-direction: column; gap: 9px; padding: 12px 12px 11px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); min-width: 0; }
.env-k { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.env-k svg { color: var(--ink-3); }
.env-v { display: inline-flex; align-items: flex-end; gap: 4px; color: var(--ink); min-height: 22px; }
.env-v b { font-size: 16px; font-weight: 500; line-height: 20px; }
.env-v em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.env-ticks { color: var(--ink); }

/* ---------------------------------------------------- control tiles */
.ctrl-panel { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.ctrl-panel .card-hd { flex-wrap: wrap; }
.conn { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; }
.conn em { font-style: normal; font-weight: 400; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.key { display: flex; align-items: center; gap: 10px; }
.key-lb { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.tiles { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 10px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 10px;
  min-height: 104px; padding: 14px 13px 12px; border-radius: var(--r-md); background: var(--tile); border: 1px solid var(--line);
  text-align: left; overflow: hidden; isolation: isolate; transition: border-color .25s, background .25s, transform .15s;
}
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 95% at 100% 0%, var(--glow), transparent 62%); opacity: 0; transition: opacity .35s; }
.tile:hover { border-color: var(--line-2); }
.tile:active { transform: scale(.97); }
.tile.on { background: var(--tile-on); border-color: color-mix(in srgb, var(--acc) 55%, transparent); }
.tile.on::before { opacity: 1; }
.tile-ic { color: var(--ink-3); transition: color .25s; }
.tile.on .tile-ic { color: var(--ink); }
.tile-st { position: absolute; top: 14px; right: 12px; display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: var(--ink-3); }
.tile-st i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-4); }
.tile.on .tile-st { color: var(--lime-tx); }
.tile.on .tile-st i { background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.tile-lb { font-size: 13.5px; font-weight: 500; color: var(--ink); }

/* ------------------------------------------------------- lists, rows */
.spaces { display: flex; flex-direction: column; gap: 2px; }
.space-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 16px; text-align: left; transition: background .2s; }
.space-row:hover { background: var(--panel-2); }
.space-row.on { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.space-sw { width: 36px; height: 36px; border-radius: 12px; flex: 0 0 auto; }
.space-tx { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.space-tx b { font-size: 14px; font-weight: 600; }
.space-tx em { font-style: normal; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.space-pct { display: inline-flex; align-items: flex-end; gap: 2px; color: var(--ink-3); }
.space-pct em { font-style: normal; font-size: 11px; }
.space-row.on .space-pct { color: var(--ink); }

.modes { display: flex; flex-direction: column; gap: 2px; }
.modes--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; text-align: left; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.mode-row:hover { background: var(--panel-2); }
.modes--grid .mode-row { border-color: var(--line); background: var(--panel-2); }
.mode-row.on { background: color-mix(in srgb, var(--ink) 9%, transparent); border-color: var(--line-2); }
.mode-sw { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; }
.mode-tx { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.mode-tx b { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.mode-tx em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.mode-on { color: var(--lime-tx); }

.forms { display: flex; flex-direction: column; gap: 8px; }
.form-row {
  display: flex; align-items: center; gap: 12px; padding: 7px 14px 7px 7px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); text-align: left; min-width: 240px; transition: border-color .2s, background .2s;
}
.form-row:hover:not(:disabled) { border-color: var(--line-2); }
.form-row.on { border-color: color-mix(in srgb, var(--acc) 65%, transparent); background: color-mix(in srgb, var(--acc) 10%, var(--panel)); }
.form-row:disabled { opacity: .5; }
.form-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); color: var(--ink-2); flex: 0 0 auto; }
.form-ic.aura { color: #fff; }
.form-tx { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.form-tx b { font-size: 13px; font-weight: 600; letter-spacing: .03em; }
.form-tx em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.form-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.form-row.on .form-dot { background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.form-soon { font-size: 11px; color: var(--ink-3); }
.forms--h { flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.forms--h::-webkit-scrollbar { display: none; }
.forms--h .form-row { min-width: 0; flex: 0 0 auto; }

.node-card { padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 14px; }
.node-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.node-sum-i { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 10px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); }
.node-sum-i span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.node-sum-i span i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); }
.node-sum-i.st-online span i { background: var(--lime); }
.node-sum-i.st-structure span i { background: var(--ink-2); }
.node-list { display: flex; flex-direction: column; }
.node-row { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--line); }
.node-ic { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; background: var(--panel-2); color: var(--ink-3); flex: 0 0 auto; }
.node-nm { flex: 1; font-size: 13.5px; font-weight: 500; min-width: 0; }
.node-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.node-st i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); }
.node-row.st-online .node-ic { color: #fff; background: var(--acc); box-shadow: 0 0 18px -4px var(--acc); }
.node-row.st-online .node-st { color: var(--lime-tx); }
.node-row.st-online .node-st i { background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.node-row.st-structure .node-ic { color: var(--ink-2); }
.node-row.st-structure .node-st { color: var(--ink-2); }
.node-row.st-structure .node-st i { background: var(--ink-2); }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 12px; color: var(--ink-2); }
.lg { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.lg i { width: 22px; height: 0; border-top: 1.5px solid var(--acc); }
.lg--indirect i { border-top: 1.5px dotted var(--ink-2); }
.lg--pulse i { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); }
.hint { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.note { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }

.list { display: flex; flex-direction: column; padding: 6px; }
.list-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 11px 12px; border-radius: 16px; text-align: left; color: var(--ink-3); transition: background .15s; }
.list-row:hover { background: var(--panel-2); }
.list-ic { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); flex: 0 0 auto; }
.list-tx { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.list-tx b { font-size: 14px; font-weight: 600; color: var(--ink); }
.list-tx em { font-style: normal; font-size: 12.5px; color: var(--ink-3); }

/* ------------------------------------------------------------- chat */
.cw { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.cw-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 16px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.cw-orb { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; }
.cw-who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.cw-who b { font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.cw-who span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.cw-who span i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }
.cw-wave { flex: 1 1 auto; max-width: 240px; height: 34px; min-width: 40px; color: var(--ink); margin-left: auto; }
.cw-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; min-height: 0; scrollbar-width: thin; }
.cw-row { display: flex; flex-direction: column; max-width: 80%; gap: 5px; animation: msgIn .35s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.cw-row.me { align-self: flex-end; align-items: flex-end; }
.cw-row.ai { align-self: flex-start; }
.cw-bub { padding: 11px 15px; border-radius: 22px; font-size: 14px; line-height: 1.55; text-wrap: pretty; }
.cw-row.ai .cw-bub { background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 7px; }
.cw-row.me .cw-bub { background: var(--ink); color: var(--bg); border-bottom-right-radius: 7px; }
.cw-time { font-size: 10.5px; color: var(--ink-3); padding: 0 6px; font-variant-numeric: tabular-nums; }
.cw-act { display: flex; align-items: center; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--lime-tx); }
.cw-act i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.cw-typing { align-self: flex-start; display: flex; gap: 5px; padding: 15px 16px; border-radius: 22px; border-bottom-left-radius: 7px; background: var(--panel-2); border: 1px solid var(--line); }
.cw-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-2); animation: typ 1.1s infinite; }
.cw-typing i:nth-child(2) { animation-delay: .15s; }
.cw-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typ { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.cw-chips { display: flex; gap: 8px; padding: 2px 16px 12px; flex-wrap: wrap; flex: 0 0 auto; }
.cw-chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink); transition: background .15s; }
.cw-chip:hover { background: var(--panel-2); }
.cw-input { display: flex; align-items: center; gap: 10px; padding: 12px 14px 14px; border-top: 1px solid var(--line); flex: 0 0 auto; }
.cw-field { flex: 1; display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 6px 0 18px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); min-width: 0; transition: border-color .2s; }
.cw-field:focus-within { border-color: var(--line-2); }
.cw-field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; font-size: 14px; color: var(--ink); }
.cw-field input::placeholder { color: var(--ink-3); }
.cw-mic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); }
.cw-mic:disabled { opacity: .45; cursor: not-allowed; }
.cw-send { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); flex: 0 0 auto; transition: opacity .2s, transform .15s; }
.cw-send:disabled { opacity: .3; }
.cw-send:not(:disabled):active { transform: scale(.94); }

/* ------------------------------------------------------- page views */
.view { position: relative; z-index: 1; }
.scene { position: relative; width: 100%; height: 100%; }
.scene canvas { position: absolute; inset: 0; display: block; cursor: grab; touch-action: pan-y; }
.scene canvas.grabbing { cursor: grabbing; }
.view-hd { display: flex; flex-direction: column; gap: 8px; }
.view-hd h1 { font-size: 40px; font-weight: 300; letter-spacing: -.03em; line-height: 1.1; }
.view-hd p { font-size: 14.5px; color: var(--ink-2); max-width: 52ch; }
.sec-hd { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 12px; padding: 0 4px; }
.empty { font-size: 13px; color: var(--ink-3); line-height: 1.55; }

/* life */
.life { display: flex; flex-direction: column; gap: 22px; }
.metrics { display: flex; flex-wrap: wrap; gap: 14px 46px; align-items: flex-end; }
.metric { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.metric-v { display: flex; align-items: flex-end; gap: 6px; }
.metric-v em { font-style: normal; font-size: 15px; font-weight: 400; color: var(--ink-3); padding-bottom: 4px; }
.metric-k { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); }
.metric-k.lime { background: var(--lime); color: var(--lime-ink); border-color: transparent; }
.tl-card { padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.tl { position: relative; height: 154px; }
.tl-track { position: absolute; left: 0; right: 0; bottom: 30px; height: 44px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; }
.tl-track i { width: 1px; height: 8px; background: var(--ink-4); }
.tl-track i.mj { height: 16px; background: var(--ink-3); }
.tl-mk { position: absolute; bottom: 41px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; box-shadow: 0 0 0 3px var(--bg); transition: transform .2s; z-index: 2; }
.tl-mk:hover { transform: scale(1.12); }
.tl-mk.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--lime); }
.tl-pop { position: absolute; bottom: 82px; transform: translateX(-50%); /* grows upward, 8px above the track */ display: flex; flex-direction: column; gap: 2px; width: max-content; max-width: 320px; padding: 9px 14px; border-radius: 16px; background: var(--ink); color: var(--bg); animation: popIn .25s var(--ease); z-index: 3; }
.tl-pop b { font-size: 12px; font-weight: 600; }
.tl-pop span { font-size: 12.5px; line-height: 1.4; opacity: .8; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-wrap: pretty; }
.tl-ax { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); padding: 0 10px; }
.life-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
.life-cols > .card { padding: 18px 18px 10px; display: flex; flex-direction: column; gap: 6px; }
.moments { display: flex; flex-direction: column; }
.moment button { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; padding: 14px 6px; border-top: 1px solid var(--line); transition: background .2s; border-radius: 0; }
.moment:first-child button { border-top: 0; }
.moment.on button p { color: var(--ink); }
.moment-top { display: flex; align-items: center; gap: 10px; }
.moment-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.moment time { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.moment p { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.routines { display: flex; flex-direction: column; }
.routine { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 4px; border-top: 1px solid var(--line); }
.routine:first-child { border-top: 0; }
.routine-tx { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 6px; align-items: center; color: var(--ink-3); min-width: 0; }
.routine.on .routine-tx { color: var(--ink); }
.routine-tx .dn { grid-row: 1 / span 2; }
.routine-tx b { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.routine-tx span { font-size: 13.5px; color: var(--ink-2); }

/* my */
.my { display: flex; flex-direction: column; gap: 30px; }
.my-head { display: flex; align-items: center; gap: 22px; }
.my-id { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.my-id h1 { font-size: 44px; font-weight: 300; letter-spacing: -.03em; line-height: 1.05; }
.my-id .pill { margin-top: 4px; }
.inst { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.inst-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 230px; padding: 18px 20px; border-radius: var(--r-xl); text-align: left; transition: transform .25s var(--ease), box-shadow .25s; }
.inst-card:hover { transform: translateY(-3px); }
.inst-card.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--lime); }
.inst-top { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px; }
.inst-top em { font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: .04em; opacity: .85; }
.inst-num { display: flex; align-items: flex-end; gap: 4px; margin-top: auto; }
.inst-num em { font-style: normal; font-size: 16px; font-weight: 300; padding-bottom: 6px; }
.inst-card b { font-size: 17px; font-weight: 600; }
.inst-pl { font-size: 12.5px; opacity: .8; }

/* catalog */
.catalog { display: flex; flex-direction: column; gap: 24px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cat-card { display: flex; flex-direction: column; overflow: hidden; background: var(--panel); border: 1px solid var(--line); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); border-radius: var(--r-xl); transition: border-color .3s; }
.cat-card.on { border-color: color-mix(in srgb, var(--acc) 55%, transparent); }
.cat-stage { position: relative; aspect-ratio: 1 / 0.86; margin: 8px 8px 0; border-radius: 24px; overflow: hidden; background: radial-gradient(70% 60% at 50% 55%, color-mix(in srgb, var(--acc) 22%, #000) 0%, #000 72%); }
.cat-stage img { position: absolute; inset: 6% 8% 0; width: 84%; height: 94%; object-fit: contain; mix-blend-mode: lighten; transition: transform .6s var(--ease); }
.cat-card:hover .cat-stage img { transform: scale(1.04); }
.cat-type { position: absolute; top: 14px; left: 14px; height: 24px; font-size: 11px; letter-spacing: .04em; }
.cat-body { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; flex: 1; }
.cat-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cat-h h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.cat-h span { font-size: 12.5px; }
.cat-body p { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.cat-specs { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-specs .pill { height: 26px; font-size: 12px; }
.cat-ft { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.cat-st { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); }
.cat-st i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); }
.cat-st.on { color: var(--lime-tx); }
.cat-st.on i { background: var(--lime); box-shadow: 0 0 8px var(--lime); }

/* settings */
.settings { display: flex; flex-direction: column; gap: 18px; }
.set-prof { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.set-prof-tx { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.set-prof-tx b { font-size: 17px; font-weight: 600; }
.set-prof-tx span { font-size: 12.5px; color: var(--ink-3); }
.set-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.set-col { display: flex; flex-direction: column; gap: 18px; }
.set-group { padding: 16px 18px 6px; display: flex; flex-direction: column; }
.set-group .card-hd { margin-bottom: 4px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.set-group .card-hd + .set-row { border-top: 0; }
.set-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.set-tx b { font-size: 14px; font-weight: 500; }
.set-tx span { font-size: 12.5px; color: var(--ink-3); }
.set-link { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 13px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink); text-align: left; }
.set-link svg { color: var(--ink-3); }

/* ------------------------------------------------- family row + theater (2026-11-01) */
.fam { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.fam-tile {
  position: relative; display: block; height: 112px; border-radius: 24px; overflow: hidden; isolation: isolate; padding: 0;
  text-align: left; color: #fff; background: #0C0E12; box-shadow: var(--sh-1); transition: transform .25s var(--ease), box-shadow .25s;
}
.fam-tile:hover { transform: translateY(-2px); box-shadow: 0 22px 40px -22px rgba(10, 14, 26, .55); }
.fam-tile:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.fam-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform .7s var(--ease); }
.fam-tile:hover .fam-img { transform: scale(1.08); }
.fam-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 10, 14, 0) 28%, rgba(8, 10, 14, .74) 100%); }
.fam-tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 5px; }
.fam-tag, .thr-tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  color: #fff; background: rgba(12, 14, 18, .42); border: 1px solid rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); white-space: nowrap;
}
.fam-tag--ai, .thr-tag--ai { color: #1C2100; background: #E3F35B; border-color: transparent; }
.fam-tx { position: absolute; left: 16px; right: 54px; bottom: 13px; display: flex; flex-direction: column; gap: 3px; line-height: 1.2; }
.fam-tx b { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.fam-tx em { font-style: normal; font-family: 'Hanken Grotesk', var(--font); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .74); white-space: nowrap; }
.fam-go {
  position: absolute; right: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background .2s, color .2s, border-color .2s;
}
.fam-tile:hover .fam-go, .fam-tile:focus-visible .fam-go { background: var(--lime); color: #1C2100; border-color: transparent; }

.thr {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 28px;
  background: rgba(6, 8, 12, .62); -webkit-backdrop-filter: blur(16px) saturate(1.1); backdrop-filter: blur(16px) saturate(1.1); animation: thrIn .25s var(--ease);
}
@keyframes thrIn { from { opacity: 0; } }
.thr-box {
  width: min(1080px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 18px; border-radius: 30px; color: #F3F4F6;
  background: radial-gradient(70% 120% at 100% 0%, color-mix(in srgb, var(--acc) 22%, transparent), transparent 60%), linear-gradient(165deg, #1D2027 0%, #0C0E12 100%);
  box-shadow: 0 50px 110px -30px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .06); animation: popIn .3s var(--ease);
}
.thr-hd { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 2px 2px 0 10px; min-height: 40px; }
.thr-tt { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.thr-tt b { font-size: 19px; font-weight: 700; letter-spacing: -.015em; white-space: nowrap; }
.thr-tt em { font-style: normal; font-family: 'Hanken Grotesk', var(--font); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(243, 244, 246, .55); white-space: nowrap; }
.thr-tags { display: flex; gap: 6px; }
.thr-tag { height: 24px; font-size: 11px; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); -webkit-backdrop-filter: none; backdrop-filter: none; }
.thr-tag.thr-tag--ai { color: #1C2100; background: #E3F35B; border-color: transparent; }
.thr-x { margin-left: auto; width: 40px; height: 40px; color: #F3F4F6; background: rgba(255, 255, 255, .08); border: 0; }
.thr-x:hover { color: #fff; background: rgba(255, 255, 255, .16); }
.thr-media { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 220px); border-radius: 20px; overflow: hidden; background: #06070A; }
.thr-v, .thr-i, .thr-g { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.thr-g { opacity: 0; transition: opacity .8s var(--ease); }
.thr-g.on { opacity: 1; }
.thr-dots { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; background: rgba(0, 0, 0, .42); }
.thr-dot { width: 7px; height: 7px; padding: 0; border-radius: 999px; background: rgba(255, 255, 255, .38); transition: width .3s var(--ease), background .3s; }
.thr-dot.on { width: 22px; background: #fff; }
.thr-box:focus { outline: none; }
.thr-vw { position: absolute; inset: 0; }
.thr-vw .thr-v { cursor: pointer; }
.thr-vw.idle, .thr-vw.idle .thr-v { cursor: none; }
.thr-ctl {
  position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 18px 0 6px; border-radius: 999px;
  background: rgba(10, 12, 16, .46); border: 1px solid rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.thr-vw.idle .thr-ctl:not(:focus-within) { opacity: 0; transform: translateY(6px); pointer-events: none; }
.thr-pp {
  flex: none; width: 34px; height: 34px; padding: 0; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(255, 255, 255, .14); transition: background .2s, color .2s, transform .2s var(--ease);
}
.thr-pp:hover { background: #E3F35B; color: #1C2100; }
.thr-pp:active { transform: scale(.94); }
.thr-time { flex: none; font-family: 'Hanken Grotesk', var(--font); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: rgba(243, 244, 246, .72); white-space: nowrap; }
.thr-seek { --p: 0%; flex: 1; min-width: 0; height: 26px; margin: 0; padding: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.thr-seek:focus { outline: none; }
.thr-seek::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, #fff 0 var(--p), rgba(255, 255, 255, .24) var(--p) 100%); }
.thr-seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 13px; height: 13px; margin-top: -5px; border: 0; border-radius: 50%; background: #fff;
  transform: scale(0); transition: transform .2s var(--ease), box-shadow .2s;
}
.thr-ctl:hover .thr-seek::-webkit-slider-thumb, .thr-seek:focus-visible::-webkit-slider-thumb, .thr-seek:active::-webkit-slider-thumb { transform: scale(1); }
.thr-seek:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px #E3F35B; }
.thr-seek::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .24); }
.thr-seek::-moz-range-progress { height: 3px; border-radius: 3px; background: #fff; }
.thr-seek::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; }
.thr-seek:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px #E3F35B; }
.thr-strip { display: flex; justify-content: center; gap: 10px; }
.thr-th { width: 92px; height: 52px; padding: 0; border-radius: 12px; overflow: hidden; opacity: .48; border: 2px solid transparent; transition: opacity .2s, border-color .2s, transform .2s var(--ease); }
.thr-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thr-th:hover { opacity: .85; transform: translateY(-1px); }
.thr-th.on { opacity: 1; border-color: #E3F35B; }
.thr-th:focus-visible, .thr-x:focus-visible, .thr-dot:focus-visible, .thr-pp:focus-visible { outline: 2px solid #E3F35B; outline-offset: 2px; }
@media (max-width: 640px) {
  .thr { padding: 0; place-items: stretch; }
  .thr-box {
    width: 100%; height: 100%; max-height: none; border-radius: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 16px;
    padding: calc(10px + env(safe-area-inset-top)) 12px calc(24px + env(safe-area-inset-bottom));
  }
  .thr-hd { padding-left: 4px; }
  .thr-tt b { font-size: 17px; }
  .thr-media { align-self: center; max-height: 100%; border-radius: 16px; }
  .thr-ctl { left: 8px; right: 8px; bottom: 8px; height: 40px; gap: 10px; padding: 0 14px 0 4px; }
  .thr-pp { width: 32px; height: 32px; }
  .thr-time { font-size: 11px; }
  .thr-th { width: 66px; height: 40px; border-radius: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* essentials-only copy (2026-11-01): blocks that lost their sub-labels */
.routines-card { padding: 18px 18px 10px; display: flex; flex-direction: column; gap: 6px; }
.list-val { margin-left: auto; font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.inst-top { min-height: 26px; justify-content: flex-end; }
button.set-prof { width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; }
button.set-prof > svg { color: var(--ink-3); flex: none; }
.key-btn { gap: 6px; }
