@font-face { font-family: 'Cinzel'; font-weight: 500; font-display: swap; src: url('/fonts/cinzel-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-weight: 700; font-display: swap; src: url('/fonts/cinzel-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-weight: 900; font-display: swap; src: url('/fonts/cinzel-latin-900-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url('/fonts/nunito-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 600; font-display: swap; src: url('/fonts/nunito-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('/fonts/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url('/fonts/nunito-latin-800-normal.woff2') format('woff2'); }

:root {
  --panel: rgba(12, 23, 41, 0.8);
  --panel-solid: #101d33;
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.13);
  --text: #eef3fb;
  --muted: #a3b3ca;
  --gold: #f2c230;
  --gold-2: #ffdf7a;
  --danger: #e2574c;
  --ok: #4fc46a;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --display: 'Cinzel', Georgia, serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; background: #0b1a2e; color: var(--text); font-family: var(--body); font-size: 15px; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: 0.02em; }
[hidden] { display: none !important; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
#veil { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, rgba(6, 14, 28, 0.25), rgba(6, 14, 28, 0.72)); opacity: 0; transition: opacity 0.6s; }
body.menu #veil { opacity: 1; }
#ui { position: fixed; inset: 0; display: grid; place-items: center; padding: 18px; overflow-y: auto; pointer-events: none; }
#ui > * { pointer-events: auto; }
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#fly { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
#modal { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 16px; background: rgba(5, 10, 20, 0.55); backdrop-filter: blur(3px); overflow-y: auto; }
#modal.open { display: grid; }
#toasts { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 520px); }

#boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #17406b, #0b1a2e 70%); transition: opacity 0.7s; }
#boot.gone { opacity: 0; pointer-events: none; }
.boot-title { font-family: var(--display); font-weight: 900; font-size: clamp(38px, 8vw, 72px); color: var(--gold); text-shadow: 0 4px 0 #7a5a0c, 0 10px 30px rgba(0, 0, 0, 0.5); text-align: center; }
.boot-sub { text-align: center; color: var(--muted); margin-top: 10px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }

/* ---------- Grundbausteine */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.btn { font-family: var(--body); letter-spacing: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-weight: 700; cursor: pointer; transition: transform 0.08s, background 0.15s, box-shadow 0.15s, opacity 0.15s; user-select: none; white-space: nowrap; }
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.13); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.985); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, #d9a514); color: #2a1e04; border-color: #ffe9a3; box-shadow: 0 3px 0 #8a6408, 0 8px 18px rgba(242, 194, 48, 0.25); }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #ffe89a, #f7cd4a 55%, #e0ad1c); }
.btn.primary:active:not(:disabled) { box-shadow: 0 1px 0 #8a6408; transform: translateY(2px); }
.btn.danger { background: rgba(226, 87, 76, 0.18); border-color: rgba(226, 87, 76, 0.5); color: #ffc9c4; }
.btn.small { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn.big { padding: 14px 22px; font-size: 17px; }
.btn.icon { padding: 8px; width: 38px; height: 38px; }
.btn .ico { width: 20px; height: 20px; }
.ico { display: inline-block; width: 22px; height: 22px; flex: none; line-height: 0; }
.ico svg { width: 100%; height: 100%; display: block; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.input { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.28); color: var(--text); outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 194, 48, 0.2); }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.err { color: #ffb4ad; font-weight: 700; min-height: 1.3em; font-size: 14px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.toast { background: var(--panel-solid); border: 1px solid var(--line); border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 600; animation: toastIn 0.25s ease-out; max-width: 100%; }
.toast.bad { border-left-color: var(--danger); }
.toast.good { border-left-color: var(--ok); }
.toast.out { opacity: 0; transform: translateY(-8px); transition: all 0.3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }

/* ---------- Menüs */
.card { width: min(100%, 460px); padding: 26px; }
.card.wide { width: min(100%, 980px); }
.brand { text-align: center; margin-bottom: 18px; }
.brand h1 { font-weight: 900; font-size: clamp(34px, 7vw, 54px); color: var(--gold); text-shadow: 0 3px 0 #7a5a0c, 0 10px 26px rgba(0, 0, 0, 0.55); line-height: 1.05; }
.brand p { margin: 8px 0 0; color: var(--muted); }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); margin-bottom: 16px; }
.tabs button { border: 0; background: transparent; padding: 9px; border-radius: 9px; font-weight: 800; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.stack { display: grid; gap: 14px; }
.home-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.home-actions { display: grid; gap: 12px; align-content: start; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 26px; color: var(--gold); }
.stat span { font-size: 12px; color: var(--muted); font-weight: 700; }
.hist { display: grid; gap: 6px; max-height: 180px; overflow-y: auto; font-size: 13.5px; }
.hist > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 9px; background: var(--panel-2); }
.sub { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--gold-2); margin: 4px 0 8px; }

/* Party-Lobby */
.lobby { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; }
.lobby-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.invite { display: flex; gap: 8px; align-items: center; padding: 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); border: 1px dashed rgba(242, 194, 48, 0.5); }
.invite code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--gold-2); }
.seats { display: grid; gap: 8px; }
.seat { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); min-height: 50px; }
.seat.empty { border-style: dashed; color: var(--muted); justify-content: center; font-size: 13px; }
.seat .name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); flex: none; }
.dot.off { opacity: 0.4; }
.swatches { display: flex; gap: 6px; }
.swatches button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.5); cursor: pointer; padding: 0; }
.swatches button.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35); }
.swatches button:disabled { opacity: 0.2; cursor: not-allowed; }
.maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.map { text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; display: grid; gap: 3px; transition: border-color 0.15s, background 0.15s; }
.map b { font-size: 14px; }
.map span { font-size: 12px; color: var(--muted); }
.map.on { border-color: var(--gold); background: rgba(242, 194, 48, 0.13); box-shadow: inset 0 0 0 1px var(--gold); }
.map:disabled { cursor: default; }
.opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.opt:last-child { border-bottom: 0; }
.opt small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
select.input { width: auto; padding: 7px 10px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: absolute; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(255, 255, 255, 0.16); transition: background 0.2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + i { background: var(--gold); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:disabled + i { opacity: 0.4; }
input[type=range] { accent-color: var(--gold); width: 150px; }
.chatbox { display: grid; grid-template-rows: 1fr auto; gap: 8px; min-height: 0; }
.chatlog { overflow-y: auto; display: grid; gap: 4px; align-content: start; font-size: 13.5px; padding-right: 4px; min-height: 0; }
.chatlog .who { font-weight: 800; }

/* ---------- Spiel-HUD */
.players { position: absolute; top: 12px; left: 12px; display: grid; gap: 6px; width: 250px; }
.pl { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 9px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s; position: relative; }
.pl.turn { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242, 194, 48, 0.55), 0 0 26px rgba(242, 194, 48, 0.3); transform: translateX(4px); }
.pl.wait::after { content: ''; position: absolute; right: 8px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 1s infinite; }
.pl .nm { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl .vp { font-family: var(--display); font-weight: 900; font-size: 19px; color: var(--gold); display: flex; align-items: center; gap: 3px; }
.pl .vp .ico { width: 16px; height: 16px; }
.pl .meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 3px 8px; font-size: 12.5px; color: var(--muted); font-weight: 700; align-items: center; }
.pl .meta span { display: inline-flex; align-items: center; gap: 3px; }
.pl .meta .ico { width: 15px; height: 15px; }
.pl .meta .has { color: var(--gold-2); }
.pl.me .nm::after { content: ' (du)'; color: var(--muted); font-weight: 600; font-size: 12px; }
.pl.bump { animation: bump 0.4s; }
@keyframes bump { 40% { transform: scale(1.05); } }

.status { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); padding: 10px 20px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); font-weight: 800; display: flex; gap: 12px; align-items: center; max-width: min(92vw, 640px); text-align: center; box-shadow: var(--shadow); }
.status.mine { border-color: var(--gold); color: var(--gold-2); }
.status .sum { font-family: var(--display); font-weight: 900; font-size: 20px; color: #fff; background: rgba(255, 255, 255, 0.12); border-radius: 9px; padding: 0 9px; }
.status .sum.hot { background: var(--danger); }

.topright { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.side { position: absolute; top: 60px; right: 12px; width: 290px; bottom: calc(var(--bh, 170px) + 20px); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.side.closed { display: none; }
.side .tabs { margin: 8px 8px 0; }
.log { overflow-y: auto; padding: 8px 12px; display: grid; gap: 5px; align-content: start; font-size: 13px; line-height: 1.35; }
.log .t { color: var(--gold-2); font-weight: 800; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 3px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.log b { font-weight: 800; }
.log .rs { display: inline-flex; align-items: center; gap: 2px; vertical-align: -3px; }
.log .rs .ico { width: 15px; height: 15px; }
.side form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.bank { position: absolute; top: 60px; right: 12px; display: flex; gap: 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 800; align-items: center; }
.bank span { display: inline-flex; align-items: center; gap: 3px; }
.bank .ico { width: 16px; height: 16px; }

.bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 12px calc(12px + var(--safe-b)); display: flex; align-items: flex-end; justify-content: center; gap: 12px; pointer-events: none; }
.bottom > * { pointer-events: auto; }
.hand { display: flex; gap: 14px; align-items: flex-end; padding: 10px 14px; }
.cards { display: flex; gap: 7px; }
.rc { position: relative; width: 56px; height: 76px; border-radius: 10px; border: 2px solid rgba(255, 255, 255, 0.5); display: grid; place-items: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35); transition: transform 0.15s, opacity 0.2s, filter 0.2s; }
.rc .ico { width: 36px; height: 36px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
.rc .n { position: absolute; right: -7px; top: -8px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 99px; background: #fff; color: #1a1408; font-weight: 800; font-size: 14px; display: grid; place-items: center; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4); }
.rc.zero { opacity: 0.35; filter: saturate(0.4); }
.rc.zero .n { display: none; }
.rc.pop { animation: pop 0.45s; }
@keyframes pop { 30% { transform: translateY(-12px) scale(1.12); } }
.rc.wood { background: linear-gradient(160deg, #57a551, #2c6a31); } .rc.brick { background: linear-gradient(160deg, #e18a5c, #a94a26); }
.rc.wool { background: linear-gradient(160deg, #b5e58a, #6aae3f); } .rc.grain { background: linear-gradient(160deg, #f7dc6e, #caa024); }
.rc.ore { background: linear-gradient(160deg, #aab1bd, #626975); } .rc.gold { background: linear-gradient(160deg, #ffe07a, #c9950f); }
.rc.sm { width: 40px; height: 54px; border-radius: 8px; } .rc.sm .ico { width: 25px; height: 25px; } .rc.sm .n { min-width: 20px; height: 20px; font-size: 12px; }
button.rc { cursor: pointer; padding: 0; color: inherit; }
button.rc:hover:not(:disabled) { transform: translateY(-4px); }
.devs { display: flex; gap: 6px; padding-left: 12px; border-left: 1px solid var(--line); }
.dc { position: relative; width: 56px; height: 76px; border-radius: 10px; border: 2px solid #cbb7ff; background: linear-gradient(160deg, #7c5fc6, #45307f); display: grid; place-items: center; cursor: pointer; padding: 0; transition: transform 0.15s; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); }
.dc .ico { width: 34px; height: 34px; }
.dc:hover:not(:disabled) { transform: translateY(-6px); }
.dc:disabled { cursor: default; filter: saturate(0.5) brightness(0.75); }
.dc.new::after { content: 'neu'; position: absolute; bottom: 3px; font-size: 10px; font-weight: 800; background: rgba(0, 0, 0, 0.55); padding: 0 5px; border-radius: 6px; }
.dc.vp { background: linear-gradient(160deg, #f4d35e, #b9870c); border-color: #fff0b8; }
.dc .n { position: absolute; right: -7px; top: -8px; min-width: 22px; height: 22px; border-radius: 99px; background: #fff; color: #1a1408; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.actions { display: grid; gap: 8px; padding: 10px; justify-items: stretch; }
.build { display: flex; gap: 6px; }
.bb { position: relative; width: 58px; height: 62px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; display: grid; place-items: center; padding: 4px 2px 2px; color: var(--mycolor, #fff); transition: transform 0.1s, background 0.15s, box-shadow 0.15s; }
.bb .ico { width: 28px; height: 28px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4)); }
.bb small { font-size: 10.5px; font-weight: 800; color: var(--text); }
.bb:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); transform: translateY(-2px); }
.bb:disabled { opacity: 0.35; cursor: not-allowed; }
.bb.on { background: rgba(242, 194, 48, 0.22); box-shadow: 0 0 0 2px var(--gold); }
.bb .left { position: absolute; top: -6px; right: -4px; font-size: 11px; font-weight: 800; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 99px; padding: 0 5px; color: var(--muted); }
.tip { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); background: var(--panel-solid); border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; display: none; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--text); z-index: 5; box-shadow: var(--shadow); }
.tip .cost { display: flex; gap: 3px; justify-content: center; margin-top: 4px; }
.tip .cost .ico { width: 18px; height: 18px; }
.bb:hover .tip, .dc:hover .tip { display: block; }
.mainbtns { display: flex; gap: 8px; }
.mainbtns .btn { flex: 1; }
.rollbtn { animation: glow 1.4s infinite; }
@keyframes glow { 50% { box-shadow: 0 3px 0 #8a6408, 0 0 26px rgba(242, 194, 48, 0.75); } }

/* Handel */
.trade { position: absolute; left: 50%; bottom: calc(var(--bh, 126px) + 8px); transform: translateX(-50%); width: min(96vw, 560px); padding: 14px; display: grid; gap: 10px; z-index: 6; }
.trade h3 { font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.trow { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: center; }
.trow > span { font-weight: 800; font-size: 13px; color: var(--muted); }
.tpick { display: flex; gap: 6px; }
.tp { display: grid; justify-items: center; gap: 3px; }
.tp .step { display: flex; gap: 2px; }
.tp .step button { width: 21px; height: 21px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-weight: 800; padding: 0; line-height: 1; }
.tp .ratio { font-size: 10.5px; color: var(--muted); font-weight: 800; }
.offers { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(94vw, 430px); z-index: 7; }
.offer { padding: 12px; display: grid; gap: 8px; animation: toastIn 0.25s; }
.offer .ex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 800; }
.offer .ex .arrow { color: var(--gold); font-size: 18px; }
.offer .resp { display: flex; gap: 6px; flex-wrap: wrap; }
.mini { display: inline-flex; align-items: center; gap: 2px; padding: 2px 7px 2px 4px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 800; font-size: 13px; }
.mini .ico { width: 18px; height: 18px; }

/* Dialoge */
.dlg { width: min(100%, 520px); padding: 22px; display: grid; gap: 14px; animation: dlgIn 0.25s ease-out; }
.dlg.wide { width: min(100%, 720px); }
/* nur Bewegung, keine Transparenz: auf langsamen Geräten bleibt ein Dialog so nie unsichtbar hängen */
@keyframes dlgIn { from { transform: translateY(14px) scale(0.97); } }
.dlg h2 { font-size: 22px; color: var(--gold); }
.dlg .foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.pickrow { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.choice { display: grid; gap: 8px; }
.choice .btn { justify-content: flex-start; }
.rank { display: grid; gap: 6px; }
.rank > div { display: grid; grid-template-columns: 30px auto 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 800; }
.rank > div.win { border-color: var(--gold); background: rgba(242, 194, 48, 0.14); }
.rank .pts { font-family: var(--display); font-size: 20px; color: var(--gold); }
.histo { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; align-items: end; height: 90px; }
.histo div { background: linear-gradient(180deg, var(--gold-2), #b8860b); border-radius: 4px 4px 0 0; position: relative; min-height: 2px; }
.histo div span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); font-weight: 800; }
.costs { display: grid; gap: 6px; font-size: 13.5px; }
.costs > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 9px; background: var(--panel-2); }
.costs .cost { display: flex; gap: 3px; }
.costs .ico { width: 20px; height: 20px; }

.flycard { position: absolute; width: 30px; height: 40px; margin: -20px 0 0 -15px; border-radius: 6px; border: 2px solid rgba(255, 255, 255, 0.8); display: grid; place-items: center; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45); will-change: transform, opacity; }
.flycard .ico { width: 20px; height: 20px; }
.emote { position: absolute; font-size: 30px; animation: emo 1.8s ease-out forwards; }
@keyframes emo { to { transform: translateY(-90px) scale(1.5); opacity: 0; } }
.banner { position: fixed; left: 50%; top: 34%; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 900; font-size: clamp(30px, 6vw, 60px); color: var(--gold); text-shadow: 0 4px 0 #7a5a0c, 0 12px 34px rgba(0, 0, 0, 0.7); pointer-events: none; z-index: 45; animation: banner 2.2s ease-out forwards; text-align: center; white-space: nowrap; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.7); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1); } }
.conn { position: fixed; bottom: 8px; left: 8px; z-index: 70; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 99px; background: var(--danger); display: none; }
.conn.show { display: block; }

/* ---------- kleine Bildschirme */
@media (max-width: 900px) {
  .home-grid, .lobby { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .players { width: auto; right: 12px; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); top: 58px; gap: 4px; }
  .pl { grid-template-columns: auto 1fr; padding: 5px 6px; gap: 2px 5px; }
  .pl .nm { font-size: 12px; }
  .pl .vp { grid-column: 1 / -1; font-size: 15px; }
  .pl .meta { font-size: 11px; gap: 5px; flex-wrap: wrap; }
  .pl.turn { transform: none; }
  .pl.me .nm::after { content: ''; }
  .status { top: 8px; left: 8px; right: 128px; transform: none; padding: 7px 12px; font-size: 13px; max-width: none; justify-content: center; }
  .topright { top: 8px; right: 8px; }
  .topright .btn.icon { width: 34px; height: 34px; }
  .topright .hide-s { display: none; }
  .side { top: 130px; right: 8px; left: 8px; width: auto; bottom: calc(var(--bh, 240px) + 8px); z-index: 8; }
  .bank { display: none; }
  .bottom { flex-direction: column; align-items: stretch; gap: 6px; padding: 0 6px calc(6px + var(--safe-b)); }
  .hand { overflow-x: auto; padding: 12px 10px 8px; gap: 8px; }
  .rc, .dc { width: 46px; height: 62px; flex: none; }
  .rc .ico { width: 28px; height: 28px; }
  .actions { padding: 8px; }
  .build { justify-content: space-between; }
  .bb { width: auto; flex: 1; height: 54px; }

  .offers { top: 132px; }
  #toasts { top: 132px; }
  .tip { display: none !important; }
}
@media (max-height: 560px) and (min-width: 901px) {
  .side { bottom: 150px; }
}
.botico { width: 14px; height: 14px; margin-left: 5px; vertical-align: -2px; color: var(--muted); }
.pl.clickable { cursor: pointer; border-style: dashed; }

/* ---------- Wehrhafte Städte */
.rc.paper { background: linear-gradient(160deg, #f4ead0, #b9a473); } .rc.cloth { background: linear-gradient(160deg, #cf9df0, #7a3fa3); } .rc.coin { background: linear-gradient(160deg, #86b3ea, #2f5c96); }
.cards.coms { padding-left: 10px; border-left: 1px solid var(--line); }
.dc.prog { background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 75%, #fff), color-mix(in srgb, var(--tc) 55%, #000)); border-color: color-mix(in srgb, var(--tc) 50%, #fff); width: 74px; padding: 4px; }
.dc.prog .pname { font-size: 10.5px; font-weight: 800; line-height: 1.15; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); text-align: center; overflow-wrap: anywhere; hyphens: auto; }
.dc .tip { white-space: normal; width: 210px; text-align: left; font-weight: 600; }
.ckrow { display: flex; gap: 5px; flex-wrap: wrap; }
.ckrow .btn { flex: 1; padding: 6px 7px; font-size: 12px; }
.ckrow .btn .ico { width: 15px; height: 15px; }
.btn.ready { border-color: var(--gold); color: var(--gold-2); }
.pickhint { max-width: 330px; font-weight: 700; color: var(--gold-2); }
.barb { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 99px; font-weight: 800; font-size: 13px; }
.barb.danger { border-color: var(--danger); animation: glowred 1.2s infinite; }
@keyframes glowred { 50% { box-shadow: 0 0 22px rgba(226, 87, 76, 0.8); } }
.barb .steps { display: flex; gap: 4px; }
.barb .steps i { width: 14px; height: 8px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); }
.barb .steps i.on { background: var(--danger); }
.barb .vs { display: inline-flex; align-items: center; gap: 4px; }
.barb .vs.bad { color: #ffb4ad; } .barb .vs.ok { color: #a6e8b4; }
.barb .ico { width: 18px; height: 18px; color: #fff; }
.improve { width: min(96vw, 680px); }
.tracks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.track { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent); align-content: start; }
.track b { color: var(--tc); font-family: var(--display); }
.track small { font-size: 11.5px; line-height: 1.3; }
.track .btn .ico { width: 16px; height: 16px; }
.pips { display: flex; gap: 4px; }
.pips i { flex: 1; height: 10px; border-radius: 3px; background: rgba(255, 255, 255, 0.13); }
.pips i.on { background: var(--tc); }
.pips i.perk { outline: 1px solid var(--tc); }
.pips i.metro { border-radius: 3px 3px 0 0; height: 14px; margin-top: -4px; }
.step.big { gap: 4px !important; }
.step.big button { width: 34px !important; height: 34px !important; font-size: 16px; }
.step.big button.on { background: var(--gold); color: #2a1e04; }
@media (max-width: 900px) {
  .barb { top: 128px; }
  .tracks { grid-template-columns: 1fr; }
  .dc.prog { width: 64px; }
}

/* ---------- Fischgründe, Hafenmeister */
.rc.fish { background: linear-gradient(160deg, #8fdcf5, #2f8fb8); }
.bootmark { position: absolute; left: -8px; bottom: -8px; width: 26px; height: 26px; border-radius: 50%; background: var(--panel-solid); border: 1px solid var(--danger); display: grid; place-items: center; }
.bootmark .ico { width: 16px; height: 16px; }
.pl .meta .bad { color: #ffb4ad; }
.choice .btn .mini { margin-right: 8px; }
.card.wide { max-height: calc(100vh - 36px); overflow-y: auto; }

/* ---------- Rechtstexte und Fußzeile */
.legal-links { display: flex; gap: 16px; justify-content: center; font-size: 12.5px; }
a { color: var(--gold-2); }
body.legal { overflow: auto; background: radial-gradient(ellipse at 50% 0%, #17406b, #0b1a2e 70%); padding: 24px 14px; }
.legal-page { max-width: 760px; margin: 0 auto; padding: 28px; line-height: 1.6; }
.legal-page h1 { color: var(--gold); font-size: 30px; margin-bottom: 14px; }
.legal-page h2 { color: var(--gold-2); font-size: 18px; margin: 22px 0 6px; }
.legal-page p, .legal-page ul { margin: 0 0 12px; }

/* ---------- Rundenliste */
.rounds { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; }
.round { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13.5px; }
.round .muted { font-size: 12px; margin-top: 2px; }

/* ---------- Karteneditor */
.mapedit { width: 100%; max-height: 52vh; background: #0f4f78; border-radius: 12px; border: 1px solid var(--line); touch-action: none; cursor: crosshair; user-select: none; }
.mapedit polygon { stroke: rgba(255, 255, 255, 0.18); stroke-width: 1; }
.mapedit polygon.land { stroke: rgba(0, 0, 0, 0.35); stroke-width: 1.4; }
.mapedit polygon:hover { stroke: #fff; stroke-width: 2; }
.brushes { display: flex; gap: 6px; flex-wrap: wrap; }
.brush { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 700; font-size: 13px; cursor: pointer; }
.brush i { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.5); }
.brush.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: rgba(242, 194, 48, 0.14); }
.dlg.editor { width: min(100%, 820px); }

/* Große Varianten: Taler, Karawanen-Abstimmung */
.rc.taler { background: linear-gradient(160deg, #fff0a8, #d8a520); }
.bootmark.good { border-color: var(--gold); }
.bootmark { font-size: 11px; font-weight: 800; color: #ffb4ad; }
.barb.caravan { top: 62px; }
.barb + .barb.caravan, .barb.caravan.low { top: 104px; }
.barb.caravan .vs b { font-weight: 800; }
.pl .meta .bad { color: #ffb4ad; }
button.rc:disabled { opacity: 0.32; filter: saturate(0.35); cursor: default; }
.wagonrow { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 2px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.wagonrow .muted { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; }
.wagonrow .muted .ico { width: 18px; height: 18px; color: var(--gold); }
.wagonrow .btn .ico, .actions > .btn.small .ico { width: 16px; height: 16px; }
.wagonrow .btn .cost { display: inline-flex; gap: 1px; margin-left: 4px; } .wagonrow .btn .cost .ico { width: 14px; height: 14px; }
#modal .dlg { max-height: calc(100vh - 32px); overflow-y: auto; }
