/* ══ Guession – Menü & Lobby Design ══════════════════════════════════════════ */
:root {
  --felt-0:   #0d3b2e;
  --felt-1:   #12523d;
  --felt-2:   #0a2c22;
  --ink:      #f4efe3;
  --ink-dim:  #b9c7bd;
  --muted:    #86988c;
  --gold:     #e8c479;
  --gold-2:   #f3dca0;
  --gold-deep:#b8923f;
  --teal:     #2fbf9b;
  --teal-2:   #38d6ae;
  --red:      #e0564f;
  --panel:    rgba(6, 32, 24, 0.72);
  --panel-2:  rgba(9, 45, 34, 0.85);
  --line:     rgba(232, 196, 121, 0.22);
  --line-soft:rgba(255, 255, 255, 0.08);
  --shadow:   0 18px 48px rgba(0, 0, 0, 0.45);
  --radius:   18px;
  --radius-sm:12px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% -10%, #17654b 0%, var(--felt-1) 40%, var(--felt-2) 100%),
    var(--felt-0);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: url("/images/backgrounds/Floor.png");
  background-size: 480px;
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
}

#app { position: relative; min-height: 100dvh; }

/* ── Bildschirme ─────────────────────────────────────────────────────────── */
.screen {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 44px) clamp(16px, 4vw, 32px) 64px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.screen[hidden] { display: none; }

/* ── Brand / Menü ────────────────────────────────────────────────────────── */
.brand { text-align: center; margin-top: clamp(10px, 5vh, 48px); }
.brand-title {
  font-size: clamp(46px, 11vw, 92px);
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 45%, var(--gold-deep));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
}
.brand-sub { color: var(--ink-dim); margin-top: 8px; letter-spacing: 0.04em; font-size: clamp(13px, 2.6vw, 16px); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  padding: clamp(18px, 3vw, 28px);
}

.menu-card {
  width: min(440px, 100%);
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 18px;
}
.menu-actions { display: flex; flex-direction: column; gap: 12px; }
.join-row { display: flex; gap: 10px; }
.join-row .input-code { flex: 1; text-align: center; letter-spacing: 0.35em; text-transform: uppercase; font-weight: 700; }

/* Spiele-Vorschau im Menü */
.game-strip { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.game-chip {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 128px; padding: 12px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px solid var(--line-soft);
}
.game-chip img { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.game-chip span { font-size: 12px; color: var(--ink-dim); }

/* ── Felder & Inputs ─────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 13px; color: var(--ink-dim); letter-spacing: 0.03em; }
.input {
  width: 100%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 16px;
  padding: 13px 15px;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.input::placeholder { color: #6f8378; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 196, 121, 0.18); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  font-family: inherit;
  font-size: 15px; font-weight: 700;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  cursor: pointer;
  transition: transform .08s, filter .15s, background .15s, border-color .15s;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn-big { padding: 15px 22px; font-size: 17px; }
.btn-primary { background: linear-gradient(180deg, var(--teal-2), var(--teal)); color: #05231b; }
.btn-secondary { background: rgba(232, 196, 121, 0.14); border-color: var(--line); color: var(--gold-2); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold-deep)); color: #2a1c00; }
.btn-ghost { background: rgba(255, 255, 255, 0.05); border-color: var(--line-soft); color: var(--ink-dim); }
.btn-danger { background: rgba(224, 86, 79, 0.16); border-color: rgba(224, 86, 79, 0.4); color: #ffb4af; }

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar { display: flex; align-items: center; gap: 12px; }
.topbar-title { flex: 1; text-align: center; font-size: clamp(18px, 4vw, 24px); letter-spacing: 0.03em; }
.btn-back { padding: 9px 14px; }
.spacer { flex: 1; }
.code-badge {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; letter-spacing: 0.05em; color: var(--ink-dim);
}
.code-badge strong { color: var(--gold-2); letter-spacing: 0.25em; font-size: 18px; }
.btn-copy { background: none; border: none; color: var(--gold); cursor: pointer; font-size: 16px; }

/* ── Lobby-Liste ─────────────────────────────────────────────────────────── */
.lobby-list { display: flex; flex-direction: column; gap: 12px; }
.lobby-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 14px 18px;
}
.lobby-row .logo { width: 52px; height: 52px; object-fit: contain; }
.lobby-row .meta { flex: 1; min-width: 0; }
.lobby-row .meta .r-title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.lobby-row .meta .r-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.lobby-row .r-code { font-family: ui-monospace, monospace; letter-spacing: 0.2em; color: var(--gold-2); }
.pill { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--ink-dim); }
.pill.live { background: rgba(224,86,79,.2); color: #ffb4af; }
.pill.lock { background: rgba(232,196,121,.16); color: var(--gold-2); }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* ── Lobby ───────────────────────────────────────────────────────────────── */
.lobby-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 18px;
  align-items: start;
  flex: 1;
}
.panel-title { font-size: 15px; letter-spacing: 0.04em; color: var(--gold-2); margin-bottom: 14px; }
.muted { color: var(--muted); font-weight: 400; }

.player-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.player-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,.22); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.player-item.me { border-color: var(--line); }
.player-item.off { opacity: 0.5; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; color: #05231b;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
}
.player-item .p-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-item .p-host { color: var(--gold); }
.player-item .ready-dot { width: 10px; height: 10px; border-radius: 50%; background: #4a5a50; }
.player-item .ready-dot.on { background: var(--teal-2); box-shadow: 0 0 8px var(--teal-2); }
.player-item .p-kick { background: none; border: none; color: var(--red); cursor: pointer; font-size: 16px; opacity: .7; }
.player-item .p-kick:hover { opacity: 1; }

/* Spiel-Hero + Picker */
.game-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.game-hero img { width: 88px; height: 88px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); }
.game-hero .g-name { font-size: 24px; font-weight: 800; }
.game-hero .g-tag { color: var(--ink-dim); font-size: 13px; margin-top: 3px; }

.game-picker { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.game-tab {
  flex: 1; min-width: 92px; text-align: center; cursor: pointer;
  padding: 10px 8px; border-radius: var(--radius-sm);
  background: rgba(0,0,0,.22); border: 1px solid var(--line-soft);
  color: var(--ink-dim); font-weight: 700; font-size: 13px; transition: .15s;
}
.game-tab img { width: 40px; height: 40px; object-fit: contain; display: block; margin: 0 auto 6px; }
.game-tab.active { border-color: var(--gold); background: rgba(232,196,121,.12); color: var(--gold-2); }
.game-tab.locked { cursor: default; opacity: .55; }

/* Options */
.settings-body { display: flex; flex-direction: column; gap: 16px; }
.opt { display: flex; flex-direction: column; gap: 8px; }
.opt-label { font-size: 13px; color: var(--ink-dim); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; background: rgba(0,0,0,.2); padding: 5px; border-radius: 12px; }
.seg-btn {
  flex: 1; min-width: 56px; border: none; cursor: pointer;
  padding: 9px 12px; border-radius: 8px; font-weight: 700; font-size: 13px;
  background: transparent; color: var(--ink-dim); transition: .12s; font-family: inherit;
}
.seg-btn.active { background: linear-gradient(180deg, var(--teal-2), var(--teal)); color: #05231b; }
.seg-btn:disabled { cursor: default; }
.seg.readonly .seg-btn { cursor: default; }

.opt-static { display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,0,0,.2); padding: 11px 14px; border-radius: var(--radius-sm); }
.opt-static .v { color: var(--gold-2); font-weight: 700; }

/* Passwort-Zeile */
.pw-row { display: flex; gap: 8px; align-items: center; }
.pw-row .input { flex: 1; }
.pw-eye { background: rgba(0,0,0,.25); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  width: 46px; cursor: pointer; color: var(--gold); font-size: 16px; }

.readonly-note { font-size: 12px; color: var(--muted); text-align: center; }

/* Footer */
.lobby-footer { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lobby-footer .btn { width: min(360px, 100%); }
.start-hint { color: var(--muted); font-size: 13px; min-height: 18px; text-align: center; }

/* Spiel-Platzhalter */
.game-placeholder { margin: auto; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.game-placeholder h2 { font-size: 32px; }

/* ── Verbindungsstatus ───────────────────────────────────────────────────── */
.conn { position: fixed; top: 12px; right: 12px; z-index: 40;
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-dim);
  background: rgba(0,0,0,.5); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-soft); }
.conn .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: pulse 1.2s infinite; }
.conn.ok .dot { background: var(--teal-2); animation: none; }
@keyframes pulse { 50% { opacity: .3; } }

/* ── Toasts ──────────────────────────────────────────────────────────────── */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 10px; z-index: 50; width: min(420px, 92vw); }
.toast { background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm); padding: 13px 16px; box-shadow: var(--shadow);
  animation: toastIn .25s ease; font-size: 14px; }
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--teal-2); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* ── Dialog ──────────────────────────────────────────────────────────────── */
.dialog { border: none; border-radius: var(--radius); padding: 0; background: transparent; color: var(--ink); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.dialog-form { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; width: min(360px, 90vw); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.dialog-form h3 { color: var(--gold-2); }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ══ SPIEL (Vollbild) ═════════════════════════════════════════════════════════ */
.game-stage {
  position: fixed; inset: 0;
  max-width: none; margin: 0; padding: 0;
  display: block; min-height: 100dvh; overflow: hidden;
  gap: 0;
}
.mau { position: absolute; inset: 0; display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 50% 42%, rgba(23,101,75,.35), rgba(6,32,24,.72) 78%); }
/* WICHTIG: eigene display-Regeln überschreiben sonst das hidden-Attribut ->
   sonst liegen unsichtbare Overlays über allem und blocken Klicks. */
.mau [hidden] { display: none !important; }

/* Rundeninfo + Zeit (oben mittig) */
.hud-round { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 14px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 10px 8px 18px; box-shadow: var(--shadow); }
.hud-round__info { font-weight: 700; letter-spacing: .03em; color: var(--ink); font-size: 14px; }
.hud-round__timer { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(0,0,0,.35); border: 2px solid var(--gold); color: var(--gold-2); font-weight: 800; font-size: 18px; }
.hud-round__timer.low { border-color: var(--red); color: #ffb4af; animation: pulse 1s infinite; }

/* Verlauf (oben rechts) */
.mau-log { position: absolute; top: 12px; right: 12px; z-index: 6; width: min(280px, 34vw);
  max-height: 15vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 10px 12px; box-shadow: var(--shadow); }
.mau-log__title { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 6px; }
.mau-log__list { list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.mau-log__list li { color: var(--ink-dim); line-height: 1.35; padding-left: 8px; border-left: 2px solid transparent; }
.mau-log__list .log-play  { color: var(--ink); border-left-color: var(--teal); }
.mau-log__list .log-draw  { border-left-color: #6f8378; }
.mau-log__list .log-round { color: var(--gold-2); border-left-color: var(--gold); font-weight: 600; }

.mau-exit { position: absolute; top: 14px; left: 14px; z-index: 6;
  background: rgba(0,0,0,.4); border: 1px solid var(--line-soft); color: var(--ink-dim);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; font-family: inherit; font-weight: 700; }
.mau-exit:hover { color: var(--ink); }

/* Tisch */
.mau-table { position: relative; flex: 1; margin: 62px 8px 4px; }
.mau-table::before { content: ""; position: absolute; inset: 6% 4%;
  background: radial-gradient(ellipse at 50% 45%, #17654b, #0c4231 70%, #08301f);
  border-radius: 50%; border: 10px solid #5a3d24;
  box-shadow: inset 0 8px 40px rgba(0,0,0,.5), 0 20px 60px rgba(0,0,0,.5); }
.mau-seats { position: absolute; inset: 0; }

/* Mitte: Stapel + Ablage */
.mau-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  display: flex; gap: 26px; align-items: flex-start; z-index: 2; }
.draw-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.draw-col .act-draw { width: 130px; padding: 11px 8px; font-size: 14px; }
.pile { position: relative; width: 88px; height: 123px; }
.pile-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); border-radius: 8px; }
.pile--draw.is-clickable { cursor: pointer; }
.pile--draw.is-clickable:hover { transform: translateY(-3px); transition: transform .12s; }
.pile-count { position: absolute; bottom: -8px; right: -8px; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--gold-2); font-weight: 800; font-size: 13px; border-radius: 999px; padding: 2px 8px; }
.wish-badge { position: absolute; top: -10px; left: -10px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--panel-2); border: 2px solid var(--gold); display: grid; place-items: center; }
.wish-badge img { width: 20px; height: 20px; }
.penalty-badge { position: absolute; top: -10px; right: -10px; background: var(--red); color: #fff;
  font-weight: 800; border-radius: 999px; padding: 2px 9px; font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.4); }

/* Spielerboxen */
.seat { position: absolute; transform: translate(-50%,-50%); width: 172px; z-index: 3;
  display: flex; gap: 10px; align-items: center;
  background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 14px;
  padding: 10px 13px; box-shadow: 0 8px 20px rgba(0,0,0,.4); transition: border-color .15s, box-shadow .15s; }
.seat.me { border-color: var(--line); }
.seat.current { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232,196,121,.35), 0 8px 24px rgba(0,0,0,.5); }
.seat.out { opacity: .5; filter: grayscale(.6); }
.seat.off { opacity: .55; }
.seat-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #05231b; background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.seat.current .seat-avatar { background: linear-gradient(180deg, var(--teal-2), var(--teal)); }
.seat-body { flex: 1; min-width: 0; }
.seat-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-you { color: var(--gold); font-size: 11px; }
.seat-stats { display: flex; gap: 10px; align-items: center; margin-top: 4px; font-size: 13px; color: var(--ink-dim); }
.seat-stats img { width: 15px; height: 15px; vertical-align: -3px; margin-right: 3px; }
.seat-points { color: var(--gold-2); font-weight: 700; margin-left: auto; }
.seat-outbadge { position: absolute; top: -8px; right: -8px; background: var(--red); color: #fff; font-size: 11px;
  font-weight: 800; border-radius: 999px; padding: 2px 8px; }
.seat-ring { position: absolute; left: 12px; right: 12px; bottom: 4px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; opacity: 0; }
.seat.current .seat-ring { opacity: 1; }
.seat-ring i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--teal-2), var(--gold)); }

/* Aktionsbuttons */
.mau-actions { position: absolute; right: 24px; bottom: 30px; z-index: 5; display: flex; }
.act { font-family: inherit; font-weight: 800; font-size: 15px; border: none; cursor: pointer;
  border-radius: 12px; padding: 12px 22px; box-shadow: var(--shadow); transition: filter .12s, transform .08s; }
.act:hover:not(:disabled) { filter: brightness(1.08); }
.act:active:not(:disabled) { transform: translateY(1px); }
.act:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.4); box-shadow: none; }
.act-draw { background: linear-gradient(180deg, var(--gold-2), var(--gold-deep)); color: #2a1c00; }
/* Passen/Aussetzen – prägnant unten rechts */
.act-pass--big { background: linear-gradient(180deg, var(--teal-2), var(--teal)); color: #05231b;
  font-size: 18px; padding: 16px 34px; min-width: 170px; letter-spacing: .02em; }

/* Handkarten */
.mau-hand { height: 172px; display: flex; justify-content: center; align-items: flex-end; gap: 0;
  padding-bottom: 12px; z-index: 4; }
.hcard { margin: 0 -14px; transition: transform .12s; transform: rotate(var(--rot, 0deg)); transform-origin: bottom center; }
.hcard img { width: 100px; height: 140px; object-fit: contain; border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0,0,0,.45); display: block; }
.hcard.playable { cursor: pointer; }
.hcard.playable:hover { transform: translateY(-22px) rotate(var(--rot, 0deg)); }
.hcard.playable img { outline: 3px solid var(--teal-2); outline-offset: -3px; box-shadow: 0 8px 18px rgba(0,0,0,.5), 0 0 14px rgba(56,214,174,.35); }

/* Wunschfarbe-Overlay (4 Kacheln mittig) */
.mau-modal { position: absolute; inset: 0; z-index: 21; display: grid; place-items: center;
  background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.wish-inner { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 32px; text-align: center; box-shadow: var(--shadow); }
.wish-inner h3 { color: var(--gold-2); margin-bottom: 20px; font-size: 20px; }
.wish-suits { display: flex; gap: 16px; }
.wish-suit { display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer;
  background: rgba(0,0,0,.25); border: 2px solid var(--line-soft); border-radius: 16px; padding: 20px 24px;
  color: var(--ink); font-family: inherit; font-weight: 700; font-size: 15px; transition: .15s; }
.wish-suit:hover { border-color: var(--gold); background: rgba(232,196,121,.14); transform: translateY(-3px); }
.wish-suit img { width: 56px; height: 56px; }

/* Ergebnis-/Rundenblatt-Overlay */
.mau-overlay { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(0,0,0,.66); backdrop-filter: blur(2px); }
.result-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 28px; text-align: center; box-shadow: var(--shadow); width: min(560px, 94vw); }
.result-mode { font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.result-card h2 { color: var(--gold-2); margin-bottom: 18px; font-size: 24px; }
.result-table { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: 15px; }
.result-table thead th { color: var(--muted); font-weight: 600; padding: 6px 10px; font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.result-table th.c-name, .result-table td.c-name { text-align: left; }
.result-table td { padding: 9px 10px; border-top: 1px solid var(--line-soft); text-align: center; }
.result-table td.c-name { text-align: left; font-weight: 600; }
.result-table td.c-wins { color: var(--ink-dim); font-weight: 700; }
.result-table td.c-total { color: var(--gold-2); font-weight: 800; }
.result-table td.c-gain { font-weight: 700; }
.result-table .g-plus { color: #ff8a7a; }
.result-table .g-win { color: var(--teal-2); font-weight: 700; }
.result-table tr.is-winner { background: rgba(56,214,174,.10); }
.result-table tr.is-winner td { border-top-color: rgba(56,214,174,.3); }
.result-table tr.is-out { opacity: .5; }
.tag-out { font-size: 11px; color: #ffb4af; background: rgba(224,86,79,.18); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.result-card .btn { width: 100%; }
th.c-wins, td.c-wins, th.c-num, td.c-num { white-space: nowrap; }

/* ── KillCard ─────────────────────────────────────────────────────────────── */
.kc-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px; z-index: 2; width: min(72%, 720px); }
.kc-phase { font-size: 15px; color: var(--ink-dim); text-align: center; min-height: 20px; }
.kc-phase b { color: var(--gold-2); }
.kc-table { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 100%; }
.kc-card { transition: transform .12s; }
.kc-card img { width: 62px; height: 87px; object-fit: contain; border-radius: 7px; display: block;
  box-shadow: 0 5px 12px rgba(0,0,0,.45); }
.kc-card.pick { cursor: pointer; }
.kc-card.pick:hover { transform: translateY(-8px); }
.kc-card.selected img { outline: 3px solid var(--gold); outline-offset: -3px; box-shadow: 0 8px 18px rgba(0,0,0,.5), 0 0 16px rgba(232,196,121,.55); }
.kc-card.selected { transform: translateY(-10px); }
.act-take { background: linear-gradient(180deg, var(--gold-2), var(--gold-deep)); color: #2a1c00; min-width: 150px; }
.kc-hint { color: var(--muted); font-size: 14px; align-self: center; }

.seat.victim { border-color: var(--gold-2); box-shadow: 0 0 0 2px rgba(243,220,160,.3), 0 8px 24px rgba(0,0,0,.5); }
.seat-badge { position: absolute; top: -9px; right: -9px; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 8px; }
.seat-badge.b-dead { background: #2a2a2a; }
.seat-badge.b-safe { background: rgba(56,214,174,.9); color: #05231b; }
.seat-badge.b-victim { background: var(--gold); color: #2a1c00; top: auto; bottom: -9px; right: auto; left: 50%; transform: translateX(-50%); }
.hcard.drawn img { outline: 3px solid var(--gold); outline-offset: -3px; box-shadow: 0 8px 18px rgba(0,0,0,.5), 0 0 16px rgba(232,196,121,.55); }

.result-table tr.is-loser { background: rgba(224,86,79,.12); }
.tag-safe { font-size: 11px; color: #05231b; background: rgba(56,214,174,.85); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }

@media (max-width: 720px) {
  .lobby-grid { grid-template-columns: 1fr; }
  .seat { width: 142px; padding: 8px; }
  .seat-name { font-size: 13px; }
  .hcard img { width: 78px; height: 109px; }
  .act-pass--big { font-size: 16px; padding: 13px 22px; min-width: 130px; }
  .mau-log { width: 44vw; }
  .kc-card img { width: 48px; height: 67px; }
}
