/* ── Artillerie — Oberfläche ──────────────────────────────────────────────
   Eigenständig (kein GameZone-CSS). Farbwelt aus der Szene: Nachtblau, Abendorange, Rost.
   Startbildschirm-Klassen sb-* sind als Vorlage für künftige Spiele gedacht (herauslösbar).
   Schrift: Systemschriften — beim Andocken an GameZone kann das Gerüst die Hausschrift aus dem
   Schriftarchiv setzen (Variable --schrift). */
:root {
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nacht: #0f1530; --glas: rgba(14, 18, 40, 0.84); --glas-hell: rgba(255, 255, 255, 0.07);
  --linie: rgba(255, 210, 170, 0.18); --text: #f4ece4; --leise: #b9aeb4;
  --gold: #f2a65c; --gold-hell: #ffd29a; --rot: #e0553a; --gruen: #7ccf6a; --blau: #5aa6ff;
  --rand: max(12px, env(safe-area-inset-left)); --unten: max(10px, env(safe-area-inset-bottom));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d0f18; color: var(--text); font-family: var(--schrift); }
body { touch-action: none; user-select: none; -webkit-user-select: none; }
#buehne { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
.versteckt { display: none !important; }
.tafel, .sb-karte { touch-action: pan-y; }   /* Tafeln dürfen am Handy scrollen, das Spielfeld nicht */
.ebene { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }

/* ── Startbildschirm (Vorlage) ─────────────────────────────────────────── */
/* padding-top: Startkarte bleibt unter der GameZone-Pille, wenn sie bei niedriger Fensterhöhe die volle Höhe braucht (Prüfung 30.10.) */
.sb { justify-content: flex-start; padding-top: 60px; padding-left: clamp(16px, 6vw, 90px);
  background: linear-gradient(90deg, rgba(8, 10, 24, 0.78) 0%, rgba(8, 10, 24, 0.35) 45%, rgba(8, 10, 24, 0) 70%); }
.sb-karte { width: min(500px, 100%); max-height: 100%; overflow-y: auto; padding: 8px 4px; scrollbar-width: none; }
.sb-titel { margin: 0; font-size: clamp(40px, 5.4vw, 80px); line-height: 0.95; white-space: nowrap; font-weight: 900; letter-spacing: -0.02em; text-transform: uppercase;
  background: linear-gradient(180deg, #fff6e8 0%, #ffcf8a 45%, #e8743a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(255, 120, 40, 0.35)); }
.sb-unterzeile { margin: 10px 0 24px; color: var(--gold-hell); font-size: clamp(14px, 1.6vw, 18px); letter-spacing: 0.02em; }
.sb-gruppe { margin: 0 0 14px; }
.sb-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--leise); margin-bottom: 6px; }
.sb-wahl { display: flex; gap: 6px; background: var(--glas); padding: 5px; border-radius: 14px; border: 1px solid var(--linie); backdrop-filter: blur(8px); }
.sb-wahl button { flex: 1; padding: 10px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--leise); font-weight: 600; transition: background .15s, color .15s; }
.sb-wahl button.an { background: linear-gradient(180deg, #f6b06a, #d9692f); color: #2a1206; box-shadow: 0 2px 10px rgba(240, 120, 50, 0.35); }
.sb-start { width: 100%; margin: 10px 0 14px; padding: 16px; border: 0; border-radius: 16px; font-size: 22px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  background: linear-gradient(180deg, #ffcf8a, #e8743a 60%, #c4501f); color: #2a1206; box-shadow: 0 8px 30px rgba(232, 116, 58, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.sb-start:active { transform: translateY(1px); }
/* Namensfelder (nur zu zweit) — wie .sb-wahl gestaltet */
.sb-namen { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--glas); padding: 5px; border-radius: 14px; border: 1px solid var(--linie); backdrop-filter: blur(8px); }
.sb-namen input { min-width: 0; padding: 10px 12px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.07); color: var(--text); font: inherit; font-weight: 600; }
.sb-namen input:focus { outline: 2px solid rgba(246, 176, 106, 0.8); outline-offset: -2px; }
.sb-namen input::placeholder { color: var(--leise); }
.sb-hilfe { background: var(--glas); border: 1px solid var(--linie); border-radius: 14px; padding: 10px 14px; font-size: 14px; color: var(--leise); backdrop-filter: blur(8px); }
.sb-hilfe summary { color: var(--text); font-weight: 600; cursor: pointer; }
.sb-hilfe p { margin: 8px 0 0; line-height: 1.45; }
.sb-sprache { margin-top: 12px; background: none; border: 1px solid var(--linie); border-radius: 999px; padding: 6px 14px; color: var(--leise); font-size: 13px; }

/* ── Tafeln (Kauf, Rundenende, Pause …) ────────────────────────────────── */
.tafel { width: min(460px, 100%); max-height: 100%; overflow-y: auto; background: var(--glas); border: 1px solid var(--linie); border-radius: 20px;
  padding: 22px; backdrop-filter: blur(14px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); text-align: center; }
.tafel-breit { width: min(880px, 100%); }
.tafel h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; color: var(--gold-hell); }
.leise { color: var(--leise); font-size: 13px; }
.knopf-gross { display: block; width: 100%; margin-top: 14px; padding: 14px; border: 0; border-radius: 14px; font-size: 18px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; background: linear-gradient(180deg, #ffcf8a, #e8743a 60%, #c4501f); color: #2a1206; }
.knopf-leise { display: block; width: 100%; margin-top: 10px; padding: 11px; background: var(--glas-hell); border: 1px solid var(--linie); border-radius: 12px; }
.kauf-fuer { margin: 0 0 8px; color: var(--leise); }
.kauf-fuer.gross { font-size: 20px; font-weight: 800; color: var(--text); }
#kauf-fertig { position: sticky; bottom: 0; box-shadow: 0 -6px 20px rgba(10, 12, 28, 0.6); }
#drehen { background: rgba(8, 10, 24, 0.55); }
.drehen-an #start .sb-karte { visibility: hidden; }
.kauf-konto { display: inline-flex; gap: 8px; align-items: baseline; padding: 6px 16px; border-radius: 999px; background: rgba(242, 166, 92, 0.14); color: var(--gold-hell); margin-bottom: 14px; }
.kauf-konto b { font-size: 24px; }
.kauf-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; text-align: left; }
.kaufteil { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; background: var(--glas-hell); border: 1px solid var(--linie); }
.kaufteil .kt-kopf { display: flex; align-items: center; gap: 10px; }
.kaufteil .kt-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: rgba(0, 0, 0, 0.3); }
.kaufteil .kt-name { font-weight: 700; flex: 1; }
.kaufteil .kt-preis { font-weight: 800; color: var(--gold-hell); white-space: nowrap; }
.kaufteil .kt-info { font-size: 12.5px; color: var(--leise); line-height: 1.35; min-height: 2.7em; }
.kaufteil .kt-fuss { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.kaufteil .kt-besitz { flex: 1; font-size: 12px; color: var(--leise); }
.kaufteil button { border: 0; border-radius: 12px; min-width: 44px; min-height: 40px; padding: 7px 12px; font-weight: 800; font-size: 18px; }
.kaufteil button:disabled { opacity: 0.3; cursor: not-allowed; }
.kt-preis::after, .kauf-konto b::after { content: ''; display: inline-block; width: 0.7em; height: 0.7em; margin-left: 4px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff2c0, #e7a83c 60%, #a86a16); vertical-align: -0.05em; }
.kaufteil.zu:not(.atom) { opacity: 0.75; }
.kaufteil .kt-plus { background: linear-gradient(180deg, #ffcf8a, #e8743a); color: #2a1206; }
.kaufteil .kt-minus { background: var(--glas-hell); }
.kaufteil.zu .kt-plus { opacity: 0.35; cursor: default; }
.kaufteil.atom { border-color: rgba(255, 120, 60, 0.45); background: linear-gradient(160deg, rgba(255, 110, 40, 0.16), rgba(255, 255, 255, 0.04)); }

/* ── Kampf-Anzeige ─────────────────────────────────────────────────────── */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud button, #hud .waffen-liste { pointer-events: auto; }
.hud-oben { position: absolute; top: max(10px, env(safe-area-inset-top)); left: var(--rand); right: var(--rand); display: flex; align-items: flex-start; gap: 10px; }
.spieler-karte { width: min(280px, 32vw); padding: 8px 12px; border-radius: 14px; background: var(--glas); border: 1px solid var(--linie); backdrop-filter: blur(8px); }
.spieler-karte.rechts { text-align: right; margin-left: auto; }
/* Platz für den GameZone-Knopf oben links (_rahmen/rahmen.css .pille-wrap: left 12px, 40px hoch, ~140px breit) —
   ohne den lag die linke Spielerkarte darunter (Micha 28.10.). Schmal (Handy hoch): beide Karten unter die Pille. */
#karte0 { margin-left: calc(var(--gz-pille, 140px) + 12px); }
.spieler-karte.dran { border-color: rgba(255, 200, 140, 0.7); box-shadow: 0 0 0 1px rgba(255, 200, 140, 0.35), 0 0 24px rgba(242, 166, 92, 0.35); }
.sk-name { font-weight: 800; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.rechts .sk-name { justify-content: flex-end; }
.sk-name .farbe { width: 10px; height: 10px; border-radius: 3px; }
.sk-name .siege { color: var(--gold); letter-spacing: 2px; font-size: 12px; }
.sk-hp { height: 8px; border-radius: 99px; background: rgba(0, 0, 0, 0.45); margin: 6px 0 4px; overflow: hidden; }
.sk-hp i { display: block; height: 100%; width: 100%; border-radius: 99px; background: linear-gradient(90deg, #6fd35b, #b8e05a); transition: width .5s ease, background .5s; }
.rechts .sk-hp i { margin-left: auto; }
.sk-hp i.mittel { background: linear-gradient(90deg, #f3c34c, #f29a3c); }
.sk-hp i.tief { background: linear-gradient(90deg, #ef5a3a, #c22c1c); }
.sk-info { font-size: 13px; color: var(--leise); }
.hud-mitte { flex: 0 1 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 auto; }
.hud-runde { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--leise); background: var(--glas); padding: 4px 12px; border-radius: 99px; border: 1px solid var(--linie); }
.wind { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: var(--glas); border: 1px solid var(--linie); font-weight: 700; }
.wind-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--leise); }
.wind-pfeil { position: relative; display: inline-block; width: 64px; height: 12px; }
.wind-pfeil::before { content: ''; position: absolute; top: 4px; height: 4px; border-radius: 2px; background: var(--blau); left: 50%;
  width: calc(var(--laenge, 0) * 50%); }
.wind-pfeil::after { content: ''; position: absolute; top: 0; left: calc(50% + var(--laenge, 0) * 50% - 2px); border: 6px solid transparent; border-left: 9px solid var(--blau); }
.wind-pfeil.links::before { left: auto; right: 50%; }
.wind-pfeil.links::after { left: auto; right: calc(50% + var(--laenge, 0) * 50% - 2px); border-left: 6px solid transparent; border-right: 9px solid var(--blau); }
.wind-pfeil.still::before, .wind-pfeil.still::after { display: none; }
.wind-wert { min-width: 70px; }
.wind-wert { text-align: right; }
.pause-knopf { position: absolute; right: 0; top: 64px; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--linie); background: var(--glas); font-size: 12px; }
/* Ton aus/an links neben Pause (gleiche Form) */
.ton-knopf { right: 48px; display: grid; place-items: center; padding: 0; }
.ton-knopf svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ton-knopf .strich { display: none; } .ton-knopf.aus .strich { display: inline; } .ton-knopf.aus .welle { display: none; }
.meldung { position: absolute; left: 50%; top: 24%; transform: translate(-50%, -50%); font-size: clamp(24px, 4vw, 46px); font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.04em; color: #fff3e0; text-shadow: 0 3px 20px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 140, 60, 0.5); opacity: 0; transition: opacity .25s; white-space: nowrap; }
.meldung.an { opacity: 1; }
.meldung.klein { font-size: clamp(16px, 2.2vw, 24px); }
.ziel-anzeige { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); padding: 8px 18px; border-radius: 14px; background: var(--glas); font-size: 22px; font-weight: 800; opacity: 0; transition: opacity .2s; }
.ziel-anzeige.an { opacity: 1; }
.hud-unten { position: absolute; left: var(--rand); right: var(--rand); bottom: var(--unten); display: flex; align-items: stretch; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hud-unten { transition: opacity .25s, transform .25s; }
.hud-unten.aus { opacity: 0; transform: translateY(16px); pointer-events: none; }
.hud-unten.aus button { pointer-events: none; }
.hud-unten > * { background: var(--glas); border: 1px solid var(--linie); border-radius: 14px; backdrop-filter: blur(8px); }
.waffen-knopf { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 6px 14px; min-width: 150px; text-align: left; }
.wk-label, .rg-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--leise); }
.waffen-knopf b { font-size: 15px; }
.waffen-knopf span:last-child { font-size: 12px; color: var(--gold-hell); }
.regler { display: grid; grid-template-columns: 38px 64px 38px; grid-template-rows: auto 1fr; align-items: center; padding: 4px 6px 6px; }
.regler .rg-label { grid-column: 1 / -1; text-align: center; }
.regler b { text-align: center; font-size: 20px; font-variant-numeric: tabular-nums; }
.regler button { height: 38px; border: 0; border-radius: 10px; background: var(--glas-hell); font-size: 20px; font-weight: 800; }
.regler.fahren { grid-template-columns: 44px 44px; gap: 4px; }
.rep-knopf { padding: 6px 12px; font-weight: 700; }
.feuer-knopf { min-width: 130px; padding: 0 22px; font-size: 22px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: #2a1206;
  background: linear-gradient(180deg, #ffcf8a, #e8743a 60%, #c4501f) !important; border: 0 !important; box-shadow: 0 6px 24px rgba(232, 116, 58, 0.45); }
.feuer-knopf:active { transform: translateY(1px); }
.waffen-liste { position: absolute; left: var(--rand); bottom: calc(var(--unten) + 78px); display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 16px; background: var(--glas); border: 1px solid var(--linie); backdrop-filter: blur(12px); }
.waffen-liste button { display: flex; justify-content: space-between; gap: 18px; min-width: 220px; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--glas-hell); font-weight: 700; }
.waffen-liste button.an { background: linear-gradient(180deg, #f6b06a, #d9692f); color: #2a1206; }
.waffen-liste button:disabled { opacity: 0.35; }
.gegner-pfeil { position: absolute; right: 8px; transform: translateY(-50%); padding: 6px 12px; border-radius: 99px; background: var(--glas);
  border: 1px solid rgba(224, 85, 58, 0.6); color: #ffb39a; font-weight: 800; font-size: 14px; }
.gegner-pfeil.links { right: auto; left: 8px; }
#zahlen { position: fixed; inset: 0; pointer-events: none; z-index: 11; }
.zahl { position: absolute; transform: translate(-50%, -50%); font-weight: 900; font-size: 26px; color: #ffe2b0; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 0 0 18px rgba(255, 90, 40, 0.6);
  animation: zahlSteigt 1.6s ease-out forwards; }
.zahl.gross { font-size: 40px; color: #fff; }
.zahl.fall { color: #c9d6ff; font-size: 20px; }
@keyframes zahlSteigt { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
.ergebnis-zeile { margin: 6px 0; color: var(--leise); }
.ergebnis-gross { font-size: 30px; font-weight: 900; color: var(--gold-hell); margin: 4px 0 10px; }
.drehen-bild { font-size: 56px; color: var(--gold); animation: drehen 2.4s ease-in-out infinite; }
@keyframes drehen { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(90deg); } }
.laden { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 30; padding: 10px 18px; border-radius: 99px; background: var(--glas); border: 1px solid var(--linie); color: var(--leise); }

/* ── Kleine Höhe (Handy quer) und schmale Breite (Handy hoch) ───────────── */
@media (max-height: 520px) {
  .sb-titel { font-size: 44px; } .sb-unterzeile { margin: 6px 0 12px; } .sb-gruppe { margin-bottom: 8px; }
  .sb-wahl button { padding: 7px 6px; } .sb-start { padding: 11px; margin: 6px 0 8px; font-size: 18px; }
  .spieler-karte { padding: 5px 10px; } .sk-name { font-size: 13px; } .sk-info { font-size: 11px; } .sk-hp { margin: 3px 0 2px; }
  .sb-karte { width: min(760px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-content: center; }
  .sb-titel, .sb-unterzeile { grid-column: 1 / -1; } .sb-start { align-self: end; }
  .hud-runde { display: none; } .wind { padding: 4px 10px; } .pause-knopf { top: 0; right: auto; left: 50%; transform: translateX(110px); width: 34px; height: 34px; }
  .ton-knopf { transform: translateX(150px); }
  .hud-unten { gap: 5px; } .waffen-knopf { min-width: 112px; padding: 4px 10px; } .waffen-knopf b { font-size: 13px; }
  .regler { grid-template-columns: 32px 50px 32px; padding: 2px 4px 4px; } .regler b { font-size: 16px; } .regler button { height: 32px; font-size: 17px; }
  .regler.fahren { grid-template-columns: 36px 36px; } .feuer-knopf { min-width: 96px; font-size: 18px; }
  .rep-knopf { font-size: 12px; } .ziel-anzeige { bottom: 84px; }
  .waffen-liste { bottom: calc(var(--unten) + 62px); } .waffen-liste button { padding: 7px 10px; }
  .tafel { padding: 14px; } .tafel h2 { font-size: 20px; } .kauf-liste { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
  .kaufteil { padding: 8px; } .kaufteil .kt-info { display: none; }
}
@media (max-width: 640px) {
  .sb { justify-content: center; padding-left: 16px; background: linear-gradient(180deg, rgba(8, 10, 24, 0.2) 0%, rgba(8, 10, 24, 0.8) 60%); align-items: flex-end; }
  .spieler-karte { width: 40vw; } .wind-label { display: none; }
  .hud-oben { flex-wrap: wrap; } .hud-mitte { order: 3; width: 100%; } .pause-knopf { top: 0; right: auto; left: 50%; transform: translateX(-50%); width: 34px; height: 34px; }
  .ton-knopf { transform: translateX(calc(-50% + 42px)); }
  .hud-unten { display: grid; grid-template-columns: 1fr 1fr; } .feuer-knopf { grid-column: 1 / -1; padding: 14px; } .regler { justify-content: center; }
  .waffen-knopf { min-width: 0; }
  #karte0 { margin-left: 0; } .hud-oben { top: calc(max(10px, env(safe-area-inset-top)) + 50px); }
}
