/* ============================================================
   SECRET HITLER · FAN-EDITION — Zero-Scroll iPhone & PC Tabletop
   Default-Theme: Weimar Klassik (classic).
   Weitere Themes (brutal · cartoon · arcade) in themes.css.
   ============================================================ */

:root, [data-theme="classic"] {
  --bg: #161210;
  --bg-pattern: radial-gradient(ellipse at 50% 0%, rgba(204, 158, 66, .11), transparent 60%),
                radial-gradient(rgba(244, 233, 210, .035) 1px, transparent 1.2px) 0 0 / 24px 24px;
  --panel: #211c19;
  --panel2: #2b2420;
  --hud-bg: rgba(24, 19, 17, .92);
  --ink: #f4e9d2;
  --dim: #b4a792;
  --line: rgba(244, 233, 210, .20);
  --line-strong: rgba(244, 233, 210, .48);
  --line-w: 1.5px;
  --chip-bd: rgba(0, 0, 0, .55);
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --sh-lg: 0 14px 36px rgba(0, 0, 0, .55);
  --sh: 0 8px 22px rgba(0, 0, 0, .44);
  --sh-sm: 0 4px 12px rgba(0, 0, 0, .35);
  --sh-xs: 0 2px 6px rgba(0, 0, 0, .28);
  --sh-stk: 0 3px 10px rgba(0, 0, 0, .35);
  --hero-sh: 0 8px 24px rgba(202, 62, 43, .38);
  --pulse-sh: 0 10px 28px rgba(202, 62, 43, .45), 0 0 0 2.5px rgba(212, 166, 74, .42);
  --red: #ca3e2b;
  --red2: #96221c;
  --yellow: #d4a64a;
  --gold: var(--yellow);
  --cyan: #5ca6be;
  --blue: #347e9a;
  --green: #4c9a68;
  --yes-ink: #0f2416;
  --no-ink: #fbf5e8;
  --btn-bg: #2e2722;
  --btn-ink: #f4e9d2;
  --logo-sh: 0 4px 16px rgba(0, 0, 0, .65);
  --ava-bg: #f4e9d2;
  --ava-ink: #1e1916;
  --tick-bg: #261e1a;
  --tick-ink: #d4a64a;
  --code-bg: #f4e9d2;
  --code-ink: #1e1916;
  --card-sh: 0 8px 20px rgba(0, 0, 0, .55), 0 1px 0 rgba(255, 255, 255, .14);
  --card-sh-hover: 0 14px 28px rgba(0, 0, 0, .65), 0 0 0 2px var(--gold);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --pop-ease: cubic-bezier(.22, 1.25, .36, 1);
  --hud-h: 52px;
  --tab-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; min-height: 100dvh; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; scrollbar-gutter: stable; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  overscroll-behavior-y: none;
}
[data-motion="calm"] *, [data-motion="calm"] *::before, [data-motion="calm"] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: var(--bg-pattern), var(--bg);
}
::selection { background: var(--yellow); color: #161210; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

#app {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(10px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
#app.in-game {
  padding-top: 0;
  padding-bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom));
}
@media (min-width: 960px) {
  #app.in-game { padding-bottom: 28px; }
}

/* ---------------- Boot ---------------- */
.boot {
  position: fixed; inset: 0; display: flex; flex-direction: column; gap: 16px;
  align-items: center; justify-content: center; background: var(--bg); z-index: 200;
  transition: opacity .35s; text-align: center; padding: 24px;
}
.boot.gone { opacity: 0; pointer-events: none; }
.boot-logo {
  width: min(220px, 60vw); height: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .65));
  animation: bootFloat 1.6s ease-in-out infinite;
}
@keyframes bootFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.boot-text span {
  display: inline-block; color: var(--code-ink); background: var(--yellow);
  border-radius: 999px; padding: 5px 14px; letter-spacing: 2px; font-size: 11px;
  font-weight: 900; text-transform: uppercase; box-shadow: var(--sh-sm);
}

/* ---------------- Home / Brand (kompakt, 1 Screen auf iPhone!) ---------------- */
.home-shell {
  max-width: 440px; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
.brand-hero { text-align: center; margin: 0 0 6px; }
.brand-hero .brand-logo {
  width: min(210px, 54vw); height: auto; display: block; margin: 0 auto 4px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .6));
}
.card-fan {
  display: flex; justify-content: center; align-items: flex-end;
  height: 92px; margin: 6px auto 8px; position: relative;
}
.card-fan img {
  height: 84px; width: auto; border-radius: 6px;
  box-shadow: var(--card-sh);
  transition: transform .22s var(--pop-ease);
  user-select: none; -webkit-user-drag: none;
}
.card-fan img:nth-child(1) { transform: rotate(-11deg) translateX(15px) translateY(3px); z-index: 1; }
.card-fan img:nth-child(2) { transform: translateY(-3px) scale(1.05); z-index: 3; }
.card-fan img:nth-child(3) { transform: rotate(11deg) translateX(-15px) translateY(3px); z-index: 2; }
.card-fan:hover img:nth-child(1) { transform: rotate(-15deg) translateX(8px); }
.card-fan:hover img:nth-child(2) { transform: translateY(-8px) scale(1.09); }
.card-fan:hover img:nth-child(3) { transform: rotate(15deg) translateX(-8px); }

.join-inline { display: flex; gap: 8px; align-items: stretch; }
.join-inline input.code { width: 122px; flex: none; font-size: 19px; letter-spacing: 5px; padding: 10px 8px; }
.join-inline .btn { flex: 1; }

h1.logo {
  margin: 4px 0 4px; text-align: center; font-size: clamp(22px, 5.8vw, 34px);
  font-weight: 900; letter-spacing: .6px; line-height: 1.08; text-transform: uppercase;
  color: var(--ink); text-shadow: var(--logo-sh);
}
h1.logo em {
  display: inline-block; font-style: normal; margin-top: 6px;
  font-size: .37em; letter-spacing: 2.2px; color: var(--code-ink);
  background: var(--yellow); border: var(--line-w) solid var(--chip-bd);
  border-radius: 6px; padding: 3px 11px; box-shadow: var(--sh-stk);
  text-shadow: none; -webkit-text-fill-color: var(--code-ink);
}
.sub { text-align: center; color: var(--dim); font-size: 13px; font-weight: 600; margin: 6px 0 10px; line-height: 1.4; }

.sticker-row { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 4px 0 10px; }
.sticker {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(52, 126, 154, .22); color: var(--ink);
  font-weight: 800; font-size: 10.5px; letter-spacing: .7px; text-transform: uppercase;
  border: 1px solid rgba(52, 126, 154, .6); border-radius: 999px; padding: 4px 9px;
}
.sticker.alt { background: rgba(202, 62, 43, .22); border-color: rgba(202, 62, 43, .65); color: #ffd9d2; }
.sticker.y { background: rgba(212, 166, 74, .2); border-color: rgba(212, 166, 74, .65); color: var(--yellow); }

.panel {
  background: var(--panel); border: var(--line-w) solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); padding: 14px; margin-bottom: 12px;
}
.stage-panel {
  min-height: 360px;
  display: flex; flex-direction: column;
}
@media (min-width: 960px) {
  .stage-panel { min-height: 410px; }
}
.stage-main { flex: 1; }
@keyframes pop { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: var(--line-w) solid var(--line-strong); border-radius: var(--r-md); cursor: pointer;
  background: var(--btn-bg); color: var(--btn-ink);
  font: inherit; font-weight: 800; letter-spacing: .35px; padding: 10px 14px;
  min-height: 44px;
  box-shadow: var(--sh-sm); transition: transform .12s, box-shadow .12s, filter .15s, border-color .15s;
  user-select: none; text-transform: uppercase; font-size: 13px;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: var(--sh); border-color: var(--gold); }
.btn:active { transform: translateY(1px) scale(.98); box-shadow: var(--sh-xs); }
.btn:disabled { opacity: .42; cursor: not-allowed; filter: grayscale(.6); transform: none; box-shadow: var(--sh-xs); }
.btn.primary { background: var(--red); color: var(--no-ink); border-color: rgba(255, 255, 255, .25); }
.btn.blue { background: var(--blue); color: #fff; border-color: rgba(255, 255, 255, .25); }
.btn.gold { background: var(--yellow); color: #1a1408; border-color: rgba(0, 0, 0, .25); }
.btn.ghost { background: rgba(255, 255, 255, .04); border-color: var(--line); }
.btn.big { width: 100%; padding: 13px 16px; font-size: 14.5px; border-radius: var(--r-md); min-height: 48px; }
.btn.small { padding: 8px 9px; font-size: 11px; letter-spacing: .1px; min-height: 38px; box-shadow: var(--sh-xs); white-space: nowrap; }

input.field {
  width: 100%; padding: 11px 13px; border-radius: var(--r-md); border: var(--line-w) solid var(--line-strong);
  background: rgba(0, 0, 0, .28); color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; outline: none;
  min-height: 46px;
}
input.field::placeholder { color: var(--dim); opacity: .7; }
input.field:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(212, 166, 74, .2); }
input.code { text-transform: uppercase; letter-spacing: 8px; text-align: center; font-weight: 900; font-size: 20px; }

.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 96px; }
.center { text-align: center; }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.hr { height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); margin: 12px 0; border: 0; }

/* ---------------- SLIM STICKY TOP HUD (iPhone & PC) ---------------- */
.hud {
  position: sticky; top: 0; z-index: 65;
  margin: 0 calc(max(12px, env(safe-area-inset-left)) * -1) 10px calc(max(12px, env(safe-area-inset-left)) * -1);
  padding: calc(8px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  background: var(--hud-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
@media (min-width: 960px) {
  .hud { margin: 0 0 12px 0; border-radius: 0 0 var(--r-md) var(--r-md); border: 1px solid var(--line); border-top: 0; }
}
.hud-scores { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.hud-scores::-webkit-scrollbar { display: none; }
.hud-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 999px;
  background: var(--panel2); border: 1px solid var(--line);
  font-size: 12px; font-weight: 900; color: var(--ink);
  white-space: nowrap;
}
.hud-pill.lib { border-color: rgba(52, 126, 154, .65); color: #8ad0e8; }
.hud-pill.fac { border-color: rgba(202, 62, 43, .65); color: #ff9c8f; }
.hud-pill.fac.danger { background: rgba(202, 62, 43, .30); border-color: var(--red); color: #fff; }
.hud-pill.timer { border-color: var(--gold); color: var(--yellow); font-variant-numeric: tabular-nums; }
.hud-pill.timer.low { background: rgba(202, 62, 43, .3); border-color: var(--red); color: #fff; }
.tracker-dots { display: inline-flex; gap: 3px; align-items: center; }
.tracker-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .14); border: 1px solid var(--line-strong); }
.tracker-dots i.on { background: var(--red); border-color: #ff9c8f; box-shadow: 0 0 5px rgba(202, 62, 43, .85); }

.hud-actions { display: flex; align-items: center; gap: 5px; flex: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px;
  background: var(--panel2); border: 1px solid var(--line); color: var(--ink);
  font-size: 15px; font-weight: 800; cursor: pointer; user-select: none;
  transition: border-color .14s, transform .1s, background .14s;
}
.icon-btn:hover { border-color: var(--gold); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.on { border-color: var(--gold); background: rgba(212, 166, 74, .18); color: var(--yellow); }
.icon-btn.role-peek-desk { display: none; font-size: 12px; padding: 0 11px; }
@media (min-width: 960px) {
  .icon-btn.role-peek-desk { display: inline-flex; }
}

/* ---------------- NATIVE iOS BOTTOM TAB BAR (nur < 960px!) ---------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 75;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
  padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: var(--hud-bg);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
@media (min-width: 960px) { .tabbar { display: none; } }
.tab-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 48px; border: 0; background: transparent; color: var(--dim);
  font: inherit; font-size: 10px; font-weight: 800; letter-spacing: .3px;
  border-radius: 10px; cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: color .14s, background .14s, transform .1s;
}
.tab-btn .ti { font-size: 19px; line-height: 1; }
.tab-btn.active { color: var(--yellow); background: rgba(212, 166, 74, .13); }
.tab-btn.role-hold { color: var(--ink); background: rgba(202, 62, 43, .16); border: 1px solid rgba(202, 62, 43, .4); }
.tab-btn.role-hold:active { transform: scale(.94); background: rgba(202, 62, 43, .32); }
.tab-badge {
  position: absolute; top: 3px; right: 12%;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Mobile Tab Visibility vs Desktop Full Tabletop Grid */
.desktop-boards { display: none; }
@media (min-width: 960px) {
  .desktop-boards { display: block; margin-bottom: 12px; }
  .mobile-only { display: none !important; }
}
.game-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 960px) {
  .game-grid { grid-template-columns: 1.55fr 1fr; align-items: start; }
  .side-col { position: sticky; top: 64px; }
}
@media (max-width: 959px) {
  .mob-pane { display: none; }
  .mob-pane.active { display: block; }
}

/* ---------------- Lobby + Offline QR-Code ---------------- */
.lobby-top {
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  margin: 8px 0 10px;
}
.qr-box {
  width: 118px; height: 118px; padding: 5px; border-radius: 12px;
  background: #f4e9d2; box-shadow: var(--card-sh); flex: none; cursor: pointer;
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.code-hero { text-align: center; }
.code-hero .code {
  display: inline-block; font-size: clamp(32px, 9vw, 48px); font-weight: 900; letter-spacing: 10px;
  color: var(--code-ink); background: var(--code-bg); border: 2px solid var(--gold);
  border-radius: var(--r-md); padding: 6px 16px 6px 24px; box-shadow: var(--hero-sh);
  cursor: pointer;
}
.join-url { font-size: 11.5px; color: var(--dim); font-weight: 600; word-break: break-all; cursor: pointer; margin-top: 6px; padding: 4px; max-width: 240px; }
.join-url:hover { color: var(--yellow); }

.mode-preview {
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 9px 12px; margin: 8px 0; text-align: center; font-size: 12.5px; font-weight: 700;
  color: var(--ink); line-height: 1.4;
}
.mode-preview b { color: var(--yellow); }

.opt-grid {
  display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin: 8px 0 10px;
}
.opt-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--dim); font: inherit; font-size: 11.5px; font-weight: 800;
  cursor: pointer; min-height: 36px;
}
.opt-chip.on { border-color: var(--gold); color: var(--yellow); background: rgba(212, 166, 74, .14); }

.plist { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin: 10px 0; }
.pchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  background: var(--panel2); border: var(--line-w) solid var(--line); font-weight: 800; font-size: 13px;
}
.pchip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.pchip.off .dot { background: #5c544b; }
.pchip .host { color: var(--yellow); }
.pchip .btn.small { min-height: 26px; padding: 2px 7px; font-size: 11px; }

/* ---------------- Rollenkarte (3D-Flip) ---------------- */
.role-stage { perspective: 1200px; margin: 10px auto; width: min(260px, 68vw); }
.role-card {
  position: relative; width: 100%; aspect-ratio: 600 / 840;
  transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
  transition: transform .72s cubic-bezier(.2, .75, .25, 1); cursor: pointer;
}
.role-card.flipped { transform: rotateY(180deg); }
.role-face {
  position: absolute; inset: 0; border-radius: 14px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: var(--card-sh); border: 2px solid rgba(244, 233, 210, .35); background: #2c2220;
}
.role-face img.card-art { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.role-back { transform: rotateY(0deg) translateZ(1px); }
.role-back .tap-hint {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  background: rgba(22, 18, 16, .88); color: var(--yellow);
  border: 1px solid rgba(212, 166, 74, .6); border-radius: 999px;
  padding: 6px 10px; font-size: 11.5px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase;
}
.role-front { transform: rotateY(180deg) translateZ(1px); }
@keyframes flipin {
  from { transform: rotateY(95deg) scale(.92); }
  65%  { transform: rotateY(-6deg) scale(1.02); }
  to   { transform: rotateY(0deg) scale(1); }
}
.role-card.just-flipped { animation: flipin .7s var(--pop-ease) both; }

.role-dossier {
  max-width: 400px; margin: 8px auto 12px; padding: 10px 13px;
  border-radius: var(--r-md); background: var(--panel2);
  border: var(--line-w) solid var(--line-strong); text-align: left;
}
.role-dossier.liberal { border-color: var(--blue); }
.role-dossier.fascist { border-color: var(--red); }
.role-dossier.hitler  { border-color: #c83228; }
.role-dossier .rd-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-weight: 900; font-size: 14px; }
.role-dossier .rd-desc { font-size: 12.5px; color: var(--dim); line-height: 1.4; margin: 0; }
.role-dossier .rd-mates {
  margin-top: 8px; padding: 7px 10px; border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .35); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 800;
}
.role-dossier .rd-mates b { color: var(--yellow); }

/* ---------------- Hold-to-Peek Privacy Overlay (#roleov) ---------------- */
.roleov {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(12, 9, 8, .92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; text-align: center;
  user-select: none; -webkit-user-select: none;
}
.roleov[hidden] { display: none; }
.roleov img.peek-card {
  width: min(260px, 68vw); border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .85), 0 0 0 2px var(--gold);
  animation: pop .18s var(--pop-ease) both;
}
.roleov .peek-hint { margin-top: 12px; font-size: 12px; font-weight: 800; color: var(--yellow); letter-spacing: 1px; text-transform: uppercase; }

/* ---------------- Interaktive Spielbretter ---------------- */
.boards-wrap { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: start; }
@media (min-width: 960px) { .boards-wrap { grid-template-columns: 1fr 1fr; gap: 12px; } }
.board-frame {
  width: 100%; border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--card-sh); border: 1.5px solid rgba(244, 233, 210, .25); background: #221c18;
}
.board-canvas { position: relative; width: 100%; aspect-ratio: 2000 / 658; background: #221c18; }
.board-frame img.board-img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.board-card {
  position: absolute; top: 21.8%; height: 56.4%; width: 12.9%;
  transform: translateX(-50%); border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .18);
  pointer-events: none; user-select: none;
}
.board-card.fresh { animation: cardSlam .42s var(--pop-ease) both; }
@keyframes cardSlam {
  0%   { opacity: 0; transform: translateX(-50%) scale(1.45) rotate(-6deg); }
  70%  { opacity: 1; transform: translateX(-50%) scale(.96) rotate(1deg); }
  100% { opacity: 1; transform: translateX(-50%) scale(1) rotate(0); }
}
.tracker-pawn {
  position: absolute; top: 87.5%; width: 3.9%; aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #ffe394, #cc9e42 58%, #7a5514);
  border: 2px solid #1e1610;
  box-shadow: 0 0 0 2px rgba(255, 227, 148, .8), 0 3px 10px rgba(0, 0, 0, .75);
  transition: left .35s var(--pop-ease); pointer-events: none;
}
.tracker-pawn.hot {
  background: radial-gradient(circle at 35% 32%, #ff998a, #ca3e2b 58%, #6d1510);
  box-shadow: 0 0 0 2px rgba(255, 160, 140, .9), 0 0 12px rgba(202, 62, 43, .95);
}
.smallgame-strip {
  display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; align-items: center;
  padding: 6px 8px; background: rgba(202, 62, 43, .14); border-top: 1px solid rgba(202, 62, 43, .35);
  font-size: 11px; font-weight: 800; color: var(--ink);
}
.smallgame-strip .done { text-decoration: line-through; opacity: .45; }
.smallgame-strip .next { color: var(--yellow); }

.piles-row {
  display: flex; gap: 12px; justify-content: center; margin-top: 10px;
}
.pile-mini {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: var(--r-md); background: var(--panel2); border: 1px solid var(--line);
}
.pile-mini img { height: 52px; width: auto; border-radius: 5px; box-shadow: var(--sh-xs); }
.pile-mini b { font-size: 18px; color: var(--yellow); display: block; line-height: 1; }

/* ---------------- Regierungs-Amtsschilder (feste Höhe, kein Springen!) ---------------- */
.gov-banner {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin: 0 0 10px; min-height: 36px; align-items: center;
}
.gov-office {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px; border-radius: 10px;
  background: var(--panel2); border: 1px solid var(--line);
}
.gov-office img.placard-img { width: 84px; height: 24px; object-fit: contain; border-radius: 4px; display: block; flex: none; }
.gov-office .gov-nm { font-size: 13px; font-weight: 900; color: var(--ink); }

/* ---------------- Schwebende Stimm-Enthüllung (#voteov — KEIN Layout-Shift!) ---------------- */
.voteov {
  position: fixed; left: 50%; top: calc(58px + env(safe-area-inset-top));
  transform: translateX(-50%); z-index: 95;
  width: min(540px, 94vw); pointer-events: none;
}
.voteov[hidden] { display: none; }
.vote-reveal {
  pointer-events: auto;
  padding: 10px 12px; border-radius: var(--r-md);
  background: var(--hud-bg); border: 2px solid var(--line-strong);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.vote-reveal.passed { border-color: var(--green); }
.vote-reveal.failed { border-color: var(--red); }
.vr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 900; margin-bottom: 7px; }
.vr-cards { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.vr-item { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 64px; text-align: center; }
.vr-item img { width: 60px; height: 43px; object-fit: cover; border-radius: 4px; box-shadow: var(--sh-xs); }
.vr-item span { font-size: 10.5px; font-weight: 800; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- Gesetz-Behauptungen (unten an der Stage — verschiebt nie die Hauptaktion!) ---------------- */
.claim-bar {
  margin: 12px 0 0; padding: 9px 11px; border-radius: var(--r-md);
  background: rgba(212, 166, 74, .11); border: 1.5px solid rgba(212, 166, 74, .5);
}
.claim-bar .cb-title { font-size: 12px; font-weight: 900; color: var(--yellow); margin-bottom: 7px; }
.claim-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.claim-btns .btn { flex: 1; min-width: 78px; padding: 7px 8px; font-size: 11.5px; min-height: 36px; }

.claim-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.claim-item {
  padding: 8px 10px; border-radius: var(--r-sm); background: var(--panel2);
  border: 1px solid var(--line); font-size: 12px; line-height: 1.45;
}
.claim-item.conflict { border-color: var(--red); background: rgba(202, 62, 43, .16); }
.claim-badge {
  display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10.5px; font-weight: 900;
  margin-right: 4px; text-transform: uppercase;
}
.claim-badge.lib { background: var(--blue); color: #fff; }
.claim-badge.fac { background: var(--red); color: #fff; }
.claim-badge.warn { background: var(--yellow); color: #161210; }

/* ---------------- Spieler-Sitze ---------------- */
.seats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 600px) { .seats { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
.seat {
  position: relative; display: flex; align-items: center; gap: 7px; padding: 9px 10px;
  min-height: 48px;
  background: var(--panel2); border: var(--line-w) solid var(--line); border-radius: var(--r-md);
  font-weight: 800; font-size: 13px; box-shadow: var(--sh-xs);
  transition: transform .13s, box-shadow .13s, border-color .13s;
}
.seat[data-act] { cursor: pointer; }
.seat[data-act]:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: var(--yellow); }
.seat[data-act]:active { transform: scale(.97); }
.seat.picked { border-color: var(--yellow); box-shadow: 0 0 0 2px rgba(212, 166, 74, .45), var(--sh); }
.seat.isP { border-color: var(--yellow); }
.seat.isC { border-color: var(--cyan); }
.seat.exiled { opacity: .42; filter: grayscale(.9); }
.seat.off { opacity: .55; }
.seat .ava {
  width: 28px; height: 28px; border-radius: 7px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900;
  background: var(--ava-bg); color: var(--ava-ink); border: 1.5px solid var(--chip-bd);
}
.seat .tag {
  position: absolute; top: -8px; right: 7px; font-size: 8.5px; font-weight: 900; padding: 2px 6px;
  border-radius: 4px; letter-spacing: .4px; color: #161210;
}
.seat .tag.p { background: var(--yellow); }
.seat .tag.c { background: var(--cyan); }
.seat .vote-mark { margin-left: auto; font-size: 14px; }
.seat .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- Phasen-Panel & Wahlkarten ---------------- */
.phase-title {
  display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 900;
  letter-spacing: .3px; margin: 0 0 5px; text-transform: uppercase;
}
.phase-title .ico {
  font-size: 15px; background: var(--yellow); color: #161210;
  border-radius: 7px; width: 28px; height: 28px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.phase-hint { color: var(--dim); font-size: 12.5px; font-weight: 500; margin-bottom: 10px; line-height: 1.4; }
.pulse { border-color: var(--gold) !important; }

.vote-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 460px; margin: 10px auto; }
.vote-card-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 7px; border-radius: var(--r-md); border: 2px solid var(--line);
  background: var(--panel2); cursor: pointer; box-shadow: var(--card-sh);
  transition: transform .15s, border-color .15s;
  font: inherit; color: var(--ink);
}
.vote-card-btn img { width: 100%; aspect-ratio: 840 / 600; object-fit: cover; border-radius: 6px; display: block; user-select: none; -webkit-user-drag: none; }
.vote-card-btn .vcap { font-size: 11.5px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; }
.vote-card-btn.vote-yes:hover { transform: translateY(-3px) rotate(-1.2deg); border-color: var(--green); }
.vote-card-btn.vote-no:hover  { transform: translateY(-3px) rotate(1.2deg); border-color: var(--red); }
.vote-card-btn:active { transform: scale(.96); }
.vote-yes-lbl { color: #8ce0a8; }
.vote-no-lbl  { color: #ff9c8f; }

.waiting { text-align: center; color: var(--dim); font-weight: 700; padding: 8px 4px; font-size: 13px; }
.dots::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------------- Gesetzeskarten ---------------- */
.tiles { display: flex; gap: 10px; justify-content: center; flex-wrap: nowrap; margin: 10px 0 12px; }
.tile {
  width: min(124px, 29vw); aspect-ratio: 519 / 746;
  border-radius: 10px; cursor: pointer; position: relative; overflow: hidden;
  border: 2.5px solid rgba(244, 233, 210, .35); box-shadow: var(--card-sh);
  transition: transform .18s var(--pop-ease), box-shadow .18s, border-color .18s;
  background: #2b231e; flex: 0 1 auto;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.tile:nth-child(1) { transform: rotate(-1.2deg); }
.tile:nth-child(2) { transform: rotate(.5deg); }
.tile:nth-child(3) { transform: rotate(1.3deg); }
.tile:hover { transform: translateY(-6px) scale(1.03); box-shadow: var(--card-sh-hover); border-color: var(--gold); }
.tile.selected-tile {
  transform: translateY(-10px) scale(1.05) !important;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold), 0 16px 28px rgba(0, 0, 0, .65);
}
.tile .tile-tag {
  position: absolute; left: 5px; right: 5px; bottom: 6px;
  background: rgba(22, 18, 16, .92); color: var(--yellow);
  border: 1px solid var(--gold); border-radius: 5px;
  padding: 2px 4px; font-size: 9.5px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; text-align: center;
}
.tile.back { cursor: default; }
.tile.back:hover { transform: none; box-shadow: var(--card-sh); border-color: rgba(244, 233, 210, .35); }
.tile-order {
  position: absolute; top: 5px; left: 5px;
  background: rgba(22, 18, 16, .88); color: var(--yellow);
  border: 1px solid var(--gold); border-radius: 999px;
  padding: 2px 7px; font-size: 10px; font-weight: 900;
}

/* ---------------- Party-Membership-Reveal ---------------- */
.party-reveal {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border-radius: var(--r-md); background: var(--panel2);
  border: 2px solid var(--gold); box-shadow: var(--sh); margin: 0 0 10px; text-align: left;
}
.party-reveal img { width: 68px; height: auto; border-radius: 6px; box-shadow: var(--card-sh); flex: none; }
.party-reveal .pr-title { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--yellow); font-weight: 900; }
.party-reveal .pr-name { font-size: 16px; font-weight: 900; margin: 2px 0; }
.party-reveal .pr-sub { font-size: 12px; color: var(--dim); }

/* ---------------- Log & Chat ---------------- */
.log { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
@media (max-width: 959px) { .log { max-height: 55dvh; } }
.log .entry { font-size: 12.5px; font-weight: 500; color: var(--ink); opacity: .9; display: flex; gap: 7px; line-height: 1.4; }
.log .entry .t { color: var(--dim); flex: none; font-variant-numeric: tabular-nums; font-weight: 800; }

.chat-box { display: flex; flex-direction: column; gap: 7px; max-height: 240px; overflow-y: auto; margin-bottom: 8px; padding-right: 4px; }
@media (max-width: 959px) { .chat-box { max-height: 52dvh; } }
.chat-box .msg { font-size: 13px; font-weight: 500; line-height: 1.4; }
.chat-box .msg b { color: var(--yellow); margin-right: 6px; font-weight: 800; }
.chat-box .msg.sys { color: #161210; background: var(--yellow); border-radius: var(--r-sm); padding: 7px 10px; font-weight: 800; }
.chat-row { display: flex; gap: 8px; }
.chat-row input { flex: 1; }
.quick-chat { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; }
.quick-chat button {
  flex: none; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--dim); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.quick-chat button:hover { border-color: var(--gold); color: var(--ink); }

/* ---------------- Game Over ---------------- */
.over-banner {
  text-align: center; padding: 20px 14px; border-radius: var(--r-lg); margin-bottom: 12px;
  border: 2px solid var(--line-strong); box-shadow: var(--sh-lg);
}
.over-banner.liberal { background: linear-gradient(135deg, #22607a, #347e9a); }
.over-banner.fascist { background: linear-gradient(135deg, #8e1e1a, #ca3e2b); }
.over-banner .big { color: #fbf5e8; font-size: clamp(20px, 6vw, 34px); font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; }
.over-banner .why { color: rgba(251, 245, 232, .92); margin-top: 5px; font-size: 13.5px; font-weight: 700; }

.reveal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 8px; }
.reveal-card {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 7px; border-radius: var(--r-md); background: var(--panel2); border: 1.5px solid var(--line); text-align: center;
}
.reveal-card.liberal { border-color: rgba(52, 126, 154, .65); }
.reveal-card.fascist { border-color: rgba(202, 62, 43, .7); }
.reveal-card.hitler  { border-color: var(--gold); box-shadow: 0 0 14px rgba(202, 62, 43, .35); }
.reveal-card.exiled  { opacity: .55; }
.reveal-card img { width: 100%; aspect-ratio: 600 / 840; object-fit: cover; border-radius: 6px; box-shadow: var(--sh-sm); }
.reveal-card .rc-nm { font-size: 12px; font-weight: 900; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reveal-card .rc-rl { font-size: 10px; font-weight: 800; color: var(--dim); text-transform: uppercase; }

/* ---------------- Toasts & Konfetti ---------------- */
#toasts {
  position: fixed; left: 50%; top: calc(58px + env(safe-area-inset-top));
  transform: translateX(-50%); display: flex; flex-direction: column; gap: 7px;
  z-index: 110; width: min(400px, 90vw); pointer-events: none;
}
.toast {
  padding: 10px 14px; border-radius: var(--r-md); font-weight: 800; font-size: 13px; text-align: center;
  background: #f4e9d2; color: #161210; border: 2px solid #161210;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .55); animation: toastIn .25s var(--pop-ease) both;
}
.toast.good { border-color: var(--green); }
.toast.bad  { border-color: var(--red); background: #2c1513; color: #ffd9d2; }
.toast.gold { border-color: var(--yellow); }
.toast.out  { animation: toastOut .25s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 105; overflow: hidden; }
.conf { position: absolute; top: -16px; width: 10px; height: 14px; border-radius: 2px; animation: confFall linear forwards; }
@keyframes confFall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------------- Hilfe-Overlay ---------------- */
.helpov {
  position: fixed; inset: 0; z-index: 130;
  background: rgba(0, 0, 0, .82); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: calc(16px + env(safe-area-inset-top)) 12px calc(48px + env(safe-area-inset-bottom));
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.helpov[hidden] { display: none; }
.help-card { max-width: 580px; width: 100%; position: relative; padding: 16px 16px 24px; }
.help-x { position: sticky; top: 0; float: right; z-index: 2; }
.help-body h3 { margin: 14px 0 5px; font-size: 15px; color: var(--yellow); }
.help-body ul, .help-body ol { margin: 4px 0 8px 18px; padding: 0; }
.help-body li, .help-body p { margin: 4px 0; line-height: 1.45; font-size: 13px; }

/* ---------------- Einstellungen-Panel (#settingsov) ---------------- */
.settings-card { max-width: 480px; padding: 16px 16px 20px; }
.set-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.set-head h2 { margin: 0; font-size: 18px; font-weight: 900; letter-spacing: .4px; }
.set-sec { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.set-sec:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.set-sec h3 { margin: 0 0 8px; font-size: 11.5px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--yellow); }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 0; font-size: 13.5px; font-weight: 700;
}
.set-row .sub-lbl { display: block; font-size: 11.5px; font-weight: 500; color: var(--dim); }
.set-toggle {
  min-width: 74px; min-height: 36px; padding: 6px 12px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--panel2); color: var(--dim);
  font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; text-transform: uppercase;
}
.set-toggle.on { background: var(--yellow); border-color: var(--yellow); color: #161210; }
.set-range { width: 126px; accent-color: var(--yellow); cursor: pointer; }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.theme-opt {
  display: flex; align-items: center; gap: 7px; padding: 9px 11px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--panel2); color: var(--ink);
  font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.theme-opt.active { border-color: var(--gold); background: rgba(212, 166, 74, .18); color: var(--yellow); }

/* ---------------- Hot-Seat Übergabe-Screen ---------------- */
.pass-note {
  margin: 10px 0 8px; padding: 11px; border-radius: var(--r-md);
  background: var(--panel2); border: 2px dashed var(--gold); font-weight: 800; font-size: 13.5px;
}
.pass-note img.pass-party-card {
  width: 108px; height: auto; border-radius: 8px; display: block; margin: 8px auto 6px; box-shadow: var(--card-sh);
}
footer.attrib { text-align: center; color: var(--dim); font-size: 10.5px; font-weight: 600; margin: 12px 0 2px; line-height: 1.5; }
