/* Bilanz-City Ratingen – Spieltisch-Optik: grüner Filz, Papierbrett, Belege wie im Buchhaltungsordner. */
:root {
  --felt: #0b2f33; --felt-2: #0e3d42; --felt-3: #155158; --felt-ink: #e7f1ee; --felt-muted: #9fbcb9;
  --paper: #fbf6e9; --paper-2: #f1e7cf; --paper-3: #e4d6b3; --ink: #1c2629; --muted: #5d6a6c; --line: #d9cba6;
  --accent: #0d5b6b; --accent-2: #12808f; --gold: #e9b93f; --gold-2: #c9952a;
  --soll: #2b56b0; --haben: #9c4a1c; --good: #2b7a3d; --good-soft: #dcefe0; --bad: #b3261e; --bad-soft: #f8dedb; --mark: #fff1b8;
  --f-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --r: 10px; --shadow: 0 10px 30px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--f-body); font-size: 16px; line-height: 1.45; color: var(--felt-ink);
  background: radial-gradient(1200px 800px at 30% 20%, var(--felt-3), var(--felt) 60%, #061c1f);
  background-attachment: fixed; overflow-x: hidden;
}
#bg-fx { position: fixed; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px); background-size: 4px 4px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; line-height: 1.1; }
p { margin: 0; }
button { font: inherit; }
.num, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--f-display); font-weight: 700; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Buttons */
.btn { --bg: var(--accent); border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 700; cursor: pointer; color: #fff; background: var(--bg);
  box-shadow: 0 3px 0 rgba(0,0,0,.25); transition: transform .12s, box-shadow .12s, filter .12s; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-gold { --bg: linear-gradient(180deg, #f5cd5b, var(--gold-2)); color: #2a1d00; }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; opacity: .9; }
.btn-red { --bg: var(--bad); }
.btn-sm { padding: 6px 12px; font-size: .88rem; }
.btn-lg { padding: 14px 22px; font-size: 1.1rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Start ---------- */
.screen { min-height: 100vh; }
#screen-join { display: flex; flex-direction: column; }
.join-wrap { flex: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; max-width: 1180px; width: 100%; margin: 0 auto; padding: 48px 24px; }
.hero { position: relative; display: flex; flex-direction: column; gap: 18px; }
.hero-title { display: flex; align-items: center; gap: 8px; }
.hero-dice { position: relative; flex: 0 0 auto; width: clamp(110px, 12vw, 200px); height: clamp(100px, 11vw, 182px); overflow: hidden; pointer-events: none; }
.logo { white-space: nowrap; font-size: clamp(2.6rem, 5.4vw, 5.4rem); font-weight: 900; letter-spacing: -.03em; line-height: .9; text-shadow: 0 6px 0 rgba(0,0,0,.25); }
.logo span { color: var(--gold); }
.logo small { display: block; font-size: .32em; letter-spacing: .4em; text-transform: uppercase; color: var(--felt-muted); font-weight: 700; margin-top: 10px; }
.lead { font-size: 1.15rem; color: #cfe2df; max-width: 52ch; }
.howto { list-style: none; counter-reset: s; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.howto li { counter-increment: s; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.howto li::before { content: counter(s); font: 900 1.4rem var(--f-display); color: var(--gold); }
.howto span { font-size: .92rem; color: var(--felt-muted); }
.join-card { background: var(--paper); color: var(--ink); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px;
  transform: rotate(1.2deg); position: relative; }
.join-card::before { content: ""; position: absolute; inset: 8px; border: 2px dashed var(--line); border-radius: 12px; pointer-events: none; }
.join-card h2 { font-size: 1.8rem; color: var(--accent); }
.fld { display: flex; flex-direction: column; gap: 5px; font-weight: 700; font-size: .9rem; min-width: 0; }
.fld input, .fld select { font: 1.05rem var(--f-body); padding: 11px 12px; border-radius: 8px; border: 2px solid var(--line); background: #fff; color: var(--ink); width: 100%; }
.fld input:focus, .fld select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(13,91,107,.2); }
#join-code { font-family: var(--f-mono); letter-spacing: .25em; text-transform: uppercase; font-size: 1.3rem; }
.join-card .btn-ghost { color: var(--accent); }
.join-err { color: var(--bad); font-weight: 700; min-height: 1.2em; }
.fine { font-size: .8rem; color: var(--muted); }
.foot { text-align: center; padding: 16px; font-size: .85rem; color: var(--felt-muted); }
.foot a { color: var(--gold); }

/* ---------- Lobby ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.15); flex-wrap: wrap; }
.brand { font: 900 1.5rem var(--f-display); letter-spacing: -.02em; }
.brand span, .center-logo span { color: var(--gold); }
.sess { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.code { font-family: var(--f-mono); background: var(--gold); color: #2a1d00; border-radius: 6px; padding: 2px 10px; letter-spacing: .2em; }
.who { display: flex; align-items: center; gap: 10px; }
.lobby { display: grid; grid-template-columns: 1fr 300px; gap: 28px; max-width: 1180px; margin: 0 auto; padding: 28px 24px; }
.lobby-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.big-action { display: flex; gap: 14px; align-items: center; text-align: left; padding: 20px; border-radius: 16px; border: 0; cursor: pointer; color: #2a1d00;
  background: linear-gradient(160deg, #f8d873, var(--gold-2)); box-shadow: 0 6px 0 #8a6516, var(--shadow); transition: transform .15s; }
.big-action.alt { background: linear-gradient(160deg, var(--paper), var(--paper-3)); color: var(--ink); box-shadow: 0 6px 0 #a8956a, var(--shadow); }
.big-action:hover { transform: translateY(-3px) rotate(-.4deg); }
.big-action:active { transform: translateY(3px); }
.big-action b { display: block; font: 800 1.15rem var(--f-display); }
.big-action small { display: block; opacity: .8; margin-top: 2px; }
.ba-ico { font-size: 2rem; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.4); flex: none; }
.queue-box { margin-top: 16px; display: flex; gap: 18px; align-items: center; padding: 16px 20px; border-radius: 14px; background: rgba(233,185,63,.12); border: 1px solid rgba(233,185,63,.4); }
.queue-box > div:nth-child(2) { flex: 1; }
.radar { position: relative; width: 46px; height: 46px; flex: none; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--gold); animation: radar 1.8s infinite ease-out; }
.radar i:nth-child(2) { animation-delay: .6s; } .radar i:nth-child(3) { animation-delay: 1.2s; }
@keyframes radar { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.2); opacity: 0; } }
.sec-h { font: 800 .85rem var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--felt-muted); margin: 28px 0 12px; }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.table-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; animation: pop .35s both; }
.table-card.mine { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(233,185,63,.3); }
.table-card h4 { margin: 0; font: 800 1.1rem var(--f-display); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.badge { font: 700 .72rem var(--f-body); text-transform: uppercase; letter-spacing: .08em; border-radius: 999px; padding: 2px 8px; background: rgba(255,255,255,.12); }
.badge.live { background: var(--bad); color: #fff; animation: pulse 1.6s infinite; }
.badge.wait { background: var(--gold); color: #2a1d00; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px 3px 4px; background: rgba(0,0,0,.25); font-size: .9rem; }
.chip i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .7rem; font-weight: 800; color: #fff; }
.empty { color: var(--felt-muted); font-style: italic; padding: 12px 0; }
.online { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.online li { display: flex; align-items: center; gap: 8px; }
.online li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5bd17a; box-shadow: 0 0 8px #5bd17a; }
.online li.busy::before { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.online small { color: var(--felt-muted); }
.tip-card { margin-top: 24px; background: var(--paper); color: var(--ink); border-radius: 12px; padding: 16px; transform: rotate(-1deg); box-shadow: var(--shadow); }
.tip-card b { color: var(--accent); font-family: var(--f-display); }
.tip-card p { font-size: .93rem; margin-top: 4px; }

/* ---------- Spiel ---------- */
.game { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; padding: 14px; min-height: 100vh; align-items: start; }
.board-wrap { display: grid; place-items: center; position: sticky; top: 14px; }
.board { --size: min(calc(100vh - 28px), calc(100vw - 380px - 46px)); width: var(--size); height: var(--size); position: relative;
  display: grid; grid-template-columns: 1.55fr repeat(9, 1fr) 1.55fr; grid-template-rows: 1.55fr repeat(9, 1fr) 1.55fr; gap: 2px;
  background: #2a3a3c; padding: 2px; border-radius: 12px; box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 0 0 8px #0a2326, 0 0 0 10px #1d4c51;
  font-size: calc(var(--size) / 82); }
.cell { position: relative; background: var(--paper); color: var(--ink); display: flex; overflow: hidden; cursor: pointer; transition: filter .15s, transform .15s; }
.cell:hover { filter: brightness(1.05); z-index: 2; }
.cell .band { flex: none; position: relative; display: flex; align-items: center; justify-content: center; gap: 2px; }
.cell .body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; padding: .4em .25em; min-width: 0; }
.cell .nm { font: 700 1.05em/1.08 var(--f-display); hyphens: auto; overflow-wrap: break-word; word-break: normal; }
.cell .pr { font: 600 1em var(--f-mono); color: var(--muted); }
.cell .ic { font-size: 2.2em; line-height: 1; }
.side-b { flex-direction: column; } .side-b .band { height: 18%; }
.side-t { flex-direction: column-reverse; } .side-t .band { height: 18%; }
.side-l { flex-direction: row-reverse; } .side-l .band { width: 18%; flex-direction: column; }
.side-r { flex-direction: row; } .side-r .band { width: 18%; flex-direction: column; }
.side-l .body, .side-r .body { padding: .25em .3em; }
.cell.corner { background: var(--paper-2); }
.cell.corner .body { justify-content: center; gap: .3em; }
.cell.corner .nm { font-size: 1.35em; }
.cell.corner .ic { font-size: 3.2em; }
.cell .house { width: 1.25em; height: 1.25em; background: #fff; clip-path: polygon(50% 0, 100% 45%, 100% 100%, 0 100%, 0 45%); box-shadow: inset 0 0 0 2px rgba(0,0,0,.2); animation: drop .5s cubic-bezier(.3,1.6,.5,1) both; }
.cell .owner { position: absolute; width: 1.1em; height: 1.1em; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); animation: drop .4s both; }
.side-b .owner { bottom: .3em; right: .3em; } .side-t .owner { top: .3em; right: .3em; } .side-l .owner { left: .3em; bottom: .3em; } .side-r .owner { right: .3em; bottom: .3em; }
.cell.owned-me { box-shadow: inset 0 0 0 3px var(--gold); }
.cell.flash { animation: flash 1s; }
.cell.highlight { box-shadow: inset 0 0 0 4px var(--gold), 0 0 24px var(--gold); z-index: 3; }
@keyframes flash { 0%, 100% { filter: none; } 30% { filter: brightness(1.3) saturate(1.4); transform: scale(1.06); } }
@keyframes drop { from { transform: translateY(-60%) scale(1.6); opacity: 0; } to { transform: none; opacity: 1; } }

.center { grid-column: 2 / 11; grid-row: 2 / 11; position: relative; background:
  radial-gradient(circle at 50% 40%, #f8f1de, #eadcb6 75%); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2%; padding: 3% 4%; overflow: hidden; }
.center::before { content: ""; position: absolute; inset: 6%; border: 2px dashed rgba(13,91,107,.25); border-radius: 50%; pointer-events: none; }
.center-top { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .4em; }
.center-logo { font: 900 4.4em/.9 var(--f-display); letter-spacing: -.03em; color: var(--accent); transform: rotate(-4deg); text-shadow: 0 3px 0 rgba(0,0,0,.08); }
.center-logo small { display: block; font-size: .3em; letter-spacing: .5em; color: var(--muted); text-transform: uppercase; }
.round-pill { font: 700 1.2em var(--f-display); background: var(--accent); color: #fff; border-radius: 999px; padding: .2em .9em; }
.dice-stage { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.dice-stage canvas { width: 100% !important; height: 100% !important; }
.center-panel { position: relative; z-index: 2; margin-top: auto; width: 100%; max-width: 32em; display: flex; flex-direction: column; align-items: center; gap: .8em; font-size: 1.45em; text-align: center; }
.center-panel .btn { font-size: 1.15em; }
.center-panel .roll { font: 900 1.6em var(--f-display); padding: .5em 1.6em; letter-spacing: .02em; animation: breathe 2s infinite; }
@keyframes breathe { 50% { transform: scale(1.04); box-shadow: 0 0 0 10px rgba(233,185,63,.18), 0 3px 0 rgba(0,0,0,.25); } }
.waiting { display: flex; align-items: center; gap: .6em; font-weight: 700; background: rgba(255,255,255,.7); border-radius: 999px; padding: .4em 1em .4em .4em; }
.waiting .tk { width: 2em; height: 2em; border-radius: 50%; display: grid; place-items: center; font-size: 1.1em; animation: bob 1s infinite ease-in-out; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.offer { background: #fff; border-radius: 12px; box-shadow: var(--shadow); width: 100%; overflow: hidden; animation: pop .4s both; text-align: left; }
.offer .ob { padding: .5em .9em; color: #fff; font: 800 1.1em var(--f-display); }
.offer .oc { padding: .7em .9em; display: flex; flex-direction: column; gap: .5em; }
.offer .row { justify-content: flex-end; }
.hint-line { font-size: .85em; color: var(--muted); }
.auction .oc { gap: .55em; }
.a-top { display: flex; justify-content: space-between; gap: .5em; font-size: .9em; }
.a-time { font: 700 1em var(--f-mono); color: var(--accent); }
.a-bar { height: .5em; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.a-bar > div { height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s linear; }
.a-bar > div.low { background: var(--bad); }
.a-high { font-size: 1.05em; }
.a-quick, .a-own { justify-content: flex-start !important; }
.a-own input { width: 7em; font: 600 1em var(--f-mono); padding: .35em .5em; border: 2px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); color-scheme: light; }
.pasch { background: #fff; border: 3px solid var(--gold); border-radius: 12px; padding: .4em .9em; animation: pop .4s both; }
.pasch .hint-line { display: block; }
.ticker { position: relative; z-index: 1; font-size: 1.25em; color: var(--muted); text-align: center; min-height: 2.6em; max-width: 34em; }
.ticker b { color: var(--ink); }

.tokens { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.token { position: absolute; left: 0; top: 0; width: calc(var(--size) / 26); height: calc(var(--size) / 26); margin: calc(var(--size) / -52) 0 0 calc(var(--size) / -52);
  border-radius: 50%; display: grid; place-items: center; font-size: calc(var(--size) / 50); border: 3px solid #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,.25), 0 8px 14px rgba(0,0,0,.35); transition: transform .35s cubic-bezier(.3,1.4,.5,1); will-change: transform; }
.token.cur::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--gold); animation: ring 1.2s infinite; }
@keyframes ring { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.token.off { filter: grayscale(.8) brightness(.8); }

/* Seitenleiste */
.side { background: var(--paper); color: var(--ink); border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: calc(100vh - 28px); overflow: hidden; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.me-chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me-chip .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); flex: none; }
.me-chip b { display: block; font: 800 1.05rem var(--f-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-chip small { color: var(--muted); }
.tasks-btn { display: flex; align-items: center; gap: 8px; border: 0; background: var(--accent); color: #fff; border-radius: 999px; padding: 6px 6px 6px 14px; cursor: pointer; font-weight: 700; }
.tasks-btn b { background: #fff; color: var(--accent); border-radius: 999px; min-width: 28px; height: 28px; display: grid; place-items: center; font-family: var(--f-mono); }
.tasks-btn.has { background: var(--bad); animation: pulse 1.4s infinite; }
.tasks-btn.has b { color: var(--bad); }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(179,38,30,.15); } }
.tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.tabs button { flex: 1; border: 0; background: none; padding: 10px 6px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--accent); border-color: var(--accent); }
.tab { padding: 16px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }

/* Bilanz als T-Konto */
.bil { width: 100%; border-collapse: collapse; font-size: .92rem; }
.bil caption { font: 800 1.05rem var(--f-display); text-align: left; padding-bottom: 6px; color: var(--accent); }
.bil th { font: 700 .72rem var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: left; border-bottom: 2px solid var(--ink); padding: 4px 5px; }
.bil td { padding: 4px 5px; vertical-align: top; }
.bil td.v { text-align: right; font-family: var(--f-mono); white-space: nowrap; }
.bil td.split, .bil th.split { border-right: 2px solid var(--ink); }
.bil tr.sum td { border-top: 2px solid var(--ink); font-weight: 700; }
.bil tr.sub td { color: var(--muted); font-size: .85rem; }
.bil .chg { background: var(--mark); transition: background 1.5s; }
.rv { background: var(--paper-2); border-radius: 8px; padding: 10px 12px; font-size: .92rem; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.rv strong { font: 700 1.25rem var(--f-mono); color: var(--accent); }
.note { font-size: .85rem; color: var(--muted); }
.note.warn { color: var(--bad); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.kpi small { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.kpi b { font: 700 1.1rem var(--f-mono); }
.tk2 { display: grid; grid-template-columns: 1fr 1fr; font-size: .85rem; border-top: 2px solid var(--ink); }
.tk2 > div { padding: 4px 6px; display: flex; flex-direction: column; gap: 2px; }
.tk2 > div:first-child { border-right: 2px solid var(--ink); }
.tk2 .ln { display: flex; justify-content: space-between; gap: 6px; }
.tk2 h5 { margin: 0; font: 700 .7rem var(--f-display); letter-spacing: .1em; text-transform: uppercase; }

/* Spielerliste */
.plist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.plist li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line); position: relative; transition: transform .3s; }
.plist li.cur { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233,185,63,.35); transform: translateX(-4px); }
.plist .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.plist b { font-family: var(--f-display); }
.plist small { color: var(--muted); display: block; }
.plist .r { text-align: right; font-family: var(--f-mono); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #5bd17a; margin-left: 6px; vertical-align: middle; }
.dot.off { background: #bbb; }
.float-num { position: fixed; z-index: 80; font: 800 1.1rem var(--f-mono); pointer-events: none; animation: floatup 1.6s ease-out forwards; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.float-num.plus { color: #3fd06b; } .float-num.minus { color: #ff6b5e; } .float-num.pts { color: var(--gold); font-size: 1.5rem; }
@keyframes floatup { from { transform: translateY(0) scale(.8); opacity: 0; } 15% { opacity: 1; transform: translateY(-10px) scale(1.15); } to { transform: translateY(-70px) scale(1); opacity: 0; } }

/* Belege-Liste */
.blist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.blist li { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: .9rem; display: flex; flex-direction: column; gap: 4px; }
.blist li.open { border-left-color: var(--bad); cursor: pointer; }
.blist li.ok { border-left-color: var(--good); }
.blist li.rev { border-left-color: var(--gold); }
.blist .bs { font-family: var(--f-mono); font-size: .85rem; }
.bs .s { color: var(--soll); font-weight: 600; } .bs .h { color: var(--haben); font-weight: 600; }
.blist .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column-reverse; gap: 6px; font-size: .9rem; }
.log li { padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.log li.rnd { background: var(--accent); color: #fff; font-weight: 700; text-align: center; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(4,20,22,.55); backdrop-filter: blur(3px); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.9) translateY(10px); opacity: 0; } }
.voucher { position: relative; width: min(680px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; overflow-x: hidden; background: var(--paper); color: var(--ink); border-radius: 6px; padding: 24px 26px 20px; box-shadow: var(--shadow);
  animation: slideup .45s cubic-bezier(.2,1.2,.4,1) both;
  background-image: repeating-linear-gradient(transparent 0 31px, rgba(13,91,107,.07) 31px 32px); }
.voucher::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 20px; background: radial-gradient(circle at 10px 0, transparent 9px, var(--paper) 10px) -10px 10px/20px 20px repeat-x; }
@keyframes slideup { from { transform: translateY(60px) rotate(-2deg); opacity: 0; } }
.v-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.v-kicker { font: 700 .75rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.v-head h2 { font-size: 1.5rem; color: var(--accent); }
.x { border: 0; background: var(--paper-2); width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; color: var(--ink); flex: none; }
.v-text { font-size: 1.15rem; font-weight: 600; margin: 16px 0; padding: 12px 14px; background: #fff; border-radius: 8px; border-left: 5px solid var(--gold); }
.v-form { display: grid; grid-template-columns: 1fr auto 1fr 140px; gap: 12px; align-items: end; }
.v-form .wide { grid-column: span 2; }
.v-an { font: 700 1rem var(--f-mono); padding-bottom: 12px; color: var(--muted); }
.soll-l { color: var(--soll); } .haben-l { color: var(--haben); }
.fld.ok input, .fld.ok select, .fld.ok .seg { border-color: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.fld.no input, .fld.no select, .fld.no .seg { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.seg { display: flex; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg label { flex: 1; text-align: center; padding: 10px 4px; cursor: pointer; font-weight: 700; position: relative; font-size: .95rem; }
.seg label + label { border-left: 1px solid var(--line); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--accent); color: #fff; }
.seg label:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: -3px; }
.v-hints { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.fb { border-radius: 8px; padding: 10px 14px; font-size: .97rem; }
.fb.ok { background: var(--good-soft); border-left: 5px solid var(--good); }
.fb.no { background: var(--bad-soft); border-left: 5px solid var(--bad); }
.fb.info { background: var(--paper-2); border-left: 5px solid var(--accent); }
.fb .bs { font-family: var(--f-mono); }
.v-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.v-pts { font: 700 .95rem var(--f-display); color: var(--muted); }
.stamp { position: absolute; right: 30px; top: 70px; font: 900 2.4rem var(--f-display); text-transform: uppercase; color: var(--good); border: 5px solid var(--good); border-radius: 10px; padding: 4px 16px;
  transform: rotate(-14deg) scale(3); opacity: 0; pointer-events: none; mix-blend-mode: multiply; }
.stamp.on { animation: stamp .45s cubic-bezier(.3,1.6,.5,1) forwards; }
.stamp.rev { color: var(--gold-2); border-color: var(--gold-2); }
@keyframes stamp { to { transform: rotate(-14deg) scale(1); opacity: .85; } }

.deed-card { width: min(340px, 100%); background: #fff; color: var(--ink); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); animation: pop .3s both; }
.deed-card .dh { padding: 16px; color: #fff; text-align: center; }
.deed-card .dh small { display: block; text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; opacity: .9; }
.deed-card .dh b { font: 900 1.5rem var(--f-display); }
.deed-card .db { padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.deed-card table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.deed-card td { padding: 3px 0; } .deed-card td:last-child { text-align: right; font-family: var(--f-mono); }
.deed-card tr.on td { font-weight: 800; color: var(--accent); }
.sheet { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--paper); color: var(--ink); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); animation: pop .3s both; display: flex; flex-direction: column; gap: 14px; }
.sheet h2 { color: var(--accent); }
.name-sheet { width: min(440px, 100%); }
.props { display: flex; flex-direction: column; gap: 8px; }
.prop { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 8px 0; overflow: hidden; }
.prop .cb { align-self: stretch; }
.prop small { color: var(--muted); display: block; }
.prop .row { gap: 6px; }
.money-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.money-row input[type=range] { width: 100%; accent-color: var(--accent); }

/* Ereigniskarte */
.card-stage { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; perspective: 1200px; background: rgba(4,20,22,.35); cursor: pointer; }
.flip { width: min(380px, 86vw); aspect-ratio: 1.55; position: relative; transform-style: preserve-3d; animation: flipin 1.1s cubic-bezier(.3,1.3,.5,1) forwards; }
.flip > div { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 22px; }
.flip-back { background: repeating-linear-gradient(45deg, var(--accent) 0 12px, var(--accent-2) 12px 24px); color: #fff; font: 900 1.8rem var(--f-display); }
.flip-back span { background: rgba(0,0,0,.25); padding: 6px 16px; border-radius: 8px; }
.flip-front { background: var(--paper); color: var(--ink); transform: rotateY(180deg); gap: 10px; border: 6px solid var(--gold); }
.flip-front b { font: 900 1.3rem var(--f-display); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.flip-front p { font-size: 1.12rem; font-weight: 600; }
.flip-front small { color: var(--muted); }
.flip.chest .flip-back { background: repeating-linear-gradient(-45deg, #b5651d 0 12px, #c97a2c 12px 24px); }
.flip.chest .flip-front { border-color: #c97a2c; }
@keyframes flipin { 0% { transform: translateY(80vh) rotateY(0) rotateZ(-20deg) scale(.6); } 55% { transform: translateY(0) rotateY(0) rotateZ(4deg) scale(1); } 100% { transform: rotateY(180deg) rotateZ(0) scale(1.05); } }

.banner { position: fixed; left: 0; right: 0; top: 40%; z-index: 70; text-align: center; font: 900 clamp(2rem, 6vw, 4rem) var(--f-display); color: #fff; pointer-events: none;
  text-shadow: 0 6px 0 rgba(0,0,0,.3); animation: banner 2s ease-in-out forwards; }
.banner small { display: block; font-size: .35em; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
@keyframes banner { 0% { transform: translateX(-100%) skewX(-10deg); opacity: 0; } 20%, 75% { transform: none; opacity: 1; } 100% { transform: translateX(100%) skewX(10deg); opacity: 0; } }
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); animation: pop .3s both; font-weight: 600; max-width: 90vw; }
.toast.error { background: var(--bad); } .toast.ok { background: var(--good); }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 95; }

/* Ergebnis */
.results h2 { font-size: 2rem; text-align: center; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 10px 0; }
.podium > div { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 120px; animation: pop .6s both; }
.podium .av { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; border: 4px solid #fff; box-shadow: var(--shadow); }
.podium .step { width: 100%; border-radius: 10px 10px 0 0; background: var(--accent); color: #fff; display: grid; place-items: center; font: 900 1.8rem var(--f-display); }
.podium .p1 .step { height: 120px; background: linear-gradient(var(--gold), var(--gold-2)); color: #2a1d00; }
.podium .p2 .step { height: 86px; } .podium .p3 .step { height: 60px; background: #8a5a3c; }
.rtable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rtable th, .rtable td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.rtable td.n { text-align: right; font-family: var(--f-mono); }

/* ---------- Responsiv ---------- */
@media (max-width: 1100px) {
  .game { grid-template-columns: 1fr; }
  .board { --size: min(calc(100vw - 28px), 92vh); }
  .board-wrap { position: static; }
  .side { min-height: 0; }
}
@media (max-width: 860px) {
  .join-wrap { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .hero-dice { width: 110px; height: 100px; }
  .howto { grid-template-columns: 1fr; }
  .lobby { grid-template-columns: 1fr; }
  .lobby-actions { grid-template-columns: 1fr; }
  .v-form { grid-template-columns: 1fr 1fr; }
  .v-an { display: none; }
  .v-form .wide { grid-column: span 2; }
  .center-logo { font-size: 2.6em; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
