/* ZeroWichtel – Stylesheet. Keine externen Schriften, keine externen Ressourcen. */

:root {
  --paper: #f7f3ea;
  --surface: #fffdf8;
  --surface-2: #f0ebdf;
  --ink: #1d1b16;
  --ink-2: #5b564b;
  --line: #ddd5c4;
  --fir: #1f3d2b;
  --fir-2: #2e5a40;
  --berry: #b3263e;
  --berry-soft: #f6dfe3;
  --gold: #b8862b;
  --ok: #2e6b45;
  --ok-soft: #e1efe5;
  --warn: #8a5a00;
  --warn-soft: #fbefd5;
  --err: #a1192f;
  --err-soft: #fbe2e6;
  --focus: #2b6cb0;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 1px 0 rgba(30, 25, 10, .04), 0 6px 20px -12px rgba(30, 25, 10, .25);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111612;
    --surface: #18201a;
    --surface-2: #1f2a22;
    --ink: #ece7db;
    --ink-2: #a9a393;
    --line: #2f3b32;
    --fir: #8fc6a2;
    --fir-2: #a8d8b8;
    --berry: #ef6b80;
    --berry-soft: #3a1d23;
    --gold: #d9ae5a;
    --ok: #8fd1a6;
    --ok-soft: #1c3325;
    --warn: #f0c56a;
    --warn-soft: #3a2f16;
    --err: #ff8a9b;
    --err-soft: #3d1a20;
    --focus: #8ab8ff;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 8px 24px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--font);
}

a { color: var(--fir-2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* ---------- Kopf und Fuß ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 19px; letter-spacing: -.01em; }
.brand b { color: var(--berry); font-weight: 700; }
.lock { font-size: 12px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px 2px 22px; position: relative; }
.lock::before { content: ""; position: absolute; left: 9px; top: 50%; width: 7px; height: 6px; margin-top: -1px; border: 1.5px solid currentColor; border-radius: 1.5px; }
.lock::after { content: ""; position: absolute; left: 10px; top: 50%; width: 5px; height: 5px; margin-top: -6px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 4px 4px 0 0; }

main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 8px 16px 40px; outline: none; }
main:focus, main:focus-visible { outline: none; }

.footer {
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center;
  padding: 20px 16px max(20px, env(safe-area-inset-bottom));
  font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line);
}
.footer a { color: var(--ink-2); }

/* ---------- Typografie ---------- */

h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; }
h1 { font-family: var(--serif); font-size: clamp(28px, 6vw, 40px); font-weight: 600; margin: 12px 0 10px; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 20px 0 8px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.lead { font-size: 18px; color: var(--ink); margin: 0 0 18px; }
.muted, .hint { color: var(--ink-2); }
.hint { font-size: 14px; margin: 6px 0 0; }
.center { text-align: center; }
.mono, .recovery-code, .print-code { font-family: var(--mono); }
.accent { color: var(--berry); }

.md p { margin: 0 0 .7em; }
.md p:last-child, .md ul:last-child { margin-bottom: 0; }
.md ul { margin: 0 0 .7em; padding-left: 1.3em; }

/* ---------- Seite, Karten ---------- */

.page { display: flex; flex-direction: column; gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.card-quiet { box-shadow: none; background: transparent; }
.card-attention { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent), var(--shadow); }
.card-danger summary { color: var(--err); }
details.card > summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "+"; font-weight: 400; font-size: 20px; color: var(--ink-2); }
details.card[open] > summary { margin-bottom: 14px; }
details.card[open] > summary::after { content: "–"; }

.hero { padding: 20px 0 6px; }
.hero h1 { font-size: clamp(34px, 8vw, 52px); margin-top: 6px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.round-head h1 { margin-bottom: 4px; }
.round-kicker { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
@media (max-width: 420px) {
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 8px; }
}

.steps { margin: 0 0 12px; padding-left: 1.3em; }
.steps li { margin-bottom: 8px; }

/* ---------- Bedienelemente ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn-primary { background: var(--fir); border-color: var(--fir); color: #fff; }
.btn-primary:hover { background: var(--fir-2); border-color: var(--fir-2); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #0f1a12; } }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-danger { color: var(--err); }
.btn-danger.btn:not(.btn-ghost) { border-color: var(--err); }
.btn-small { min-height: 34px; padding: 4px 12px; font-size: 14px; }
.btn-large { min-height: 50px; padding: 10px 22px; font-size: 16px; }
.is-selected { box-shadow: 0 0 0 3px color-mix(in srgb, var(--fir) 30%, transparent); }

.form { display: flex; flex-direction: column; gap: 16px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
input:focus, textarea:focus { border-color: var(--fir-2); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--fir-2) 25%, transparent); }
.input-suffix { display: flex; align-items: center; gap: 8px; max-width: 180px; }

.mode-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.mode-option {
  display: flex; gap: 10px; align-items: flex-start; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; background: var(--paper);
}
.mode-option:has(input:checked) { border-color: var(--fir); box-shadow: 0 0 0 2px color-mix(in srgb, var(--fir) 35%, transparent); }
.mode-option input { margin-top: 4px; accent-color: var(--fir); }
.mode-option span { display: flex; flex-direction: column; }
.mode-option small { color: var(--ink-2); font-size: 14px; }

.editor .toolbar { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.tool { min-width: 36px; height: 34px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px; }
.tool-b { font-weight: 800; }
.tool-i { font-style: italic; font-family: var(--serif); }
.tool-u { text-decoration: underline; }
.counter { margin-left: auto; font-size: 12px; color: var(--ink-2); }
.preview-toggle { margin-top: 6px; font-size: 14px; }
.preview-toggle summary { cursor: pointer; color: var(--ink-2); }
.md-preview { padding: 10px 12px; margin-top: 6px; border: 1px dashed var(--line); border-radius: var(--radius-s); font-size: 15px; }

/* ---------- Chips, Hinweise ---------- */

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-muted { background: transparent; border: 1px solid var(--line); }
.chip-wichteln { background: var(--berry-soft); color: var(--berry); }
.chip-schrott { background: var(--warn-soft); color: var(--warn); }
.chip-admin { background: var(--fir); color: var(--paper); }

.notice { padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface-2); }
.notice-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.notice-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.notice-error { background: var(--err-soft); border-color: transparent; color: var(--err); }
.stats { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }

/* ---------- Listen ---------- */

.round-list, .people { list-style: none; margin: 0; padding: 0; }
.round-list li, .people li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.round-list li:first-child, .people li:first-child { border-top: 0; }
.round-link { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); min-width: 0; }
.round-link-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.round-link-meta { font-size: 13px; color: var(--ink-2); }
.people .empty { color: var(--ink-2); display: block; }
.person { flex-wrap: wrap; }
.person-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.person-name { font-weight: 600; word-break: break-word; }
.person-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.person-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.add-person { display: flex; gap: 8px; margin-top: 12px; }
.add-person input { flex: 1; }

.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-body {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; min-width: 190px;
  display: flex; flex-direction: column; align-items: stretch; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow);
}
.menu-body .btn { justify-content: flex-start; border-radius: 8px; }

.share-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

.rsvp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.recovery { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; justify-content: space-between; }
.recovery-code { font-size: 17px; letter-spacing: .04em; background: var(--surface-2); padding: 10px 12px; border-radius: var(--radius-s); margin: 0; user-select: all; }
.code-group { white-space: nowrap; display: inline-block; }
.qr { border-radius: 8px; background: #fff; padding: 0; flex: none; }

.loading { display: flex; align-items: center; gap: 10px; padding: 40px 0; color: var(--ink-2); justify-content: center; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--fir); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } * { transition: none !important; } }

.toasts { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; width: min(92vw, 420px); }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow); font-size: 15px; transition: opacity .4s, transform .4s; }
.toast-error { background: var(--err); color: #fff; }
.toast-ok { background: var(--fir); color: #fff; }
@media (prefers-color-scheme: dark) { .toast-ok { color: #0f1a12; } }
.toast-out { opacity: 0; transform: translateY(8px); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Druck: nur der Wiederherstellungsbogen ---------- */

.print-sheet { display: none; }
@media print {
  body.printing > *:not(.print-sheet) { display: none !important; }
  body.printing .print-sheet { display: block; color: #000; background: #fff; font: 12pt/1.5 var(--font); }
  .print-sheet h1 { font-size: 18pt; }
  .print-code { font-size: 18pt; letter-spacing: .06em; border: 1px solid #000; padding: 10pt; }
}

/* ---------- Meilenstein 2: Regeln, Ziehung, Wünsche, Wichtelpost ---------- */

input[type="url"], input[type="email"], select {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 10px 12px; min-height: 44px;
}
input[type="url"]:focus, input[type="email"]:focus, select:focus { border-color: var(--fir-2); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--fir-2) 25%, transparent); }

.groups { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.group { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px; background: var(--paper); }
.group-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.assign-list, .ex-list { list-style: none; margin: 12px 0 0; padding: 0; }
.assign-list li, .ex-list li { display: grid; grid-template-columns: 1fr minmax(140px, 46%); gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.ex-list li { grid-template-columns: 1fr auto; }
.ex-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 10px; }
@media (max-width: 480px) { .ex-add { grid-template-columns: 1fr 1fr; } .ex-add button { grid-column: span 2; } }

.inline-details summary { cursor: pointer; font-weight: 600; color: var(--err); margin-top: 8px; }

.check { display: flex; gap: 8px; align-items: center; font-weight: 600; margin-bottom: 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--fir); }
.wish-item { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; margin-bottom: 12px; background: var(--paper); }
.wish-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.wish-item textarea, .wish-item input { background: var(--surface); }
.wish-editor .form-actions { margin-top: 6px; }

.card-reveal { border-color: var(--berry); box-shadow: 0 0 0 3px color-mix(in srgb, var(--berry) 18%, transparent), var(--shadow); }
.reveal-kicker { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--berry); font-weight: 700; }
.reveal-name { font-family: var(--serif); font-size: clamp(30px, 8vw, 42px); font-weight: 600; margin: 2px 0 6px; line-height: 1.15; word-break: break-word; }
.wishes { margin: 0 0 10px; padding-left: 1.4em; }
.wishes li { margin-bottom: 10px; }
.wish-noidea { font-style: italic; }
.ext-link { display: inline-block; margin-top: 2px; font-weight: 600; }
.nogo { background: var(--err-soft); color: var(--ink); border-radius: var(--radius-s); padding: 10px 12px; margin: 10px 0; }
.nogo .md { display: inline; }
.nogo .md p { display: inline; }

.thread { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); }
.msg p { margin: 2px 0; white-space: pre-wrap; word-break: break-word; }
.msg-mine { align-self: flex-end; background: var(--ok-soft); border-bottom-right-radius: 4px; }
.msg-other { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-who { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.msg-day { font-size: 11px; color: var(--ink-2); }
.msg-compose { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.msg-compose textarea { min-height: 64px; }

/* ---------- Meilenstein 3: Regeln und Spiel ---------- */

.preset-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 12px; }
.rules-custom, .rules-preview { margin-top: 10px; }
.rules-custom > summary, .rules-preview > summary { cursor: pointer; font-weight: 600; color: var(--fir-2); margin-bottom: 10px; }
.phase-edit { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; margin: 10px 0; background: var(--paper); }
.phase-edit-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.phase-duration { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.phase-duration select { flex: 1; }
.phase-duration .input-suffix { max-width: 130px; }
.phase-no {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%; background: var(--fir); color: var(--paper);
  font-size: 13px; font-weight: 700; margin-right: 6px;
}

.action-table { width: 100%; border-collapse: collapse; }
.action-table th, .action-table td { padding: 6px 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.action-table tr:first-child th, .action-table tr:first-child td { border-top: 0; }
.action-table th { width: 48px; }
.action-edit th { width: 44px; padding-right: 2px; }
.action-edit td { padding-left: 4px; }
.action-edit td select { min-height: 38px; padding: 6px 10px; }
.face-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 6px; border-radius: 8px;
  background: var(--surface); border: 1.5px solid var(--ink); font-weight: 800; font-variant-numeric: tabular-nums;
}
.rules-phase { margin: 12px 0; }
.rules-phase-head { display: flex; align-items: center; margin: 0 0 6px; flex-wrap: wrap; }
.rules-end { font-weight: 600; margin-bottom: 0; }

/* Vollbild-Spiel */
body.game-open { overflow: hidden; }
.game {
  position: fixed; inset: 0; z-index: 40; overflow-y: auto; background: var(--paper);
  padding: max(12px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}
.game-body { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.game-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.game-title { margin: 0; font-size: 14px; color: var(--ink-2); }
.game-phase { margin: 2px 0 0; font-size: 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.game-phase .phase-no { margin-right: 0; }
.game-close { font-size: 20px; min-width: 44px; }
.game-status { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.timer { font-family: var(--mono); font-size: clamp(56px, 18vw, 96px); font-weight: 700; margin: 0; line-height: 1; font-variant-numeric: tabular-nums; }
.timer-up { color: var(--berry); }
.game-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.center-counter { display: flex; align-items: center; justify-content: center; gap: 14px; }
.center-counter p { margin: 0; display: flex; flex-direction: column; align-items: center; font-size: 14px; color: var(--ink-2); }
.center-count { font-size: 56px; font-weight: 800; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.counter-btn { width: 56px; height: 56px; font-size: 26px; padding: 0; }

.dice-area { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dice-row { display: flex; gap: 18px; background: none; border: 0; padding: 6px; cursor: pointer; border-radius: 20px; }
.die {
  width: 104px; height: 104px; padding: 14px; border-radius: 20px;
  background: var(--surface); border: 2px solid var(--ink);
  box-shadow: 0 6px 0 var(--ink); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  place-items: center;
}
.pip { width: 18px; height: 18px; border-radius: 50%; background: transparent; }
.pip.on { background: var(--berry); }
.die.rolling { animation: wobble .14s linear infinite; }
@keyframes wobble { 0% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) translateY(-3px); } 100% { transform: rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .die.rolling { animation: none; } }
.roll-btn { min-width: 200px; }
.roll-result { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; padding: 12px 16px; border-radius: var(--radius); font-weight: 600; text-align: left; }
.roll-hit { background: var(--berry-soft); color: var(--ink); border: 2px solid var(--berry); }
.roll-miss { background: var(--surface-2); color: var(--ink-2); }
.roll-sum { font-size: 34px; font-weight: 800; color: var(--berry); line-height: 1; }
.roll-miss .roll-sum { color: var(--ink-2); }
.roll-history { margin: 0; font-size: 13px; color: var(--ink-2); }
.game-actions { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
.game-actions .action-table td { font-size: 17px; }
.action-table tr.is-hit td, .action-table tr.is-hit th { background: var(--berry-soft); }
.game-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.game-foot .check { margin: 0; }
.game-end { text-align: center; padding: 40px 0; }
.game-end-big { font-family: var(--serif); font-size: clamp(48px, 14vw, 80px); margin: 0 0 10px; color: var(--berry); }
.center { justify-content: center; }

/* ---------- Meilenstein 4: E-Mail ---------- */
.add-person-email { display: grid; grid-template-columns: 1fr 1fr auto; }
@media (max-width: 520px) { .add-person-email { grid-template-columns: 1fr; } }
.admin-mail { margin-top: 6px; }
.inline-form { display: flex; gap: 8px; margin-top: 4px; }
.inline-form input { flex: 1; }
.email-box { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Meilenstein 5: Rechtstexte ---------- */
.operator { font-style: normal; line-height: 1.6; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 8px; border-top: 1px solid var(--line); }
.legal-table th { font-size: 13px; color: var(--ink-2); border-top: 0; }

/* ---------- Admin-Bereich ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 .field { margin-bottom: 0; }
.new-code { margin-top: 8px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.new-code .qr { align-self: center; }
.log-list { list-style: none; margin: 0 0 8px; padding: 0; font-size: 14px; }
.log-list li { display: flex; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.log-list li:first-child { border-top: 0; }
.log-time { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) {
  .log-list li { flex-direction: column; gap: 2px; }
}
