@font-face { font-family: "SpaceGrotesk"; src: url("assets/fonts/SpaceGrotesk-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "SpaceGrotesk"; src: url("assets/fonts/SpaceGrotesk-SemiBold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "IBMPlexSans"; src: url("assets/fonts/IBMPlexSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBMPlexSans"; src: url("assets/fonts/IBMPlexSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBMPlexSans"; src: url("assets/fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  --deepest: #111317; --asphalt: #171A1F; --secondary: #1D2127; --graphite: #22262D; --active: #272B31; --slate: #2C313A;
  --card-border: #343A43; --road: #3A4049; --strong: #454C56;
  --amber: #F2A93B; --amber-pressed: #D99532; --amber-hi: #FFD078;
  --teal: #43B7A8; --terracotta: #D76A5B; --dust: #788DA5; --violet: #8D7CC4;
  --white: #F3F1EC; --mist: #A8ADB5; --nlr: #70747B;
  --notes-bg: #1C2026; --notes-card: #252A31;
  --input-bg: #20242A; --input-border: #373D46; --placeholder: #777D86;
  --nav-bg: #191C21; --nav-inactive: #727882;
  --display: "SpaceGrotesk", "Segoe UI", system-ui, sans-serif;
  --body: "IBMPlexSans", "Segoe UI", system-ui, sans-serif;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--deepest); }
body { font-family: var(--body); font-size: 14px; line-height: 1.45; color: var(--white); overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

#app { position: relative; height: 100%; max-width: 560px; margin: 0 auto; background: var(--asphalt); overflow: hidden; box-shadow: 0 0 0 1px #1d2026; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--asphalt); }
.screen.notes { background: var(--notes-bg); }
.screen.enter { animation: enter .22s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* App bar */
.appbar { flex: none; display: flex; align-items: center; gap: 4px; min-height: calc(64px + var(--sat)); padding: var(--sat) 8px 0 16px; border-bottom: 1px solid var(--road); background: inherit; }
.appbar.has-back { padding-left: 4px; }
.appbar h1 { flex: 1; min-width: 0; margin: 0; font: 600 21px/1.25 var(--display); letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.appbar.has-back h1 { padding-left: 4px; }
.iconbtn { position: relative; flex: none; width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--mist); transition: background .15s; }
.iconbtn:hover { background: rgba(242,169,59,.08); }
.iconbtn:active { background: rgba(242,169,59,.14); }
.iconbtn.white { color: var(--white); }
.iconbtn .dot { position: absolute; right: 11px; top: 11px; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); border: 1.5px solid var(--asphalt); }
.ic { fill: currentColor; flex: none; display: block; }

.content { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pad { padding: 16px 16px 32px; }
.pad-fab { padding-bottom: 104px; }
.stack > * + * { margin-top: 8px; }

/* Bottom navigation */
.navbar { flex: none; display: flex; height: calc(68px + var(--sab)); padding-bottom: var(--sab); background: var(--nav-bg); }
.navbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--nav-inactive); font-size: 12.5px; font-weight: 500; letter-spacing: .2px; }
.navbar .npill { width: 64px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: background .2s; }
.navbar .sel { color: var(--white); }
.navbar .sel .npill { background: rgba(242,169,59,.14); color: var(--amber); }
.navbar span.l { color: var(--mist); }
.navbar .sel span.l { color: var(--white); }

/* FAB */
.fab { position: absolute; right: 16px; bottom: calc(68px + 16px + var(--sab)); z-index: 5; min-width: 56px; height: 56px; padding: 0 16px; border-radius: 16px; background: var(--amber); color: var(--asphalt); display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 14.5px; letter-spacing: .1px; box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: background .15s, transform .15s; }
.fab:active { background: var(--amber-pressed); transform: scale(.97); }
.fab.ext { padding: 0 20px 0 16px; }
.screen.pushed .fab { bottom: calc(16px + var(--sab)); }

/* Typography */
.t-display { font: 500 46px/1.1 var(--display); letter-spacing: -1.2px; }
.t-hl { font: 500 32px/1.15 var(--display); letter-spacing: -.8px; }
.t-hm { font: 600 28px/1.2 var(--display); letter-spacing: -.6px; }
.t-hs { font: 600 24px/1.25 var(--display); letter-spacing: -.4px; }
.t-tl { font: 600 21px/1.25 var(--display); letter-spacing: -.3px; }
.t-t18 { font: 600 18px/1.25 var(--display); letter-spacing: -.3px; }
.t-tm { font: 600 16px/1.3 var(--body); }
.t-ts { font: 600 14px/1.35 var(--body); }
.t-bl { font: 400 16px/1.45 var(--body); }
.t-bm { font: 400 14px/1.45 var(--body); }
.t-bs { font: 400 12.5px/1.4 var(--body); }
.t-lm { font: 500 12.5px/1.35 var(--body); letter-spacing: .2px; }
.t-ls { font: 500 11.5px/1.35 var(--body); letter-spacing: .4px; }
.t-num { font-family: var(--display); font-weight: 600; font-size: 14.5px; }
.mist { color: var(--mist); }
.amber { color: var(--amber); }
.white { color: var(--white); }
.italic { font-style: italic; }
.b { font-weight: 600; }
.center { text-align: center; }
.clamp1, .clamp2, .clamp3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.clamp1 { -webkit-line-clamp: 1; } .clamp2 { -webkit-line-clamp: 2; } .clamp3 { -webkit-line-clamp: 3; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.caption { font: 500 12.5px/1.35 var(--body); letter-spacing: .6px; color: var(--mist); }
.kicker { font: 500 11.5px/1.35 var(--body); letter-spacing: 1.2px; color: var(--mist); }
.row { display: flex; align-items: center; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.wrap { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: center; }
.wrap.tight { gap: 6px 8px; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; } .gap14 { gap: 14px; }
.mt2 { margin-top: 2px; } .mt4 { margin-top: 4px; } .mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; } .mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; } .mt28 { margin-top: 28px; } .mt32 { margin-top: 32px; }
.fade-in { animation: fadeIn .25s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Cards */
.card { position: relative; display: block; width: 100%; text-align: left; background: var(--bg, var(--graphite)); border: 1px solid var(--bd, var(--card-border)); border-radius: 12px; padding: 16px; overflow: hidden; box-shadow: inset var(--aw, 3px) 0 0 var(--accent, transparent); }
.card[data-act] { cursor: pointer; transition: transform .15s ease-out, background .15s, border-color .15s; }
.card[data-act]:active { transform: scale(.98); background: var(--pbg, var(--bg, var(--graphite))); border-color: var(--pbd, var(--bd, var(--card-border))); box-shadow: inset var(--aw, 3px) 0 0 var(--paccent, var(--accent, transparent)); }
.card[data-act]:hover { border-color: var(--pbd, var(--bd, var(--card-border))); }
.panel { background: var(--slate); border-radius: 12px; padding: 18px; }

.section-title { display: flex; align-items: center; margin-bottom: 12px; }
.section-title .seg { width: 14px; height: 2px; background: var(--road); }
.section-title .node { width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; }
.section-title h2 { flex: 1; margin: 0; font: 600 18px/1.25 var(--display); letter-spacing: -.3px; }
.mini-title { display: flex; align-items: center; gap: 8px; margin: 24px 0 8px; }
.mini-title .node { width: 6px; height: 6px; border-radius: 50%; }

/* Pills and chips */
.pill { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 10px; border-radius: 999px; font: 500 12px/1.3 var(--body); letter-spacing: .4px; color: var(--asphalt); white-space: nowrap; }
.pill > span { overflow: hidden; text-overflow: ellipsis; }
.pill.outlined { background: transparent !important; color: var(--mist); border: 1px solid var(--c); padding: 3px 9px; }
.reason { display: inline-flex; padding: 3px 9px; border: 1px solid var(--strong); border-radius: 999px; font: 500 12px/1.3 var(--body); letter-spacing: .4px; color: var(--mist); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip { min-height: 48px; display: inline-flex; align-items: center; }
.chip > span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--strong); color: var(--mist); font: 600 12.5px/1.25 var(--body); letter-spacing: .2px; transition: background .15s, border-color .15s, color .15s; text-align: left; }
.chip:hover > span { background: rgba(242,169,59,.08); }
.chip.sel > span { background: var(--fill, var(--amber)); border-color: var(--fill, var(--amber)); color: var(--asphalt); }
.chip .cdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chip .ic { margin-right: -2px; }
.chiprow { display: flex; gap: 8px; overflow-x: auto; padding: 6px 16px; flex: none; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }
.chiprow .chip { flex: none; }
.achip { flex: none; min-height: 48px; display: inline-flex; align-items: center; }
.achip > span { display: inline-flex; align-items: center; gap: 4px; padding: 7px 8px 7px 12px; border-radius: 999px; background: var(--amber); color: var(--asphalt); font: 600 12.5px/1.25 var(--body); white-space: nowrap; }

/* Segmented */
.segmented { display: flex; width: 100%; min-height: 44px; border: 1px solid var(--strong); border-radius: 22px; overflow: hidden; margin: 2px 0; }
.segmented.inline { width: auto; display: inline-flex; }
.segmented button { flex: 1; min-width: 64px; padding: 0 14px; color: var(--mist); font: 500 12.5px/1.2 var(--body); letter-spacing: .2px; transition: background .15s; }
.segmented button + button { border-left: 1px solid var(--strong); }
.segmented button.sel { background: var(--amber); color: var(--asphalt); }
.segmented button:not(.sel):hover { background: rgba(242,169,59,.08); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 12px; font: 600 14.5px/1.2 var(--body); letter-spacing: .1px; transition: background .15s, transform .1s; text-align: center; }
.btn.block { display: flex; width: 100%; }
.btn-fill { background: var(--amber); color: var(--asphalt); }
.btn-fill:active { background: var(--amber-pressed); }
.btn-fill:disabled { background: rgba(242,169,59,.38); color: rgba(23,26,31,.6); }
.btn-out { min-height: 48px; background: var(--slate); color: var(--white); border: 1px solid var(--strong); }
.btn-out:hover { background: #333944; }
.btn-out:disabled { opacity: .45; }
.btn-out.tall { min-height: 52px; }
.btn-out.stadium { border-radius: 999px; padding: 0 16px; }
.btn-out.small { padding: 0 14px; }
.btn-text { min-height: 48px; padding: 0 12px; color: var(--amber); border-radius: 12px; font: 600 14.5px/1.2 var(--body); display: inline-flex; align-items: center; gap: 8px; }
.btn-text:hover { background: rgba(242,169,59,.08); }
.btn-text.mist { color: var(--mist); }
.btn-text.danger { color: var(--terracotta); }
.btn-text.small { padding: 0 4px; }

/* Bars */
.bar { height: var(--h, 4px); border-radius: var(--h, 4px); background: var(--road); overflow: hidden; }
.bar > i { display: block; height: 100%; width: var(--w); background: var(--c); transform-origin: left; animation: grow .3s ease-out; }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }
.barrow { padding: 6px 0; }
.pbar { height: var(--h, 8px); border-radius: var(--h, 8px); background: var(--road); overflow: hidden; }
.pbar > div { display: flex; height: 100%; transform-origin: left; animation: grow .3s ease-out; }
.pbar > div > i { display: block; height: 100%; margin-right: 2px; }

.stat { background: var(--sbg, var(--secondary)); border: 1px solid var(--card-border); border-radius: 10px; padding: 14px; min-width: 0; }
.stat.compact { padding: 10px; }
.stat .v { font: 500 28px/1.2 var(--display); letter-spacing: -.6px; white-space: nowrap; }
.stat .cap { font-size: 12.5px; color: var(--mist); margin-left: 6px; font-family: var(--body); letter-spacing: 0; }
.stat .lbl { margin-top: 2px; font: 500 12.5px/1.3 var(--body); letter-spacing: .2px; color: var(--mist); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.tiles4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tiles4 .stat .v { font-size: clamp(20px, 6vw, 28px); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid2 .stat { min-height: 92px; display: flex; flex-direction: column; justify-content: center; }

.summary { position: relative; }
.summary > svg.map { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.summary > .inner { position: relative; }

/* Forms */
.flabel { font: 600 14px/1.35 var(--body); color: var(--white); margin-bottom: 8px; }
.input { display: block; width: 100%; min-height: 52px; padding: 14px; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 10px; color: var(--white); font: 400 16px/1.45 var(--body); outline: none; resize: none; transition: border-color .15s; }
.input::placeholder { color: var(--placeholder); }
.input:focus { border-color: var(--amber); box-shadow: inset 0 0 0 .5px var(--amber); }
.input.err, .datefield.err { border-color: var(--terracotta); box-shadow: inset 0 0 0 .5px var(--terracotta); }
textarea.input { overflow-y: auto; }
.search { position: relative; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mist); pointer-events: none; }
.search .input { padding-left: 48px; font-size: 14px; }
.fmeta { display: flex; gap: 12px; padding: 6px 12px 0 14px; font: 400 12.5px/1.4 var(--body); }
.fmeta .msg { flex: 1; color: var(--mist); }
.fmeta .msg.e { color: var(--terracotta); }
.fmeta .count { color: var(--mist); font-size: 11.5px; letter-spacing: .4px; }
.field-error { padding: 6px 0 0 4px; font: 400 12.5px/1.4 var(--body); color: var(--terracotta); }
.datefield { position: relative; display: flex; align-items: center; min-height: 52px; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 10px; }
.datefield .datebtn { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 50px; padding-left: 14px; text-align: left; font: 400 16px/1.45 var(--body); color: var(--white); }
.datefield .datebtn .ic { color: var(--mist); }
.datefield .ph { color: var(--placeholder); }
.datefield .iconbtn { z-index: 2; }
.dateinput { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
@media (pointer: coarse) { .dateinput.cover { width: calc(100% - var(--rx, 0px)); height: 100%; pointer-events: auto; -webkit-appearance: none; appearance: none; } }
.datefield .spacer { width: 14px; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select-wrap .ic { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--mist); pointer-events: none; }
.check { display: flex; align-items: center; gap: 14px; min-height: 52px; width: 100%; text-align: left; font: 400 16px/1.45 var(--body); }
.check .box { flex: none; width: 18px; height: 18px; margin: 0 3px; border-radius: 2px; border: 1.5px solid var(--strong); display: grid; place-items: center; color: var(--asphalt); }
.check.on .box { background: var(--amber); border-color: var(--amber); }
.check:not(.on) .box .ic { visibility: hidden; }

.draft { background: var(--slate); border-radius: 12px; padding: 10px 6px 4px 14px; box-shadow: inset 3px 0 0 var(--amber); margin-bottom: 16px; }

.fsec { position: relative; display: flex; gap: 12px; padding-bottom: 28px; }
.fsec.last { padding-bottom: 8px; }
.fsec:not(.last)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--road); }
.fsec .num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--asphalt); border: 1.5px solid var(--amber); color: var(--amber); display: grid; place-items: center; font: 600 14.5px/1 var(--display); }
.fsec .body { flex: 1; min-width: 0; padding-top: 2px; }
.delaybox { margin-top: 12px; padding: 14px; background: var(--secondary); border: 1px solid var(--card-border); border-radius: 12px; }
.linkchip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin: 4px 0; padding: 4px 4px 4px 10px; background: var(--slate); border: 1px solid var(--strong); border-radius: 8px; font: 500 12.5px/1.3 var(--body); }
.linkchip .t { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkchip button { width: 28px; height: 28px; display: grid; place-items: center; color: var(--mist); border-radius: 50%; }
.cdot10 { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

/* Route rows (Turns journal) */
.rrow { position: relative; padding-left: 28px; }
.rrow::before { content: ""; position: absolute; left: 9px; width: 2px; top: 0; bottom: 0; background: var(--road); }
.rrow.first::before { top: var(--nt); }
.rrow.last::before { bottom: auto; height: var(--nt); }
.rrow.first.last::before { display: none; }
.rrow .rnode { position: absolute; left: 0; top: calc(var(--nt) - 9px); width: 20px; height: 20px; display: grid; place-items: center; }
.rdot { width: 10px; height: 10px; border-radius: 50%; background: var(--dust); border: 2px solid var(--asphalt); box-sizing: content-box; }
.rfork { width: 20px; height: 20px; border-radius: 50%; background: var(--asphalt); border: 1.5px solid var(--amber); display: grid; place-items: center; color: var(--amber); }
.rhead { padding: 12px 0 10px; font: 600 14.5px/1.3 var(--body); color: var(--mist); }

/* Timeline */
.tl-node { display: flex; gap: 10px; animation: tlIn .2s ease-out both; }
@keyframes tlIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tl-rail { position: relative; flex: none; width: 28px; display: flex; justify-content: center; }
.tl-rail::before { content: ""; position: absolute; left: 13px; width: 2px; top: 0; bottom: 0; background: var(--road); }
.tl-node.first .tl-rail::before { top: 8px; }
.tl-node.last .tl-rail::before { bottom: auto; height: 8px; }
.tl-dot { position: relative; margin-top: 3px; width: 10px; height: 10px; border-radius: 50%; display: grid; place-items: center; color: var(--asphalt); }
.tl-dot.big { width: 18px; height: 18px; }
.tl-dot.hollow { background: var(--asphalt) !important; border: 2px solid var(--c); }
.tl-body { flex: 1; min-width: 0; padding-bottom: 18px; }
.tl-node.last .tl-body { padding-bottom: 4px; }

/* Empty state */
.empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 32px; }
.empty .eicon { width: 72px; height: 72px; border-radius: 50%; background: var(--graphite); border: 1px solid var(--card-border); display: grid; place-items: center; color: var(--dust); }
.empty .eimg { width: 120px; height: 120px; }
.empty .btn { min-width: 200px; }

/* Onboarding */
.onb { flex: 1; display: flex; flex-direction: column; min-height: 0; padding-top: var(--sat); }
.onb-head { display: flex; align-items: center; gap: 8px; padding: 12px 8px 0 20px; min-height: 60px; }
.pages { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; min-height: 0; }
.pages::-webkit-scrollbar { display: none; }
.page { flex: 0 0 100%; scroll-snap-align: start; overflow-y: auto; padding: 0 24px; display: flex; flex-direction: column; justify-content: center; }
.page .halo { align-self: center; width: 220px; height: 220px; flex: none; border-radius: 50%; padding: 28px; background: radial-gradient(circle, var(--slate) 0%, rgba(23,26,31,0) 70%); }
.dots { display: flex; justify-content: center; gap: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--road); transition: width .2s, background .2s; }
.dots i.on { width: 22px; background: var(--amber); }
.onb-foot { padding: 8px 24px calc(16px + var(--sab)); display: flex; flex-direction: column; }

.pinned { flex: none; padding: 12px 16px; border-top: 1px solid var(--road); background: var(--asphalt); }

/* Article */
.hero { position: relative; height: 280px; margin-top: calc(-64px - var(--sat)); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--sat) + 72px); background: linear-gradient(rgba(23,26,31,.82), rgba(23,26,31,0)); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(23,26,31,0) 55%, var(--asphalt)); }
.artbar { position: sticky; top: 0; z-index: 3; height: calc(64px + var(--sat)); padding: calc(var(--sat) + 8px) 4px 0; transition: background .2s, border-color .2s; border-bottom: 1px solid transparent; display: flex; align-items: center; gap: 8px; }
.artbar.solid { background: var(--asphalt); border-color: var(--road); }
.artbar .back { width: 40px; height: 40px; margin: 0 4px 8px; border-radius: 50%; display: grid; place-items: center; background: rgba(23,26,31,.7); color: var(--white); }
.artbar .ttl { opacity: 0; transition: opacity .2s; font: 600 18px/1.25 var(--display); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artbar.solid .ttl { opacity: 1; }
.cover16 { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; }
.thumb { flex: none; border-radius: 8px; object-fit: cover; }

/* Games */
.wheel-wrap { position: relative; width: 300px; height: 320px; margin: 0 auto; }
.wheel { position: absolute; left: 5px; top: 20px; width: 290px; height: 290px; will-change: transform; }
.pointer { position: absolute; left: 136px; top: 0; z-index: 2; }
.hub { position: absolute; left: 120px; top: 135px; z-index: 2; width: 60px; height: 60px; border-radius: 50%; background: var(--amber); border: 4px solid var(--asphalt); display: grid; place-items: center; color: var(--asphalt); box-sizing: content-box; margin: -4px; }
.hub:active { background: var(--amber-pressed); }
.slots { background: var(--graphite); border: 1.5px solid var(--strong); border-radius: 20px; padding: 18px 14px; transition: border-color .3s; }
.slots.aligned { border-color: var(--amber); }
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.reel { height: 112px; background: var(--deepest); border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.reel img { width: 76px; height: 76px; object-fit: contain; }
.reel img.spin { opacity: .7; animation: reelIn 70ms linear; }
.reel img.stop { animation: reelIn .22s ease-out; }
@keyframes reelIn { from { transform: translateY(-60%); opacity: 0; } to { transform: none; } }
.pairs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; perspective: 800px; }
.pcard { aspect-ratio: 1; border-radius: 12px; background: var(--graphite); border: 1px solid var(--card-border); display: grid; place-items: center; color: var(--road); }
.pcard.up { background: var(--slate); }
.pcard.matched { border: 1.5px solid var(--teal); }
.pcard img { width: 70%; height: 70%; object-fit: contain; }
.pcard.flip { animation: flip .22s ease-out; }
@keyframes flip { from { transform: rotateY(90deg); } to { transform: none; } }
.dcard { aspect-ratio: .66; border-radius: 14px; background: var(--graphite); border: 1px solid var(--strong); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; transition: opacity .25s; }
.dcard.up { background: var(--amber); border-color: var(--amber); color: var(--asphalt); animation: flip .3s ease-out; }
.dcard.dim { opacity: .4; }

/* Overlays */
.ov { position: fixed; inset: 0; z-index: 50; display: flex; background: rgba(0,0,0,.55); animation: fadeIn .15s ease-out; }
.ov.closing { animation: fadeOut .15s ease-in forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.sheet-ov { align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; background: var(--slate); border-radius: 20px 20px 0 0; display: flex; flex-direction: column; padding-bottom: var(--sab); animation: sheetUp .25s cubic-bezier(.2,.8,.2,1); }
.ov.closing .sheet { animation: sheetDown .15s ease-in forwards; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { to { transform: translateY(100%); } }
.sheet .handle { flex: none; width: 32px; height: 4px; border-radius: 2px; background: var(--strong); margin: 22px auto 22px; }
.sheet .sbody { overflow-y: auto; padding: 0 20px 20px; }
.sheet.fixed { height: 72vh; height: 72dvh; }
.sheet.fixed .sbody { flex: 1; display: flex; flex-direction: column; padding: 0; min-height: 0; overflow: hidden; }
.sheet .slist { flex: 1; overflow-y: auto; min-height: 0; }
.tile { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 56px; padding: 8px 20px; text-align: left; }
.tile:hover { background: rgba(242,169,59,.06); }
.dialog-ov { align-items: center; justify-content: center; padding: 24px; }
.dialog { width: 100%; max-width: 360px; background: var(--slate); border-radius: 20px; padding: 24px 24px 12px; animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.dialog h3 { margin: 0 0 14px; font: 600 21px/1.25 var(--display); letter-spacing: -.3px; }
.dialog p { margin: 0; color: var(--mist); }
.dialog .acts { display: flex; justify-content: flex-end; gap: 4px; margin-top: 20px; flex-wrap: wrap; }
.menu-ov { background: transparent; animation: none; }
.menu { position: fixed; min-width: 200px; max-width: 280px; background: var(--slate); border: 1px solid var(--strong); border-radius: 12px; padding: 6px 0; animation: pop .12s ease-out; transform-origin: top right; }
.menu button { display: block; width: 100%; min-height: 48px; padding: 0 16px; text-align: left; font-size: 14px; }
.menu button:hover { background: rgba(242,169,59,.08); }
.menu button.danger { color: var(--terracotta); }
.snack { position: fixed; left: 50%; transform: translateX(-50%); z-index: 60; width: calc(100% - 24px); max-width: 536px; padding: 14px 16px; background: var(--slate); border: 1px solid var(--strong); border-radius: 12px; color: var(--white); font-size: 14px; animation: snackIn .2s ease-out; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
@keyframes snackIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (min-width: 561px) { #app { border-left: 1px solid #23272d; border-right: 1px solid #23272d; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; } }
.tiles4 .stat .lbl { font-size: 11.5px; overflow-wrap: anywhere; }
