/* fomuse.family: day tokens until the night act, night tokens after (html.is-night). One radius: 16px. */
@font-face { font-family: 'Fredoka'; src: url(/assets/fonts/fredoka.woff2) format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url(/assets/fonts/outfit.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
:root {
  --canvas: #eef3fb; --surface: #ffffff; --ink: #141a33; --ink-soft: #4f5a7c; --accent: #2442e6; --accent-ink: #ffffff;
  --line: color-mix(in oklab, var(--ink) 12%, transparent); --edge: rgba(255, 255, 255, .7);
  --shadow-tint: 32 44 92;
  --font-display: 'Fredoka', ui-rounded, system-ui, sans-serif; --font-text: 'Outfit', system-ui, sans-serif;
  --radius: 16px; color-scheme: light dark;   /* declared so phone browsers (Samsung Internet, Chrome auto dark) never repaint the town */
  --cap-w: min(440px, 36vw);
}
html.is-night {
  --canvas: #1e1a4c; --surface: #2a2463; --ink: #f4f1ff; --ink-soft: #c3bbe8; --accent: #b3b9ff; --accent-ink: #1e1a4c;
  --line: color-mix(in oklab, var(--ink) 14%, transparent); --edge: rgba(255, 255, 255, .08); --shadow-tint: 14 10 40; color-scheme: dark;
}
/* the page keeps its own day and night (the scroll clock); a dark system theme gets the same design */
@media (prefers-color-scheme: dark) {
  :root:not(.is-night) { --canvas: #eef3fb; --surface: #ffffff; --ink: #141a33; --ink-soft: #4f5a7c; --accent: #2442e6; --accent-ink: #ffffff; }
}
html { background: var(--canvas); transition: background .6s var(--ease-out); }
body { background: transparent; color: var(--ink); font-size: 17px; line-height: 1.6; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1.02; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.5rem); line-height: 1.06; }
h3 { font-size: 1.3rem; }
p { color: var(--ink); }
.soft { color: var(--ink-soft); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
a { color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }

/* the town sits behind everything; empty stage space lets taps through to it */
#town { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; display: block; touch-action: pan-y; cursor: pointer; }
.poster { display: none; position: fixed; inset: 0; z-index: 0; background: #cfe3fb center / cover no-repeat; }
.poster::after { content: ""; position: absolute; inset: 0; background: var(--poster-next, none) center / cover no-repeat; opacity: var(--poster-mix, 0); }
html.no-gl #town { display: none; } html.no-gl .poster { display: block; }
main, .foot { position: relative; z-index: 1; }
.cine-stage { pointer-events: none; }
.cap, .flow .wrap, .foot { pointer-events: auto; }
.flow { pointer-events: none; }
.cine-intro { background: var(--canvas); }

/* ---------------- header: mark, the town clock, the dock */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px clamp(16px, 3vw, 32px); pointer-events: none; }
.top > * { pointer-events: auto; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; padding: 6px 14px 6px 6px; border-radius: 999px; background: color-mix(in oklab, var(--surface) 88%, transparent); box-shadow: 0 6px 20px -10px rgb(var(--shadow-tint) / .45); }
.clock { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: color-mix(in oklab, var(--surface) 88%, transparent); color: var(--ink); font-family: var(--font-display); font-weight: 500; font-variant-numeric: tabular-nums; box-shadow: 0 6px 20px -10px rgb(var(--shadow-tint) / .45); min-width: 118px; margin: 0; }
.clock svg { fill: #f2b233; stroke: #f2b233; stroke-width: 1.6; stroke-linecap: round; }
.clock .moon { display: none; fill: #cdd6ff; stroke: none; } html.is-night .clock .sun { display: none; } html.is-night .clock .moon { display: inline; }
.dock { margin-left: auto; display: flex; gap: 4px; padding: 6px; border-radius: 999px; background: color-mix(in oklab, var(--surface) 90%, transparent); box-shadow: 0 10px 28px -12px rgb(var(--shadow-tint) / .5), inset 0 1px 0 var(--edge); }
.dock a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 500; white-space: nowrap; transition: background 160ms var(--ease-out), color 160ms var(--ease-out); }
.dock a.is-cta { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .dock a:not(.is-cta):hover { background: color-mix(in oklab, var(--accent) 12%, transparent); } .dock a.is-cta:hover { background: color-mix(in oklab, var(--accent) 86%, var(--ink)); } }
@media (max-width: 760px) {
  .top { padding: 10px 12px; } .mark span { display: none; } .mark { padding: 4px; }
  .clock { margin-left: auto; min-width: 0; }
  .dock { position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); justify-content: space-between; }
  .dock a { padding: 0 10px; font-size: .95rem; flex: 1 1 auto; justify-content: center; }
  .dock a[href="/docs"] { display: none; }
  .social a { width: 40px; height: 40px; }
}

/* socials in the header */
.social { display: flex; gap: 6px; }
.social a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: color-mix(in oklab, var(--surface) 90%, transparent); box-shadow: 0 6px 20px -10px rgb(var(--shadow-tint) / .45); transition: transform 140ms var(--ease-out); }
.social a[aria-disabled="true"] { opacity: .55; }
@media (hover: hover) and (pointer: fine) { .social a:hover { transform: translateY(-1px); } }

/* the live line in the hero: the latest theses and whether their muse moved in */
.live { justify-self: end; align-self: end; margin-bottom: 9vh; width: min(380px, 30vw); background: var(--surface); border-radius: var(--radius); padding: 18px 18px 14px; box-shadow: 0 24px 60px -24px rgb(var(--shadow-tint) / .45), inset 0 1px 0 var(--edge); pointer-events: auto; color: var(--ink); }
.live h2 { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.live .dot { width: 9px; height: 9px; border-radius: 50%; background: #3fae68; box-shadow: 0 0 0 0 rgba(63, 174, 104, .5); animation: ping 2s var(--ease-out) infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(63, 174, 104, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 174, 104, 0); } }
.live-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.live-list li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.live-list li.empty { display: block; color: var(--ink-soft); font-size: .95rem; }
.live-list img, .live-list .av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: color-mix(in oklab, var(--ink) 12%, transparent); }
.live-list .who { font-weight: 600; font-size: .95rem; } .live-list .st { font-family: var(--font-display); font-size: .82rem; padding: 2px 8px; border-radius: 999px; margin-left: 6px; background: color-mix(in oklab, var(--ink) 8%, transparent); white-space: nowrap; }
.live-list .st.ok { background: color-mix(in oklab, #3fae68 30%, transparent); }
.live-list .txt { color: var(--ink-soft); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; max-width: none; }
.live-more { display: inline-flex; min-height: 40px; align-items: center; font-family: var(--font-display); font-weight: 500; text-decoration: none; margin-top: 4px; }

/* ---------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: var(--radius); font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0; text-transform: none; text-decoration: none; color: var(--accent-ink); background: var(--accent); clip-path: none; box-shadow: 0 10px 24px -12px color-mix(in oklab, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255,255,255,.25); transition: transform 140ms var(--ease-out), background 160ms var(--ease-out); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--ghost { background: color-mix(in oklab, var(--surface) 70%, transparent); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: color-mix(in oklab, var(--accent) 86%, var(--ink)); } .btn--ghost:hover { background: color-mix(in oklab, var(--accent) 10%, var(--surface)); } }
.btn[disabled] { opacity: .5; pointer-events: none; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }

/* ---------------- acts: captions are sticker cards beside the scene */
.act { height: 170vh; }
.act-hero { height: 150vh; }
.act-night { height: 320vh; }
.act-close { height: 150vh; }
.cine-stage { display: grid; align-items: center; justify-items: start; padding: 0 clamp(16px, 5vw, 72px); }
.cap { width: var(--cap-w); background: var(--surface); border-radius: var(--radius); padding: 26px 28px; box-shadow: 0 24px 60px -24px rgb(var(--shadow-tint) / .45), inset 0 1px 0 var(--edge); color: var(--ink); }
.cap h2 { margin-bottom: 10px; }
.cap p { max-width: 42ch; }
.cap .job { font-family: var(--font-display); font-weight: 600; color: var(--accent); margin-bottom: 6px; font-size: 1rem; }
.cap--hero { width: min(540px, 42vw); background: transparent; box-shadow: none; padding: 0; margin-top: -6vh; }
.cap--hero h1 { text-shadow: 0 2px 30px rgba(255, 255, 255, .8); }
.cap--hero .lead { font-size: 1.2rem; max-width: 38ch; margin-top: 14px; background: color-mix(in oklab, var(--surface) 84%, transparent); padding: 12px 16px; border-radius: var(--radius); box-shadow: 0 10px 30px -18px rgb(var(--shadow-tint) / .5); }
.cap--hero .note { margin-top: 14px; font-family: var(--font-display); font-weight: 500; color: var(--ink); display: inline-block; padding: 6px 12px; border-radius: 999px; background: color-mix(in oklab, var(--surface) 84%, transparent); }
.cap--night, .cap--close { justify-self: center; text-align: center; width: min(620px, 92vw); }
.cap--night p, .cap--close p { margin-inline: auto; }
.cap--split { width: min(680px, 92vw); }
.cap--close .row { justify-content: center; }
.act-night .cine-stage > .cap { align-self: start; margin-top: 11vh; }
.act-close .cine-stage > .cap { align-self: end; margin-bottom: 14vh; }
.split { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 6px; }
.split li { display: grid; gap: 4px; padding: 14px; border-radius: var(--radius); background: color-mix(in oklab, var(--ink) 6%, transparent); text-align: left; }
.split b { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--accent); line-height: 1; }
.split span { color: var(--ink-soft); font-size: .95rem; line-height: 1.4; }
.is-on [data-cine-stagger] > *, html:not(.cine-js) [data-cine-stagger] > * { opacity: 1; transform: none; }
.lookup:not([open]) > :not(summary) { display: none; }
.faces { display: flex; gap: 8px; margin-top: 16px; }
.faces button { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; padding: 0; box-shadow: 0 6px 14px -8px rgb(var(--shadow-tint) / .6); transition: transform 140ms var(--ease-out); }
.faces img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (pointer: fine) { .faces button:hover { transform: translateY(-2px) scale(1.04); } }
.note { font-size: .95rem; }
.sold-out { margin: 0 0 20px; padding: 14px 18px; border-radius: 14px; color: var(--ink); background: color-mix(in oklab, #ffd36b 18%, transparent); border: 1px solid color-mix(in oklab, #ffd36b 55%, transparent); }
.sold-out b { font-family: var(--font-display); font-weight: 600; }

/* ---------------- flow sections at night: panels over the sleeping town */
.flow { padding-block: clamp(40px, 8vw, 120px); }
.panel-night { background: color-mix(in oklab, var(--surface) 92%, transparent); border-radius: calc(var(--radius) + 8px); padding: clamp(22px, 4vw, 48px); box-shadow: 0 30px 80px -30px rgb(var(--shadow-tint) / .8), inset 0 1px 0 var(--edge); max-width: 1040px; }
.panel-night > h2 { margin-bottom: 10px; }
.steps { list-style: none; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.steps li { counter-increment: s; position: relative; padding: 56px 18px 18px; border-radius: var(--radius); background: color-mix(in oklab, var(--ink) 6%, transparent); display: grid; gap: 6px; }
.steps li::before { content: counter(s); position: absolute; top: 14px; left: 18px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: 600; }
.steps b { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.steps span { color: var(--ink-soft); font-size: .98rem; }
.line-h { margin-top: 36px; margin-bottom: 12px; }
.line { list-style: none; padding: 0; display: grid; gap: 8px; max-height: 420px; overflow: auto; }
.line li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: color-mix(in oklab, var(--ink) 5%, transparent); }
.line li.empty { display: block; color: var(--ink-soft); }
.line img, .line .av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: color-mix(in oklab, var(--ink) 12%, transparent); }
.line .who { font-weight: 600; } .line .txt { color: var(--ink-soft); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line .st { font-family: var(--font-display); font-size: .9rem; white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: color-mix(in oklab, var(--ink) 8%, transparent); }
.line .st.ok { background: color-mix(in oklab, #3fae68 30%, transparent); }
.line .why, .live-list .why { margin: 2px 0 0; font-size: .82rem; font-weight: 500; color: var(--ink); opacity: .78; }
/* Work: pay rules and the live town board */
.work-lead { margin: 0; font-size: 1.12rem; color: var(--ink-soft); max-width: 62ch; text-wrap: pretty; } .work-lead b { color: var(--ink); font-weight: 600; }
.payrules { list-style: none; padding: 0; margin: 20px 0 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.payrules li { position: relative; overflow: hidden; display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; row-gap: 2px; align-content: center; padding: 16px; border-radius: var(--radius); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.payrules .pr-ico { grid-row: 1 / 3; align-self: center; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in oklab, var(--accent) 18%, transparent); color: var(--accent); }
.payrules svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.payrules b { font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; line-height: 1.2; }
.payrules li > span:last-child { color: var(--ink-soft); font-size: .9rem; line-height: 1.35; }
.payrules .pr-key { background: color-mix(in oklab, #ffd36b 14%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, #ffc53d 65%, transparent); }
.payrules .pr-key .pr-ico { background: #ffd36b; color: #3a2a00; }
.payrules .pr-key::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .28) 50%, transparent 70%); transform: translateX(-120%); }
.payrules.is-in .pr-key::after { animation: sheen 1.1s var(--ease-out) .55s both; }
.payrules .pr-burn .pr-ico { background: color-mix(in oklab, #ff7a2e 20%, transparent); color: color-mix(in oklab, #ff7a2e 85%, var(--ink)); }
.work-note { margin: 2px 0 0; font-size: .88rem; color: var(--ink-soft); }
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0; }
.board > div { position: relative; overflow: hidden; min-width: 0; padding: 14px 16px; border-radius: var(--radius); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.board dt { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: .86rem; }
.board dd { margin: 6px 0 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.2rem, 2.3vw, 1.5rem); line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.board dd small { font-size: .6em; font-weight: 500; color: var(--ink-soft); }
.board .bd-hero { grid-column: 1 / 3; grid-row: 1 / 3; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 20px 22px; background: linear-gradient(150deg, color-mix(in oklab, #22a867 26%, transparent), color-mix(in oklab, #22a867 8%, transparent)); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, #3ddc84 40%, transparent); }
.board .bd-hero dd { font-size: clamp(2.3rem, 5.4vw, 3.4rem); letter-spacing: -.02em; }
.board .bd-hero small { font-size: .36em; }
.board .bd-usd { display: block; margin-top: 8px; font-size: .34em; font-weight: 600; color: color-mix(in oklab, #22a867 78%, var(--ink)); }
.board .bd-hero::after { content: ''; position: absolute; inset: -40% -60%; pointer-events: none; background: linear-gradient(105deg, transparent 42%, rgb(255 255 255 / .09) 50%, transparent 58%); transform: translateX(-60%); animation: boardsheen 6s var(--ease-inout) 1.2s infinite; }
@keyframes boardsheen { 0%, 55% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
.bd-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; flex: none; }
.bd-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #3ddc84; animation: livering 1.8s ease-out infinite; }
@keyframes livering { from { transform: scale(1); opacity: .6; } to { transform: scale(3.2); opacity: 0; } }
.bd-bar { margin-top: 10px; height: 6px; border-radius: 3px; overflow: hidden; background: color-mix(in oklab, var(--ink) 12%, transparent); }
.bd-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), #3ddc84); transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease-out); }
.board .bd-paid { grid-column: 3 / 5; }
.board .bd-burn { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; background: linear-gradient(150deg, color-mix(in oklab, #ff7a2e 20%, transparent), color-mix(in oklab, #ff5a1f 6%, transparent)); }
.board .bd-burn dd { margin: 0; font-size: clamp(1.3rem, 2.8vw, 1.85rem); color: color-mix(in oklab, #ff7a2e 72%, var(--ink)); }
.board .bd-burn::after { content: ''; position: absolute; right: -30px; bottom: -40px; width: 180px; height: 120px; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgb(255 120 40 / .35), transparent); animation: ember 2.6s ease-in-out infinite alternate; }
@keyframes ember { from { opacity: .45; transform: scale(.92); } to { opacity: 1; transform: scale(1.06); } }
.board dd.tick { animation: tick .5s var(--ease-out); }
@keyframes tick { from { opacity: .55; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .payrules { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr 1fr; }
  .board .bd-hero { grid-column: 1 / -1; grid-row: auto; }
  .board .bd-paid, .board .bd-burn { grid-column: 1 / -1; }
  .board .bd-burn { display: block; }
  .board dd { font-size: clamp(1.15rem, 5.4vw, 1.4rem); }
}
@media (prefers-reduced-motion: reduce) {
  .payrules.is-in .pr-key::after, .board .bd-hero::after, .bd-dot::after, .board .bd-burn::after, .board dd.tick { animation: none; }
  .bd-bar i { transition: none; }
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0; }
.stats div { padding: 14px 16px; border-radius: var(--radius); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.stats .wide { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .stats .wide dd { margin: 0; }
.stats dt { color: var(--ink-soft); font-size: .9rem; } .stats dd { margin: 4px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; }
.rig { margin-top: 18px; } .rig h3 { margin-bottom: 6px; } .addr { font-family: var(--font-text); font-size: .9rem; color: var(--ink-soft); font-weight: 400; margin-left: 8px; }
/* the one Connect wallet button opens this sheet only when there is a choice to make */
.wallet-sheet .card-body { padding-top: 26px; gap: 10px; }
.wallet-sheet h2 { font-size: 1.5rem; padding-right: 40px; }
.wallet-rows { display: grid; gap: 8px; margin-top: 6px; }
.wallet-row { justify-content: flex-start; gap: 12px; width: 100%; }
.wallet-row img { width: 24px; height: 24px; border-radius: 6px; }
.wallet-dot { width: 24px; height: 24px; border-radius: 6px; background: color-mix(in oklab, var(--accent) 25%, transparent); }
.mine-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mine-list a { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 12px; text-decoration: none; color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); font-size: .92rem; }
.mine-list img { width: 36px; height: 36px; border-radius: 9px; }
.lookup { margin-top: 26px; } .lookup summary { cursor: pointer; font-family: var(--font-display); font-weight: 500; min-height: 40px; display: flex; align-items: center; }
.lookup input { flex: 1 1 260px; min-height: 48px; padding: 0 14px; border-radius: var(--radius); border: 1.5px solid var(--line); background: color-mix(in oklab, var(--surface) 70%, transparent); color: var(--ink); font: inherit; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 20px; }
.grid button { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; padding: 0; box-shadow: 0 8px 20px -12px rgb(var(--shadow-tint) / .7); transition: transform 140ms var(--ease-out); }
.grid img { width: 100%; height: 100%; object-fit: cover; }
.grid span { position: absolute; left: 6px; bottom: 6px; font-size: .75rem; font-family: var(--font-display); padding: 2px 8px; border-radius: 999px; background: rgba(10, 15, 44, .72); color: #fff; }
.grid span small, .mine-list small { display: block; font-size: .68rem; font-weight: 500; opacity: .85; font-variant-numeric: tabular-nums; }
.grid span:has(small) { border-radius: 10px; text-align: left; line-height: 1.25; padding: 3px 8px; }
.mine-list a:has(small) { flex-wrap: wrap; } .mine-list a small { flex-basis: 100%; margin: -6px 0 0 44px; }
@media (hover: hover) and (pointer: fine) { .grid button:hover { transform: translateY(-3px); } }

/* ---------------- footer, card, toast */
.foot { padding: 40px 0 120px; }
.foot .wrap { display: grid; gap: 10px; background: color-mix(in oklab, var(--surface) 90%, transparent); border-radius: calc(var(--radius) + 8px); padding: 24px clamp(20px, 4vw, 40px); max-width: 1040px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; } .foot nav a { min-height: 40px; display: inline-flex; align-items: center; font-family: var(--font-display); font-weight: 500; text-decoration: none; }
.foot p { font-size: .9rem; max-width: none; }
.card { margin: auto; max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; border: 0; padding: 0; border-radius: calc(var(--radius) + 8px); width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 40px 100px -30px rgb(var(--shadow-tint) / .8); }
.card::backdrop { background: rgb(var(--shadow-tint) / .35); }
.card[open] { animation: pop 220ms var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.card > img { width: 100%; height: auto; aspect-ratio: 1; max-height: 46dvh; object-fit: cover; background: color-mix(in oklab, var(--ink) 8%, transparent); }
.card-body { padding: 18px 22px 22px; display: grid; gap: 6px; }
.card .job { font-family: var(--font-display); font-weight: 600; color: var(--accent); }
.card .x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #141a33; font-size: 26px; line-height: 1; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .4); }
.traits { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
/* the muse card: a work badge more than a popup. Art with its job on it, who holds it, three live numbers, how much of
   it is paid out, traits, and two actions. Pieces rise in one after another; the primary action catches a sheen. */
.muse-card { width: min(440px, calc(100vw - 28px)); }
.muse-card .x { display: grid; place-items: center; z-index: 2; transition: transform 180ms var(--ease-out); }
.muse-card .x:active { transform: scale(.9); }
.mc-art { position: relative; margin: 0; width: 100%; aspect-ratio: 1; max-height: 42dvh; overflow: hidden; background: color-mix(in oklab, var(--ink) 8%, transparent); }
.mc-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.06); transition: transform 900ms var(--ease-out); }
.muse-card.is-in .mc-art img { transform: none; }
.mc-art::after { content: ""; position: absolute; inset: auto 0 0; height: 36%; background: linear-gradient(to top, rgba(10, 12, 40, .5), rgba(10, 12, 40, 0)); pointer-events: none; }
.mc-badge { position: absolute; left: 14px; bottom: 14px; z-index: 1; padding: 6px 14px; border-radius: 999px; background: rgba(10, 15, 44, .72); color: #fff; font: 600 .95rem/1.2 var(--font-display); backdrop-filter: blur(6px); }
.mc-badge:empty { display: none; }
.muse-card .card-body { padding: 18px 20px 20px; gap: 0; }
.mc-where { margin: 0; font: 600 .9rem/1.2 var(--font-display); color: var(--accent); }
.muse-card h2 { margin: 2px 0 0; font-size: 2rem; line-height: 1.05; letter-spacing: -.02em; }
.mc-who { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--ink-soft); font-size: .95rem; line-height: 1.3; }
.mc-handle { font-weight: 600; color: var(--ink); }
.mc-addr { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: color-mix(in oklab, var(--ink) 7%, transparent); color: var(--ink-soft); text-decoration: none; font-size: .85rem; white-space: nowrap; transition: background 160ms var(--ease-out), color 160ms var(--ease-out); }
.mc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.mc-stats div { display: grid; padding: 10px clamp(9px, 2.6vw, 12px); border-radius: 14px; background: color-mix(in oklab, var(--ink) 5%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.mc-stats span { font-size: .78rem; color: var(--ink-soft); }
.mc-stats b { font: 600 clamp(.86rem, 3.9vw, 1.1rem)/1.25 var(--font-display); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-stats i { font-style: normal; font-size: .74rem; color: var(--ink-soft); }
.mc-bar { display: grid; gap: 6px; margin: 12px 0 0; }
.mc-track { display: block; height: 8px; border-radius: 999px; overflow: hidden; background: color-mix(in oklab, var(--ink) 8%, transparent); }
.mc-track i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 55%, #3fae68)); transform: scaleX(0); transform-origin: left; transition: transform 800ms var(--ease-out) 150ms; }
.mc-bar small { font-size: .82rem; color: var(--ink-soft); }
.mc-traits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 14px 0 16px; }
.mc-traits li { display: grid; padding: 7px 12px; border-radius: 12px; font-size: .9rem; line-height: 1.25; background: color-mix(in oklab, var(--ink) 5%, transparent); }
.mc-traits li b { margin: 0; font-size: .72rem; font-weight: 500; color: var(--ink-soft); }
.mc-actions { display: flex; gap: 8px; }
.mc-actions .btn { flex: 1 1 auto; }
.mc-go { position: relative; overflow: hidden; }
.mc-go::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, .5) 50%, rgba(255, 255, 255, 0) 75%); transform: translateX(-120%); pointer-events: none; }
.muse-card.is-in .mc-go::after { animation: sheen 900ms var(--ease-out) 700ms both; }
@keyframes sheen { to { transform: translateX(120%); } }
.mc-arrow { transition: transform 160ms var(--ease-out); }
.muse-card .card-body > * { opacity: 0; transform: translateY(8px); transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out); }
.muse-card.is-in .card-body > * { opacity: 1; transform: none; }
.muse-card.is-in .card-body > :nth-child(2) { transition-delay: 40ms; } .muse-card.is-in .card-body > :nth-child(3) { transition-delay: 80ms; }
.muse-card.is-in .card-body > :nth-child(4) { transition-delay: 120ms; } .muse-card.is-in .card-body > :nth-child(5) { transition-delay: 160ms; }
.muse-card.is-in .card-body > :nth-child(6) { transition-delay: 200ms; } .muse-card.is-in .card-body > :nth-child(7) { transition-delay: 240ms; }
@media (hover: hover) and (pointer: fine) {
  .muse-card .x:hover { transform: rotate(90deg); }
  .mc-go:hover .mc-arrow { transform: translateX(4px); }
  .mc-go:hover::after { animation: sheen 700ms var(--ease-out) both; }
  .mc-addr:hover { background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--accent); }
}
/* a link to #the-line (shared on X) lands below the fixed header, not under it */
#the-line, #move-in, #work, #residents { scroll-margin-top: clamp(84px, 11vh, 120px); }
/* your muses: one row each, with List or the live listing and Cancel */
#yList.mine-list { display: grid; gap: 8px; }
.mm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px; border-radius: 14px; background: color-mix(in oklab, var(--ink) 5%, transparent); }
/* the rows replace the old chip list: its chip rules (.mine-list a / small) must not reach them */
#yList .mm-who { display: flex; flex: 1 1 160px; flex-wrap: nowrap; align-items: center; gap: 10px; min-width: 0; padding: 0; background: none; border-radius: 0; text-decoration: none; color: var(--ink); }
#yList .mm-who small { display: block; margin: 0; flex-basis: auto; }
.mm-who img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.mm-who span { display: grid; min-width: 0; line-height: 1.25; } .mm-who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-who small { color: var(--ink-soft); font-size: .8rem; font-variant-numeric: tabular-nums; }
.mm-act { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; max-width: 100%; margin-left: auto; }
.mm-btn { min-height: 38px; padding: 0 16px; font-size: .95rem; }
.mm-listed { font: 600 .85rem/1.2 var(--font-display); color: color-mix(in oklab, #3fae68 55%, var(--ink)); background: color-mix(in oklab, #3fae68 22%, transparent); padding: 6px 10px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.mm-wait { width: 64px; height: 30px; border-radius: 999px; background: linear-gradient(90deg, color-mix(in oklab, var(--ink) 6%, transparent), color-mix(in oklab, var(--ink) 12%, transparent), color-mix(in oklab, var(--ink) 6%, transparent)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
/* the list dialog */
.list-card { width: min(420px, calc(100vw - 28px)); }
.list-card .card-body { padding: 22px 20px 20px; gap: 0; grid-template-columns: minmax(0, 1fr); }
.lc-head { display: flex; align-items: center; gap: 14px; padding-right: 44px; }
.lc-head img { width: 64px; height: 64px; border-radius: 14px; box-shadow: 0 8px 20px -10px rgb(var(--shadow-tint) / .6); }
.lc-head h2 { margin: 2px 0 0; font-size: 1.6rem; line-height: 1.05; }
.lc-label { margin: 18px 0 6px; font-size: .85rem; color: var(--ink-soft); }
.lc-price { display: flex; align-items: center; border-radius: 14px; background: color-mix(in oklab, var(--ink) 5%, transparent); box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow 160ms var(--ease-out); }
.lc-price:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.lc-price input { flex: 1; width: 100%; min-width: 0; border: 0; background: none; padding: 12px 14px; font: 600 1.5rem/1.2 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; outline: none; }
.lc-price span { padding: 0 14px; font: 600 1rem/1 var(--font-display); color: var(--ink-soft); }
.lc-days { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-days button { padding: 8px 12px; border-radius: 999px; font-size: .88rem; color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); transition: background 160ms var(--ease-out), color 160ms var(--ease-out), transform 140ms var(--ease-out); }
.lc-days button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.lc-days button:active { transform: scale(.96); }
.lc-sum { display: grid; gap: 4px; margin: 16px 0 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in oklab, var(--ink) 4%, transparent); }
.lc-sum div { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; color: var(--ink-soft); } .lc-sum dd { margin: 0; }
.lc-sum .lc-get { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); font: 600 1.05rem/1.2 var(--font-display); color: var(--ink); }
.lc-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; counter-reset: s; }
.lc-steps li { counter-increment: s; display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-soft); }
.lc-steps li::before { content: counter(s); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font: 600 .8rem/1 var(--font-display); background: color-mix(in oklab, var(--ink) 8%, transparent); color: var(--ink); transition: background 200ms var(--ease-out), color 200ms var(--ease-out); }
.lc-steps li span { margin-left: auto; font-size: .78rem; }
.lc-steps li.is-now { color: var(--ink); } .lc-steps li.is-now::before { background: var(--accent); color: var(--accent-ink); animation: ping-a 1.2s var(--ease-out) infinite; }
.lc-steps li.is-done::before { content: "✓"; background: #3fae68; color: #fff; }
@keyframes ping-a { 70% { box-shadow: 0 0 0 7px color-mix(in oklab, var(--accent) 0%, transparent); } 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 45%, transparent); } }
.lc-go { width: 100%; margin-top: 16px; }
.lc-note { margin: 10px 0 0; font-size: .82rem; }
.list-card .card-body > * { opacity: 0; transform: translateY(6px); transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out); }
.list-card.is-in .card-body > * { opacity: 1; transform: none; }
.list-card.is-in .lc-go::after { animation: sheen 900ms var(--ease-out) 500ms both; }
@media (prefers-reduced-motion: reduce) { .list-card .card-body > * { transform: none !important; } .lc-steps li.is-now::before, .mm-wait { animation: none; } }
/* phones: the art gives up some height so the actions sit inside the card without scrolling */
@media (max-width: 520px) { .mc-art { max-height: 37dvh; } .muse-card h2 { font-size: 1.75rem; } .mc-traits { margin: 12px 0 14px; } }
@media (max-width: 520px) and (max-height: 700px) { .mc-art { max-height: 30dvh; } }
@media (prefers-reduced-motion: reduce) {
  .muse-card .card-body > *, .mc-art img { transform: none !important; transition: opacity 200ms linear; }
  .muse-card.is-in .mc-go::after, .mc-go:hover::after { animation: none; }
  .mc-track i { transition: none; }
}
.traits li { font-size: .82rem; padding: 4px 10px; border-radius: 999px; background: color-mix(in oklab, var(--ink) 7%, transparent); }
.traits li b { font-weight: 500; color: var(--ink-soft); margin-right: 4px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; z-index: 60; padding: 12px 18px; border-radius: var(--radius); background: #141a33; color: #fff; font-family: var(--font-display); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .6); transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out); pointer-events: none; max-width: 90vw; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- phones: captions become bottom cards above the dock */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .act { height: 140vh; } .act-hero { height: 130vh; } .act-night { height: 260vh; } .act-close { height: 120vh; }
  .cine-stage { align-items: end; justify-items: stretch; padding: 0 12px calc(86px + env(safe-area-inset-bottom)); }
  .cap { width: auto; padding: 18px 18px; }
  .cap h2 { font-size: 1.55rem; }
  .cap--hero { width: auto; align-self: start; margin-top: 84px; }
  .cap--hero h1 { font-size: 2.3rem; }
  .cap--hero .lead { font-size: 1.02rem; }
  .live { justify-self: stretch; width: auto; margin-bottom: 0; padding: 14px 14px 8px; } .live h2 { font-size: 1rem; margin-bottom: 6px; } .live-list li:nth-child(n+3) { display: none; }
  /* the hero words on top, the live line at the bottom, a flexible gap between: they share no cell, so a short phone
     can squeeze the gap to nothing but never slide one over the other */
  .act-hero .cine-stage { grid-template-rows: auto minmax(0, 1fr) auto; align-items: start; }
  .act-hero .cine-stage > .cap--hero { grid-area: 1 / 1; }
  .act-hero .cine-stage > .live { grid-area: 3 / 1; margin-top: 10px; }
  .act-night .cine-stage > .cap { align-self: end; margin-top: 0; }
  .act-close .cine-stage > .cap { margin-bottom: 0; }
  .split { grid-template-columns: 1fr; gap: 8px; } .split li { grid-template-columns: 64px 1fr; align-items: center; } .split b { font-size: 1.5rem; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .faces button { width: 52px; height: 52px; }
  .line li { grid-template-columns: 36px 1fr; } .line .st { grid-column: 2; justify-self: start; }
  .flow { padding-inline: 10px; }
}
/* hero on short screens: sizes follow the height too, so the words, both buttons, the count and the live line fit */
@media (max-width: 760px) and (max-height: 780px) {
  .cap--hero { margin-top: 70px; }
  .cap--hero h1 { font-size: 2rem; }
  .cap--hero .lead { font-size: .95rem; margin-top: 10px; padding: 10px 12px; }
  .cap--hero .row { margin-top: 12px; }
  .cap--hero .note { margin-top: 10px; font-size: .9rem; }
  .live-list li:nth-child(n+2) { display: none; }
  .live .live-more { min-height: 36px; }
}
@media (max-width: 760px) and (max-height: 620px) {
  .cap--hero { margin-top: 64px; }
  .cap--hero h1 { font-size: 1.75rem; }
  .cap--hero .lead { font-size: .9rem; padding: 8px 10px; }
  .cap--hero .row .btn { min-height: 44px; }
  .cap--hero .note { font-size: .82rem; padding: 5px 10px; }
  .live { padding: 10px 12px 4px; }
}
@media (max-width: 400px) {
  .cap--hero .row { flex-wrap: nowrap; }
  .cap--hero .row .btn { flex: 1 1 0; padding: 0 10px; white-space: nowrap; }
}
/* landscape phones and short windows: the words start under the header and stay clear of the live line */
@media (min-width: 761px) and (max-height: 620px) {
  .cap--hero { align-self: start; margin-top: 88px; width: min(560px, 50vw); }
  .cap--hero h1 { font-size: clamp(1.8rem, 8vh, 2.8rem); }
  .cap--hero .lead { font-size: 1rem; margin-top: 10px; padding: 8px 12px; }
  .cap--hero .row { margin-top: 12px; }
  .cap--hero .note { margin-top: 10px; }
  .live { margin-bottom: 3vh; width: min(320px, 34vw); padding: 12px 14px 8px; } .live-list li:nth-child(n+2) { display: none; }
}
/* the smallest phones (320-370px): four dock links still fit on one line */
@media (max-width: 370px) {
  .dock { left: 8px; right: 8px; padding: 4px; gap: 2px; }
  .dock a { padding: 0 7px; font-size: .86rem; }
}
/* short landscape screens (phones on their side, small laptop windows): a slimmer header and captions that start
   under it, sized to fit the height instead of centring into it */
@media (min-width: 761px) and (max-height: 620px) {
  .top { padding-top: 8px; padding-bottom: 8px; } .dock { padding: 4px; } .dock a { min-height: 34px; }
  .mark, .clock { padding-top: 3px; padding-bottom: 3px; }
  .cine-stage > .cap:not(.cap--hero) { align-self: start; margin-top: 60px; padding: 16px 18px; }
  .act-night .cine-stage > .cap { margin-top: 60px; }
  .cap h2 { font-size: 1.4rem; margin-bottom: 6px; } .cap p { font-size: .95rem; line-height: 1.45; }
  .faces { margin-top: 10px; } .faces button { width: 44px; height: 44px; border-radius: 10px; }
  .split { margin: 10px 0 4px; } .split li { padding: 10px 12px; } .split b { font-size: 1.5rem; } .split span { font-size: .88rem; }
  .cap .note { font-size: .88rem; }
}
/* short phones: the payday split and the other captions keep clear of the header */
@media (max-width: 760px) and (max-height: 620px) {
  .cap { padding: 14px 14px; } .cap h2 { font-size: 1.35rem; margin-bottom: 6px; } .cap p { font-size: .92rem; line-height: 1.45; }
  .split { margin: 8px 0 4px; gap: 6px; } .split li { padding: 8px 10px; grid-template-columns: 54px 1fr; } .split b { font-size: 1.3rem; } .split span { font-size: .85rem; }
  .cap .note { font-size: .82rem; line-height: 1.4; }
  .faces { margin-top: 10px; } .faces button { width: 44px; height: 44px; }
}
/* tablets and narrow windows: the full header (mark word, clock, socials, five dock links) needs ~810px, so it tightens */
@media (min-width: 761px) and (max-width: 1100px) {
  .top { gap: 8px; padding: 12px 16px; } .mark span { display: none; } .mark { padding: 4px; }
  .dock a { padding: 0 10px; font-size: .95rem; }
}
/* big screens: everything is rem-sized, so a larger root keeps the hero and captions in proportion to the town */
@media (min-width: 1800px) and (min-height: 950px) {
  html { font-size: 112.5%; }
  :root { --cap-w: min(500px, 30vw); }
  .cap--hero { width: min(640px, 38vw); } .live { width: min(420px, 24vw); }
}
@media (min-width: 2300px) and (min-height: 1250px) {
  html { font-size: 137.5%; }
  :root { --cap-w: min(620px, 28vw); }
  .cap--hero { width: min(820px, 36vw); } .live { width: min(540px, 22vw); }
}
@media (prefers-reduced-motion: reduce) { html { transition: none; } }

/* ---------------- no JS: the story reads top to bottom over a poster of the town */
html:not(.cine-js) .cine-intro { display: none; }
html:not(.cine-js) .act { height: auto; }
html:not(.cine-js) .cine-stage { position: static; height: auto; min-height: 70vh; padding-block: 16vh; gap: 24px; align-content: center; }
html:not(.cine-js) .cine-stage > * { grid-area: auto; }
.poster { background-image: url(/assets/poster/sunrise.webp); }
@media (max-width: 760px) { .poster { background-image: url(/assets/poster/sunrise-m.webp); } }

/* Preserve conditional panels when their component layout uses grid/flex. */
[hidden]{display:none!important}
