/* =====================================================================
   Spielerpass – Konto für alle Spiele auf shyundrak.de/games
   Grundlage ist der Zeichenblock von Kritzel (Papier, Tusche, Textmarker,
   harte versetzte Schatten), damit der Charakter-Editor gleich aussieht.
   ===================================================================== */
@font-face {
  font-family: 'Bricolage';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/bricolage/bricolage-grotesque-latin-opsz-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/bricolage/bricolage-grotesque-latin-ext-opsz-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('../fonts/caveat/caveat-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Farben ---------- */
:root,
[data-theme='light'] {
  --paper: #f3eee3;        /* Seite */
  --paper-2: #fdfaf3;      /* Blätter, Karten */
  --paper-3: #e8e0cf;      /* leichte Flächen */
  --ink: #1f1c18;          /* Tusche */
  --ink-2: #5d564b;        /* Bleistift */
  --line: #1f1c18;         /* Konturen */
  --line-soft: #cfc4ae;
  --dot: rgb(31 28 24 / 0.13);
  --rule: rgb(47 108 223 / 0.14); /* Linien im Chat */
  --marker: #ffd23f;       /* Textmarker gelb – Hauptakzent */
  --marker-ink: #1f1c18;
  --hl-green: rgb(52 199 120 / 0.32);
  --hl-yellow: rgb(255 210 63 / 0.55);
  --hl-red: rgb(232 85 61 / 0.22);
  --red: #d9482b;
  --blue: #2d6cdf;
  --green: #17865a;
  --focus: #2d6cdf;
  --shadow: 3px 3px 0 var(--line);
  --shadow-lg: 5px 5px 0 var(--line);
  --canvas-edge: var(--line);
  color-scheme: light;
}
[data-theme='dark'] {
  --paper: #1c2023;
  --paper-2: #252a2e;
  --paper-3: #2f353a;
  --ink: #efeae0;
  --ink-2: #a9a397;
  --line: #efeae0;
  --line-soft: #454c52;
  --dot: rgb(239 234 224 / 0.08);
  --rule: rgb(239 234 224 / 0.06);
  --marker: #ffd23f;
  --marker-ink: #1f1c18;
  --hl-green: rgb(79 209 160 / 0.22);
  --hl-yellow: rgb(255 210 63 / 0.2);
  --hl-red: rgb(255 122 89 / 0.2);
  --red: #ff7a59;
  --blue: #7aa7ff;
  --green: #4fd1a0;
  --focus: #7aa7ff;
  --shadow: 3px 3px 0 #0b0d0e;
  --shadow-lg: 5px 5px 0 #0b0d0e;
  --canvas-edge: #0b0d0e;
  color-scheme: dark;
}

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Bricolage', ui-sans-serif, system-ui, sans-serif;
  font-optical-sizing: auto;
  font-size: 16px;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.05; margin: 0; letter-spacing: -0.02em; font-weight: 800; }
p { margin: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 0.85rem; }
.hand { font-family: 'Caveat', cursive; font-weight: 700; letter-spacing: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 1.1em; height: 1.1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--marker); color: var(--marker-ink); }

/* Textmarker-Effekt für einzelne Wörter */
.hl { background: linear-gradient(transparent 55%, var(--hl-yellow) 55%, var(--hl-yellow) 92%, transparent 92%); padding: 0 0.1em; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  border: 2px solid var(--line); background: var(--paper-2); color: var(--ink);
  padding: 0.5rem 0.95rem; border-radius: 8px; font-weight: 700; cursor: pointer;
  text-decoration: none; box-shadow: 2px 2px 0 var(--line); white-space: nowrap;
  transition: transform 0.08s, box-shadow 0.08s, background 0.12s;
}
[data-theme='dark'] .btn { box-shadow: 2px 2px 0 #0b0d0e; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--line); }
[data-theme='dark'] .btn:hover { box-shadow: 3px 3px 0 #0b0d0e; }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--line); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--marker); color: var(--marker-ink); }
[data-theme='dark'] .btn-primary { border-color: var(--marker); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--paper-3); color: var(--ink); box-shadow: none; transform: none; }
[data-theme='dark'] .btn-ghost, [data-theme='dark'] .btn-ghost:hover { box-shadow: none; }
.btn-ghost:active { transform: none; }
.btn-danger:hover { color: var(--red); }
.btn-lg { padding: 0.7rem 1.25rem; font-size: 1.08rem; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.86rem; border-width: 2px; }
.btn-icon { padding: 0.45rem; }

/* ---------- Formulare ---------- */
.input, select.input, textarea.input {
  width: 100%; background: var(--paper-2); border: 2px solid var(--line); border-radius: 8px;
  padding: 0.55rem 0.75rem; transition: box-shadow 0.12s;
}
.input::placeholder { color: var(--ink-2); opacity: 0.75; }
.input:focus { outline: none; box-shadow: 3px 3px 0 var(--marker); }
.input:disabled { opacity: 0.65; border-style: dashed; }
select.input { appearance: none; padding-right: 2rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea.input { resize: vertical; min-height: 5rem; line-height: 1.4; }
label.field, .field { display: grid; gap: 0.3rem; font-size: 0.85rem; font-weight: 700; }

/* ---------- Blätter ---------- */
.card { background: var(--paper-2); border: 2px solid var(--line); border-radius: 10px; padding: 1.2rem; box-shadow: var(--shadow); }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.65rem;
  border: 2px solid var(--line-soft); border-radius: 999px; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  user-select: none; background: var(--paper-2);
}
.chip input { accent-color: var(--ink); margin: 0; }
.chip:has(input:checked) { border-color: var(--line); background: var(--hl-yellow); }
.chip:has(input:disabled) { cursor: default; }
.switch { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; font-weight: 600; }
.switch input { width: 2.5rem; height: 1.4rem; appearance: none; background: var(--paper-3); border: 2px solid var(--line); border-radius: 999px; position: relative; cursor: pointer; flex: none; margin: 0; transition: background 0.12s; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 0.95rem; height: 0.95rem; border-radius: 50%; background: var(--ink); transition: transform 0.15s; }
.switch input:checked { background: var(--marker); }
.switch input:checked::after { transform: translateX(1.1rem); background: var(--marker-ink); }
.switch input:disabled { opacity: 0.55; cursor: default; }

.avatar { width: 2.4rem; height: 2.4rem; flex: none; display: inline-block; line-height: 0; }
.avatar svg { width: 100%; height: 100%; overflow: visible; }
.avatar.sm { width: 1.7rem; height: 1.7rem; }
.avatar.lg { width: 3.4rem; height: 3.4rem; }
.avatar.xl { width: 4.6rem; height: 4.6rem; }

.spinner { width: 26px; height: 26px; border: 3px solid var(--line-soft); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { display: grid; place-items: center; min-height: 50vh; }


/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); display: grid; gap: 0.5rem; z-index: 100; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: var(--paper); padding: 0.65rem 1rem; border-radius: 8px; box-shadow: 3px 3px 0 var(--marker); font-weight: 600; animation: pop 0.18s ease-out; }
.toast.error { box-shadow: 3px 3px 0 var(--red); }
.toast.ok { box-shadow: 3px 3px 0 var(--green); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
@keyframes fade { from { opacity: 0; } }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.65rem; }
.section-head h2 { font-size: 1.3rem; }

/* ---------- Reiter & Formulare ---------- */
.tabs { display: flex; gap: 0; margin-bottom: 1.1rem; border-bottom: 2px solid var(--line); }
.tabs button { border: 2px solid transparent; border-bottom: 0; background: transparent; padding: 0.45rem 0.9rem; border-radius: 8px 8px 0 0; font-weight: 700; cursor: pointer; color: var(--ink-2); margin-bottom: -2px; }
.tabs button[aria-selected='true'] { background: var(--paper-2); border-color: var(--line); color: var(--ink); }
.tabs button:hover { color: var(--ink); }
.form { display: grid; gap: 0.9rem; }
.form-error { color: var(--red); font-size: 0.9rem; font-weight: 600; min-height: 1.3em; margin: -0.25rem 0 0; }

/* ---------- Dialog & Charakter-Editor (wie Kritzel) ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgb(31 28 24 / 0.55); display: grid; place-items: center; padding: 1rem; animation: fade 0.15s; overflow: auto; }
.modal { width: min(100%, 840px); max-height: calc(100dvh - 2rem); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0.9rem; animation: pop 0.18s ease-out; box-shadow: var(--shadow-lg); }
.modal .section-head { margin: 0; align-items: center; }
.modal-foot { display: flex; justify-content: flex-end; gap: 0.5rem; }
.char-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.2rem; min-height: 0; }
.char-preview { display: grid; justify-items: center; align-content: start; gap: 0.5rem; padding: 1rem; background: var(--paper); border: 2px dashed var(--line-soft); border-radius: 8px; }
.char-big { width: 180px; height: 180px; }
.char-big svg { width: 100%; height: 100%; overflow: visible; }
.char-name { font-weight: 800; font-size: 1.1rem; }
.char-side { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 0.6rem; min-height: 0; }
.char-tabs { margin: 0; overflow-x: auto; scrollbar-width: none; }
.char-tabs button { padding: 0.4rem 0.7rem; font-size: 0.92rem; white-space: nowrap; }
.char-panel { overflow-y: auto; max-height: min(56dvh, 520px); padding: 0.1rem 0.3rem 0.3rem 0.1rem; display: grid; gap: 1rem; align-content: start; }
.char-sec h3 { font-family: 'Caveat', cursive; font-size: 1.35rem; font-weight: 700; margin: 0 0 0.3rem; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.opt { aspect-ratio: 1; padding: 3px; border-radius: 8px; border: 2px solid var(--line-soft); background: var(--paper); cursor: pointer; line-height: 0; transition: border-color 0.1s; }
.opt:hover { border-color: var(--line); }
.opt[aria-pressed='true'] { border-color: var(--line); background: var(--hl-yellow); box-shadow: 2px 2px 0 var(--line); }
.opt svg { width: 100%; height: 100%; overflow: hidden; }
.color-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.sw[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--paper-2), 0 0 0 4px var(--line); }
.picker { position: relative; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: #fff;
  background: conic-gradient(#ff4d4d, #ffd23f, #4edea3, #48dbfb, #5f27cd, #ff9ff3, #ff4d4d); border: 2px solid var(--line); }
.picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.picker span { pointer-events: none; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.6)); display: grid; }
.picker.custom { background: var(--pick); box-shadow: 0 0 0 2px var(--paper-2), 0 0 0 4px var(--line); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.tpl { display: grid; justify-items: center; gap: 0.2rem; padding: 0.4rem 0.3rem 0.45rem; border-radius: 8px; border: 2px solid var(--line-soft); background: var(--paper); cursor: pointer; font-size: 0.8rem; font-weight: 700; color: var(--ink); transition: transform 0.1s, border-color 0.1s; }
.tpl:hover { border-color: var(--line); transform: rotate(-1.5deg); }
.tpl-fig { width: 64px; height: 64px; line-height: 0; }
.tpl-fig svg { width: 100%; height: 100%; overflow: visible; }
.tpl > span:last-child { max-width: 100%; text-align: center; line-height: 1.15; hyphens: auto; overflow-wrap: anywhere; }

/* =====================================================================
   Eigenes für den Spielerpass
   ===================================================================== */
.topbar {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem clamp(1rem, 3vw, 1.75rem);
  border-bottom: 2px solid var(--line); background: var(--paper);
}
.topbar .back { font-weight: 700; text-decoration: none; color: var(--ink-2); display: inline-flex; align-items: center; gap: 0.3rem; }
.topbar .back:hover { color: var(--ink); }
.topbar .brand { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.7rem; line-height: 1; transform: rotate(-2deg); margin-left: auto; }
.topbar .brand b { background: var(--marker); color: var(--marker-ink); padding: 0 0.04em 0 0.2em; }
.view { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: clamp(1rem, 3vw, 2.2rem) clamp(1rem, 3vw, 1.5rem) 3rem; }

/* ---------- Abgemeldet ---------- */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; min-height: calc(100dvh - 10rem); }
.pitch h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); letter-spacing: -0.045em; line-height: 0.92; margin: 0.3rem 0 1.4rem; }
.pitch .kicker { font-size: 1.5rem; color: var(--red); transform: rotate(-2deg); display: inline-block; }
.perks { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 0.7rem; }
.perks li { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.5rem; align-items: baseline; }
.perks li::before { content: ''; width: 0.85rem; height: 0.85rem; border: 2px solid var(--line); background: var(--marker); transform: rotate(45deg) translateY(2px); }
.perks b { font-weight: 800; }
.guest-note { color: var(--ink-2); max-width: 34rem; }
.guest-link { display: inline-flex; margin-top: 0.9rem; font-weight: 700; }
.auth-card { width: 100%; max-width: 400px; justify-self: end; padding: 1.6rem; box-shadow: var(--shadow-lg); position: relative; }
.auth-card::before, .pass::before { /* Klebestreifen */
  content: ''; position: absolute; top: -14px; left: 50%; width: 96px; height: 26px; transform: translateX(-50%) rotate(-3deg);
  background: rgb(255 210 63 / 0.75); border-left: 2px dashed rgb(0 0 0 / 0.12); border-right: 2px dashed rgb(0 0 0 / 0.12);
}
.auth-card h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.return-hint { font-size: 0.9rem; color: var(--ink-2); margin: -0.4rem 0 1rem; }

/* ---------- Pass ---------- */
.profile { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.pass {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.2rem 1.4rem;
  padding: 1.5rem 1.5rem 1.2rem; box-shadow: var(--shadow-lg); transform: rotate(-0.6deg);
  background-image: repeating-linear-gradient(0deg, transparent 0 27px, var(--rule) 27px 28px);
}
.pass-photo { width: 9.5rem; height: 9.5rem; border: 2px solid var(--line); border-radius: 8px; background: var(--paper); line-height: 0; padding: 0.4rem; transform: rotate(1.5deg); box-shadow: 2px 2px 0 var(--line); }
.pass-photo svg { width: 100%; height: 100%; overflow: visible; }
.pass-head { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }
.pass-name { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.035em; margin: 0.35rem 0 0.8rem; overflow-wrap: anywhere; }
.pass-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 1rem; margin: 0; }
.pass-fields dt { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.pass-fields dd { margin: 0; font-weight: 700; }
.pass-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 1rem; border-top: 2px dashed var(--line-soft); }
.pass-actions .btn-ghost { margin-left: auto; }
.stamps { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.stamp {
  display: grid; place-items: center; min-width: 6.4rem; padding: 0.4rem 0.7rem; border: 3px double var(--stamp, var(--red));
  border-radius: 6px; color: var(--stamp, var(--red)); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.78rem; line-height: 1.15; text-align: center; transform: rotate(var(--rot, -4deg)); opacity: 0.9;
}
.stamp b { font-size: 1.35rem; letter-spacing: 0; }
.stamp.off { --stamp: var(--line-soft); opacity: 0.8; }

.side { display: grid; gap: 1.2rem; }
.side h2 { font-size: 1.2rem; margin-bottom: 0.7rem; }
.returnbox { background: var(--marker); color: var(--marker-ink); border-color: #1f1c18; transform: rotate(1deg); }
.returnbox p { margin-bottom: 0.8rem; color: #4a4232; }
.returnbox .btn { background: #fdfaf3; color: #1f1c18; border-color: #1f1c18; box-shadow: 2px 2px 0 #1f1c18; }
.gamelinks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.15rem; }
.gamelinks a { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; padding: 0.55rem 0.2rem; border-bottom: 2px dashed var(--line-soft); text-decoration: none; }
.gamelinks li:last-child a { border-bottom: 0; }
.gamelinks a:hover b { background: var(--hl-yellow); }
.gamelinks small { color: var(--ink-2); }

/* ---------- Kleiner Dialog (Passwort) ---------- */
.modal.small { width: min(100%, 420px); }
.modal.small .form { padding: 0.2rem; }

@media (max-width: 860px) {
  .auth-wrap, .profile { grid-template-columns: 1fr; min-height: 0; }
  .auth-card { justify-self: stretch; max-width: none; }
}
@media (max-width: 560px) {
  .pass { grid-template-columns: 1fr; transform: none; padding: 1.2rem; }
  .pass-photo { width: 7rem; height: 7rem; }
  .topbar .brand { font-size: 1.45rem; }
}
@media (max-width: 640px) {
  .modal-backdrop { padding: 0.5rem; align-items: start; }
  .modal { padding: 0.9rem; }
  .char-layout { grid-template-columns: 1fr; gap: 0.7rem; }
  .char-preview { grid-template-columns: auto 1fr; align-items: center; justify-items: start; padding: 0.5rem 0.8rem; }
  .char-preview .char-big { width: 96px; height: 96px; grid-row: span 2; }
  .char-panel { max-height: 46dvh; }
  .opt-grid { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Stempel je Spiel ---------- */
.stamp[data-game='kritzel'] { --stamp: #b8860b; }
.stamp[data-game='klecks'] { --stamp: #d62f8f; }
.stamp[data-game='galgenfrist'] { --stamp: #a3311c; }
.stamp[data-game='schollenschubsen'] { --stamp: #2a6f9e; }
.stamp[data-game='wurstsalat'] { --stamp: #c0392b; }
.stamp[data-game='wackelturm'] { --stamp: #c9551a; }
.stamp[data-game='zwergengolf'] { --stamp: #3d7a2c; }
.stamp[data-game='flunkerfritze'] { --stamp: #c4473a; }
.stamp[data-game='klugschnacker'] { --stamp: #8a6420; }
.stamp[data-game='siebhirn'] { --stamp: #b4561d; }
.stamp[data-game='kutterkrawall'] { --stamp: #2c6aa8; }
.stamp[data-game='kuckuck'] { --stamp: #a3321f; }
.stamp[data-game='party'] { --stamp: #6b3fa0; }
[data-theme='dark'] .stamp[data-game='kritzel'] { --stamp: #ffd23f; }
[data-theme='dark'] .stamp[data-game='klecks'] { --stamp: #ff6fc0; }
[data-theme='dark'] .stamp[data-game='galgenfrist'] { --stamp: #ff7a59; }
[data-theme='dark'] .stamp[data-game='schollenschubsen'] { --stamp: #7cc4f0; }
[data-theme='dark'] .stamp[data-game='wurstsalat'] { --stamp: #ff7058; }
[data-theme='dark'] .stamp[data-game='wackelturm'] { --stamp: #f27a30; }
[data-theme='dark'] .stamp[data-game='zwergengolf'] { --stamp: #7cc96a; }
[data-theme='dark'] .stamp[data-game='flunkerfritze'] { --stamp: #ff8a7a; }
[data-theme='dark'] .stamp[data-game='klugschnacker'] { --stamp: #f0d9a0; }
[data-theme='dark'] .stamp[data-game='siebhirn'] { --stamp: #f29457; }
[data-theme='dark'] .stamp[data-game='kutterkrawall'] { --stamp: #7dbcf0; }
[data-theme='dark'] .stamp[data-game='kuckuck'] { --stamp: #f07a62; }
[data-theme='dark'] .stamp[data-game='party'] { --stamp: #c39bff; }
.stamp.off { --stamp: var(--line-soft); }

/* ---------- Spielverlauf ---------- */
.history { margin-top: 2.2rem; }
.history .section-head .hand { font-size: 1.3rem; }
.matches { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.6rem; }
.matches .empty { padding: 1.2rem; border: 2px dashed var(--line-soft); border-radius: 10px; color: var(--ink-2); }
.match {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 0.9rem; align-items: center;
  padding: 0.75rem 0.9rem; background: var(--paper-2); border: 2px solid var(--line); border-radius: 10px; box-shadow: 2px 2px 0 var(--line);
}
[data-theme='dark'] .match { box-shadow: 2px 2px 0 #0b0d0e; }
.place { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.04em; text-align: center; color: var(--ink-2); }
.place.p1 { color: var(--marker-ink); background: var(--marker); border: 2px solid var(--line); border-radius: 50%; width: 2.7rem; height: 2.7rem; display: grid; place-items: center; font-size: 1.35rem; transform: rotate(-6deg); }
.place.p2, .place.p3 { color: var(--ink); }
.m-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; }
.m-game { font-weight: 800; }
.match[data-game='kritzel'] .m-game { background: linear-gradient(transparent 55%, var(--hl-yellow) 55% 92%, transparent 92%); }
.match[data-game='klecks'] .m-game { background: linear-gradient(transparent 55%, rgb(255 72 176 / 0.35) 55% 92%, transparent 92%); }
.match[data-game='galgenfrist'] .m-game { background: linear-gradient(transparent 55%, rgb(214 161 42 / 0.45) 55% 92%, transparent 92%); }
.match[data-game='schollenschubsen'] .m-game { background: linear-gradient(transparent 55%, rgb(107 184 230 / 0.4) 55% 92%, transparent 92%); }
.match[data-game='wurstsalat'] .m-game { background: linear-gradient(transparent 55%, rgb(242 178 0 / 0.5) 55% 92%, transparent 92%); }
.match[data-game='wackelturm'] .m-game { background: linear-gradient(transparent 55%, rgb(239 106 28 / 0.35) 55% 92%, transparent 92%); }
.match[data-game='zwergengolf'] .m-game { background: linear-gradient(transparent 55%, rgb(108 176 74 / 0.4) 55% 92%, transparent 92%); }
.match[data-game='flunkerfritze'] .m-game { background: linear-gradient(transparent 55%, rgb(255 138 122 / 0.4) 55% 92%, transparent 92%); }
.match[data-game='klugschnacker'] .m-game { background: linear-gradient(transparent 55%, rgb(240 217 160 / 0.6) 55% 92%, transparent 92%); }
.match[data-game='siebhirn'] .m-game { background: linear-gradient(transparent 55%, rgb(224 113 43 / 0.35) 55% 92%, transparent 92%); }
.match[data-game='kutterkrawall'] .m-game { background: linear-gradient(transparent 55%, rgb(79 157 224 / 0.35) 55% 92%, transparent 92%); }
.match[data-game='kuckuck'] .m-game { background: linear-gradient(transparent 55%, rgb(200 65 45 / 0.3) 55% 92%, transparent 92%); }
.m-party { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.1rem; color: #6b3fa0; transform: rotate(-2deg); }
[data-theme='dark'] .m-party { color: #c39bff; }
.m-players { display: flex; flex-wrap: wrap; gap: 0.15rem 0.8rem; margin: 0.25rem 0 0.2rem; font-size: 0.92rem; }
.m-players small { color: var(--ink-2); font-weight: 600; }
.m-players .me { font-weight: 800; }
.m-players i { font-style: normal; color: var(--ink-2); }
.m-score { text-align: right; font-size: 1.35rem; font-weight: 800; line-height: 1; }
.m-score small { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); margin-top: 0.2rem; }
@media (max-width: 560px) {
  .match { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .m-score { grid-column: 2; text-align: left; font-size: 1.05rem; }
  .m-score small { display: inline; margin-left: 0.3rem; }
}

/* ---------- Minigame-Maniac ---------- */
.maniac { display: grid; gap: 0.3rem; text-decoration: none; background: #23352d; color: #ece2c6; border-color: #17241f; transform: rotate(-1deg); }
.maniac b { font-size: 1.35rem; color: #e8772e; }
.maniac span { font-size: 0.92rem; }
.maniac:hover b { text-decoration: underline; }
.match[data-game='party'] .m-game { font-weight: 700; }
