/* IATON: calm, compact, light & dark */
:root {
  --bg: #0f0f0e; --surface: #181816; --surface-2: #22221f; --fg: #ecebe6; --muted: #8f8d86; --line: rgba(236,235,230,.12);
  --accent: #c8ff3c; --on-accent: #10100e; --accent-text: #c8ff3c; --hot: #ff6a4a; --good: #c8ff3c;
  --wheel-a: #1d1d1b; --wheel-b: #262623; --wheel-rim: #ecebe6; --wheel-ink: #ecebe6;
  --radius: 14px; --gutter: clamp(16px, 4vw, 40px); --maxw: 1080px;
  --display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f4ef; --surface: #ffffff; --surface-2: #eeebe3; --fg: #161614; --muted: #6d6b64; --line: rgba(22,22,20,.12);
    --accent-text: #4c7400; --hot: #d33f1d; --good: #4c7400;
    --wheel-a: #ffffff; --wheel-b: #eeebe3; --wheel-rim: #161614; --wheel-ink: #161614;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f6f4ef; --surface: #ffffff; --surface-2: #eeebe3; --fg: #161614; --muted: #6d6b64; --line: rgba(22,22,20,.12);
  --accent-text: #4c7400; --hot: #d33f1d; --good: #4c7400;
  --wheel-a: #ffffff; --wheel-b: #eeebe3; --wheel-rim: #161614; --wheel-ink: #161614;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--display); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg, iframe { max-width: 100%; display: block; }
code, pre, .mono { font-family: var(--mono); }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.accent { color: var(--accent-text); }
.bad { color: var(--hot); }
.good { color: var(--good); }

/* ── buttons & bits ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .2s, border-color .2s, transform .2s var(--ease); }
.btn:hover { border-color: var(--fg); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); }
.tag { display: inline-block; padding: 2px 7px; border-radius: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; background: var(--surface-2); color: var(--muted); }
.tag.accent { background: var(--accent); color: var(--on-accent); }
.tag.hot { background: var(--hot); color: #fff; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.code { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 13px; overflow-x: auto; }
.code span { flex: 1; white-space: nowrap; }
pre.block { margin: 8px 0 0; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }

/* ── top bar ── */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 14px; height: 56px; }
.logo { font-weight: 800; font-size: 19px; letter-spacing: -.04em; text-decoration: none; }
.logo b { color: var(--accent-text); font-weight: 800; }
.navlinks { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.navlinks::-webkit-scrollbar { display: none; }
.navlinks a { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 14px; white-space: nowrap; }
.navlinks a:hover { color: var(--fg); }
.navlinks a.on { color: var(--fg); background: var(--surface-2); }
.navlinks a.off { opacity: .4; }
.navright { display: flex; align-items: center; gap: 6px; }
.lang-btn { font-family: var(--mono); font-size: 12px; }
@media (max-width: 760px) {
  .topbar .wrap { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 6px; row-gap: 4px; }
  .navlinks { order: 3; flex-basis: 100%; margin: 0 -6px; }
  .navright { margin-left: auto; }
}

/* ── landing ── */
.hero { padding: clamp(56px, 10vw, 110px) 0 clamp(40px, 7vw, 72px); }
.hero h1 { margin: 0; font-weight: 800; font-size: clamp(56px, 12vw, 132px); line-height: .85; letter-spacing: -.065em; }
.hero h1 span { display: inline-block; animation: rise .9s var(--ease) both; }
.hero h1 span:nth-child(2) { color: var(--accent-text); animation-delay: .05s; }
.hero h1 span:nth-child(3) { animation-delay: .1s; } .hero h1 span:nth-child(4) { animation-delay: .15s; } .hero h1 span:nth-child(5) { animation-delay: .2s; }
@keyframes rise { from { transform: translateY(40%); opacity: 0; } }
.hero .tag-line { font-size: clamp(18px, 2.2vw, 22px); margin: 18px 0 4px; max-width: 34ch; letter-spacing: -.01em; }
.hero .sub { margin: 0 0 22px; }
.status { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.countdown { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 14px; }
.countdown b { font-size: 18px; font-weight: 500; }

.section { padding: clamp(40px, 7vw, 72px) 0; border-top: 1px solid var(--line); }
.section h2 { margin: 0 0 20px; font-size: clamp(24px, 3vw, 30px); letter-spacing: -.035em; line-height: 1.1; }

.assignment { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: center; }
@media (max-width: 760px) { .assignment { grid-template-columns: 1fr; } .assignment .wheel-box { max-width: 260px; margin: 0 auto; } }
.wheel-box { position: relative; aspect-ratio: 1; width: 100%; }
.wheel-box svg { width: 100%; height: 100%; overflow: visible; }
.wheel-pointer { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 20px solid var(--hot); z-index: 2; }
.wheel-hub { position: absolute; inset: 0; margin: auto; width: 20%; height: 20%; border-radius: 50%; background: var(--bg); border: 2px solid var(--wheel-rim); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--accent-text); }
.confetti { position: absolute; inset: -40%; width: 180%; height: 180%; pointer-events: none; z-index: 3; }
.as-cat { font-family: var(--mono); font-size: 12px; color: var(--hot); text-transform: uppercase; letter-spacing: .1em; min-height: 1.4em; margin-top: 8px; }
.as-text { font-weight: 700; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.08; letter-spacing: -.035em; margin: 8px 0 0; text-wrap: balance; overflow-wrap: anywhere; min-height: 1.1em; }
.as-text.waiting { color: var(--muted); font-weight: 500; }
.as-text .caret { display: inline-block; width: 3px; height: .9em; background: var(--accent-text); margin-left: 2px; vertical-align: -.1em; animation: blink .8s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; counter-reset: r; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 28px 1fr; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rules li::before { content: counter(r, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--accent-text); padding-top: 3px; }
.rules b { display: block; font-size: 16px; letter-spacing: -.01em; }
.rules p { margin: 2px 0 0; color: var(--muted); font-size: 14px; grid-column: 2; }
@media (max-width: 760px) { .rules { grid-template-columns: 1fr; } }

.schedule { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.schedule > div { padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.schedule > div.now { border-color: var(--accent-text); }
.schedule .when { font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.schedule .when span { font-family: var(--mono); font-weight: 500; font-size: 14px; color: var(--accent-text); margin-left: 6px; }
.schedule p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .schedule { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.scoring { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.scoring .card b { display: block; font-size: 16px; }
.scoring .card span { color: var(--muted); font-size: 14px; }
.scoring .secret { border-style: dashed; display: flex; align-items: center; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .scoring { grid-template-columns: 1fr; } }
.note { margin: 16px 0 0; max-width: 70ch; color: var(--muted); font-size: 14px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 600 12px var(--mono); margin-bottom: 8px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.past { list-style: none; margin: 0; padding: 0; }
.past li { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.past .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.past .c { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }
.foot { padding: 28px 0 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── phase banner ── */
.phase-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 4px solid var(--ph, var(--accent-text)); background: var(--surface); }
.phase-banner .pb-title { font-weight: 700; font-size: 20px; letter-spacing: -.02em; line-height: 1.2; margin-top: 2px; }
.phase-banner .pb-desc { color: var(--muted); font-size: 14px; }
.phase-banner .pb-cd { display: grid; text-align: right; }
.phase-banner .pb-cd b { font-family: var(--mono); font-weight: 500; font-size: 22px; font-variant-numeric: tabular-nums; }
.ph-upcoming { --ph: #7cc6ff; } .ph-building { --ph: var(--accent-text); } .ph-voting { --ph: var(--hot); } .ph-tallying { --ph: #b69cff; } .ph-results { --ph: #f5c542; } .ph-none { --ph: var(--muted); }
@media (max-width: 560px) { .phase-banner .pb-cd { text-align: left; } }
.hero .phase-banner { max-width: 640px; }

/* ── app ── */
.view { max-width: var(--maxw); margin: 0 auto; padding: 24px var(--gutter) 80px; }
.view h1 { font-size: clamp(24px, 3.2vw, 32px); letter-spacing: -.035em; line-height: 1.1; margin: 6px 0 16px; overflow-wrap: anywhere; }
.view h2 { font-size: 18px; letter-spacing: -.02em; margin: 24px 0 10px; }
.login { min-height: 70svh; display: grid; place-items: center; }
.login form { width: min(360px, 100%); }
.field { display: block; margin-bottom: 10px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input, .lab select, .lab input[type=number], .cc-row input, select.pick {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); outline: none;
}
.field input:focus, select.pick:focus { border-color: var(--accent-text); }
.err { color: var(--hot); font-size: 13px; min-height: 1.3em; margin: 4px 0 8px; }

.strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 18px; }
.assign-box .text { font-weight: 700; font-size: clamp(22px, 3vw, 30px); line-height: 1.12; letter-spacing: -.03em; margin: 6px 0 0; overflow-wrap: anywhere; }
.status-big { display: flex; gap: 14px; align-items: center; }
.status-big .mark { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700; }
.status-big .mark.ok { background: var(--accent); color: var(--on-accent); }
.status-big .mark.no { border: 2px dashed var(--line); color: var(--muted); }
.status-big .mark.warn { background: var(--hot); color: #fff; }
.status-big b { display: block; font-size: 20px; letter-spacing: -.02em; }
.issues { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 8px 0 12px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s var(--ease); }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.proj { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, transform .2s var(--ease); }
.proj:hover { border-color: var(--fg); transform: translateY(-2px); }
.proj.mine { border-style: dashed; }
.proj h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.proj p { margin: 0; color: var(--muted); font-size: 13.5px; }
.proj .meta { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 6px; }

.tabs2 { display: flex; gap: 4px; flex-wrap: wrap; margin: 12px 0; }
.tabs2 button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 13.5px; }
.tabs2 button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pd { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.pd > * { min-width: 0; }
.pd-side { position: sticky; top: 72px; }
@media (max-width: 900px) { .pd { grid-template-columns: 1fr; } .pd-side { position: static; } }
.md { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.md h1, .md h2, .md h3 { font-size: 18px; margin: 1.2em 0 .4em; letter-spacing: -.02em; }
.md > :first-child { margin-top: 0; }
.md a { color: var(--accent-text); }
.md img { border-radius: 10px; }
.md code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.md pre { background: var(--surface-2); padding: 12px; border-radius: 10px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.chat { display: grid; gap: 10px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14px; }
.bubble.user { justify-self: end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.bubble.user .md a { color: inherit; }
.bubble.ai { justify-self: start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble .who { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .6; margin-bottom: 2px; }
@media (max-width: 560px) { .bubble { max-width: 100%; } }
.play-frame { width: 100%; height: min(70svh, 640px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.files { list-style: none; padding: 0; margin: 0; columns: 2; font-family: var(--mono); font-size: 12.5px; }
.files a { text-decoration: none; color: var(--muted); }
.files a:hover { color: var(--fg); }
@media (max-width: 560px) { .files { columns: 1; } }

/* vote */
.vote-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 6px; }
.seg button { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.seg button.on { border-color: var(--accent-text); background: var(--surface-2); }
.seg button.done::after { content: ' ✓'; color: var(--accent-text); }
.seg button.k-hidden { font-style: italic; }
.crit-desc { color: var(--muted); font-size: 13.5px; margin: 0 0 6px; }
.vlist { border-top: 1px solid var(--line); }
.vrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.vrow .t { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow .t a { text-decoration: none; }
.vrow .t a:hover { color: var(--accent-text); }
.stepper { display: inline-flex; align-items: center; gap: 2px; }
.stepper button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 16px; line-height: 1; }
.stepper button:hover:not([disabled]) { border-color: var(--fg); }
.stepper button[disabled] { opacity: .3; cursor: default; }
.stepper output { min-width: 28px; text-align: center; font-family: var(--mono); font-size: 14px; }
.stepper output.pos { color: var(--accent-text); font-weight: 600; }

/* results / guess / fame */
.winner-line { font-size: clamp(22px, 3vw, 28px); font-weight: 700; letter-spacing: -.03em; }
.glist { display: grid; gap: 6px; margin: 12px 0; }
.grow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 220px); gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.grow b { display: block; font-size: 14.5px; }
.grow span { font-size: 12.5px; color: var(--muted); }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px 0 16px; }
.podium .card { padding: 14px; }
.podium .medal { font-size: 22px; }
.podium b { display: block; font-size: 17px; letter-spacing: -.02em; }
@media (max-width: 560px) { .podium { grid-template-columns: 1fr; } }
.table-scroll { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t td.n { font-family: var(--mono); text-align: right; white-space: nowrap; }
table.t small.up { color: var(--good); } table.t small.down { color: var(--hot); }
.fame-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 10px; }
.fame .top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }
.fame .theme { font-size: 13px; color: var(--muted); font-style: italic; margin: 6px 0 10px; }
.fame h3 { margin: 0; font-size: 19px; letter-spacing: -.02em; line-height: 1.15; }
.fame .by { margin: 4px 0 10px; font-size: 13.5px; }

/* lab */
.lab { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.lab > * { min-width: 0; }
.lab-preview { position: sticky; top: 72px; }
@media (max-width: 960px) { .lab { grid-template-columns: 1fr; } .lab-preview { position: static; } }
.lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.lab-field { display: block; margin-bottom: 10px; font-size: 13px; }
.lab-field > span { display: block; color: var(--muted); margin-bottom: 4px; }
.lab-field > span b { color: var(--accent-text); font-family: var(--mono); }
.lab-field small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.lab-field input[type=range] { width: 100%; accent-color: var(--accent-text); }
.lab-h { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin: 16px 0 8px; }
.cc-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 4px; margin-bottom: 4px; }
.cc-row input { padding: 6px 8px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 13px; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 160%); z-index: 90; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: transform .35s var(--ease), visibility .35s; visibility: hidden; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast.bad { background: var(--hot); color: #fff; }

/* dev bar (DEV_MODE only) */
#devbar { position: fixed; left: 10px; bottom: 10px; z-index: 200; font: 12px var(--mono); background: var(--surface); color: var(--fg); border: 1px solid var(--hot); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.35); max-width: calc(100vw - 20px); }
.devbar-toggle { background: var(--hot); color: #fff; border: 0; border-radius: 11px; padding: 5px 9px; font: 700 11px var(--mono); }
#devbar.open .devbar-toggle { border-radius: 11px 11px 0 0; width: 100%; text-align: left; }
.devbar-body { padding: 8px; display: grid; gap: 6px; width: min(340px, calc(100vw - 22px)); }
.devbar-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); }
.devbar-row b { color: var(--accent-text); }
.devbar-btns { display: flex; flex-wrap: wrap; gap: 3px; }
.devbar-btns button { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; font: 11px var(--mono); }
.devbar-btns button.on { background: var(--accent); color: var(--on-accent); }
#devbar select { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px; font: 11px var(--mono); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
