/* The start page of genmc.app (from info-site draft 16): a milky glass sheet on the left carries every sentence,
   the live 3D behind it carries every picture. Ink on white, one accent from the blue-grey of Friedrich's sky. */
:root {
  --paper: #ffffff;
  --paper-2: #f5f6f8;
  --stage: #eef1f4;
  --ink: #0e1622;
  --ink-2: #434d5a;
  --ink-3: #7a8491;
  --sky: #5d7795;
  --sky-pale: #c7d2e0;
  --sky-wash: #eef2f7;
  --agent: #2f6bff;
  --line: rgb(14 22 34 / 0.1);
  --gutter: clamp(16px, 5vw, 72px);
  --sheet-w: clamp(400px, 38vw, 600px);
  --sheet-h: max(250px, 40lvh);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
html { background: var(--paper); color: var(--ink); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { overflow-x: clip; }
body { font-family: 'Geist', system-ui, sans-serif; font-size: 18px; line-height: 1.55; background: var(--paper); }
::selection { background: var(--sky-pale); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; text-decoration: none; font-size: 15px; }
.skip:focus { top: 12px; }

h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.035em; text-wrap: balance; color: var(--ink); }
h2 { font-size: clamp(34px, 3.5vw, 54px); line-height: 1.03; }
h3 { font-size: 19px; letter-spacing: -0.012em; font-weight: 560; }
code, kbd { font-family: 'Geist Mono', ui-monospace, monospace; }
code { font-size: 0.84em; background: var(--sky-wash); color: var(--ink); padding: 1px 5px; border-radius: 5px; }
kbd { font-size: 12px; font-weight: 500; display: inline-block; min-width: 22px; padding: 1px 6px; margin: 0 2px; border-radius: 6px; background: var(--paper); color: var(--ink); text-align: center; box-shadow: inset 0 0 0 1px var(--line), 0 1.5px 0 rgb(14 22 34 / 0.12); line-height: 1.5; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 560; font-size: 16px; letter-spacing: -0.01em; transition: background 0.2s, transform 0.25s var(--ease); box-shadow: 0 10px 28px -12px rgb(14 22 34 / 0.55); }
.btn:hover { background: #1d2a3b; transform: translateY(-1px); }
.btn.big { min-height: 56px; padding: 0 32px; font-size: 18px; }

/* ---- header: the studio is always one click away ------------------------------------------------ */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--gutter); pointer-events: none; }
.top > * { pointer-events: auto; }
/* the logo: the day's logo (daily-logo/) in a fixed box (1320 × 600) at the top of the sheet, centred over it. The
   wordmark has the same place in every day's logo (x 314–1006, y 365–595); the day's object is built up around it.
   It sits on the stage, not in the fixed header, so the page below the story scrolls over it with the stage */
.brand { --logo-w: clamp(250px, 21.5vw, 330px); position: absolute; z-index: 8; top: 4px; left: calc(var(--sheet-w) / 2); width: min(var(--logo-w), var(--sheet-w) - 24px); aspect-ratio: 1320 / 600; transform: translateX(-50%); border-radius: 10px; pointer-events: none; }
.brand-word { position: absolute; left: 23.79%; top: 60.83%; width: 52.42%; height: auto; }
.brand-word.gone { visibility: hidden; }
.brand-day { position: absolute; inset: 0; width: 100%; height: 100%; }
.brand-day.building { animation: brand-build 1.6s 0.25s steps(24, end) both; }
@keyframes brand-build { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
/* the day's fun fact under the logo, while the pointer rests on it (or the logo has keyboard focus, or after a tap) */
.brand-fact { position: absolute; top: calc(100% + 4px); left: 50%; transform: translate(-50%, -4px); padding: 14px 16px 12px; background: #000; border-radius: 6px; box-shadow: 0 10px 28px -12px rgb(0 0 0 / 0.45); opacity: 0; visibility: hidden; transition: opacity 0.18s, transform 0.18s var(--ease), visibility 0.18s; pointer-events: none; }
.brand-fact { width: max-content; }
/* never squeezed to the logo's box: the pixel text keeps its exact size */
.brand-fact canvas { display: block; max-width: none; image-rendering: pixelated; }
.brand:hover .brand-fact, .brand:focus-visible .brand-fact, .brand.show-fact .brand-fact { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* only the logo's blocks take clicks, not the empty parts of its box */
.brand-word, .brand-day path, .brand-day polygon, .brand-day rect { pointer-events: visiblePainted; }
.brand-word { pointer-events: auto; }
/* phones and tall windows: the sheet is at the bottom, the logo goes top left (its wordmark on the gutter) */
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  .brand { --logo-w: 210px; width: var(--logo-w); top: 0; left: 0; transform: none; }
  .brand-fact { left: 12px; transform: translate(0, -4px); }
  .brand:hover .brand-fact, .brand:focus-visible .brand-fact, .brand.show-fact .brand-fact { transform: none; }
}
.top nav { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-left: auto; }
/* milky glass: a frosted white that lets the picture behind it show through, with a bright rim */
.top .links, .top nav a.go { background: rgb(255 255 255 / 0.5); backdrop-filter: blur(18px) saturate(1.7); -webkit-backdrop-filter: blur(18px) saturate(1.7); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.85), inset 0 0 0 1px rgb(255 255 255 / 0.45), 0 0 0 1px rgb(14 22 34 / 0.05), 0 8px 24px -14px rgb(14 22 34 / 0.35); }
.top .links { display: flex; align-items: center; gap: 22px; padding: 8px 20px; border-radius: 999px; }
.top .links a { color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
.top .links a:hover { color: var(--ink); }
.top nav a.go { color: var(--ink); padding: 9px 18px; border-radius: 999px; font-weight: 600; text-decoration: none; transition: background 0.2s; }
.top nav a.go:hover, .top .links a:hover { color: var(--ink); }
.top nav a.go:hover { background: rgb(255 255 255 / 0.72); }
@media (max-width: 760px) {
  .top { padding: 12px 16px; }
  .top .links { display: none; }
  .top nav a.go { padding: 8px 15px; font-size: 14px; }
}

/* ---- the story ------------------------------------------------------------------------------------- */
.story { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100lvh; margin-bottom: -100vh; margin-bottom: -100lvh; overflow: hidden; z-index: 1; background: var(--stage); isolation: isolate; }
.beat { height: calc(var(--h) * 1vh); pointer-events: none; }
.beat-end { height: 100vh; height: 100lvh; pointer-events: none; }
#world { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; opacity: 0; transition: opacity 0.5s; }
body.is-live #world { opacity: 1; }
.fade { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.backdrop { position: absolute; z-index: 3; inset: 0; background: var(--paper-2); opacity: var(--back, 0); pointer-events: none; }
#plate { position: absolute; left: 0; top: 0; z-index: 4; width: 1066px; height: 1600px; max-width: none; transform-origin: 0 0; visibility: hidden; image-rendering: pixelated; }
#plate.on { visibility: visible; }
#plate.smooth { image-rendering: auto; }

/* ---- the sheet: the white page all the words are on ---------------------------------------------- */
.sheet { position: absolute; z-index: 7; left: 0; top: 0; bottom: 0; width: var(--sheet-w); background: rgb(255 255 255 / 0.68); backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5); display: grid; grid-template-rows: 1fr auto; padding: 112px 48px 34px var(--gutter); box-shadow: inset -1px 0 0 rgb(255 255 255 / 0.7), 1px 0 0 rgb(14 22 34 / 0.06), 24px 0 60px -40px rgb(14 22 34 / 0.25); }
.chapters { position: relative; align-self: center; min-height: 22rem; }
.chap { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(calc(-50% + (1 - var(--in, 0)) * 14px)); opacity: var(--in, 0); visibility: hidden; max-width: 30rem; }
.chap.on { visibility: visible; }
.chap h2 { margin-bottom: 20px; }
.chap p { margin: 0; color: var(--ink-2); text-wrap: pretty; }
.chap p + p { margin-top: 12px; }
.chap .small { font-size: 15.5px; color: var(--ink-3); }
.chap h2::before { content: ''; display: block; width: 28px; height: 2px; background: var(--sky); margin-bottom: 22px; }
.chap.hero h1 { font-size: clamp(40px, 4.3vw, 66px); line-height: 0.98; letter-spacing: -0.045em; margin-bottom: 22px; }
.chap.hero p { font-size: 19px; }
.chap.hero .cta { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.chap.hero .cta span { font-size: 15px; color: var(--ink-3); }
.index { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13.5px; border-top: 1px solid rgb(14 22 34 / 0.08); padding-top: 16px; }
.index a { color: var(--ink-2); text-decoration: none; position: relative; transition: color 0.25s; }
.index a:hover { color: var(--ink); }
.index a.on { color: var(--ink); }
.index a.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; background: var(--sky); border-radius: 1px; }

/* ---- the studio's UI over the 3D region --------------------------------------------------------------- */
.region { position: absolute; z-index: 6; left: var(--rx, 0); top: 0; width: var(--rw, 100%); height: var(--rh, 100%); pointer-events: none; }
.hint { position: absolute; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; display: flex; align-items: center; gap: 9px; padding: 7px 14px 7px 11px; border-radius: 999px; background: rgb(14 22 34 / 0.62); color: #fff; font-size: 13.5px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: var(--hint, 1); white-space: nowrap; }
.wheel { position: relative; width: 12px; height: 18px; border: 1.5px solid rgb(255 255 255 / 0.85); border-radius: 7px; }
.wheel i { position: absolute; left: 50%; top: 3px; width: 2px; height: 4px; margin-left: -1px; border-radius: 1px; background: #fff; animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(6px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
/* the hero's dock: the studio's tools on the turning cottage, while nobody scrolls */
.hero-ui { position: absolute; left: 0; right: 0; bottom: calc(26px + env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 10px; opacity: var(--show, 1); visibility: hidden; transform: translateY(calc((1 - var(--show, 1)) * 10px)); }
.hero-ui.on { visibility: visible; }
.hero-pill { margin: 0; min-height: 30px; padding: 6px 13px; border-radius: 999px; font-size: 13.5px; color: var(--ink); background: rgb(255 255 255 / 0.62); backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.8), 0 8px 22px -14px rgb(14 22 34 / 0.35); opacity: 0; transform: translateY(4px); transition: opacity 0.35s, transform 0.35s var(--ease); max-width: calc(100% - 32px); text-align: center; }
.hero-pill.on { opacity: 1; transform: none; }
.hero-dock { pointer-events: auto; display: flex; gap: 2px; padding: 4px; border-radius: 13px; background: rgb(23 23 23 / 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 12px 30px -12px rgb(14 22 34 / 0.5); }
.hero-dock button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: #c9cdd3; padding: 8px 13px; border-radius: 9px; font-size: 14px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.hero-dock button svg { width: 16px; height: 16px; flex: none; }
.hero-dock button:hover { background: rgb(255 255 255 / 0.1); color: #fff; }
.hero-dock button[aria-pressed='true'] { background: #f1f1f1; color: #171717; }
.hero-dock button.walk { color: #fff; }
.hero-dock button:focus-visible { outline: 2px solid #c7d2e0; outline-offset: 1px; }
body.at-hero #world { cursor: grab; }
.loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: 8px 14px; border-radius: 999px; background: rgb(255 255 255 / 0.92); color: var(--ink-2); font-size: 13.5px; visibility: hidden; opacity: 0; transition: opacity 0.3s; z-index: 2; }
.loading.on { visibility: visible; opacity: 1; }
.loading b { font-weight: 560; color: var(--ink); font-variant-numeric: tabular-nums; }

.ui { position: absolute; font-size: 14px; line-height: 1.4; color: #222; background: #fff; border-radius: 14px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 24px 60px -24px rgb(14 22 34 / 0.45); opacity: var(--show, 0); visibility: hidden; transform: translateY(calc((1 - var(--show, 0)) * 12px)); }
.ui.on, .walkhud.on { visibility: visible; }
.ui .ex { margin: 0; font-size: 11.5px; color: #8a8a8a; }
.ui svg, .card svg { width: 16px; height: 16px; flex: none; }


/* the chat bar: the studio's composer card */
.composer { position: absolute; left: 50%; bottom: calc(6vh + env(safe-area-inset-bottom)); width: min(560px, calc(100% - 40px)); transform: translate(-50%, calc((1 - var(--show, 0)) * 18px)); opacity: var(--show, 0); visibility: hidden; display: grid; gap: 8px; font-size: 15px; z-index: 3; }
.composer.on { visibility: visible; }
.composer .ex { position: absolute; right: 14px; top: 10px; margin: 0; font-size: 11.5px; color: #8a8a8a; }
.card { position: relative; background: #fff; border-radius: 16px; padding: 8px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 22px 60px -18px rgb(0 0 0 / 0.42); display: grid; gap: 2px; color: #222; }
.att { justify-self: start; margin: 2px 0 0 6px; padding: 3px; border-radius: 9px; background: #f4f4f4; opacity: var(--att, 1); }
.att img { width: 24px; height: 48px; image-rendering: pixelated; border-radius: 3px; }
.card .text { margin: 0; padding: 6px 8px 2px; min-height: 48px; line-height: 20px; position: relative; }
.card .ph { color: #777; position: absolute; left: 8px; top: 6px; }
.card .text.typing .ph { display: none; }
.caret { display: inline-block; width: 1.5px; height: 1.05em; background: currentColor; vertical-align: -0.16em; margin-left: 1px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.card .row { display: flex; align-items: center; gap: 10px; }
.card .plus, .card .send { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none; }
.card .plus { color: #555; }
.card .send { background: #f4f4f4; color: #aaa; transition: background 0.2s, color 0.2s, transform 0.2s; }
.card .send.ready { background: #222; color: #fff; }
.card .send.press { transform: scale(0.9); }
.card .status { flex: 1; font-size: 13px; color: #666; display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .status::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--agent); box-shadow: 0 0 0 3px rgb(47 107 255 / 0.16); opacity: 0; }
.card .status.busy::before { opacity: 1; animation: pulse 1.2s ease-in-out infinite; }
.card .status.done::before { opacity: 1; background: #2f9e5b; box-shadow: 0 0 0 3px rgb(47 158 91 / 0.16); }
@keyframes pulse { 50% { opacity: 0.35; } }

.build { right: 28px; bottom: 32px; width: 340px; padding: 14px 16px; display: grid; gap: 10px; }
.build .ask { margin: 0; justify-self: end; max-width: 94%; min-height: 1.4em; background: #f4f4f4; padding: 9px 12px; border-radius: 14px 14px 4px 14px; }
.build.sent .caret { display: none; }
.calls { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.calls li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #555; opacity: 0; transition: opacity 0.25s; }
.calls li.on { opacity: 1; }
.calls li code { background: none; padding: 0; font-size: 12.5px; color: #333; }
.calls li::before { content: ''; width: 11px; height: 11px; flex: none; border-radius: 50%; border: 1.5px solid var(--agent); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.calls li.done::before { border: 0; background: var(--agent); animation: none; -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat; }
@keyframes spin { to { transform: rotate(360deg); } }
:root { --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6 9.6 3.6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.count { margin: 0; padding-top: 10px; border-top: 1px solid #eee; display: flex; justify-content: space-between; font-size: 12.5px; color: #777; font-variant-numeric: tabular-nums; }
.count span:first-child { color: #222; font-weight: 560; margin-right: 4px; }
.count #buildState { margin-left: auto; }
.mark { right: 28px; bottom: 32px; width: 300px; padding: 14px; display: grid; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 7px; justify-self: start; padding: 3px 9px 3px 7px; border-radius: 7px; background: rgb(47 107 255 / 0.12); color: var(--agent); font-size: 12.5px; }
.chip i { width: 9px; height: 9px; border-radius: 2px; background: var(--agent); }
.mark .bubble { margin: 0; justify-self: end; background: #f4f4f4; padding: 9px 13px; border-radius: 14px 14px 4px 14px; opacity: var(--ask, 0); }
.mark .reply { margin: 0; color: #666; font-size: 13px; display: flex; gap: 8px; align-items: center; opacity: var(--done, 0); }
.tick { width: 12px; height: 12px; flex: none; background: var(--agent); -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat; }
.walkhud { position: absolute; inset: 0; opacity: var(--show, 0); visibility: hidden; }
.walkhud .cross { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.walkhud .cross::before, .walkhud .cross::after { content: ''; position: absolute; background: rgb(255 255 255 / 0.92); mix-blend-mode: difference; }
.walkhud .cross::before { left: 8px; top: 0; width: 2px; height: 18px; }
.walkhud .cross::after { top: 8px; left: 0; height: 2px; width: 18px; }
.walkhud .keys { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); margin: 0; white-space: nowrap; background: rgb(255 255 255 / 0.92); padding: 7px 12px; border-radius: 12px; color: #555; font-size: 13px; box-shadow: 0 10px 30px -14px rgb(0 0 0 / 0.4); }
.tourbar { left: 50%; bottom: 30px; transform: translate(-50%, calc((1 - var(--show, 0)) * 12px)); display: flex; align-items: center; gap: 12px; padding: 7px 8px; width: min(440px, calc(100% - 40px)); border-radius: 13px; }
.tourbar .play { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #222; color: #fff; flex: none; }
.tourbar .play svg { width: 13px; height: 13px; }
.tourbar .prog { flex: 1; height: 4px; border-radius: 2px; background: #eee; overflow: hidden; }
.tourbar .prog i { display: block; height: 100%; width: 100%; background: #222; transform-origin: left; transform: scaleX(var(--p, 0)); }
.tourbar .time { font-size: 12.5px; color: #666; font-variant-numeric: tabular-nums; min-width: 2.6em; }
.tourbar .mp4 { font-size: 12.5px; padding: 6px 10px; border-radius: 8px; background: #f4f4f4; color: #222; white-space: nowrap; }
.slicer { left: 50%; bottom: 30px; transform: translate(-50%, calc((1 - var(--show, 0)) * 12px)); display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; width: min(360px, calc(100% - 40px)); font-size: 13px; }
.slicer .lab { color: #222; font-weight: 560; }
.slicer .axis { font: 500 12px 'Geist Mono', monospace; padding: 2px 7px; border-radius: 6px; background: #f4f4f4; }
.slicer .track { position: relative; flex: 1; height: 4px; border-radius: 2px; background: #e6e6e6; }
.slicer .track i { position: absolute; top: 50%; left: calc(var(--p, 0) * 100%); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #222; box-shadow: 0 0 0 3px #fff; }
.slicer output { font: 500 12px 'Geist Mono', monospace; color: #666; min-width: 2.4em; text-align: right; }
.mats { right: 28px; bottom: 32px; width: 320px; padding: 14px 16px; display: grid; gap: 8px; }
.m-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid #eee; }
.m-head span { color: #888; font-size: 12px; font-variant-numeric: tabular-nums; }
#matList { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
#matList li { display: grid; grid-template-columns: 15px 1fr auto; gap: 9px; align-items: center; padding: 3px 0; font-size: 13px; color: #333; }
#matList li i { width: 13px; height: 13px; border-radius: 3px; border: 1.5px solid #c9c9c9; transition: all 0.25s; }
#matList li.got i { background: var(--agent); border-color: var(--agent); }
#matList li.got span { color: #999; text-decoration: line-through; text-decoration-color: #bbb; }
#matList li small { color: #888; font-variant-numeric: tabular-nums; font-size: 12px; text-align: right; }
.m-export { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid #eee; }
.m-export span { font: 12px 'Geist Mono', monospace; padding: 4px 9px; border-radius: 7px; background: #f4f4f4; color: #333; }
.m-export span:first-child { background: #222; color: #fff; }
.pair { right: 28px; bottom: 32px; width: 280px; padding: 20px 18px 18px; display: grid; justify-items: center; gap: 12px; text-align: center; }
.pair .code { margin: 0; font: 500 30px 'Geist Mono', monospace; letter-spacing: 0.04em; color: #222; background: #f4f4f4; padding: 10px 16px; border-radius: 10px; }
.pair .copy { width: 100%; background: #222; color: #fff; border-radius: 999px; padding: 9px; font-weight: 560; font-size: 14px; }
.pair small { color: #777; font-size: 12.5px; }

/* ---- after the story -------------------------------------------------------------------------------- */
.try, .skins, .start, .end, .foot { position: relative; z-index: 2; background: var(--paper); }
.skins { padding: clamp(90px, 13vh, 150px) var(--gutter) 0; }
.skins-head { max-width: 1400px; margin: 0 auto 8px; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 48px; }
.skins-head p { margin: 0; color: var(--ink-2); max-width: 32rem; }
.skin-stage { position: relative; max-width: 1400px; margin: 0 auto; height: min(62vh, 560px); min-height: 380px; border-radius: 20px; background: linear-gradient(180deg, #f6f8fb 0%, #eef1f4 100%); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
#skinCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: pan-y; }
.skin-name { position: absolute; left: 0; right: 0; top: 18px; margin: 0; text-align: center; font-size: 14px; color: var(--ink-2); pointer-events: none; }
.skin-palette { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 7px; padding: 7px; border-radius: 12px; background: rgb(255 255 255 / 0.7); box-shadow: inset 0 0 0 1px rgb(14 22 34 / 0.06); }
.skin-palette button { width: 28px; height: 28px; border-radius: 7px; border: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.2); }
.skin-palette button[aria-checked='true'] { outline: 2px solid var(--ink); outline-offset: 2px; }
.skins-note { max-width: 1400px; margin: 14px auto 0; font-size: 13px; color: var(--ink-3); text-align: center; }
.try { padding: clamp(90px, 13vh, 150px) var(--gutter) 24px; }
.try-head { max-width: 1400px; margin: 0 auto 32px; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 48px; }
.try-head p { margin: 0; color: var(--ink-2); max-width: 32rem; }
.try .studio-frame { max-width: 1400px; margin: 0 auto; }
.try-note { max-width: 1400px; margin: 16px auto 0; font-size: 13px; color: var(--ink-3); text-align: center; }

.start { padding: clamp(100px, 15vh, 170px) max(var(--gutter), calc((100% - 1240px) / 2)) 40px; }
.start-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 48px; }
.start-head p { margin: 0; color: var(--ink-2); }
.guide { list-style: none; counter-reset: s; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.guide li { counter-increment: s; padding: 28px 30px 8px 0; margin-right: 30px; border-right: 1px solid var(--line); color: var(--ink-2); font-size: 16.5px; min-width: 0; }
.guide li:last-child { border-right: 0; margin-right: 0; }
.guide li::before { content: counter(s); display: block; font: 500 14px 'Geist Mono', monospace; color: var(--sky); margin-bottom: 16px; }
.guide h3 { margin-bottom: 8px; }
.guide p { margin: 0; }
.guide b { color: var(--ink); font-weight: 560; }
.guide a { color: var(--ink); text-underline-offset: 3px; }
.mcp { display: flex; align-items: center; gap: 6px; margin-top: 14px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 14px; max-width: 26rem; }
.mcp code { background: none; padding: 0; font-size: 14px; flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.mcp button { flex: none; min-width: 76px; border: 0; background: var(--ink); color: var(--paper); border-radius: 8px; padding: 7px 12px; font-size: 13.5px; font-weight: 560; cursor: pointer; transition: background 0.2s; }
.mcp button:hover { background: #1d2a3b; }
.mcp button.ok { background: var(--sky); }
.more { margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; color: var(--ink-3); font-size: 15px; }
.more a { color: var(--ink); font-weight: 560; text-underline-offset: 4px; text-decoration-color: var(--sky); }

.end { padding: clamp(120px, 20vh, 220px) var(--gutter) clamp(100px, 15vh, 160px); text-align: center; display: grid; justify-items: center; gap: 20px; }
.end h2 { font-size: clamp(44px, 6.4vw, 96px); letter-spacing: -0.05em; line-height: 0.98; }
.end p { margin: 0; color: var(--ink-2); }
.end .btn { margin-top: 10px; }

.foot { padding: 28px var(--gutter) 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; font-size: 13px; color: var(--ink-3); border-top: 1px solid var(--line); }
.foot p { margin: 0; max-width: 62rem; }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.nogl { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; margin: 0 auto; max-width: 36rem; background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 12px; font-size: 14px; }
.nogl p { margin: 0; }

/* ---- phones and narrow windows: the 3D on top, the sheet below it ------------------------------------- */
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  body { font-size: 16px; }
  .sheet { left: 0; right: 0; top: auto; width: auto; height: var(--sheet-h); padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7), 0 -1px 0 rgb(14 22 34 / 0.06); grid-template-rows: 1fr; }
  .chapters { align-self: stretch; min-height: 0; }
  .chap { top: 0; transform: translateY(calc((1 - var(--in, 0)) * 10px)); }
  .chap h2 { font-size: clamp(26px, 7vw, 32px); margin-bottom: 10px; }
  .chap h2::before { margin-bottom: 14px; width: 22px; }
  .chap p { font-size: 15.5px; line-height: 1.5; }
  .chap p + p { margin-top: 8px; }
  .chap .small { font-size: 14px; }
  .chap.hero h1 { font-size: clamp(30px, 8.6vw, 40px); margin-bottom: 12px; }
  .chap.hero p { font-size: 16px; }
  .chap.hero .cta { margin-top: 16px; }
  .index { display: none; }
    .composer { bottom: 14px; font-size: 14.5px; }
  .build, .mark, .mats, .pair { left: 12px; right: 12px; bottom: 12px; width: auto; max-width: 400px; margin: 0 auto; }
  .build { padding: 10px 12px; gap: 6px; }
  .build .ex { display: none; }
  .calls { grid-template-columns: 1fr 1fr; gap: 2px 8px; }
  .calls li code { font-size: 11px; }
  .mats { padding: 10px 12px; gap: 5px; }
  #matList li:nth-child(n+4) { display: none; }
  .pair { width: 240px; left: 50%; right: auto; margin-left: -120px; padding: 12px; gap: 8px; }
  .pair .code { font-size: 22px; padding: 8px 12px; }
  .walkhud .keys { bottom: 14px; font-size: 12px; }
  .tourbar, .slicer { bottom: 14px; }
  .hero-ui { bottom: 12px; }
  .hero-dock button { padding: 8px 10px; font-size: 13px; gap: 5px; }
  .hero-pill { font-size: 12.5px; }
  .tourbar .mp4 { display: none; }
  .try { padding: 72px 12px 20px; }
  .try-head { padding: 0 6px; }
  .guide { grid-template-columns: 1fr; }
  .guide li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line); padding: 22px 0 24px; }
  .foot { padding: 26px 20px 34px; }
}
@media (max-width: 1000px) and (min-width: 761px) and (min-aspect-ratio: 4/5) {
  .guide { grid-template-columns: 1fr; }
  .guide li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line); padding: 22px 0 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .wheel i, .caret, .calls li::before, .card .status.busy::before { animation: none; }
}

@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  .skins { padding: 72px 12px 0; }
  .skins-head { padding: 0 6px; }
  .skin-stage { height: 64vh; border-radius: 16px; }
  }
