/* Styles. Three themes as CSS custom properties on [data-theme]:
   klinik (A, light), gameshow (B, default), modern (C). */

/* ============================================================ themes */
:root, [data-theme="gameshow"] {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font);
  --bg: radial-gradient(520px 380px at 50% 0%, #3a1d9a 0%, transparent 70%), radial-gradient(900px 700px at 110% 110%, #3a0f6b 0%, transparent 60%), linear-gradient(180deg, #1b1050 0%, #120b3a 60%, #0d0830 100%);
  --bg-solid: #120b3a;
  --text: #ffffff; --text-2: #c9b8ff; --text-3: #8f84c7;
  --surface: rgba(255,255,255,.07); --surface-2: rgba(255,255,255,.12); --line: rgba(255,255,255,.12); --line-2: rgba(255,255,255,.22);
  --accent: #ffd34d; --accent-2: #ff4fb8; --accent-fg: #3a1d00;
  --primary-bg: linear-gradient(180deg, #ffe066, #ffb800); --primary-fg: #3a1d00; --primary-sh: 0 6px 0 #a86a00, 0 0 30px rgba(255,200,0,.4);
  --secondary-bg: linear-gradient(180deg, #4a8dff, #1f63e6); --secondary-fg: #fff; --secondary-sh: 0 6px 0 #123f9c, 0 0 26px rgba(47,123,255,.35);
  --ghost-bg: rgba(255,255,255,.1); --ghost-fg: #fff; --ghost-border: 2px solid rgba(255,255,255,.3);
  --ok: #1fcf6b; --ok-2: #3cf08f; --bad: #ff3b5c; --bad-2: #ff8ea2; --warn: #ffc21a;
  --card-bg: #fff; --card-fg: #1a0d4d; --card-sh: 0 6px 0 #c9bdf5, 0 14px 30px rgba(0,0,0,.35); --card-em: #e8203f;
  --r-sm: 12px; --r: 18px; --r-lg: 22px; --r-btn: 20px;
  --w-strong: 900; --w-bold: 800; --w-med: 700;
  --ls-title: -.02em;
  --tile-a: linear-gradient(180deg, #ff5470, #e8203f); --tile-a-sh: #a3122a; --tile-a-fg: #fff; --tile-a-solid: #ff3b5c;
  --tile-b: linear-gradient(180deg, #4a8dff, #1f63e6); --tile-b-sh: #123f9c; --tile-b-fg: #fff; --tile-b-solid: #2f7bff;
  --tile-c: linear-gradient(180deg, #ffd03d, #f7b500); --tile-c-sh: #a87400; --tile-c-fg: #2a1a00; --tile-c-solid: #ffc21a;
  --tile-d: linear-gradient(180deg, #2fe07c, #14b55a); --tile-d-sh: #0b7a3b; --tile-d-fg: #fff; --tile-d-solid: #1fcf6b;
  --timer-track: rgba(255,255,255,.12); --timer-h: 16px;
  --timer-ok: linear-gradient(90deg, #1fcf6b, #8be04a); --timer-warn: linear-gradient(90deg, #1fcf6b, #ffc21a 70%, #ff8a1f); --timer-danger: linear-gradient(90deg, #ff8a1f, #ff3b5c);
  --timer-glow: 0 0 14px rgba(255,194,26,.7); --timer-label: #ffd34d;
  --wheel-1: #ffc21a; --wheel-1-fg: #2a1400; --wheel-2: #2f7bff; --wheel-2-fg: #fff;
  --wheel-3: #1fcf6b; --wheel-3-fg: #05341a; --wheel-4: #ff3b5c; --wheel-4-fg: #fff;
  --wheel-rim: #2a1670; --wheel-rim-stroke: #ffd34d; --wheel-stroke: #1a0d4d; --wheel-peg: #fff6c9; --wheel-peg-2: #ffb300;
  --wheel-hub: #ffd34d; --wheel-hub-fg: #3a1d00; --wheel-glow: 0 0 70px 10px rgba(255,79,184,.35), 0 0 120px 30px rgba(47,123,255,.25);
  --pointer: #ffd34d; --pointer-edge: #fff;
  --av-me-bg: linear-gradient(180deg, #ffd34d, #ffaa00); --av-me-fg: #3a1d00;
  --pod-1: linear-gradient(180deg, #ffd34d, #f2a900); --pod-1-fg: #5a3500;
  --pod-2: linear-gradient(180deg, #c9d3ff, #8c9ae6); --pod-2-fg: #26306e;
  --pod-3: linear-gradient(180deg, #ffb27a, #e07a3a); --pod-3-fg: #5a2400;
  --focus: 0 0 0 3px rgba(255,211,77,.8);
  color-scheme: dark;
}
[data-theme="klinik"] {
  --font-display: var(--font);
  --bg: radial-gradient(900px 500px at 85% 0%, #EEF3FA 0%, transparent 60%), #F5F7FA;
  --bg-solid: #F5F7FA;
  --text: #16233A; --text-2: #4A5872; --text-3: #8592A8;
  --surface: #ffffff; --surface-2: #EEF4FB; --line: #E3E8EF; --line-2: #DCE8F6;
  --accent: #1F5FAF; --accent-2: #4C86CF; --accent-fg: #fff;
  --primary-bg: #1F5FAF; --primary-fg: #fff; --primary-sh: 0 8px 18px -8px rgba(31,95,175,.6);
  --secondary-bg: #fff; --secondary-fg: #1F5FAF; --secondary-sh: none;
  --ghost-bg: #fff; --ghost-fg: #1F5FAF; --ghost-border: 1px solid #DCE8F6;
  --ok: #2E8B57; --ok-2: #2E8B57; --bad: #C8463D; --bad-2: #C8463D; --warn: #C2843B;
  --card-bg: transparent; --card-fg: #16233A; --card-sh: none; --card-em: #1F5FAF;
  --r-sm: 10px; --r: 14px; --r-lg: 16px; --r-btn: 14px;
  --w-strong: 700; --w-bold: 700; --w-med: 600;
  --ls-title: -.02em;
  --tile-a: #2F6DB5; --tile-a-sh: transparent; --tile-a-fg: #fff; --tile-a-solid: #2F6DB5;
  --tile-b: #2E8C83; --tile-b-sh: transparent; --tile-b-fg: #fff; --tile-b-solid: #2E8C83;
  --tile-c: #C2843B; --tile-c-sh: transparent; --tile-c-fg: #fff; --tile-c-solid: #C2843B;
  --tile-d: #7A64B0; --tile-d-sh: transparent; --tile-d-fg: #fff; --tile-d-solid: #7A64B0;
  --timer-track: #E2E8F0; --timer-h: 8px;
  --timer-ok: linear-gradient(90deg, #1F5FAF, #4C86CF); --timer-warn: linear-gradient(90deg, #C2843B, #D9A05B); --timer-danger: linear-gradient(90deg, #C8463D, #DE6B62);
  --timer-glow: none; --timer-label: #16233A;
  --wheel-1: #C8875A; --wheel-1-fg: #fff; --wheel-2: #3E6FB0; --wheel-2-fg: #fff;
  --wheel-3: #4F9A94; --wheel-3-fg: #fff; --wheel-4: #B5677A; --wheel-4-fg: #fff;
  --wheel-rim: #ffffff; --wheel-rim-stroke: #E3E8EF; --wheel-stroke: #ffffff; --wheel-peg: #C9D3E0; --wheel-peg-2: #C9D3E0;
  --wheel-hub: #ffffff; --wheel-hub-fg: #1F5FAF; --wheel-glow: 0 20px 40px -14px rgba(22,35,58,.35);
  --pointer: #16233A; --pointer-edge: #16233A;
  --av-me-bg: #1F5FAF; --av-me-fg: #fff;
  --pod-1: #1F5FAF; --pod-1-fg: #fff;
  --pod-2: #DCE8F6; --pod-2-fg: #174A8A;
  --pod-3: #EEF4FB; --pod-3-fg: #174A8A;
  --focus: 0 0 0 3px rgba(31,95,175,.35);
  color-scheme: light;
}
[data-theme="modern"] {
  --font-display: "Inter Display", var(--font);
  --bg: radial-gradient(420px 300px at 50% -60px, rgba(46,230,214,.16), transparent 70%), radial-gradient(900px 600px at 100% 110%, #15201F 0%, transparent 60%), #0E0F12;
  --bg-solid: #0E0F12;
  --text: #F4F6F8; --text-2: #8D939E; --text-3: #5C626C;
  --surface: rgba(255,255,255,.055); --surface-2: rgba(255,255,255,.085); --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14);
  --accent: #2EE6D6; --accent-2: #8B7CFF; --accent-fg: #04211F;
  --primary-bg: linear-gradient(180deg, #46F0E1, #1FD3C3); --primary-fg: #04211F; --primary-sh: 0 10px 30px -8px rgba(46,230,214,.6), inset 0 1px 0 rgba(255,255,255,.5);
  --secondary-bg: rgba(255,255,255,.08); --secondary-fg: #F4F6F8; --secondary-sh: inset 0 0 0 1px rgba(255,255,255,.14);
  --ghost-bg: rgba(255,255,255,.04); --ghost-fg: #F4F6F8; --ghost-border: 1px solid rgba(255,255,255,.14);
  --ok: #32D74B; --ok-2: #32D74B; --bad: #FF453A; --bad-2: #FF6B61; --warn: #F5C84B;
  --card-bg: transparent; --card-fg: #F4F6F8; --card-sh: none; --card-em: #2EE6D6;
  --r-sm: 12px; --r: 18px; --r-lg: 22px; --r-btn: 18px;
  --w-strong: 600; --w-bold: 600; --w-med: 500;
  --ls-title: -.03em;
  --tile-a: #4EA8FF; --tile-a-sh: transparent; --tile-a-fg: #0B0C0F; --tile-a-solid: #4EA8FF;
  --tile-b: #FF8A5B; --tile-b-sh: transparent; --tile-b-fg: #0B0C0F; --tile-b-solid: #FF8A5B;
  --tile-c: #8B7CFF; --tile-c-sh: transparent; --tile-c-fg: #0B0C0F; --tile-c-solid: #8B7CFF;
  --tile-d: #7BD88F; --tile-d-sh: transparent; --tile-d-fg: #0B0C0F; --tile-d-solid: #7BD88F;
  --timer-track: rgba(255,255,255,.08); --timer-h: 6px;
  --timer-ok: linear-gradient(90deg, #16C2B3, #2EE6D6); --timer-warn: linear-gradient(90deg, #C9A227, #F5C84B); --timer-danger: linear-gradient(90deg, #E0322A, #FF453A);
  --timer-glow: 0 0 14px rgba(46,230,214,.55); --timer-label: #F4F6F8;
  --wheel-1: #F5C84B; --wheel-1-fg: #1a1505; --wheel-2: #2EE6D6; --wheel-2-fg: #04211F;
  --wheel-3: #8B7CFF; --wheel-3-fg: #0B0C0F; --wheel-4: #FF5C8A; --wheel-4-fg: #0B0C0F;
  --wheel-rim: #16181D; --wheel-rim-stroke: rgba(255,255,255,.14); --wheel-stroke: #0E0F12; --wheel-peg: rgba(255,255,255,.55); --wheel-peg-2: rgba(255,255,255,.3);
  --wheel-hub: #0E0F12; --wheel-hub-fg: #F4F6F8; --wheel-glow: 0 0 60px -6px rgba(46,230,214,.35);
  --pointer: #2EE6D6; --pointer-edge: #F4F6F8;
  --av-me-bg: rgba(46,230,214,.14); --av-me-fg: #2EE6D6;
  --pod-1: linear-gradient(180deg, rgba(46,230,214,.24), rgba(255,255,255,.02)); --pod-1-fg: #2EE6D6;
  --pod-2: linear-gradient(180deg, rgba(201,209,219,.2), rgba(255,255,255,.02)); --pod-2-fg: #C9D1DB;
  --pod-3: linear-gradient(180deg, rgba(245,200,75,.2), rgba(255,255,255,.02)); --pod-3-fg: #F5C84B;
  --focus: 0 0 0 3px rgba(46,230,214,.55);
  color-scheme: dark;
}

/* ============================================================ base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; height: 100%; }
body {
  min-height: 100%; font-family: var(--font); color: var(--text); background: var(--bg-solid);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--bg); pointer-events: none; }
/* on the home the start look paints its motifs into html::before/::after over the whole window: the page colour goes one layer down */
html:has(.home-beta) body::before { z-index: -2; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; touch-action: manipulation; }
button:disabled { cursor: default; }
input, select, textarea { font-size: 16px; } /* no zoom on iOS focus */
:focus-visible { outline: none; box-shadow: var(--focus); }
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; flex: none; }
.mode-ico { --wheel-icon-bg: var(--bg-solid); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
a { color: var(--accent); }

#app { min-height: 100vh; min-height: 100dvh; }

/* ============================================================ phone screen layout */
.screen {
  position: relative; width: 100%; max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) calc(env(safe-area-inset-right, 0px) + 18px) calc(env(safe-area-inset-bottom, 0px) + 18px) calc(env(safe-area-inset-left, 0px) + 18px);
  display: flex; flex-direction: column;
}
.screen.center { justify-content: center; }
.grow { flex: 1 1 auto; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.mt-s { margin-top: 8px; } .mt { margin-top: 16px; } .mt-l { margin-top: 24px; }
.center-text { text-align: center; }
.muted { color: var(--text-2); }
.fine { font-size: 12.5px; color: var(--text-3); font-weight: var(--w-med); text-align: center; line-height: 1.4; }

/* topline (phone header) */
.topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; margin-bottom: 10px; }
.topline .mid { flex: 1; display: flex; justify-content: center; min-width: 0; }
.iconbtn {
  width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none;
  background: var(--surface); color: var(--text-2); font-size: 20px; border: 1px solid var(--line);
}
.iconbtn:active { transform: scale(.94); }
.iconbtn.on { color: var(--accent); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-weight: var(--w-strong); font-size: 15px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.miniscore { font-weight: var(--w-strong); font-size: 15px; padding: 7px 11px; border-radius: 12px; background: var(--surface); color: var(--accent); white-space: nowrap; }

/* titles */
.h1 { font-family: var(--font-display); font-size: 28px; font-weight: var(--w-strong); letter-spacing: var(--ls-title); line-height: 1.12; }
.h2 { font-family: var(--font-display); font-size: 21px; font-weight: var(--w-strong); letter-spacing: var(--ls-title); line-height: 1.2; }
.h3 { font-size: 13px; font-weight: var(--w-bold); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.sub { font-size: 15px; color: var(--text-2); font-weight: 500; line-height: 1.4; margin-top: 6px; }
.eyebrow { font-size: 12px; font-weight: var(--w-bold); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }

/* ============================================================ buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 12px 18px;
  border-radius: var(--r-btn); font-size: 18px; font-weight: var(--w-strong); letter-spacing: .01em; line-height: 1.15; text-align: center;
  background: var(--secondary-bg); color: var(--secondary-fg); box-shadow: var(--secondary-sh);
  transition: transform .08s ease, box-shadow .08s ease, opacity .2s;
}
.btn .ico { font-size: 1.15em; }
.btn:active:not(:disabled) { transform: translateY(3px); }
.btn:disabled { opacity: .5; }
.btn-primary { background: var(--primary-bg); color: var(--primary-fg); box-shadow: var(--primary-sh); }
.btn-ghost { background: var(--ghost-bg); color: var(--ghost-fg); border: var(--ghost-border); box-shadow: none; }
.btn-lg { min-height: 64px; font-size: 22px; }
.btn-sm { min-height: 44px; font-size: 15px; padding: 8px 14px; width: auto; }
.btn-danger { background: transparent; color: var(--bad); border: 1px solid currentColor; box-shadow: none; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }
[data-theme="klinik"] .btn { font-weight: 600; }
[data-theme="klinik"] .btn:not(.btn-primary):not(.btn-danger) { border: 1px solid var(--line-2); }
[data-theme="modern"] .btn { font-weight: 600; letter-spacing: -.01em; }
[data-theme="gameshow"] .btn:active:not(:disabled) { box-shadow: 0 2px 0 rgba(0,0,0,.4); }

/* ============================================================ cards / chips */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
[data-theme="klinik"] .card { box-shadow: 0 1px 2px rgba(22,35,58,.05), 0 4px 14px -6px rgba(22,35,58,.10); border-color: #EDF0F4; }
[data-theme="modern"] .card { backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
[data-theme="gameshow"] .card { border-width: 1.5px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: var(--w-bold); padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }
.chip.cat { --c: var(--accent); }
[data-theme="gameshow"] .chip.cat { background: color-mix(in srgb, var(--c) 20%, transparent); color: #fff; border: 2px solid var(--c); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 40%, transparent); font-weight: 900; }
[data-theme="klinik"] .chip.cat { background: #EEF4FB; color: #174A8A; border: none; font-weight: 600; }
[data-theme="modern"] .chip.cat { font-weight: 500; }

/* ============================================================ avatars */
.av {
  --av: #8b5cff;
  width: 46px; height: 46px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: var(--w-strong); font-size: 16px;
  position: relative; flex: none; background: var(--av); color: #fff; letter-spacing: .02em;
}
.av.sm { width: 34px; height: 34px; font-size: 12px; }
.av.lg { width: 72px; height: 72px; font-size: 24px; }
.av.xl { width: 100px; height: 100px; font-size: 32px; }
.av-me { background: var(--av-me-bg); color: var(--av-me-fg); }
.av-ghost, .av-bot { border: 2px dashed rgba(255,255,255,.65); }
.av-badge { position: absolute; right: -7px; bottom: -6px; width: 20px; height: 20px; font-size: 20px; line-height: 0; }
.av.sm .av-badge { width: 15px; height: 15px; font-size: 15px; right: -5px; bottom: -4px; }
[data-theme="gameshow"] .av-me { box-shadow: 0 0 0 3px rgba(255,211,77,.35); }
[data-theme="gameshow"] .av-other { background: linear-gradient(180deg, color-mix(in srgb, var(--av) 75%, #fff), var(--av)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--av) 35%, transparent); }
[data-theme="klinik"] .av-other { background: color-mix(in srgb, var(--av) 70%, #5a6a80); }
[data-theme="klinik"] .av-ghost, [data-theme="klinik"] .av-bot { background: #E8ECF2; color: #4A5872; border: 1.5px dashed #9AA6B8; }
[data-theme="modern"] .av { font-weight: 600; }
[data-theme="modern"] .av-me { box-shadow: inset 0 0 0 1.5px #2EE6D6; }
[data-theme="modern"] .av-other { background: color-mix(in srgb, var(--av) 16%, transparent); color: color-mix(in srgb, var(--av) 70%, #fff); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--av) 70%, transparent); }
[data-theme="modern"] .av-ghost, [data-theme="modern"] .av-bot { border: 1.5px dashed rgba(185,178,255,.6); background: rgba(139,124,255,.14); color: #B9B2FF; box-shadow: none; }

/* ============================================================ scorebar (duel) */
.scorebar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
}
[data-theme="klinik"] .scorebar { box-shadow: 0 1px 2px rgba(22,35,58,.05), 0 4px 14px -6px rgba(22,35,58,.10); }
.scorebar .pl { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.scorebar .pl.opp { flex-direction: row-reverse; text-align: right; }
.scorebar .pl > div { min-width: 0; }
.scorebar .pn { font-size: 12.5px; font-weight: var(--w-med); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scorebar .ps-line { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.scorebar .ps-line .kind-tag { margin: 0; }
.scorebar .ps { font-size: 22px; font-weight: var(--w-strong); line-height: 1.1; font-variant-numeric: tabular-nums; }
.scorebar .me .ps { color: var(--accent); }
[data-theme="klinik"] .scorebar .ps { font-size: 20px; }
[data-theme="modern"] .scorebar .ps { font-size: 23px; letter-spacing: -.5px; color: var(--text); }
.scorebar .pl.done .av::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ok); }
.vs { flex: none; font-weight: 900; font-size: 13px; color: #fff; background: #ff3b5c; border-radius: 10px; padding: 5px 7px; box-shadow: 0 3px 0 #a3122a; transform: rotate(-6deg); }
[data-theme="klinik"] .vs { background: var(--bg-solid); color: var(--text-3); box-shadow: none; transform: none; font-weight: 700; font-size: 12px; }
[data-theme="modern"] .vs { background: none; box-shadow: none; transform: none; color: var(--text-3); letter-spacing: 2px; font-weight: 600; font-size: 11px; }
.kind-tag { display: inline-block; white-space: nowrap; vertical-align: 2px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: #B9B2FF; background: rgba(139,124,255,.16); padding: 1px 6px; border-radius: 6px; margin-left: 4px; }
[data-theme="klinik"] .kind-tag { color: #4A5872; background: #EEF1F5; }

/* duel layout spacing */
.duel-score { margin-bottom: 12px; }
.timer-slot { margin-top: 2px; }

/* ============================================================ timer bar */
.timer { display: flex; align-items: center; gap: 10px; }
.timer-track { flex: 1; height: var(--timer-h); border-radius: 999px; background: var(--timer-track); overflow: hidden; position: relative; }
[data-theme="gameshow"] .timer-track { box-shadow: inset 0 2px 4px rgba(0,0,0,.35); }
.timer-fill { height: 100%; width: 100%; border-radius: 999px; background: var(--timer-ok); box-shadow: var(--timer-glow); will-change: width; }
.timer[data-level="warn"] .timer-fill { background: var(--timer-warn); }
.timer[data-level="danger"] .timer-fill { background: var(--timer-danger); box-shadow: 0 0 14px color-mix(in srgb, var(--bad) 70%, transparent); }
.timer-label { font-weight: var(--w-strong); font-size: 17px; color: var(--timer-label); min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timer[data-level="danger"] .timer-label { color: var(--bad); }
.timer.pulse .timer-track { animation: tpulse 1s ease-in-out infinite; }
.timer.pulse .timer-label { animation: tlabel 1s ease-in-out infinite; }
@keyframes tpulse { 0%,100% { transform: scaleY(1); } 15% { transform: scaleY(1.45); } }
@keyframes tlabel { 0%,100% { transform: scale(1); } 15% { transform: scale(1.22); } }
[data-theme="modern"] .timer-track { overflow: visible; }
[data-theme="modern"] .timer-fill { position: relative; }
[data-theme="modern"] .timer-fill::after { content: ""; position: absolute; right: -1px; top: -3px; width: 2px; height: calc(var(--timer-h) + 6px); border-radius: 2px; background: #fff; box-shadow: 0 0 8px #fff; }
[data-theme="klinik"] .timer-label { font-size: 14px; font-weight: 700; }
.timer.stopped .timer-fill { transition: width .3s; }

/* ============================================================ question (phone) */
.qcard {
  background: var(--card-bg); color: var(--card-fg); border-radius: var(--r-lg); padding: 18px 18px; font-size: 20px; font-weight: var(--w-bold);
  line-height: 1.3; box-shadow: var(--card-sh); overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto;
}
[data-theme="klinik"] .qcard { padding: 4px 2px; font-size: 21px; font-weight: 700; letter-spacing: -.3px; }
[data-theme="modern"] .qcard { padding: 4px 0; font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -.5px; line-height: 1.22; }
.qmeta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 10px; }

.answers { display: flex; flex-direction: column; gap: 11px; margin-top: 14px; }
.ans {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 66px; width: 100%; text-align: left;
  border-radius: var(--r); padding: 10px 44px 10px 12px; font-size: 16px; font-weight: var(--w-bold); line-height: 1.22;
  overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; transition: transform .1s, filter .25s, opacity .25s, box-shadow .2s, background .2s;
}
.ans .badge { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 19px; font-weight: 900; }
.ans .badge .ico { font-size: 20px; }
.ans .badge .letter { display: none; }
.ans .txt { flex: 1; min-width: 0; }
.ans .txt small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; opacity: .95; }
.ans .end { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-weight: 900; font-size: 18px; opacity: .55; }
.ans:active:not(:disabled) { transform: translateY(3px); }
.ans:disabled { cursor: default; }
.ans .end .ico { font-size: 22px; }

/* gameshow tiles: coloured, shapes, 3D edge */
[data-theme="gameshow"] .ans { color: var(--fg); background: var(--bgc); box-shadow: 0 5px 0 var(--sh); }
[data-theme="gameshow"] .ans .badge { background: rgba(0,0,0,.18); }
[data-theme="gameshow"] .ans.sel { box-shadow: 0 5px 0 var(--sh), 0 0 0 3px #fff, 0 0 24px rgba(255,255,255,.4); }
[data-theme="gameshow"] .answers.locked .ans:not(.sel) { filter: saturate(.35) brightness(.55); }
[data-theme="gameshow"] .ans.dim { filter: saturate(.35) brightness(.55); box-shadow: 0 5px 0 rgba(0,0,0,.4); }
[data-theme="gameshow"] .ans.correct { background: linear-gradient(180deg, #36e886, #14b55a); color: #fff; filter: none; box-shadow: 0 5px 0 #0b7a3b, 0 0 0 3px #b9ffd6, 0 0 28px rgba(31,207,107,.8); }
[data-theme="gameshow"] .ans.correct .badge { background: rgba(255,255,255,.25); }
[data-theme="gameshow"] .ans.wrongsel { background: linear-gradient(180deg, #ff5470, #d81838); color: #fff; filter: none; box-shadow: 0 5px 0 #8a0c22, 0 0 0 3px #ffc2cc; }
[data-theme="gameshow"] .ans.correct .end, [data-theme="gameshow"] .ans.wrongsel .end { opacity: 1; }
.ans.a0 { --bgc: var(--tile-a); --sh: var(--tile-a-sh); --fg: var(--tile-a-fg); --solid: var(--tile-a-solid); }
.ans.a1 { --bgc: var(--tile-b); --sh: var(--tile-b-sh); --fg: var(--tile-b-fg); --solid: var(--tile-b-solid); }
.ans.a2 { --bgc: var(--tile-c); --sh: var(--tile-c-sh); --fg: var(--tile-c-fg); --solid: var(--tile-c-solid); }
.ans.a3 { --bgc: var(--tile-d); --sh: var(--tile-d-sh); --fg: var(--tile-d-fg); --solid: var(--tile-d-solid); }

/* klinik tiles: white cards with letter badge */
[data-theme="klinik"] .ans { background: #fff; color: var(--text); font-weight: 500; font-size: 15.5px; border: 1px solid #EDF0F4; box-shadow: 0 1px 2px rgba(22,35,58,.05), 0 4px 14px -6px rgba(22,35,58,.10); padding-right: 40px; min-height: 60px; }
[data-theme="klinik"] .ans .badge { width: 32px; height: 32px; border-radius: 10px; background: #EEF4FB; color: #1F5FAF; font-size: 15px; font-weight: 700; }
[data-theme="klinik"] .ans .badge .ico { display: none; }
[data-theme="klinik"] .ans .badge .letter { display: inline; }
[data-theme="klinik"] .ans .end { display: none; }
[data-theme="klinik"] .ans.sel { border: 1.5px solid #1F5FAF; box-shadow: 0 0 0 4px rgba(31,95,175,.10); }
[data-theme="klinik"] .ans.sel .badge { background: #1F5FAF; color: #fff; }
[data-theme="klinik"] .answers.locked .ans:not(.sel), [data-theme="klinik"] .ans.dim { opacity: .55; }
[data-theme="klinik"] .ans.correct { background: #E9F6EF; border: 1.5px solid #2E8B57; opacity: 1; }
[data-theme="klinik"] .ans.correct .badge { background: #2E8B57; color: #fff; }
[data-theme="klinik"] .ans.wrongsel { background: #FCEDEC; border: 1.5px solid #C8463D; opacity: 1; }
[data-theme="klinik"] .ans.wrongsel .badge { background: #C8463D; color: #fff; }
[data-theme="klinik"] .ans.correct .end, [data-theme="klinik"] .ans.wrongsel .end { display: block; opacity: 1; color: inherit; }
[data-theme="klinik"] .ans.correct .end { color: #2E8B57; } [data-theme="klinik"] .ans.wrongsel .end { color: #C8463D; }
[data-theme="klinik"] .ans .txt small { color: var(--text-2); letter-spacing: .04em; }

/* modern tiles: glass with outlined letter */
[data-theme="modern"] .ans { background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.08); color: var(--text); font-weight: 500; font-size: 15.5px; padding-right: 40px; }
[data-theme="modern"] .ans .badge { width: 32px; height: 32px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); color: var(--text-2); font-size: 14px; font-weight: 600; }
[data-theme="modern"] .ans .badge .ico { display: none; }
[data-theme="modern"] .ans .badge .letter { display: inline; }
[data-theme="modern"] .ans .end { display: none; }
[data-theme="modern"] .ans.sel { border-color: rgba(46,230,214,.6); background: rgba(46,230,214,.08); }
[data-theme="modern"] .ans.sel .badge { background: #2EE6D6; color: #04211F; border-color: #2EE6D6; }
[data-theme="modern"] .answers.locked .ans:not(.sel), [data-theme="modern"] .ans.dim { opacity: .5; }
[data-theme="modern"] .ans.correct { background: rgba(50,215,75,.12); border-color: rgba(50,215,75,.6); opacity: 1; }
[data-theme="modern"] .ans.correct .badge { background: #32D74B; color: #04210a; border-color: #32D74B; }
[data-theme="modern"] .ans.wrongsel { background: rgba(255,69,58,.12); border-color: rgba(255,69,58,.6); opacity: 1; }
[data-theme="modern"] .ans.wrongsel .badge { background: #FF453A; color: #fff; border-color: #FF453A; }
[data-theme="modern"] .ans.correct .end, [data-theme="modern"] .ans.wrongsel .end { display: block; opacity: 1; }
[data-theme="modern"] .ans.correct .end { color: #32D74B; } [data-theme="modern"] .ans.wrongsel .end { color: #FF453A; }
[data-theme="modern"] .ans .txt small { color: var(--text-2); }

/* opponent indicator chip */
.opp-ind {
  display: flex; align-items: center; gap: 9px; margin-top: 14px; font-size: 14px; font-weight: var(--w-med); color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line); padding: 6px 12px 6px 6px; border-radius: 999px; min-height: 42px;
  transition: background .3s, border-color .3s;
}
.opp-ind .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opp-ind b { color: var(--text); font-weight: var(--w-bold); }
.opp-ind .ok { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; flex: none; background: var(--ok); color: #05341a; transform: scale(0); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.opp-ind.done { background: color-mix(in srgb, var(--ok) 13%, transparent); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.opp-ind.done .ok { transform: scale(1); }
.opp-ind.pop { animation: pop .45s cubic-bezier(.3,1.6,.5,1); }
.opp-ind .thinking { display: inline-flex; gap: 3px; margin-left: 2px; }
.opp-ind .thinking i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .4; animation: dots 1.2s infinite; }
.opp-ind .thinking i:nth-child(2) { animation-delay: .2s; } .opp-ind .thinking i:nth-child(3) { animation-delay: .4s; }
.opp-ind.out { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
[data-theme="klinik"] .opp-ind { background: #fff; border-radius: 14px; }
[data-theme="klinik"] .opp-ind.done .ok { background: #E9F6EF; color: #2E8B57; }
@keyframes dots { 0%,100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ============================================================ reveal (phone) */
.verdict { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; font-size: 26px; font-weight: var(--w-strong); padding: 12px; border-radius: var(--r); margin-bottom: 14px; animation: verdictIn .45s cubic-bezier(.3,1.5,.5,1); }
.verdict .vx { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; color: #fff; flex: none; }
.verdict.ok { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--text); border: 2px solid color-mix(in srgb, var(--ok) 65%, transparent); }
.verdict.ok .vx { background: var(--ok); }
.verdict.bad { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--text); border: 2px solid color-mix(in srgb, var(--bad) 60%, transparent); }
.verdict.bad .vx { background: var(--bad); }
[data-theme="gameshow"] .verdict.bad { color: #ffd0d8; } [data-theme="gameshow"] .verdict.ok { color: #d6ffe6; }
[data-theme="klinik"] .verdict { font-size: 20px; border-width: 1.5px; }
[data-theme="klinik"] .verdict.ok { background: #E9F6EF; color: #2E8B57; } [data-theme="klinik"] .verdict.bad { background: #FCEDEC; color: #C8463D; }
[data-theme="modern"] .verdict { font-size: 20px; border-width: 1px; }
@keyframes verdictIn { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.explain { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; font-size: 14px; line-height: 1.45; font-weight: 500; color: var(--text); overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.explain .ex-h { display: flex; align-items: center; gap: 6px; font-weight: var(--w-strong); font-size: 13.5px; color: var(--accent); margin-bottom: 4px; }
[data-theme="gameshow"] .explain { color: #e6e0ff; border-width: 1.5px; }
[data-theme="klinik"] .explain { background: #F0F4FA; border-color: #E3EAF4; color: var(--text-2); }
[data-theme="klinik"] .explain .ex-h { color: #1F5FAF; font-weight: 600; }
[data-theme="modern"] .explain .ex-h { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600; }

.pts { display: flex; gap: 10px; margin-top: 14px; }
.pt { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px; min-width: 0; }
.pt.opp { flex-direction: row-reverse; text-align: right; }
.pt .pn { font-size: 12px; font-weight: var(--w-med); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt > div { min-width: 0; }
.pv { font-size: 24px; font-weight: var(--w-strong); line-height: 1; font-variant-numeric: tabular-nums; color: var(--text-3); }
.pv.plus { color: var(--ok-2); }
[data-theme="gameshow"] .pv.plus { text-shadow: 0 0 14px rgba(31,207,107,.7); }

.fly { position: fixed; z-index: 50; pointer-events: none; font-weight: 900; font-size: 34px; color: var(--ok-2); text-shadow: 0 2px 0 rgba(0,0,0,.25), 0 0 18px color-mix(in srgb, var(--ok) 70%, transparent); white-space: nowrap; }
.fly.jackpot { color: var(--accent); font-size: 44px; text-shadow: 0 3px 0 rgba(0,0,0,.3), 0 0 26px color-mix(in srgb, var(--accent) 80%, transparent); }

/* ============================================================ wheel */
.wheel-head { text-align: center; margin-top: 14px; }
.wheel-title { font-family: var(--font-display); font-size: 30px; font-weight: 900; letter-spacing: .06em; color: var(--accent); }
[data-theme="gameshow"] .wheel-title { text-shadow: 0 3px 0 #a86a00, 0 0 24px rgba(255,211,77,.6); }
[data-theme="klinik"] .wheel-title { font-size: 20px; letter-spacing: 0; color: var(--text); font-weight: 700; }
[data-theme="modern"] .wheel-title { font-size: 12px; letter-spacing: .16em; color: var(--accent); font-weight: 600; }
.wheel-sub { font-size: 14px; font-weight: 600; color: var(--text-2); margin-top: 3px; }
[data-theme="modern"] .wheel-sub { font-size: 22px; color: var(--text); letter-spacing: -.4px; margin-top: 6px; }
.wheel-wrap { position: relative; width: min(86vw, 340px); aspect-ratio: 1; margin: 22px auto 0; }
.wheel-wrap .glow { position: absolute; inset: 3%; border-radius: 50%; box-shadow: var(--wheel-glow); }
.wheel-wrap svg.wheel { position: relative; width: 100%; height: 100%; display: block; overflow: visible; }
.wheel .seg-label { font-family: var(--font); font-weight: 900; }
[data-theme="modern"] .wheel .seg-label, [data-theme="klinik"] .wheel .seg-label { font-weight: 700; }
.wheel-pointer { position: absolute; left: 50%; top: -4%; width: 13%; aspect-ratio: 44/46; transform-origin: 50% 25%; transform: translateX(-50%); z-index: 3; }
.wheel-pointer svg { width: 100%; height: 100%; display: block; overflow: visible; }
[data-theme="gameshow"] .wheel-pointer svg { filter: drop-shadow(0 4px 0 #a86a00) drop-shadow(0 0 10px rgba(255,211,77,.9)); }
[data-theme="klinik"] .wheel-pointer { width: 8%; top: -3%; }
[data-theme="modern"] .wheel-pointer { width: 8%; top: -3%; }
[data-theme="modern"] .wheel-pointer svg { filter: drop-shadow(0 0 8px rgba(46,230,214,.9)); }
.wheel-hint { text-align: center; font-size: 14px; font-weight: 700; color: var(--text); margin-top: 18px; opacity: .85; display: flex; align-items: center; justify-content: center; gap: 8px; }
.wheel-hint .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: dots 1s infinite; }
.mode-banner { text-align: center; margin-top: 16px; animation: verdictIn .5s cubic-bezier(.3,1.5,.5,1); }
.mode-banner .mb-name { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 34px; font-weight: 900; letter-spacing: var(--ls-title); color: var(--accent); }
.mode-banner .mb-name .ico { font-size: .9em; }
.mode-banner .mb-sub { font-size: 14px; color: var(--text-2); font-weight: 600; margin-top: 4px; }
[data-theme="gameshow"] .mode-banner .mb-name { text-shadow: 0 3px 0 #a86a00, 0 0 24px rgba(255,211,77,.6); }
[data-theme="klinik"] .mode-banner .mb-name, [data-theme="modern"] .mode-banner .mb-name { font-weight: 700; color: var(--text); }
.count321 { font-size: 64px; font-weight: 900; color: var(--accent); text-align: center; animation: verdictIn .4s; }

.rounds-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.rounds-dots i { width: 26px; height: 6px; border-radius: 3px; background: var(--surface-2); }
.rounds-dots i.done { background: var(--ok); } .rounds-dots i.cur { background: var(--accent); }

/* mode flash over the first question */
.phase, .stage .phase { position: relative; }
.ctrl-phase { position: relative; }
/* intro: mode reveal + 3-2-1 between wheel stop and question 0 (overlays the wheel) */
.intro { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 16px;
  background: color-mix(in srgb, var(--bg-solid) 80%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: var(--r); animation: introFade .3s ease-out both; }
.intro-card { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: verdictIn .55s cubic-bezier(.3,1.5,.5,1) both; transition: transform .35s ease, opacity .35s ease; }
.intro-ico { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font-size: 54px; background: var(--mc); color: var(--mc-fg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mc) 35%, transparent), 0 10px 30px -8px var(--mc); margin-bottom: 8px; }
.intro-name { font-family: var(--font-display); font-size: 44px; line-height: 1.05; font-weight: var(--w-strong); letter-spacing: var(--ls-title); color: var(--text); overflow-wrap: anywhere; }
.intro-count { font-size: 20px; font-weight: var(--w-bold); color: var(--accent); }
.intro-rule { font-size: 16px; font-weight: 600; color: var(--text-2); max-width: 300px; line-height: 1.35; }
.intro-cd { min-height: 96px; display: grid; place-items: center; }
.intro-cd .n { font-size: 96px; line-height: 1; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; animation: cdPop .7s cubic-bezier(.2,1.4,.4,1) both; }
.intro-cd .n.go { font-size: 72px; font-family: var(--font-display); letter-spacing: var(--ls-title); color: var(--ok-2); }
.intro.counting .intro-card { transform: scale(.86); }
[data-theme="gameshow"] .intro-name { text-shadow: 0 3px 0 #a86a00, 0 0 24px rgba(255,211,77,.5); color: var(--accent); }
[data-theme="gameshow"] .intro-cd .n { text-shadow: 0 4px 0 #a86a00, 0 0 30px rgba(255,211,77,.6); }
.stage .intro { gap: 1.6em; border-radius: 1em; }
.stage .intro-ico { font-size: 4em; width: 1.75em; height: 1.75em; margin-bottom: .15em; }
.stage .intro-name { font-size: 5.2em; } .stage .intro-count { font-size: 2em; } .stage .intro-rule { font-size: 1.6em; max-width: 30em; }
.stage .intro-cd { min-height: 9em; } .stage .intro-cd .n { font-size: 9em; } .stage .intro-cd .n.go { font-size: 7em; }
@keyframes introFade { from { opacity: 0; } }
@keyframes cdPop { 0% { transform: scale(2.2); opacity: 0; } 35% { transform: scale(.92); opacity: 1; } 60% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }

/* ============================================================ duel: searching / invite / ready / final */
.radar { position: relative; width: 210px; height: 210px; margin: 26px auto 10px; display: grid; place-items: center; }
.radar::before, .radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: radar 2.4s ease-out infinite; }
.radar::after { animation-delay: 1.2s; }
@keyframes radar { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
.radar .av { width: 86px; height: 86px; font-size: 28px; }
.countdown-big { font-size: 15px; font-weight: 700; color: var(--text-2); text-align: center; margin-top: 8px; font-variant-numeric: tabular-nums; }
.countdown-big b { color: var(--accent); font-size: 20px; }
.code-box { text-align: center; padding: 18px; }
.code-box .code { font-size: 38px; font-weight: 900; letter-spacing: .18em; font-variant-numeric: tabular-nums; color: var(--accent); margin: 4px 0 2px; word-break: break-all; }
.code-box .url { font-size: 13px; color: var(--text-2); word-break: break-all; }
.qr-box { background: #fff; border-radius: 16px; padding: 10px; width: 190px; margin: 14px auto 0; }
.qr-box svg { width: 100%; height: auto; display: block; }

.vs-stage { display: flex; align-items: flex-start; justify-content: space-around; gap: 6px; margin: 30px 0 10px; }
.vs-stage .vs-big { margin-top: 26px; }
.vs-stage .side { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 42%; text-align: center; animation: slideL .55s cubic-bezier(.2,1.2,.4,1) both; }
.vs-stage .side.r { animation-name: slideR; }
.vs-stage .nm { font-weight: var(--w-strong); font-size: 18px; overflow-wrap: anywhere; line-height: 1.2; }
.vs-stage .st { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--surface); color: var(--text-2); }
.vs-stage .st.on { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok-2); }
.vs-big { font-size: 34px; padding: 8px 12px; border-radius: 14px; animation: vsPop .6s .3s cubic-bezier(.3,1.8,.5,1) both; }
@keyframes slideL { from { transform: translateX(-60px); opacity: 0; } }
@keyframes slideR { from { transform: translateX(60px); opacity: 0; } }
@keyframes vsPop { from { transform: scale(0) rotate(-30deg); } }

.final-hero { text-align: center; margin: 18px 0 8px; }
.final-hero .big { font-family: var(--font-display); font-size: 44px; font-weight: 900; letter-spacing: var(--ls-title); line-height: 1.05; animation: verdictIn .6s cubic-bezier(.3,1.5,.5,1); }
.final-hero.win .big { color: var(--accent); }
[data-theme="gameshow"] .final-hero.win .big { text-shadow: 0 4px 0 #a86a00, 0 0 30px rgba(255,211,77,.6); }
.final-hero.lose .big { color: var(--text-2); }
.final-hero.aborted .big { color: var(--text-2); font-size: 36px; }
.final-hero .crown { font-size: 54px; color: #ffd34d; display: block; margin: 0 auto 4px; width: 1em; height: 1em; }
[data-theme="klinik"] .final-hero .crown { color: #C2A24E; }
[data-theme="modern"] .final-hero .crown { color: #2EE6D6; }
/* a bot's line (lists.json → botLines): a speech bubble under its name at the start, under its card at the end */
.bot-bubble { position: relative; margin: 4px auto 0; max-width: 100%; padding: 8px 11px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 13.5px; font-weight: 600; line-height: 1.3; text-align: center; overflow-wrap: anywhere; animation: bubbleIn .4s .35s cubic-bezier(.2,1.4,.4,1) both; }
.bot-bubble::before { content: ''; position: absolute; top: -7px; left: 50%; width: 12px; height: 12px; margin-left: -6px; background: inherit; border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.bot-bubble.end { margin-top: 10px; font-size: 13px; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px) scale(.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bot-bubble { animation: none; } }
.final-cards { display: flex; gap: 10px; margin-top: 18px; }
.final-card { flex: 1; text-align: center; padding: 16px 10px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.final-card.winner { border: 2px solid var(--accent); box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.final-card .nm { font-weight: var(--w-bold); font-size: 14px; margin-top: 8px; overflow-wrap: anywhere; }
.final-card .sc { font-size: 30px; font-weight: 900; margin-top: 4px; font-variant-numeric: tabular-nums; }
.final-card .meta { font-size: 12.5px; color: var(--text-2); margin-top: 4px; line-height: 1.35; }

/* ============================================================ home */
.brand { display: flex; align-items: center; gap: 10px; }
.logo-badge { font-weight: 900; font-size: 15px; background: var(--primary-bg); color: var(--primary-fg); padding: 8px 10px; border-radius: 12px; letter-spacing: .02em; }
[data-theme="gameshow"] .logo-badge { box-shadow: 0 4px 0 #a86a00; }
[data-theme="modern"] .logo-badge { border-radius: 10px; font-weight: 700; box-shadow: none; }
.brand .bt { font-family: var(--font-display); font-weight: 900; font-size: 20px; letter-spacing: var(--ls-title); }
[data-theme="klinik"] .brand .bt, [data-theme="modern"] .brand .bt { font-weight: 700; }
.home-hero { margin: 18px 0 18px; }
.home-actions { display: flex; flex-direction: column; gap: 14px; }
.action { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; min-height: 76px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.action .ai { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; flex: none; background: var(--surface-2); color: var(--accent); }
.action .at { font-weight: var(--w-strong); font-size: 17px; line-height: 1.2; }
.action .as { font-size: 13px; color: var(--text-2); margin-top: 2px; font-weight: 500; }
.action > div { min-width: 0; flex: 1; }
.action:active { transform: translateY(2px); }
.action.primary { background: var(--primary-bg); color: var(--primary-fg); box-shadow: var(--primary-sh); border: none; min-height: 92px; }
.action.primary .ai { background: rgba(0,0,0,.12); color: inherit; }
.action.primary .as { color: inherit; opacity: .8; }
[data-theme="gameshow"] .action.secondary { background: var(--secondary-bg); color: #fff; box-shadow: var(--secondary-sh); border: none; }
[data-theme="gameshow"] .action.secondary .ai { background: rgba(0,0,0,.15); color: #fff; }
[data-theme="gameshow"] .action.secondary .as { color: #fff; opacity: .85; }
[data-theme="klinik"] .action { box-shadow: 0 1px 2px rgba(22,35,58,.05), 0 4px 14px -6px rgba(22,35,58,.10); border-color: #EDF0F4; }
[data-theme="klinik"] .action .ai { background: #EEF4FB; color: #1F5FAF; }
[data-theme="klinik"] .action.primary .ai { background: rgba(255,255,255,.18); color: #fff; }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.home-grid .action { flex-direction: column; align-items: flex-start; min-height: 108px; gap: 10px; }
.home-grid .action .at { font-size: 15.5px; }
.home-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 6px; min-height: 80px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: var(--w-bold); text-align: center; line-height: 1.2; color: var(--text); }
.mini .ico { font-size: 24px; color: var(--accent); }
[data-theme="klinik"] .mini { background: #fff; border-color: #EDF0F4; }
.code-entry { display: flex; gap: 8px; }
.input {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1.5px solid var(--line-2); color: var(--text);
  font-size: 17px; font-weight: 600; outline: none;
}
.input::placeholder { color: var(--text-3); font-weight: 500; }
.input:focus { border-color: var(--accent); box-shadow: var(--focus); }
[data-theme="klinik"] .input { background: #fff; }
.code-entry .input { text-transform: uppercase; letter-spacing: .12em; }
.code-entry .input::placeholder { text-transform: none; letter-spacing: 0; }
.code-entry .btn { width: auto; min-width: 104px; }

/* language toggle */
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); gap: 2px; }
.seg button { padding: 7px 12px; border-radius: 9px; font-size: 13.5px; font-weight: var(--w-bold); color: var(--text-2); min-height: 34px; }
.seg button.on { background: var(--surface-2); color: var(--text); }
[data-theme="gameshow"] .seg button.on { background: linear-gradient(180deg, #8b5cff, #6a3df0); color: #fff; box-shadow: 0 3px 0 #3f1fa8; }
[data-theme="klinik"] .seg button.on { background: #1F5FAF; color: #fff; }
[data-theme="modern"] .seg button.on { background: rgba(255,255,255,.12); }
.seg.wide { display: flex; width: 100%; } .seg.wide button { flex: 1; }

/* ============================================================ login */
.login-top { display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.login-hero { margin: 18px 0 18px; }
.field-label { display: block; font-size: 13px; font-weight: var(--w-bold); color: var(--text-2); margin: 0 0 7px 2px; }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 6px 0 12px; }
.pin-dots i { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line-2); transition: background .15s, transform .15s, border-color .15s; }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); transform: scale(1.1); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key { min-height: 58px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: 25px; font-weight: var(--w-bold); color: var(--text); display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.key:active { transform: scale(.95); background: var(--surface-2); }
.key.fn { font-size: 15px; color: var(--text-2); background: transparent; border-color: transparent; }
.key.fn .ico { font-size: 26px; }
[data-theme="gameshow"] .key { box-shadow: 0 4px 0 rgba(0,0,0,.35); border-width: 1.5px; }
[data-theme="gameshow"] .key.fn { box-shadow: none; }
[data-theme="klinik"] .key { background: #fff; border-color: #EDF0F4; box-shadow: 0 1px 2px rgba(22,35,58,.06); }
[data-theme="klinik"] .key.fn { background: transparent; box-shadow: none; }
.pin-explain { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--text-2); margin-top: 14px; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.pin-explain .ico { font-size: 18px; color: var(--accent); margin-top: 1px; }
.err { color: var(--bad-2); font-size: 14px; font-weight: 700; text-align: center; min-height: 20px; margin: 8px 0 2px; }
[data-theme="klinik"] .err { color: var(--bad); }

/* ============================================================ scores / stats / settings */
.tabs { display: flex; gap: 6px; padding: 4px; overflow-x: auto; scrollbar-width: none; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { flex: 1; min-height: 40px; padding: 6px 4px; border-radius: 10px; font-size: 13.5px; font-weight: var(--w-bold); color: var(--text-2); line-height: 1.15; }
.tabs button.on { background: var(--primary-bg); color: var(--primary-fg); }
[data-theme="gameshow"] .tabs button.on { box-shadow: 0 3px 0 #a86a00; }
[data-theme="modern"] .tabs button.on { background: rgba(255,255,255,.12); color: var(--text); }
/* league mode "series": the card of the running series on the league page */
.ser-card { margin: 12px 0 4px; }
.ser-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ser-left { font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.ser-left svg { width: 13px; height: 13px; vertical-align: -2px; }
.ser-nums { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 10px; }
.ser-nums b { display: block; font-size: 30px; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ser-nums small { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-top: 2px; }
.ser-n { text-align: right; }
.ser-bal.up b { color: var(--ok-2, #2e9e5b); } .ser-bal.down b { color: var(--bad-2, #c2475a); }
.ser-dots { display: flex; gap: 5px; margin-top: 10px; }
.ser-dots i { flex: 1; height: 6px; border-radius: 999px; background: var(--timer-track, rgba(255,255,255,.12)); }
.ser-dots i.on { background: var(--accent, #ffc21a); }
.ser-card .fine { text-align: left; margin: 8px 0 0; }
.ser-none { margin: 8px 0 0; font-weight: 600; }
.lg-week-h { margin: 20px 0 0; }
/* filter «Alle / Meine Uni / Mein Land» and the university competition (features.universityRanking) */
.scope-bar { margin-bottom: 4px; }
.scope-bar .scope-hint, .scope-hint { text-align: left; margin: 0 0 12px; }
.scope-note { margin-top: 10px; }
.uni-lead { text-align: left; margin: 0 0 12px; }
.uni-h { margin: 18px 0 2px; }
.uni-row .lname .flag-inline { vertical-align: -2px; margin-right: 2px; }
.uni-unranked .lrow .lrank { color: var(--text-3); font-weight: 600; }
.subtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; font-size: 13.5px; font-weight: var(--w-bold); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; min-height: 38px; }
.subtabs button.on { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.list { display: flex; flex-direction: column; gap: 8px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; font-weight: var(--w-bold); min-height: 56px; }
.lrow .lrank { width: 26px; text-align: center; font-weight: 900; color: var(--text-3); font-size: 16px; flex: none; font-variant-numeric: tabular-nums; }
.lrow .lname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .lname small { display: block; font-size: 12px; color: var(--text-2); font-weight: 500; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; }
.lrow .lpts { font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.lrow .lpts small { display: block; font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.lrow.top1 .lrank { color: #ffd34d; } .lrow.top2 .lrank { color: #c9d3ff; } .lrow.top3 .lrank { color: #ffb27a; }
[data-theme="klinik"] .lrow.top1 .lrank { color: #C2A24E; } [data-theme="klinik"] .lrow.top2 .lrank { color: #8592A8; } [data-theme="klinik"] .lrow.top3 .lrank { color: #C8875A; }
.lrow.me { background: color-mix(in srgb, var(--accent) 14%, transparent); border: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); }
[data-theme="klinik"] .lrow { background: #fff; border-color: #EDF0F4; }
[data-theme="klinik"] .lrow.me { background: #EEF4FB; border: 1.5px solid #DCE8F6; }
[data-theme="modern"] .lrow { background: transparent; border: none; border-bottom: 1px solid var(--line); border-radius: 0; font-weight: 500; }
[data-theme="modern"] .lrow.me { background: rgba(46,230,214,.07); border: 1px solid rgba(46,230,214,.25); border-radius: 14px; }
.empty { text-align: center; padding: 30px 14px; color: var(--text-2); font-weight: 600; font-size: 15px; line-height: 1.45; }

.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { text-align: center; padding: 14px 6px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.stat .v { font-size: 28px; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 12px; color: var(--text-2); font-weight: 700; margin-top: 4px; overflow-wrap: anywhere; line-height: 1.2; }
.stat.w .v { color: var(--ok-2); } .stat.l .v { color: var(--bad-2); } .stat.d .v { color: var(--text-2); }
[data-theme="klinik"] .stat { background: #fff; border-color: #EDF0F4; }
.wld { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin-top: 12px; background: var(--surface-2); }
.wld i { display: block; height: 100%; }
.section { margin-top: 22px; }
.section > .h3 { margin-bottom: 10px; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row .bl { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: var(--w-med); margin-bottom: 5px; line-height: 1.25; }
.bar-row .bl span:first-child { min-width: 0; overflow-wrap: anywhere; }
.bar-row .bl b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-row .bt { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-row .bt i { display: block; height: 100%; border-radius: 99px; background: var(--c, var(--accent)); width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.bar-row .bs { font-size: 12px; color: var(--text-3); margin-top: 3px; font-weight: 600; }
.weak { display: flex; flex-direction: column; gap: 8px; }
.weak .lrow { min-height: 50px; }
.best-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.best { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.best .ico { font-size: 24px; color: var(--accent); }
.best .bv { font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; }
.best .bk { font-size: 12px; color: var(--text-2); font-weight: 700; }
[data-theme="klinik"] .best { background: #fff; border-color: #EDF0F4; }

.theme-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-card { border-radius: 16px; padding: 4px; border: 2px solid var(--line); text-align: center; background: transparent; color: var(--text); min-width: 0; }
.theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.theme-card .tn { font-size: 13px; font-weight: var(--w-bold); margin-top: 6px; }
.theme-card .td { font-size: 11px; color: var(--text-2); margin-bottom: 4px; }
.tprev { position: relative; height: 128px; border-radius: 12px; overflow: hidden; padding: 9px 7px; display: flex; flex-direction: column; gap: 5px; color: var(--text); text-align: left; background: var(--bg-solid); }
.tprev::before { content: ""; position: absolute; inset: 0; background: var(--bg); }
.tprev > * { position: relative; }
.tprev .tq { font-size: 9px; font-weight: var(--w-bold); background: var(--card-bg); color: var(--card-fg); border-radius: 6px; padding: 4px 5px; line-height: 1.2; box-shadow: var(--card-sh); }
.tprev[data-theme="klinik"] .tq, .tprev[data-theme="modern"] .tq { padding: 1px 0; box-shadow: none; }
.tprev .tbar { height: 4px; border-radius: 3px; background: var(--timer-track); overflow: hidden; }
.tprev .tbar i { display: block; height: 100%; width: 62%; background: var(--timer-ok); }
.tprev .ttiles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.tprev .ttiles i { height: 16px; border-radius: 5px; }
.tprev .tbtn { margin-top: auto; height: 16px; border-radius: 6px; background: var(--primary-bg); color: var(--primary-fg); font-size: 8px; font-weight: 800; display: grid; place-items: center; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: none; }
.setting-row .sl { font-weight: var(--w-bold); font-size: 15px; }
.switch { position: relative; width: 54px; height: 32px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line-2); flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--ok); border-color: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(22px); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--accent) var(--p, 80%), var(--surface-2) var(--p, 80%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; margin-top: -9px; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 8px; background: var(--surface-2); }
input[type=range]::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--accent); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: none; }

/* ============================================================ phone controller (rounds) */
.ctrl-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; }
.ctrl-head .cn { font-size: 20px; font-weight: var(--w-strong); line-height: 1.15; overflow-wrap: anywhere; }
.ctrl-head .cr { font-size: 14px; font-weight: var(--w-bold); color: var(--accent); font-variant-numeric: tabular-nums; }
.ctrl-head > div { min-width: 0; flex: 1; }
.live { font-size: 12px; font-weight: 900; color: var(--bad-2); background: color-mix(in srgb, var(--bad) 15%, transparent); border: 1.5px solid color-mix(in srgb, var(--bad) 50%, transparent); padding: 5px 10px; border-radius: 999px; white-space: nowrap; flex: none; }
.live.off { color: var(--text-3); border-color: var(--line-2); background: transparent; }
.ctrl-q { text-align: center; font-size: 15px; font-weight: var(--w-strong); padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; line-height: 1.3; }
.ctrl-q span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.ctrl-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; flex: 1; min-height: 360px; margin-top: 12px; }
.cbtn { position: relative; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; color: var(--fg); background: var(--bgc); transition: transform .08s; }
.cbtn .cshape { font-size: 72px; line-height: 0; }
.cbtn .cl { position: absolute; left: 16px; top: 12px; font-size: 22px; font-weight: 900; opacity: .65; }
.cbtn:active { transform: scale(.96) translateY(4px); }
.cbtn.a0 { --bgc: var(--tile-a); --sh: var(--tile-a-sh); --fg: var(--tile-a-fg); --solid: var(--tile-a-solid); }
.cbtn.a1 { --bgc: var(--tile-b); --sh: var(--tile-b-sh); --fg: var(--tile-b-fg); --solid: var(--tile-b-solid); }
.cbtn.a2 { --bgc: var(--tile-c); --sh: var(--tile-c-sh); --fg: var(--tile-c-fg); --solid: var(--tile-c-solid); }
.cbtn.a3 { --bgc: var(--tile-d); --sh: var(--tile-d-sh); --fg: var(--tile-d-fg); --solid: var(--tile-d-solid); }
[data-theme="gameshow"] .cbtn { box-shadow: 0 8px 0 var(--sh), 0 0 24px rgba(0,0,0,.25); }
[data-theme="gameshow"] .cbtn .cshape { filter: drop-shadow(0 4px 0 rgba(0,0,0,.18)); }
[data-theme="klinik"] .cbtn { box-shadow: 0 8px 16px -10px rgba(22,35,58,.5); border-radius: 18px; }
[data-theme="klinik"] .cbtn .cshape { opacity: .9; font-size: 60px; }
[data-theme="klinik"] .cbtn .cl { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.22); display: grid; place-items: center; opacity: 1; font-size: 22px; font-weight: 800; }
[data-theme="modern"] .cbtn { background: linear-gradient(135deg, color-mix(in srgb, var(--solid) 22%, transparent), color-mix(in srgb, var(--solid) 8%, transparent)); border: 1px solid color-mix(in srgb, var(--solid) 45%, transparent); color: var(--solid); border-radius: 24px; }
[data-theme="modern"] .cbtn .cl { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--solid); color: #0B0C0F; opacity: 1; font-weight: 700; box-shadow: 0 8px 24px -8px var(--solid); }
.ctrl-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 20px 6px; }
.ctrl-state .big-ico { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font-size: 64px; background: var(--surface); border: 2px solid var(--line-2); color: var(--accent); }
.ctrl-state .big-ico.ok { background: var(--ok); color: #fff; border-color: transparent; box-shadow: 0 0 40px color-mix(in srgb, var(--ok) 60%, transparent); animation: verdictIn .45s cubic-bezier(.3,1.5,.5,1); }
.ctrl-state .big-ico.bad { background: var(--bad); color: #fff; border-color: transparent; box-shadow: 0 0 40px color-mix(in srgb, var(--bad) 50%, transparent); animation: verdictIn .45s cubic-bezier(.3,1.5,.5,1); }
.ctrl-state .big-ico.sent { background: var(--bgc, var(--surface)); color: var(--fg, var(--text)); border: none; }
.ctrl-state .big-ico.sent.a0 { --bgc: var(--tile-a); --fg: var(--tile-a-fg); } .ctrl-state .big-ico.sent.a1 { --bgc: var(--tile-b); --fg: var(--tile-b-fg); }
.ctrl-state .big-ico.sent.a2 { --bgc: var(--tile-c); --fg: var(--tile-c-fg); } .ctrl-state .big-ico.sent.a3 { --bgc: var(--tile-d); --fg: var(--tile-d-fg); }
.ctrl-state .t1 { font-family: var(--font-display); font-size: 30px; font-weight: var(--w-strong); letter-spacing: var(--ls-title); line-height: 1.1; }
.ctrl-state .t2 { font-size: 16px; color: var(--text-2); font-weight: 600; line-height: 1.4; max-width: 300px; }
.ctrl-state .pts-big { font-size: 46px; font-weight: 900; color: var(--ok-2); font-variant-numeric: tabular-nums; }
.ctrl-state .rank-big { font-size: 20px; font-weight: 800; color: var(--accent); }
.ctrl-foot { text-align: center; font-size: 12px; color: var(--text-3); font-weight: 700; margin-top: 14px; }

/* flash overlay (controllers: visual instead of sound) */
#flash { position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0; }
#flash.on { animation: flash .6s ease-out; }
#flash.ok { background: radial-gradient(circle, color-mix(in srgb, var(--ok) 55%, transparent), color-mix(in srgb, var(--ok) 25%, transparent)); }
#flash.bad { background: radial-gradient(circle, color-mix(in srgb, var(--bad) 55%, transparent), color-mix(in srgb, var(--bad) 25%, transparent)); }
#flash.tap { background: rgba(255,255,255,.35); }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* toast */
#toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); transform: translate(-50%, 30px); opacity: 0; z-index: 100; max-width: min(92vw, 440px);
  padding: 12px 18px; border-radius: 14px; background: #111; color: #fff; font-weight: 700; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: all .25s; pointer-events: none; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: #b3261e; }
#netbar { position: fixed; top: 0; left: 0; right: 0; z-index: 95; text-align: center; font-size: 13px; font-weight: 700; padding: calc(env(safe-area-inset-top, 0px) + 4px) 10px 4px; background: #b3261e; color: #fff; transform: translateY(-100%); transition: transform .25s; }
#netbar.show { transform: none; }

/* confetti */
canvas.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }

/* ============================================================ presenter (beamer) – sized in em; 1em = 16px @1280×720 */
.stage {
  position: fixed; inset: 0; overflow: hidden; display: flex; flex-direction: column;
  font-size: min(1.25vw, 2.2222vh); padding: 1.6em 2.5em 1.5em;
}
.stage .ico { vertical-align: -.12em; }
.bm-top { display: flex; align-items: center; justify-content: space-between; gap: 1.2em; min-height: 4.6em; }
.bm-logo { display: flex; align-items: center; gap: .9em; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.bm-logo > div { min-width: 0; }
.bm-logo .logo-badge { font-size: 1.25em; padding: .5em .6em; border-radius: .7em; }
.bm-title { font-family: var(--font-display); font-size: 1.75em; font-weight: var(--w-strong); letter-spacing: var(--ls-title); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-sub { font-size: .875em; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-mid { display: flex; align-items: center; gap: .9em; flex: none; }
.bm-mid:empty { display: none; }
.bm-mid .chip { font-size: 1.15em; padding: .4em 1em; }
.bm-q { font-size: 1.25em; font-weight: var(--w-strong); color: var(--text-2); white-space: nowrap; display: inline-flex; align-items: center; gap: .35em; }
.bm-right { display: flex; align-items: center; gap: .7em; flex: none; }
.bm-join { display: flex; align-items: center; gap: .9em; background: #fff; color: #1a0d4d; border-radius: 1.1em; padding: .45em .45em .45em 1.1em; }
[data-theme="gameshow"] .bm-join { box-shadow: 0 .3em 0 #c9bdf5; }
[data-theme="klinik"] .bm-join { box-shadow: 0 1px 2px rgba(22,35,58,.05), 0 4px 14px -6px rgba(22,35,58,.10); border: 1px solid #EDF0F4; color: #16233A; }
[data-theme="modern"] .bm-join { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid var(--line); }
.bm-join .pin-l { font-size: .7em; font-weight: 700; opacity: .7; white-space: nowrap; }
.bm-join .pin { font-size: 1.6em; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.bm-join .pin b { font-weight: 900; letter-spacing: .08em; color: #6a3df0; }
[data-theme="klinik"] .bm-join .pin b { color: #1F5FAF; }
[data-theme="modern"] .bm-join .pin b { color: #2EE6D6; }
.bm-join .qrmini { width: 5.25em; height: 5.25em; background: #fff; border-radius: .4em; padding: .15em; }
.bm-join .qrmini svg { width: 100%; height: 100%; display: block; }
.stage .iconbtn { width: 2.6em; height: 2.6em; font-size: 1.1em; border-radius: .75em; }
.bm-timer { display: flex; align-items: center; gap: 1em; margin: 1em 0 .9em; }
.bm-timer > .timer { flex: 1; }
.stage .timer { gap: 1em; }
.stage .timer-label { font-size: 2em; min-width: 3em; }
[data-theme="gameshow"] .stage .timer-label { text-shadow: 0 0 1em rgba(255,211,77,.6); }
[data-theme="gameshow"] .stage .timer-track { height: 1.6em; }
[data-theme="klinik"] .stage .timer-track { height: .65em; }
[data-theme="modern"] .stage .timer-track { height: .45em; }
[data-theme="modern"] .stage .timer-fill::after { height: 1.1em; top: -.32em; width: 3px; }
.bm-question {
  background: var(--card-bg); color: var(--card-fg); border-radius: .7em; padding: .55em .9em; font-size: 2.2em; font-weight: var(--w-strong); line-height: 1.2; text-align: center;
  box-shadow: var(--card-sh); overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto;
}
.bm-question.long { font-size: 1.85em; } .bm-question.xlong { font-size: 1.55em; }
.bm-question.compact { font-size: 1.5em; padding: .45em .9em; }
[data-theme="gameshow"] .bm-question { box-shadow: 0 .18em 0 #c9bdf5, 0 .5em 1em rgba(0,0,0,.35); }
[data-theme="klinik"] .bm-question { text-align: left; padding: .2em 0; font-weight: 700; letter-spacing: -.02em; }
[data-theme="modern"] .bm-question { text-align: left; padding: .2em 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -.03em; }
.bm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1em; margin-top: 1.4em; }
.btile { position: relative; display: flex; align-items: center; gap: .7em; min-height: 4em; border-radius: .85em; padding: .45em 2.3em .45em .6em; font-size: 1.6em; font-weight: var(--w-bold); line-height: 1.18; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; transition: filter .3s, opacity .3s, transform .3s; }
.btile .bshape { width: 2.4em; height: 2.4em; flex: none; border-radius: .6em; display: grid; place-items: center; font-size: 1em; font-weight: 900; }
.btile .bshape .ico { font-size: 1.15em; }
.btile .bshape .letter { display: none; }
.btile .btext { flex: 1; min-width: 0; }
.btile .bletter { position: absolute; right: .8em; top: 50%; transform: translateY(-50%); font-size: 1.15em; font-weight: 900; opacity: .5; }
.btile.small-text { font-size: 1.3em; }
.bm-grid.compact .btile { min-height: 3.1em; font-size: 1.4em; }
.bm-grid.compact .btile .bshape { width: 2em; height: 2em; }
.btile.a0 { --bgc: var(--tile-a); --sh: var(--tile-a-sh); --fg: var(--tile-a-fg); --solid: var(--tile-a-solid); }
.btile.a1 { --bgc: var(--tile-b); --sh: var(--tile-b-sh); --fg: var(--tile-b-fg); --solid: var(--tile-b-solid); }
.btile.a2 { --bgc: var(--tile-c); --sh: var(--tile-c-sh); --fg: var(--tile-c-fg); --solid: var(--tile-c-solid); }
.btile.a3 { --bgc: var(--tile-d); --sh: var(--tile-d-sh); --fg: var(--tile-d-fg); --solid: var(--tile-d-solid); }
[data-theme="gameshow"] .btile { background: var(--bgc); color: var(--fg); box-shadow: 0 .27em 0 var(--sh); }
[data-theme="gameshow"] .btile .bshape { background: rgba(0,0,0,.18); }
[data-theme="klinik"] .btile { background: var(--bgc); color: #fff; font-weight: 600; box-shadow: 0 8px 18px -10px rgba(22,35,58,.45); border-radius: 1em; }
[data-theme="klinik"] .btile .bshape { background: rgba(255,255,255,.2); border-radius: .5em; width: 2em; height: 2em; }
[data-theme="klinik"] .btile .bshape .ico { display: none; } [data-theme="klinik"] .btile .bshape .letter { display: inline; }
[data-theme="klinik"] .btile .bletter { display: none; }
[data-theme="klinik"] .btile { padding-right: 1em; }
[data-theme="modern"] .btile { background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.08); color: var(--text); font-weight: 600; letter-spacing: -.02em; }
[data-theme="modern"] .btile .bshape { background: var(--solid); color: #0B0C0F; border-radius: .6em; width: 2.1em; height: 2.1em; }
[data-theme="modern"] .btile .bshape .ico { display: none; } [data-theme="modern"] .btile .bshape .letter { display: inline; }
[data-theme="modern"] .btile .bletter { display: none; }
[data-theme="modern"] .btile { padding-right: 1em; }
/* reveal on beamer */
.bm-grid.revealed .btile.wrong { filter: saturate(.3) brightness(.6); }
[data-theme="klinik"] .bm-grid.revealed .btile.wrong { filter: none; opacity: .35; }
[data-theme="modern"] .bm-grid.revealed .btile.wrong { filter: none; opacity: .4; }
.bm-grid.revealed .btile.right { transform: scale(1.02); }
[data-theme="gameshow"] .bm-grid.revealed .btile.right { background: linear-gradient(180deg, #36e886, #14b55a); color: #fff; box-shadow: 0 .27em 0 #0b7a3b, 0 0 0 .18em #b9ffd6, 0 0 1.6em rgba(31,207,107,.8); }
[data-theme="klinik"] .bm-grid.revealed .btile.right { box-shadow: 0 0 0 .2em #fff, 0 0 0 .38em #2E8B57; }
[data-theme="modern"] .bm-grid.revealed .btile.right { background: rgba(50,215,75,.12); border-color: rgba(50,215,75,.7); box-shadow: 0 0 2em -.4em rgba(50,215,75,.6); }
.btile .dist { display: flex; align-items: center; gap: .5em; margin-left: auto; padding-left: .5em; flex: none; font-variant-numeric: tabular-nums; }
.btile .dist .dcount { font-size: 1.1em; font-weight: 900; min-width: 1.5em; text-align: right; }
.btile .dist .dcheck { font-size: 1.2em; }
.btile .dbar { position: absolute; left: 0; bottom: 0; height: .32em; border-radius: 0 .2em .2em 1.35em; background: rgba(255,255,255,.7); width: 0; transition: width 1s cubic-bezier(.2,.8,.2,1); }
[data-theme="modern"] .btile .dbar { background: var(--solid); }
[data-theme="klinik"] .btile .dbar { background: rgba(255,255,255,.85); border-radius: 0 .2em .2em 1em; }
.bm-reveal { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; margin-top: .9em; align-items: start; }
.bm-reveal .bm-grid { grid-column: 1 / -1; }
.bm-reveal-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2em; margin-top: 1.2em; align-items: start; }
.bm-explain { background: var(--surface); border: 1px solid var(--line); border-radius: 1.2em; padding: 1em 1.3em; font-size: 1.3em; line-height: 1.42; font-weight: 500; overflow-wrap: break-word; }
.bm-explain .ex-h { display: flex; align-items: center; gap: .4em; font-weight: var(--w-strong); color: var(--accent); margin-bottom: .3em; font-size: .95em; }
[data-theme="klinik"] .bm-explain { background: #fff; border-color: #EDF0F4; color: var(--text-2); }
.bm-chart { display: flex; align-items: flex-end; justify-content: space-around; gap: .8em; padding: 1em 1.2em .8em; border-radius: 1.2em; background: var(--surface); border: 1px solid var(--line); min-height: 9em; }
[data-theme="klinik"] .bm-chart { background: #fff; border-color: #EDF0F4; }
.bm-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .3em; height: 100%; }
.bm-chart .cv { font-size: 1.4em; font-weight: 900; font-variant-numeric: tabular-nums; }
.bm-chart .cb { width: 100%; max-width: 4.2em; border-radius: .5em .5em .2em .2em; background: var(--bgc); height: .4em; transition: height 1s cubic-bezier(.2,.8,.2,1); box-shadow: inset 0 -.3em 0 rgba(0,0,0,.12); }
[data-theme="modern"] .bm-chart .cb { background: var(--solid); }
.bm-chart .cs { width: 2em; height: 2em; border-radius: .5em; display: grid; place-items: center; background: var(--bgc); color: var(--fg); font-size: .95em; font-weight: 900; }
[data-theme="modern"] .bm-chart .cs { background: var(--solid); color: #0B0C0F; }
.bm-chart .cs .letter { display: none; }
[data-theme="klinik"] .bm-chart .cs .ico, [data-theme="modern"] .bm-chart .cs .ico { display: none; }
[data-theme="klinik"] .bm-chart .cs .letter, [data-theme="modern"] .bm-chart .cs .letter { display: inline; }
.bm-chart .col.wrong { opacity: .45; }
.bm-chart .col.right .cv { color: var(--ok-2); }
.bm-chart .col.a0 { --bgc: var(--tile-a); --fg: var(--tile-a-fg); --solid: var(--tile-a-solid); } .bm-chart .col.a1 { --bgc: var(--tile-b); --fg: var(--tile-b-fg); --solid: var(--tile-b-solid); }
.bm-chart .col.a2 { --bgc: var(--tile-c); --fg: var(--tile-c-fg); --solid: var(--tile-c-solid); } .bm-chart .col.a3 { --bgc: var(--tile-d); --fg: var(--tile-d-fg); --solid: var(--tile-d-solid); }

.bm-foot { margin-top: auto; padding-top: 1em; display: flex; align-items: center; gap: 1.4em; }
.answered { display: flex; align-items: center; gap: .9em; font-size: 1.25em; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.answered b { font-size: 1.3em; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }
.answered-bar { flex: 1; height: .75em; border-radius: 99px; background: var(--timer-track); overflow: hidden; }
.answered-bar div { height: 100%; width: 0; background: linear-gradient(90deg, #8b5cff, #ff4fb8); border-radius: 99px; transition: width .4s; }
[data-theme="gameshow"] .answered-bar div { box-shadow: 0 0 .75em rgba(255,79,184,.7); }
[data-theme="klinik"] .answered-bar div { background: #2E8B57; }
[data-theme="modern"] .answered-bar div { background: linear-gradient(90deg, #16C2B3, #2EE6D6); }
/* presenter: sound is wanted but the browser has not been allowed to play yet (reload, no click or key since) */
.bm-soundhint { position: fixed; left: 50%; top: 2.4em; transform: translateX(-50%); z-index: 150; display: flex; align-items: center; gap: .5em; padding: .5em 1em; border-radius: 999px; background: #b3261e; color: #fff; font-weight: 800; font-size: 1.1em; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.bm-soundhint[hidden] { display: none; }
.bm-soundhint svg { width: 1.2em; height: 1.2em; }
.bm-hint { font-size: 1em; color: var(--text-3); font-weight: 700; white-space: nowrap; display: flex; align-items: center; gap: .5em; }
.kbd { display: inline-block; padding: .1em .5em; border-radius: .35em; border: 1px solid var(--line-2); background: var(--surface); font-size: .9em; font-weight: 800; color: var(--text-2); }
.stage .btn { width: auto; min-height: 2.8em; font-size: 1.3em; padding: .5em 1.6em; border-radius: .8em; }
.stage .btn-lg { font-size: 1.7em; min-height: 2.6em; padding: .4em 2em; }

/* host create */
.host-create { margin: auto; width: min(36em, 92%); text-align: center; display: flex; flex-direction: column; gap: 1.2em; align-items: stretch; }
.host-create .h1 { font-size: 2.6em; }
.host-create .sub { font-size: 1.2em; }
.host-create .seg { align-self: center; font-size: 1.1em; }
.host-create .seg button { font-size: 1em; padding: .5em 1.3em; }
.host-create .fine { font-size: .95em; }

/* host lobby */
.lobby { flex: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 2.4em; margin-top: 1em; min-height: 0; }
.lobby-left { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .8em; min-width: 0; }
.lobby-join { font-size: 1.4em; font-weight: 700; color: var(--text-2); }
.lobby-url { font-size: 1.5em; font-weight: 800; color: var(--text); word-break: break-all; max-width: 100%; }
.lobby-pin { font-size: 8.5em; font-weight: 900; letter-spacing: .08em; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
[data-theme="gameshow"] .lobby-pin { text-shadow: 0 .06em 0 #a86a00, 0 0 .4em rgba(255,211,77,.5); }
[data-theme="klinik"] .lobby-pin { color: var(--text); font-weight: 800; }
.lobby-pin-l { font-size: 1.3em; font-weight: 800; letter-spacing: .3em; color: var(--text-2); text-transform: uppercase; }
.lobby-qr { width: 15em; height: 15em; background: #fff; border-radius: 1em; padding: .6em; }
.lobby-qr svg { width: 100%; height: 100%; display: block; }
.lobby-right { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.lobby-count { display: flex; align-items: baseline; gap: .5em; font-size: 1.6em; font-weight: 800; }
.lobby-count b { font-size: 2em; color: var(--accent); font-variant-numeric: tabular-nums; }
.lobby-players { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; gap: .7em; margin-top: 1em; overflow: hidden; min-height: 6em; }
.pchip { display: inline-flex; align-items: center; gap: .55em; padding: .35em 1em .35em .35em; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 1.2em; font-weight: 800; animation: chipIn .5s cubic-bezier(.3,1.6,.5,1) both; max-width: 100%; }
.pchip .av { width: 1.9em; height: 1.9em; font-size: .7em; }
.pchip .pcn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip.off { opacity: .45; }
[data-theme="klinik"] .pchip { background: #fff; border-color: #EDF0F4; box-shadow: 0 1px 2px rgba(22,35,58,.05); }
@keyframes chipIn { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.lobby-wait { color: var(--text-3); font-size: 1.3em; font-weight: 700; display: flex; align-items: center; gap: .6em; }
.lobby-actions { display: flex; align-items: center; gap: 1em; margin-top: 1em; }

/* host wheel */
.bm-wheel { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
.bm-wheel .wheel-wrap { width: min(23em, 52vh); margin: 1.4em auto 0; }
.bm-wheel .wheel-title { font-size: 2.5em; }
.bm-wheel .wheel-sub { font-size: 1.3em; }
[data-theme="klinik"] .bm-wheel .wheel-title { font-size: 2.2em; }
[data-theme="modern"] .bm-wheel .wheel-title { font-size: 1.1em; } [data-theme="modern"] .bm-wheel .wheel-sub { font-size: 2.2em; }
.bm-wheel .mode-banner .mb-name { font-size: 2.8em; }
.bm-wheel .mode-banner .mb-sub { font-size: 1.3em; }
.bm-wheel .mode-banner { margin-top: .6em; }

/* host leaderboard */
.bm-lb { flex: 1; display: flex; flex-direction: column; min-height: 0; margin-top: 1em; }
.bm-lb-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1em; margin-bottom: .9em; }
.bm-lb-next { display: flex; align-items: center; justify-content: flex-end; gap: .8em; }
.bm-lb-title { font-family: var(--font-display); font-size: 2.2em; font-weight: var(--w-strong); letter-spacing: var(--ls-title); text-align: center; color: var(--accent); }
.stage.ingame .bm-sub { display: none; }
.stage.ingame .bm-title { font-size: 1.5em; }
[data-theme="klinik"] .bm-lb-title { color: var(--text); }
.bm-lb-list { position: relative; display: flex; flex-direction: column; gap: .4em; width: min(52em, 100%); margin: 0 auto; }
.bm-lb .lrow { font-size: 1.25em; min-height: 2.3em; padding: .2em 1em; border-radius: .7em; gap: .8em; }
.bm-lb .lrow .av { width: 2em; height: 2em; font-size: .7em; }
.bm-lb .lrow .lrank { width: 1.8em; font-size: 1.05em; }
.bm-lb .lrow .delta { font-size: .8em; color: var(--ok-2); font-weight: 900; min-width: 4.5em; text-align: right; font-variant-numeric: tabular-nums; }
.bm-lb .lrow .move { font-size: .75em; font-weight: 900; min-width: 2.6em; text-align: right; display: inline-flex; align-items: center; justify-content: flex-end; gap: .15em; color: var(--text-3); }
.bm-lb .lrow .move.up { color: var(--ok-2); } .bm-lb .lrow .move.dn { color: var(--bad-2); }
.bm-lb .lrow .lpts { min-width: 4.5em; }
.bm-lb .lrow.out { opacity: .55; }

/* host podium */
.bm-podium { flex: 1; display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.2em; min-height: 0; margin-top: 1em; }
.pp-left { display: flex; flex-direction: column; min-height: 0; }
.pp-h { font-family: var(--font-display); font-size: 2.1em; font-weight: 900; color: var(--accent); display: flex; align-items: center; gap: .4em; }
[data-theme="gameshow"] .pp-h { text-shadow: 0 .1em 0 #a86a00; }
[data-theme="klinik"] .pp-h { color: var(--text); font-weight: 700; }
[data-theme="modern"] .pp-h { color: var(--text); font-weight: 600; }
.pp-sub { font-size: 1.05em; color: var(--text-2); font-weight: 600; margin-top: .2em; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 1em; margin-top: auto; }
.pod { display: flex; flex-direction: column; align-items: center; width: 11em; min-width: 0; }
.pod .av { width: 3.6em; height: 3.6em; font-size: 1.2em; }
.pod.p1 .av { width: 4.6em; height: 4.6em; font-size: 1.5em; }
[data-theme="gameshow"] .pod .av { box-shadow: 0 0 0 .25em rgba(255,255,255,.25); }
[data-theme="gameshow"] .pod.p1 .av { box-shadow: 0 0 0 .3em #fff6c9, 0 0 2em rgba(255,211,77,.9); }
.pod .crown { font-size: 2.4em; color: #ffd34d; margin-bottom: -.25em; position: relative; z-index: 2; }
[data-theme="klinik"] .pod .crown { color: #C2A24E; font-size: 1.8em; margin-bottom: 0; }
[data-theme="modern"] .pod .crown { color: #2EE6D6; font-size: 1.6em; margin-bottom: 0; }
.pod-name { font-size: 1.15em; font-weight: 900; margin-top: .5em; text-align: center; max-width: 100%; line-height: 1.15; overflow: hidden; overflow-wrap: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; } /* long names wrap to 2 lines */
.pod-pts { font-size: 1em; font-weight: 800; color: var(--accent); margin-bottom: .5em; font-variant-numeric: tabular-nums; }
[data-theme="klinik"] .pod-pts, [data-theme="modern"] .pod-pts { color: var(--text-2); font-weight: 600; }
.pod .block { width: 100%; border-radius: 1em 1em 0 0; display: grid; place-items: start center; padding-top: .3em; font-size: 2.9em; font-weight: 900; transform-origin: bottom; animation: podUp .9s cubic-bezier(.2,1.2,.4,1) both; }
.pod.p1 .block { height: 3.7em; background: var(--pod-1); color: var(--pod-1-fg); animation-delay: 1.3s; }
.pod.p2 .block { height: 2.6em; background: var(--pod-2); color: var(--pod-2-fg); animation-delay: .7s; }
.pod.p3 .block { height: 1.95em; background: var(--pod-3); color: var(--pod-3-fg); animation-delay: .2s; }
.pod.p1 > :not(.block) { animation: fadeUp .6s 1.9s both; } .pod.p2 > :not(.block) { animation: fadeUp .6s 1.3s both; } .pod.p3 > :not(.block) { animation: fadeUp .6s .8s both; }
[data-theme="gameshow"] .pod .block { box-shadow: inset 0 -.2em 0 rgba(0,0,0,.12); }
[data-theme="modern"] .pod .block { border: 1px solid color-mix(in srgb, var(--pod-1-fg) 40%, transparent); border-bottom: none; font-weight: 700; }
[data-theme="modern"] .pod.p2 .block { border-color: color-mix(in srgb, var(--pod-2-fg) 40%, transparent); }
[data-theme="modern"] .pod.p3 .block { border-color: color-mix(in srgb, var(--pod-3-fg) 40%, transparent); }
[data-theme="klinik"] .pod .block { border-radius: .75em .75em .25em .25em; font-size: 1.6em; padding-top: .45em; }
[data-theme="klinik"] .pod.p1 .block { height: 5.6em; } [data-theme="klinik"] .pod.p2 .block { height: 4.1em; } [data-theme="klinik"] .pod.p3 .block { height: 3em; }
@keyframes podUp { from { transform: scaleY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(1em); } }
.pp-right { display: flex; flex-direction: column; gap: .55em; justify-content: center; min-height: 0; overflow: hidden; }
.pp-right .lrow { font-size: 1.15em; min-height: 2.6em; padding: .3em .9em; border-radius: .8em; gap: .7em; }
.pp-right .lrow .av { width: 2em; height: 2em; font-size: .72em; }
.pp-actions { display: flex; gap: .8em; margin-top: .6em; }

/* phone-sized beamer fallback (presenter opened on a phone) */
@media (max-aspect-ratio: 1/1) {
  .stage { font-size: 2.6vw; padding: 1em; overflow-y: auto; position: relative; min-height: 100vh; }
  .lobby, .bm-podium, .bm-reveal-row { grid-template-columns: 1fr; }
  .bm-grid { grid-template-columns: 1fr; }
}

/* ============================================================ misc animations */
.pop-in { animation: chipIn .45s cubic-bezier(.3,1.6,.5,1) both; }
.fade-in { animation: fadeUp .35s ease-out both; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--surface-2); border-top-color: var(--accent); animation: rot .8s linear infinite; margin: 30px auto; }
@keyframes rot { to { transform: rotate(360deg); } }
.score-bump { animation: bump .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump { 40% { transform: scale(1.25); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .05s !important; }
  .radar::before, .radar::after { display: none; }
  .timer.pulse .timer-track, .timer.pulse .timer-label { animation: none !important; }
}

/* small phones */
@media (max-width: 370px) {
  .screen { padding-left: calc(env(safe-area-inset-left, 0px) + 12px); padding-right: calc(env(safe-area-inset-right, 0px) + 12px); }
  .qcard { font-size: 18px; } .ans { font-size: 15px; min-height: 58px; } .h1 { font-size: 24px; }
  .scorebar .ps { font-size: 19px; }
}
@media (max-height: 700px) {
  .ans { min-height: 56px; } .answers { gap: 8px; } .wheel-wrap { width: min(70vw, 280px); }
}

/* duel reveal: "Weiter" + end-of-game mistake review */
.next-row { margin-top: 16px; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.next-row .next-btn[disabled] { opacity: .55; }
.next-row .next-wait { text-align: center; min-height: 1.2em; }
.review { margin-top: 18px; text-align: left; }
.review-h { display: flex; align-items: center; gap: 6px; font-weight: var(--w-strong); font-size: 16px; margin-bottom: 4px; }
.review > .fine, .rv-cat { text-align: left; }
.review > .fine { margin: 0 0 8px; }
.rv-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin-top: 8px; }
.rv-item summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.rv-item summary::-webkit-details-marker { display: none; }
.rv-item .rv-n { flex: none; min-width: 22px; height: 22px; border-radius: 11px; display: inline-grid; place-items: center; font-size: 12px; background: var(--bad); color: #fff; }
.rv-item[open] summary { margin-bottom: 8px; }
.rv-cat { margin: 0 0 6px 32px; }
.rv-a { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 4px 0 4px 32px; line-height: 1.35; }
.rv-a svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.rv-a.bad { color: var(--bad-2, #c2475a); }
.rv-a.ok { color: var(--ok-2, #2e9e5b); font-weight: 600; }
.rv-item .explain { margin: 8px 0 2px 32px; }

/* ============================================================ game setup (topics & modes) */
.setup-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; }
.setup-card .sc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.setup-card .h3 { font-size: 11.5px; }
.setup-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14.5px; font-weight: var(--w-bold); color: var(--text); line-height: 1.35; }
.setup-sum .sum-part { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.setup-sum .ico { color: var(--accent); flex: none; }
.setup-sum .sum-sep { color: var(--text-3); }
.setup-sum .chip { font-size: 13px; }
.linkbtn { color: var(--accent); font-weight: var(--w-bold); font-size: 14px; padding: 6px 4px; min-height: 36px; background: none; border: 0; }
.linkbtn + .linkbtn { margin-left: 8px; }

.setup-ed { display: flex; flex-direction: column; gap: 18px; text-align: left; }
.se-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; min-height: 36px; }
.se-count { color: var(--text-2); letter-spacing: 0; margin-left: 4px; }
.se-hint { font-size: 12.5px; color: var(--text-2); font-weight: 500; line-height: 1.4; margin-top: 8px; min-height: 1em; }
.se-warn:empty { display: none; }
.se-warn { color: var(--warn); font-weight: var(--w-med); }
.se-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.se-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tick { position: relative; display: block; cursor: pointer; min-width: 0; }
.tick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tick .tk { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface); border: 2px solid var(--line); font-size: 13.5px; font-weight: var(--w-bold); color: var(--text-2); line-height: 1.2; transition: background .15s, border-color .15s, color .15s; }
.tick .tk > span { min-width: 0; overflow-wrap: anywhere; }
.tick input:checked + .tk { border-color: var(--accent); background: var(--surface-2); color: var(--text); }
.tick input:focus-visible + .tk { box-shadow: var(--focus); }
.mode-tick .tk { flex-wrap: wrap; }
.mode-tick .tk .ico { font-size: 20px; color: var(--accent); }
.mode-tick .tk small { flex-basis: 100%; font-size: 11.5px; font-weight: 600; color: var(--text-3); margin-top: -2px; }
.topic-tick .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; opacity: .45; transition: opacity .15s; }
.topic-tick input:checked + .tk { border-color: var(--c); }
.topic-tick input:checked + .tk .dot { opacity: 1; }
.se-topics.radio .topic-tick .dot { border-radius: 50%; box-shadow: inset 0 0 0 2px var(--bg-solid); }
@media (max-width: 360px) { .se-topics, .se-modes { grid-template-columns: 1fr; } }

/* setup screen footer */
.setup-foot { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg-solid) 30%); margin-top: 8px; }

/* host create: the editor inside the card */
.host-create .setup-ed { font-size: 1rem; }
.host-create.wide { width: min(52em, 94%); }

/* offer dialog */
.modal-back { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.55); animation: fadeIn .2s; }
.modal { width: min(420px, 100%); text-align: center; display: flex; flex-direction: column; gap: 6px; background: var(--bg-solid); }
.modal .setup-sum { justify-content: center; margin-top: 10px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* two wheels side by side (mode + topic) with a caption under each */
.wheel-pair { display: flex; justify-content: center; align-items: flex-start; gap: 4%; width: 100%; margin-top: 18px; }
.wheel-pair .wheel-cell { flex: 0 1 auto; width: min(86vw, 340px); display: flex; flex-direction: column; align-items: center; min-width: 0; }
.wheel-pair.n2 .wheel-cell { width: 48%; max-width: 340px; }
.wheel-pair .wheel-wrap { width: 100%; margin: 10px auto 0; }
.wheel-cap-h { font-size: 11.5px; font-weight: var(--w-bold); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.wheel-pair.n1 .wheel-cap-h { display: none; }
.wheel-cap { margin-top: 12px; min-height: 2.6em; max-width: 100%; padding: 4px 10px; border-radius: 10px; font-size: 15px; font-weight: var(--w-strong); line-height: 1.25; text-align: center; color: var(--text); border-bottom: 3px solid var(--cap, var(--line)); overflow-wrap: anywhere; transition: transform .2s; }
.wheel-pair.n2 .wheel-cap { font-size: 13px; }
.wheel-cell.landed .wheel-cap { transform: scale(1.08); color: var(--accent); }
.bm-wheel .wheel-pair { flex: 1; min-height: 0; }
.bm-wheel .wheel-pair .wheel-cell { width: min(23em, 52vh); }
.bm-wheel .wheel-pair.n2 .wheel-cell { width: min(21em, 46vh, 44%); }
.bm-wheel .wheel-cap { font-size: 2em; }
.bm-wheel .wheel-cap-h { font-size: 1.1em; }

/* intro: topic under the mode */
.intro-topic { margin-top: 2px; }
.intro-topic .chip { font-size: 15px; padding: 6px 12px; }

/* setup line on the VS screen / presenter lobby */
.setup-line { display: flex; justify-content: center; margin-top: 10px; }
.setup-line .setup-sum { justify-content: center; font-size: 13.5px; color: var(--text-2); }

/* high scores: topic filter */
.topic-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.topic-filter label { font-size: 13px; font-weight: var(--w-bold); color: var(--text-2); flex: none; }
.topic-filter select { flex: 1; min-width: 0; min-height: 40px; padding: 6px 10px; border-radius: 10px; background: var(--surface); color: var(--text); border: 1px solid var(--line); font: inherit; font-size: 14px; font-weight: var(--w-med); }
.topic-filter select option { color: #000; }
.lpts small.partial { color: var(--text-3); }
.se-time button { padding-left: 4px; padding-right: 4px; font-variant-numeric: tabular-nums; }

/* ============================================================ question history, flags, admin */
.home-mini { grid-template-columns: repeat(2, 1fr); }
.qcard.compact { font-size: 16px; padding: 12px 14px; margin-bottom: 4px; }
[data-theme="klinik"] .qcard.compact, [data-theme="modern"] .qcard.compact { font-size: 17px; padding: 2px 0; }
.flag-row { display: flex; justify-content: center; margin-top: 10px; }
.flag-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: var(--w-bold); color: var(--text-2); background: var(--surface); border: 1px solid var(--line); margin-top: 8px; }
.flag-btn .ico { font-size: 15px; }
.flag-form { text-align: left; gap: 4px; }
.flag-form .h2, .flag-form .sub { text-align: center; }
.flag-form .field-label { margin-top: 10px; }
.flag-form textarea.input { min-height: 96px; resize: vertical; font-weight: 500; line-height: 1.4; }
.hist-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.hist-filters .topic-filter { margin: 0; }
.hist-item .rv-n { display: grid; place-items: center; }
.hist-item.ok .rv-n { background: var(--ok); }
.hist-item .rv-n .ico { width: 13px; height: 13px; }
.rv-item .flag-btn { margin-left: 32px; }
.adm-flag { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.adm-flag.done { opacity: .65; }
.adm-comment { font-size: 16px; font-weight: var(--w-bold); color: var(--text); }
.adm-q { font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.adm-a { margin: 0; padding-left: 22px; font-size: 13.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 3px; }
.adm-a li.right { color: var(--ok-2); font-weight: var(--w-bold); }
.adm-a .ico { vertical-align: -2px; }
.adm-flag a { color: var(--accent); }
.adm-flag code { font-size: 11px; opacity: .7; }

/* ============================================================ league */
.tier-badge { --tc: #b9773d; --tc2: #e9a96b; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; font-size: 13px; font-weight: var(--w-strong); color: #2a1400; background: linear-gradient(180deg, var(--tc2), var(--tc)); box-shadow: 0 2px 0 rgba(0,0,0,.25); white-space: nowrap; flex: none; }
.tier-badge .tier-emb, .pc-tier .tier-emb { width: 1.45em; height: 1.45em; flex: none; filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)); }
.tier-badge { color: #1c1408; text-shadow: 0 1px 0 rgba(255,255,255,.35); max-width: 100%; }
.tier-badge > span { overflow: hidden; text-overflow: ellipsis; }
.tier-badge.lg { font-size: 17px; padding: 8px 14px 8px 10px; }

.league-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; color: var(--text); text-decoration: none; }
.league-card .lc-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.league-card .lc-txt b { font-size: 15px; }
.league-card .lc-txt small { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.league-card .lc-go { color: var(--text-3); }
.lc-news { flex-basis: 100%; font-weight: var(--w-strong); font-size: 15px; padding: 6px 10px; border-radius: 10px; text-align: center; animation: verdictIn .5s cubic-bezier(.3,1.5,.5,1); }
.lc-news.up { background: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok-2); }
.lc-news.down { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad-2); }
.lg-me { display: flex; align-items: center; gap: 14px; }
.lg-me-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lg-rank { font-size: 18px; font-weight: var(--w-strong); }
.lg-score { font-size: 15px; color: var(--accent); font-weight: var(--w-bold); }
.lg-zone { font-size: 13px; color: var(--text-2); font-weight: 600; }
.lg-zone.up { color: var(--ok-2); } .lg-zone.down { color: var(--bad-2); }
.lg-ends { margin: 12px 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.lg-tabs button small { opacity: .7; font-weight: 600; }
.lg-row.z-up { box-shadow: inset 4px 0 0 var(--ok); }
.lg-row.z-down { box-shadow: inset 4px 0 0 var(--bad); }
.lg-row.inactive { opacity: .6; }
.lg-row .lpts small .ico { width: 10px; height: 10px; vertical-align: -1px; }
.lg-row.z-up .lpts small { color: var(--ok-2); } .lg-row.z-down .lpts small { color: var(--bad-2); }
.lg-rules summary { cursor: pointer; list-style: none; }
.lg-rules ul { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--text-2); line-height: 1.4; }
.flag-form textarea.input { font-family: var(--font); font-size: 15px; }

/* ============================================================ difficulty */
.se-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.level-tick .tk { flex-direction: column; align-items: flex-start; gap: 2px; }
.level-tick .tk small { font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.lv-stars { color: var(--accent); letter-spacing: 1px; font-size: 14px; white-space: nowrap; }
.lv-stars i { font-style: normal; opacity: .25; }
.qmeta-l { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.bm-mid .lv-stars { font-size: .9em; margin-left: .4em; }

/* ============================================================ presenter: speed bars + score bars */
.bm-race { display: grid; grid-template-columns: repeat(auto-fill, minmax(17em, 1fr)); gap: .35em 1.4em; margin-top: .8em; min-height: 0; overflow: hidden; font-size: 1em; }
.bm-race.dense { font-size: .82em; }
.bm-race.dense2 { font-size: .68em; grid-template-columns: repeat(auto-fill, minmax(15em, 1fr)); gap: .25em 1.1em; }
.race-row { display: grid; grid-template-columns: 7.5em 1fr 3.4em; align-items: center; gap: .6em; opacity: .45; transition: opacity .3s; }
.race-row.done { opacity: 1; }
.rr-n { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-n[data-rank]:not([data-rank=""])::before { content: attr(data-rank) ". "; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rr-track { height: .85em; border-radius: 99px; background: var(--timer-track); overflow: hidden; }
.rr-fill { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--av, var(--accent)); transition: width .6s cubic-bezier(.2,.9,.3,1); }
.rr-t { text-align: right; font-weight: 800; color: var(--text-2); }
.bm-lb-list.bars { width: 100%; display: grid; gap: .45em 1.6em; }
.bm-lb-list.bars.c1 { grid-template-columns: 1fr; width: min(64em, 100%); }
.bm-lb-list.bars.c2 { grid-template-columns: 1fr 1fr; }
.bm-lb-list.bars.c3 { grid-template-columns: 1fr 1fr 1fr; font-size: .72em; }
.bm-lb-list.bars .lrow .delta { min-width: 0; }
.bm-lb-more { text-align: center; margin-top: .6em; color: var(--text-2); font-weight: 700; }
.bm-lb { overflow: hidden; }
.bm-lb-list.bars .lrow { display: grid; grid-template-columns: 1.6em minmax(4em, 7.5em) minmax(4em, 1fr) 3.8em 2em 3.6em 4.4em; gap: .5em; padding-right: 1.1em; align-items: center; }
.bm-lb-list.bars.c2 .lrow, .bm-lb-list.bars.c3 .lrow { font-size: 1.05em; }
.bm-lb-list.bars .lrow .move { min-width: 0; }
.lb-track { height: .9em; border-radius: 99px; background: var(--timer-track); overflow: hidden; }
.lb-fill { display: block; height: 100%; border-radius: 99px; background: var(--av, var(--accent)); transition: width .9s cubic-bezier(.2,.9,.3,1); }
.lb-t { display: inline-flex; align-items: center; justify-content: flex-end; gap: .2em; font-size: .8em; font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-t .ico { width: 1em; height: 1em; }
.lb-t.ok { color: var(--ok-2); } .lb-t.bad { color: var(--bad-2); } .lb-t.none { color: var(--text-3); }
.bm-lb-list.bars .lrow .lname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================ pictures + explanation pages */
.qimg { margin: 12px 0 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.qimg-box { position: relative; width: 100%; max-height: 34vh; border-radius: var(--r-sm); overflow: hidden; background: #fff; cursor: zoom-in; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.qimg-box img { display: block; width: 100%; height: 100%; object-fit: contain; }
.qimg.small .qimg-box { max-height: 22vh; }
.qimg-mark { position: absolute; width: calc(var(--r) * 2); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 4px solid #ff2d55; box-shadow: 0 0 0 3px rgba(255,255,255,.85), 0 0 14px rgba(255,45,85,.8); animation: markPulse 1.4s ease-in-out infinite; pointer-events: none; }
@keyframes markPulse { 50% { transform: translate(-50%, -50%) scale(1.15); } }
.qimg-credit { font-size: 10.5px; color: var(--text-3); text-align: center; line-height: 1.3; }
.qimg-credit a { color: inherit; }
.figs { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.fig figcaption { font-size: 12.5px; color: var(--text-2); text-align: center; display: flex; flex-direction: column; gap: 2px; }
.explain-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: var(--w-bold); color: var(--accent); background: var(--surface); border: 1px solid var(--line); margin-top: 8px; }
.explain .explain-btn { display: flex; margin: 10px 0 0; }
.rv-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-left: 32px; }
.rv-btns .flag-btn { margin-left: 0; }
.rv-item .qimg { margin-left: 32px; }
.modal-x { position: absolute; top: 10px; right: 10px; }
.modal { position: relative; max-height: calc(100vh - 32px); overflow-y: auto; }
.explain-modal .modal { width: min(640px, 100%); text-align: left; padding-top: 18px; }
.zoom-modal .modal { width: min(1100px, 100%); padding: 10px; }
.zoom-modal .qimg-box { max-height: calc(100vh - 80px); cursor: default; }
.explain-page { display: flex; flex-direction: column; gap: 10px; padding-right: 30px; }
.explain-page .h2 { text-align: left; }
.ep-q { font-size: 14.5px; line-height: 1.4; } .ep-q .rv-a { margin-left: 0; }
.ep-body { font-size: 15px; line-height: 1.55; color: var(--text); }
.ep-body p { margin: 0 0 10px; }
.ep-body ul { margin: 0 0 10px; padding-left: 20px; }
.ep-refs ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.bm-qimg { display: flex; justify-content: center; margin-top: .6em; }
.bm-qimg .qimg { margin: 0; width: min(34em, 60%); }
.bm-qimg .qimg-box { max-height: 30vh; }
.bm-explain .qimg-box { max-height: 26vh; }

/* pictures as answers: 2×2 grid, picture fills the tile, label only after the reveal */
.ans-img { position: relative; display: block; width: 100%; max-height: 100%; border-radius: var(--r-sm); overflow: hidden; background: #fff; }
.ans-img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.answers.pics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.answers.pics .ans { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 8px 10px; min-height: 0; }
.answers.pics .ans .badge { position: absolute; top: 6px; left: 6px; width: 30px; height: 30px; font-size: 15px; z-index: 1; border-radius: 9px; }
.answers.pics .ans .ans-img { height: 21vh; max-height: 190px; }
.answers.pics .ans .txt { font-size: 13.5px; text-align: center; }
.answers.pics .ans .txt:empty { display: none; }
.answers.pics .ans { min-width: 0; }
.answers.pics .ans .end { display: none; }
.bm-grid.pics { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.bm-grid.pics .btile { min-width: 0; flex-direction: column; align-items: stretch; padding: .45em; min-height: 0; }
.bm-grid.pics .btile .bshape { position: absolute; top: .3em; left: .3em; z-index: 1; width: 1.8em; height: 1.8em; }
.bm-grid.pics .btile .ans-img { height: 26vh; }
.bm-grid.pics.compact .btile .ans-img { height: 15vh; }
.bm-grid.pics .btile .btext { text-align: center; font-size: .8em; }
.bm-grid.pics .btile .btext:empty { display: none; }
.rv-a.with-img { align-items: center; }
.rv-a.with-img .ans-img { width: 72px; height: 54px; flex: none; }

/* duel result: ± difference credited/debited */
.final-card .net { opacity: 1; }
.final-card .net.minus { color: var(--bad); }
.final-card .net.plus { color: var(--ok-2, #2e9e5b); }
.final-card .net.minus { color: var(--bad-2, #c2475a); }

/* Marathon race: progress of both players */
.race { display: grid; gap: 6px; margin: 8px 0 4px; }
.race-row { display: flex; align-items: center; gap: 8px; }
.race-track { flex: 1; height: 10px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.race-fill { height: 100%; border-radius: 6px; background: var(--accent, #ffc21a); transition: width .35s ease; }
.race-row.opp .race-fill { background: var(--tile-b-solid, #2f7bff); }
.race-n { min-width: 46px; text-align: right; font-weight: 800; font-size: 14px; }

/* setting "time bar left and right": two vertical bars beside the answer tiles */
.ans-wrap.sides { display: flex; align-items: stretch; gap: 8px; margin-top: 14px; }
.ans-wrap.sides .answers { flex: 1; min-width: 0; margin-top: 0; }
.ans-wrap .vt { width: 12px; flex: none; display: flex; }
.timer.vertical { flex-direction: column; width: 100%; height: 100%; }
.timer.vertical .timer-track { width: 100%; height: 100%; flex: 1; }
.timer.vertical .timer-fill { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; will-change: height; }
.timer.vertical.stopped .timer-fill { transition: height .3s; }
[data-theme="modern"] .timer.vertical .timer-fill::after { display: none; }
/* reveal: the opponent's pick */
.ans .opp-pick { position: absolute; right: 40px; top: 50%; transform: translateY(-50%); }
.ans .opp-pick .av { width: 30px; height: 30px; font-size: 12px; box-shadow: 0 0 0 2px #fff; }
.ans.has-opp { padding-right: 84px; }
.ans-wrap .vt.r .timer-fill { background: var(--tile-b-solid, #2f7bff); } /* the opponent's bar */
.timer.vertical.stopped { opacity: .55; }

/* explanation page: Zurück at the top and at the bottom */
.explain-modal .modal-back-btn { align-self: flex-start; margin: 2px 0 8px; }
.explain-modal .modal-back-btn:last-of-type { margin: 14px 0 2px; }
/* Marathon: quick feedback after each answer */
.race-row .race-pts { min-width: 54px; text-align: right; font-weight: 900; font-size: 14px; opacity: .9; }
.race-pop { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 70; pointer-events: none;
  font-size: 46px; font-weight: 900; text-shadow: 0 4px 18px rgba(0,0,0,.45); animation: racePop .55s ease-out forwards; }
.race-pop.ok { color: #36e886; } .race-pop.bad { color: #ff5470; }
@keyframes racePop { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -110%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .race-pop { animation-duration: .01s; } }

/* Blitz: the score lights up instead of result boxes */
.scorebar .pl.flash-ok .ps { animation: flashOk .6s ease-out; }
.scorebar .pl.flash-bad .ps { animation: flashBad .6s ease-out; }
@keyframes flashOk { 0% { color: #36e886; text-shadow: 0 0 18px #36e886; transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes flashBad { 0% { color: #ff5470; text-shadow: 0 0 18px #ff5470; transform: scale(1.15); } 100% { transform: scale(1); } }
.scorebar .pl.flash-ok .av, .scorebar .pl.flash-bad .av { animation: flashRing .6s ease-out; }
.scorebar .pl.flash-ok { --flash: #36e886; } .scorebar .pl.flash-bad { --flash: #ff5470; }
@keyframes flashRing { 0% { box-shadow: 0 0 0 4px var(--flash), 0 0 20px var(--flash); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .scorebar .pl[class*="flash-"] .ps, .scorebar .pl[class*="flash-"] .av { animation-duration: .01s; } }

/* reveal: the result sits in the indicator line (same height as "… überlegt") */
.opp-ind.result .vx { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; flex: none; color: #fff; background: var(--ok); }
.opp-ind.result.bad { background: color-mix(in srgb, var(--bad) 13%, transparent); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.opp-ind.result.bad .vx { background: var(--bad); }
/* the opponent's pick: corner badge, no extra space in the tile */
.ans .opp-pick { right: 10px; top: -9px; transform: none; z-index: 1; }
.ans .opp-pick .av { width: 26px; height: 26px; font-size: 10px; }
.opp-ind.result .vx { width: 30px; height: 30px; }
.opp-ind { height: 44px; box-sizing: border-box; }
.opp-ind.result.bad .ok { background: var(--bad); color: #fff; transform: scale(1); }

/* end-of-game review: all questions, filter wrong only */
.review .rv-filter { margin: 6px 0 4px; }
.review.only-wrong .rv-item.ok { display: none; }
.rv-item.ok .rv-n { background: var(--ok, #1fcf6b); color: #fff; }
.rv-item .rv-n svg { width: 16px; height: 16px; }

/* league progress bar */
.lg-bar-wrap { margin: 12px 0 4px; }
.lg-bar { position: relative; height: 14px; border-radius: 999px; background: var(--timer-track, rgba(255,255,255,.12)); overflow: visible; }
.lg-bar-fill { height: 100%; border-radius: 999px; background: var(--accent, #ffc21a); transition: width .6s ease; }
.lg-bar-fill.up { background: var(--ok, #1fcf6b); } .lg-bar-fill.down { background: var(--bad, #ff3b5c); }
.lg-mark { position: absolute; top: -5px; width: 3px; height: 24px; border-radius: 2px; transform: translateX(-50%); }
.lg-mark.up { background: var(--ok, #1fcf6b); } .lg-mark.down { background: var(--bad, #ff3b5c); }
.lg-bar-legend { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; color: var(--text-2); }
.lg-bar-legend .upl { color: var(--ok-2, #2e9e5b); } .lg-bar-legend .dn { color: var(--bad-2, #c2475a); }
.lg-bar-legend svg { width: 12px; height: 12px; vertical-align: -1px; }
.lg-bar-note { margin-top: 6px; font-weight: 700; font-size: 14px; }
.lg-bar-note.up { color: var(--ok-2, #2e9e5b); } .lg-bar-note.down { color: var(--bad-2, #c2475a); }

/* duel: progress ring between the players, points ratio bar */
.scorebar .sb-ring { position: relative; width: 46px; height: 46px; flex: none; display: grid; place-items: center; }
.scorebar .sb-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.scorebar .sb-ring circle { fill: none; stroke-width: 4; }
.scorebar .sb-ring .trk { stroke: var(--line, rgba(255,255,255,.15)); }
.scorebar .sb-ring .val { stroke: var(--accent, #ffc21a); stroke-linecap: round; transition: stroke-dasharray .4s ease; }
.scorebar .sb-n { font-size: 11px; font-weight: 800; color: var(--text-2); }
.sb-ratio { height: 6px; margin: 6px 4px 0; border-radius: 999px; overflow: hidden; background: var(--tile-b-solid, #2f7bff); }
.sb-ratio-me { height: 100%; background: var(--accent, #ffc21a); transition: width .5s ease; border-right: 2px solid var(--bg-solid, #120b3a); }
/* VS screen: league badge + record */
.vs-rec { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--text-2); }
.vs-rec .tier-badge { transform: scale(.85); }

/* recent games on the home screen */
.last-games { display: grid; gap: 8px; }
.lgm-row { display: flex; align-items: center; gap: 10px; }
.lgm-name { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lgm-name small, .lgm-score small { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); }
.lgm-score { text-align: right; font-weight: 800; }
.lgm-score small.win { color: var(--ok-2, #2e9e5b); } .lgm-score small.loss { color: var(--bad-2, #c2475a); }
/* colleagues */
.pl-row .lname .tier-badge { transform: scale(.75); transform-origin: left center; vertical-align: middle; margin-right: -10px; }
.last-games[hidden] { display: none; }
.dot-st { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3, #888); margin-right: 5px; vertical-align: 1px; }
.dot-st.on { background: var(--ok, #1fcf6b); box-shadow: 0 0 6px var(--ok, #1fcf6b); }
/* challenge banner */
.ch-banner { position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 10px); z-index: 80; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 16px; background: var(--bg-solid, #1a1240); border: 2px solid var(--accent, #ffc21a); box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: fadeIn .25s; }
.ch-banner .ch-t { flex: 1; font-weight: 800; }
.pl-row .lname small { white-space: normal; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; }

/* home, tidied: compact hero, setup line under the start button, paired tiles, one icon row */
.home .home-hero { margin: 14px 0 12px; gap: 12px; }
.home .home-hero .h1 { font-size: 24px; overflow-wrap: anywhere; min-width: 0; }
.home .home-actions { gap: 12px; }
.duel-block { display: flex; flex-direction: column; gap: 6px; }
.duel-block .action.primary { min-height: 80px; }
.setup-line-home { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px; color: var(--text); }
.setup-line-home .setup-sum { font-size: 13.5px; color: var(--text-2); min-width: 0; }
.setup-line-home .linkbtn { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; }
.home-pair { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.action.compact { min-height: 64px; padding: 10px 12px; gap: 10px; }
.action.compact .ai { width: 36px; height: 36px; border-radius: 11px; font-size: 19px; }
.action.compact .at { font-size: 15px; }
.action.compact .as { font-size: 12px; line-height: 1.25; }
.home .code-entry .input { min-height: 44px; padding: 8px 12px; font-size: 15px; }
.home .code-entry .btn { min-height: 44px; min-width: 96px; font-size: 15px; }
.home-rounds { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.home-rounds > .h3, .last-games > .h3 { font-size: 11.5px; }
.home .home-mini { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-top: 4px; }
.home .mini { min-height: 64px; padding: 10px 4px; font-size: 12px; gap: 5px; }
.home .mini .ico { font-size: 21px; }
.league-card .lc-go { display: inline-flex; align-items: center; gap: 6px; }
.league-card .lc-go small { font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.last-games { padding: 12px 14px; }
.lgm-row { gap: 10px; }
.lgm-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lgm-net { font-weight: 800; font-size: 15px; flex: none; }
.lgm-net.win { color: var(--ok-2, #2e9e5b); } .lgm-net.loss { color: var(--bad-2, #c2475a); } .lgm-net.draw { color: var(--text-2); }
.last-games .btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13.5px; flex: none; }
.home .topline .row { gap: 6px; }
.home .home-mini { grid-template-columns: repeat(3, minmax(0,1fr)); }
.home .mini { font-size: 13px; }
/* always one line: the home screen shows a short summary; anything still too long ends in … */
.setup-line-home .setup-sum { display: block; font-size: 13px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setup-line-home .setup-sum .sum-part { display: inline; }
.setup-line-home .setup-sum .sum-sep { margin: 0 6px; }
.setup-line-home .setup-sum .ico { display: inline-block; vertical-align: -3px; margin-right: 2px; }
.setup-line-home .setup-sum .lv-stars { white-space: nowrap; }
.league-card { flex-wrap: nowrap; gap: 10px; }
.league-card.has-news { flex-wrap: wrap; }
.league-card .lc-txt b, .league-card .lc-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.league-card .lc-go { flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.home .home-hero .h1 { flex: 1; }
.home .league-card { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.league-card .lc-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.league-card .lc-top b { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.league-card .lc-pts { font-weight: 800; font-size: 15px; white-space: nowrap; }
.league-card .lc-sub { font-size: 12.5px; color: var(--text-2); font-weight: 600; line-height: 1.35; }
.league-card .lc-go { flex-direction: row; }
.nowrap { white-space: nowrap; }

/* ============================================================ palettes: three more colour schemes on the three base designs
   (html carries data-theme = base for the shapes, data-palette = the colours). Variables first, then the few
   places where the base design uses fixed colours. */
[data-palette="salbei"] { /* base klinik: light, sage green + terracotta */
  --bg: radial-gradient(900px 500px at 85% 0%, #E7EFE6 0%, transparent 60%), #F4F6F1;
  --bg-solid: #F4F6F1;
  --text: #1F2A24; --text-2: #4F5D55; --text-3: #89958E;
  --surface: #ffffff; --surface-2: #EAF1EC; --line: #E1E7E2; --line-2: #D3E2D8;
  --accent: #2F7A5B; --accent-2: #5FA382; --accent-fg: #fff;
  --primary-bg: #2F7A5B; --primary-fg: #fff; --primary-sh: 0 8px 18px -8px rgba(47,122,91,.6);
  --secondary-bg: #fff; --secondary-fg: #2F7A5B;
  --ghost-bg: #fff; --ghost-fg: #2F7A5B; --ghost-border: 1px solid #D3E2D8;
  --ok: #2E8B57; --ok-2: #2E8B57; --bad: #C0503A; --bad-2: #C0503A; --warn: #C2843B;
  --card-em: #2F7A5B;
  --tile-a: #3D7A8C; --tile-a-solid: #3D7A8C; --tile-b: #C07A4E; --tile-b-solid: #C07A4E;
  --tile-c: #8A9A3C; --tile-c-solid: #8A9A3C; --tile-d: #7D6AA8; --tile-d-solid: #7D6AA8;
  --timer-ok: linear-gradient(90deg, #2F7A5B, #5FA382); --timer-warn: linear-gradient(90deg, #C2843B, #D9A05B); --timer-danger: linear-gradient(90deg, #C0503A, #D9725C);
  --timer-label: #1F2A24;
  --wheel-1: #C07A4E; --wheel-2: #3D7A8C; --wheel-3: #5FA382; --wheel-4: #A0687A;
  --wheel-hub-fg: #2F7A5B; --pointer: #1F2A24; --pointer-edge: #1F2A24;
  --av-me-bg: #2F7A5B; --pod-1: #2F7A5B; --pod-2: #D3E2D8; --pod-2-fg: #24583F; --pod-3: #EAF1EC; --pod-3-fg: #24583F;
  --focus: 0 0 0 3px rgba(47,122,91,.35);
}
[data-palette="salbei"] .chip.cat { background: #EAF1EC; color: #24583F; }
[data-palette="salbei"] .ans .badge, [data-palette="salbei"] .action .ai { background: var(--surface-2); color: var(--accent); }
[data-palette="salbei"] .ans.sel { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(47,122,91,.12); }
[data-palette="salbei"] .ans.sel .badge, [data-palette="salbei"] .seg button.on { background: var(--accent); color: #fff; }
[data-palette="salbei"] .explain { background: #EEF3EE; border-color: #DCE7DE; }
[data-palette="salbei"] .explain .ex-h, [data-palette="salbei"] .bm-join .pin b { color: var(--accent); }
[data-palette="salbei"] .lrow.me { background: #EAF1EC; border-color: #D3E2D8; }
[data-palette="salbei"] .action.primary .ai { background: rgba(255,255,255,.18); color: #fff; }

[data-palette="nacht"] { /* base modern: navy with coral */
  --bg: radial-gradient(460px 320px at 50% -60px, rgba(255,122,102,.18), transparent 70%), radial-gradient(900px 600px at 100% 110%, #1A2350 0%, transparent 60%), #0B1226;
  --bg-solid: #0B1226;
  --text: #EEF2FF; --text-2: #9AA6C8; --text-3: #616D96;
  --surface: rgba(255,255,255,.06); --surface-2: rgba(255,255,255,.1); --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16);
  --accent: #FF7A66; --accent-2: #7C8CFF; --accent-fg: #2A0B05;
  --primary-bg: linear-gradient(180deg, #FF9480, #FF6B57); --primary-fg: #2A0B05; --primary-sh: 0 10px 30px -8px rgba(255,122,102,.6), inset 0 1px 0 rgba(255,255,255,.45);
  --ok: #4FD1A5; --ok-2: #4FD1A5; --bad: #FF5D73; --bad-2: #FF8597; --warn: #FFC857;
  --card-em: #FF7A66;
  --tile-a: #5B8CFF; --tile-a-solid: #5B8CFF; --tile-b: #FF7A66; --tile-b-solid: #FF7A66;
  --tile-c: #FFC857; --tile-c-solid: #FFC857; --tile-d: #4FD1A5; --tile-d-solid: #4FD1A5;
  --timer-ok: linear-gradient(90deg, #FF6B57, #FF9480); --timer-warn: linear-gradient(90deg, #D9A23A, #FFC857); --timer-danger: linear-gradient(90deg, #E0324A, #FF5D73);
  --timer-glow: 0 0 14px rgba(255,122,102,.55);
  --wheel-1: #FFC857; --wheel-2: #FF7A66; --wheel-2-fg: #2A0B05; --wheel-3: #7C8CFF; --wheel-4: #4FD1A5;
  --wheel-rim: #121A36; --wheel-stroke: #0B1226; --wheel-hub: #0B1226; --wheel-glow: 0 0 60px -6px rgba(255,122,102,.35);
  --pointer: #FF7A66;
  --av-me-bg: rgba(255,122,102,.16); --av-me-fg: #FF7A66;
  --pod-1: linear-gradient(180deg, rgba(255,122,102,.26), rgba(255,255,255,.02)); --pod-1-fg: #FF7A66;
  --focus: 0 0 0 3px rgba(255,122,102,.55);
}
[data-palette="nacht"] .av-me { box-shadow: inset 0 0 0 1.5px #FF7A66; }
[data-palette="nacht"] .ans.sel { border-color: rgba(255,122,102,.6); background: rgba(255,122,102,.08); }
[data-palette="nacht"] .ans.sel .badge { background: #FF7A66; color: #2A0B05; border-color: #FF7A66; }
[data-palette="nacht"] .ans.correct .badge { background: #4FD1A5; border-color: #4FD1A5; } [data-palette="nacht"] .ans.correct .end { color: #4FD1A5; }
[data-palette="nacht"] .wheel-pointer svg { filter: drop-shadow(0 0 8px rgba(255,122,102,.9)); }
[data-palette="nacht"] .final-hero .crown, [data-palette="nacht"] .pod .crown, [data-palette="nacht"] .bm-join .pin b { color: #FF7A66; }
[data-palette="nacht"] .lrow.me { background: rgba(255,122,102,.07); border-color: rgba(255,122,102,.25); }
[data-palette="nacht"] .answered-bar div { background: linear-gradient(90deg, #FF6B57, #FF9480); }

[data-palette="abendrot"] { /* base gameshow: sunset orange, pink and teal */
  --bg: radial-gradient(520px 380px at 50% 0%, #c2410c 0%, transparent 70%), radial-gradient(900px 700px at 110% 110%, #7a1450 0%, transparent 60%), linear-gradient(180deg, #3b0f3f 0%, #260a2e 60%, #1a0722 100%);
  --bg-solid: #260a2e;
  --text-2: #ffc9b0; --text-3: #c08a9a;
  --accent: #ffb347; --accent-2: #ff4f81; --accent-fg: #3a1400;
  --primary-bg: linear-gradient(180deg, #ffc46b, #ff7a1a); --primary-fg: #3a1400; --primary-sh: 0 6px 0 #a8430a, 0 0 30px rgba(255,140,40,.45);
  --secondary-bg: linear-gradient(180deg, #ff6a95, #e0245e); --secondary-sh: 0 6px 0 #8a0f3a, 0 0 26px rgba(255,79,129,.35);
  --tile-a: linear-gradient(180deg, #ff6a95, #e0245e); --tile-a-sh: #8a0f3a; --tile-a-solid: #ff4f81;
  --tile-b: linear-gradient(180deg, #3fd8ca, #1aa99c); --tile-b-sh: #0b6b62; --tile-b-solid: #2ec4b6;
  --tile-c: linear-gradient(180deg, #ffc46b, #ff9a1a); --tile-c-sh: #a8530a; --tile-c-fg: #3a1400; --tile-c-solid: #ffb347;
  --tile-d: linear-gradient(180deg, #a48bff, #7454f0); --tile-d-sh: #3f24a8; --tile-d-solid: #8a6cff;
  --wheel-1: #ffb347; --wheel-1-fg: #3a1400; --wheel-2: #ff4f81; --wheel-3: #2ec4b6; --wheel-3-fg: #04302c; --wheel-4: #8a6cff;
  --wheel-rim: #4a1240; --wheel-rim-stroke: #ffb347; --wheel-stroke: #260a2e; --wheel-hub: #ffb347; --wheel-hub-fg: #3a1400;
  --wheel-glow: 0 0 70px 10px rgba(255,79,129,.35), 0 0 120px 30px rgba(255,140,40,.25);
  --pointer: #ffb347; --timer-label: #ffb347;
  --av-me-bg: linear-gradient(180deg, #ffc46b, #ff8a1a); --av-me-fg: #3a1400;
  --card-fg: #3b0f3f; --card-sh: 0 6px 0 #f5c2b0, 0 14px 30px rgba(0,0,0,.35); --card-em: #e0245e;
  --focus: 0 0 0 3px rgba(255,179,71,.8);
}
[data-palette="abendrot"] .seg button.on { background: linear-gradient(180deg, #ff6a95, #e0245e); box-shadow: 0 3px 0 #8a0f3a; }
[data-palette="abendrot"] .explain { color: #ffe6dc; }
[data-palette="abendrot"] .bm-join, [data-palette="abendrot"] .bm-question { box-shadow: 0 .3em 0 #f5c2b0; }

/* ============================================================ the apps' own themes (core/themes/<appId>.json)
   The variables come from the server (public/appthemes.js → <style id="app-themes"> in index.html); here only the
   places where a base design uses fixed colours, once per base kind, all in terms of the variables. */
[data-apptheme] .qcard, [data-apptheme] .brand .bt { font-family: var(--font-display); }
/* light (klinik shapes) */
[data-apptheme="light"] .chip.cat { background: var(--surface-2); color: var(--accent); }
[data-apptheme="light"] .ans .badge, [data-apptheme="light"] .action .ai { background: var(--surface-2); color: var(--accent); }
[data-apptheme="light"] .ans, [data-apptheme="light"] .opp-ind, [data-apptheme="light"] .mini, [data-apptheme="light"] .input, [data-apptheme="light"] .key,
[data-apptheme="light"] .lrow, [data-apptheme="light"] .stat, [data-apptheme="light"] .best, [data-apptheme="light"] .bm-explain, [data-apptheme="light"] .bm-chart,
[data-apptheme="light"] .pchip, [data-apptheme="light"] .qbox { background: var(--surface); border-color: var(--line); }
[data-apptheme="light"] .card, [data-apptheme="light"] .action, [data-apptheme="light"] .bm-join { border-color: var(--line); }
[data-apptheme="light"] .bm-join { color: var(--text); }
[data-apptheme="light"] .ans.sel { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
[data-apptheme="light"] .ans.sel .badge, [data-apptheme="light"] .seg button.on { background: var(--accent); color: var(--accent-fg); }
[data-apptheme="light"] .ans.correct, [data-apptheme="light"] .verdict.ok, [data-apptheme="light"] .opp-ind.done .ok { background: color-mix(in srgb, var(--ok) 11%, var(--surface)); border-color: var(--ok); }
[data-apptheme="light"] .ans.wrongsel, [data-apptheme="light"] .verdict.bad { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: var(--bad); }
[data-apptheme="light"] .ans.correct .badge { background: var(--ok); color: #fff; } [data-apptheme="light"] .ans.wrongsel .badge { background: var(--bad); color: #fff; }
[data-apptheme="light"] .ans.correct .end, [data-apptheme="light"] .verdict.ok, [data-apptheme="light"] .opp-ind.done .ok { color: var(--ok); }
[data-apptheme="light"] .ans.wrongsel .end, [data-apptheme="light"] .verdict.bad { color: var(--bad); }
[data-apptheme="light"] .explain { background: var(--surface-2); border-color: var(--line); }
[data-apptheme="light"] .explain .ex-h, [data-apptheme="light"] .bm-join .pin b { color: var(--accent); }
[data-apptheme="light"] .lrow.me { background: var(--surface-2); border-color: var(--line-2); }
[data-apptheme="light"] .kind-tag { color: var(--text-2); background: var(--surface-2); }
[data-apptheme="light"] .av-ghost, [data-apptheme="light"] .av-bot { background: var(--surface-2); color: var(--text-2); border-color: var(--text-3); }
[data-apptheme="light"] .action.primary .ai { background: rgba(255,255,255,.18); color: var(--primary-fg); }
[data-apptheme="light"] .bm-grid.revealed .btile.right { box-shadow: 0 0 0 .2em var(--surface), 0 0 0 .38em var(--ok); }
/* dark (modern shapes) */
[data-apptheme="dark"] .av-me { box-shadow: inset 0 0 0 1.5px var(--accent); }
[data-apptheme="dark"] .ans.sel { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
[data-apptheme="dark"] .ans.sel .badge, [data-apptheme="dark"] .seg button.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
[data-apptheme="dark"] .ans.correct { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 60%, transparent); }
[data-apptheme="dark"] .ans.wrongsel { background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 60%, transparent); }
[data-apptheme="dark"] .ans.correct .badge { background: var(--ok); border-color: var(--ok); color: var(--bg-solid); }
[data-apptheme="dark"] .ans.wrongsel .badge { background: var(--bad); border-color: var(--bad); color: var(--bg-solid); }
[data-apptheme="dark"] .ans.correct .end { color: var(--ok); } [data-apptheme="dark"] .ans.wrongsel .end { color: var(--bad); }
[data-apptheme="dark"] .wheel-pointer svg { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 90%, transparent)); }
[data-apptheme="dark"] .final-hero .crown, [data-apptheme="dark"] .pod .crown, [data-apptheme="dark"] .bm-join .pin b { color: var(--accent); }
[data-apptheme="dark"] .lrow.me { background: color-mix(in srgb, var(--accent) 7%, transparent); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
[data-apptheme="dark"] .answered-bar div { background: var(--timer-ok); }
/* show (gameshow shapes) */
[data-apptheme="show"] .seg button.on { background: var(--seg-on); box-shadow: 0 3px 0 var(--seg-on-sh); }
[data-apptheme="show"] .explain { color: var(--text); }
[data-apptheme="show"] .bm-join, [data-apptheme="show"] .bm-question { box-shadow: 0 .3em 0 var(--card-edge); }

/* ============================================================ question of the day, streak, practice, badges */
.streak { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px 3px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-3); font-size: 14px; font-weight: 800; flex: none; }
.streak .fl { filter: grayscale(1) opacity(.55); font-size: 15px; }
.streak.on { color: #ff8a1f; background: color-mix(in srgb, #ff8a1f 16%, transparent); }
.streak.on .fl { filter: none; }
.streak.big { font-size: 24px; padding: 6px 14px 6px 10px; }
.streak.big .fl { font-size: 28px; }
.learn-row .action.compact { position: relative; }
.learn-row .action .ai { font-size: 20px; }
.action.pending::after { content: ""; position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg-solid); }
.daily-tile .daily-streak-slot { display: inline-block; vertical-align: 2px; }
.daily-tile .daily-streak-slot .streak { font-size: 12px; padding: 2px 7px 2px 5px; }
.daily-tile .daily-streak-slot .streak .fl { font-size: 12px; }
.daily-tile.pending::after { top: 9px; }
.home .mini .emo { font-size: 21px; line-height: 1; filter: saturate(1.1); }
.home .home-mini { grid-template-columns: repeat(4, minmax(0,1fr)); }
.home .mini { font-size: 12px; padding: 10px 2px; }

.daily-modal .modal, .badge-modal .modal { text-align: left; gap: 10px; width: min(480px, 100%); padding-top: 14px; }
.daily-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 46px; }
.daily .qcard { margin-top: 10px; }
.daily .answers { margin-top: 12px; }
.quiz-after { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.quiz-after:empty { display: none; }
.quiz-after .verdict { align-self: flex-start; }
.daily-after { display: flex; flex-direction: column; gap: 10px; }
.daily-after:empty { display: none; }
.daily-streak { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.daily-streak b { display: block; font-size: 16px; }
.daily-streak small { display: block; color: var(--text-2); font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.daily-streak.pop .streak { animation: verdictIn .6s cubic-bezier(.3,1.6,.5,1); }
.daily-btns { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.daily-btns .btn-primary { width: auto; min-width: 140px; }
.ok-text { color: var(--ok-2); font-weight: 700; }
.notify-ask { align-self: flex-start; }

.badge-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.badge-card .bdg-ico { font-size: 30px; line-height: 1; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.badge-card.locked .bdg-ico { filter: grayscale(1) opacity(.45); background: var(--surface-2); }
.badge-card .bdg-txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.badge-card b { font-size: 15px; }
.badge-card small { font-size: 12.5px; color: var(--text-2); font-weight: 600; line-height: 1.3; }
.badge-card.locked b { color: var(--text-2); }
.badge-card .bdg-date { color: var(--text-3); }
.bdg-bar { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.bdg-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.bdg-grid { display: grid; gap: 10px; }
@media (min-width: 640px) { .bdg-grid { grid-template-columns: 1fr 1fr; } }
.bdg-pop { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.bdg-pop .h2 { margin-right: 40px; margin-left: 40px; }
.bdg-list { display: grid; gap: 10px; text-align: left; }
.badge-card.big .bdg-ico { width: 56px; height: 56px; font-size: 36px; animation: verdictIn .6s cubic-bezier(.3,1.6,.5,1); }

.practice .pr-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 6px; font-weight: 700; color: var(--text-2); font-size: 14px; }
.practice .qmeta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.practice .qcard { margin-top: 10px; }
.practice .answers { margin-top: 12px; }
.practice .next-row { display: flex; flex-direction: column; gap: 10px; align-items: stretch; margin-top: 16px; }
.practice .next-row .btn-sm { align-self: center; }
.practice .mastered { font-weight: 800; color: var(--ok-2); }
.mk-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.mk-top { display: flex; gap: 12px; align-items: center; }
.mk-ico { font-size: 30px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); flex: none; }
.mk-card .btn-sm { align-self: flex-start; }
.weakest-go { margin-bottom: 12px; }
.wk-list { display: flex; flex-direction: column; gap: 8px; }
.wk-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.wk-ico { font-size: 20px; width: 28px; text-align: center; flex: none; }
.wk-main { flex: 1; min-width: 0; }
.wk-l { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 14px; }
.wk-l span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-main .bt { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin: 5px 0 3px; }
.wk-main .bt i { display: block; height: 100%; background: var(--c); border-radius: 4px; }
.wk-main small { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.wk-row .btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13.5px; flex: none; }
.wk-unseen { margin-top: 12px; }
.wk-unseen summary { cursor: pointer; margin-bottom: 8px; }
.weak .lrow .btn-sm { min-height: 34px; padding: 4px 10px; font-size: 13px; margin-left: 8px; }
.quiz-after .explain { margin-top: 0; }
a.btn { text-decoration: none; }
.practice .fine, .mk-card .sub { text-align: left; }
.wk-l b { white-space: nowrap; }
.practice .qmeta { flex-wrap: wrap; }
.practice .qmeta .chip.cat { max-width: 100%; }

/* topic line icons */
.wk-ico { color: var(--c); display: grid; place-items: center; }
.wk-ico .topic-ico { width: 22px; height: 22px; }

/* topic symbols: colour tokens a pack's symbols may use (topic-icons/*.svg, see core/public/topicicons.js).
   --ti-ink = the line colour (currentColor: the topic colour in lists, the readable colour on a wheel segment);
   --ti-cut = the background the symbol sits on ("cut-outs"); --ti-2 / --ti-3 = lighter tones of the ink towards
   that background; --ti-disc = a soft disc behind the symbol (frame "disc"). --ti-cut is set by the context: the
   page background by default, the card surface in light lists, the segment colour on the wheel (inline style). */
:root { --ti-cut: var(--bg-solid); }
[data-theme="klinik"] .wk-ico { --ti-cut: var(--surface); }
.topic-ico {
  --ti-ink: currentColor;
  --ti-2: color-mix(in srgb, currentColor 62%, var(--ti-cut));
  --ti-3: color-mix(in srgb, currentColor 32%, var(--ti-cut));
  --ti-disc: color-mix(in srgb, currentColor 16%, var(--ti-cut));
}

/* theme change: slow cross-fade (~2 s) */
html.theme-vt::view-transition-old(root),
html.theme-vt::view-transition-new(root) { animation-duration: 2s; animation-timing-function: ease-in-out; }
html.theme-fading, html.theme-fading *, html.theme-fading *::before, html.theme-fading *::after {
  transition: background-color 2s ease-in-out, color 2s ease-in-out, border-color 2s ease-in-out,
    fill 2s ease-in-out, stroke 2s ease-in-out, box-shadow 2s ease-in-out !important;
}
.lg-goldweeks { font-size: 13px; font-weight: 700; margin-top: 2px; opacity: .85; }

/* Morgenrapport: the create page (setup editor) is taller than the screen on a PC – it must scroll */
.stage.host-setup { overflow-y: auto; overscroll-behavior: contain; }
.stage.host-setup .host-create { flex: none; }

/* ask for notifications (once after sign-in) */
.push-ask { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.push-ask .pa-ico { font-size: 44px; line-height: 1; }
.push-ask .pa-list { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 6px; text-align: left; font-weight: 600; }
.push-ask .pa-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }

/* duel reveal: "Weiter" right under the answers; after the first "Weiter" a 10 s clock runs down on both screens */
.next-row { display: grid; grid-template-columns: 1fr; align-items: center; gap: 6px 10px; margin-top: 14px; }
.next-row:has(.next-clock:not([hidden])) { grid-template-columns: 52px 1fr; }
.next-row .next-wait { grid-column: 1 / -1; }
.next-clock { position: relative; width: 52px; height: 52px; }
.next-clock svg { width: 100%; height: 100%; display: block; }
.next-clock circle { fill: none; stroke-width: 5; }
.next-clock .nc-track { stroke: var(--timer-track, rgba(0,0,0,.1)); }
.next-clock .nc-fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .1s linear, stroke .3s; }
.next-clock.low .nc-fill { stroke: var(--bad); }
.next-clock .nc-s { position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; }
.next-clock.low .nc-s { color: var(--bad); }

/* popups: never under the notch / status bar (installed app), the X always reachable at the top */
.modal-back { padding: calc(env(safe-area-inset-top, 0px) + 12px) calc(env(safe-area-inset-right, 0px) + 12px) calc(env(safe-area-inset-bottom, 0px) + 12px) calc(env(safe-area-inset-left, 0px) + 12px); }
.modal { max-height: calc(100vh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
.modal > .modal-x { position: sticky; top: 0; align-self: flex-end; z-index: 3; margin: -4px -4px -44px 0; flex: none; }
/* challenge banner: at the bottom, so that it never covers the X / back button at the top */
.ch-banner { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); max-width: 456px; margin: 0 auto; }
.ch-banner .ch-t small { display: block; font-size: 12px; font-weight: 600; opacity: .8; margin-top: 2px; }
/* the slow 2-minute ring before anyone pressed "Weiter": quiet, no number */
.next-clock.slow { width: 36px; height: 36px; justify-self: center; opacity: .7; }
.next-clock.slow .nc-fill { stroke: var(--text-3); transition: stroke-dashoffset 1s linear; }
.next-row:has(.next-clock.slow:not([hidden])) { grid-template-columns: 36px 1fr; }
/* Morgenrapport, topic by wheel or vote: only the modes and the number of questions matter, topics / difficulty are hidden */
.ed-slot.src-new .se-sec:not(:first-child) { display: none; }
.host-create .src-note { margin-top: -.4em; }
/* setup: number of questions in Classic */
.se-cq { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.se-cq[hidden] { display: none; }
.se-cq-l { font-weight: 700; font-size: 14px; }
.se-cq-seg button { min-width: 42px; }

/* ---------------------------------------------------------------- profile & account */
.profile .pf-av { display: flex; gap: 16px; align-items: center; }
.pf-av-img { width: 84px; height: 84px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; }
.pf-av-txt { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.pf-av-txt .h2 { overflow-wrap: anywhere; }
.row-form { display: flex; gap: 8px; align-items: center; margin: 8px 0 4px; }
.row-form .input { flex: 1; min-width: 0; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.chip.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.setting-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.setting-link small { flex: 1; color: var(--text-2); }
.hero-av { display: block; border-radius: 50%; text-decoration: none; flex: none; }
.hero-av svg { width: 56px; height: 56px; display: block; border-radius: 50%; }
.msg-btn { position: relative; font-size: 18px; text-decoration: none; }
.msg-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; }
.msg-btn .msg-dot { position: absolute; top: -4px; right: -4px; }
.msg-dot[hidden] { display: none; }
.avatar-screen .av-foot { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg-solid) 35%); }
.avatar-screen .av-foot .btn { width: 100%; }

/* ---------------------------------------------------------------- messages */
.msg-av { display: inline-grid; flex: none; }
.msg-row { text-decoration: none; color: inherit; }
.msg-row.unread .lname { font-weight: 800; }
.msg-row .lpts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.msg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.msg-head b { flex: 1; font-size: 18px; }
.msg-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.msg { display: flex; flex-direction: column; max-width: 82%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; }
.msg-b { padding: 9px 13px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; line-height: 1.35; }
.msg.mine .msg-b { background: var(--accent); color: var(--accent-fg); border-color: transparent; border-bottom-right-radius: 5px; }
.msg.theirs .msg-b { border-bottom-left-radius: 5px; }
.msg small { font-size: 11px; color: var(--text-3); margin: 2px 4px 0; }
.msg-compose { display: flex; flex-direction: column; gap: 8px; }
.msg-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-quick .chip { cursor: pointer; border: 1px solid var(--line); }
.msg-form { display: flex; gap: 8px; }
.msg-form .input { flex: 1; min-width: 0; }
.final-msg .h3 { margin-bottom: 8px; }
.final-msg-sent { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.msg-banner .ch-t small { display: block; font-weight: 600; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
/* avatars drawn by public/avatars.js (instead of initials) */
.av.av-img { background: none !important; padding: 0; overflow: visible; border: 0; box-shadow: none; }
.av.av-img > svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
/* message centre: tabs, news, polls */
.mc-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.mc-new { width: 100%; }
.news-card { margin-bottom: 12px; }
.news-card.unread { border-color: var(--accent); }
.news-h { display: flex; align-items: baseline; gap: 8px; }
.news-h b { flex: 1; font-size: 16px; }
.news-h small { color: var(--text-3); font-size: 12px; }
.news-b { margin: 8px 0 0; line-height: 1.45; }
.poll { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.poll-opt { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; background: var(--surface); }
.poll-opt:has(input:checked) { border-color: var(--accent); }
.poll-res { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); overflow: hidden; }
.poll-res span, .poll-res b { position: relative; }
.poll-res.mine { outline: 2px solid var(--accent); }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 28%, transparent); transition: width .6s ease; }
textarea.input { font-family: inherit; resize: vertical; }
/* drawn avatars and initials share the .av sizes, so rows line up whoever has an avatar */
.hero-av .av { width: 60px; height: 60px; font-size: 21px; }
.pf-av-img .av { width: 84px; height: 84px; font-size: 28px; }

/* "X sucht ein Duell": text and close on the first line, the three answers below */
.srch-banner { flex-wrap: wrap; }
.srch-banner .srch-acts { display: flex; gap: 6px; width: 100%; }
.srch-banner .srch-acts .btn { flex: 1; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
.answer-card { display: flex; flex-direction: column; gap: 10px; text-align: center; margin-top: 12vh; }
.answer-ic { font-size: 44px; line-height: 1; }
.streak-off { filter: grayscale(1); opacity: .55; }
.nudge-btn[hidden] { display: none; }
.auto-btn { display: inline-flex; align-items: center; gap: .5em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.auto-btn.paused { border-color: var(--accent); color: var(--accent); }
.auto-slot:empty { display: none; }
.flag-row { gap: 8px; align-items: center; }
.thumb-btn { padding-left: 10px; padding-right: 10px; }
.thumb-btn[aria-pressed="true"] { color: var(--bad, #c0392b); border-color: currentColor; }
.thumb-btn[aria-pressed="true"] svg path { fill: color-mix(in srgb, currentColor 22%, transparent); }
.thumb-why { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 10px; animation: fadeIn .2s; }
.thumb-why .tw-l { width: 100%; text-align: center; font-size: 13px; font-weight: 700; color: var(--text-2); }
.tw-chip { cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 700; padding: 8px 12px; border-radius: 999px; min-height: 36px; }
.tw-chip[aria-pressed="true"] { background: var(--bad, #c0392b); border-color: transparent; color: #fff; }
.chance-line { text-align: center; font-weight: 800; font-size: 14px; color: var(--text-2); margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.chance-line[hidden] { display: none; }
.chance-line.hot { color: var(--bad, #c0392b); }

/* reveal: who was right – two halves (me | opponent), green / red / grey, with the points of this question */
.res-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.res-strip .rs-half:only-child { grid-column: 1 / -1; }
.rs-half { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 50px; padding: 6px 10px 6px 6px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); animation: verdictIn .4s cubic-bezier(.3,1.5,.5,1); }
.rs-half .av { flex: none; }
.rs-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.15; }
.rs-n { font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-v { display: flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 800; white-space: nowrap; min-width: 0; }
.rs-v span { overflow: hidden; text-overflow: ellipsis; }
.rs-v svg { width: 16px; height: 16px; flex: none; }
.rs-p { font-weight: 800; font-size: 15px; flex: none; color: var(--text-3); }
.rs-half.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 18%, var(--surface)); }
.rs-half.ok .rs-v, .rs-half.ok .rs-p { color: color-mix(in srgb, var(--ok) 70%, var(--text)); }
.rs-half.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, var(--surface)); }
.rs-half.bad .rs-v { color: color-mix(in srgb, var(--bad) 75%, var(--text)); }
.rs-half.none { opacity: .75; }
/* my own pick: the badge on the left corner of the tile, the opponent's on the right corner */
.ans .opp-pick.me-pick { right: auto; left: 10px; }
/* Blitz: the stamp over the answers */
.q-stamp { position: fixed; left: 50%; top: 66%; transform: translate(-50%, -50%); z-index: 60; display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 20px; font-size: 22px; color: #fff; box-shadow: 0 14px 40px rgba(0,0,0,.35); animation: stampIn .28s cubic-bezier(.3,1.6,.5,1); pointer-events: none; white-space: nowrap; }
.q-stamp.ok { background: #1e9e5a; } .q-stamp.bad { background: #cf3f4f; } .q-stamp.none { background: #6b7280; }
.q-stamp .qs-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.22); font-weight: 800; }
.q-stamp .qs-ic svg { width: 20px; height: 20px; }
@keyframes stampIn { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .q-stamp, .rs-half { animation: none; } }
.answers.revealed .ans.oppwrong { border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 6%, var(--surface)); }

/* ---------------------------------------------------------------- beta: pictures enlarge in place */
.qimg-full { display: none; }
html.beta .qimg { position: relative; }
html.beta .qimg > .qimg-full { display: grid; place-items: center; position: absolute; top: 6px; right: 6px; z-index: 3; width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(20,24,40,.62); color: #fff; cursor: pointer; }
html.beta .qimg-box { cursor: zoom-in; }
html.beta .qimg-box .qimg-in { position: relative; width: 100%; height: 100%; }
html.beta .qimg-box.zoomed { overflow: auto; cursor: zoom-out; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
html.beta .qimg-box.zoomed .qimg-in { width: 260%; height: 260%; }
html.beta .zoom-modal .qimg-box { max-height: calc(100dvh - 90px); }
/* beta: the page itself does not zoom */
html.beta, html.beta body { touch-action: pan-x pan-y; }
/* beta: a picture question fits on one phone screen – smaller picture, tighter question and answers */
html.beta body.has-qimg main.screen .qimg { margin-top: 6px; gap: 2px; }
html.beta body.has-qimg main.screen .qimg-box { max-height: 24dvh; }
html.beta body.has-qimg main.screen .qimg-credit { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
html.beta body.has-qimg main.screen .qmeta { margin-top: 6px !important; }
html.beta body.has-qimg main.screen .qcard { font-size: 16px; line-height: 1.25; margin-top: 6px; padding-top: 0; padding-bottom: 0; }
html.beta body.has-qimg main.screen .opp-ind { margin-top: 6px; min-height: 34px; padding-top: 2px; padding-bottom: 2px; font-size: 13px; }
html.beta body.has-qimg main.screen .res-strip { margin-top: 6px; }
html.beta body.has-qimg main.screen .rs-half { min-height: 42px; padding-top: 3px; padding-bottom: 3px; }
html.beta body.has-qimg main.screen .ans-wrap, html.beta body.has-qimg main.screen .quiz-ans { margin-top: 8px; }
html.beta body.has-qimg main.screen .answers { gap: 6px; }
html.beta body.has-qimg main.screen .ans { min-height: 44px; padding-top: 5px; padding-bottom: 5px; font-size: 14.5px; line-height: 1.2; }
html.beta body.has-qimg main.screen .next-row { margin-top: 8px; }
html.beta body.has-qimg main.screen .next-btn { min-height: 46px; }
/* restart notice: on top of everything, also during a game */
.restart-banner { position: fixed; left: 10px; right: 10px; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 200; max-width: 460px; margin: 0 auto; padding: 10px 14px; border-radius: 14px; background: #1b1f3a; color: #fff; font-weight: 800; font-size: 14px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- beta: slim home + bottom bar */
.home-beta .home-pair:not(.learn-row), .home-beta > .home-actions > .code-entry, .home-beta .home-rounds, .home-beta .home-mini, .home-beta .home-hero .iconbtn, .home-beta .tagline-x { display: none; }
.home-beta .mr-big .home-pair { display: grid !important; }
.home-beta .learn-row { grid-template-columns: 1fr; gap: 12px; }
.home-beta .learn-row .action.compact { min-height: 76px; padding: 14px 16px; }
.home-beta .learn-row .action.compact .at { font-size: 18px; }
.home-beta .mr-line { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r); border: 1px dashed var(--line); font-weight: 700; color: var(--text-2); }
.home-beta .mr-line span { flex: 1; }
.home-beta .mr-big .h3 { margin-bottom: 8px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); background: var(--bg-solid); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; text-decoration: none; color: var(--text-3); font-size: 11.5px; font-weight: 700; }
.tabbar a.on { color: var(--accent); }
.tabbar .tb-ic { position: relative; display: grid; place-items: center; height: 26px; }
.tabbar .msg-dot { position: absolute; top: -4px; right: -12px; }
body.has-tabbar .screen { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
body.has-tabbar .ch-banner { bottom: calc(env(safe-area-inset-bottom, 0px) + 78px); }
.more-group { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.more-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.more-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--accent); flex: none; font-size: 18px; }
.more-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.more-t small { color: var(--text-2); font-size: 12.5px; }
.more-go { color: var(--text-3); }
.fam-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; flex: none; color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.fam-modal .modal { max-width: 460px; }
.fam-modal .more-group { text-align: left; }
.fam-modal .more-group:first-of-type { margin-top: 10px; }
.fam-soon { opacity: .62; }
.fam-soon-tag { font-size: 12px; font-weight: 700; color: var(--text-3); border: 1px solid var(--line-2, var(--line)); border-radius: 999px; padding: 2px 9px; }
.lp-target { cursor: pointer; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; border-radius: 10px; }
.lp-target:focus-visible { outline: none; box-shadow: var(--focus); }
.lp-target.lp-on { transform: scale(.97); transition: transform .5s ease; }

/* beta feedback 26.11.: the bottom bar stands out more; taps answer at once; the title is centred, no badge */
.tabbar { background: var(--surface); border-top: 0; box-shadow: 0 -8px 26px rgba(0,0,0,.16); border-radius: 20px 20px 0 0; padding-top: 8px; }
.tabbar a { -webkit-tap-highlight-color: transparent; transition: background .12s, color .12s, transform .08s; }
.tabbar a.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.tabbar a:active { transform: scale(.94); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.home-beta .topline { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
.home-beta .topline .brand { grid-column: 2; justify-content: center; }
.home-beta .topline .logo-badge, .home-beta .topline .lang-toggle, .home-beta .topline .seg { display: none; }
.home-beta .topline .brand .bt { font-size: 30px; letter-spacing: -.01em; }
.home-beta .topline .row { grid-column: 3; justify-content: flex-end; }

/* bottom bar with five places; site statistics */
.tabbar { grid-template-columns: repeat(5, 1fr); padding-left: 4px; padding-right: 4px; }
.tabbar a { font-size: 10.5px; }
.ss-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.ss-grid.two { grid-template-columns: repeat(2, 1fr); }
.ss-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: var(--r-sm); background: var(--surface-2); text-align: center; }
.ss-tile b { font-size: 22px; font-weight: 900; }
.ss-tile span { font-size: 12px; color: var(--text-2); font-weight: 700; }
.ss-seg { margin-top: 8px; }
.ss-seg button { font-size: 12.5px; padding-left: 4px; padding-right: 4px; }
.ss-bars { display: flex; align-items: flex-end; gap: 2px; height: 110px; margin-top: 12px; padding-bottom: 1px; border-bottom: 1px solid var(--line); }
.ss-bars.hours { height: 70px; }
.ss-bar { flex: 1; min-width: 0; background: var(--accent); border-radius: 3px 3px 0 0; }
.ss-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.ss-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ss-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ss-row > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-cbar { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.ss-cbar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.ss-map { margin: 10px 0; }
.ss-map svg { width: 100%; height: auto; display: block; }
.ss-map svg path, .ss-map svg polygon { fill: color-mix(in srgb, var(--text-3) 30%, var(--surface-2)); stroke: var(--surface); stroke-width: .5; }
/* the restart notice sits at the bottom like the other banners: right under the iPhone status bar the system blurs what lies there */
.restart-banner { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); }
body.has-tabbar .restart-banner { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); }
/* beta, installed app on the iPhone: a solid strip behind the status bar (clock, battery) and a little more room
   below it – the system blurs whatever lies in that zone, so nothing of the app may lie there */
@media (display-mode: standalone) {
  html.beta body::after { content: ""; position: fixed; top: 0; left: 0; right: 0; height: calc(env(safe-area-inset-top, 0px) + 8px); background: var(--bg-solid); z-index: 190; pointer-events: none; }
  html.beta .screen { padding-top: calc(env(safe-area-inset-top, 0px) + 20px); }
  html.beta .modal-back { padding-top: calc(env(safe-area-inset-top, 0px) + 22px); }
  html.beta #netbar { padding-top: calc(env(safe-area-inset-top, 0px) + 10px); z-index: 195; }
}
/* the bottom bar is fully opaque in every theme (--surface is see-through in the dark themes) */
.tabbar { background: color-mix(in srgb, var(--bg-solid) 90%, #fff); border-top: 1px solid color-mix(in srgb, var(--text) 14%, transparent); box-shadow: 0 -10px 28px rgba(0,0,0,.28); }
/* five tabs: the long label "Einstellungen" keeps clear of the edge */
.tabbar { padding-left: 8px; padding-right: 8px; }
.tabbar a { font-size: 10px; letter-spacing: -.01em; min-width: 0; }
.tabbar a > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* popups (question of the day, explanation, pictures) lie over the bottom bar and use the whole height */
.modal-back { z-index: 74; }

/* beta 26.11.: tier badge on the avatar, zone arrow with countdown, big league countdown, livelier title */
.home-beta .league-card { display: none !important; }
.home-beta .hero-av { position: relative; display: inline-block; }
.hero-tier { --tc: #b9773d; --tc2: #e9a96b; position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--tc2), var(--tc)); border: 2px solid var(--bg-solid); color: rgba(255,255,255,.92); font-size: 15px; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.hero-tier.silver { --tc: #9aa3ad; --tc2: #e6ebf0; color: #3c4650; }
.hero-tier.gold { --tc: #e0a800; --tc2: #ffe27a; color: #6b4a00; }
.hero-zone { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 14px; white-space: nowrap; }
.hero-zone.up { color: #0f7a43; background: color-mix(in srgb, var(--ok) 20%, var(--bg-solid)); }
.hero-zone.down { color: #b3261e; background: color-mix(in srgb, var(--bad) 18%, var(--bg-solid)); }
.home-beta .home-hero { gap: 12px; }
.home-beta .home-hero .h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-cd { margin: 14px 0; padding: 14px 10px 12px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-align: center; }
.lg-cd-t { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin-bottom: 8px; }
.lg-cd-n { display: flex; justify-content: center; align-items: flex-start; gap: 6px; }
.lg-cd-n span { display: flex; flex-direction: column; align-items: center; min-width: 58px; }
.lg-cd-n b { font-size: 38px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.lg-cd-n small { font-size: 11px; font-weight: 700; color: var(--text-2); margin-top: 4px; }
.lg-cd-n i { font-style: normal; font-size: 30px; font-weight: 900; line-height: 1.15; color: var(--text-3); }
.lg-cd.hot { border-color: var(--bad); }
.lg-cd.hot b { color: var(--bad); }
.home-beta .topline .brand .bt { font-size: 34px; font-weight: 900; font-style: italic; letter-spacing: -.02em; padding: 0 6px;
  background: linear-gradient(100deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, #ffd24a) 45%, #fff 50%, color-mix(in srgb, var(--accent) 55%, #ffd24a) 55%, var(--accent) 100%);
  background-size: 260% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.14)); animation: titleShine 5.5s ease-in-out infinite; }
@keyframes titleShine { 0%, 62% { background-position: 100% 0; } 82%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .home-beta .topline .brand .bt { animation: none; } }
.hero-tier svg, .hero-tier .ico { width: 16px; height: 16px; font-size: 16px; display: block; }
.hero-zone svg, .hero-zone .ico { width: 14px; height: 14px; }

/* beta home, afternoon of 26.11.: title across the whole width, greeting line, colleagues row, sound button bottom right */
.home-beta .topline { display: block; margin-bottom: 4px; min-height: 0; }
.home-beta .topline .brand { justify-content: center; }
.home-beta .topline .brand .bt { font-size: clamp(44px, 17vw, 82px); line-height: 1.05; padding: 0 4px; white-space: nowrap; }
.home-beta .topline .row { display: none; }
.home-beta .home-hero .h1 { font-size: clamp(19px, 5.6vw, 26px); white-space: normal; line-height: 1.15; overflow: visible; }
.home-colleagues { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.home-colleagues.live { border-color: var(--ok); }
.hc-faces { display: flex; flex: none; }
.hc-faces > span { margin-left: -10px; position: relative; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg-solid); }
.hc-faces > span:first-child { margin-left: 0; }
.hc-faces > span.off { opacity: .45; filter: grayscale(.6); }
.hc-faces > span.on::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg-solid); }
.hc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hc-t b { font-size: 15px; }
.hc-t small { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-go { color: var(--text-3); }
.mute-float { position: fixed; right: 14px; bottom: calc(env(safe-area-inset-bottom, 0px) + 86px); z-index: 65; width: 44px; height: 44px; box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.av.av-img > img { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; }

/* photo avatar editor (beta) */
.av-mode { margin-bottom: 14px; }
.ph-ed { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.ph-stage { position: relative; width: 220px; height: 220px; margin: 0 auto; border-radius: 50%; overflow: hidden; background: var(--surface-2); box-shadow: 0 10px 28px rgba(0,0,0,.22); }
.ph-canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.ph-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; pointer-events: none; }
.ph-empty[hidden] { display: none; }
.ph-pick { align-self: center; cursor: pointer; }
.ph-tools { display: flex; flex-direction: column; gap: 8px; }
.ph-tools[hidden] { display: none; }
.ph-hint { margin: 0; }
.ph-row { display: flex; align-items: center; gap: 10px; }
.ph-row input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }
.ph-l { font-weight: 800; font-size: 14px; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-chips .tw-chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg, #fff); }
.ph-ring { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; font-weight: 800; color: var(--text-2); }
.ph-ring.none { background: var(--surface-2); }
.ph-ring[aria-pressed="true"] { border-color: var(--text); }
.home-beta > .fine.mt-l { display: none; }
/* the shine in the title: one slow pass, then a long rest (the quick version felt hectic) */
.home-beta .topline .brand .bt { animation: titleShineSlow 18s ease-in-out infinite; }
@keyframes titleShineSlow { 0%, 20% { background-position: 100% 0; } 70%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .home-beta .topline .brand .bt { animation: none; } }

/* title: a calm gradient that stands still, with a slow sparkle (stars fading in and out) */
.home-beta .topline .brand { position: relative; }
.home-beta .topline .brand .bt { animation: none; background: linear-gradient(100deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #ffd24a) 55%, var(--accent)); background-size: 100% 100%; -webkit-background-clip: text; background-clip: text; }
.home-beta .spk { position: absolute; font-style: normal; color: #ffd24a; text-shadow: 0 0 8px rgba(255,210,74,.9); opacity: 0; pointer-events: none; animation: sparkle 7s ease-in-out infinite; }
.home-beta .spk.s1 { left: 9%; top: 4%; font-size: 20px; animation-delay: .5s; }
.home-beta .spk.s2 { left: 44%; top: -6%; font-size: 14px; animation-delay: 2.6s; animation-duration: 9s; }
.home-beta .spk.s3 { left: 72%; top: 58%; font-size: 18px; animation-delay: 4.4s; animation-duration: 8s; }
.home-beta .spk.s4 { left: 91%; top: 6%; font-size: 16px; animation-delay: 6s; animation-duration: 10s; }
@keyframes sparkle { 0%, 55%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); } 70% { opacity: 1; transform: scale(1.15) rotate(20deg); } 85% { opacity: .35; transform: scale(.8) rotate(35deg); } }
@media (prefers-reduced-motion: reduce) { .home-beta .spk { animation: none; opacity: .7; } }

/* trial: three places for "Duell starten" on the beta home (data-dp on main) */
.home-beta[data-dp="a"] .duel-block { position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 72px); z-index: 66; padding: 14px 18px 8px; max-width: 520px; margin: 0 auto; background: linear-gradient(transparent, var(--bg-solid) 22%); }
.home-beta[data-dp="a"] .duel-block .action.primary { min-height: 66px; box-shadow: 0 8px 22px rgba(0,0,0,.2); }
.home-beta[data-dp="a"] { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 230px) !important; }
.home-beta[data-dp="a"] .mute-float { bottom: calc(env(safe-area-inset-bottom, 0px) + 214px); }
.home-beta[data-dp="a"] .learn-row { order: 1; } .home-beta[data-dp="a"] .mr-line, .home-beta[data-dp="a"] .mr-big { order: 2; } .home-beta[data-dp="a"] .home-colleagues { order: 3; }
.home-beta[data-dp="b"] .learn-row { order: 1; } .home-beta[data-dp="b"] .duel-block { order: 2; } .home-beta[data-dp="b"] .home-colleagues { order: 3; } .home-beta[data-dp="b"] .mr-line, .home-beta[data-dp="b"] .mr-big { order: 4; }
.home-beta[data-dp="c"] .duel-block .action.primary { display: none; }
.home-beta[data-dp="c"] .learn-row { order: 1; } .home-beta[data-dp="c"] .home-colleagues { order: 2; } .home-beta[data-dp="c"] .mr-line, .home-beta[data-dp="c"] .mr-big { order: 3; } .home-beta[data-dp="c"] .duel-block { order: 4; }
.tabbar.with-fab { grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: end; }
.tab-fab { justify-self: center; width: 68px; height: 68px; margin-top: -30px; border-radius: 50%; border: 4px solid var(--bg-solid); background: var(--primary-bg, var(--accent)); color: var(--primary-fg, #fff); display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,.3); }
.tab-fab:active { transform: scale(.94); }
.dp-seg button { font-size: 12.5px; padding-left: 4px; padding-right: 4px; }

/* trial 'd': round duel button floating above the bottom bar, on every main screen */
.duel-float { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); z-index: 68; width: 78px; height: 78px; border-radius: 50%; border: 4px solid var(--bg-solid); background: var(--primary-bg, var(--accent)); color: var(--primary-fg, #fff); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; cursor: pointer; box-shadow: 0 10px 26px rgba(0,0,0,.32); font: inherit; font-weight: 800; font-size: 12px; -webkit-tap-highlight-color: transparent; }
.duel-float:active { transform: translateX(-50%) scale(.94); }
.duel-float svg { width: 30px; height: 30px; }
.home-beta[data-dp="d"] .duel-block .action.primary { display: none; }
.home-beta[data-dp="d"] .learn-row { order: 1; } .home-beta[data-dp="d"] .home-colleagues { order: 2; } .home-beta[data-dp="d"] .mr-line, .home-beta[data-dp="d"] .mr-big { order: 3; } .home-beta[data-dp="d"] .duel-block { order: 4; }
body.has-tabbar:has(.duel-float) .screen { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 176px); }
.dp-seg { flex-wrap: wrap; }

/* trial 'e': the duel button docked in the bar, about three quarters of it above the edge */
.tabbar.with-dock { grid-template-columns: 1fr 1fr 86px 1fr 1fr 1fr; overflow: visible; }
.tab-dock-slot { position: relative; }
.tab-dock { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); width: 82px; height: 82px; border-radius: 50%; border: 6px solid color-mix(in srgb, var(--bg-solid) 90%, #fff); background: var(--primary-bg, var(--accent)); color: var(--primary-fg, #fff); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font: inherit; font-weight: 800; font-size: 12px; box-shadow: 0 -6px 16px rgba(0,0,0,.18); -webkit-tap-highlight-color: transparent; }
.tab-dock:active { transform: translateX(-50%) scale(.95); }
.tabbar.with-dock a { font-size: 9.5px; }
.home-beta[data-dp="e"] .duel-block .action.primary { display: none; }
.home-beta[data-dp="e"] .learn-row { order: 1; } .home-beta[data-dp="e"] .home-colleagues { order: 2; } .home-beta[data-dp="e"] .mr-line, .home-beta[data-dp="e"] .mr-big { order: 3; } .home-beta[data-dp="e"] .duel-block { order: 4; }
body.has-tabbar:has(.tab-dock) .screen { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 122px); }
body.has-tabbar:has(.tab-dock) .mute-float { bottom: calc(env(safe-area-inset-bottom, 0px) + 112px); }
.tabbar.with-dock { grid-template-columns: 1fr 1fr 78px 1fr 1fr 1fr; padding-left: 2px; padding-right: 2px; }
.tabbar.with-dock a { font-size: 8.8px; letter-spacing: -.03em; padding-left: 0; padding-right: 0; }
.tabbar.with-dock a > span:last-child { overflow: visible; text-overflow: clip; }

/* ================================================================ beta home, design D (26.11.2026) */
.home-beta .home-hero, .home-beta .home-actions > :not(.duel-block), .home-beta .duel-block .action.primary, .home-beta > .fine { display: none !important; }
.home-beta .home-actions { margin-top: auto; }
.home-beta .setup-line-home { justify-content: center; gap: 14px; }
.home-beta .setup-line-home .setup-sum { flex: 0 1 auto; }
.home-beta .topline { display: block; min-height: 0; margin: 0; padding: 22px 0 26px; }  /* the title stands alone: room above and below */
.home-beta .topline .brand { position: relative; justify-content: center; }
.pc { display: flex; flex-direction: column; align-items: center; }
.pc-hero { position: relative; width: 208px; height: 208px; display: block; }
.pc-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pc-ring circle { fill: none; stroke-width: 11; }
.pc-ring-bg { stroke: var(--line); }
.pc-ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.pc-ring-fg.down { stroke: var(--bad); }
.pc-av { position: absolute; inset: 17px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(0,0,0,.22); }
.pc-av .av { width: 100% !important; height: 100% !important; font-size: 58px !important; }
.pc-tier { --tc: #b9773d; --tc2: #e9a96b; position: absolute; left: 50%; bottom: -11px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; background: linear-gradient(180deg, var(--tc2), var(--tc)); color: #3a2208; font-weight: 900; font-size: 13px; border: 3px solid var(--bg-solid); white-space: nowrap; }
.pc-tier svg, .pc-tier .ico { width: 15px; height: 15px; font-size: 15px; }
.pc-tier { color: #1c1408; }
.pc-streak { position: absolute; right: -6px; top: 4px; background: var(--bg-solid); border: 2px solid var(--line); border-radius: 999px; padding: 4px 10px; font-weight: 900; font-size: 14px; color: var(--text); box-shadow: 0 4px 10px rgba(0,0,0,.14); }
.pc-streak[hidden] { display: none; }
.pc-hello { text-align: center; font-size: clamp(21px, 6.2vw, 26px); font-weight: 900; letter-spacing: -.3px; margin: 28px 0 0; line-height: 1.15; }
.pc-sub { display: block; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--text-2); margin-top: 6px; text-decoration: none; }
.pc-sub .up { color: var(--ok); } .pc-sub .down { color: var(--bad); }
.pc-arc { display: flex; justify-content: space-between; align-self: stretch; margin-top: 24px; }
.pc-arc .pc-rb:nth-child(2), .pc-arc .pc-rb:nth-child(3) { margin-top: 22px; }
.pc-rb { flex: 1; min-width: 0; background: none; border: 0; padding: 0; font: inherit; color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; -webkit-tap-highlight-color: transparent; }
.pc-rb b { font-size: 12.5px; margin-top: 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-rb small { font-size: 11.5px; font-weight: 700; color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-rc { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-solid); color: var(--accent); border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line), 0 10px 16px rgba(0,0,0,.12); transition: transform .08s, box-shadow .08s; }
.pc-rb:active .pc-rc { transform: translateY(4px); box-shadow: 0 1px 0 var(--line), 0 4px 8px rgba(0,0,0,.12); }
.pc-dot { position: absolute; right: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #e5484d; border: 2.5px solid var(--bg-solid); }
.pc-dot[hidden] { display: none; }
.home-beta .mute-float { bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); }
/* duel button on a hill on top of the bar */
.tabbar { overflow: visible; }
.tab-hill { position: absolute; left: 50%; top: -34px; transform: translateX(-50%); width: 124px; height: 62px; border-radius: 62px 62px 0 0; background: color-mix(in srgb, var(--bg-solid) 90%, #fff); border: 1px solid color-mix(in srgb, var(--text) 14%, transparent); border-bottom: 0; box-shadow: 0 -8px 16px rgba(0,0,0,.1); z-index: -1; }
.tab-duel { position: absolute; left: 50%; top: -78px; transform: translateX(-50%); width: 86px; height: 86px; border-radius: 50%; border: 0; background: var(--primary-bg, var(--accent)); color: var(--primary-fg, #fff); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font: inherit; font-weight: 900; font-size: 12px; box-shadow: 0 6px 0 color-mix(in srgb, var(--primary-bg, var(--accent)) 60%, #000), 0 12px 20px rgba(0,0,0,.28); -webkit-tap-highlight-color: transparent; }
.tab-duel:active { transform: translateX(-50%) translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--primary-bg, var(--accent)) 60%, #000), 0 6px 12px rgba(0,0,0,.28); }
body.has-tabbar .screen { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 176px); }
body.has-tabbar .ch-banner { bottom: calc(env(safe-area-inset-bottom, 0px) + 168px); }
body.has-tabbar .restart-banner { bottom: calc(env(safe-area-inset-bottom, 0px) + 172px); }
/* ---- the title: one lettering per colour scheme (numbers = the samples the user chose from) */
.kd-title { display: inline-block; white-space: nowrap; line-height: 1; font-family: "Avenir Next", "Arial Black", system-ui, sans-serif; font-weight: 900; }
.kd-title b { font-weight: inherit; }
.home-beta .topline .brand .bt { all: unset; }
/* everywhere the layout the user liked best (Gameshow): two lines, capitals, block letters with a 3D edge –
   in two colours of the scheme (--k1 / --k2, with their darker sides) */
.kd-title { font-size: clamp(48px, 16.5vw, 72px); letter-spacing: -1px; text-transform: uppercase; line-height: .92; text-align: center;
  --k1: #2f7d5b; --k1s: #1e563e; --k1d: #123c2a; --k2: #f0a93c; --k2s: #a86a00; --k2d: #6e4500; }
.kd-title b { display: block; }
.kd-title .k1 { color: var(--k1); text-shadow: 1px 1px 0 var(--k1s), 2px 2px 0 var(--k1s), 3px 3px 0 var(--k1s), 4px 4px 0 var(--k1s), 5px 5px 0 var(--k1s), 6px 6px 0 var(--k1d), 7px 7px 0 var(--k1d), 12px 14px 14px rgba(0,0,0,.32); }
.kd-title .k2 { color: var(--k2); text-shadow: 1px 1px 0 var(--k2s), 2px 2px 0 var(--k2s), 3px 3px 0 var(--k2s), 4px 4px 0 var(--k2s), 5px 5px 0 var(--k2s), 6px 6px 0 var(--k2d), 7px 7px 0 var(--k2d), 12px 14px 14px rgba(0,0,0,.32); }
[data-theme="klinik"]:not([data-palette]) .kd-title { --k1: #1d5fb0; --k1s: #123f78; --k1d: #0b2850; --k2: #35b6c9; --k2s: #1c7d8c; --k2d: #0f525c; }
[data-theme="gameshow"]:not([data-palette]) .kd-title { --k1: #b89cff; --k1s: #5a35c8; --k1d: #2c1470; --k2: #ffc21a; --k2s: #a86a00; --k2d: #6e4500; }
[data-palette="abendrot"] .kd-title { --k1: #ff6f9c; --k1s: #b0245a; --k1d: #6e1036; --k2: #ffb86b; --k2s: #c2661a; --k2d: #7a3a08; }
[data-theme="modern"]:not([data-palette]) .kd-title { --k1: #eef2f7; --k1s: #7b8797; --k1d: #3c4552; --k2: #2ee6d6; --k2s: #12968b; --k2d: #0a5a54; }
[data-palette="nacht"] .kd-title { --k1: #7fb0ff; --k1s: #2f57b0; --k1d: #17306e; --k2: #ff7a66; --k2s: #b23a28; --k2d: #6e1d12; }
.home-beta .topline { padding: 46px 0 44px; }  /* the title stands alone */
.home-beta .spk { z-index: 2; }
.pc-rb b { font-size: 11.8px; letter-spacing: -.02em; overflow: visible; text-overflow: clip; }
.home-beta .topline { padding: 40px 0 38px; }
.pc-hero { width: 196px; height: 196px; }
.pc-hello { margin-top: 24px; }
.pc-arc { margin-top: 16px; }

/* ================================================================ Christmas theme (season; beta preview) */
[data-palette="weihnacht"] { /* base klinik; day: cream, red, fir green, a little gold */
  --bg: radial-gradient(900px 500px at 85% 0%, #FFF1DC 0%, transparent 60%), #FBF3E6;
  --bg-solid: #FBF3E6;
  --text: #2A1D16; --text-2: #6B5646; --text-3: #A08C7B;
  --surface: #ffffff; --surface-2: #F3E7D3; --line: #EADFCE; --line-2: #E0D0B8;
  --accent: #C8372F; --accent-2: #E3B53A; --accent-fg: #fff;
  --primary-bg: #C8372F; --primary-fg: #fff; --primary-sh: 0 8px 18px -8px rgba(200,55,47,.6);
  --secondary-bg: #fff; --secondary-fg: #C8372F;
  --ghost-bg: #fff; --ghost-fg: #1F7A4C; --ghost-border: 1px solid #E0D0B8;
  --ok: #1F8A52; --ok-2: #1F8A52; --bad: #B3261E; --bad-2: #B3261E; --warn: #C2843B;
  --card-em: #1F7A4C;
  --tile-a: #C8372F; --tile-a-solid: #C8372F; --tile-b: #1F7A4C; --tile-b-solid: #1F7A4C;
  --tile-c: #D9A21B; --tile-c-solid: #D9A21B; --tile-d: #3F6FB5; --tile-d-solid: #3F6FB5;
  --timer-ok: linear-gradient(90deg, #1F7A4C, #2F9D63); --timer-warn: linear-gradient(90deg, #D9A21B, #E3B53A); --timer-danger: linear-gradient(90deg, #B3261E, #D43F3F);
  --timer-label: #2A1D16;
  --wheel-1: #C8372F; --wheel-2: #1F7A4C; --wheel-3: #E3B53A; --wheel-4: #F6EAD6;
  --wheel-hub-fg: #C8372F; --pointer: #2A1D16; --pointer-edge: #2A1D16;
  --av-me-bg: #C8372F; --pod-1: #E3B53A; --pod-2: #EADFCE; --pod-2-fg: #2A1D16; --pod-3: #F3E7D3; --pod-3-fg: #2A1D16;
  --focus: 0 0 0 3px rgba(200,55,47,.35);
}
[data-palette="weihnacht"][data-xmas="night"] { /* from 17:00: fir green with gold */
  --bg: radial-gradient(900px 500px at 85% 0%, #17482F 0%, transparent 60%), #0F3324;
  --bg-solid: #0F3324;
  --text: #FDF6E9; --text-2: #C9D8CC; --text-3: #8FA898;
  --surface: #17402D; --surface-2: #1E4D38; --line: #265A43; --line-2: #2F6B50;
  --accent: #E3B53A; --accent-2: #F3D27A; --accent-fg: #2A1D08;
  --primary-bg: #D43F3F; --primary-fg: #fff; --primary-sh: 0 8px 18px -8px rgba(0,0,0,.6);
  --secondary-bg: #17402D; --secondary-fg: #F3D27A;
  --ghost-bg: #17402D; --ghost-fg: #F3D27A; --ghost-border: 1px solid #2F6B50;
  --ok: #5FD08C; --ok-2: #5FD08C; --bad: #FF7A6B; --bad-2: #FF7A6B;
  --card-em: #E3B53A; --timer-label: #FDF6E9;
  --wheel-hub-fg: #E3B53A; --pointer: #FDF6E9; --pointer-edge: #FDF6E9;
  --av-me-bg: #D43F3F; --pod-2: #265A43; --pod-2-fg: #FDF6E9; --pod-3: #1E4D38; --pod-3-fg: #FDF6E9;
}
[data-palette="weihnacht"] .ans .badge, [data-palette="weihnacht"] .action .ai { background: var(--surface-2); color: var(--accent); }
[data-palette="weihnacht"] .ans.sel { border-color: var(--accent); }
[data-palette="weihnacht"] .ans.sel .badge, [data-palette="weihnacht"] .seg button.on { background: var(--accent); color: var(--accent-fg); }
[data-palette="weihnacht"] .kd-title { --k1: #d43f3f; --k1s: #8f2020; --k1d: #5e1212; --k2: #2f9d63; --k2s: #17603a; --k2d: #0d3d24; }
[data-palette="weihnacht"][data-xmas="night"] .kd-title { --k2: #e3b53a; --k2s: #9a7410; --k2d: #5e4606; }
/* decoration */
.xmas-deco { position: fixed; left: 0; right: 0; top: 0; z-index: 58; pointer-events: none; max-width: 560px; margin: 0 auto; }
.xmas-deco svg { display: block; width: 100%; height: auto; }
.xmas-deco.full { --xh: 170px; }
.xmas-deco.slim svg { height: 40px; }
.xmas-deco .xm-holly { position: absolute; top: 2px; width: 92px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.xmas-deco .xm-holly.l { left: -6px; } .xmas-deco .xm-holly.r { right: -6px; transform: scaleX(-1); }
.xm-light { animation: xmTwinkle 2.4s ease-in-out infinite; }
.xm-tw { animation: xmTwinkle 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes xmTwinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
body.xmas .home-beta .topline { padding-top: 118px; }
body.xmas .screen { padding-top: calc(env(safe-area-inset-top, 0px) + 40px); }
body.xmas .home-beta.screen { padding-top: calc(env(safe-area-inset-top, 0px) + 10px); }
/* snow on the bottom bar */
body.xmas .tabbar::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 12px; border-radius: 12px 12px 0 0; background: radial-gradient(circle at 12px 12px, #fff 11px, transparent 12px) 0 0 / 24px 12px repeat-x; pointer-events: none; }
body.xmas .tab-duel::after { content: ""; position: absolute; left: 10px; right: 10px; top: -4px; height: 22px; border-radius: 50% 50% 46% 54% / 90% 90% 30% 30%; background: #fff; box-shadow: 0 2px 0 #dbe9f2; pointer-events: none; }
/* snowfall */
.xmas-snow { position: fixed; inset: 0; z-index: 57; pointer-events: none; overflow: hidden; }
.xmas-snow i { position: absolute; top: -24px; font-style: normal; color: #fff; text-shadow: 0 0 4px rgba(120,160,200,.9); animation: xmFall linear infinite; }
@keyframes xmFall { 0% { transform: translate(0, -5vh); } 50% { transform: translate(18px, 50vh); } 100% { transform: translate(-10px, 108vh); } }
body.xmas .home-beta .topline { padding: 100px 0 20px; }
body.xmas .home-beta .pc-hero { width: 172px; height: 172px; }
body.xmas .home-beta .pc-hello { margin-top: 20px; }
body.xmas .home-beta .pc-arc { margin-top: 12px; }
body.xmas .tab-duel::after { height: 14px; left: 14px; right: 14px; top: -3px; }

/* two sound buttons: music and effects; on the beta home they float together at the bottom right */
.mute-float { width: auto; height: auto; display: flex; flex-direction: column; gap: 8px; box-shadow: none; }
.mute-float .iconbtn { width: 44px; height: 44px; box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.music-btn { position: relative; }
.music-btn.off { opacity: .6; }
.music-btn.off::after { content: ""; position: absolute; left: 9px; right: 9px; top: 50%; height: 2.5px; background: currentColor; transform: rotate(-45deg); border-radius: 2px; }

/* ================================================================ beta home fits every screen (26.11.2026)
   No scrolling on the home screen: everything is sized from the screen height, so it fits from a small
   iPhone SE to a large phone. Sound buttons side by side. */
.home-beta.screen { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; display: flex; flex-direction: column;
  padding-top: calc(env(safe-area-inset-top, 0px) + 1.2vh) !important; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 176px) !important; }
.home-beta .topline { padding: clamp(6px, 4.4cqh, 40px) 0 clamp(6px, 3.8cqh, 38px) !important; flex: none; }
.home-beta .kd-title { font-size: min(17vw, 9cqh, 82px); }
.home-beta .pc { flex: 1 1 auto; min-height: 0; justify-content: flex-start; }
.home-beta .pc-hero { width: min(196px, 23cqh, 52vw) !important; height: min(196px, 23cqh, 52vw) !important; flex: none; }
.home-beta .pc-av { inset: 8.6%; }
.home-beta .pc-av .av { font-size: min(58px, 7cqh) !important; }
.home-beta .pc-tier { font-size: clamp(11px, 1.6cqh, 13px); padding: .35em .9em; bottom: -.8em; }
.home-beta .pc-hello { margin-top: clamp(12px, 3cqh, 26px) !important; font-size: min(6.2vw, 3.1cqh, 26px); }
.home-beta .pc-sub { font-size: clamp(11.5px, 1.65cqh, 13.5px); margin-top: .4em; }
.home-beta .pc-arc { margin-top: clamp(6px, 2cqh, 18px) !important; }
.home-beta .pc-arc .pc-rb:nth-child(2), .home-beta .pc-arc .pc-rb:nth-child(3) { margin-top: clamp(6px, 2.4cqh, 22px); }
.home-beta .pc-rc { width: min(64px, 7.6cqh); height: min(64px, 7.6cqh); }
.home-beta .pc-rc svg { width: 44%; height: 44%; }
.home-beta .pc-rb b { margin-top: .5em; font-size: clamp(10.5px, 1.45cqh, 11.8px); }
.home-beta .pc-rb small { font-size: clamp(10px, 1.35cqh, 11.5px); }
.home-beta .home-actions { flex: none; margin-top: clamp(4px, 1.4cqh, 14px); }
.home-beta .setup-line-home { padding-top: 0; padding-bottom: 0; }
/* sound buttons side by side, left of nothing: bottom right, above the bar */
.mute-float { flex-direction: row !important; gap: 8px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 92px) !important; }
.mute-float .iconbtn { width: 40px; height: 40px; }
/* the setup line keeps clear of the sound buttons and of the duel button */
.home-beta .setup-line-home { justify-content: flex-start; padding-left: 2px; padding-right: 100px; }
/* Christmas: the decoration starts below the status bar strip and takes its room from the title's top space */
.xmas-deco { top: calc(env(safe-area-inset-top, 0px) + 6px); }
body.xmas .home-beta .topline { padding-top: clamp(64px, 11.5cqh, 104px) !important; padding-bottom: clamp(4px, 2cqh, 20px) !important; }
body.xmas .home-beta .pc-hero { width: min(172px, 20cqh, 46vw) !important; height: min(172px, 20cqh, 46vw) !important; }
body.xmas .xmas-deco.full { --xh: min(170px, 19vh); }
/* pull down to refresh */
.ptr { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 6px); z-index: 210; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; background: var(--bg-solid); color: var(--accent); box-shadow: 0 6px 18px rgba(0,0,0,.25); display: grid; place-items: center; transform: translateY(-70px); pointer-events: none; }
.ptr svg { width: 22px; height: 22px; }
.ptr.go svg { animation: ptrSpin .7s linear infinite; }
@keyframes ptrSpin { to { transform: rotate(360deg); } }
.home-beta .topline { padding: clamp(4px, 3.2cqh, 40px) 0 clamp(4px, 2.6cqh, 38px) !important; }
.home-beta .kd-title { font-size: min(17vw, 7.6cqh, 82px); }
.home-beta .pc-hero { width: min(196px, 21cqh, 52vw) !important; height: min(196px, 21cqh, 52vw) !important; }
.home-beta .pc-hello { margin-top: clamp(10px, 2.6cqh, 26px) !important; font-size: min(6.2vw, 3cqh, 26px); }
.home-beta .pc-arc { margin-top: clamp(4px, 1.6cqh, 18px) !important; }
.home-beta .pc-arc .pc-rb:nth-child(2), .home-beta .pc-arc .pc-rb:nth-child(3) { margin-top: clamp(2px, 1.8cqh, 22px); }
.home-beta .pc-rc { width: min(64px, 7.2cqh); height: min(64px, 7.2cqh); }
body.xmas .home-beta .topline { padding-top: clamp(50px, 10cqh, 104px) !important; padding-bottom: clamp(2px, 1.4cqh, 20px) !important; }
body.xmas .home-beta .pc-hero { width: min(172px, 17cqh, 46vw) !important; height: min(172px, 17cqh, 46vw) !important; }
body.xmas .xmas-deco.full { --xh: min(170px, 17vh); }
body.xmas .home-beta .kd-title { font-size: min(17vw, 7cqh, 82px); }
body.xmas .xmas-deco.full { --xh: min(170px, 15.5vh); }
body.xmas .xmas-deco .xm-holly { width: min(92px, 9.5vh); }
@media (max-height: 620px) { /* very short screens: the small second lines under the round buttons go */
  .home-beta .pc-rb small { display: none; }
  .home-beta .pc-arc .pc-rb:nth-child(2), .home-beta .pc-arc .pc-rb:nth-child(3) { margin-top: 0; }
}
@media (max-height: 620px) {
  .home-beta .pc-hero { width: min(196px, 16cqh) !important; height: min(196px, 16cqh) !important; }
  body.xmas .home-beta .pc-hero { width: min(172px, 13.5cqh) !important; height: min(172px, 13.5cqh) !important; }
  .home-beta .pc-hello { margin-top: 12px !important; }
  .home-beta .pc-sub { display: none; }
  .home-beta .kd-title { font-size: min(17vw, 6.6cqh) !important; }
}

/* the bar rises in one smooth curve to carry the duel button (no separate half circle any more) */
.tab-hill { top: -45px; width: 190px; height: 46px; border: 0; border-radius: 0; background: none; box-shadow: none; z-index: 0; filter: drop-shadow(0 -7px 8px rgba(0,0,0,.1)); }
.tab-hill svg { display: block; width: 100%; height: 100%; }
.tab-hill .th-fill { fill: color-mix(in srgb, var(--bg-solid) 90%, #fff); }
.tab-hill .th-line { fill: none; stroke: color-mix(in srgb, var(--text) 14%, transparent); stroke-width: 1; }
.tab-duel { top: -82px; z-index: 1; }
.tabbar a { position: relative; z-index: 1; }
body.xmas .tabbar::before { z-index: 0; }
/* large screens: everything a little bigger, and the free height is shared out between avatar, greeting and buttons */
.home-beta .kd-title { font-size: min(18vw, 8cqh, 92px); }
.home-beta .pc-hero { width: min(240px, 24cqh, 56vw) !important; height: min(240px, 24cqh, 56vw) !important; margin-top: auto; }
.home-beta .pc-av .av { font-size: min(70px, 8cqh) !important; }
.home-beta .pc-hello { margin-top: auto !important; padding-top: clamp(10px, 2.2cqh, 22px); font-size: min(6.4vw, 3.2cqh, 29px); }
.home-beta .pc-arc { margin-top: auto !important; margin-bottom: auto; padding-top: clamp(4px, 1.4cqh, 14px); }
.home-beta .pc-rc { width: min(78px, 8cqh); height: min(78px, 8cqh); }
.home-beta .pc-rb b { font-size: clamp(10.5px, 1.5cqh, 13.5px); }
.home-beta .pc-rb small { font-size: clamp(10px, 1.4cqh, 12.5px); }
.home-beta .pc-tier { font-size: clamp(11px, 1.7cqh, 15px); }
.home-beta .pc-sub { font-size: clamp(11.5px, 1.7cqh, 15px); }
body.xmas .home-beta .pc-hero { width: min(200px, 19cqh, 50vw) !important; height: min(200px, 19cqh, 50vw) !important; }
body.xmas .home-beta .kd-title { font-size: min(17.5vw, 7.4cqh, 90px); }
@media (max-height: 620px) {
  .home-beta .pc-hero { width: min(196px, 16cqh) !important; height: min(196px, 16cqh) !important; }
  body.xmas .home-beta .pc-hero { width: min(172px, 13.5cqh) !important; height: min(172px, 13.5cqh) !important; }
  .home-beta .pc-hello { padding-top: 8px; }
  .home-beta .kd-title, body.xmas .home-beta .kd-title { font-size: min(17vw, 6.6cqh) !important; }
  .home-beta .pc-rc { width: min(64px, 7.2cqh); height: min(64px, 7.2cqh); }
}
@media (max-height: 720px) and (min-height: 621px) { /* iPhone SE and similar */
  .home-beta .pc-hero { width: min(240px, 20cqh, 56vw) !important; height: min(240px, 20cqh, 56vw) !important; }
  body.xmas .home-beta .pc-hero { width: min(200px, 16cqh, 50vw) !important; height: min(200px, 16cqh, 50vw) !important; }
  .home-beta .pc-rc { width: min(78px, 7cqh); height: min(78px, 7cqh); }
  .home-beta .pc-rb small { display: none; }
  .home-beta .pc-arc .pc-rb:nth-child(2), .home-beta .pc-arc .pc-rb:nth-child(3) { margin-top: 6px; }
}

/* The beta home is pinned to the real screen (like the bottom bar) instead of locking the page scroll: locking
   the scroll made the installed iPhone app lay the page out on a shorter screen (bar too high, empty strip below).
   All sizes inside follow the height of this box (cqh). */
.home-beta.screen { position: fixed; top: 0; bottom: 0; left: 0; right: 0; height: auto !important; width: min(100%, 560px); margin: 0 auto; container-type: size; overflow: hidden; }
/* the room for the bar and the duel button is a spacer at the end, not padding – so 1cqh stays 1 % of the screen height */
.home-beta.screen { padding-bottom: 0 !important; padding-top: env(safe-area-inset-top, 0px) !important; }
/* a real element, not ::after: the start looks of the apps paint their backgrounds into .home-beta::before/::after
   and would otherwise take the spacer away (the round buttons then slid under the bar) */
.home-dock-space { display: none; }
.home-beta.screen > .home-dock-space { display: block; flex: none; height: calc(env(safe-area-inset-bottom, 0px) + 176px); }
@media (max-height: 780px) and (min-height: 721px) { /* mid-size phones in the Christmas theme: the decoration takes room */
  body.xmas .home-beta .pc-hero { width: min(200px, 16.5cqh, 50vw) !important; height: min(200px, 16.5cqh, 50vw) !important; }
  body.xmas .home-beta .pc-rb small { display: none; }
  body.xmas .home-beta .pc-arc .pc-rb:nth-child(2), body.xmas .home-beta .pc-arc .pc-rb:nth-child(3) { margin-top: 6px; }
}

/* ---- beta home, landscape phones and other very low screens: not pinned – a normal page that scrolls, fixed sizes */
@media (max-height: 520px) {
  .home-beta.screen { position: static; height: auto !important; min-height: 100vh; container-type: normal; overflow: visible; width: auto; }
  .home-beta .topline { padding: 10px 0 8px !important; }
  body.xmas .home-beta .topline { padding-top: 64px !important; }
  .home-beta .kd-title, body.xmas .home-beta .kd-title { font-size: 46px !important; }
  .home-beta .pc-hero, body.xmas .home-beta .pc-hero { width: 132px !important; height: 132px !important; margin-top: 6px; }
  .home-beta .pc-av .av { font-size: 40px !important; }
  .home-beta .pc-hello { margin-top: 18px !important; padding-top: 0; font-size: 22px; }
  .home-beta .pc-sub { display: block; font-size: 13px; }
  .home-beta .pc-arc { margin-top: 14px !important; margin-bottom: 14px; }
  .home-beta .pc-rc { width: 60px; height: 60px; }
  .home-beta .pc-rb b { font-size: 11.5px; }
  .home-beta .pc-rb small { display: block; font-size: 11px; }
  .home-beta .pc-tier { font-size: 12px; }
  body.xmas .xmas-deco.full { --xh: 70px; }
}
/* ---- tablets and desktops: tall and wide, so the caps go up and the page does not look lost */
@media (min-width: 700px) and (min-height: 760px) {
  .home-beta.screen { width: min(100%, 720px); }
  .home-beta .kd-title, body.xmas .home-beta .kd-title { font-size: min(9.5cqh, 132px); }
  .home-beta .pc-hero { width: min(26cqh, 330px) !important; height: min(26cqh, 330px) !important; }
  body.xmas .home-beta .pc-hero { width: min(21cqh, 280px) !important; height: min(21cqh, 280px) !important; }
  .home-beta .pc-av .av { font-size: min(9cqh, 100px) !important; }
  .home-beta .pc-hello { font-size: min(3.4cqh, 38px); }
  .home-beta .pc-sub { font-size: min(1.9cqh, 19px); }
  .home-beta .pc-tier { font-size: min(1.8cqh, 18px); }
  .home-beta .pc-arc { width: min(100%, 620px); }
  .home-beta .pc-rc { width: min(9cqh, 104px); height: min(9cqh, 104px); }
  .home-beta .pc-rb b { font-size: min(1.75cqh, 17px); }
  .home-beta .pc-rb small { font-size: min(1.6cqh, 15px); }
  .home-beta .setup-line-home { justify-content: center; padding-right: 2px; font-size: min(1.8cqh, 17px); }
  body.xmas .xmas-deco.full { --xh: min(15.5vh, 210px); }
}

/* ---- from the review of 26.11.2026 */
.home-beta.screen { max-width: none; }            /* the 480 px cap of .screen made the wider tablet layout dead */
.home-beta > .grow { display: none; }             /* it took half of the free height */
.snd-row { gap: 8px; flex: none; }
/* Christmas: during a game the decoration goes and the normal top padding returns, so questions fit one screen */
body.xmas[data-route="duel"] .xmas-deco, body.xmas[data-route="play"] .xmas-deco, body.xmas[data-route="daily"] .xmas-deco, body.xmas[data-route="practice"] .xmas-deco { display: none; }
body.xmas[data-route="duel"] .screen, body.xmas[data-route="play"] .screen, body.xmas[data-route="daily"] .screen, body.xmas[data-route="practice"] .screen { padding-top: calc(env(safe-area-inset-top, 0px) + 10px); }
html.beta body.xmas[data-route="duel"] .screen, html.beta body.xmas[data-route="play"] .screen, html.beta body.xmas[data-route="daily"] .screen, html.beta body.xmas[data-route="practice"] .screen { padding-top: calc(env(safe-area-inset-top, 0px) + 20px); }

/* Installed iPhone app: when the page itself is not taller than the screen (the pinned beta home takes no room in
   the page), iOS lays fixed elements out on a screen shortened by the notch and home-bar areas – the bottom bar
   then hangs about 90 pt too high. Keeping the page as tall as the full screen avoids that. In a browser the two
   insets are zero, so nothing changes there. */
html.beta #app { min-height: calc(100vh + env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px)); }

/* Fit without script (replaces the JS fit guard, 26.11.2026): on the pinned home the avatar is the one flexible item
   of the card. Its height comes from the rules above and may shrink when the texts need more room (a greeting on
   two lines, long lines under the buttons); the width follows through the 1:1 ratio. Everything else keeps its
   size, so nothing can overlap and nothing is recalculated. */
.home-beta .pc > * { flex-shrink: 0; }
.home-beta .pc > .pc-hero { flex: 0 1 auto; min-height: 64px; }
/* Everything round sits in a square inside the avatar box. The box may lose height when the texts need room; the
   square takes that height and stays a square (on iPhones the box itself did not keep its 1:1 ratio when it shrank,
   which made the avatar an oval). */
.pc-sq { position: absolute; top: 0; bottom: 0; left: 50%; aspect-ratio: 1 / 1; transform: translateX(-50%); display: block; }
.home-beta .pc-hello { text-wrap: balance; }

/* ---- quick start (#/start) */
.start-screen { display: flex; flex-direction: column; gap: 18px; }
.start-top { display: flex; justify-content: flex-end; }
.start-hero { text-align: center; padding: 6vh 0 2vh; }
.start-hero .kd-title { font-size: min(17vw, 78px); }
.start-hero .sub { margin-top: 18px; }
.start-row { display: flex; gap: 8px; align-items: center; }
.start-row .input { flex: 1; font-size: 20px; font-weight: 800; text-align: center; }
.start-dice { flex: none; width: 48px; height: 48px; font-size: 22px; }
.start-have { text-align: center; color: var(--text-2); }

/* ---- Google sign-in button; the block shows only once the button is really there */
.g-wrap { display: none; flex-direction: column; gap: 10px; align-items: stretch; }
.g-wrap.on { display: flex; }
.g-box { display: flex; justify-content: center; min-height: 44px; color-scheme: light; }
.g-or { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 13px; font-weight: 700; }
.g-or::before, .g-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.g-err:empty { display: none; }

/* ---- e-mail code box */
.ec-row { display: flex; gap: 8px; align-items: center; }
.ec-row .input { flex: 1; min-width: 0; }
.ec-row .btn { flex: none; white-space: nowrap; }
.ec-code { font-size: 22px; font-weight: 800; letter-spacing: .3em; text-align: center; }
.ec-step2[hidden], .ec-step1[hidden] { display: none; }
.ec-err:empty { display: none; }
.start-mail { text-align: center; }
.start-mail summary { list-style: none; cursor: pointer; display: inline-block; }
.start-mail summary::-webkit-details-marker { display: none; }
.start-mail .ec-box { text-align: left; }

/* Christmas decoration moves also with "reduce motion" (user's wish, 26.11.2026); the general rule that ends every
   animation at once is lifted for these three. The switch "Schneefall und Lichter" in the settings stills them. */
@media (prefers-reduced-motion: reduce) {
  .xmas-snow i { animation-duration: var(--d) !important; animation-iteration-count: infinite !important; }
  .xm-light { animation-duration: 2.4s !important; animation-iteration-count: infinite !important; }
  .xm-tw { animation-duration: 3.4s !important; animation-iteration-count: infinite !important; }
}
body.xmas-still .xm-light, body.xmas-still .xm-tw { animation: none !important; }

/* Christmas: the snow on the bar ends at the hill on both sides instead of running through under the duel button
   (it showed as a white line between hill and bar). Screens without the duel button keep the full strip. */
body.xmas .tabbar:has(.tab-hill)::before { right: calc(50% + 90px); }
body.xmas .tabbar:has(.tab-hill)::after { content: ""; position: absolute; right: 0; left: calc(50% + 90px); top: -9px; height: 12px; border-radius: 0 12px 0 0; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 12px 12px, #fff 11px, transparent 12px) right 0 / 24px 12px repeat-x; }
/* the hill overlaps the bar by 2 px so no seam can show between them, and it has no outline along its base */
.tab-hill { top: -44px; }
.tab-hill .th-line { display: none; }
/* whole snow bumps next to the hill: the pattern is anchored at the hill, a cut bump can only be at the screen edge */
body.xmas .tabbar:has(.tab-hill)::before { background-position: right 0; border-radius: 12px 0 0 0; }
body.xmas .tabbar:has(.tab-hill)::after { background-position: 0 0; }

/* yes/no question in the app's own window (replaces the system confirm) */
.ask-modal .modal { max-width: 380px; }
.ask-text { margin: 6px 34px 16px 0; font-weight: 700; line-height: 1.4; }
.ask-row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.ask-row .btn { flex: 1 1 120px; }

/* Snowfall, lighter (26.11.2026): measured on a slowed-down phone the falling flakes halved the frame rate while a
   window was open. No glow around each flake, each flake on its own layer, and no snow behind an open window. */
.xmas-snow i { text-shadow: none; will-change: transform; backface-visibility: hidden; }
body:has(.modal-back) .xmas-snow { display: none; }
/* The twinkling lights and stars were the expensive part: fading them smoothly repaints the whole decoration drawing
   on every frame. They now change in a few steps (a repaint only a few times per second) and rest while a window
   is open. */
.xm-light { animation-timing-function: steps(5, jump-none); }
.xm-tw { animation-timing-function: steps(6, jump-none); }
body:has(.modal-back) .xm-light, body:has(.modal-back) .xm-tw { animation-play-state: paused; }
/* on work screens (thin garland: chooser, profile, lists …) the lights do not twinkle at all: measured, their
   animation delayed every tap there by one frame */
.xmas-deco:not(.full) .xm-light, .xmas-deco:not(.full) .xm-tw { animation: none; }

/* ============================================================ country flag at the avatar (features.country) */
.av-flag { position: absolute; right: -12%; bottom: -6%; width: 46%; min-width: 14px; max-width: 34px; aspect-ratio: 4 / 3; border-radius: 3px; background: #fff center / cover no-repeat;
  box-shadow: 0 0 0 1.5px var(--bg-solid, #fff), 0 1px 3px rgba(0,0,0,.3); pointer-events: none; }
.av.sm .av-flag { border-radius: 2px; }

/* ============================================================ topic chooser with groups (app.json → groups) */
.se-topics.grouped { display: flex; flex-direction: column; gap: 8px; }
.se-group { border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--surface); min-width: 0; }
.se-g-h { display: flex; align-items: center; gap: 4px; min-height: 52px; padding: 0 6px 0 4px; }
.se-g-tick { display: grid; place-items: center; width: 44px; height: 44px; flex: none; cursor: pointer; }
.se-g-tick[hidden] { display: none; }
.se-g-all { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.se-g-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 6px; border: 0; background: none; color: var(--text); font: inherit; font-weight: var(--w-bold); font-size: 15px; text-align: left; cursor: pointer; border-radius: 10px; }
.se-g-btn:focus-visible { box-shadow: var(--focus); outline: none; }
.se-g-name { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.se-g-count { color: var(--text-2); font-size: 13.5px; flex: none; }
.se-g-chev { flex: none; color: var(--text-3); transition: transform .15s; }
.se-group.open .se-g-chev { transform: rotate(180deg); }
.se-g-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 2px 8px 10px; }
.se-g-list[hidden] { display: none; }
@media (max-width: 360px) { .se-g-list { grid-template-columns: 1fr; } }
.wk-group { margin: 6px 0; }
.wk-group > summary { cursor: pointer; margin-bottom: 8px; font-size: 14px; }

/* ============================================================ the step after the first duel, notice on the start screen */
.ask-profile { text-align: left; display: flex; flex-direction: column; gap: 8px; }
.ask-profile .h2 { padding-right: 40px; }
.ask-profile .ap-fields { margin: 6px 0 10px; }
.pf-cl-other[hidden] { display: none; }
.start-notice { margin-top: 18px; }
.se-g-list .tk > span:last-child { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.flag-inline { display: inline-block; width: 1.2em; height: .9em; margin-right: .4em; vertical-align: -.08em; border-radius: 2px; background: #fff center / cover no-repeat; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
/* the big avatar of the home screen is clipped to its circle: the flag sits inside it */
.pc-av .av-flag { right: 14%; bottom: 17%; width: 22%; max-width: 52px; border-radius: 4px; }
.ask-profile .field-label { margin-top: 10px; }
/* e-mail code box on phones: address and button no longer push the page wider than the screen (found by the UI tour) */
.ec-row { flex-wrap: wrap; }
.ec-row .input { flex: 1 1 170px; }
.ec-row .btn { flex: 1 0 auto; }
/* tablets and desktops: the title keeps a clear distance from the top edge (found by the UI tour at 1920×1080) */
@media (min-width: 700px) and (min-height: 760px) {
  .home-beta .topline { padding-top: clamp(22px, 3.5cqh, 48px) !important; }
  body.xmas .home-beta .topline { padding-top: clamp(64px, 11cqh, 120px) !important; }
}

/* Duel reveal on small phones: "Weiter" stays within reach. On a 568 px or 667 px high screen the button lay below the
   fold after every answer (found by the UI tour, 26.11.2026). It now sticks to the bottom edge of the screen; the
   explanation scrolls underneath. */
.screen.duel .next-row { position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); z-index: 6; }
.screen.duel .next-row::before { content: ""; position: absolute; left: -12px; right: -12px; top: -10px; bottom: -14px; z-index: -1; background: linear-gradient(to bottom, transparent, var(--bg-solid) 38%); pointer-events: none; }

/* ============================================================ v3: Liga-Duell / free play, lives */
.lives { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.lives .hearts { display: inline-flex; gap: 3px; }
.lives .hearts i { display: inline-flex; }
.lives .heart { width: 1.15em; height: 1.15em; fill: #e5484d; stroke: rgba(0,0,0,.25); stroke-width: 1; }
.lives .hearts i.off .heart { fill: transparent; stroke: var(--text-2); stroke-width: 1.8; opacity: .55; }
.lives small { font-size: .82em; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.home-lives { text-align: center; padding: 2px 0 4px; font-size: 15px; }
.pc-lives { display: block; text-align: center; text-decoration: none; color: var(--text); font-size: clamp(13px, 1.9cqh, 16px); margin-top: .25em; }
.pc-lives[hidden], .home-lives[hidden], .home-beta .home-lives { display: none; }
.nolives-hearts { font-size: 26px; text-align: center; margin-top: 12px; }
.nolives-hearts .lives { flex-direction: column; gap: 6px; }
.nolives-hearts .lives small { font-size: 15px; }
.free-entry { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 7px 14px !important; }
.free-entry .setup-sum b { color: var(--text); }
.home-beta .free-entry { justify-content: center; padding-right: 14px !important; margin-right: 96px; }
.kind-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .02em; vertical-align: middle; white-space: nowrap; }
.kind-pill.ranked { background: #e0a800; color: #2a1c00; }
.kind-pill.free { background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.ranked-line { text-align: center; line-height: 1.45; font-size: 14.5px; color: var(--text-2); margin: 6px 0; }
.setup-line .kind-pill { flex: none; align-self: center; }
.final-ranked { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin-top: 12px; font-size: 14px; }
.final-ranked .ser-done.up { color: var(--ok, #2e9e5b); } .final-ranked .ser-done.down { color: var(--bad, #d6453d); }
.final-kind { text-align: center; margin-top: 12px; }
.free-lead { margin: 0 0 12px; }
.free-foot { display: flex; flex-direction: column; gap: 8px; }
.free-more { display: flex; gap: 8px; }
.free-more .btn { flex: 1; min-width: 0; font-size: 14px; padding-left: 8px; padding-right: 8px; white-space: normal; }
.practice-free { display: block; margin: 0 0 12px; }
.ch-banner.ch-3 .btn { padding-left: 10px; padding-right: 10px; }
.ch-ranked-tick .tk small { display: block; font-weight: 500; color: var(--text-2); }
@media (max-width: 360px) { .home-beta .free-entry { margin-right: 0; } .free-entry .setup-sum .sum-sep, .free-entry .setup-sum { font-size: 12.5px; } }

/* ============================================================ v3: league screens, ladder, profile sheet, friends */
.tap[data-uid], .tap[data-bot] { cursor: pointer; }
.tap[data-uid]:focus-visible, .tap[data-bot]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lg-me .lg-score small { font-size: 12px; font-weight: 600; color: var(--text-2); }
.lg-lives { margin-top: 4px; font-size: 14px; }
.lg-lives .lives { justify-content: flex-start; }
.lg-ladder-btn { text-decoration: none; font-size: 20px; }
.lg-ladder-link { display: flex; align-items: center; gap: 10px; margin: 10px 0 14px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 700; font-size: 14.5px; }
.lg-ladder-link .tier-emb { width: 24px; height: 24px; flex: none; }
.lg-ladder-link span { flex: 1; min-width: 0; }
.lg-ladder-link .ico { width: 18px; height: 18px; color: var(--text-2); }
.lg-tabs button { flex: 1; min-width: 0; white-space: nowrap; }
.lg-list-h { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 2px; }
.lg-list-h small { color: var(--text-2); font-weight: 700; }
.lg-ends { margin: 0 0 10px; display: flex; align-items: center; gap: 6px; }
.lg-ends .ico { width: 15px; height: 15px; }
.lg-note { margin-top: 10px; }
.row-tier { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; }
.row-tier .tier-emb { width: 14px; height: 14px; }
.lg-row .lname small { white-space: nowrap; }
/* the ladder: space at the top, the forest floor at the bottom */
.ld-lead { margin: 0 0 10px; }
.ld-scene { position: relative; border-radius: 22px; overflow: hidden; padding: 18px 12px 0; color: #fff;
  background: linear-gradient(180deg, #05060f 0%, #0b1030 30%, #16245a 52%, #2c5aa0 66%, #6fb4dc 76%, #9fd6c3 86%, #3f7d45 95%, #2b4a2a 100%); }
.ld-stars { position: absolute; inset: 0 0 34% 0; pointer-events: none; opacity: .9;
  background-image: radial-gradient(1.200px 1.200px at 12% 6%, #fff 99%, transparent), radial-gradient(1px 1px at 78% 11%, #fff 99%, transparent), radial-gradient(1.400px 1.400px at 44% 17%, #cfe0ff 99%, transparent), radial-gradient(1px 1px at 90% 26%, #fff 99%, transparent), radial-gradient(1.200px 1.200px at 22% 31%, #fff 99%, transparent), radial-gradient(1px 1px at 63% 38%, #ffe9b0 99%, transparent), radial-gradient(1.300px 1.300px at 8% 47%, #fff 99%, transparent), radial-gradient(1px 1px at 84% 55%, #fff 99%, transparent), radial-gradient(1.200px 1.200px at 35% 62%, #cfe0ff 99%, transparent), radial-gradient(1px 1px at 58% 74%, #fff 99%, transparent), radial-gradient(1.100px 1.100px at 16% 83%, #fff 99%, transparent), radial-gradient(1px 1px at 72% 91%, #fff 99%, transparent); }
.ld-path { position: absolute; left: 50%; top: 40px; bottom: 90px; width: 0; border-left: 2px dashed rgba(255,255,255,.28); pointer-events: none; }
.ld-zone { position: relative; text-align: center; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: rgba(255,255,255,.72); margin: 6px 0 8px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.ld-row { position: relative; display: flex; align-items: center; gap: 10px; width: min(78%, 300px); margin: 0 0 10px; padding: 7px 12px 7px 7px; border-radius: 999px; background: rgba(8,12,30,.62); border: 1.5px solid color-mix(in srgb, var(--tc2) 55%, transparent); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.ld-row.r { margin-left: auto; }
.ld-row.empty { background: rgba(8,12,30,.4); border-style: dashed; }
.ld-row.here { background: linear-gradient(180deg, var(--tc2), var(--tc)); color: #1c1408; border: 2px solid #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.25), 0 4px 14px rgba(0,0,0,.35); }
.ld-emb { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); }
.ld-row.here .ld-emb { background: rgba(255,255,255,.55); }
.ld-emb .tier-emb { width: 32px; height: 32px; }
.ld-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.ld-txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-txt small { font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }
.ld-here { flex: none; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; background: #1c1408; color: #fff; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.ld-ground { position: relative; margin: 14px -12px 0; height: 96px; }
.ld-ground .ld-zone { position: absolute; left: 0; right: 0; bottom: 6px; z-index: 1; margin: 0; }
.ld-forest { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ld-note { margin-top: 10px; text-align: center; }
/* profile sheet */
.ps-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ps-head .h2 { margin: 0; overflow-wrap: anywhere; }
.ps-place { margin: 0; font-weight: 600; font-size: 14.5px; }
.ps-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; margin-top: 14px; }
.ps-num { text-align: center; padding: 8px 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ps-num b { display: block; font-size: 17px; }
.ps-num small { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.ps-body .spinner { margin: 30px auto; }
/* people */
.pl-search { width: 100%; margin-bottom: 12px; }
.pl-sec { margin-bottom: 16px; }
.pl-sec .h3 { margin-bottom: 8px; }
.pl-sec .h3 small { color: var(--text-2); }
.pl-btns { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.pl-pending { font-size: 12px; color: var(--text-2); font-weight: 600; }
.pl-empty { margin: 0 0 4px; }
@media (max-width: 360px) { .pl-row { gap: 8px; padding-left: 10px; padding-right: 10px; } .pl-row .btn-sm { padding-left: 9px; padding-right: 9px; font-size: 13px; } .lg-row { gap: 8px; padding-left: 10px; padding-right: 10px; } .ld-row { width: 86%; } }
.pl-ch .pl-ch-i { display: none; }
.pl-row .lname small { white-space: nowrap; }
.ld-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .pl-ch .pl-ch-t { display: none; } .pl-ch .pl-ch-i { display: inline; } }
.pf-cc-sug { display: block; margin: 6px 0 0; text-align: left; font-size: 13.5px; }

/* ============================================================ v3: fine topics (free play) */
.ed-slot.fine-on .se-sec:nth-of-type(n+3) { opacity: .45; }
.ft-sec { margin-top: 14px; }
.ft-sec .ft-opt { font-weight: 500; font-size: 12.5px; color: var(--text-3); margin-left: 4px; }
.ft-sec .ft-open { width: 100%; white-space: normal; }
.ft-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ft-chip { max-width: 100%; padding-right: 2px; gap: 2px; }
.ft-chip-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-chip-x { flex: none; width: 32px; height: 32px; margin: -4px 0; border: 0; background: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; border-radius: 50%; }
.ft-chip-x:focus-visible, .ft-exp:focus-visible, .ft-rec:focus-visible { box-shadow: var(--focus); outline: none; }
.ft-practice { display: inline-block; margin-top: 2px; }
.ft-sum-chip { max-width: 100%; } .ft-sum-chip small { opacity: .8; }
.ft-back { position: fixed; inset: 0; z-index: 76; background: rgba(0,0,0,.55); display: flex; align-items: stretch; justify-content: center; animation: fadeIn .2s;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) calc(env(safe-area-inset-right, 0px) + 10px) calc(env(safe-area-inset-bottom, 0px) + 10px) calc(env(safe-area-inset-left, 0px) + 10px); }
.ft-sheet { width: min(560px, 100%); display: flex; flex-direction: column; min-height: 0; background: var(--bg-solid); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.ft-head { flex: none; padding: 12px 12px 10px; border-bottom: 1px solid var(--line); }
.ft-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ft-top .h2 { margin: 0; }
.ft-q { width: 100%; }
.ft-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 8px 12px; outline: none; overscroll-behavior: contain; }
.ft-h3 { font-size: 12.5px; font-weight: var(--w-bold); color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding: 12px 6px 6px; }
.ft-row { display: flex; align-items: center; min-height: 46px; gap: 2px; border-radius: 10px; }
.ft-row:hover { background: var(--surface); }
.ft-cb { flex: none; width: 22px; height: 22px; margin: 0 11px; accent-color: var(--accent); cursor: pointer; }
.ft-exp, .ft-leaf, .ft-rec { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 8px 6px 2px; border: 0; background: none; color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; border-radius: 10px; }
.ft-cat > .ft-row .ft-name { font-weight: var(--w-bold); }
.ft-name { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.ft-name small { display: block; font-size: 12.5px; color: var(--text-3); font-weight: 500; margin-top: 2px; }
.ft-name mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.ft-c { flex: none; color: var(--text-2); font-size: 13.5px; min-width: 2ch; text-align: right; }
.ft-chev { flex: none; color: var(--text-3); font-size: 20px; line-height: 1; padding: 0 2px; }
.ft-row .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
/* one level at a time (spec v3, section 14): the path with the way back, the level itself as the first row */
.ft-path { display: flex; align-items: flex-start; gap: 6px; padding: 8px 2px 6px; position: sticky; top: -4px; z-index: 1; background: var(--bg-solid); }
.ft-up { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.ft-up .ico, .ft-up svg { width: 20px; height: 20px; }
.ft-crumbs { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; min-height: 44px; font-size: 13.5px; line-height: 1.3; }
.ft-crumb { border: 0; background: none; font: inherit; color: var(--text-2); padding: 6px 4px; border-radius: 8px; cursor: pointer; text-align: left; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text-2) 40%, transparent); text-underline-offset: 3px; }
.ft-crumb.ft-here { color: var(--text); font-weight: var(--w-bold); cursor: default; text-decoration: none; }
.ft-sep { color: var(--text-3); }
.ft-up:focus-visible, .ft-crumb:focus-visible { box-shadow: var(--focus); outline: none; }
.ft-all { border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ft-all .ft-name { font-weight: var(--w-bold); }
.ft-mixed > .ft-row .ft-c { color: var(--accent); font-weight: var(--w-bold); }
.ft-cb:indeterminate { accent-color: var(--accent); }
.ft-rec { width: 100%; padding-left: 12px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 6px; }
.ft-more { padding: 10px; }
.ft-foot { flex: none; border-top: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-solid); }
.ft-sum { font-size: 14.5px; line-height: 1.35; min-height: 1.35em; }
.ft-sum small { color: var(--text-2); } .ft-sum .ft-few { display: block; }
.ft-none { color: var(--text-2); }
.ft-acts { display: flex; gap: 8px; }
.ft-acts .btn { flex: 1; min-width: 0; } .ft-acts .ft-ok { flex: 2; }
@media (max-width: 360px) { .ft-back { padding: 0; } .ft-sheet { border-radius: 0; border: 0; } .ft-cb { margin: 0 8px; } .ft-up { width: 40px; height: 40px; } }
.ft-total.pending { opacity: .45; }
/* a row of four tabs does not fit a 320 px screen in one line (it scrolled sideways and hid its last tab): two lines */
@media (max-width: 380px) {
  .tabs:has(> button:nth-child(4)) { flex-wrap: wrap; overflow-x: visible; }
  .tabs:has(> button:nth-child(4)) > button { flex: 1 1 calc(50% - 6px); }
}

/* ============================================================ v3.1 home: die and gear on the bar, clock without lives, orbit, countdown */
.tab-die { position: absolute; left: calc(50% + 48px); top: -88px; width: 70px; border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; color: var(--text); font: inherit; z-index: 1; -webkit-tap-highlight-color: transparent; transition: left .25s, top .25s, width .25s; }
.tab-die .die { display: block; width: 68px; height: 70px; transition: width .25s, height .25s, transform .12s; }
.tab-die:active .die-cube { transform: rotate(-8deg) translateY(1.5px); } .tab-die:active .die-shadow { transform: scaleX(.92); }
.tab-die:focus-visible .die, .tab-gear:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 14px; }
.die-svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* the die and its shadow: only the cube turns (around its own middle); the shadow stays on the ground and only
   shrinks / grows – it is outside .die-cube in the drawing (homedock.js) */
.die-cube, .die-shadow { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .12s; }
.die-top { fill: #ffffff; stroke: #ffffff; } .die-left { fill: #f0ebe1; stroke: #f0ebe1; } .die-right { fill: #d8d1c3; stroke: #d8d1c3; }
.die-pips circle { fill: var(--accent); } .die-shadow { fill: rgba(0,0,0,.2); }
.die-body { filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); }
.tab-die-l { font-size: 10.5px; font-weight: 800; line-height: 1.1; margin-top: -3px; white-space: nowrap; color: var(--text); text-shadow: 0 0 6px var(--bg-solid), 0 0 6px var(--bg-solid); }
.tab-gear { position: absolute; left: calc(50% + 121px); top: -52px; width: 32px; height: 32px; padding: 0; cursor: pointer; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); box-shadow: 0 3px 10px rgba(0,0,0,.18); z-index: 1; transition: left .25s; }
.tab-gear .ico, .tab-gear svg { width: 18px; height: 18px; }
@media (max-width: 340px) { .tab-die { left: calc(50% + 45px); width: 66px; } .tab-die .die { width: 64px; height: 66px; } .tab-gear { left: calc(50% + 114px); width: 30px; height: 30px; } .tab-die-l { font-size: 9.5px; } }
/* no lives left: the die in the middle on the hill, the duel button a clock on the left, the gear right of the die */
.tabbar.no-lives .tab-die { left: 50%; transform: translateX(-50%); top: -100px; width: 96px; }
.tabbar.no-lives .tab-die .die { width: 88px; height: 91px; }
.tabbar.no-lives .tab-gear { left: calc(50% + 54px); }
.tabbar.no-lives .tab-duel { left: calc(50% - 88px); top: -58px; width: 62px; height: 62px; background: var(--surface); color: var(--text); box-shadow: 0 4px 12px rgba(0,0,0,.2); gap: 0; }
.tabbar.no-lives .tab-duel:active { transform: translateX(-50%) translateY(2px); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
body.xmas .tabbar.no-lives .tab-duel::after { display: none; }
.tab-clock-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.tcr-bg { fill: none; stroke: color-mix(in srgb, var(--text) 12%, transparent); stroke-width: 4; }
.tcr-fg { fill: none; stroke: var(--bad, #d6453d); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.tab-clock-t { position: relative; font-size: 15px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.tab-clock-l { position: relative; font-size: 9px; font-weight: 800; color: var(--text-2); margin-top: 2px; white-space: nowrap; }
@media (max-width: 340px) { .tabbar.no-lives .tab-duel { left: calc(50% - 80px); width: 58px; height: 58px; } .tabbar.no-lives .tab-gear { left: calc(50% + 48px); } }
/* the pill «Freies Spiel … Öffnen» is gone (the die replaces it); the sound buttons sit small at the top right */
.home-beta .free-entry { display: none !important; }
.mute-float.mute-top { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 8px); right: 10px; bottom: auto !important; flex-direction: row !important; gap: 6px; z-index: 65; }
.mute-float.mute-top .iconbtn { width: 34px; height: 34px; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.mute-float.mute-top .iconbtn .ico, .mute-float.mute-top .iconbtn svg { width: 18px; height: 18px; }
/* who is online: small avatars on an orbit left and right of the big avatar (placed by home.js from the avatar's box) */
.home-beta .pc { position: relative; }
.pc-orbit { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; width: var(--orb, 38px); height: var(--orb, 38px); margin: calc(var(--orb, 38px) / -2) 0 0 calc(var(--orb, 38px) / -2); padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; animation: fadeIn .3s; }
.orb .avatar { width: 100% !important; height: 100% !important; font-size: calc(var(--orb, 38px) * .4); box-shadow: 0 2px 8px rgba(0,0,0,.22); }
.orb .avatar .flag, .orb .avatar .av-flag, .orb .avatar .bot-badge { display: none; }
.orb.off { opacity: .55; filter: saturate(.7); }
.orb-on { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #2fbf5b; border: 2px solid var(--bg-solid); }
.orb:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.orb:active { transform: scale(.94); }
/* the countdown under the greeting: one line, tabular digits (also where older rules hid the line on low screens) */
.home-beta .pc-sub { display: block !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ch-profile { margin-top: 2px; }
/* unit 9.5 – organisations (clinics / universities): the chip under the name in the profile sheet */
.ps-org { max-width: 100%; min-width: 0; padding: 3px 10px; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.ps-org > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-org .flag-inline { flex: none; margin-right: 0; }
.pf-av-txt .sub { overflow-wrap: anywhere; } /* function · clinic · department: a long word must not widen the page */
/* low screens (≤ 620 px): without lives the die grows less */
@media (max-height: 620px) {
  .tabbar.no-lives .tab-die { top: -90px; width: 84px; } .tabbar.no-lives .tab-die .die { width: 76px; height: 78px; }
  .tabbar.no-lives .tab-duel { left: calc(50% - 80px); top: -54px; width: 58px; height: 58px; } .tabbar.no-lives .tab-gear { left: calc(50% + 46px); }
}
.series-modal .ss-rows { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; text-align: left; }
.ss-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.ss-row b { font-variant-numeric: tabular-nums; }
.series-modal .ss-how { text-align: left; margin-top: 10px; } .series-modal .ss-lives { font-size: 22px; margin-top: 12px; }
/* v3 section 10 – tidying: league with the table first, «Leute», «Rekorde», «Meine Auswertung», profile and «Konto» */
.league-screen .lg-tabs { margin-bottom: 10px; }
.league-screen .lg-note { margin-top: 10px; text-align: left; }
.league-screen .lg-ends { margin: 8px 0 0; justify-content: flex-start; }
.league-screen .scope-bar { margin-bottom: 8px; }
.tabs .tab-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad, #d64545); color: #fff; font-size: 11px; line-height: 18px; font-weight: 800; vertical-align: 1px; }
.people-screen .pl-tabs .tabs { margin-bottom: 10px; }
.people-screen .pl-find { margin-top: 6px; }
.people-screen .pl-org-none { padding: 18px 12px; }
.mine-screen .mine-tabs .tabs { margin-bottom: 14px; }
.mine-panel { min-width: 0; }
.acct-del summary { cursor: pointer; }
.acct-del p { margin: 8px 0 10px; }
.acct-del-form .btn { width: 100%; }

/* weakest topics: a long topic name is cut with an ellipsis instead of pushing «Üben» off the screen */
.weak .lrow .chip { flex: 0 1 auto; min-width: 0; }
.weak .lrow .chip .dot { flex: none; }
.weak-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weak .lrow .lname { flex: 1 0 0; }
.weak .lrow .lpts, .weak .lrow .btn-sm { flex: none; }
/* home: the flame sits on top of the avatar, in the middle – the orbit uses the places left and right, and on a
   small avatar (low screens) the face stays free */
.home-beta .pc-streak { right: auto; left: 50%; top: -12px; transform: translateX(-50%); white-space: nowrap; z-index: 2; padding: 2px 9px; font-size: 13px; }

/* ============================================================ v3.2 – navigation and home (spec v3, section 11) */
/* --- the back button: one round floating arrow at the bottom left above the bar, in the same place on every screen */
.topline .tl-side { flex: none; width: 40px; height: 1px; }
.back-fab { position: fixed; left: max(calc(env(safe-area-inset-left, 0px) + 14px), calc(50% - 226px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 86px); z-index: 59; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--text); border: 1px solid color-mix(in srgb, var(--text) 16%, transparent); box-shadow: 0 6px 16px rgba(0,0,0,.26); text-decoration: none; -webkit-tap-highlight-color: transparent; transition: transform .08s; }
.back-fab .ico, .back-fab svg { width: 24px; height: 24px; }
.back-fab:active { transform: scale(.92); }
.back-fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* the last thing of a page stays reachable above the button */
body.has-back:not(.has-tabbar) .screen { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 146px); }
/* a foot that sticks to the bottom (free play, avatar) leaves the button's column free */
body.has-back .setup-foot, body.has-back .avatar-screen .av-foot { padding-left: 58px; }
body.has-back .avatar-screen .av-foot { margin-top: 64px; } /* the foot is lower than the button: the last row ends above it */
body.has-back:not(.has-tabbar) .screen:has(.setup-foot), body.has-back:not(.has-tabbar) .screen:has(.av-foot) { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); }
/* --- swipe: the screen that arrives slides in a little from the side it comes from (not with reduced motion) */
@keyframes swInLeft { from { transform: translateX(28px); opacity: .35; } to { transform: none; opacity: 1; } }
@keyframes swInRight { from { transform: translateX(-28px); opacity: .35; } to { transform: none; opacity: 1; } }
#app.sw-left > main { animation: swInLeft .2s ease-out; }
#app.sw-right > main { animation: swInRight .2s ease-out; }
@media (prefers-reduced-motion: reduce) { #app.sw-left > main, #app.sw-right > main { animation: none; } }
/* --- the die: white, one red pip on top, black pips on the sides; a bit smaller and a bit higher than in v3.1 */
.die-top { fill: #ffffff; stroke: #ffffff; } .die-left { fill: #efeae0; stroke: #efeae0; } .die-right { fill: #d6cfc1; stroke: #d6cfc1; }
.die-pips circle { fill: #1b1b1f; } .die-pip-top circle { fill: #e5383f; }
.tab-die { top: -98px; width: 66px; }
.tab-die .die { width: 60px; height: 62px; }
.tab-die-l { margin-top: -2px; }
@media (max-width: 340px) { .tab-die { left: calc(50% + 45px); width: 62px; } .tab-die .die { width: 56px; height: 58px; } }
.tabbar.no-lives .tab-die { top: -106px; width: 90px; }
.tabbar.no-lives .tab-die .die { width: 80px; height: 83px; }
@media (max-height: 620px) { .tabbar.no-lives .tab-die { top: -96px; width: 80px; } .tabbar.no-lives .tab-die .die { width: 70px; height: 72px; } }
/* the same die, small, as the symbol of the start button of free play */
.die-inline { display: inline-block; width: 1.5em; height: 1.55em; flex: none; vertical-align: middle; }
.play-btn .die-inline { margin: -.2em 0; }
/* --- the two sound buttons of the home: small, at the right end above the bar, above the gear */
.mute-float.mute-dock { position: absolute; top: -92px; right: 10px; left: auto; bottom: auto !important; width: auto; height: auto; display: flex; flex-direction: row !important; gap: 5px; z-index: 1; box-shadow: none; }
.mute-float.mute-dock .iconbtn { width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.mute-float.mute-dock .iconbtn .ico, .mute-float.mute-dock .iconbtn svg { width: 15px; height: 15px; }
/* narrow phones: no room beside the die – the two stand in a column above the gear */
@media (max-width: 359px) { .mute-float.mute-dock { flex-direction: column !important; top: -118px; right: 12px; } }
/* --- who is online: each small avatar carries the name on its outer side (one line, cut with an ellipsis) */
.orb.off { opacity: 1; filter: none; }
/* (the small avatars really have the size the orbit is laid out for – the old rule named a class that does not exist) */
.orb .av { width: 100%; height: 100%; font-size: calc(var(--orb, 38px) * .36); box-shadow: 0 2px 8px rgba(0,0,0,.22); }
.orb .av .av-flag, .orb .av .av-badge { display: none; }
.orb.off .av { opacity: .55; filter: saturate(.7); }
.orb-n { position: absolute; top: 50%; transform: translateY(-50%); max-width: var(--orb-nw, 60px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; line-height: 1.3; font-weight: 800; color: var(--text); text-shadow: 0 0 5px var(--bg-solid), 0 0 5px var(--bg-solid); pointer-events: auto; }
.orb-l .orb-n { right: calc(100% + 5px); text-align: right; }
.orb-r .orb-n { left: calc(100% + 5px); text-align: left; }
.orb-b .orb-n { top: calc(100% + 2px); left: 50%; transform: translateX(-50%); text-align: center; }
.orb.off .orb-n { color: var(--text-2); }
.orb-noname .orb-n { display: none; }
/* --- flags clearly smaller (about half the area) */
.av-flag { right: -8%; bottom: -5%; width: 32%; min-width: 10px; max-width: 24px; border-radius: 2px; box-shadow: 0 0 0 1px var(--bg-solid, #fff), 0 1px 2px rgba(0,0,0,.3); }
.pc-av .av-flag { right: 17%; bottom: 19%; width: 15.5%; max-width: 36px; border-radius: 3px; }
.flag-inline { width: .86em; height: .64em; margin-right: .35em; vertical-align: .02em; border-radius: 1.5px; }
/* --- lives as «3×❤»: the number, a ×, one heart */
.lives .lives-n { display: inline-flex; align-items: center; gap: .08em; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.lives .lives-x { font-weight: 700; opacity: .8; }
.lives .lives-n .heart { margin-left: .08em; }
.lives.none .lives-n .heart { fill: transparent; stroke: var(--text-2); stroke-width: 1.8; opacity: .7; }
.lives.none .lives-n { color: var(--text-2); }
/* --- the big avatar has the same size on a given screen, whatever the greeting says: the greeting's box always
   takes two lines (a one-line greeting stands in its middle, a very long one is cut after two lines), and the line
   of the lives keeps its place while they are loading. So nothing below the avatar changes its height, and the
   avatar – still the one flexible item of the card – always gets the same room. No script involved. */
.home-beta .pc-hello { display: flex; align-items: center; justify-content: center; height: 2.3em; line-height: 1.15; box-sizing: content-box; align-self: stretch; }
.home-beta .pc-hello-t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; text-wrap: balance; min-width: 0; padding: .08em 0; }
.home-beta .pc-lives[hidden] { display: block; visibility: hidden; }
.home-beta .pc-lives { min-height: 1.3em; line-height: 1.3; }
/* --- league, tab «Liga»: two short rows above the table – the tier with its place on the ladder, and the bar of the
   own series between relegation (left) and promotion (right) */
.lg-head { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; }
.lg-head-tier { display: flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 30px; text-decoration: none; color: var(--text-2); font-size: 13px; font-weight: 700; min-width: 0; }
.lg-head-tier .tier-badge { flex: 0 1 auto; min-width: 0; }
.lg-head-go { flex: none; display: inline-flex; color: var(--text-3); } .lg-head-go .ico, .lg-head-go svg { width: 16px; height: 16px; }
.lg-ser { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 6px 8px 5px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lg-ser:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lg-ser-row { display: flex; align-items: center; gap: 6px; }
.lg-ser-end { flex: 0 1 auto; display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 30%; font-size: 11px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.lg-ser-end > span { overflow: hidden; text-overflow: ellipsis; }
.lg-ser-end:empty { display: none; } .lg-ser.one-end .lg-ser-end { max-width: 52%; }
.lg-ser-end .ico, .lg-ser-end svg { width: 11px; height: 11px; flex: none; }
.lg-ser-end.dn { color: var(--bad, #d6453d); } .lg-ser-end.up { color: var(--ok, #2e9e5b); }
.lg-ser-track { position: relative; flex: 1 1 auto; min-width: 60px; height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--text) 13%, transparent); }
.lg-ser-zone { position: absolute; top: 0; bottom: 0; }
.lg-ser-zone.dn { left: 0; border-radius: 999px 0 0 999px; background: color-mix(in srgb, var(--bad, #d6453d) 55%, transparent); border-right: 2px solid var(--bad, #d6453d); }
.lg-ser-zone.up { right: 0; border-radius: 0 999px 999px 0; background: color-mix(in srgb, var(--ok, #2e9e5b) 55%, transparent); border-left: 2px solid var(--ok, #2e9e5b); }
.lg-ser-mid { position: absolute; left: 50%; top: 2px; bottom: 2px; width: 1px; background: color-mix(in srgb, var(--text) 35%, transparent); }
.lg-ser-m { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--text); border: 3px solid var(--bg-solid); box-shadow: 0 1px 4px rgba(0,0,0,.4); transition: left .5s ease; }
.lg-ser.idle .lg-ser-m { opacity: .45; }
.lg-ser.up .lg-ser-m { background: var(--ok, #2e9e5b); } .lg-ser.down .lg-ser-m { background: var(--bad, #d6453d); }
.lg-ser-info { font-size: 12px; font-weight: 700; color: var(--text-2); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.lg-ser-sure.up { color: var(--ok, #2e9e5b); } .lg-ser-sure.down { color: var(--bad, #d6453d); } .lg-ser-sure.stay { color: var(--text); }
@media (max-width: 340px) { .lg-ser-end { font-size: 10px; } .lg-ser-info { font-size: 11.5px; } }
@media (prefers-reduced-motion: reduce) { .lg-ser-m { transition: none; } }
/* --- «Alle Ligen»: small, quiet labels that group the tiers */
.ld-group { margin: 16px 0 8px; font-size: 10.5px; letter-spacing: .16em; color: rgba(255,255,255,.6); display: flex; align-items: center; gap: 10px; }
.ld-group::before, .ld-group::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.18); }

/* ==================================================================================================================
   v3.2 – duel screen and flat scoring (spec v3, section 13). One block, appended: the question in its own box with a
   small subject label, marks (✓ ✗ –) at the avatars instead of the result row and the lead line, a bigger mode
   symbol in the top pill.
   ================================================================================================================== */
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* E – the mode symbol fills the pill; the pill keeps its height (negative margins) */
.duel-pill { padding-left: 9px; gap: 7px; }
.duel-pill .mode-ico { width: 28px; height: 28px; margin: -7px 0; vertical-align: middle; }

/* A / B – the question box */
.qbox { margin-top: 2px; padding: 10px 14px 14px; border-radius: var(--r-lg); background: var(--qbox-bg, var(--surface)); border: 1px solid var(--qbox-line, var(--line)); color: var(--text); min-width: 0; }
[data-theme="gameshow"] .qbox { background: var(--card-bg); color: var(--card-fg); box-shadow: var(--card-sh); border: 0; margin-bottom: 6px; }
[data-theme="klinik"] .qbox { background: #fff; border-color: #EDF0F4; box-shadow: 0 1px 2px rgba(22,35,58,.05), 0 4px 14px -6px rgba(22,35,58,.10); }
[data-theme="modern"] .qbox { --qbox-bg: color-mix(in srgb, var(--text) 9%, transparent); --qbox-line: color-mix(in srgb, var(--text) 16%, transparent); }
.qbox .qb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 16px; margin-bottom: 6px; }
.qbox .qmeta-l { gap: 6px; }
.qbox .qb-top .chip.cat { background: none; border: 0; box-shadow: none; padding: 0; gap: 5px; border-radius: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; line-height: 1.3; color: inherit; opacity: .72; }
.qbox .qb-top .chip.cat .dot { width: 6px; height: 6px; }
.qbox .qb-top .lv-stars { font-size: 9.5px; letter-spacing: .5px; opacity: .85; }
[data-theme="gameshow"] .qbox .qb-top .lv-stars { color: inherit; }
.qbox .out-chip .chip { font-size: 11.5px; padding: 2px 8px; }
.qbox .qcard, [data-theme] .qbox .qcard { background: none; box-shadow: none; padding: 0; border-radius: 0; color: inherit; }
.qbox .qimg { margin: 2px 0 8px; }
html.beta body.has-qimg main.screen .qbox { padding: 6px 10px 8px; }
html.beta body.has-qimg main.screen .qbox .qb-top { margin-bottom: 2px; }
html.beta body.has-qimg main.screen .qbox .qcard { margin-top: 4px; }
@media (max-height: 600px) {
  .screen.duel .qbox { padding: 7px 12px 10px; }
  .screen.duel .qbox .qb-top { margin-bottom: 3px; }
  .screen.duel .qbox .qcard { font-size: 17px; line-height: 1.25; }
  .screen.duel .duel-score { margin-bottom: 8px; }
  .screen.duel .scorebar { padding: 7px 10px; }
  .screen.duel .topline { margin-bottom: 6px; min-height: 42px; }
  .screen.duel .opp-ind { margin-top: 8px; height: 38px; min-height: 0; padding-top: 3px; padding-bottom: 3px; font-size: 13px; }
  .screen.duel .ans-wrap.sides, .screen.duel .answers { margin-top: 8px; }
  .screen.duel .ans-wrap.sides .answers { margin-top: 0; }
  .screen.duel .ans { min-height: 50px; padding-top: 7px; padding-bottom: 7px; }
  .screen.duel .answers { gap: 7px; }
  .screen.duel .rv-gap { height: 46px; }
  .screen.duel .rv-gap.closed { height: 0; }
}

/* G – after a question: right / wrong / no answer at each avatar (a symbol, not the colour alone) */
.scorebar .av-wrap { position: relative; flex: none; display: inline-flex; }
.scorebar .sb-mark { position: absolute; left: -7px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 900; line-height: 1; color: #fff; background: #6b7280; border: 2px solid var(--bg-solid, #120b3a); transform: scale(0); transition: transform .28s cubic-bezier(.3,1.6,.5,1); pointer-events: none; z-index: 2; }
/* bottom left at both avatars: the flag of a player sits bottom right, a seasonal hat on top */
.scorebar .pl.opp .sb-mark { left: -1px; } /* the opponent's score stands left of the avatar: keep clear of the number */
.scorebar .sb-mark svg { width: 13px; height: 13px; }
.scorebar .pl.mk-ok .sb-mark { background: #17874c; transform: scale(1); }
.scorebar .pl.mk-bad .sb-mark { background: #c9364a; transform: scale(1); }
.scorebar .pl.mk-none .sb-mark { background: #6b7280; transform: scale(1); }
.scorebar .pl.mk-took .sb-mark { width: 26px; height: 26px; box-shadow: 0 0 0 3px color-mix(in srgb, #17874c 45%, transparent); }
.scorebar .pl.mk-ok .ps { color: var(--ok-2, #2e9e5b); }
.scorebar .pl.mk-bad .ps, .scorebar .pl.mk-none .ps { opacity: .8; }
/* the player card stays in sight while the explanation is read (the marks and the score are on it) */
.screen.duel .duel-score { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 6px); z-index: 7; border-radius: var(--r-lg); background: var(--bg-solid); }
/* the gap where «… überlegt» stood closes softly; the room goes to the answers */
.rv-gap { height: 58px; animation: rvGapClose .3s .12s ease forwards; }
.rv-gap.closed { height: 0; animation: none; }
html.beta body.has-qimg main.screen .rv-gap { height: 50px; }
html.beta body.has-qimg main.screen .rv-gap.closed { height: 0; }
@keyframes rvGapClose { to { height: 0; } }

/* «Unentschieden» is the longest verdict: it must fit a 320 px screen */
.final-hero .big { font-size: clamp(30px, 11vw, 44px); overflow-wrap: anywhere; }
/* result: the right answers under the league points; the note of a drawn Liga-Duell */
.final-card .final-right { font-size: 14px; font-weight: var(--w-bold); color: var(--text); }
.final-ranked .final-draw { flex-basis: 100%; text-align: center; }
.rec-note { margin: 0 0 10px; }
.best-note { margin-top: 8px; }
.bm-lb-title .bm-lb-tie { display: block; font-size: .36em; font-weight: 500; letter-spacing: 0; text-transform: none; opacity: .7; margin-top: .2em; }
/* ================================================================================================= end of v3.2 */

/* the gear beside the die is gone (owner, 27.11.2026: the die leads to the same page); the two sound buttons take its place */
.mute-float.mute-dock { top: -58px; }
@media (max-width: 359px) { .mute-float.mute-dock { top: -86px; right: 8px; } }

/* ============================================================ v3.3 – free play: the die is the start button (spec v3, section 14) */
.free-foot { align-items: stretch; gap: 6px; padding-top: 18px; background: linear-gradient(transparent, var(--bg-solid) 22%); }
.die-btn { align-self: center; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; border-radius: 22px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; line-height: 0; }
.die-btn .die-big { display: block; width: 92px; height: 95px; transition: transform .12s, filter .2s, opacity .2s; transform-origin: 50% 62%; }
.die-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.die-btn:not(:disabled):active .die-big { transform: scale(.9); }
.die-btn:not(:disabled):active .die-cube { transform: rotate(-10deg) translateY(2px); }
.die-btn:disabled { cursor: not-allowed; }
.die-btn:disabled:not(.rolling) .die-big { opacity: .38; filter: grayscale(1); }
/* the cube wiggles and rolls (lengths in the drawing's units: 11 ≈ 16 px at the big size); its shadow stays where it
   is and only gets smaller while the cube is up in the air */
@keyframes dieWiggle { 0%, 100% { transform: none; } 12% { transform: rotate(-11deg) translateX(-1.4px); } 26% { transform: rotate(10deg) translateX(1.4px); } 40% { transform: rotate(-8deg) translateX(-1.4px); } 54% { transform: rotate(7deg) translateX(.7px); } 68% { transform: rotate(-4deg); } 84% { transform: rotate(2deg); } }
@keyframes dieRoll { 0% { transform: none; } 35% { transform: translateY(-11px) rotate(150deg) scale(1.05); } 70% { transform: translateY(0) rotate(330deg) scale(.96); } 100% { transform: rotate(360deg); } }
@keyframes dieShadowWiggle { 0%, 100% { transform: none; } 12%, 40% { transform: scaleX(.93); } 26%, 54% { transform: scaleX(.95); } }
@keyframes dieShadowRoll { 0%, 100% { transform: none; opacity: 1; } 35% { transform: scale(.6); opacity: .55; } 70% { transform: scale(1.04); opacity: 1; } }
.die-btn.wiggle .die-cube { animation: dieWiggle .6s ease-in-out; }
.die-btn.wiggle .die-shadow { animation: dieShadowWiggle .6s ease-in-out; }
.die-btn.rolling .die-cube { animation: dieRoll .45s ease-in-out; }
.die-btn.rolling .die-shadow { animation: dieShadowRoll .45s ease-in-out; }
@media (prefers-reduced-motion: reduce) {
  .die-btn.wiggle .die-cube, .die-btn.rolling .die-cube, .die-btn.wiggle .die-shadow, .die-btn.rolling .die-shadow { animation: none; } /* (the app switches every animation off with reduced motion: the die stands still) */
  .die-btn.rolling .die-big { transform: scale(.9); }
}
.free-cap { margin: 0; text-align: center; font-size: 12.5px; line-height: 1.3; color: var(--text-2); }
.free-cap.why { color: var(--bad, #d6453d); font-weight: var(--w-bold); }
.free-more { margin-top: 4px; }
@media (max-width: 379px), (max-height: 720px) { .die-btn .die-big { width: 78px; height: 80px; } }
@media (max-width: 340px), (max-height: 620px) { .die-btn .die-big { width: 62px; height: 64px; } .free-foot { padding-top: 12px; gap: 4px; } .free-cap { font-size: 12px; } .free-more .btn { font-size: 13px; min-height: 42px; padding-top: 6px; padding-bottom: 6px; } }
/* no floating back button on touch screens (swipe right goes back); it stays reachable for keyboards and screen
   readers and shows itself when it gets the focus. With it gone the foot needs no free column on its left. */
body.free-swipe-back > .back-fab:not(:focus-visible) { width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; box-shadow: none; border: 0; }
body.free-swipe-back.has-back .setup-foot { padding-left: 0; }
body.has-back:not(.free-swipe-back) .free-foot .die-btn, body.has-back:not(.free-swipe-back) .free-foot .free-cap { position: relative; left: -29px; } /* centred on the screen, not on the indented foot */

/* home (owner, 27.11.2026): no flag on the own big avatar; the tier badge follows the avatar's size – it was too big
   whenever the avatar is small (low windows, small phones) */
.pc-av .av-flag { display: none !important; }
.home-beta .pc-hero { container-type: inline-size; }
.home-beta .pc-tier { font-size: clamp(8.5px, 7cqw, 15px) !important; padding: .32em .85em; bottom: -.75em; border-width: clamp(1.5px, 1.6cqw, 3px); }
.home-beta .pc-streak { font-size: clamp(9px, 7cqw, 13px); top: -1em; }
.home-beta .pc-tier .tier-emb, .home-beta .pc-tier svg { width: 1.4em !important; height: 1.4em !important; font-size: inherit !important; }
.home-beta .pc-tier { gap: .3em; }

/* Lobby ("Duell gefunden!"): the set-up summary wraps as whole parts – tag, mode list, topic – instead of squeezing the mode list into a narrow column */
.setup-line { flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 0 4px; font-size: 13.5px; font-weight: var(--w-bold); color: var(--text-2); line-height: 1.35; text-align: center; }
.setup-line .sum-part { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; max-width: 100%; flex: 0 1 auto; }
.setup-line .sum-part .ico { flex: none; color: var(--accent); }
.setup-line .sum-sep { display: none; }
.setup-line .chip { font-size: 13px; max-width: 100%; white-space: normal; text-align: left; }

/* The die on the other tabs: hidden while there are lives; with none left it takes the middle there too (the duel button is the clock at its side) */
.tabbar:not(.dock-home):not(.no-lives) .tab-die { display: none; }

/* The garland is never cut off: its box keeps the proportions of the drawing (390 × 136) and is as wide as the
   allowed height (--xh) lets it be – on wide windows it gets narrower instead of losing its lower part. */
.xmas-deco.full { width: max(min(100vw, 390px, calc(var(--xh, 170px) * 2.3)), min(100vw, 560px, calc(var(--xh, 170px) * 2.87))); max-width: none; }
.xmas-deco.full svg { width: 100%; height: auto; aspect-ratio: 390 / 136; }
/* phones: as before – the full width, the allowed height (the drawing is at most trimmed a little at the bottom) */
@media (max-width: 430px) { .xmas-deco.full { width: 100%; } .xmas-deco.full svg { height: min(var(--xh, 170px), 34.9vw); aspect-ratio: auto; } }

/* ============================================================ account management v4 (spec v3, section 16)
   «Mein Konto» (#/account), the account card of the settings, the sign-in screen, «Konto erstellen», the hint for
   playing without an account. Everything fits 320 px: texts wrap, the action of a row never shrinks. */
.ac-status { font-weight: var(--w-bold); font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.ac-status.ok { color: var(--ok); }
.ac-status.warn { color: var(--warn); }
[data-theme="klinik"] .ac-status.warn, [data-theme="salbei"] .ac-status.warn, [data-palette="salbei"] .ac-status.warn { color: #A8641A; } /* orange that reads on a light page */
.account .ac-sign { scroll-margin-top: 76px; } /* below the seasonal decoration at the top */
.ac-statusline { margin: 8px 0 10px; text-align: left; }
.ac-sign .ac-create { width: 100%; margin: 0 0 6px; }
.ac-row { gap: 10px; align-items: center; }
.ac-what { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ac-addr { display: block; font-weight: var(--w-med); font-size: 13px; overflow-wrap: anywhere; }
.ac-what .chip { font-size: 11.5px; padding: 2px 8px; vertical-align: middle; }
.ac-tick { color: var(--ok); }
.ac-act { flex: none; white-space: nowrap; }
/* a passkey cannot be added yet (first Google or an e-mail – spec section 17): the row is there, but pale */
.ac-row.ac-off .ac-what { color: var(--text-3); }
.ac-row.ac-off .ac-addr { color: var(--text-3); font-weight: var(--w-med); }
.ac-edit { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.ac-edit[hidden] { display: none; }
.ac-edit-h, .ac-keep, .ca-ec-hint, .login-code-hint { text-align: left; margin: 0 0 8px; }
.ac-keep { margin: 12px 0 0; }
.ac-edit .row-form { flex-wrap: wrap; margin: 0; }
.ac-edit .row-form .input { flex: 1 1 120px; }
.ac-out .ac-what { font-weight: var(--w-med); }
/* the account card at the top of the settings */
.acct-card { gap: 12px; padding: 12px 14px; }
.acct-card-av { flex: none; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; }
.acct-card-av .av { width: 48px; height: 48px; font-size: 17px; }
.acct-card-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acct-card-n { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-card-s .ac-status { font-size: 13px; }
.acct-card > svg, .acct-card > .ico { flex: none; color: var(--text-3); }
/* «Noch N Spiele ohne Konto» (after a game, on the home) */
.ac-hint-slot:empty { display: none; }
.ac-hint { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--warn); text-align: left; }
.ac-hint-t { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; }
.ac-hint .btn { flex: none; }
.final-ac-hint { margin-top: 12px; }
.ac-banner .ch-t { min-width: 0; font-size: 14px; }
.ac-banner .btn { flex: none; white-space: nowrap; }
@media (max-width: 359px) { .ac-banner { flex-wrap: wrap; } .ac-banner .ch-t { flex: 1 1 100%; } .ac-banner .ch-yes { flex: 1; } }
@media (max-width: 359px) { .ac-hint { flex-wrap: wrap; } .ac-hint .btn { flex: 1 0 100%; } }
/* the dialogs «Konto erstellen» and the one-time notice for name + PIN */
.ca-modal .ca-ways .btn { width: 100%; }
.ca-modal .ca-mail, .login .login-mail, .login .login-pk { background: var(--ghost-bg); color: var(--ghost-fg); border: var(--ghost-border); box-shadow: none; font-size: 18px; min-height: 56px; }
.ca-modal .err:empty { display: none; }
.ca-modal .g-wrap:not(.on) { display: none; }
.pin-notice .btn { width: 100%; text-decoration: none; }
/* sign-in screen */
.login .login-hero { margin: 22px 0 18px; }
.login-ways .g-wrap .err:empty, .login-ways .pk-err:empty { display: none; }
.login-ways .btn { width: 100%; }
.login-or { margin: 18px 0 6px; }
.login-or[hidden] { display: none; }
.login-pin { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 0 16px; }
.login-pin-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; cursor: pointer; list-style: none; font-weight: var(--w-bold); font-size: 16.5px; color: var(--text); }
.login-pin-sum::-webkit-details-marker { display: none; }
.login-pin-caret { color: var(--accent); font-size: 18px; transition: transform .15s; }
.login-pin[open] .login-pin-caret { transform: rotate(180deg); }
.login-pin[open] { padding-bottom: 16px; }
.login-pin-form { margin-top: 4px; }
.login-email { margin-top: 14px; text-align: center; }
.login-email summary { cursor: pointer; list-style: none; display: inline-block; }
.login-email summary::-webkit-details-marker { display: none; }
.login-email .le-form { text-align: left; }
.login-new { margin: 22px 0 0; }
@media (prefers-reduced-motion: reduce) { .login-pin-caret { transition: none; } }
.ca .h2, .pin-notice .h2 { padding: 0 44px; } /* clear of the close button */
.ca .sub, .pin-notice .sub { margin-top: 14px; }
.ca-ec[hidden], .login-code[hidden] { display: none; }

/* ================================================================== Morning round: topic by wheel or vote (spec v3, section 18)
   --oc / --oc-fg: the colour of one of the four proposed topics (components.js → optVars), the same on the wheel,
   on the presenter's bars and on the phone's buttons. */
.host-create .seg.qsrc { flex-wrap: wrap; justify-content: center; }
.host-create .seg.qsrc[hidden], .host-create .vote-count[hidden], .host-create .src-note[hidden] { display: none; }
.host-create .seg.qsrc button { display: inline-flex; align-items: center; gap: .4em; }
.host-create .vote-count { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5em .9em; margin-top: -.5em; }
.host-create .vote-count .vc-l { font-size: .95em; font-weight: var(--w-bold); color: var(--text-2); }
.host-create .vote-count .seg { font-size: .95em; }
.host-create .vote-count .seg button { padding: .35em 1em; }
.host-create .vote-count .vc-note { flex-basis: 100%; }
/* lobby: the four proposals */
.lobby-topics { flex: none; margin: .7em 0 .5em; padding: .6em .8em .75em; border-radius: 1em; background: var(--surface); border: 1px solid var(--line); }
.lt-h { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-bottom: .45em; }
.lt-t { font-size: 1.15em; font-weight: var(--w-strong); color: var(--text-2); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-t small { font-size: .85em; font-weight: 700; color: var(--text-3); }
.stage .lt-h .btn { font-size: 1em; min-height: 2.2em; padding: .25em 1em; flex: none; white-space: nowrap; }
.lt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .45em; }
.lt-card { display: flex; flex-direction: column; justify-content: center; gap: .1em; min-width: 0; min-height: 3.6em; padding: .3em .8em; border-radius: .7em; background: color-mix(in srgb, var(--oc) 16%, var(--surface)); border: 1px solid var(--line); border-left: .45em solid var(--oc); }
.lt-card small { font-size: .8em; font-weight: 700; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-card b { font-size: 1.12em; font-weight: var(--w-strong); line-height: 1.12; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lobby.with-topics .lobby-players { min-height: 3em; margin-top: .6em; gap: .5em; }
.lobby.with-topics .pchip { font-size: 1.05em; }
.lobby.with-topics .lobby-sound { display: none; } /* said on the create screen; the room is for the names and the topics */
.lobby.with-topics .lobby-actions { margin-top: .5em; }
.lobby.with-topics .lobby-count { font-size: 1.4em; }
.lobby.with-topics .setup-line { margin-bottom: 0 !important; }
/* the vote on the presenter */
.bm-vote { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; width: min(100%, 62em); margin: 0 auto; }
.bm-vote .wheel-head { text-align: center; }
.bm-vote .wheel-title { font-size: 2.5em; }
.bm-vote .wheel-sub { font-size: 1.3em; }
.bm-vote .bm-timer { margin: .5em 0 .5em; }
.bv-list { flex: 1; min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); align-content: center; gap: .5em; }
.bv-row { display: grid; grid-template-columns: minmax(0, 21em) minmax(0, 1fr) 2.6em; align-items: center; gap: 1em; min-height: 0; max-height: 7em; padding: .15em .9em; border-radius: .9em; background: var(--surface); border: 1px solid var(--line); border-left: .6em solid var(--oc); transition: opacity .3s, transform .3s; }
.bv-name { min-width: 0; display: flex; flex-direction: column; gap: .05em; }
.bv-name small { font-size: .8em; line-height: 1.15; font-weight: 700; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv-name b { font-size: 1.3em; font-weight: var(--w-strong); line-height: 1.12; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bv-track { height: 1.9em; border-radius: .6em; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.bv-fill { height: 100%; width: 0; border-radius: .6em; background: var(--oc); transition: width .45s cubic-bezier(.2,.9,.3,1); }
.bv-n { font-size: 2.1em; font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.bv-row.won { transform: scale(1.02); border-color: var(--oc); box-shadow: 0 0 0 .2em color-mix(in srgb, var(--oc) 45%, transparent); }
.bv-row.lost { opacity: .4; }
.bv-foot { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-top: .7em; }
.bv-voted { font-size: 1.3em; font-weight: var(--w-strong); color: var(--text-2); }
.bv-result { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 72%, transparent); border-radius: 1em; z-index: 3; }
.bv-result[hidden] { display: none; }
.bvr-card { display: flex; flex-direction: column; align-items: center; gap: .25em; max-width: 86%; padding: 1em 2em 1.1em; border-radius: 1.2em; background: var(--oc); color: var(--oc-fg, #fff); text-align: center; box-shadow: 0 .6em 2.4em rgba(0,0,0,.4); animation: verdictIn .5s cubic-bezier(.3,1.5,.5,1) both; }
.bvr-card small { font-size: 1.5em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.bvr-card b { font-size: 3.4em; font-weight: 900; line-height: 1.08; overflow-wrap: anywhere; }
.bvr-card span { font-size: 1.4em; font-weight: 800; opacity: .9; }
/* the wheel over proposed topics: which colour is which topic */
.bw-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .3em 1.4em; margin-top: 1.1em; max-width: 100%; }
.bw-leg { display: inline-flex; align-items: center; gap: .45em; font-size: 1.15em; font-weight: var(--w-bold); color: var(--text-2); min-width: 0; }
.bw-leg i { width: .9em; height: .9em; border-radius: .25em; background: var(--oc); flex: none; }
.bw-leg small { font-weight: 900; color: var(--text); }
.bm-wheel:has(.bw-legend) .wheel-pair .wheel-cell { width: min(20em, 40vh); }
.bm-wheel:has(.bw-legend) .wheel-cap { font-size: 1.7em; min-height: 2.5em; }
/* the topic of the round as a chip (a finer topic may have a long name) */
.bm-mid .chip.node { max-width: 24em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.bm-mid .chip.node .dot { display: inline-block; margin-right: .5em; vertical-align: .05em; }
.intro-topic .chip.node { white-space: normal; text-align: center; max-width: 100%; line-height: 1.2; }
.stage .intro-topic .chip { font-size: 1.9em; padding: .3em .9em; }
.intro-new { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ok-2, var(--accent)); }
.stage .intro-new { font-size: 1.2em; }
/* the vote on the phone: four big buttons */
.vote-grid { flex: 1; display: grid; grid-template-columns: 1fr; grid-auto-rows: 1fr; gap: 10px; margin-top: 12px; min-height: 0; }
.vbtn { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 64px; padding: 10px 12px 10px 16px; border-radius: 18px; text-align: left; background: color-mix(in srgb, var(--oc) 22%, var(--surface)); border: 2px solid color-mix(in srgb, var(--oc) 55%, transparent); border-left: 10px solid var(--oc); color: var(--text); transition: transform .08s, opacity .25s, background .15s; }
.vbtn:active { transform: scale(.98); }
.vbtn .vb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vbtn small { font-size: 12px; font-weight: 700; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vbtn b { font-size: 18px; font-weight: var(--w-strong); line-height: 1.18; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vbtn .vb-ok { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--oc-fg, #fff); color: var(--oc); visibility: hidden; }
.vbtn .vb-n { flex: none; font-size: 22px; font-weight: 900; min-width: 1.2em; text-align: right; }
.vbtn .vb-n:empty { display: none; }
.vbtn.on { background: var(--oc); border-color: var(--oc); color: var(--oc-fg, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--oc) 40%, transparent); }
.vbtn.on small { color: inherit; opacity: .85; }
.vbtn.on .vb-ok { visibility: visible; }
.vbtn.lost { opacity: .45; }
.vbtn.won { outline: 3px solid var(--text); outline-offset: 2px; }
.vbtn:disabled { cursor: default; }
@media (max-width: 340px), (max-height: 600px) {
  .vote-grid { gap: 7px; margin-top: 8px; }
  .vbtn { min-height: 56px; padding: 7px 9px 7px 12px; border-radius: 15px; }
  .vbtn b { font-size: 16px; }
  .vbtn .vb-ok { width: 28px; height: 28px; }
}

/* study curriculum (curriculum.json): the switch «Nach Fach | Nach Studienjahr», modules in the chooser and in practice */
.ft-head .ft-by { margin: 0 0 10px; }
.ft-sec .ft-by { margin: 2px 0 10px; }
.ft-mcb { flex: none; width: 22px; height: 22px; margin: 0 11px; accent-color: var(--accent); cursor: pointer; }
.ft-mod .ft-name small { white-space: normal; }
.ft-src { padding: 10px 6px 4px; color: var(--text-3); }
.cur-switch { margin: 4px 0 12px; }
.cur-mod small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.host-fine { margin-top: .4em; }
.cur-mod .wk-l span { white-space: normal; overflow: visible; text-overflow: clip; }

/* ============================================================ sound questions (qaudio.js) and picture answers */
.qaudio { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; margin: 10px 0 8px; }
.qaudio .qa-play { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--accent); color: var(--primary-fg, #fff); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 45%, transparent); }
.qaudio .qa-play:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.qaudio .qa-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.qaudio .qa-state { font-size: 15px; font-weight: var(--w-strong); }
.qaudio .qa-sub:empty { display: none; }
.qaudio .qa-credit { grid-column: 1 / -1; text-align: left; }
.qaudio .qa-credit .qimg-credit { text-align: left; display: block; }
.qa-wave { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 3px; }
.qa-wave i { width: 4px; height: 10px; border-radius: 2px; background: currentColor; animation: qaWave .9s ease-in-out infinite; }
.qa-wave i:nth-child(2) { animation-delay: .12s; } .qa-wave i:nth-child(3) { animation-delay: .24s; } .qa-wave i:nth-child(4) { animation-delay: .36s; } .qa-wave i:nth-child(5) { animation-delay: .48s; }
@keyframes qaWave { 0%, 100% { height: 8px; } 50% { height: 26px; } }
.qaudio[data-state="playing"] .qa-wave { display: flex; }
.qaudio[data-state="playing"] .qa-ico { visibility: hidden; }
.qaudio[data-state="loading"] .qa-play { opacity: .7; }
.qaudio[data-state="muted"] .qa-play, .qaudio[data-state="blocked"] .qa-play { animation: qaNudge 1.6s ease-in-out infinite; }
@keyframes qaNudge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.qaudio[data-state="error"] .qa-play, .qaudio[data-state="novoice"] .qa-play { background: var(--surface-2); color: var(--text-3); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .qa-wave i, .qaudio .qa-play { animation: none !important; } .qa-wave i { height: 16px; } }
/* a sound question without text ("Was hörst du?") keeps the box compact */
.qbox .qaudio + .qcard:empty { display: none; }
.timer.listening .timer-fill { opacity: .45; }
.timer.listening .timer-label { opacity: .8; }
.timer.listening .tl-s { display: none; }
.ans-credits { margin: 8px 2px 0; font-size: 10.5px; line-height: 1.45; color: var(--text-3); }
.ans-credits .ac-one { margin-right: 6px; }
.ans-credits .qimg-credit { display: inline; }
.qa-mini-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 8px 0 0; }
.qa-mini-row .qa-mini svg { width: 16px; height: 16px; vertical-align: -3px; }
.rv-item .qa-mini-row { margin-left: 32px; }
/* presenter screen: a big button in the middle of the room's screen */
.bm-qaudio { display: flex; justify-content: center; margin-top: .5em; }
.bm-qaudio .qaudio { margin: 0; width: auto; max-width: 80%; font-size: 1.7em; }
.bm-qaudio .qaudio .qa-play { width: 2.9em; height: 2.9em; }
.bm-qaudio .qaudio .qa-play svg { width: 1.3em; height: 1.3em; }
.bm-qaudio .qa-state { font-size: 1.1em; }
.bm-qaudio.small .qaudio { font-size: .8em; width: auto; }

/* Christmas garland over the whole width of wide windows (owner, 28.11.2026): a band of the slim garland behind the
   big one on the home; on the other screens it replaces the slim garland that stopped at the 560 px column */
.xmas-band { display: none; }
@media (min-width: 600px) {
  .xmas-band { display: flex; justify-content: center; position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 6px); z-index: 57; pointer-events: none; overflow: hidden; }
  .xmas-band svg { flex: none; width: 390px; height: 40px; display: block; }
  .xmas-band.full svg { height: 66px; }
  .xmas-deco.slim { display: none; }
}
body.xmas[data-route="duel"] .xmas-band, body.xmas[data-route="play"] .xmas-band, body.xmas[data-route="daily"] .xmas-band, body.xmas[data-route="practice"] .xmas-band { display: none; }
body.xmas-still .xmas-band .xm-light, body.xmas-still .xmas-band .xm-tw, body:has(.modal-back) .xmas-band .xm-light { animation-play-state: paused; }
/* game screens: the title pill sits in the true middle, whether one or two buttons are on the right (owner, 28.11.2026) */
.screen.duel > .topline, .screen.play > .topline, .screen.practice > .topline, .screen.host > .topline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.screen.duel > .topline > :first-child, .screen.play > .topline > :first-child, .screen.practice > .topline > :first-child, .screen.host > .topline > :first-child { justify-self: start; }
.screen.duel > .topline > .snd-row, .screen.play > .topline > .snd-row, .screen.practice > .topline > .snd-row, .screen.host > .topline > .snd-row { justify-self: end; }
/* home: flame | tier badge | hearts in one row on the avatar's lower edge; the series line under the greeting goes (owner, 28.11.2026) */
.pc-badges { position: absolute; left: 50%; bottom: -11px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; white-space: nowrap; z-index: 2; }
.home-beta .pc-badges { bottom: -.8em; }
.pc-badges .pc-tier, .home-beta .pc-badges .pc-tier { position: static; transform: none; bottom: auto; left: auto; }
.pc-badges .pc-streak, .pc-badges .pc-hearts { position: static; background: var(--bg-solid); border: 2px solid var(--line); border-radius: 999px; padding: 3px 9px; font-weight: 900; font-size: 13px; color: var(--text); box-shadow: 0 4px 10px rgba(0,0,0,.14); }
.pc-badges .pc-hearts[hidden], .pc-badges .pc-streak[hidden] { display: none; }
.home-beta .pc-sub { display: none !important; }
.fam-hub-top { margin: 4px 0 14px; }
.fam-hub-top .fam-hub { width: 100%; }
.home-beta .pc-lives { display: none !important; } /* the hearts sit beside the tier badge now */
