:root {
  --bg: #f4efe6;
  --ink: #1d2230;
  --ink-2: #5d6272;
  --ink-3: #8f93a0;
  --line: #ddd4c4;
  --card: #fffcf6;
  --felt: #1f5c64;
  --felt-2: #14424a;
  --felt-ink: #eef7f6;
  --accent: #e0402f;
  --gold: #e0a93a;
  --gold-soft: #f6e5bd;
  --shadow: 0 1px 2px rgb(30 25 15 / .08), 0 8px 24px rgb(30 25 15 / .09);
  --radius: 14px;
  --cr: #e0402f; --cy: #f2b31b; --cg: #2e9a52; --cb: #2b6ed6; --cw: #23232b;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10141d; --ink: #eceef3; --ink-2: #a8adbb; --ink-3: #6f7484; --line: #252c3b; --card: #171d29;
    --felt: #17474f; --felt-2: #0e3036; --felt-ink: #e8f4f3; --accent: #ff6a55; --gold: #efbe55; --gold-soft: #3a3018;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35); --cw: #15151b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10141d; --ink: #eceef3; --ink-2: #a8adbb; --ink-3: #6f7484; --line: #252c3b; --card: #171d29;
  --felt: #17474f; --felt-2: #0e3036; --felt-ink: #e8f4f3; --accent: #ff6a55; --gold: #efbe55; --gold-soft: #3a3018;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35); --cw: #15151b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh; -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
a.btn { text-decoration: none; }

/* ---------- Kopf ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; max-width: 1100px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 30px; display: block; }
.brand span { font: italic 800 1.5rem/1 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.code-badge {
  font: 700 .95rem/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .18em;
  padding: 7px 10px 7px 12px; border-radius: 999px; background: var(--gold-soft); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); cursor: pointer;
}
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
main { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }

/* ---------- Buttons & Felder ---------- */
.btn {
  appearance: none; border-radius: 12px; padding: 12px 18px; cursor: pointer; font-weight: 650;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  transition: transform .08s, background .2s, opacity .2s;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn.dark { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.dashed { border-style: dashed; background: transparent; margin-top: 10px; }
.btn.block { width: 100%; }
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; color: var(--ink-2); font-weight: 600; }
.input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); min-height: 46px; }
.input:focus, .btn:focus-visible, .slot:focus-within, .swatch:focus-visible, .pile:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 65%, transparent); outline-offset: 2px; }
.input.code { text-transform: uppercase; letter-spacing: .4em; font: 700 1.4rem/1 ui-monospace, Menlo, monospace; text-align: center; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.err { color: var(--accent); font-size: .9rem; min-height: 1.2em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h2 { margin: 0 0 4px; font-size: 1.15rem; }
.card p { margin: 0 0 14px; }
.card form { display: grid; gap: 12px; }
.cards { display: grid; gap: 14px; }
.tag { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--ink); white-space: nowrap; }
.tag.bot { background: color-mix(in srgb, var(--cb) 18%, transparent); }
.spacer { flex: 1; }
.link-btn { background: none; border: 0; color: var(--ink-2); cursor: pointer; text-decoration: underline; padding: 4px; }

/* ---------- Karten ---------- */
.uc {
  --w: 76px; --cc: var(--cw);
  width: var(--w); height: calc(var(--w) * 1.5); flex: none; position: relative;
  border-radius: calc(var(--w) * .13); color: #fff; user-select: none; -webkit-user-select: none;
  background:
    linear-gradient(155deg, rgb(255 255 255 / .28), rgb(255 255 255 / 0) 38%, rgb(0 0 0 / .14)),
    var(--cc);
  box-shadow: 0 0 0 calc(var(--w) * .035) #fff, 0 2px 4px rgb(0 0 0 / .25), 0 6px 14px rgb(0 0 0 / .18);
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
}
.uc.c-r { --cc: var(--cr); } .uc.c-y { --cc: var(--cy); } .uc.c-g { --cc: var(--cg); } .uc.c-b { --cc: var(--cb); } .uc.c-w { --cc: var(--cw); }
.uc::before { /* feine Innenlinie */
  content: ""; position: absolute; inset: calc(var(--w) * .07); border-radius: calc(var(--w) * .08);
  border: 1px solid rgb(255 255 255 / .35);
}
.uc .medal {
  position: absolute; left: 50%; top: 50%; width: 58%; aspect-ratio: 1; border-radius: 22%;
  transform: translate(-50%, -50%) rotate(45deg); background: #fff;
  box-shadow: inset 0 calc(var(--w) * -.03) 0 rgb(0 0 0 / .1), 0 1px 3px rgb(0 0 0 / .2);
}
.uc .medal > span { position: absolute; inset: 0; display: grid; place-items: center; transform: rotate(-45deg); color: var(--cc); }
.uc .medal b { font-weight: 900; font-size: calc(var(--w) * .46); line-height: 1; letter-spacing: -.03em; text-shadow: 0 2px 0 rgb(0 0 0 / .12); }
.uc .medal b.ul { text-decoration: underline; text-decoration-thickness: calc(var(--w) * .035); text-underline-offset: calc(var(--w) * .04); }
.uc .medal b.pl { font-size: calc(var(--w) * .36); }
.uc .medal svg { width: 62%; height: 62%; }
.uc .medal .wheel { width: 90%; height: 90%; transform: rotate(-45deg); }
.uc .medal b.over { position: absolute; color: #fff; font-size: calc(var(--w) * .3); text-shadow: 0 0 3px rgb(0 0 0 / .7), 0 1px 0 #000; }
.uc.c-w .medal { background: #fff; }
.uc .ix {
  position: absolute; font-weight: 900; font-size: calc(var(--w) * .2); line-height: 1; text-shadow: 0 1px 1px rgb(0 0 0 / .35);
  display: grid; place-items: center; min-width: calc(var(--w) * .2);
}
.uc .ix svg { width: calc(var(--w) * .2); height: calc(var(--w) * .2); filter: drop-shadow(0 1px 1px rgb(0 0 0 / .35)); }
.uc .ix u { text-decoration-thickness: 2px; text-underline-offset: 2px; }
.uc .ix.tl { left: calc(var(--w) * .11); top: calc(var(--w) * .1); }
.uc .ix.br { right: calc(var(--w) * .11); bottom: calc(var(--w) * .1); transform: rotate(180deg); }
.mini-wheel { display: block; width: calc(var(--w) * .17); height: calc(var(--w) * .17); border-radius: 50%; background: conic-gradient(var(--cr) 0 25%, var(--cb) 0 50%, var(--cy) 0 75%, var(--cg) 0); box-shadow: 0 0 0 1px #fff; }
.uc.sm { --w: 52px; }

.uc.back {
  --cc: #1b2030;
  background:
    repeating-linear-gradient(45deg, rgb(255 255 255 / .05) 0 4px, transparent 4px 9px),
    radial-gradient(circle at 50% 50%, #2c3550, #141826 75%);
}
.uc.back::before { border-color: rgb(255 255 255 / .22); }
.back-mark {
  position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; border-radius: 22%;
  transform: translate(-50%, -50%) rotate(45deg);
  background: conic-gradient(from 45deg, var(--cr) 0 25%, var(--cb) 0 50%, var(--cy) 0 75%, var(--cg) 0);
  box-shadow: 0 0 0 calc(var(--w) * .035) #fff, 0 2px 6px rgb(0 0 0 / .4);
}
.uc.flyer { --w: 60px; position: fixed; z-index: 70; pointer-events: none; }

/* ---------- Startseite ---------- */
.hero { display: grid; gap: 28px; padding: 16px 0 8px; grid-template-columns: 1.1fr 1fr; align-items: center; }
.hero h1 { font: italic 800 clamp(2.5rem, 7vw, 4.4rem)/.98 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; margin: 0 0 14px; letter-spacing: -.01em; }
.hero h1 em { color: var(--accent); }
.hero p.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 31rem; margin: 0; }
.fan { position: relative; height: clamp(170px, 34vw, 230px); margin: 30px 0 0; max-width: 420px; }
.fan-slot { position: absolute; left: 50%; bottom: 0; transform-origin: 50% 120%; transform: translateX(-50%) rotate(calc(var(--i) * 13deg)) translateY(calc(var(--a) * 6px)); transition: transform .3s; }
.fan-slot .uc { --w: clamp(84px, 16vw, 112px); }
.fan:hover .fan-slot { transform: translateX(-50%) rotate(calc(var(--i) * 17deg)) translateY(calc(var(--a) * 8px - 6px)); }
.leader { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.leader li { display: flex; align-items: baseline; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--bg); }
.leader .place { width: 1.5em; font-weight: 800; color: var(--ink-3); }
.leader .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.leader .wins b { font-variant-numeric: tabular-nums; }

/* ---------- Lobby ---------- */
.lobby { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; padding-top: 8px; align-items: start; }
.share-code { font: 800 clamp(2.8rem, 12vw, 4.5rem)/1 ui-monospace, Menlo, monospace; letter-spacing: .22em; text-align: center; padding: 18px 0 14px; }
.player-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.player-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.player-list .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .9rem; flex: none; position: relative; line-height: 1; }
.avatar.sm { width: 22px; height: 22px; font-size: .7rem; }
.avatar .dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); border: 2px solid var(--card); }
.avatar .dot.on { background: #3ccf6e; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); margin: 12px 0 0; cursor: pointer; }
.opt.ro { cursor: default; }
.opt input { accent-color: var(--accent); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.opt small { display: block; color: var(--ink-2); font-weight: 400; }

/* ---------- Spiel ---------- */
.game { display: grid; gap: 14px; max-width: 900px; margin: 0 auto; grid-template-columns: minmax(0, 1fr); }
.game > * { min-width: 0; }
.opps { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.opp {
  position: relative; min-width: 104px; max-width: 150px; padding: 8px 10px 9px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.opp.cur { border-color: var(--cur); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cur) 45%, transparent), var(--shadow); transform: translateY(-2px); }
.opp-name { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: .92rem; }
.opp-name span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opp-meta { font-size: .78rem; color: var(--ink-2); }
.mini-fan { height: 34px; position: relative; margin-bottom: 4px; }
.mini-fan i {
  position: absolute; left: 50%; bottom: 0; width: 20px; height: 30px; border-radius: 4px; transform-origin: 50% 140%;
  transform: translateX(-50%) rotate(calc(var(--k) * 9deg));
  background: radial-gradient(circle, #2c3550, #141826 80%); box-shadow: 0 0 0 1.5px #fff, 0 1px 3px rgb(0 0 0 / .3);
}
.mini-fan i::after { content: ""; position: absolute; inset: 9px 4px; border-radius: 3px; transform: rotate(45deg) scale(.7); background: conic-gradient(var(--cr) 0 25%, var(--cb) 0 50%, var(--cy) 0 75%, var(--cg) 0); }
.uno-flag {
  position: absolute; top: -9px; right: -8px; background: var(--accent); color: #fff; font: 900 .72rem/1 system-ui, sans-serif;
  padding: 5px 7px; border-radius: 999px; transform: rotate(8deg); box-shadow: 0 2px 6px rgb(0 0 0 / .25); letter-spacing: .05em;
}
.catch-mini { margin-top: 6px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 800; font-size: .78rem; padding: 5px 10px; cursor: pointer; animation: pulse 0.9s ease-in-out infinite; }

.felt {
  position: relative; border-radius: 26px; padding: clamp(22px, 5vw, 34px) 16px clamp(46px, 8vw, 56px);
  background: radial-gradient(120% 100% at 50% 20%, var(--felt), var(--felt-2) 80%);
  color: var(--felt-ink); box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--cur) 55%, transparent), var(--shadow);
  display: flex; justify-content: center; align-items: center; gap: clamp(28px, 9vw, 70px); overflow: hidden;
  transition: box-shadow .4s;
}
.dir-ring { position: absolute; width: min(92%, 380px); aspect-ratio: 1; left: 50%; top: 50%; translate: -50% -50%; pointer-events: none; opacity: .22; }
.dir-ring circle { fill: none; stroke: var(--felt-ink); stroke-width: .6; stroke-dasharray: 2 2.5; }
.dir-ring path { fill: var(--felt-ink); }
.dir-ring.cw { animation: turn 30s linear infinite; }
.dir-ring.ccw { animation: turn 30s linear infinite reverse; }
.dir-ring.ccw path { transform-box: fill-box; }
.dir-ring.ccw { transform: scaleX(-1); }
@keyframes turn { to { rotate: 360deg; } }
.pile { position: relative; --w: clamp(78px, 21vw, 108px); width: var(--w); height: calc(var(--w) * 1.5); border: 0; padding: 0; background: none; }
.pile .uc { --w: inherit; position: absolute; inset: 0; width: 100%; height: 100%; }
.draw-pile .d3 { transform: translate(-6px, 6px); }
.draw-pile .d2 { transform: translate(-3px, 3px); }
.draw-pile.can { cursor: pointer; }
.draw-pile.can .d1 { animation: nudge 1.8s ease-in-out infinite; }
.draw-pile.can:hover .d1 { transform: translateY(-6px) rotate(-3deg); animation: none; }
@keyframes nudge { 50% { transform: translateY(-5px) rotate(-2deg); } }
.deck-count {
  position: absolute; left: -12px; top: -10px; z-index: 2; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 999px;
  display: grid; place-items: center; background: #fff; color: #1b2030; font: 800 .8rem/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums; box-shadow: 0 2px 6px rgb(0 0 0 / .3);
}
.pile-card { position: absolute; inset: 0; }
.pile-card .uc { transform: rotate(var(--r)) translate(calc(var(--o) * -1px), calc(var(--o) * 1px)); filter: brightness(calc(1 - var(--o) * .06)); }
.pile-top .uc { box-shadow: 0 0 0 calc(var(--w) * .035) #fff, 0 0 0 calc(var(--w) * .035 + 4px) var(--cur), 0 8px 22px rgb(0 0 0 / .35); }
.pending {
  position: absolute; right: -16px; top: -14px; z-index: 3; background: #fff; color: var(--accent);
  font: 900 1.2rem/1 system-ui, sans-serif; padding: 8px 10px; border-radius: 999px; box-shadow: 0 3px 10px rgb(0 0 0 / .3);
  animation: pop .4s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes pop { from { transform: scale(.3); } }
.color-chip {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 700; padding: 5px 12px 5px 6px; border-radius: 999px; background: rgb(0 0 0 / .25); white-space: nowrap;
}
.color-chip i { width: 16px; height: 16px; border-radius: 50%; background: var(--cur); box-shadow: 0 0 0 2px #fff; }

.status { display: grid; gap: 8px; text-align: center; }
.turn-line { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; min-height: 30px; }
.turn-line strong { font-size: 1.1rem; }
.my-turn .turn-line strong { color: var(--accent); }
.dir-txt { font-size: .78rem; color: var(--ink-3); }
.hint { font-size: .9rem; color: var(--ink-2); min-height: 1.3em; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; min-height: 46px; }
.uno-btn { background: var(--cy); color: #241a00; border-color: transparent; font-weight: 900; letter-spacing: .06em; font-size: 1.05rem; }
.uno-btn.hot { animation: pulse .9s ease-in-out infinite; box-shadow: 0 0 0 4px color-mix(in srgb, var(--cy) 40%, transparent); }
.uno-btn.done { opacity: .75; }
.catch-btn { background: var(--accent); color: #fff; border-color: transparent; font-weight: 800; animation: pulse .9s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }

.hand-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 10px 0 4px; }
.hand-head { display: flex; justify-content: space-between; padding: 0 16px; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.hand {
  --gap: 8px; display: flex; justify-content: safe center; overflow-x: auto; overflow-y: visible;
  padding: 24px 12px 14px; scrollbar-width: thin; touch-action: pan-x;
}
.hand .uc { --w: clamp(66px, 17vw, 94px); }
.slot { flex: none; transition: margin .2s; outline: none; }
.slot + .slot { margin-left: var(--gap); }
.slot .uc { transition: transform .18s, filter .2s, box-shadow .2s; }
.slot.ok { cursor: pointer; }
.slot.ok .uc { transform: translateY(-14px); box-shadow: 0 0 0 calc(var(--w) * .035) #fff, 0 0 0 calc(var(--w) * .035 + 3px) var(--gold), 0 10px 18px rgb(0 0 0 / .28); }
.slot.ok:hover .uc, .slot.ok:focus-visible .uc { transform: translateY(-22px) rotate(-2deg); }
.slot.no .uc { filter: saturate(.7) brightness(.92); opacity: .55; }
.slot.drawn .uc { animation: wiggle 1.2s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: translateY(-14px); } 50% { transform: translateY(-20px) rotate(2deg); } }
.slot.leaving { opacity: .25; }
.hand.tight .slot:hover { z-index: 2; position: relative; }

.log { font-size: .85rem; }
.log summary { cursor: pointer; color: var(--ink-2); font-weight: 600; padding: 4px 0; width: max-content; }
.log-list { display: grid; gap: 5px; max-height: 220px; overflow: auto; margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.log-list div { display: flex; gap: 8px; align-items: baseline; color: var(--ink-2); }
.log-list div:first-child { color: var(--ink); font-weight: 600; }
.log-list time { opacity: .6; font-variant-numeric: tabular-nums; flex: none; }

.reclaim-box { display: grid; gap: 6px; margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px dashed currentColor; text-align: left; }
.reclaim-box .small { opacity: .8; }
.reclaim-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.btn.reclaim { min-height: 40px; padding: 6px 12px 6px 8px; }

/* ---------- Farbwahl ---------- */
.picker, .win-overlay {
  position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--bg) 65%, transparent); backdrop-filter: blur(6px); animation: fade .25s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.picker-card, .win-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  padding: 20px; width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
}
.picker-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.picker-head h2 { margin: 0 0 2px; }
.picker-head p { margin: 0; }
.swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.swatch {
  border: 0; border-radius: 16px; padding: 16px 10px 12px; cursor: pointer; display: grid; justify-items: center; gap: 6px;
  background: color-mix(in srgb, var(--c) 16%, var(--card)); font-weight: 800; transition: transform .12s;
}
.swatch span { width: 44px; height: 44px; border-radius: 22%; background: var(--c); transform: rotate(45deg); box-shadow: 0 0 0 3px #fff, 0 3px 8px rgb(0 0 0 / .25); margin: 4px 0; }
.swatch small { font-weight: 600; font-size: .72rem; color: var(--ink-2); }
.swatch:hover { transform: translateY(-2px); }

.shout {
  position: fixed; left: 50%; top: 40%; z-index: 80; pointer-events: none; translate: -50% -50%;
  font: italic 900 clamp(3rem, 16vw, 6rem)/1 "Iowan Old Style", Georgia, serif; color: var(--cy);
  -webkit-text-stroke: 3px #241a00; paint-order: stroke fill; text-shadow: 0 6px 0 #241a00;
  animation: shout 1.1s cubic-bezier(.2, 1.4, .4, 1) forwards;
}
@keyframes shout { 0% { transform: scale(.2) rotate(-12deg); opacity: 0; } 25% { transform: scale(1.1) rotate(-6deg); opacity: 1; } 70% { opacity: 1; } 100% { transform: scale(1.3) rotate(-4deg) translateY(-30px); opacity: 0; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; z-index: 90;
  box-shadow: var(--shadow); max-width: calc(100% - 32px); font-weight: 600; text-align: center;
}

/* ---------- Sieger ---------- */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
.win-card { text-align: center; width: min(460px, 100%); }
.trophy { width: 160px; height: 180px; margin: -6px auto 4px; display: block; animation: drop 1s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes drop { 0% { transform: translateY(-80px) scale(.6) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.trophy .shine { animation: shine 2.4s ease-in-out infinite 1s; }
@keyframes shine { 0%, 100% { opacity: .2; } 50% { opacity: .9; } }
.trophy .spark { animation: twinkle 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.trophy .spark:nth-of-type(2) { animation-delay: .5s; }
.trophy .spark:nth-of-type(3) { animation-delay: 1s; }
@keyframes twinkle { 0%, 100% { transform: scale(.3); opacity: .2; } 50% { transform: scale(1); opacity: 1; } }
.win-card h2 { font: italic 800 2rem/1.05 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; margin: 6px 0 4px; }
.win-card .pts { color: var(--ink-2); margin-bottom: 14px; }
.ranking { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; text-align: left; }
.ranking li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--bg); }
.ranking .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ranking li b { font-variant-numeric: tabular-nums; font-size: .88rem; white-space: nowrap; }
.ranking .tw { font-size: .8rem; color: var(--ink-2); min-width: 2.6em; text-align: right; }
.ranking .place { width: 1.4em; font-weight: 800; color: var(--ink-3); }
.alltime { text-align: left; margin: 0 0 14px; font-size: .9rem; }
.alltime summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.win-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.win-actions .btn.primary { grid-column: 1 / -1; }
.win-actions .btn.ghost { border-color: var(--line); }

/* ---------- Responsiv ---------- */
@media (max-width: 860px) {
  .hero, .lobby { grid-template-columns: 1fr; }
  .fan { margin: 24px auto 0; }
}
@media (max-width: 520px) {
  main { padding: 0 10px 30px; }
  .opp { min-width: 88px; padding: 6px 8px 7px; }
  .mini-fan { height: 26px; }
  .mini-fan i { width: 15px; height: 23px; }
  .mini-fan i::after { inset: 7px 3px; }
  .actions .btn { flex: 1 1 40%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
