/*
 * EXP-0053 class site. Follows the Spotify style reference Aaron chose:
 * black canvas, #121212 cards, #1f1f1f controls; white + #b3b3b3 text only;
 * one green (#1ed760) for the single primary action per screen and the "now playing" marker;
 * pills for buttons/tags, 6px cards with one drop shadow; type 11-16px, headings 24px.
 * Colour lives only in cover art (see Common.cover).
 */
:root {
  --void: #000;
  --obsidian: #121212;
  --graphite: #1f1f1f;
  --hover: #2a2a2a;
  --ash: #333;
  --steel: #767676;
  --cloud: #b3b3b3;
  --white: #fff;
  --green: #1ed760;
  --shadow: rgba(0, 0, 0, .5) 0 8px 24px 0;
  --font: Inter, "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; background: var(--void); color: var(--white); }
body { font: 400 14px/1.5 var(--font); overflow-x: clip; -webkit-font-smoothing: antialiased; }
a { color: var(--white); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.2; }
h1 { font-size: 24px; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: 24px; letter-spacing: -0.01em; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
.sub { color: var(--cloud); }
.cap { font-size: 12px; color: var(--cloud); }
.tiny { font-size: 11px; color: var(--cloud); }
b, strong { font-weight: 700; }

/* ---------- app shell: sidebar + main ---------- */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 8px; padding: 8px; min-height: 100vh; }
.side { position: sticky; top: 8px; align-self: start; height: calc(100vh - 16px); display: flex; flex-direction: column; gap: 8px; }
.side .box { background: var(--obsidian); border-radius: 8px; padding: 12px 8px; }
.side .box.grow { flex: 1; overflow: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 8px 12px 12px; }
.brand .logo { width: 40px; height: 40px; border-radius: 4px; flex: none; overflow: hidden; }
.brand b { display: block; font-size: 14px; line-height: 1.2; }
.brand span { font-size: 12px; color: var(--cloud); }
.nav a { display: flex; align-items: center; gap: 16px; padding: 8px 12px; border-radius: 4px; color: var(--cloud); font-weight: 700; font-size: 14px; }
.nav a:hover { color: var(--white); text-decoration: none; }
.nav a.on { color: var(--white); }
.nav svg { width: 22px; height: 22px; flex: none; }
.lib-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 12px 8px; color: var(--cloud); font-weight: 700; }
.lib a { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 6px; }
.lib a:hover { background: var(--graphite); text-decoration: none; }
.lib .thumb { width: 44px; height: 44px; border-radius: 4px; overflow: hidden; flex: none; }
.lib .t { font-size: 14px; color: var(--white); line-height: 1.3; }
.lib .s { font-size: 12px; color: var(--cloud); }
.lib a.on .t { color: var(--green); }

.main { background: var(--obsidian); border-radius: 8px; min-height: calc(100vh - 16px); overflow: clip; }
.main > .inner { padding: 24px clamp(16px, 3vw, 32px) 64px; }
.foot { padding: 32px clamp(16px, 3vw, 32px); border-top: 1px solid rgba(255,255,255,.07); color: var(--cloud); font-size: 12px; }

/* top strip for phones */
.topbar { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .side { display: none; }
  .main { border-radius: 0; }
  .topbar { display: flex; gap: 8px; align-items: center; padding: 12px 16px; background: var(--void); position: sticky; top: 0; z-index: 20; overflow-x: auto; }
  .topbar .logo { width: 32px; height: 32px; border-radius: 4px; overflow: hidden; flex: none; margin-right: 4px; }
  .topbar a.chip { flex: none; }
}

/* ---------- header band (playlist-style) ---------- */
.hero { display: flex; gap: 24px; align-items: flex-end; padding: 32px clamp(16px, 3vw, 32px) 24px; background: linear-gradient(180deg, var(--tint, #333) 0%, var(--obsidian) 100%); }
.hero .art { width: clamp(120px, 18vw, 192px); aspect-ratio: 1; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); flex: none; }
.hero .art svg { display: block; width: 100%; height: 100%; }
.hero .kind { font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.hero h1 { margin-bottom: 8px; }
.hero p { color: rgba(255,255,255,.7); max-width: 640px; margin: 0; }
@media (max-width: 600px) { .hero { flex-direction: column; align-items: flex-start; } }

/* ---------- pills: buttons, chips, tags ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 32px; border-radius: 9999px; border: 0; font: 700 14px/1 var(--font); cursor: pointer; text-decoration: none; transition: transform .1s; }
.btn:hover { transform: scale(1.03); text-decoration: none; }
.btn:active { transform: scale(1); }
.btn.go { background: var(--green); color: #000; }
.btn.white { background: var(--white); color: #000; }
.btn.ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); padding: 12px 20px; }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--white); }
.btn.block { width: 100%; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border-radius: 9999px; background: var(--graphite); color: var(--white); font-size: 14px; white-space: nowrap; }
.chip:hover { background: var(--hover); text-decoration: none; }
button.chip { border: 0; font: inherit; font-size: 14px; cursor: pointer; }
.track { min-width: 240px; }
.chip.x { width: 32px; padding: 0; justify-content: center; color: var(--cloud); }
.chip.x:hover { color: var(--white); }
.chip.on { background: var(--white); color: #000; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 9999px; background: var(--graphite); color: var(--cloud); font-size: 11px; font-weight: 600; white-space: nowrap; }

:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

/* ---------- rails + cards ---------- */
.rail-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 32px 0 12px; }
.rail-h:first-child { margin-top: 0; }
.rail-h a { color: var(--cloud); font-weight: 700; font-size: 14px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 180px); gap: 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.rail::-webkit-scrollbar { display: none; }
.tile { display: block; padding: 12px; border-radius: 6px; transition: background .2s; }
.tile:hover { background: var(--graphite); text-decoration: none; }
.tile .art { aspect-ratio: 1; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 12px; }
.tile .art svg { display: block; width: 100%; height: 100%; }
.tile .t { font-size: 16px; color: var(--white); line-height: 1.3; }
.tile .s { font-size: 14px; color: var(--cloud); line-height: 1.4; margin-top: 4px; }
.person { text-align: left; padding: 12px; border-radius: 6px; }
.person:hover { background: var(--graphite); }
.person .face { aspect-ratio: 1; border-radius: 9999px; overflow: hidden; margin-bottom: 12px; box-shadow: var(--shadow); }
.person .face svg { display: block; width: 100%; height: 100%; }
.person .t { font-size: 16px; }
.person .s { font-size: 14px; color: var(--cloud); }

.card { background: #181818; border-radius: 6px; padding: 16px; box-shadow: var(--shadow); }

/* ---------- simulator layout ---------- */
.sim { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 1180px) { .sim { grid-template-columns: 1fr; } }
.step { background: #181818; border-radius: 6px; padding: 16px; margin-bottom: 12px; border: 0; }
.step legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.step legend b { font-size: 16px; }
.step legend + * { clear: both; }
.f { margin-bottom: 12px; }
.f label, .f .l { display: block; font-size: 12px; font-weight: 600; color: var(--cloud); margin-bottom: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .three { grid-template-columns: 1fr; } }
input[type=text], input[type=number], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 4px; border: 1px solid var(--ash);
  background: var(--graphite); color: var(--white); font: 400 16px/1.2 var(--font);
}
input::placeholder { color: rgba(255,255,255,.4); }
input:hover, select:hover { border-color: var(--steel); }
input:focus, select:focus { outline: none; border-color: var(--white); }
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23b3b3b3' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.hint { font-size: 12px; color: var(--cloud); margin-top: 4px; }
/* switch-style checkboxes */
.sw { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 0; font-size: 14px; cursor: pointer; }
.sw input { appearance: none; width: 36px; height: 20px; border-radius: 9999px; background: var(--steel); position: relative; flex: none; cursor: pointer; margin: 0; transition: background .15s; }
.sw input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #000; transition: left .15s; }
.sw input:checked { background: var(--white); }
.sw input:checked::after { left: 19px; }
details summary { cursor: pointer; color: var(--cloud); font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.costs { font-size: 12px; color: var(--cloud); }
.costs b { display: block; color: var(--white); font-size: 14px; margin-bottom: 4px; }
.runbar { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(0deg, var(--obsidian) 70%, transparent); }

/* ---------- results ---------- */
.empty { padding: 48px 24px; text-align: center; color: var(--cloud); border-radius: 6px; background: #181818; }
.empty b { color: var(--white); display: block; font-size: 16px; margin-bottom: 4px; }
.ev { display: flex; gap: 20px; align-items: flex-end; margin-bottom: 20px; }
.ev .art { width: 152px; aspect-ratio: 1; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); flex: none; }
.ev .art svg { display: block; width: 100%; height: 100%; }
.ev .kind { font-size: 12px; font-weight: 600; }
.ev h2 { margin: 4px 0 8px; }
@media (max-width: 520px) { .ev { flex-direction: column; align-items: flex-start; } }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 24px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: #181818; border-radius: 6px; padding: 16px; }
.stat .k { font-size: 12px; font-weight: 600; color: var(--cloud); }
.stat .v { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin-top: 4px; white-space: nowrap; }
.stat .v small { font-size: 14px; color: var(--cloud); font-weight: 400; }
.stat .s { font-size: 12px; color: var(--cloud); margin-top: 4px; }
.bar { height: 4px; border-radius: 9999px; background: #4d4d4d; margin-top: 10px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--white); border-radius: 9999px; }

.sec { margin-top: 32px; }
.sec > h2, .sec > .rail-h { margin-bottom: 12px; }
.sec > .cap { margin: -4px 0 12px; }

/* tracklist-style tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 400; color: var(--cloud); padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.1); }
td { padding: 8px 12px; vertical-align: middle; color: var(--cloud); }
td.w { color: var(--white); }
tbody tr { border-radius: 4px; }
tbody tr:hover td { background: rgba(255,255,255,.07); }
tbody tr td:first-child { border-radius: 4px 0 0 4px; }
tbody tr td:last-child { border-radius: 0 4px 4px 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.idx { width: 40px; text-align: right; color: var(--cloud); font-variant-numeric: tabular-nums; }
tr.sum td { color: var(--white); font-weight: 700; }
tr.sum:hover td { background: none; }
.scroll { overflow-x: auto; }
.track { display: flex; gap: 12px; align-items: center; }
.track .thumb { width: 40px; height: 40px; border-radius: 4px; overflow: hidden; flex: none; }
.track .t { color: var(--white); }
.track .s { font-size: 12px; color: var(--cloud); }
.best { color: var(--white) !important; font-weight: 700; }
.playing { color: var(--green) !important; }

/* story list */
.story { list-style: none; margin: 0; padding: 0; }
.story li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 8px 0; color: var(--white); }
.story li span { color: var(--cloud); text-align: right; font-variant-numeric: tabular-nums; }

/* lessons */
.lessons { list-style: none; margin: 0; padding: 0; }
.lessons li { padding: 12px; border-radius: 6px; }
.lessons li:hover { background: rgba(255,255,255,.07); }
.lessons .tag { margin-bottom: 6px; }
.lessons p { margin: 0; color: var(--white); }

/* role cards */
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.role { padding: 12px; border-radius: 6px; }
.role:hover { background: var(--graphite); }
.role .face { width: 72px; height: 72px; border-radius: 9999px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 12px; }
.role .face svg { display: block; width: 100%; height: 100%; }
.role h3 { font-size: 16px; font-weight: 700; }
.role .who { font-size: 12px; color: var(--cloud); }
.role .goal { font-size: 12px; color: var(--cloud); margin: 4px 0 8px; }
.role .r { font-size: 14px; color: var(--white); }
.verdict { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--white); }
.verdict.no { color: var(--cloud); }

/* chart */
.fig { position: relative; height: 180px; }
.fig svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tip { position: absolute; pointer-events: none; background: var(--graphite); box-shadow: var(--shadow); padding: 6px 10px; border-radius: 4px; font-size: 12px; white-space: nowrap; display: none; z-index: 2; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--cloud); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--white); color: #000; font-weight: 600; padding: 10px 16px; border-radius: 6px; display: none; z-index: 30; box-shadow: var(--shadow); }

/* prose pages */
.prose { max-width: 720px; }
.prose h2 { margin: 32px 0 12px; }
.prose p, .prose li { color: var(--cloud); }
.prose li { margin-bottom: 8px; }
.prose li b, .prose p b { color: var(--white); }
.prose ul { padding-left: 20px; }
.prose h3 { margin: 20px 0 8px; }
code { background: var(--graphite); padding: 1px 6px; border-radius: 4px; font-size: 13px; color: var(--white); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .btn:hover { transform: none; } }
@media print {
  .side, .topbar, .step, .runbar, .btns, .foot { display: none !important; }
  body, .main { background: #fff; color: #000; }
  .app, .sim { display: block; }
}

/* ---------- course outline (home) ---------- */
.unit-h { display: flex; gap: 16px; align-items: center; margin: 40px 0 8px; }
.unit-h .art { width: 64px; height: 64px; border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); flex: none; }
.unit-h .art svg { display: block; width: 100%; height: 100%; }
.unit-h .kind { font-size: 12px; color: var(--cloud); font-weight: 600; }
.wk { border-radius: 6px; }
.wk[open] { background: #181818; }
.wk summary { list-style: none; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 6px; cursor: pointer; color: var(--white); font-size: 14px; margin: 0; font-weight: 400; }
.wk summary::-webkit-details-marker { display: none; }
.wk summary:hover { background: rgba(255,255,255,.07); }
.wk .n { color: var(--cloud); text-align: right; font-variant-numeric: tabular-nums; font-size: 16px; }
.wk .tt { font-size: 16px; color: var(--white); line-height: 1.3; }
.wk .dt { font-size: 14px; color: var(--cloud); }
.wk .chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.wk.now .n, .wk.now .tt { color: var(--green); }
.wk .body { padding: 4px 12px 16px 64px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.wk .body h4 { margin: 0 0 4px; font-size: 12px; font-weight: 700; color: var(--cloud); }
.wk .body p { margin: 0; font-size: 14px; color: var(--white); }
.wk .apps { grid-column: 1 / -1; display: flex; gap: 12px; flex-wrap: wrap; }
.mini { display: flex; gap: 12px; align-items: center; padding: 8px; padding-right: 16px; border-radius: 6px; background: var(--graphite); min-width: 0; }
.mini:hover { background: var(--hover); text-decoration: none; }
.mini .thumb { width: 48px; height: 48px; border-radius: 4px; overflow: hidden; flex: none; }
.mini .thumb svg { display: block; width: 100%; height: 100%; }
.mini .t { font-size: 14px; color: var(--white); }
.mini .s { font-size: 12px; color: var(--cloud); }
@media (max-width: 760px) {
  .wk summary { grid-template-columns: 28px minmax(0, 1fr); }
  .wk .chips { display: none; }
  .wk .body { grid-template-columns: 1fr; padding-left: 52px; }
}
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cloud); }
.status.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.status.building::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--white); }
.status.planned::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--steel); }
.upnext { display: grid; grid-template-columns: 152px minmax(0, 1fr); gap: 20px; align-items: center; background: #181818; border-radius: 6px; padding: 16px; box-shadow: var(--shadow); }
.upnext .art { aspect-ratio: 1; border-radius: 4px; overflow: hidden; }
.upnext .art svg { display: block; width: 100%; height: 100%; }
@media (max-width: 560px) { .upnext { grid-template-columns: 1fr; } .upnext .art { width: 120px; } }

/* ---------- apps page ---------- */
.applist { display: grid; gap: 12px; }
.app-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 16px; border-radius: 6px; background: #181818; scroll-margin-top: 80px; }
.app-row .art { aspect-ratio: 1; border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); }
.app-row .art svg { display: block; width: 100%; height: 100%; }
.app-row h3 { font-size: 16px; margin-bottom: 4px; }
.app-row .meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; font-size: 12px; color: var(--cloud); }
.app-row dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 14px; }
.app-row dt { color: var(--cloud); font-size: 12px; font-weight: 600; padding-top: 2px; }
.app-row dd { margin: 0; color: var(--white); }
@media (max-width: 600px) { .app-row { grid-template-columns: 1fr; } .app-row .art { width: 96px; } .app-row dl { grid-template-columns: 1fr; } }

/* ---------- season page ---------- */
.carry { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .carry { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.round { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 16px 12px; border-radius: 6px; }
.round:hover { background: rgba(255,255,255,.04); }
.round .n { color: var(--cloud); text-align: right; font-size: 16px; font-variant-numeric: tabular-nums; }
.round h3 { font-size: 16px; }
.round .dt { font-size: 12px; color: var(--cloud); margin-bottom: 8px; }
.round ul { margin: 6px 0 0; padding-left: 18px; color: var(--white); }
.round li { margin-bottom: 4px; }
.round .lab { font-size: 12px; color: var(--cloud); font-weight: 700; margin-top: 10px; }

/* account box in sidebar */
.lib-acct { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 6px; }
.lib-acct:hover { background: var(--graphite); text-decoration: none; }
.lib-acct .av, .av { width: 40px; height: 40px; border-radius: 9999px; background: #535353; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex: none; }
.lib-acct .t { font-size: 14px; color: var(--white); }
.lib-acct .s { font-size: 12px; color: var(--cloud); }
/* account page */
.acct { max-width: 520px; }
.acct .card { margin-bottom: 16px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--cloud); font-size: 12px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--ash); }
.btn.google { background: var(--white); color: #000; width: 100%; }
.btn.google svg { width: 18px; height: 18px; }
.grp { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 6px; }
.grp:hover { background: rgba(255,255,255,.07); }
.grp .t { color: var(--white); }
.grp .s { font-size: 12px; color: var(--cloud); }
.grp.mine .t { color: var(--green); }
.err { color: #fff; background: var(--graphite); box-shadow: inset 3px 0 0 #fff; border-radius: 4px; padding: 8px 12px; font-size: 14px; margin-top: 8px; display: none; }

/* ---------- landing (index) ---------- */
.tophead { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(16px, 3vw, 32px); background: rgba(18,18,18,.92); backdrop-filter: blur(8px); }
.tophead .l, .tophead .r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tophead .l { flex: 1; max-width: 480px; }
.iconbtn { width: 48px; height: 48px; border-radius: 9999px; background: var(--graphite); display: inline-flex; align-items: center; justify-content: center; color: var(--white); flex: none; }
.iconbtn:hover { background: var(--hover); transform: scale(1.04); }
.iconbtn svg { width: 22px; height: 22px; }
.search { position: relative; flex: 1; min-width: 0; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--cloud); pointer-events: none; }
.search input { width: 100%; height: 48px; border-radius: 9999px; border: 0; background: var(--graphite); padding: 0 16px 0 46px; font-size: 16px; color: var(--white); }
.search input:hover { background: var(--hover); box-shadow: inset 0 0 0 1px #535353; }
.search input:focus { box-shadow: inset 0 0 0 2px var(--white); outline: none; }
.tophead .links { display: flex; align-items: center; gap: 16px; padding-right: 8px; margin-right: 8px; border-right: 1px solid #fff; }
.tophead .links a { color: var(--cloud); font-weight: 700; font-size: 14px; white-space: nowrap; }
.tophead .links a:hover { color: var(--white); text-decoration: none; transform: scale(1.04); }
.tophead .txt { color: var(--cloud); font-weight: 700; font-size: 14px; padding: 8px 12px; white-space: nowrap; }
.tophead .txt:hover { color: var(--white); text-decoration: none; }
@media (max-width: 1100px) { .tophead .links { display: none; } }
@media (max-width: 860px) { .tophead { display: none; } }

.feature { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 24px; align-items: end; padding: 24px; border-radius: 8px; background: linear-gradient(135deg, var(--tint, #7a0b33) 0%, #181818 75%); box-shadow: var(--shadow); color: inherit; }
.feature:hover { text-decoration: none; }
.feature .art { aspect-ratio: 1; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); }
.feature .art svg { display: block; width: 100%; height: 100%; }
.feature .kind { font-size: 12px; font-weight: 600; }
.feature h2 { margin: 8px 0; }
.feature p { color: rgba(255,255,255,.75); margin: 0 0 16px; max-width: 620px; }
@media (max-width: 640px) { .feature { grid-template-columns: 1fr; } .feature .art { width: 160px; } }

.tile .art { position: relative; }
.play { position: absolute; right: 8px; bottom: 8px; width: 48px; height: 48px; border-radius: 9999px; background: var(--green); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 8px rgba(0,0,0,.3); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.play svg { width: 20px; height: 20px; }
.tile:hover .play, .tile:focus-visible .play { opacity: 1; transform: none; }
.tile .art.circle { border-radius: 9999px; }

.prompt { background: var(--graphite); border-radius: 8px; padding: 16px 20px; margin: 8px 0 16px; }
.prompt b { display: block; font-size: 16px; margin-bottom: 4px; }
.prompt span { display: block; font-size: 14px; color: var(--white); margin-bottom: 16px; }
.prompt .btn { min-height: 32px; padding: 6px 16px; font-size: 14px; }

.banner { position: sticky; bottom: 0; z-index: 14; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: linear-gradient(90deg, #af2896, #509bf5); }
.banner b { display: block; font-size: 14px; }
.banner span { font-size: 14px; color: rgba(255,255,255,.85); }
.banner .btn { flex: none; }
@media (max-width: 560px) { .banner { padding: 10px 16px; } .banner span { display: none; } }

.footlinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; padding: 40px clamp(16px, 3vw, 32px) 16px; border-top: 1px solid rgba(255,255,255,.07); margin-top: 40px; }
.footlinks h4 { margin: 0 0 8px; font-size: 16px; }
.footlinks a { display: block; color: var(--cloud); font-size: 16px; padding: 4px 0; }
.footlinks a:hover { color: var(--white); text-decoration: underline; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }

.stat.wide { grid-column: span 2; }
.fin { display: flex; gap: 24px; margin-top: 10px; }
.fin span { display: block; font-size: 12px; color: var(--cloud); }
.fin b { font-size: 16px; }
@media (max-width: 640px) { .stat.wide { grid-column: 1 / -1; } }

/* ---------- Run the night (Residency Ch. 3): personas, shared plan, live night ---------- */
.crew { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; padding-bottom: 4px; }
.crew::-webkit-scrollbar { display: none; }
.mate { display: flex; gap: 10px; align-items: center; flex: none; padding: 8px 14px 8px 8px; border-radius: 9999px; background: #181818; border: 0; color: var(--white); text-align: left; font: inherit; cursor: default; }
button.mate { cursor: pointer; }
button.mate:hover { background: var(--graphite); }
.mate.me { background: var(--white); color: #000; }
.mate.me .s { color: #333; }
.mate .face { width: 36px; height: 36px; border-radius: 9999px; overflow: hidden; flex: none; }
.mate .face svg { display: block; width: 100%; height: 100%; }
.mate .t { font-size: 14px; font-weight: 700; }
.mate .s { font-size: 11px; color: var(--cloud); }
.persona .ph { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.persona .ph .face { width: 72px; height: 72px; border-radius: 9999px; overflow: hidden; flex: none; box-shadow: var(--shadow); }
.persona .ph .face svg { display: block; width: 100%; height: 100%; }
.persona .ph .kind { font-size: 12px; font-weight: 600; color: var(--cloud); }
.persona .ph h2 { margin: 2px 0; }
.persona form { display: flex; flex-wrap: wrap; column-gap: 12px; }
.persona form > * { flex: 1 1 100%; }
.persona form > .f.half { flex: 1 1 calc(50% - 6px); min-width: 0; }
.persona form > .hint { margin: -4px 0 8px; }
.no-group { margin: 8px 0 8px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.no-group b { display: block; font-size: 14px; }
.no-note { font-size: 12px; color: var(--cloud); margin: 4px 0 12px; }
.numwrap { position: relative; }
.numwrap.money::before { content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--cloud); font-size: 14px; pointer-events: none; }
.numwrap.money input { padding-left: 24px; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pk { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px; border-radius: 6px; background: var(--graphite); border: 0; color: var(--white); font: inherit; cursor: pointer; }
.pk:hover { background: var(--hover); }
.pk b { font-size: 14px; }
.pk span { font-size: 12px; color: var(--cloud); line-height: 1.4; }
.pk.on { background: var(--white); color: #000; }
.pk.on span { color: #333; }
.pk:disabled { cursor: default; opacity: .7; }
.pk.on:disabled { opacity: 1; }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 8px; }
.dj { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px; border-radius: 6px; background: var(--graphite); border: 0; color: var(--white); font: inherit; cursor: pointer; }
.dj:hover { background: var(--hover); }
.dj .nm { font-weight: 700; font-size: 14px; }
.dj .g, .dj .note { font-size: 12px; color: var(--cloud); }
.dj .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; font-size: 11px; color: var(--cloud); margin: 4px 0; }
.dj .kv b { color: var(--white); font-weight: 600; }
.dj.on { background: var(--white); color: #000; }
.dj.on .g, .dj.on .note, .dj.on .kv, .dj.on .tiny { color: #333; }
.dj.on .kv b { color: #000; }
.dj:disabled { cursor: default; }
.plan { position: sticky; top: 16px; }
.plan .ev .art { width: 96px; }
.plan .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 12px 0 16px; }
.plan .stat .v { font-size: 20px; }
.plan table td { padding: 6px 4px; font-size: 13px; vertical-align: top; }
.costs-d { margin-top: 12px; }
.costs-d summary { cursor: pointer; }
.linkish { background: none; border: 0; padding: 0; color: var(--white); font: inherit; text-decoration: underline; cursor: pointer; }
.role.me { background: var(--graphite); }
.live { max-width: 760px; }
.live .story li { animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.call { margin-top: 16px; padding: 20px; border-radius: 8px; background: #181818; box-shadow: var(--shadow); }
.call .kind { font-size: 12px; font-weight: 600; color: var(--cloud); }
.call h3 { font-size: 20px; margin: 4px 0 12px; }
.call .opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.gate { display: flex; gap: 24px; justify-content: space-between; align-items: center; padding: 20px; border-radius: 8px; background: #181818; }
.gate h2 { margin-bottom: 4px; }
@media (max-width: 900px) {
  .plan { position: static; }
  .plan .stats { grid-template-columns: 1fr 1fr; }
  .gate { flex-direction: column; align-items: flex-start; }
}

/* ---------- class perks ---------- */
.perks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.perk { background: #181818; border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.perk .art { aspect-ratio: 2 / 1; overflow: hidden; }
.perk .art svg { display: block; width: 100%; height: auto; margin-top: -25%; }
.perk .body { padding: 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.perk .kind { font-size: 12px; font-weight: 600; color: var(--cloud); }
.perk h3 { font-size: 18px; }
.perk .btn { align-self: flex-start; }
.pass-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 50; padding: 16px; }
.pass { width: min(380px, 100%); background: #181818; border-radius: 12px; padding: 24px; text-align: center; box-shadow: var(--shadow); }
.pass .art { width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 9999px; overflow: hidden; }
.pass .art svg { display: block; width: 100%; height: 100%; animation: spin 6s linear infinite; }
.pass h2 { font-size: 28px; margin: 6px 0 4px; }
.pass .kind { font-size: 12px; color: var(--cloud); font-weight: 600; }
.live-bar { height: 6px; border-radius: 9999px; background: #4d4d4d; overflow: hidden; margin: 20px 0 8px; }
.live-bar i { display: block; height: 100%; width: 30%; background: var(--white); border-radius: 9999px; animation: slide 1.6s ease-in-out infinite alternate; }
.pass .clock { font-variant-numeric: tabular-nums; font-weight: 700; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(233%); } }
@media (prefers-reduced-motion: reduce) { .pass .art svg, .live-bar i { animation: none; } }
.send { margin-bottom: 16px; }
.send-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.send h3 { font-size: 18px; margin: 2px 0; }
.send .kind { font-size: 12px; font-weight: 600; color: var(--cloud); }
.send textarea { font: 400 14px/1.5 var(--font); resize: vertical; }
