/* Timeline Card Battler – taktisches Dark-Theme (Spec #89/#110: schnelle Lesbarkeit). */
:root {
  --bg: #0d1017; --bg2: #141a24; --panel: #1a2130; --panel2: #222c3d;
  --line: #2c384c; --text: #e6ecf5; --muted: #8494ac;
  --accent: #4da3ff; --accent2: #6b5dff;
  --attack: #ff5d5d; --defense: #4da3ff; --trap: #b06bff; --instant: #46d98a;
  --ok: #46d98a; --bad: #ff6b6b; --gold: #ffce4d;
  --radius: 10px; --shadow: 0 6px 20px rgba(0,0,0,.35);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #182236 0%, var(--bg) 60%);
  color: var(--text); font-family: system-ui, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.45;
}
h1, h2, h3 { margin: 0 0 .5rem; font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: .8rem; } .center { text-align: center; }

/* ---- Buttons & Felder ---- */
.btn {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  padding: .55rem 1rem; border-radius: var(--radius); cursor: pointer; font-weight: 600;
  transition: transform .06s, background .15s, border-color .15s;
}
.btn:hover { background: #2a3548; border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--primary { background: linear-gradient(180deg, var(--accent), #2f7fe0); border-color: transparent; color: #fff; }
.btn--primary:hover { background: linear-gradient(180deg, #63b0ff, #3a8bf0); }
.btn--ghost { background: transparent; }
.btn--danger { border-color: #4a2530; color: #ff9b9b; }
.btn--danger:hover { background: #37202a; border-color: var(--bad); }
.btn--small { padding: .3rem .6rem; font-size: .82rem; }
.btn--icon { padding: .3rem .55rem; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; }
.field span { font-size: .82rem; color: var(--muted); }
input, select {
  background: var(--bg2); color: var(--text); border: 1px solid var(--line);
  padding: .55rem .7rem; border-radius: 8px; font-size: 1rem; width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.tag { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: .05rem .4rem; font-size: .7rem; color: var(--muted); }
.tag--you { color: var(--accent); border-color: var(--accent); }
.tag--ready { color: var(--ok); border-color: #2c5a45; }
.notice--error { color: var(--bad); margin-top: .6rem; }

.screen { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* ---- Menü ---- */
.menu { max-width: 760px; }
.logo { font-size: 2.4rem; text-align: center; letter-spacing: .5px; margin: 1rem 0 1.4rem; }
.logo span { display: block; font-size: 1.1rem; color: var(--accent); letter-spacing: 3px; text-transform: uppercase; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.menu-block { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.menu-block h3 { font-size: 1rem; }
.menu-block .btn { width: 100%; margin-top: .3rem; }
#m-deck { width: 100%; margin-top: .4rem; }
.lobby-list { margin-top: 1rem; }
.lobby-list__head { display: flex; justify-content: space-between; align-items: center; }
.lobby-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: .8rem; align-items: center; padding: .5rem 0; border-top: 1px solid var(--line); }
.lobby-row__code { font-weight: 700; letter-spacing: 1px; color: var(--gold); }

/* ---- Lobby ---- */
.lobby-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1rem; }
.code-big { font-size: 2rem; letter-spacing: 3px; color: var(--gold); margin: 0; }
.players { display: flex; flex-direction: column; gap: .4rem; }
.player-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: .8rem; align-items: center; padding: .55rem .7rem; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; }
.player-row.is-ready { border-color: #2c5a45; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #3a465c; }
.dot--on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.player-row__deck.ok { color: var(--ok); } .player-row__deck.bad { color: var(--bad); }
.player-row__status { color: var(--muted); font-size: .85rem; }
.lobby-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }

/* ---- Karten ---- */
.card {
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 2px solid var(--line);
  border-radius: 10px; padding: .55rem .6rem; width: 132px;
  user-select: none; position: relative;
}
/* Kategorie-Rand: Angriff rot, Defensiv blau, Falle lila, Effekt/Sofort grün. */
.card--attack { border-color: var(--attack); }
.card--defense { border-color: var(--defense); }
.card--trap { border-color: var(--trap); }
.card--instant, .card--effect { border-color: var(--instant); }
.card--compact { width: 118px; font-size: .82rem; }
.card--disabled { opacity: .45; filter: grayscale(.4); }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: .3rem; }
.card__name { font-weight: 700; font-size: .9rem; line-height: 1.15; }
.card__cost { background: var(--accent2); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-size: .8rem; font-weight: 700; flex: none; }
.card__meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; margin: .2rem 0; }
.card__body { font-size: .76rem; color: #c7d2e2; min-height: 2.2em; }
.card__target { font-size: .72rem; color: var(--accent); margin-top: .2rem; }
.card__stepper { display: flex; align-items: center; justify-content: space-between; margin-top: .45rem; gap: .3rem; }
.step { background: var(--bg); border: 1px solid var(--line); color: var(--text); width: 26px; height: 26px; border-radius: 6px; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.step:hover { border-color: var(--accent); }
.step__count { font-size: .78rem; color: var(--muted); }
.draggable { cursor: grab; }
.drag-ghost { position: fixed; transform: translate(-50%, -50%); pointer-events: none; z-index: 999; opacity: .9; box-shadow: var(--shadow); }
body.dragging { cursor: grabbing; }

/* ---- Deckeditor ---- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5,8,14,.7); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 100; padding: 1rem; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); width: 100%; max-width: 920px; max-height: 90vh; display: flex; flex-direction: column; }
.modal__head { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.modal__head h2 { margin: 0; }
.deck-count { font-weight: 700; margin-left: auto; } .deck-count.ok { color: var(--ok); } .deck-count.bad { color: var(--gold); }
.deck-tools { display: flex; gap: .6rem; align-items: center; padding: .8rem 1.2rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.filters { display: flex; gap: .35rem; }
.chip { background: var(--bg2); border: 1px solid var(--line); color: var(--muted); padding: .3rem .7rem; border-radius: 20px; cursor: pointer; font-size: .82rem; }
.chip--on { background: var(--accent); color: #fff; border-color: transparent; }
.search { max-width: 220px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: .7rem; padding: 1rem 1.2rem; overflow-y: auto; }
.card-grid .card { width: auto; }
.modal__foot { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.2rem; border-top: 1px solid var(--line); }
.target-modal { max-width: 360px; padding: 1.2rem; }
.target-list { display: flex; flex-direction: column; gap: .5rem; margin: .8rem 0; }
.target-btn { text-align: left; }

/* ---- Kampf: Spiel-Layout (Vollbild) ---- */
.game { position: fixed; inset: 0; overflow: hidden; background: var(--bg); }
.loading { color: var(--muted); text-align: center; padding-top: 40vh; }

/* Bühne */
.scene { position: absolute; inset: 0; z-index: 0; }
.scene-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mtn--far { fill: #1b2740; } .mtn--near { fill: #202c45; }
.ground { fill: #171f2c; } .ground-line { fill: #33415a; }
.actors { position: absolute; inset: 0; }
.actor { position: absolute; bottom: 30%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; width: 154px; pointer-events: none; }
.actor--enemy { pointer-events: auto; cursor: crosshair; }
.actor.is-dead { filter: grayscale(.85) brightness(.55); opacity: .55; }
.actor--enemy.drop-hover .avatar { filter: drop-shadow(0 0 10px var(--attack)); }
.actor--enemy.drop-hover .pbox { border-color: var(--attack); box-shadow: 0 0 0 2px var(--attack) inset; }

.avatar { position: relative; width: 110px; height: 106px; pointer-events: none; }
/* Idle-Bob auf dem SVG; Gegner werden dabei gespiegelt (Bob-Variante mit scaleX). */
.avatar svg { width: 100%; height: 100%; overflow: visible; animation: bob 2.6s ease-in-out infinite; }
.actor--enemy .avatar svg { animation: bob-mirror 2.6s ease-in-out infinite; }
.a-body { fill: var(--c); } .a-foot { fill: var(--c); filter: brightness(.75); } .a-shadow { fill: rgba(0,0,0,.4); }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes bob-mirror { 0%,100% { transform: translateY(0) scaleX(-1); } 50% { transform: translateY(-6px) scaleX(-1); } }

/* Angriffs-Dash: kurzer Sprung nach vorne und zurück (eigen nach rechts, Gegner nach links). */
.actor--you .avatar.is-dash { animation: dash-r .5s ease; }
.actor--enemy .avatar.is-dash { animation: dash-l .5s ease; }
@keyframes dash-r { 0% { transform: translateX(0); } 40% { transform: translateX(40px); } 100% { transform: translateX(0); } }
@keyframes dash-l { 0% { transform: translateX(0); } 40% { transform: translateX(-40px); } 100% { transform: translateX(0); } }

/* Hüllen-Effekte um den Avatar */
.avatar.fx-shield-blue::after, .avatar.fx-shield-purple::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 122px; height: 122px; border-radius: 50%;
  transform: translate(-50%, -50%); pointer-events: none; animation: sphere-in .3s ease-out;
}
.avatar.fx-shield-blue::after {
  background: radial-gradient(circle, rgba(77,163,255,.28), rgba(77,163,255,.06) 62%, transparent 72%);
  border: 2px solid rgba(120,190,255,.75); box-shadow: 0 0 20px rgba(77,163,255,.6);
}
.avatar.fx-shield-purple::after {
  background: radial-gradient(circle, rgba(176,107,255,.30), rgba(176,107,255,.07) 62%, transparent 72%);
  border: 2px solid rgba(200,150,255,.8); box-shadow: 0 0 20px rgba(176,107,255,.65);
}
.avatar.fx-aura-white::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 134px; height: 134px; border-radius: 50%;
  transform: translate(-50%, -50%); pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(255,255,255,.45), rgba(255,255,255,.12) 55%, transparent 70%);
  animation: flare .45s ease-in-out infinite alternate;
}
@keyframes sphere-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.7); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes flare { from { opacity: .5; transform: translate(-50%, -50%) scale(.92); } to { opacity: .95; transform: translate(-50%, -50%) scale(1.1); } }

.pbox { width: 154px; background: rgba(18,24,36,.85); border: 1px solid var(--line); border-radius: 10px; padding: .4rem .5rem; margin-bottom: .4rem; backdrop-filter: blur(3px); pointer-events: none; }
.pbox--you { border-color: var(--accent); }
.pbox__name { font-weight: 700; font-size: .82rem; display: flex; justify-content: space-between; align-items: center; }
.pbox__you { color: var(--accent); font-size: .66rem; border: 1px solid var(--accent); border-radius: 5px; padding: 0 .3rem; }
.pbox__hpbar { position: relative; height: 16px; background: var(--bg); border-radius: 10px; overflow: hidden; margin: .28rem 0; }
.hpfill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #e0574f, #ff8a5c); transition: width .35s ease; }
.hptxt { position: relative; display: block; text-align: center; font-size: .66rem; line-height: 16px; text-shadow: 0 1px 2px #000; }
.pbox__stats { display: flex; justify-content: space-between; font-size: .74rem; }
.st-energy { color: var(--instant); } .st-shield { color: var(--defense); }
.pbox__statuses { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .25rem; }
.status-chip { background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 0 .35rem; font-size: .64rem; color: var(--trap); }

/* Countdown-Vorlauf (groß im Spielfeld) */
.countdown { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; pointer-events: none;
  font-size: 24vh; font-weight: 900; color: rgba(255,255,255,.92); text-shadow: 0 8px 30px rgba(0,0,0,.7); }
.countdown--pulse { animation: cd-pulse 1s ease-out; }
.countdown--go { color: var(--gold); animation: cd-go .4s ease-out; }
@keyframes cd-pulse { 0% { transform: scale(1.6); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1); opacity: .85; } }
@keyframes cd-go { 0% { transform: scale(.6); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1.2); opacity: 0; } }

/* Spieler-Popups */
.pop-layer { position: absolute; bottom: 100%; left: 50%; width: 0; }
.pop { position: absolute; left: 0; transform: translateX(-50%); white-space: nowrap; font-weight: 800; font-size: 1.05rem; text-shadow: 0 2px 4px #000; animation: pop 1.2s ease-out forwards; }
.pop-dmg { color: #ff6b6b; } .pop-heal { color: var(--ok); } .pop-shield { color: var(--defense); }
.pop-block, .pop-status { color: #cdd7e6; } .pop-trap { color: #ffb14d; } .pop-dot { color: var(--trap); }
.pop-death { font-size: 1.7rem; } .pop-cast { color: var(--gold); font-size: .9rem; } .pop-buff { color: var(--instant); }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, 10px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -42px); } }

/* "Bereit!"-Sprechblase über dem Avatar (nur Planung, für alle sichtbar) */
.ready-bubble { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 4;
  background: var(--ok); color: #04240f; font-weight: 800; font-size: .78rem; padding: .2rem .6rem; border-radius: 12px;
  white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.4); animation: bubble-in .25s ease-out; }
.ready-bubble::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--ok); }
@keyframes bubble-in { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); } 100% { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* HUD: Runde/Phase (oben mittig) */
.hud-top { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 12; display: flex; gap: .6rem; align-items: center; background: rgba(18,24,36,.9); border: 1px solid var(--line); border-radius: 20px; padding: .35rem 1rem; pointer-events: none; }
.hud-top__round { font-weight: 700; }
.hud-top__phase { font-size: .82rem; color: var(--muted); }
.hud-top__phase.phase--execution { color: var(--gold); }

/* HUD: Ereignislog (oben rechts) */
.hud-log { position: absolute; top: 12px; right: 12px; z-index: 12; width: 300px; max-height: 40vh; background: rgba(11,14,20,.88); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; backdrop-filter: blur(3px); }
.hud-log__title { padding: .4rem .7rem; font-weight: 700; font-size: .8rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.hud-log__body { overflow-y: auto; padding: .3rem .6rem; }
.logline { font-size: .76rem; padding: .22rem 0; border-bottom: 1px solid rgba(255,255,255,.05); color: #c7d2e2; }

/* HUD: Timeline */
.hud-timeline { position: absolute; left: 12px; right: 190px; bottom: 182px; z-index: 10; background: rgba(11,14,20,.82); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .6rem; backdrop-filter: blur(3px); }
.hud-timeline--exec { right: 12px; bottom: 16px; max-height: 60vh; }
.tl-head { font-size: .78rem; color: var(--muted); margin-bottom: .35rem; }
.tl-plan { display: flex; align-items: stretch; gap: .4rem; min-height: 84px; overflow-x: auto; }
.tl-plan.drop-hover { outline: 2px solid var(--accent); border-radius: 8px; }
.tl-zero { align-self: center; color: var(--muted); font-size: .72rem; }
.tl-hint { align-self: center; color: var(--muted); font-size: .82rem; margin: auto; }
/* Eigene Timeline-Karten: weißer Hintergrund, dunkler Text, voller Kategorie-Rand. */
.tl-chip { flex: none; width: 150px; background: #fff; color: #16181d; border: 2px solid var(--line); border-radius: 8px; padding: .35rem .45rem; display: flex; flex-direction: column; gap: .15rem; }
.tl-chip--attack { border-color: var(--attack); } .tl-chip--defense { border-color: var(--defense); } .tl-chip--effect { border-color: var(--instant); }
.tl-chip__top { display: flex; justify-content: space-between; align-items: center; gap: .3rem; }
.tl-chip__name { font-weight: 700; font-size: .8rem; }
.tl-chip__remove { background: none; border: none; color: #9aa3b0; cursor: pointer; font-size: .8rem; }
.tl-chip__remove:hover { color: var(--bad); }
.tl-chip__info { font-size: .66rem; color: #5c6674; }
.tl-chip__foot { display: flex; justify-content: space-between; align-items: center; gap: .3rem; margin-top: auto; }
.tl-chip__at { font-size: .66rem; color: #a06a00; }
.tl-chip__retarget { background: #eef2f7; border: 1px solid #cbd5e2; color: #1d6fe0; border-radius: 5px; padding: 0 .3rem; font-size: .66rem; cursor: pointer; }

/* Ausführungs-Timelines + Abspielkopf (horizontal scrollbar bei breiten Timelines) */
.xl-scrollwrap { overflow: auto; max-height: 52vh; scroll-behavior: smooth; }
.xl-scroll { position: relative; }
.xl-row { display: flex; align-items: center; height: 40px; border-bottom: 1px solid rgba(255,255,255,.05); }
.xl-row--you { background: rgba(91,140,255,.10); }
.xl-label { width: 96px; flex: none; font-size: .74rem; padding-right: .5rem; text-align: right; color: #c7d2e2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: sticky; left: 0; z-index: 3; background: #0f131b; }
.xl-track { position: relative; height: 40px; flex: none; }
.xl-chip { position: absolute; top: 5px; height: 30px; border-radius: 6px; padding: 0 .4rem; display: flex; align-items: center; gap: .25rem; font-size: .7rem; overflow: hidden; white-space: nowrap; border: 2px solid var(--line); }
/* Kategorie-Rand */
.xl-chip--attack { border-color: var(--attack); } .xl-chip--defense { border-color: var(--defense); } .xl-chip--effect { border-color: var(--instant); }
/* Hintergrund nach Zugehörigkeit: eigene weiß, Gegner 70% schwarz, gegen MICH gerichtet schwarz. */
.xl-own { background: #fff; color: #16181d; }
.xl-enemy { background: rgba(0,0,0,.7); color: #fff; }
.xl-vsme { background: #000; color: #fff; }
.xl-chip b { font-weight: 700; } .xl-chip em { font-style: normal; }
.xl-own em { color: #5c6674; } .xl-enemy em, .xl-vsme em { color: #d0d8e4; }
.xl-empty { color: var(--muted); font-size: .7rem; padding-left: .4rem; }
.xl-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.xl-playhead::before { content: ''; position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; background: var(--gold); border-radius: 50%; }

/* Bestätigen-Button (rechts, auf Timeline-Höhe) */
.hud-confirm { position: absolute; right: 12px; bottom: 196px; z-index: 13; width: 162px; background: linear-gradient(180deg, #ffce4d, #efab30); color: #241a00; border: none; font-weight: 800; padding: .75rem 1rem; border-radius: 12px; cursor: pointer; box-shadow: var(--shadow); }
.hud-confirm.is-on { background: linear-gradient(180deg, #46d98a, #2fae6b); color: #04240f; }
.hud-confirm:disabled { opacity: .5; cursor: default; }

/* Hand (unten mittig, schwebend) */
.hud-hand { position: absolute; left: 0; right: 0; bottom: 8px; z-index: 11; display: flex; justify-content: center; pointer-events: none; }
.hand-fan { display: flex; gap: .5rem; padding: .3rem; pointer-events: auto; max-width: 96vw; overflow-x: auto; }
.hand-card { flex: none; box-shadow: 0 10px 22px rgba(0,0,0,.5); transition: transform .12s; }
.hand-card:hover { transform: translateY(-12px); }
.hand-empty { color: var(--muted); padding: 1.5rem; }

/* ---- Floater / Toast ---- */
.floater { position: fixed; transform: translate(-50%, 0); font-weight: 800; font-size: 1.1rem; pointer-events: none; z-index: 500; text-shadow: 0 2px 4px #000; animation: floatUp 1.1s ease-out forwards; }
.flt-dmg { color: #ff6b6b; } .flt-heal { color: var(--ok); } .flt-shield { color: var(--defense); }
.flt-block, .flt-status { color: var(--muted); } .flt-trap { color: #ffb14d; } .flt-dot { color: var(--trap); } .flt-death { font-size: 1.6rem; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 6px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -34px); } }
.toast { position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line); padding: .6rem 1.1rem; border-radius: 20px; z-index: 600; box-shadow: var(--shadow); transition: opacity .3s; }
.toast--out { opacity: 0; }

/* ---- Ergebnis ---- */
.result { max-width: 640px; text-align: center; }
.result__title { font-size: 3rem; letter-spacing: 4px; margin-top: 1.5rem; }
.result__title.win { color: var(--gold); } .result__title.lose { color: var(--muted); }
.stats { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.stats th, .stats td { padding: .45rem .6rem; border-bottom: 1px solid var(--line); text-align: left; }
.stats .is-winner { color: var(--gold); font-weight: 700; }
.result__actions { display: flex; gap: .6rem; justify-content: center; margin-top: 1.2rem; }

@media (max-width: 640px) {
  .menu-grid { grid-template-columns: 1fr; }
  .hud-timeline { right: 12px; bottom: 208px; }
  .hud-confirm { right: 12px; bottom: 150px; width: auto; padding: .5rem .8rem; }
  .hud-log { width: 190px; max-height: 28vh; }
  .actor { width: 120px; }
}
