/* Forgeword: the forge travels from a frozen night to the stars. A quiet backdrop behind a flat, restrained UI.
   v0.5 look: square-ish corners (4px), flat fills, no glow shadows; colour carries meaning, not decoration. */
:root {
  --bg: #07080d;
  --panel: rgba(12, 13, 20, 0.86);
  --panel-2: rgba(18, 19, 28, 0.9);
  --panel-solid: #0f111b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #f3eee6;
  --ink-2: #c3bdd0;
  --muted: #8a85a0;
  --ember: #ff7a2f;
  --ember-2: #ffa04a;
  --gold: #ffcf5a;
  --hot: #fff3d6;
  --cool: #79c6ff;
  --good: #5ee08a;
  --bad: #ff5d5d;
  --violet: #b48cff;
  --s-core: #c9d2de; --s-source: #ff8a3d; --s-form: #4fe3c8; --s-lore: #c3a2ff; --s-wild: #ffd54a;
  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-ui: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;
  --radius: 4px;
  --radius-sm: 3px;
  --heat: 0;
  /* The accent follows the world the forge is in (body[data-world], set from the heat). */
  --accent: #ffa04a;
  --accent-2: #ff6a24;
  --accent-ink: #1b0b00;
  --accent-glow: rgba(255, 122, 47, 0.32);
  transition: --accent 0.6s;
}
body[data-world="frozen"] { --accent: #8fd8ff; --accent-2: #4aa3d8; --accent-ink: #04121e; --accent-glow: rgba(120, 200, 255, 0.3); }
body[data-world="foundry"] { --accent: #ff8a3d; --accent-2: #ff4a1c; --accent-ink: #1b0600; --accent-glow: rgba(255, 90, 30, 0.38); }
body[data-world="solar"] { --accent: #ffd36a; --accent-2: #ff9a2a; --accent-ink: #1e1200; --accent-glow: rgba(255, 200, 90, 0.36); }
body[data-world="cosmic"] { --accent: #b4a6ff; --accent-2: #7a6bff; --accent-ink: #0a0620; --accent-glow: rgba(160, 140, 255, 0.36); }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scrollbar-color: rgba(255, 168, 96, 0.28) #07080d; scrollbar-width: thin; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--font-mono); }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -2; }
#heat-tint { display: none; }

/* ---------- top bar + navigation ---------- */
#topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 8px 16px; background: rgba(7, 8, 13, 0.92);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; color: var(--ink); }
.brand-mark { width: 24px; height: 24px; color: var(--accent); fill: var(--accent); }
.brand-mark use { fill: var(--accent); }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: 2px; }
.brand-word b { font-weight: 800; color: var(--accent); }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav-btn {
  display: flex; align-items: center; gap: 6px; background: none; border: 0; border-radius: var(--radius-sm); padding: 7px 11px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); transition: color 0.15s, background 0.15s;
}
.nav-btn svg { width: 15px; height: 15px; }
.nav-btn:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.nav-btn.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.top-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.chip { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.5px; color: var(--ink-2); border: 1px solid var(--line); padding: 3px 8px; background: rgba(0, 0, 0, 0.3); border-radius: var(--radius-sm); }
.chip.streak { color: var(--gold); border-color: rgba(255, 207, 90, 0.35); }
.me { display: flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); padding: 4px 10px; font-family: var(--font-mono); font-size: 12px; border-radius: var(--radius-sm); }
.me:hover { border-color: var(--line-strong); }
.tier { font-family: var(--font-mono); font-weight: 600; font-size: 10px; letter-spacing: 1px; color: #1a0d00; background: var(--gold); padding: 1px 6px; border-radius: 4px; }
.guest-flag { font-family: var(--font-mono); font-size: 9px; color: var(--cool); border: 1px solid rgba(121, 198, 255, 0.5); padding: 0 4px; border-radius: 4px; }
.icon-btn { background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); width: 30px; height: 30px; display: grid; place-items: center; font-size: 14px; border-radius: var(--radius-sm); }
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn.off { color: var(--muted); text-decoration: line-through; }

/* ---------- layout ---------- */
#app { max-width: 1060px; margin: 0 auto; padding: 22px 16px 64px; }
.screen { display: none; flex-direction: column; align-items: center; gap: 18px; animation: rise 0.35s ease; }
.screen.active { display: flex; }
.center-screen { min-height: 60vh; justify-content: center; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; width: 100%;
}
h1, h2, h3 { margin: 0; font-weight: 600; }
h3 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; color: var(--ink-2); margin-bottom: 12px; display: flex; justify-content: space-between; gap: 10px; }
h3 small { color: var(--muted); letter-spacing: 0.5px; font-size: 11px; }
.kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: 3px; color: var(--accent); }
.error { color: var(--bad); min-height: 1.2em; margin: 0; text-align: center; font-size: 14px; }
.badge { font-family: var(--font-mono); font-size: 11px; color: var(--muted); border: 1px dashed var(--line); padding: 6px 10px; border-radius: var(--radius-sm); }
.badge.mock { color: var(--gold); border-color: rgba(255, 207, 90, 0.4); }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600;
  background: rgba(10, 11, 18, 0.7); border: 1px solid var(--line-strong); color: var(--ink); padding: 12px 18px; border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.08s, background 0.15s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 85%, white); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #1a0505; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn.big { padding: 15px 26px; font-size: 14px; }
.btn.small { padding: 7px 11px; font-size: 11px; letter-spacing: 1px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--cool); font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; }
.link-btn:hover { text-decoration: underline; }
.action-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- home ---------- */
.hero { text-align: center; padding: 10px 0 2px; display: flex; flex-direction: column; align-items: center; }
.hero.small { padding: 4px 0 0; }
.hero-mark { width: 48px; height: 48px; margin-bottom: 6px; }
.hero-mark use { fill: var(--accent); }
@keyframes breathe { 50% { opacity: 0.7; } }
.logo {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(38px, 8vw, 72px); letter-spacing: clamp(3px, 1vw, 10px); line-height: 1;
  color: var(--hot); padding: 0 0 4px;
}
.tagline { font-family: var(--font-mono); color: var(--ink-2); letter-spacing: 3px; font-size: 13px; margin: 12px 0 0; text-transform: lowercase; }
.screen-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 5vw, 40px); letter-spacing: 3px; color: var(--hot); }

.cta {
  position: relative; width: min(660px, 100%); padding: 18px 22px; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel-2));
  display: flex; flex-direction: column; gap: 4px; align-items: center; transition: border-color 0.15s, background 0.15s;
}
.cta:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--panel-2)); }
.cta:active { transform: translateY(1px); }
.cta-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 3px; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.cta-kicker .ico { width: 14px; height: 14px; }
.cta-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 4vw, 30px); letter-spacing: 2px; color: var(--hot); }
.cta-sub { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); letter-spacing: 0.5px; text-align: center; }

.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 860px; }
.mode-grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mode-grid.four { grid-template-columns: repeat(4, 1fr); max-width: 1000px; }
.mode-card {
  position: relative; text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); transition: border-color 0.15s;
}
.mode-card:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.mode-card:disabled { opacity: 0.6; cursor: default; }
.mode-icon { width: 22px; height: 22px; color: var(--accent); margin-bottom: 6px; }
.mode-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.mode-title { font-weight: 600; font-size: 17px; }
.mode-sub { font-size: 13px; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.on { background: var(--good); }

.boards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; width: 100%; max-width: 860px; }
.boards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1000px; }
.board ol, .board ul { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.board li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-size: 14px; }
.board ol li::before { counter-increment: r; content: counter(r); font-family: var(--font-mono); color: var(--muted); font-size: 12px; }
.board li b { font-family: var(--font-mono); color: var(--gold); font-weight: 600; }
.board li span.sub { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .empty { display: block; color: var(--muted); font-size: 13px; }
.board .empty::before { content: none !important; }
.how { max-width: 860px; }
.how summary { cursor: pointer; font-family: var(--font-mono); letter-spacing: 2px; font-size: 12px; color: var(--ink-2); }
.how ol { margin: 12px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; }
.how li { margin: 6px 0; }
.s-core { color: var(--s-core); } .s-source { color: var(--s-source); } .s-form { color: var(--s-form); } .s-lore { color: var(--s-lore); } .s-wild { color: var(--s-wild); }

/* ---------- forge ---------- */
.forge-screen { max-width: 760px; margin: 0 auto; gap: 14px; }
.hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; width: 100%; }
.hud-box { display: flex; flex-direction: column; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 12px; justify-self: start; min-width: 120px; }
.hud-box.right { justify-self: end; text-align: right; }
.hud-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 3px; color: var(--muted); }
.hud-value { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--hot); transition: color 0.4s; }
.hud-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pips { display: flex; gap: 6px; }
.pip { width: 22px; height: 8px; border: 1px solid var(--line-strong); border-radius: 1px; background: rgba(0, 0, 0, 0.4); transition: background 0.3s; }
.pip.current { border-color: var(--hot); }
.hud-mode { font-family: var(--font-mono); font-size: 10px; letter-spacing: 3px; color: var(--muted); }

.room-strip { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; width: 100%; }
.seat { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0, 0, 0, 0.35); font-size: 12px; font-family: var(--font-mono); }
.seat .av { width: 18px; height: 18px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #120a02; border-radius: 50%; }
.seat.locked { border-color: rgba(94, 224, 138, 0.5); }
.seat.locked::after { content: '✓'; color: var(--good); }
.seat.away { opacity: 0.45; }
.seat.me { border-color: var(--line-strong); }

.heat-ruler { position: fixed; right: 10px; top: 70px; bottom: 20px; width: 210px; pointer-events: none; z-index: 1; font-family: var(--font-mono); font-size: 10px; }
.heat-ruler .rail { position: absolute; right: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(to top, #c8ebff, #8ccdff 16%, #9696aa 30%, #be3c2a 36%, #ff8a1f 42%, #fff4d6 50%, #c8dcff 75%, #ffffff); opacity: 0.55; border-radius: 2px; }
.heat-ruler .mark { position: absolute; right: 8px; transform: translateY(50%); color: rgba(220, 210, 230, 0.35); white-space: nowrap; transition: color 0.4s; text-align: right; }
.heat-ruler .mark::after { content: ''; display: inline-block; width: 8px; height: 1px; background: currentColor; margin-left: 6px; vertical-align: middle; }
.heat-ruler .mark.passed { color: rgba(255, 200, 140, 0.85); }
.heat-ruler .mark.planck { color: rgba(200, 220, 255, 0.45); transform: translateY(0); }
.heat-ruler .you { position: absolute; right: -2px; transform: translateY(50%); color: var(--hot); font-weight: 600; transition: bottom 1.1s cubic-bezier(.2, .8, .2, 1); }
@media (max-width: 1280px) { .heat-ruler { display: none; } }

.stage { position: relative; width: 100%; min-height: 300px; display: grid; }
.stage > * { grid-area: 1 / 1; }
.prompt-card { display: flex; flex-direction: column; gap: 14px; padding: 26px 26px 20px; align-self: start; animation: rise 0.35s ease; }
.prompt-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.prompt-chips { display: flex; gap: 8px; align-items: center; }
.slot-chip { font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: 2px; padding: 2px 8px; border: 1px solid currentColor; border-radius: var(--radius-sm); }
.prompt-text { font-size: clamp(28px, 5.4vw, 46px); line-height: 1.12; font-weight: 600; letter-spacing: -0.5px; text-wrap: balance; }
.prompt-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.prompt-hint { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.locked-word { font-family: var(--font-mono); font-size: 14px; color: var(--ink-2); }
.locked-word b { color: var(--hot); font-size: 18px; }
.locked-word .dots::after { content: '…'; animation: blink 1s infinite steps(2); }
@keyframes blink { 50% { opacity: 0.2; } }

/* difficulty chip */
.diff { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 1.5px; padding: 2px 7px; border-radius: var(--radius-sm); border: 1px solid; white-space: nowrap; }
.diff-pips { display: inline-flex; gap: 2px; }
.diff-pips i { width: 4px; height: 8px; border-radius: 1px; background: currentColor; opacity: 0.22; }
.diff-pips i.on { opacity: 1; }
.diff.d1, .diff.d2 { color: #8fdca8; border-color: rgba(143, 220, 168, 0.35); }
.diff.d3 { color: #ffd36a; border-color: rgba(255, 211, 106, 0.4); }
.diff.d4 { color: #ff9a5a; border-color: rgba(255, 154, 90, 0.45); }
.diff.d5 { color: #ff6b8a; border-color: rgba(255, 107, 138, 0.5); }

/* answer bar */
.answer-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; width: 100%; }
.timer { position: relative; width: 52px; height: 52px; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer .track { fill: rgba(0, 0, 0, 0.5); stroke: rgba(255, 255, 255, 0.08); stroke-width: 3; }
.timer .ring { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 119.4; stroke-dashoffset: 0; transition: stroke-dashoffset 0.25s linear, stroke 0.3s; }
.timer #timer-text, .timer .tt { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-weight: 600; font-size: 16px; }
.timer.low .ring { stroke: var(--bad); }
.timer.low #timer-text, .timer.low .tt { color: var(--bad); animation: blink 0.5s infinite steps(2); }
.timer.low { animation: pulse-low 1s ease-in-out infinite; }
@keyframes pulse-low { 50% { transform: scale(1.04); } }
.input-wrap { position: relative; }
.input-wrap input, .af-ghost {
  width: 100%; font-family: var(--font-mono); font-size: 20px; padding: 13px 14px; border: 1px solid var(--line-strong); letter-spacing: 0.5px; border-radius: var(--radius-sm);
}
.input-wrap input { position: relative; background: transparent; outline: none; z-index: 1; caret-color: var(--accent); }
.input-wrap input:focus { border-color: var(--accent); }
.input-wrap input:disabled { opacity: 0.6; }
.af-ghost { position: absolute; inset: 0; background: rgba(5, 6, 10, 0.78); border-color: transparent; white-space: pre; overflow: hidden; pointer-events: none; }
#ghost-typed { color: transparent; }
#ghost-rest { color: rgba(200, 190, 215, 0.38); }
.fix-hint { position: absolute; left: 0; top: calc(100% + 6px); font-family: var(--font-mono); font-size: 12px; color: var(--cool); z-index: 2; }
.fix-hint b { color: var(--ink); }
.strike { height: 52px; }
.under-bar { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; min-height: 30px; gap: 12px; }
.af-hint { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 1px; white-space: nowrap; padding-top: 6px; }
.af-hint kbd { border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; font-family: inherit; color: var(--ink-2); }
.ideas { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.idea {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-ui); font-size: 13px; padding: 5px 11px; border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line-strong); color: var(--ink-2); animation: pop 0.25s both; transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.idea i { font-style: normal; font-size: 11px; }
.idea.creative { border-color: rgba(255, 207, 90, 0.4); color: #ffe3a0; }
.idea.creative i { color: var(--gold); }
.idea.rare { border-color: rgba(180, 140, 255, 0.4); color: #dccbff; }
.idea.rare i { color: var(--violet); }
.idea:hover, .idea.on { border-color: var(--accent); color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.emotes { display: flex; gap: 4px; }
.emotes button { background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 16px; padding: 2px 6px; }
.emotes button:hover { border-color: var(--line-strong); }

/* ---------- word reveal ---------- */
.reveal-card { --tier: #ffa04a; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 26px 22px 22px; align-self: start; animation: pop 0.45s cubic-bezier(.2, 1.4, .4, 1); overflow: hidden; }
.reveal-card { border-top: 2px solid var(--tier); }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(10px); } to { opacity: 1; transform: none; } }
.rv-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 8px 18px; align-items: center; width: 100%; position: relative; }
.rv-main.solo { grid-template-columns: 1fr; }
.rv-left { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rv-right { display: flex; justify-content: center; }
@media (max-width: 640px) { .rv-main { grid-template-columns: 1fr; } }
.tier-badge { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.tier-icon { width: 52px; height: 52px; }
.tier-label { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 5vw, 42px); letter-spacing: 4px; line-height: 1; }
.reveal-term { font-size: 24px; font-weight: 600; position: relative; }
.reveal-term small { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.reveal-power { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-mono); color: var(--ink-2); position: relative; }
.reveal-power b { font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 1; color: var(--hot); font-variant-numeric: tabular-nums; }
.reveal-power span { font-size: 13px; letter-spacing: 3px; color: var(--muted); }
.reveal-power.neg b { color: var(--bad); text-shadow: none; }
.reveal-heat { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }
.bonuses { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.bonus { font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: 1.5px; padding: 3px 8px; border-radius: var(--radius-sm); animation: pop 0.4s 0.35s both; }
.bonus.combo { color: #1b0b00; background: var(--gold); }
.bonus.diffb { color: #ffb38a; border: 1px solid rgba(255, 154, 90, 0.45); }
.bonus.hot { color: #1b0b00; background: var(--gold); }
@keyframes shine { to { background-position: -200% 0; } }
.meters { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.meter { display: flex; flex-direction: column; gap: 4px; align-items: center; font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--muted); }
.segs { display: flex; gap: 2px; }
.segs i { width: 8px; height: 10px; background: rgba(255, 255, 255, 0.07); border-radius: 2px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; padding: 1px 6px; border: 1px solid currentColor; border-radius: var(--radius-sm); }
.quip { font-size: 16px; color: var(--ink-2); font-style: italic; max-width: 520px; margin: 2px 0; }
.crowd { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; color: #ff9a8a; }
.crowd.rare { color: var(--good); }
.passed { font-family: var(--font-mono); font-size: 11px; color: rgba(255, 200, 140, 0.85); letter-spacing: 1px; display: flex; flex-direction: column; gap: 2px; }
.passed .down { color: var(--cool); }
.radar { width: 270px; max-width: 100%; height: auto; overflow: visible; margin: -6px 0; }
.radar .ring { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.radar .spoke { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.radar .shape { fill: color-mix(in srgb, var(--tier) 26%, transparent); stroke: var(--tier); stroke-width: 1.5; stroke-linejoin: round; animation: radar-in 0.6s cubic-bezier(.2, 1.2, .4, 1) both; transform-origin: center; transform-box: fill-box; }
.radar text { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; fill: var(--muted); }
.radar text.major { fill: #a8a2bd; font-weight: 600; }
.radar text tspan { fill: var(--ink-2); font-weight: 600; }
.radar text.peak, .radar text.peak tspan { fill: var(--gold); }
.radar .peak-dot { fill: #fff6dc; animation: pop 0.4s 0.5s both; }
.radar.dim .shape { fill: rgba(138, 127, 153, 0.2); stroke: #8a7f99; }
@keyframes radar-in { from { transform: scale(0.2); opacity: 0; } to { transform: none; opacity: 1; } }
.reveal-actions { display: flex; gap: 10px; margin-top: 6px; position: relative; }

/* power-scaled reveal effects */
.reveal-card.fx-big { border-color: color-mix(in srgb, var(--tier) 45%, transparent); animation: pop 0.45s cubic-bezier(.2, 1.4, .4, 1), slam 0.5s 0.05s; }
.reveal-card.fx-massive { border-color: color-mix(in srgb, var(--tier) 70%, transparent); box-shadow: 0 0 50px color-mix(in srgb, var(--tier) 30%, transparent); animation: pop 0.45s cubic-bezier(.2, 1.4, .4, 1), slam 0.55s 0.05s; }
.reveal-card.fx-massive .tier-label { animation: label-in 0.6s cubic-bezier(.2, 1.6, .4, 1) both; }
.reveal-card.fx-plasma { border-color: rgba(170, 210, 255, 0.8); box-shadow: 0 0 70px rgba(140, 190, 255, 0.4); animation: pop 0.45s cubic-bezier(.2, 1.4, .4, 1), slam 0.6s 0.05s; }
.reveal-card.fx-plasma .tier-label { animation: label-in 0.7s cubic-bezier(.2, 1.7, .4, 1) both; color: #e4efff !important; }
@keyframes slam { 0% { transform: scale(1.06); } 40% { transform: scale(0.985); } 100% { transform: none; } }
@keyframes label-in { from { transform: scale(2.2); opacity: 0; letter-spacing: 18px; } to { transform: none; opacity: 1; } }
@keyframes glowpulse { 50% { box-shadow: 0 0 100px color-mix(in srgb, var(--tier) 55%, transparent), 0 10px 30px rgba(0, 0, 0, 0.3); } }
@keyframes plasmapulse { 50% { box-shadow: 0 0 130px rgba(160, 200, 255, 0.75), 0 0 40px rgba(255, 255, 255, 0.35) inset; } }
@keyframes plasma-text { to { background-position: -200% 0; } }
#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.fx-ring { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 6px solid var(--c); animation: ring-out 0.9s cubic-bezier(.1, .7, .3, 1) forwards; }
.fx-ring.huge { border-width: 10px; animation-duration: 1.2s; }
.fx-ring.plasma { border-width: 14px; border-color: #cfe6ff; box-shadow: 0 0 40px #9fd0ff; animation-duration: 1.4s; }
@keyframes ring-out { from { transform: scale(0.2); opacity: 1; } to { transform: scale(40); opacity: 0; } }
.fx-spark { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--c); box-shadow: 0 0 8px var(--c); animation: spark-out 0.9s cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes spark-out { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; } }
.fx-flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, rgba(255, 244, 220, 0.75), rgba(255, 180, 90, 0.15) 60%, transparent); animation: flash-out 0.7s ease-out forwards; }
.fx-flash.plasma { background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.95), rgba(150, 190, 255, 0.35) 55%, transparent); animation-duration: 1s; }
@keyframes flash-out { from { opacity: 1; } to { opacity: 0; } }
#app.shake-1 { animation: shake 0.32s; }
#app.shake-2 { animation: shake 0.5s; animation-timing-function: steps(10); }
#app.shake-3 { animation: shake-big 0.7s; }
@keyframes shake { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, -1px); } }
@keyframes shake-big { 10% { transform: translate(-9px, 4px) rotate(-0.4deg); } 25% { transform: translate(8px, -5px) rotate(0.4deg); } 40% { transform: translate(-6px, 3px); } 60% { transform: translate(5px, -2px); } 80% { transform: translate(-2px, 1px); } }

/* live: all answers for one prompt */
.room-reveal { align-self: start; display: flex; flex-direction: column; gap: 10px; width: 100%; }
.room-reveal .rr-head { text-align: center; }
.rr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.rr-card { padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); animation: pop 0.4s cubic-bezier(.2, 1.4, .4, 1) both; display: flex; flex-direction: column; gap: 3px; }
.rr-card .who { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.rr-card .term { font-weight: 600; font-size: 17px; }
.rr-card .tl { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 1px; }
.rr-card .tl img { image-rendering: auto !important; }
.rr-card .pw { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.rr-card .q { font-size: 12px; color: var(--muted); font-style: italic; }
.rr-card.best { border-color: var(--gold); }
.rr-card.me { outline: 1px dashed var(--line-strong); outline-offset: 2px; }

/* ---------- weapon ---------- */
.daily-banner { text-align: center; font-family: var(--font-mono); letter-spacing: 2px; color: var(--gold); max-width: 860px; }
.weapon-layout { display: grid; grid-template-columns: 1.05fr 1fr; gap: 14px; width: 100%; max-width: 980px; }
.weapon-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; opacity: 0; transition: opacity 0.5s; }
.weapon-card.show { opacity: 1; }
.weapon-card canvas { width: 300px; height: 300px; image-rendering: pixelated; max-width: 100%; }
.weapon-card.small canvas { width: 190px; height: 190px; }
.weapon-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 3.8vw, 30px); line-height: 1.15; letter-spacing: 1px; color: var(--hot); }
.weapon-card.small .weapon-name { font-size: 19px; }
.weapon-sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: var(--muted); }
.owner { font-family: var(--font-mono); font-size: 12px; color: var(--violet); }
.weapon-desc { color: var(--ink-2); font-size: 15px; margin: 0; max-width: 440px; }
.special { border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0, 0, 0, 0.25); padding: 10px 12px; width: 100%; font-size: 14px; color: var(--ink-2); text-align: left; }
.special b { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; color: var(--gold); margin-bottom: 2px; }
.stats { width: 100%; display: grid; gap: 7px; }
.stat { display: grid; grid-template-columns: 58px 1fr 40px; gap: 10px; align-items: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; color: var(--ink-2); }
.stat .bar { height: 8px; background: rgba(255, 255, 255, 0.06); border-radius: 4px; overflow: hidden; }
.stat .bar i { display: block; height: 100%; width: 0; border-radius: 4px; transition: width 0.9s cubic-bezier(.2, .8, .2, 1); }
.stat span:last-child { text-align: right; color: var(--ink); }
.power { font-family: var(--font-mono); font-size: 14px; letter-spacing: 2px; color: var(--gold); }
.weapon-side { display: flex; flex-direction: column; gap: 12px; }
.side-title { margin-bottom: 0; }
.word-chips { display: flex; flex-direction: column; gap: 6px; }
.wchip { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; background: rgba(0, 0, 0, 0.3); border-left: 3px solid; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; animation: rise 0.3s both; }
.wchip .slot { font-family: var(--font-mono); font-weight: 600; font-size: 10px; letter-spacing: 1.5px; }
.wchip .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wchip .t small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.wchip .p { font-family: var(--font-mono); font-size: 13px; text-align: right; }
.wchip .p small { display: block; font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: 1px; }
.synergy { font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; color: var(--gold); min-height: 1em; }
.final-heat { display: flex; flex-direction: column; gap: 2px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.final-heat-val { font-family: var(--font-mono); font-size: 30px; font-weight: 600; color: var(--hot); }
.forging-mark { width: 64px; height: 64px; animation: hammer 0.42s ease-in-out infinite alternate; }
.forging-mark use { fill: var(--accent); }
@keyframes hammer { from { transform: translateY(-4px) rotate(-3deg); } to { transform: translateY(2px) rotate(2deg); } }

/* ---------- versus + battle ---------- */
.vs-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; width: 100%; max-width: 900px; }
.vs-text { font-family: var(--font-display); font-weight: 800; font-size: 40px; color: var(--accent); }
.arena-wrap { padding: 0; max-width: 980px; overflow: hidden; }
#arena { width: 100%; aspect-ratio: 960 / 440; display: block; image-rendering: pixelated; }
.arena-speed { position: absolute; right: 10px; bottom: 10px; }
.battle-log { max-width: 980px; height: 180px; overflow-y: auto; overflow-x: hidden; scrollbar-color: rgba(255, 168, 96, 0.3) transparent; scrollbar-width: thin; font-size: 14px; padding: 10px 12px; }
.battle-log p { margin: 2px 0; padding: 3px 10px; animation: rise 0.2s; color: var(--ink-2); border-left: 3px solid transparent; border-radius: 0 6px 6px 0; }
.battle-log .side-a { border-left-color: #7fe7d4; background: rgba(127, 231, 212, 0.05); }
.battle-log .side-b { border-left-color: #ff9a7a; background: rgba(255, 154, 122, 0.05); }
.battle-log .round { margin: 8px 0 4px; padding: 0; border: 0; background: none; text-align: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: 3px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.battle-log .round::before, .battle-log .round::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.battle-log .info { color: #d8d2e6; font-size: 13px; }
.battle-log .crit { color: var(--gold); font-weight: 600; }
.battle-log .sp { color: #d6c4ff; }
.battle-log .heal { color: #9be8b0; }
.battle-log .bad { color: #ffb3b3; }
.battle-log .end { color: var(--good); font-weight: 600; }
.result { display: flex; flex-direction: column; align-items: center; gap: 8px; }
#result-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(36px, 7vw, 60px); letter-spacing: 4px; animation: label-in 0.6s cubic-bezier(.2, 1.5, .4, 1) both; }
#result-title.win { color: var(--good); }
#result-title.lose { color: var(--bad); }
#result-sub { color: var(--ink-2); margin: 0; text-align: center; max-width: 560px; }
.rating-change { font-family: var(--font-mono); font-size: 14px; letter-spacing: 1px; margin: 0; }
.rating-change.up { color: var(--good); } .rating-change.down { color: var(--bad); }

/* ---------- live ---------- */
#room-view { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.live-box { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.live-box p { margin: 0; font-size: 14px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); }
.join-form { display: flex; gap: 8px; width: 100%; }
.join-form input { flex: 1; min-width: 0; width: 100%; font-family: var(--font-mono); font-weight: 600; font-size: 22px; letter-spacing: 6px; text-transform: uppercase; padding: 8px 12px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); outline: none; }
.join-form input:focus { border-color: var(--accent); }
.room-list li { grid-template-columns: 70px minmax(0, 1fr) auto auto; }
.room-list .code { font-family: var(--font-mono); font-weight: 600; color: var(--hot); letter-spacing: 2px; }
.room-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.room-code { font-family: var(--font-display); font-weight: 900; font-size: clamp(44px, 10vw, 72px); letter-spacing: 12px; color: var(--hot); line-height: 1; }
.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; width: 100%; }
.seat-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.seat-card .av { width: 32px; height: 32px; display: grid; place-items: center; font-weight: 700; color: #120a02; font-size: 14px; border-radius: 50%; }
.seat-card .nm { font-weight: 600; }
.seat-card .meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.seat-card.empty { border-style: dashed; color: var(--muted); justify-content: center; font-family: var(--font-mono); font-size: 12px; }
.host-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
.room-weapons { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; width: 100%; }
.mini-weapon { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); animation: pop 0.45s both; }
.mini-weapon canvas { width: 128px; height: 128px; image-rendering: pixelated; }
.mini-weapon .nm { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--hot); line-height: 1.2; }
.mini-weapon .meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.standings { width: 100%; max-width: 640px; }
.standings table { width: 100%; border-collapse: collapse; font-size: 14px; }
.standings td, .standings th { padding: 8px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); text-align: left; }
.standings th { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--muted); font-weight: 400; }
.standings td.n { font-family: var(--font-mono); text-align: right; }
.champion { font-family: var(--font-display); font-weight: 900; font-size: clamp(26px, 6vw, 46px); color: var(--gold); text-align: center; }
.countdown { font-family: var(--font-display); font-weight: 900; font-size: 110px; color: var(--hot); animation: pop 0.5s; }
.emote-float { position: fixed; z-index: 30; font-size: 30px; pointer-events: none; animation: floatup 2.2s ease-out forwards; }
@keyframes floatup { from { opacity: 1; transform: translateY(0) scale(0.8); } to { opacity: 0; transform: translateY(-160px) scale(1.3); } }

/* ---------- gauntlet ---------- */
.g-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 1000px; }
.g-mode-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.g-cta { width: 100%; height: 100%; }
.g-cta.endless { --accent: #b4a6ff; }
.g-me { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.g-me-row { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: baseline; font-size: 13px; color: var(--muted); }
.g-me-row b { font-family: var(--font-mono); font-size: 20px; color: var(--gold); text-align: right; }
.run-screen { max-width: 1060px; margin: 0 auto; gap: 14px; }
.run-head { display: flex; flex-direction: column; gap: 12px; padding: 14px 18px; }
.rh-top { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; }
.rh-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.rh-title b { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--hot); letter-spacing: 1px; line-height: 1.2; }
.rh-title small { color: var(--muted); font-size: 13px; }
.rh-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.rh-stat { display: flex; flex-direction: column; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 5px 10px; min-width: 76px; }
.rh-stat b { font-family: var(--font-mono); font-size: 18px; color: var(--hot); font-weight: 600; }
.rh-stat b small { color: var(--muted); font-size: 12px; }
.hearts i { font-style: normal; color: #3a2a30; margin-right: 1px; }
.hearts i.full { color: var(--bad); }
.embers { color: var(--ember-2) !important; }
.rtrack { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.rcell { height: 24px; border: 1px solid var(--line); border-radius: 2px; background: rgba(0, 0, 0, 0.35); display: grid; place-items: center; font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.rcell small { font-size: 9px; opacity: 0.6; }
.rcell.boss { border-color: rgba(180, 140, 255, 0.45); color: var(--violet); }
.rcell.now { border-color: var(--hot); }
.rcell.won { background: rgba(94, 224, 138, 0.22); border-color: rgba(94, 224, 138, 0.6); color: var(--good); }
.rcell.lost { background: rgba(255, 93, 93, 0.18); border-color: rgba(255, 93, 93, 0.55); color: var(--bad); }
.run-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 14px; width: 100%; align-items: start; }
.run-weapon { display: flex; flex-direction: column; gap: 12px; }
.run-weapon .weapon-card { border: 0; padding: 0; background: none; backdrop-filter: none; box-shadow: none; }
.run-weapon .weapon-card canvas { width: 170px; height: 170px; }
.run-weapon .weapon-desc { font-size: 13px; }
.anvil-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 10px; color: var(--muted); text-align: center; font-size: 14px; }
.anvil-empty span { font-size: 44px; color: var(--line-strong); }
.anvil-empty p { margin: 0; }
.run-slots { display: flex; flex-direction: column; gap: 5px; }
.gslot { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 10px; background: rgba(0, 0, 0, 0.3); border-left: 3px solid var(--line-strong); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 14px; }
.gslot.empty { border-left-color: var(--line); }
.gslot.cracked { border-left-color: var(--bad); background: rgba(255, 93, 93, 0.07); }
.gslot .slot { font-family: var(--font-mono); font-weight: 600; font-size: 10px; letter-spacing: 1.5px; }
.gslot .t { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.gslot .t.muted { font-weight: 400; font-size: 12px; }
.gslot .p { font-family: var(--font-mono); font-size: 13px; color: var(--gold); }
.gslot em { font-style: normal; font-family: var(--font-mono); font-weight: 600; font-size: 9px; padding: 0 4px; border: 1px solid currentColor; border-radius: 4px; vertical-align: middle; }
.gslot em.hot { color: var(--ember-2); }
.gslot em.crack { color: var(--bad); }
.inlays { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.inlay { font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--ink-2); border: 1px dashed var(--line-strong); border-radius: 4px; padding: 0 5px; }
.inlay b { color: var(--gold); font-weight: 600; }
.charm-list { display: flex; flex-wrap: wrap; gap: 5px; }
.charm { font-family: var(--font-mono); font-size: 11px; padding: 2px 7px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink-2); cursor: help; }
.charm.rare { border-color: rgba(180, 140, 255, 0.6); color: var(--violet); }
.charm.unique { border-color: rgba(255, 207, 90, 0.55); color: #ffe3a0; background: rgba(255, 207, 90, 0.06); }
.charm.rune { border-color: rgba(79, 227, 200, 0.5); color: var(--s-form); }
.charm.used { opacity: 0.45; text-decoration: line-through; }
.run-main { display: flex; flex-direction: column; gap: 14px; min-height: 420px; }
.phase-head h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 4vw, 32px); letter-spacing: 1px; margin: 2px 0; }
.phase-head p { margin: 0; }
.draft-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.draft-timer { flex: 0 0 auto; width: 60px; height: 60px; }
.facedown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.card-back {
  height: 96px; border-radius: var(--radius); display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--panel-2); animation: rise 0.4s both;
}
.card-back i { font-style: normal; font-family: var(--font-display); font-weight: 900; font-size: 34px; color: var(--accent); opacity: 0.7; }
@keyframes float { 50% { transform: translateY(-4px); } }
.offers { display: flex; flex-direction: column; gap: 8px; }
.offer { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 14px 16px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-strong); border-radius: var(--radius); transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s; }
.offer.flip { animation: flip-in 0.5s cubic-bezier(.2, 1.2, .4, 1) both; transform-origin: 50% 50%; }
@keyframes flip-in { from { opacity: 0; transform: perspective(600px) rotateX(-80deg); } to { opacity: 1; transform: none; } }
.offer:hover { border-color: var(--accent); }
.offer-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.offer-text { font-size: 20px; font-weight: 600; line-height: 1.2; padding-right: 80px; }
.offer-sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.5px; }
.rider { position: absolute; top: 12px; right: 12px; font-family: var(--font-mono); font-weight: 600; font-size: 10px; letter-spacing: 1px; color: #1b0b00; background: var(--gold); padding: 1px 6px; border-radius: var(--radius-sm); }
.rider.inline { position: static; align-self: center; }
.unique-note { margin: 0; font-family: var(--font-mono); font-size: 12px; color: #ffe3a0; text-align: center; cursor: help; }
.camp { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.camp-box { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.camp-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; color: var(--ember-2); margin-right: 2px; }
.camp .btn.ghost .muted { letter-spacing: 0; font-weight: 400; text-transform: none; }
.boss-banner { border: 1px solid rgba(180, 140, 255, 0.5); border-left-width: 3px; border-radius: var(--radius); background: rgba(180, 140, 255, 0.07); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.boss-banner .kicker { color: var(--violet); }
.boss-banner b { font-family: var(--font-display); font-weight: 800; font-size: 21px; color: var(--hot); letter-spacing: 1px; }
.boss-banner p { margin: 0; font-size: 14px; }
.boss-banner .rule { color: var(--ink); }
.boss-banner .taunt { color: var(--muted); font-style: italic; }
.fight-note { font-size: 14px; padding: 8px 12px; border-left: 3px solid; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: rgba(0, 0, 0, 0.3); color: var(--ink-2); }
.fight-note.won { border-color: var(--good); }
.fight-note.lost { border-color: var(--bad); }
.fight-note .life { color: var(--bad); }
.place-word .wchip { animation: none; }
.place-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 14px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-strong); border-radius: var(--radius); transition: border-color 0.15s, box-shadow 0.15s; }
.choice:hover { border-color: var(--accent); }
.choice > b { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--hot); letter-spacing: 1px; }
.pv { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.pv .up { color: var(--good); }
.pv .down { color: var(--bad); }
.rewards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.reward { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 14px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-strong); border-radius: var(--radius); transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s; animation: pop 0.4s both; }
.reward:nth-child(2) { animation-delay: 80ms; }
.reward:nth-child(3) { animation-delay: 160ms; }
.reward:hover { border-color: var(--accent); }
.reward.rare { border-color: rgba(180, 140, 255, 0.65); }
.reward.rare .kicker { color: var(--violet); }
.reward.unique { border-color: rgba(255, 207, 90, 0.6); background: rgba(255, 207, 90, 0.05); }
.reward.unique .kicker { color: var(--gold); }
.reward.rune .kicker { color: var(--s-form); }
.reward .kicker { font-size: 10px; letter-spacing: 2px; }
.reward b { font-size: 17px; }
.reward .rtext { font-size: 14px; color: var(--ink); }
.reward .rflavor { font-size: 12px; color: var(--muted); font-style: italic; }
.done-head { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.done-head h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(32px, 7vw, 52px); letter-spacing: 3px; }
.done-head h2.win { color: var(--gold); }
.done-head h2.lose { color: var(--bad); }
.done-head p { margin: 0; color: var(--ink-2); }
.squares { font-size: 20px; letter-spacing: 2px; }
.fight-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.fight-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 10px; background: rgba(0, 0, 0, 0.25); border-left: 3px solid; border-radius: 0 6px 6px 0; font-size: 13px; }
.fight-list li.won { border-color: var(--good); }
.fight-list li.lost { border-color: var(--bad); }
.fight-list li span:first-child { font-family: var(--font-mono); color: var(--muted); }
.fight-list li small { display: block; color: var(--muted); font-size: 11px; }
.fight-list li b { font-family: var(--font-mono); font-size: 12px; }
.fight-list li.won b { color: var(--good); }
.fight-list li.lost b { color: var(--bad); }

/* ---------- home: how-to strip, the two main modes (v0.6) ---------- */
.hero .logo { display: inline-flex; align-items: center; gap: 0.18em; }
.hero .logo .hero-mark { width: 0.7em; height: 0.7em; margin: 0; flex: none; }
.how-strip { max-width: 1000px; padding: 14px 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.steps b { flex: none; width: 24px; height: 24px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); background: var(--accent); border-radius: var(--radius-sm); }
.how-strip .how { max-width: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.main-modes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; width: 100%; max-width: 1000px; }
.mode-panel { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; }
.mode-panel.ranked { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.mp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mode-kicker .ico { width: 14px; height: 14px; }
.mp-rating { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--muted); }
.mp-rating b { color: var(--gold); font-size: 14px; }
.mp-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 3.4vw, 28px); letter-spacing: 1px; color: var(--hot); }
.mp-sub { margin: 0; font-size: 14px; color: var(--ink); min-height: 2.7em; }
.mp-note { margin: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.3px; color: var(--muted); }
.mp-note.warn { color: var(--gold); }
.mp-actions { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 4px; }
.mp-actions .btn { flex: 1; }
.seg { display: flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; align-self: flex-start; max-width: 100%; }
.seg button { background: none; border: 0; border-right: 1px solid var(--line-strong); padding: 7px 14px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; color: var(--ink-2); }
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.boards.compact { max-width: 1000px; }
.boards.compact .board { padding: 12px 14px; }
.boards.compact .board h3 { margin-bottom: 6px; font-size: 11px; }
.boards.compact .board li { padding: 4px 0; font-size: 13px; }
.boards.compact .board li:nth-child(n+6) { display: none; }
.hub-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; width: 100%; max-width: 1000px; }

/* ---------- ranked fights on the run-over screen ---------- */
.ranked-box { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-left-width: 3px; border-radius: var(--radius); background: rgba(0, 0, 0, 0.3); }
.ranked-box h3 { margin: 0; font-family: var(--font-ui); font-size: 17px; letter-spacing: 0; color: var(--ink); display: block; }
.ranked-box p { margin: 0; }
.ranked-box.done h3 { font-family: var(--font-mono); font-size: 22px; font-weight: 600; }
.ranked-box.done.up { border-color: var(--good); }
.ranked-box.done.up h3 { color: var(--good); }
.ranked-box.done.down { border-color: var(--bad); }
.ranked-box.done.down h3 { color: var(--bad); }
.ranked-box .action-row { justify-content: flex-start; }
.run-log summary { cursor: pointer; font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; color: var(--ink-2); margin-bottom: 6px; }

/* ---------- armory ---------- */
.armory-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; width: 100%; }
.armory-list .mini-weapon .rec { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }

/* ---------- toast + modal ---------- */
.toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 40; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px 16px; max-width: min(92vw, 560px); text-align: center; font-size: 14px; animation: rise 0.25s; }
.modal { background: var(--panel-solid); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 24px; width: min(420px, 92vw); }
.modal::backdrop { background: rgba(3, 4, 8, 0.75); }
.modal.confirm h2 { font-size: 20px; }
.modal.confirm p { margin-bottom: 18px; }
.row-btns { display: flex; gap: 10px; justify-content: flex-end; }
.modal-close { position: absolute; top: 10px; right: 10px; }
.modal h2 { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: 1px; margin-bottom: 4px; }
.modal p { color: var(--ink-2); font-size: 14px; margin: 6px 0 14px; }
.modal form.stack { display: flex; flex-direction: column; gap: 10px; }
.modal label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.modal input { font-family: var(--font-mono); font-size: 15px; padding: 10px 12px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); outline: none; letter-spacing: 0; color: var(--ink); }
.modal input:focus { border-color: var(--accent); }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; color: var(--muted); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.profile-row { display: flex; justify-content: space-between; gap: 10px; font-family: var(--font-mono); font-size: 13px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.profile-row span:first-child { color: var(--muted); }
.pulse { animation: blink 1.2s infinite steps(2); }

/* ---------- responsive ---------- */
@media (max-width: 980px) { .mode-grid.four, .boards.three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 860px) { .nav-btn span { display: none; } .nav-btn { padding: 7px 9px; } #season-chip { display: none !important; } }
@media (max-width: 820px) {
  .weapon-layout { grid-template-columns: 1fr; }
  .run-layout { grid-template-columns: 1fr; }
  .run-main { order: -1; min-height: 0; }
  .rewards { grid-template-columns: 1fr; }
  .place-choices { grid-template-columns: 1fr; }
  .mode-grid, .mode-grid.four, .mode-grid.two { grid-template-columns: minmax(0, 1fr); }
  .g-modes, .main-modes, .hub-top { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 8px; }
  .boards, .boards.three { grid-template-columns: minmax(0, 1fr); }
  .vs-row { grid-template-columns: 1fr; }
  .vs-text { text-align: center; }
}
@media (max-width: 560px) {
  #app { padding: 14px 12px 48px; }
  .hud-box { min-width: 0; padding: 4px 8px; }
  .hud-value { font-size: 17px; }
  .pip { width: 14px; }
  .prompt-card { padding: 20px 16px 16px; }
  .answer-bar { grid-template-columns: auto 1fr; }
  .strike { grid-column: 1 / -1; }
  .input-wrap input, .af-ghost { font-size: 17px; }
  #me-rating { display: none !important; }
  .brand-word { display: none; }
  #topbar { padding: 8px 10px; gap: 6px; }
  .nav { margin-left: 0; }
  .top-right { flex-wrap: nowrap; gap: 6px; }
  .me { padding: 4px 8px; gap: 6px; }
  #me-handle { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chip.streak, #me-tier { display: none !important; }
  .nav-btn { padding: 7px 6px; }
  .nav { gap: 0; }
  .weapon-card canvas { width: 240px; height: 240px; }
  .facedown { gap: 6px; } .card-back { height: 70px; }
  .under-bar { flex-direction: column; }
  .rtrack { gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
