/* CoderMitchell Studio: dark editor chrome, crisp 1px lines, tabular numbers. */
:root {
  --bg: #121317; --p0: #18191d; --p1: #1e1f24; --p2: #25262c; --p3: #2c2d34; --p4: #34353d;
  --line: #34353c; --line-soft: #2a2b31; --line-hi: #44464f;
  --text: #e6e6ea; --mut: #a9aab4; --dim: #8b8c96; --faint: #5d5f69;
  --blue: #3b82f6; --blue-hi: #5b98f8; --blue-soft: rgba(59,130,246,.16); --blue-line: rgba(59,130,246,.55);
  --amber: #f5b83d; --green: #34d399; --red: #f87171; --violet: #a78bfa; --pink: #f472b6; --cyan: #22d3ee;
  --ui: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --exw: 248px; --prw: 304px; --outh: 196px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-io: cubic-bezier(.65,0,.35,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.45 var(--ui); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-variant-numeric: tabular-nums; }
::selection { background: var(--blue); color: #fff; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
kbd { font: 500 10px/1 var(--mono); color: var(--dim); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 2px 4px; background: var(--p2); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
svg.i { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.c-amber { color: var(--amber); } .c-green { color: var(--green); } .c-red { color: var(--red); } .c-violet { color: var(--violet); }
.c-pink { color: var(--pink); } .c-cyan { color: var(--cyan); } .c-blue { color: var(--blue-hi); } .c-dim { color: var(--dim); }
.mono { font-family: var(--mono); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: #3a3b43 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #34353d; border: 3px solid transparent; background-clip: padding-box; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background-color: #4a4b55; }
::-webkit-scrollbar-corner { background: transparent; }

/* shared bits */
.mark { width: 18px; height: 18px; border-radius: 5px; background: var(--blue); display: inline-grid; place-items: center; transform: rotate(-10deg); box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset; flex: none; }
.mark span { width: 7px; height: 7px; background: #fff; border-radius: 1.5px; transform: rotate(10deg); }
.mark.big { width: 44px; height: 44px; border-radius: 11px; }
.mark.big span { width: 16px; height: 16px; border-radius: 3px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(52,211,153,.18); flex: none; }
.icon-btn { width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 5px; color: var(--mut); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--p3); color: var(--text); }
.icon-btn.sm { width: 22px; height: 22px; }
.btn { height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border-radius: 6px; border: 1px solid var(--blue-hi); background: var(--blue); font-weight: 600; color: #fff; transition: background .15s, transform .15s var(--ease), box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--blue-hi); box-shadow: 0 6px 18px -8px rgba(59,130,246,.8); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; border-color: var(--line-hi); color: var(--text); }
.btn.ghost:hover { background: var(--p3); box-shadow: none; }
.btn.busy span::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: dots 1s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ================= splash ================= */
#splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(60% 50% at 50% 40%, #1a2133 0%, var(--bg) 70%); transition: opacity .4s ease, visibility 0s linear .4s; cursor: pointer; }
#splash.out { opacity: 0; visibility: hidden; }
.splash-card { width: min(340px, 84vw); display: grid; justify-items: center; gap: 14px; text-align: center; }
.splash-card .mark { animation: spin-in 1.4s var(--ease) both; }
@keyframes spin-in { from { transform: rotate(-200deg) scale(.6); opacity: 0; } to { transform: rotate(-10deg) scale(1); opacity: 1; } }
.splash-title { margin: 6px 0 0; font-size: 15px; color: var(--mut); }
.splash-title b { color: #fff; font-weight: 600; }
.splash-track { width: 100%; height: 3px; border-radius: 3px; background: var(--p3); overflow: hidden; }
#splash-bar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-hi)); transform: scaleX(.04); transform-origin: 0 50%; transition: transform .25s var(--ease); }
.splash-stat { margin: 0; min-height: 16px; font: 11px var(--mono); color: var(--dim); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#splash-skip { font-size: 12px; color: var(--dim); display: inline-flex; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 5px; }
#splash-skip:hover { color: var(--text); background: var(--p2); }

/* ================= mode switch ================= */
body[data-mode="desktop"] .mob, body[data-mode="mobile"] .desk { display: none; }
body.pageview { overflow: auto; }

/* ================= desktop ================= */
.desk { height: 100vh; height: 100dvh; min-height: 640px; display: grid; grid-template-rows: 36px 38px minmax(0,1fr) 24px; background: var(--p1); overflow: hidden; }
.titlebar { display: flex; align-items: center; gap: 12px; padding: 0 10px 0 12px; background: var(--p0); border-bottom: 1px solid var(--line); min-width: 0; }
.appname { font-weight: 700; font-size: 12.5px; letter-spacing: -.01em; white-space: nowrap; }
.rtabs { display: flex; align-self: stretch; margin-left: 6px; }
.rtabs button { position: relative; padding: 0 12px; font-size: 12.5px; font-weight: 500; color: var(--mut); transition: color .15s, background .15s; }
.rtabs button:hover { color: var(--text); background: var(--p2); }
.rtabs button[aria-selected="true"] { color: #fff; }
.rtabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--blue); border-radius: 2px 2px 0 0; }
.docname { margin: 0 auto; display: flex; align-items: center; gap: 8px; color: var(--mut); font-size: 12px; white-space: nowrap; }
.docname .state { font: 500 10.5px var(--mono); color: var(--dim); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
body.playing .docname .state { color: #bbf7d0; border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.1); }
.tb-end { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--mut); }
.tb-link { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 5px; text-decoration: none; color: var(--mut); transition: color .15s, background .15s; }
.tb-link:hover { color: var(--text); background: var(--p2); }
.tb-live { display: inline-flex; align-items: center; gap: 7px; padding: 0 8px 0 10px; margin-left: 4px; border-left: 1px solid var(--line); height: 18px; }

.ribbon { display: flex; align-items: center; gap: 2px; padding: 0 8px; background: var(--p1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ribbon::-webkit-scrollbar { display: none; }
.tool { height: 26px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid transparent; border-radius: 5px; font-size: 12px; color: var(--mut); white-space: nowrap; transition: background .12s, color .12s, border-color .12s; }
.tool:hover:not(:disabled) { background: var(--p2); color: var(--text); }
.tool:active:not(:disabled) { background: var(--p3); }
.tool:disabled { opacity: .42; }
.tool.on { background: var(--blue-soft); border-color: var(--blue-line); color: #dbe7fe; }
.tool kbd { padding: 1px 4px; font-size: 9.5px; border-bottom-width: 1px; }
.tool.on kbd { border-color: var(--blue-line); color: #a9c6fb; background: transparent; }
.tool .chev { width: 10px; height: 10px; opacity: .7; }
.sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; flex: none; }
.grow { flex: 1; min-width: 8px; }
.tool.play { color: #fff; background: #1d9152; border-color: #27b465; font-weight: 600; }
.tool.play:hover:not(:disabled) { background: #22a45d; color: #fff; }
.tool.play kbd { color: #c8f5da; border-color: rgba(255,255,255,.3); background: transparent; }
.tool.play.stop { background: #b4383a; border-color: #d65456; }
.tool.play.stop:hover { background: #c94446; }
.tool.cta { color: #fff; background: var(--blue); border-color: var(--blue-hi); font-weight: 600; padding: 0 12px; }
.tool.cta:hover:not(:disabled) { background: var(--blue-hi); color: #fff; }

.editor { display: grid; grid-template-columns: var(--exw) minmax(0,1fr) var(--prw); grid-template-rows: minmax(0,1fr) var(--outh); grid-template-areas: "exp vp props" "exp out props"; min-height: 0; transition: grid-template-columns .25s var(--ease), grid-template-rows .25s var(--ease); }
.editor.no-explorer { --exw: 0px; } .editor.no-explorer .explorer { visibility: hidden; border: 0; }
.editor.no-props { --prw: 0px; } .editor.no-props .props { visibility: hidden; border: 0; }
.editor.no-output { --outh: 0px; } .editor.no-output .output { visibility: hidden; border: 0; }
.explorer { grid-area: exp; border-right: 1px solid var(--line); background: var(--p1); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.vpane { grid-area: vp; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.props { grid-area: props; border-left: 1px solid var(--line); background: var(--p1); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.output { grid-area: out; border-top: 1px solid var(--line); background: var(--p1); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.panehead { height: 28px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 10px; background: var(--p2); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; white-space: nowrap; }
.panehead .muted { font-weight: 400; color: var(--dim); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.panehead .end { margin-left: auto; display: flex; align-items: center; gap: 2px; color: var(--mut); font-weight: 400; }

/* explorer */
.filter { margin: 8px 8px 4px; height: 28px; flex: none; border: 1px solid var(--line); background: var(--p0); border-radius: 5px; display: flex; align-items: center; gap: 7px; padding: 0 6px 0 8px; color: var(--dim); transition: border-color .15s, box-shadow .15s; }
.filter:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.filter input { flex: 1; min-width: 0; border: 0; background: none; font-size: 12px; color: var(--text); height: 100%; }
.filter input::placeholder { color: var(--faint); }
.filter input::-webkit-search-cancel-button { filter: invert(.6); }
.filter kbd { padding: 1px 5px; }
.tree { list-style: none; margin: 0; padding: 2px 0 10px; overflow: auto; flex: 1; min-height: 0; }
.node { height: 24px; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 calc(6px + var(--d) * 14px); font-size: 12.5px; color: var(--text); cursor: default; user-select: none; border: 1px solid transparent; position: relative; white-space: nowrap; }
.node::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(12px + (var(--d) - 1) * 14px); width: 1px; background: var(--line-soft); }
.node[aria-level="1"]::before { display: none; }
.node:hover, .node.hov { background: var(--p2); }
.node.sel { background: var(--blue-soft); border-color: var(--blue-line); }
.node.sel .nm { color: #fff; font-weight: 600; }
.node:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--blue-hi); border-radius: 0; }
.node.hidden-obj .nm { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.25); }
.node .car { width: 14px; height: 20px; display: grid; place-items: center; color: var(--dim); flex: none; cursor: pointer; border-radius: 3px; }
.node .car:hover { color: var(--text); background: var(--p3); }
.node .car svg { width: 10px; height: 10px; stroke-width: 2; }
.node .nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.node mark { background: rgba(245,184,61,.3); color: #fff; border-radius: 2px; }
.node .meta { margin-left: auto; padding-left: 6px; color: var(--dim); font: 10.5px var(--mono); }
.node .meta.live { color: var(--green); }
.tree .empty { padding: 10px 14px; color: var(--dim); font-size: 12px; }
.treefoot { flex: none; border-top: 1px solid var(--line); padding: 10px 12px; color: var(--mut); font-size: 12px; line-height: 1.5; }
.treefoot b { color: var(--text); font-weight: 600; }
.treefoot span { color: var(--dim); }

/* doc tabs */
.doctabs { height: 30px; flex: none; display: flex; align-items: stretch; background: var(--p2); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.doctabs::-webkit-scrollbar { display: none; }
.doctab { display: flex; align-items: center; gap: 7px; padding: 0 8px 0 12px; font-size: 12px; color: var(--mut); border-right: 1px solid var(--line); cursor: pointer; white-space: nowrap; max-width: 220px; transition: color .12s, background .12s; user-select: none; }
.doctab span { overflow: hidden; text-overflow: ellipsis; }
.doctab:first-child { padding-right: 14px; }
.doctab:hover { color: var(--text); background: var(--p3); }
.doctab.on { background: var(--p1); color: var(--text); font-weight: 600; box-shadow: inset 0 2px 0 var(--blue); margin-bottom: -1px; }
.doctab .x { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 4px; color: var(--dim); opacity: 0; transition: opacity .12s, background .12s; }
.doctab:hover .x, .doctab.on .x, .doctab .x:focus-visible { opacity: 1; }
.doctab .x:hover { background: var(--p4); color: var(--text); }
.doctab .x svg { width: 10px; height: 10px; }
.doctabs .end { margin-left: auto; display: flex; align-items: center; gap: 14px; padding: 0 12px; font: 11px var(--mono); color: var(--dim); white-space: nowrap; }

/* viewport */
.vpwrap { position: relative; flex: 1; min-height: 0; }
.vp { position: absolute; inset: 0; overflow: hidden; background: #0f1014; isolation: isolate; }
.vp.behind { visibility: hidden; }
.vp-canvas { position: absolute; inset: 0; display: block; outline: none; touch-action: none; }
.vp-canvas:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.hero { position: absolute; z-index: 3; left: 16px; top: 16px; width: min(500px, 58%); padding: 24px 26px 20px; border-radius: 12px; background: linear-gradient(160deg, rgba(16,17,23,.84), rgba(16,17,23,.7)); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.06) inset; backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); transition: opacity .6s ease, transform .7s var(--ease), visibility 0s; }
.hero.faded { opacity: 0; transform: translateY(-10px); visibility: hidden; transition: opacity .45s ease, transform .5s var(--ease), visibility 0s linear .5s; }
.hero h1 { margin: 0; padding-right: 26px; font-size: clamp(32px, 2.9vw, 44px); line-height: 1; font-weight: 800; letter-spacing: -.045em; color: #fff; text-wrap: balance; max-width: 10em; text-shadow: 0 2px 24px rgba(0,0,0,.5); }
.hero h1 em { font-style: normal; background: rgba(59,130,246,.42); box-shadow: 0 0 0 3px rgba(59,130,246,.42); border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero > p { margin: 14px 0 0; max-width: 470px; font-size: 14px; line-height: 1.55; color: #d6d7de; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.billing { margin-top: 18px; display: flex; }
.billing div { padding: 0 20px; border-left: 1px solid rgba(255,255,255,.16); }
.billing div:first-child { padding-left: 0; border-left: 0; }
.billing b { display: block; font-size: clamp(26px, 2.4vw, 36px); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: #fff; }
.billing span { display: block; margin-top: 6px; font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mut); }
.hero-award { margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 9px; border-radius: 8px; background: rgba(245,184,61,.12); border: 1px solid rgba(245,184,61,.45); color: #f6d38a; text-align: left; transition: background .15s, transform .2s var(--ease); backdrop-filter: blur(6px); }
.hero-award:hover { background: rgba(245,184,61,.2); transform: translateY(-1px); }
.hero-award svg { width: 22px; height: 22px; color: var(--amber); }
.hero-award b { display: block; font-size: 13px; color: #fff; }
.hero-award small { display: block; font-size: 11.5px; color: #e2c486; }
.hero-brands { margin-top: 16px; display: flex; align-items: center; gap: 22px; }
.hero-brands { padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); gap: 20px; }
.hero-brands img { height: 20px; width: auto; max-width: 88px; }
.hero-brands img.sb { height: 28px; }
.hero-hint { margin: 14px 0 0 !important; font-size: 12px !important; line-height: 1.5 !important; color: var(--mut) !important; text-shadow: none !important; }
.hero-hint svg { vertical-align: -2px; margin-right: 6px; color: var(--blue-hi); }
.hero-hint kbd { color: var(--text); }
.hero-x { position: absolute; right: 10px; top: 10px; }
.hud { position: absolute; z-index: 4; right: 12px; top: 12px; display: flex; gap: 6px; }
.chip { height: 26px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; background: rgba(24,25,29,.82); border: 1px solid var(--line); border-radius: 5px; font: 500 11px var(--mono); color: var(--mut); backdrop-filter: blur(8px); transition: color .15s, border-color .15s, background .15s; }
.chip:hover { color: var(--text); border-color: var(--line-hi); background: rgba(36,37,43,.9); }
.chip.award { color: #f6d38a; border-color: rgba(245,184,61,.45); }
.chip.award svg { color: var(--amber); }
.seltag { position: absolute; z-index: 4; left: 0; top: 0; pointer-events: none; background: var(--blue); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.35); will-change: transform; }
.seltag::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; background: var(--blue); transform: translateX(-50%) rotate(45deg); border-radius: 1px; z-index: -1; }
.axes { position: absolute; z-index: 4; left: 10px; bottom: 10px; width: 64px; height: 64px; background: rgba(18,19,23,.55); border: 1px solid rgba(255,255,255,.07); border-radius: 50%; backdrop-filter: blur(6px); }
.axes .ax { cursor: pointer; }
.axes .ax circle { transition: r .15s; }
.axes .ax:hover circle { r: 9; }
.axes .ax:focus-visible { outline: none; }
.axes .ax:focus-visible circle { stroke: #fff; stroke-width: 1.5; }
.vpfoot { position: absolute; z-index: 4; right: 10px; bottom: 10px; display: flex; gap: 12px; align-items: center; font: 11px var(--mono); color: var(--mut); background: rgba(18,19,23,.72); border: 1px solid rgba(255,255,255,.07); border-radius: 5px; padding: 5px 10px; backdrop-filter: blur(6px); }
.vpfoot span { display: inline-flex; align-items: center; gap: 5px; }
.vpfoot b { color: var(--text); font-weight: 500; }
.vpfoot svg { width: 12px; height: 12px; }
.playhud { position: absolute; z-index: 4; left: 50%; top: 18px; transform: translateX(-50%); display: flex; align-items: baseline; gap: 10px; padding: 8px 18px; border-radius: 10px; background: rgba(14,15,19,.78); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px); box-shadow: 0 20px 40px -20px rgba(0,0,0,.7); animation: drop .5s var(--ease); }
.playhud b { font-size: 34px; font-weight: 800; letter-spacing: -.04em; color: #fff; min-width: 2.2ch; text-align: right; }
.playhud span { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mut); }
.playhud.done { border-color: rgba(52,211,153,.5); }
.playhud.done b { color: #bbf7d0; }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -12px); } }
.walltip { position: absolute; z-index: 5; left: 0; top: 0; pointer-events: none; padding: 6px 10px; border-radius: 6px; background: rgba(14,15,19,.92); border: 1px solid var(--line-hi); box-shadow: 0 10px 24px -10px rgba(0,0,0,.8); }
.walltip b { display: block; font-size: 12.5px; color: #fff; }
.walltip span { font: 10.5px var(--mono); color: var(--mut); }
.statsov { position: absolute; z-index: 4; left: 10px; top: 10px; font: 11px/1.6 var(--mono); color: var(--mut); background: rgba(14,15,19,.8); border: 1px solid var(--line); border-radius: 5px; padding: 6px 10px; }
.statsov b { color: #bbf7d0; font-size: 13px; }
body.playing .axes, body.playing .vpfoot { opacity: .5; }

/* documents */
.docview { position: absolute; inset: 0; overflow: auto; background: var(--p1); animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; } }
.docpage { min-height: 100%; }
.cfwrap { min-height: 100%; background: linear-gradient(to right, var(--p0) 0 56px, var(--line) 56px 57px, transparent 57px); padding: 22px 0 80px; }
.cf { position: relative; margin-left: 84px; max-width: 760px; padding-right: 40px; counter-reset: ln; }
.cf > * { position: relative; }
.cf > *::before { counter-increment: ln; content: counter(ln); position: absolute; left: -84px; width: 44px; text-align: right; top: .25em; font: 11px/1.4 var(--mono); color: var(--faint); transition: color .12s; }
.cf > *:hover::before { color: var(--text); }
.cf > *::after { content: ""; position: absolute; left: -28px; top: -3px; bottom: -3px; width: 2px; border-radius: 2px; background: transparent; transition: background .12s; }
.cf > *:hover::after { background: var(--blue-line); }
.cf h1 { margin: 6px 0 4px; font-size: 34px; line-height: 1.08; letter-spacing: -.035em; color: #fff; font-weight: 800; }
.cf h2 { margin: 28px 0 6px; font-size: 18px; letter-spacing: -.02em; color: #fff; }
.cf p { margin: 0 0 12px; font-size: 15px; line-height: 1.68; color: #c9cad2; max-width: 66ch; }
.cf .cf-comment { font: 12px var(--mono); color: #7f8796; margin-bottom: 14px; }
.cf .cf-tag { font-size: 17px; color: #e3e4ea; line-height: 1.5; }
.cf .cf-meta { display: flex; gap: 10px; flex-wrap: wrap; font: 12px var(--mono); color: var(--mut); }
.cf .cf-meta span { color: var(--dim); }
.cf .cf-meta span::before { content: "·"; margin-right: 10px; }
.cf .cf-note { font-size: 13px; color: var(--dim); }
.cf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 18px 0 22px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--p2); }
.cf-stats div { padding: 14px 16px; border-left: 1px solid var(--line); }
.cf-stats div:first-child { border-left: 0; }
.cf-stats b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; color: #fff; }
.cf-stats span { display: block; margin-top: 6px; font: 500 10.5px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mut); }
.cf-award { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 8px; margin: 18px 0; background: linear-gradient(90deg, rgba(245,184,61,.12), rgba(245,184,61,.02)); border: 1px solid rgba(245,184,61,.35); }
.cf-trophy { width: 42px; height: 42px; flex: none; border-radius: 9px; display: grid; place-items: center; background: rgba(245,184,61,.15); color: var(--amber); }
.cf-trophy svg { width: 24px; height: 24px; }
.cf-award b { display: block; color: #fff; font-size: 15px; }
.cf-award span { display: block; color: #d8c9a6; font-size: 13px; }
.cf-src { margin-left: auto; display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: #f6d38a; text-decoration: none; white-space: nowrap; }
.cf-src:hover { text-decoration: underline; text-underline-offset: 3px; }
.cf-logos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0; }
.cf-logos figure { margin: 0; height: 74px; display: grid; place-items: center; align-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--p2); transition: border-color .15s, background .15s; }
.cf-logos figure:hover { border-color: var(--blue-line); background: var(--p3); }
.cf-logos img { max-width: 70%; max-height: 28px; }
.cf-logos figcaption { font: 10px var(--mono); color: var(--dim); }
.cf-collabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 16px; }
.cf-collabs figure, .cf-shot { margin: 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--p2); }
.cf-collabs img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform .4s var(--ease); }
.cf-collabs figure:hover img { transform: scale(1.04); }
.cf-collabs figcaption { padding: 6px 9px; font-size: 12px; color: var(--text); border-top: 1px solid var(--line); }
.cf-collabs figcaption span { font: 10.5px var(--mono); color: var(--dim); }
.cf-shot { margin: 18px 0; max-width: 560px; }
.cf-shot img { width: 100%; height: auto; }
.cf-facts { margin: 18px 0; display: grid; border-top: 1px solid var(--line-soft); }
.cf-facts div { display: grid; grid-template-columns: 220px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.cf-facts dt { color: var(--mut); }
.cf-facts dd { margin: 0; color: var(--text); }
.cf-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 22px 0 6px; }
.cf-btn { height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 6px; background: var(--blue); border: 1px solid var(--blue-hi); color: #fff; font-weight: 600; text-decoration: none; transition: background .15s, box-shadow .15s; }
.cf-btn:hover { background: var(--blue-hi); box-shadow: 0 8px 20px -10px rgba(59,130,246,.9); }
.cf-btn svg { transition: transform .2s var(--ease); }
.cf-btn:hover svg { transform: translateX(3px); }
.cf-link { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-hi); color: var(--text); text-decoration: none; font-weight: 500; transition: background .15s, border-color .15s; }
.cf-link:hover { background: var(--p3); border-color: #565863; }
.cf-list { display: grid; gap: 1px; margin: 18px 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--line); }
.cf-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 18px; padding: 13px 16px; background: var(--p1); text-decoration: none; transition: background .15s; }
.cf-row:hover { background: var(--p2); }
.cf-row b { color: #fff; font-size: 14.5px; }
.cf-row span { grid-column: 1; color: var(--mut); font-size: 13px; line-height: 1.5; }
.cf-row em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font: 600 18px var(--ui); color: #fff; text-align: right; white-space: nowrap; }
.cf-row em small { display: block; font: 10px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.cf-code { margin: 0 0 18px; font: 12.5px/1.8 var(--mono); color: var(--text); white-space: pre; }
.cf-code .k { color: #c792ea; } .cf-code .s { color: #a5e075; } .cf-code .n { color: #f5b83d; } .cf-code .c { color: #8f919c; }
.cf-pet { width: 220px; height: 220px; border-radius: 12px; background: radial-gradient(closest-side, rgba(91,152,248,.18), transparent), var(--p2); border: 1px solid var(--line); display: grid; place-items: center; margin: 4px 0 16px; }
.cf-pet .sprite { width: 180px; height: 180px; background-size: 500% 500%; background-repeat: no-repeat; animation: sheetx 1.4s steps(5) infinite, sheety 7s steps(5) infinite; }
@keyframes sheetx { from { background-position-x: 0%; } to { background-position-x: 125%; } }
@keyframes sheety { from { background-position-y: 0%; } to { background-position-y: 125%; } }

/* asset browser */
.ab { min-height: 100%; display: flex; flex-direction: column; }
.ab-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(30,31,36,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.ab-search { width: 260px; height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--p0); color: var(--dim); transition: border-color .15s, box-shadow .15s; }
.ab-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.ab-search input { flex: 1; border: 0; background: none; color: var(--text); font-size: 12.5px; min-width: 0; }
.ab-chips { display: flex; gap: 4px; }
.ab-chips button, .m-chips button { height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--line); color: var(--mut); font-size: 12px; transition: all .15s; }
.ab-chips button span, .m-chips button span { font-family: var(--mono); font-size: 10.5px; color: var(--dim); margin-left: 3px; }
.ab-chips button:hover { color: var(--text); border-color: var(--line-hi); }
.ab-chips button[aria-pressed="true"], .m-chips button[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue-line); color: #dbe7fe; }
.ab-count { margin-left: auto; font: 11px var(--mono); color: var(--dim); }
.ab-body { padding: 4px 16px 40px; }
.ab section h2 { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 10px; font-size: 15px; color: #fff; }
.ab section h2 span { font: 11px var(--mono); color: var(--dim); font-weight: 400; }
.ab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.ab-tile { position: relative; aspect-ratio: 1; border-radius: 11px; overflow: hidden; border: 1px solid var(--line); background: var(--p3); text-decoration: none; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.ab-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.ab-tile:hover, .ab-tile:focus-visible { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 14px 26px -12px rgba(0,0,0,.9); outline: none; z-index: 1; }
.ab-tile:hover img { transform: scale(1.06); }
.ab-ph { position: absolute; inset: 0; display: grid; place-items: center; font: 600 13px var(--mono); color: var(--dim); }
.ab-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 7px; background: linear-gradient(transparent, rgba(8,9,12,.92)); opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .22s var(--ease); }
.ab-tile:hover .ab-cap, .ab-tile:focus-visible .ab-cap { opacity: 1; transform: none; }
.ab-cap b { display: block; font-size: 11.5px; line-height: 1.2; color: #fff; }
.ab-cap small { display: block; font: 9.5px var(--mono); color: #b9bac4; margin-top: 2px; }

/* properties */
.pbody { flex: 1; overflow: auto; min-height: 0; }
.prophead { padding: 14px 14px 12px; border-bottom: 1px solid var(--line); }
.prophead .cls { font: 11px var(--mono); color: var(--mut); display: flex; align-items: center; gap: 6px; }
.prophead h2 { margin: 4px 0 4px; font-size: 18px; font-weight: 700; letter-spacing: -.015em; color: #fff; overflow-wrap: anywhere; }
.prophead p { margin: 0; color: var(--mut); font-size: 12.5px; line-height: 1.5; }
.group { border-bottom: 1px solid var(--line); }
.grouphead { width: 100%; height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--p2); font-size: 11.5px; font-weight: 600; color: var(--text); text-align: left; border-bottom: 1px solid var(--line-soft); transition: background .12s; }
.grouphead:hover { background: var(--p3); }
.grouphead svg { width: 10px; height: 10px; color: var(--dim); stroke-width: 2; transition: transform .18s var(--ease); }
.group.closed .grouphead svg { transform: rotate(-90deg); }
.group.closed .groupbody { display: none; }
.grouphead .n { margin-left: auto; font: 400 10.5px var(--mono); color: var(--dim); }
.prow { display: grid; grid-template-columns: 92px minmax(0,1fr); min-height: 28px; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.prow:last-child { border-bottom: 0; }
.prow .pk { padding: 0 10px; display: flex; align-items: center; color: var(--mut); border-right: 1px solid var(--line-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .pv { padding: 2px 6px; display: flex; align-items: center; min-width: 0; color: var(--text); }
.prow.ro .pv { color: var(--mut); padding-left: 10px; }
.ptext, .axis input { width: 100%; height: 22px; border: 1px solid transparent; background: transparent; border-radius: 3px; padding: 0 6px; font-size: 12px; color: var(--text); transition: border-color .12s, background .12s; }
.ptext:hover, .axis input:hover { border-color: var(--line); background: var(--p0); }
.ptext:focus, .axis input:focus { border-color: var(--blue); background: var(--p0); box-shadow: 0 0 0 2px var(--blue-soft); }
.vec .pv { gap: 3px; padding: 2px 4px; }
.axis { flex: 1; min-width: 0; display: flex; align-items: center; border-radius: 3px; }
.axis .scrub { width: 15px; height: 22px; flex: none; display: grid; place-items: center; font: 600 9.5px var(--mono); border-radius: 3px 0 0 3px; cursor: ew-resize; user-select: none; transition: background .12s; }
.axis.a0 .scrub { color: #fca5a5; } .axis.a1 .scrub { color: #86efac; } .axis.a2 .scrub { color: #93c5fd; }
.axis .scrub:hover { background: var(--p3); }
.axis input { padding: 0 3px; font-family: var(--mono); font-size: 11.5px; text-align: left; }
body.scrubbing, body.scrubbing * { cursor: ew-resize !important; user-select: none; }
.shake { animation: shake .35s; border-color: var(--red) !important; }
@keyframes shake { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }
.bool { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font: 11.5px var(--mono); color: var(--mut); padding-left: 4px; }
.bool input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bool i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line-hi); background: var(--p0); display: grid; place-items: center; transition: background .12s, border-color .12s; }
.bool input:checked + i { background: var(--blue); border-color: var(--blue-hi); }
.bool input:checked + i::after { content: ""; width: 6px; height: 3px; border: 1.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.bool input:focus-visible + i { outline: 2px solid var(--blue); outline-offset: 2px; }
.pstats .stat { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line-soft); }
.pstats .stat:last-child { border-bottom: 0; }
.pstats .stat span { color: var(--mut); font-size: 12px; }
.pstats .stat b { font-size: 24px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; color: #fff; text-align: right; }
.awardrow { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: linear-gradient(90deg, rgba(245,184,61,.11), transparent 85%); }
.trophy { width: 38px; height: 38px; flex: none; border-radius: 8px; display: grid; place-items: center; background: rgba(245,184,61,.14); border: 1px solid rgba(245,184,61,.45); color: var(--amber); }
.trophy svg { width: 21px; height: 21px; }
.awardrow b { display: block; font-size: 13px; font-weight: 700; color: #fff; line-height: 1.25; }
.awardrow span { display: block; font-size: 12px; color: var(--mut); margin-top: 2px; }
.pnote { margin: 0; padding: 0 14px 12px; font-size: 12px; color: var(--mut); }
.plinks { padding: 6px; display: grid; gap: 2px; }
.plink { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border-radius: 4px; font-size: 12px; color: #cfe0fd; text-decoration: none; text-align: left; transition: background .12s; }
.plink:hover { background: var(--blue-soft); }
.plink svg { color: var(--blue-hi); }
.pcta { padding: 10px; }
.pcta .btn { width: 100%; }

/* output */
.output .filters { display: flex; gap: 1px; margin-left: 8px; }
.output .filters button { padding: 2px 8px; border-radius: 4px; font-weight: 500; color: var(--mut); font-size: 11.5px; border: 1px solid transparent; transition: color .12s, background .12s; }
.output .filters button:hover { color: var(--text); }
.output .filters button[aria-pressed="true"] { background: var(--p1); border-color: var(--line); color: var(--text); }
.output .filters .cnt { font: 10px var(--mono); color: var(--dim); }
.log { flex: 1; min-height: 0; overflow: auto; font: 12px/1.4 var(--mono); padding: 3px 0; }
.log:focus-visible { outline-offset: -2px; }
.ln { display: grid; grid-template-columns: 84px 40px 18px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 2px 12px; border-left: 2px solid transparent; animation: lnin .3s var(--ease); }
@keyframes lnin { from { opacity: 0; transform: translateY(4px); } }
.ln:hover { background: var(--p2); }
.ln time { color: var(--faint); font-size: 11px; }
.ln .lv { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.ln .ic { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; display: grid; place-items: center; color: var(--dim); }
.ln .ic svg { width: 12px; height: 12px; }
.ln .msg { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; text-align: left; }
.ln a.msg:hover, .ln .linkish:hover { color: var(--blue-hi); text-decoration: underline; text-underline-offset: 3px; }
.ln .src { color: var(--dim); font-size: 11px; white-space: nowrap; }
.ln .dim { color: var(--dim); }
.ln.t-ship .lv { color: var(--green); } .ln.t-ship .ic { color: var(--green); }
.ln.t-post .lv, .ln.t-post .ic { color: var(--blue-hi); }
.ln.t-post { border-left-color: var(--blue); }
.ln.t-post .msg { color: #fff; font-family: var(--ui); font-weight: 600; font-size: 12.5px; }
.ln.t-action .lv { color: var(--violet); }
.ln.t-cmd .msg { color: #cfe0fd; }
.ln.t-cmd .lv { color: var(--blue-hi); }
.ln.t-error { background: rgba(248,113,113,.06); border-left-color: var(--red); }
.ln.t-error .lv, .ln.t-error .msg, .ln.t-error .ic { color: #fca5a5; }
.ln.t-warn .lv, .ln.t-warn .msg, .ln.t-warn .ic { color: #fcd34d; }
.ln.t-play .lv, .ln.t-play .msg { color: #86efac; }
.log[data-filter="ship"] .ln:not([data-t="ship"]), .log[data-filter="post"] .ln:not([data-t="post"]), .log[data-filter="action"] .ln:not([data-t="action"]), .log[data-filter="error"] .ln:not([data-t="error"]) { display: none; }
.cmdbar { flex: none; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 12px; border-top: 1px solid var(--line); background: var(--p0); }
.cmdbar .pr { color: var(--blue-hi); display: grid; }
.cmdwrap { position: relative; flex: 1; height: 100%; }
.cmdwrap input, .cmdwrap .ghost { position: absolute; inset: 0; width: 100%; border: 0; background: none; font: 12px var(--mono); padding: 0; line-height: 30px; white-space: pre; }
.cmdwrap .ghost { color: var(--faint); pointer-events: none; overflow: hidden; }
.cmdwrap input { color: var(--text); caret-color: var(--blue-hi); }
.cmdwrap input::placeholder { color: var(--faint); }
.cmdbar:focus-within { box-shadow: inset 0 1px 0 var(--blue); }
.cmdbar kbd { opacity: .7; }

/* status bar */
.statusbar { display: flex; align-items: center; gap: 16px; padding: 0 12px; border-top: 1px solid var(--line); background: var(--p0); font-size: 11.5px; color: var(--mut); white-space: nowrap; overflow: hidden; }
.st-state { display: inline-flex; align-items: center; gap: 6px; }
.st-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue-hi); }
body.playing .st-state i { background: var(--green); box-shadow: 0 0 0 3px rgba(52,211,153,.2); }
.statusbar b { color: var(--text); font-weight: 500; }
.st-path { color: var(--dim); font-family: var(--mono); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.st-hist { color: var(--dim); overflow: hidden; text-overflow: ellipsis; }
.statusbar .end { margin-left: auto; display: flex; gap: 16px; }

/* menus */
.menu { position: fixed; z-index: 50; min-width: 168px; padding: 4px; background: var(--p2); border: 1px solid var(--line-hi); border-radius: 7px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.8); animation: menuin .14s var(--ease); }
@keyframes menuin { from { opacity: 0; transform: translateY(-4px); } }
.menu button { width: 100%; height: 30px; display: flex; align-items: center; gap: 9px; padding: 0 9px; border-radius: 4px; font-size: 12.5px; color: var(--text); text-align: left; }
.menu button:hover, .menu button:focus-visible { background: var(--blue-soft); outline: none; }
.menu .ck { margin-left: auto; color: var(--blue-hi); opacity: 0; }
.menu [aria-checked="true"] .ck { opacity: 1; }

/* ================= contact dialog ================= */
.dlg { width: min(580px, 94vw); max-height: min(720px, 92vh); padding: 0; border: 1px solid var(--line-hi); border-radius: 10px; background: var(--p1); color: var(--text); box-shadow: 0 40px 90px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.4); overflow: hidden; display: flex; flex-direction: column; opacity: 0; transform: translateY(8px) scale(.985); transition: opacity .18s ease, transform .22s var(--ease); }
.dlg[open] { display: flex; }
.dlg.in { opacity: 1; transform: none; }
.dlg[style*="left"] { position: fixed; }
.dlg::backdrop { background: rgba(6,7,10,.55); backdrop-filter: blur(3px); }
.dlg-bar { height: 36px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 6px 0 12px; background: var(--p2); border-bottom: 1px solid var(--line); cursor: move; user-select: none; }
.dlg-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12.5px; }
.dlg-sub { font: 400 11px var(--mono); color: var(--dim); margin-left: 4px; }
.dlg-live { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--mut); margin-right: 4px; }
.dlg-body { overflow: auto; }
.cform { padding: 20px 22px 18px; display: grid; gap: 13px; }
.cform h2, .csuccess h2 { margin: 0; font-size: 24px; letter-spacing: -.025em; color: #fff; }
.cform .lead { margin: -4px 0 4px; color: var(--mut); font-size: 13.5px; line-height: 1.55; }
.cfields { display: grid; gap: 13px; }
.field { display: grid; gap: 5px; }
.field label { font-size: 11.5px; font-weight: 600; color: var(--mut); }
.field input, .field select, .field textarea { font-size: 13.5px; color: var(--text); background: var(--p0); border: 1px solid var(--line); border-radius: 5px; padding: 7px 10px; height: 36px; transition: border-color .15s, box-shadow .15s; }
.field textarea { height: auto; min-height: 110px; resize: vertical; line-height: 1.5; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238b8c96' stroke-width='1.6'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 14px; padding-right: 30px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field .bad { border-color: var(--red); box-shadow: 0 0 0 3px rgba(248,113,113,.15); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.deflect { display: flex; gap: 12px; padding: 14px; border-radius: 7px; border: 1px solid rgba(245,184,61,.45); background: rgba(245,184,61,.08); }
.deflect svg { width: 18px; height: 18px; color: var(--amber); margin-top: 2px; }
.deflect p { margin: 0; font-size: 13.5px; line-height: 1.55; color: #eadbb8; }
.deflect a { color: #fff; font-weight: 600; text-underline-offset: 3px; }
.cerr { margin: 0; padding: 8px 10px; border-radius: 5px; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.4); color: #fecaca; font-size: 12.5px; }
.cfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
.cnote { font-size: 12px; color: var(--dim); }
.csuccess { padding: 34px 22px 26px; display: grid; justify-items: start; gap: 8px; }
.csuccess .ok { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(52,211,153,.14); color: var(--green); border: 1px solid rgba(52,211,153,.45); }
.csuccess .ok svg { width: 22px; height: 22px; stroke-width: 2; }
.csuccess p { margin: 0 0 10px; color: var(--mut); }

/* ================= mobile ================= */
.mob { min-height: 100vh; background: var(--bg); padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
.m-hero { position: relative; height: 56vh; height: 56svh; min-height: 400px; max-height: 620px; overflow: hidden; background: #0f1014; }
.m-hero .vp-canvas { position: absolute; inset: 0; }
.m-scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, rgba(10,11,16,.82) 0%, rgba(10,11,16,.45) 26%, rgba(10,11,16,0) 46%, rgba(10,11,16,0) 68%, rgba(10,11,16,.78) 100%); }
.m-top { position: absolute; z-index: 2; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 9px; padding: calc(12px + env(safe-area-inset-top)) 14px 0 16px; }
.m-brand { font-weight: 700; font-size: 14px; letter-spacing: -.01em; }
.m-chip { margin-left: auto; height: 32px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border-radius: 16px; background: rgba(24,25,29,.72); border: 1px solid rgba(255,255,255,.12); font: 500 12px var(--mono); color: var(--text); backdrop-filter: blur(10px); transition: background .15s, transform .15s var(--ease); }
.m-chip:active { transform: scale(.96); }
.m-copy { position: absolute; z-index: 2; left: 16px; right: 16px; top: calc(56px + env(safe-area-inset-top)); pointer-events: none; transition: opacity .4s; }
.m-copy h1 { margin: 0; font-size: 31px; line-height: 1.02; font-weight: 800; letter-spacing: -.045em; color: #fff; max-width: 11em; text-wrap: balance; text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.m-copy h1 em { font-style: normal; background: rgba(59,130,246,.45); box-shadow: 0 0 0 3px rgba(59,130,246,.45); border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.mob.m-playing .m-copy { opacity: 0; }
.m-trophies, .m-play { transition: opacity .3s ease, transform .3s var(--ease); }
body.sheet-open .m-copy, body.sheet-open .m-trophies, body.sheet-open .m-play { opacity: 0; pointer-events: none; }
body.sheet-open .m-trophies { transform: translateY(10px); }
.m-trophies { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 10px; display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 12px; background: rgba(16,17,22,.74); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(12px); overflow: hidden; }
.m-trophies div { padding: 9px 8px 8px; border-left: 1px solid rgba(255,255,255,.08); min-width: 0; }
.m-trophies div:first-child { border-left: 0; }
.m-trophies b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: #fff; }
.m-trophies div:last-child b { color: #f6d38a; }
.m-trophies span { display: block; margin-top: 4px; font: 500 8.5px/1.25 var(--mono); letter-spacing: .03em; text-transform: uppercase; color: var(--mut); }
.m-play { position: absolute; z-index: 3; right: 14px; bottom: 84px; height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px 0 13px; border-radius: 20px; background: #1d9152; border: 1px solid #2cc26e; color: #fff; font-weight: 700; font-size: 13.5px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.8); transition: transform .15s var(--ease), background .15s; }
.m-play:active { transform: scale(.95); }
.m-play.stop { background: #b4383a; border-color: #df5c5e; }
.m-playhud { position: absolute; z-index: 2; left: 16px; top: calc(60px + env(safe-area-inset-top)); display: flex; align-items: baseline; gap: 8px; }
.m-playhud b { font-size: 44px; font-weight: 800; letter-spacing: -.05em; color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.m-playhud span { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: #d6d7de; }
.m-feed { padding: 4px 0 24px; }
.m-lead { margin: 16px 16px 4px; font-size: 15px; line-height: 1.6; color: #cfd0d8; }
.m-sec { margin-top: 28px; }
.m-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 16px; margin-bottom: 12px; }
.m-h h2 { margin: 0; font-size: 21px; letter-spacing: -.03em; color: #fff; }
.m-count { font: 11px var(--mono); color: var(--dim); }
.m-plaque { margin: 18px 16px 0; display: flex; gap: 13px; align-items: center; padding: 14px; border-radius: 12px; background: linear-gradient(120deg, rgba(245,184,61,.16), rgba(245,184,61,.03) 70%), var(--p1); border: 1px solid rgba(245,184,61,.4); }
.m-trophy { width: 46px; height: 46px; flex: none; border-radius: 11px; display: grid; place-items: center; background: rgba(245,184,61,.16); color: var(--amber); }
.m-trophy svg { width: 26px; height: 26px; }
.m-plaque b { display: block; font-size: 15px; color: #fff; line-height: 1.25; }
.m-plaque span { display: block; font-size: 12.5px; color: #e2c486; margin-top: 1px; }
.m-plaque small { display: block; font-size: 12px; color: var(--mut); margin-top: 5px; line-height: 1.45; }
.m-mini { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; border: 1px solid rgba(245,184,61,.4); color: #f6d38a; align-self: flex-start; }
.m-cards { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px 6px; scroll-padding: 0 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
.m-cards::-webkit-scrollbar { display: none; }
.m-card { flex: 0 0 80%; scroll-snap-align: start; text-align: left; border-radius: 14px; overflow: hidden; background: var(--p1); border: 1px solid var(--line); transition: transform .15s var(--ease), border-color .15s; display: flex; flex-direction: column; }
.m-card:active { transform: scale(.985); border-color: var(--blue-line); }
.mc-vis { height: 150px; position: relative; overflow: hidden; background: var(--p2); border-bottom: 1px solid var(--line); }
.mc-vis > img { width: 100%; height: 100%; object-fit: cover; }
.mc-icon { height: 100%; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: radial-gradient(70% 90% at 20% 50%, rgba(244,114,182,.18), transparent), var(--p2); }
.mc-icon img { width: 104px; height: 104px; border-radius: 18px; object-fit: cover; box-shadow: 0 12px 26px -12px rgba(0,0,0,.9); }
.mc-icon span { font: 11px var(--mono); color: var(--mut); }
.mc-rw { height: 100%; padding: 16px; display: flex; flex-direction: column; background: linear-gradient(rgba(150,170,220,.06) 1px, transparent 1px) 0 0/18px 18px, linear-gradient(90deg, rgba(150,170,220,.06) 1px, transparent 1px) 0 0/18px 18px, #0b0e13; }
.mc-rw .lv { display: inline-flex; align-items: center; gap: 6px; font: 600 10.5px var(--mono); letter-spacing: .08em; color: var(--green); }
.mc-rw .lv i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6); } 100% { box-shadow: 0 0 0 9px rgba(52,211,153,0); } }
.mc-rw b { font-size: 38px; font-weight: 800; letter-spacing: -.04em; color: #fff; line-height: 1; margin-top: 10px; }
.mc-rw small { font: 11px var(--mono); color: var(--mut); }
.mc-rw svg { margin-top: auto; width: 100%; height: 30px; }
.mc-cube { height: 100%; display: grid; place-items: center; background: radial-gradient(50% 70% at 50% 60%, rgba(245,184,61,.18), transparent), var(--p2); perspective: 500px; }
.mc-cube i { grid-area: 1 / 1; width: 54px; height: 54px; border: 2px solid var(--amber); background: rgba(245,184,61,.12); border-radius: 4px; transform: rotateX(-20deg) rotateY(35deg); }
.mc-cube i:nth-child(2) { width: 40px; height: 40px; transform: translate(10px, -46px) rotateX(-20deg) rotateY(55deg); }
.mc-cube i:nth-child(3) { width: 28px; height: 28px; transform: translate(-6px, -80px) rotateX(-20deg) rotateY(75deg); }
.mc-body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mc-role { font: 10.5px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.mc-body > b { font-size: 19px; color: #fff; letter-spacing: -.02em; }
.mc-body p { margin: 0; font-size: 13.5px; color: var(--mut); line-height: 1.45; }
.mc-stats { display: flex; gap: 16px; margin-top: 10px; }
.mc-stats span { font: 10px/1.3 var(--mono); color: var(--dim); text-transform: uppercase; }
.mc-stats b { display: block; font: 800 19px var(--ui); letter-spacing: -.03em; color: #fff; text-transform: none; }
.mc-go { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--blue-hi); }
.m-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.m-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--p4); transition: width .25s var(--ease), background .25s; }
.m-dots i.on { width: 18px; background: var(--blue-hi); }
.m-list { margin: 0 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); display: grid; gap: 1px; }
.m-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 58px; background: var(--p1); text-align: left; text-decoration: none; transition: background .12s; }
.m-row:active { background: var(--p2); }
.m-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.m-rt { flex: 1; min-width: 0; }
.m-rt b { display: block; font-size: 14.5px; color: #fff; line-height: 1.3; }
.m-rt span { display: block; font-size: 12.5px; color: var(--mut); line-height: 1.45; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-metric { text-align: right; font: 800 17px var(--ui); color: #fff; letter-spacing: -.02em; white-space: nowrap; }
.m-metric small { display: block; font: 9.5px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .04em; }
.m-row > svg { color: var(--dim); }
.m-chips { display: flex; gap: 6px; padding: 0 16px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.m-chips button { height: 32px; padding: 0 13px; border-radius: 16px; white-space: nowrap; }
.m-icons { display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, 76px); grid-auto-columns: 76px; gap: 8px; overflow-x: auto; padding: 0 16px 8px; scroll-padding: 0 16px; scrollbar-width: none; }
.m-icons::-webkit-scrollbar { display: none; }
.m-icons > * { position: relative; border-radius: 14px; overflow: hidden; background: var(--p3); border: 1px solid var(--line); }
.m-icons img { width: 100%; height: 100%; object-fit: cover; }
.m-icons .ph { position: absolute; inset: 0; display: grid; place-items: center; font: 600 11px var(--mono); color: var(--dim); }
.m-icons .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 5px 4px; font-size: 9px; line-height: 1.15; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.8)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-logos { display: flex; gap: 8px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.m-logos span { flex: 0 0 auto; width: 104px; height: 60px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--p1); }
.m-logos img { max-width: 66%; max-height: 26px; }
.m-collabs { display: flex; gap: 10px; padding: 12px 16px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.m-collabs figure { margin: 0; flex: 0 0 72%; scroll-snap-align: start; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--p1); }
.m-collabs img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.m-collabs figcaption { padding: 8px 11px; font-size: 13px; }
.m-collabs figcaption span { font: 11px var(--mono); color: var(--dim); }
.m-about { padding: 0 16px; }
.m-about h2 { margin: 0 0 10px; font-size: 22px; line-height: 1.15; letter-spacing: -.03em; color: #fff; }
.m-about p { margin: 0 0 10px; font-size: 15px; line-height: 1.6; color: #c9cad2; }
.m-cta { width: 100%; height: 46px; margin-top: 8px; font-size: 15px; border-radius: 10px; }
.m-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; font-size: 13.5px; }
.m-links a, .m-links button { color: var(--mut); text-decoration: none; padding: 6px 0; }
.m-foot { margin-top: 18px !important; font: 11px var(--mono) !important; color: var(--dim) !important; }
.m-nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(20,21,25,.9); border-top: 1px solid var(--line); backdrop-filter: blur(14px); }
.m-nav button { height: 52px; display: grid; justify-items: center; align-content: center; gap: 4px; border-radius: 10px; color: var(--dim); font-size: 10.5px; font-weight: 500; transition: color .15s, background .15s; }
.m-nav button svg { width: 20px; height: 20px; }
.m-nav button[aria-current] { color: #fff; }
.m-nav button[aria-current] svg { color: var(--blue-hi); }
.m-nav button:active { background: var(--p2); }
.m-sheet { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: 50vh; height: 50svh; background: var(--p1); border-top: 1px solid var(--line-hi); border-radius: 18px 18px 0 0; box-shadow: 0 -24px 60px -20px rgba(0,0,0,.8); transform: translateY(105%); transition: transform .32s var(--ease), height .32s var(--ease); display: flex; flex-direction: column; }
.m-sheet.open { transform: translateY(0); }
.m-sheet.full { height: 92vh; height: 92svh; }
.m-sheet.dragging { transition: none; }
.m-grab { flex: none; height: 26px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.m-grab i { width: 40px; height: 5px; border-radius: 3px; background: var(--p4); }
.m-sheet-x { position: absolute; right: 10px; top: 8px; width: 34px; height: 34px; background: var(--p2); border-radius: 17px; }
.m-sheet-body { flex: 1; overflow: auto; padding: 0 18px calc(24px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.cf.compact { margin: 0; padding: 0; max-width: none; }
.cf.compact > *::before, .cf.compact > *::after { display: none; }
.cf.compact h1 { font-size: 27px; padding-right: 40px; }
.cf.compact .cf-comment { display: none; }
.cf.compact p { font-size: 15px; }
.cf.compact .cf-tag { font-size: 16px; }
.cf.compact .cf-stats { grid-template-columns: repeat(2, 1fr); }
.cf.compact .cf-stats div { border-left: 0; border-top: 1px solid var(--line); }
.cf.compact .cf-stats div:nth-child(-n+2) { border-top: 0; }
.cf.compact .cf-stats div:nth-child(even) { border-left: 1px solid var(--line); }
.cf.compact .cf-stats b { font-size: 24px; }
.cf.compact .cf-logos { grid-template-columns: repeat(3, 1fr); }
.cf.compact .cf-collabs { grid-template-columns: 1fr 1fr; }
.cf.compact .cf-facts div { grid-template-columns: 1fr 1fr; }
.cf.compact .cf-award { flex-wrap: wrap; }
.cf.compact .cf-src { margin-left: 56px; }
.cf.compact .cf-links { flex-direction: column; align-items: stretch; }
.cf.compact .cf-btn, .cf.compact .cf-link { height: 44px; justify-content: center; }
.cf.compact .cf-row { grid-template-columns: 1fr; }
.cf.compact .cf-row em { grid-column: 1; grid-row: auto; text-align: left; }

body[data-mode="mobile"] .dlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; transform: translateY(40px); }
body[data-mode="mobile"] .dlg.in { transform: none; }
body[data-mode="mobile"] .dlg-bar { height: calc(52px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); cursor: default; }
body[data-mode="mobile"] .dlg-sub, body[data-mode="mobile"] .dlg-live { display: none; }
body[data-mode="mobile"] .dlg-bar .icon-btn { margin-left: auto; width: 40px; height: 40px; }
body[data-mode="mobile"] .two { grid-template-columns: 1fr; }
body[data-mode="mobile"] .field input, body[data-mode="mobile"] .field select { height: 46px; font-size: 16px; }
body[data-mode="mobile"] .field textarea { font-size: 16px; }
body[data-mode="mobile"] .cfoot { flex-direction: column-reverse; align-items: stretch; }
body[data-mode="mobile"] .cfoot .btn { height: 48px; font-size: 15px; }

/* ================= page view ================= */
#pageview { background: var(--bg); min-height: 100vh; }
.pv { max-width: 760px; margin: 0 auto; padding: 0 22px 60px; }
.pv-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 0; background: rgba(18,19,23,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.pv-sp { flex: 1; }
.pv-note { display: inline-flex; gap: 6px; align-items: center; color: var(--mut); font-size: 12.5px; }
.pv section { padding: 30px 0 6px; border-bottom: 1px solid var(--line-soft); }
.pv h1 { margin: 10px 0 0; font-size: clamp(34px, 6vw, 52px); line-height: 1.02; letter-spacing: -.045em; color: #fff; }
.pv h1 em { font-style: normal; color: var(--blue-hi); }
.pv h2 { margin: 0 0 14px; font-size: 24px; letter-spacing: -.03em; color: #fff; }
.pv h3 { margin: 18px 0 4px; font-size: 18px; color: #fff; }
.pv p, .pv li { font-size: 15.5px; line-height: 1.68; color: #cfd0d8; }
.pv a { color: #cfe0fd; text-underline-offset: 3px; }
.pv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 22px 0; }
.pv-stats div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--p1); }
.pv-stats dt { font: 11px var(--mono); color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.pv-stats dd { margin: 4px 0 2px; font-size: 28px; font-weight: 800; letter-spacing: -.035em; color: #fff; }
.pv-stats small { font-size: 12px; color: var(--dim); }
.pv-award { display: flex; gap: 10px; align-items: center; }
.pv-award svg { width: 20px; height: 20px; color: var(--amber); }
.pv-role { margin: 0; font: 12.5px var(--mono) !important; color: var(--mut) !important; }
.pv-nums { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.pv-nums b { color: #fff; }
.pv-list { padding-left: 18px; }
.pv-list span, .pv-upd span { color: var(--dim); font-size: 13px; }
.pv details { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: var(--p1); }
.pv summary { cursor: pointer; padding: 11px 14px; font-weight: 600; color: #fff; }
.pv summary span { color: var(--dim); font-weight: 400; font-size: 13px; margin-left: 6px; }
.pv-upd { columns: 2; padding: 0 14px 12px 34px; margin: 0; }
.pv-upd li { font-size: 13.5px; line-height: 1.6; break-inside: avoid; }
.pv-imgs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pv-imgs figure { margin: 0; }
.pv-imgs img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.pv-imgs figcaption { font-size: 12.5px; color: var(--dim); margin-top: 4px; }
.pv-foot { padding: 24px 0; font: 12px var(--mono); color: var(--dim); }

@media (max-width: 600px) { .pv-upd { columns: 1; } .pv-imgs { grid-template-columns: 1fr; } }

/* desktop at narrow widths still usable (between 900 and 1200) */
@media (max-width: 1200px) {
  :root { --exw: 216px; --prw: 272px; }
  .tool span:not(.lname) { display: none; }
  .tool.cta span, .tool.play span { display: inline; }
  .docname { display: none; }
  .hero { max-width: min(460px, 66%); }
}

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