/* Wichtelmat – gemeinsames Stylesheet für App und Verwaltung. */
/* Layouts je Wichtelrunde: data-layout, data-font und data-fontsize auf <html>. */
:root {
  --bg: #f6f1e6;
  --panel: #fffdf8;
  --field: #ffffff;
  --text: #1f2a24;
  --muted: #556259;
  --brand: #1f4d3a;
  --brand-ink: #fdf8ec;
  --link: #1f4d3a;
  --accent: #b3261e;
  --accent-ink: #ffffff;
  --line: #ddd3bf;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: var(--font);
}
[data-layout="tanne"] {
  --bg: #f6f1e6;
  --panel: #fffdf8;
  --field: #ffffff;
  --text: #1f2a24;
  --muted: #556259;
  --brand: #1f4d3a;
  --brand-ink: #fdf8ec;
  --link: #1f4d3a;
  --accent: #b3261e;
  --accent-ink: #ffffff;
  --line: #ddd3bf;
}
[data-layout="winternacht"] {
  --bg: #0f1b33;
  --panel: #182845;
  --field: #0f1d38;
  --text: #eef2fb;
  --muted: #b4c0da;
  --brand: #0a1226;
  --brand-ink: #f3d98a;
  --link: #f3d98a;
  --accent: #e7bd55;
  --accent-ink: #1b1503;
  --line: #33466c;
  color-scheme: dark;
}
[data-layout="zimt"] {
  --bg: #f7ecdf;
  --panel: #fffaf3;
  --field: #ffffff;
  --text: #3a2417;
  --muted: #735645;
  --brand: #6e3b1f;
  --brand-ink: #fff3e2;
  --link: #6e3b1f;
  --accent: #a8430f;
  --accent-ink: #ffffff;
  --line: #e3ceb6;
}
[data-layout="schnee"] {
  --bg: #eef4f8;
  --panel: #ffffff;
  --field: #ffffff;
  --text: #17293a;
  --muted: #51667a;
  --brand: #dcebf5;
  --brand-ink: #17293a;
  --link: #1d5c86;
  --accent: #c0182b;
  --accent-ink: #ffffff;
  --line: #cddbe6;
}
[data-layout="klar"] {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --field: #ffffff;
  --text: #1c2330;
  --muted: #566074;
  --brand: #1f3a5f;
  --brand-ink: #ffffff;
  --link: #1f4e8c;
  --accent: #1f5fbf;
  --accent-ink: #ffffff;
  --line: #d5d9e0;
}
[data-layout="beere"] {
  --bg: #f7f0f7;
  --panel: #fffbff;
  --field: #ffffff;
  --text: #2d1b33;
  --muted: #6c5473;
  --brand: #5b2a6e;
  --brand-ink: #fdf3ff;
  --link: #5b2a6e;
  --accent: #b0246a;
  --accent-ink: #ffffff;
  --line: #e2d0e6;
}
[data-font="rund"] { --font: 'WM nunito', system-ui, sans-serif; --font-head: var(--font); }
[data-font="klassisch"] { --font: 'WM lora', Georgia, serif; --font-head: var(--font); }
[data-font="festlich"] { --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --font-head: 'WM playfair', Georgia, serif; }
[data-font="handschrift"] { --font: 'WM nunito', system-ui, sans-serif; --font-head: 'WM caveat', cursive; }
[data-font="handschrift"] header.top h1 { font-size: 1.95rem; }
[data-font="handschrift"] .panel h2 { font-size: 1.65rem; }
/* Runden-Link: leer, bis die Optik steht (siehe early.js), dann weich einblenden */
header.top, main { transition: opacity .25s ease; }
html.booting header.top, html.booting main, html.booting .pagetabs { opacity: 0; transition: none; }
html[data-fontsize="large"] { font-size: 112.5%; }
html[data-fontsize="xlarge"] { font-size: 127%; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text); font: 1rem/1.5 var(--font); }
h1, h2 { font-family: var(--font-head); }
a { color: var(--link); }
header.top { background: var(--brand); color: var(--brand-ink); padding: calc(14px + env(safe-area-inset-top)) 16px 14px; }
/* Zarter Verlauf in jedem Design: links genau die Designfarbe (wie theme-color der Statusleiste), nach rechts heller */
header.top { background-image: linear-gradient(90deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 76%, #fff) 100%); }
header.top .inner, main { max-width: 640px; margin: 0 auto; }
header.top h1 { margin: 0; font-size: 1.35rem; text-align: center; }
main { padding: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.panel h2 { margin: 0 0 10px; font-size: 1.15rem; }
/* „Dein Los“, solange noch nicht ausgelost ist: dezentes Warngelb, in jedem Design gleich */
.panel.lot.waiting { background: color-mix(in srgb, #e8a200 15%, var(--panel)); border: 2px solid color-mix(in srgb, #d99000 65%, var(--panel)); }
.muted { color: var(--muted); }
label { display: block; margin: 12px 0 4px; font-weight: 600; }
input, select { width: 100%; padding: 11px 12px; font: inherit; color: inherit; background: var(--field); border: 1px solid var(--line); border-radius: 10px; }
input[type="range"] { padding: 0; background: transparent; border: 0; accent-color: var(--accent); }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.check input { width: auto; }
button { font: inherit; font-weight: 600; padding: 10px 16px; border: 1px solid transparent; border-radius: 10px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button.secondary { background: transparent; color: var(--link); border-color: var(--link); }
button.link { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; font-weight: 400; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.item { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.item .row { margin: 0; }
/* Angaben oben über die volle Breite, Aktionen in eigener Zeile darunter */
.item.stacked { flex-direction: column; align-items: stretch; }
.item.stacked .grow { flex: none; }
.item select { width: auto; }
textarea { width: 100%; padding: 11px 12px; font: inherit; color: inherit; background: var(--field); border: 1px solid var(--line); border-radius: 10px; resize: vertical; }
button.card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin-top: 8px; padding: 12px 14px; text-align: left; background: var(--field); color: var(--text); border-color: var(--line); }
button.card span { font-weight: 400; }
.page-title { margin: 0 0 12px; overflow-wrap: anywhere; }
.savebar { position: sticky; bottom: 0; display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 0 -16px 16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.item strong, button.card strong { overflow-wrap: anywhere; }
.item .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.item .linkbox, .inline-edit { width: 100%; }
.inline-edit input + input { margin-top: 8px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 12px 0 0; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.swatches label { display: block; margin: 0; padding: 8px; border: 2px solid var(--line); border-radius: 12px; font-weight: 400; cursor: pointer; }
.swatches input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatches label:has(input:checked) { border-color: var(--accent); }
.swatches label:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: 2px; }
.swatch { display: flex; height: 28px; margin-bottom: 6px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.swatch i { flex: 1; }
.swatch i:nth-child(1) { background: var(--brand); }
.swatch i:nth-child(2) { background: var(--bg); }
.swatch i:nth-child(3) { background: var(--panel); }
.swatch i:nth-child(4) { background: var(--accent); }
.swatches.covers { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.covers label { padding: 5px; font-size: .85rem; line-height: 1.25; }
.covers .thumb { display: block; width: 100%; aspect-ratio: 3 / 2; margin-bottom: 6px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
/* Titelbild: die Breite (in %) kommt aus den Einstellungen der Runde */
img.cover { display: block; height: auto; max-width: 100%; border-radius: var(--radius); }
img.cover.top { margin: 0 auto 16px; }
img.cover.left { float: left; margin: 4px 14px 8px 0; }
img.cover.right { float: right; margin: 4px 0 8px 14px; }
.intro { display: flow-root; }
.intro h2 { overflow-wrap: anywhere; }
.intro .facts { clear: both; }
/* Zwei Panels nebeneinander, auf schmalen Anzeigen untereinander */
.panelpair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); column-gap: 16px; }
iframe.preview { display: block; width: 100%; max-width: 390px; height: 640px; margin: 0 auto; border: 6px solid #333; border-radius: 24px; background: #fff; }
h3 { margin: 18px 0 0; font-size: 1rem; }
.wish .grow { overflow-wrap: anywhere; }
.iconbtn:disabled:hover { border-color: var(--line); }
.wishlink { font-weight: 700; overflow-wrap: anywhere; }
.lotname { font-size: 1.35rem; overflow-wrap: anywhere; }
.wish.bought .grow { opacity: .6; }
.wish .check { margin: 0; }
/* Verwaltung: etwas breiter, damit die Teilnehmertabelle Platz hat */
body.admin header.top .inner, body.admin main { max-width: 860px; }
table.people { width: 100%; margin-top: 14px; border-collapse: collapse; }
table.people th { padding: 6px 8px; text-align: left; font-size: .85rem; color: var(--muted); border-bottom: 2px solid var(--line); }
table.people td { padding: 10px 8px; vertical-align: top; }
table.people tbody { border-bottom: 1px solid var(--line); }
table.people .who { width: 40%; overflow-wrap: anywhere; }
table.people .actions { width: 1%; white-space: nowrap; }
table.people .detail td { padding-top: 0; overflow-wrap: anywhere; }
.badge { display: inline-block; margin: 0 4px 4px 0; padding: 1px 8px; font-size: .8rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; white-space: nowrap; }
.badge.on { color: #17402f; background: #e8f2ec; border: 1px solid #9cc3ac; }
.badge.no { color: #7d1a14; background: #fdecea; border: 1px solid #e6a29d; }
.badge.wait { color: #6b4a00; background: #fff4d6; border: 1px solid #e3c36a; }
.iconrow { display: flex; gap: 4px; justify-content: flex-end; }
/* höchstens vier Symbole je Reihe, damit die Namensspalte breit bleibt */
table.people .iconrow { flex-wrap: wrap; width: 196px; }
@media (min-width: 621px) { table.people .iconrow:has(> :nth-child(6)) { width: 168px; } }   /* ab 6 Symbolen zwei gleichmäßige Zeilen */
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; color: var(--link); background: transparent; border: 1px solid var(--line); border-radius: 8px; }
.iconbtn:hover { border-color: var(--link); }
.iconbtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn.trash { color: var(--accent); }
.iconbtn.has-note { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
/* Auf schmalen Bildschirmen untereinander statt gequetschter Spalten */
@media (max-width: 620px) {
  table.people, table.people tbody, table.people tr, table.people td { display: block; width: auto; }
  table.people thead { display: none; }
  table.people td { padding: 4px 0; }
  table.people tbody { padding: 8px 0; }
  table.people .who, table.people .actions { width: auto; }
  .iconrow, table.people .iconrow { justify-content: flex-start; flex-wrap: wrap; width: auto; }
  .iconbtn { width: 42px; height: 42px; }
}
/* Tabs oben auf der Seite der Teilnehmenden: eigene Hintergrundfarbe, bleiben beim Scrollen sichtbar.
   Die erste background-Zeile ist der Ersatz für Browser ohne color-mix(). */
.pagetabs { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 640px; margin: 0 auto; padding: 8px 10px; background: var(--line); background: color-mix(in srgb, var(--link) 20%, var(--bg)); border-bottom: 1px solid var(--line); box-shadow: 0 2px 6px rgb(0 0 0 / .12); }
.pagetabs button { min-width: 0; padding: 10px 4px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }
.pagetabs button[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.nexttab { display: block; width: 100%; margin: 0 0 16px; }
.companions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.companions li { max-width: 100%; padding: 4px 14px; overflow-wrap: anywhere; background: var(--field); border: 1px solid var(--line); border-radius: 999px; }
.lotcompanions { margin-top: 18px; padding-top: 2px; border-top: 1px solid var(--line); }
.leave { margin-bottom: 16px; }
/* Der eigene Link im Formular-Platz ist unsichtbar: Ausgelöst wird über die Zeile unten (PC) bzw. das „⋯“-Menü (Handy) */
.leave button.link:not(form button) { display: none; }
.leave:has(form) { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px 18px; }
.footlinks { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; row-gap: 6px; margin: 0 0 10px; }
.footlinks > * + *::before { content: "|"; display: inline-block; padding: 0 12px; color: var(--muted); text-decoration: none; }
label.check.surprise { align-items: flex-start; }
label.check.surprise input { flex: none; margin-top: .28em; }
.managelink { margin: 0 0 16px; text-align: center; }
/* Animation beim Los: liegt über allem, lässt aber jede Eingabe durch */
.fxlayer { position: fixed; inset: 0; z-index: 50; overflow: hidden; pointer-events: none; }
.fxlayer img { position: absolute; top: 0; left: 0; will-change: transform, opacity; }
.chatlist { display: flex; flex-direction: column; gap: 8px; }
.bubble { align-self: flex-start; max-width: 85%; padding: 8px 12px; overflow-wrap: anywhere; background: var(--field); border: 1px solid var(--line); border-radius: 12px; }
.bubble.mine { align-self: flex-end; border-color: var(--link); }
.bubble .muted { font-size: .8rem; }
.newbadge { display: inline-block; padding: 0 8px; font: 700 .75rem/1.6 var(--font); color: var(--accent-ink); background: var(--accent); border-radius: 999px; vertical-align: middle; }
.pagetabs button.has-new::after { content: "neu"; margin-left: 4px; padding: 0 6px; font-size: .7rem; color: var(--accent-ink); background: var(--accent); border-radius: 999px; }
.pagetabs button.has-new[aria-selected="true"]::after { color: var(--accent); background: var(--accent-ink); }
details { margin-top: 18px; }
summary { cursor: pointer; color: var(--link); }
.panel.notices { border-color: var(--accent); border-width: 2px; }
.msg { border-radius: 10px; padding: 10px 12px; margin: 0 0 16px; border: 1px solid; }
.msg.error { background: #fdecea; border-color: #e6a29d; color: #7d1a14; }
.msg.info { background: #e8f2ec; border-color: #9cc3ac; color: #17402f; }
/* Wunschliste: Sortieren | Wunsch | Aktionen. Die Pfeile stehen übereinander, damit der Text Platz hat. */
table.wishtable { width: 100%; border-collapse: collapse; }
table.wishtable tr { border-top: 1px solid var(--line); }
table.wishtable td { padding: 8px 0; vertical-align: middle; }
table.wishtable .wishsort, table.wishtable .wishactions { width: 1%; white-space: nowrap; }
table.wishtable .wishtext { padding-right: 10px; overflow-wrap: anywhere; }
table.wishtable .wishnum { width: 1%; padding-right: 8px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
table.wishtable .wishsort { padding-left: 10px; text-align: right; }
.wishsort .iconbtn { width: 32px; height: 38px; }
.wishsort .iconbtn + .iconbtn { margin-left: 4px; }
.wishsort .iconbtn:first-child:disabled:not(:only-child), .wishsort .iconbtn:last-child:disabled { visibility: hidden; }   /* ganz oben/unten: unsichtbar, Platz bleibt */
.wishactions .iconbtn { width: 38px; height: 38px; }
.wishactions .iconbtn + .iconbtn { margin-left: 4px; }

/* Anmeldeseite der Verwaltung */
.welcome { display: grid; gap: 16px; align-items: center; }
.welcome-image { display: block; width: 100%; max-width: 420px; aspect-ratio: 3 / 2; height: auto; margin: 0 auto; border-radius: var(--radius); }
.welcome-image.homeimage { margin-bottom: 16px; }
.intro p { margin: 0; }
/* Rollenwahl: zwei gleich große Schalter, der gewählte ist gefüllt */
.rolepick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.rolepick button { min-height: 56px; padding: 10px 8px; line-height: 1.25; background: var(--panel); color: var(--link); border: 2px solid var(--link); }
.rolepick button[aria-expanded="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.roledetail p { margin: 0 0 10px; }
.roledetail .steps { margin-bottom: 0; }
.saved { display: flex; align-items: stretch; gap: 8px; margin-top: 8px; }
.saved button.card { flex: 1; min-width: 0; margin-top: 0; }
.saved .iconbtn { flex: none; width: 48px; height: auto; }
.rolego { display: block; margin-top: 14px; padding: 12px 16px; font-weight: 600; text-align: center; text-decoration: none; background: var(--accent); color: var(--accent-ink); border-radius: 10px; }
.welcome h2 { font-size: 1.5rem; }
.welcome p { margin: 0 0 10px; }
.welcome h3 { margin: 14px 0 8px; }
.steps { margin: 0 0 12px; padding-left: 22px; }
.steps li { margin-bottom: 6px; }
.welcome .invited { grid-column: 1 / -1; margin: 0; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 10px; }
.entry { display: grid; gap: 16px; }
.entry .panel { margin: 0; }
.panel.signup { display: flex; flex-direction: column; }
.signup p { margin: 0 0 10px; }
.signup .cta { width: 100%; margin-top: auto; padding: 14px 16px; font-size: 1.05rem; }
@media (min-width: 700px) {
  /* Breite Ansicht: Titelbild oben rechts, der Text fließt darum (schmal steht das Bild über dem Text) */
  .welcome { display: flow-root; }
  .welcome > .welcome-image { float: right; width: 42%; max-width: none; margin: 4px 0 12px 22px; }
  .welcome h2 { margin-top: 0; }
  .welcome .steps { padding-left: 0; list-style-position: inside; }     /* Nummern laufen mit dem Text um das Bild */
  .welcome .invited { clear: both; margin-top: 10px; }
  .entry { grid-template-columns: 1fr 1fr; align-items: stretch; margin-bottom: 16px; }
}


/* Suchfeld und Sortierung über den Listen der Verwaltung */
.listtools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.listtools input { flex: 1 1 200px; width: auto; min-width: 0; }
.listtools select { flex: 0 1 auto; width: auto; }
.listinfo { margin: 6px 0 0; }

/* ---- Das Los: Karten (je Runde wählbar) ---- */
.lotcard { position: relative; margin: 8px 0 20px; text-align: center; color: var(--text); }
.lc-label { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.lotcard .lotname { display: block; margin: 6px 0; font-weight: 800; line-height: 1.12; overflow-wrap: anywhere; }
.lc-banner { padding: 74px 16px 26px; overflow: hidden; color: var(--accent-ink); background: radial-gradient(circle at 50% 0, rgb(255 255 255 / .22), transparent 60%), var(--accent); border-radius: 16px; box-shadow: 0 10px 24px rgb(0 0 0 / .2); }
.lc-banner::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / .28) 1.6px, transparent 1.8px); background-size: 26px 26px; }
.lc-banner > * { position: relative; }
.lc-banner .lc-bow { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); }
.lc-banner .lotname { font-size: 2.7rem; text-shadow: 0 3px 0 rgb(0 0 0 / .18); }
.lc-anhaenger { padding-top: 34px; }
.lc-anhaenger .lc-string { position: absolute; top: -8px; left: 50%; z-index: 1; transform: translateX(-50%); }
.lc-tag { position: relative; max-width: 320px; margin: 0 auto; padding: 46px 20px 26px; isolation: isolate; filter: drop-shadow(0 8px 12px rgb(0 0 0 / .18)); }
.lc-tag::before, .lc-tag::after { content: ""; position: absolute; z-index: -1; clip-path: polygon(18% 0, 82% 0, 100% 18%, 100% 100%, 0 100%, 0 18%); }
.lc-tag::before { inset: 0; background: var(--accent); }
.lc-tag::after { inset: 3px; background: var(--field); }
.lc-hole { position: absolute; top: 12px; left: 50%; width: 18px; height: 18px; margin-left: -9px; background: var(--panel); border: 3px solid var(--accent); border-radius: 50%; }
.lc-anhaenger .lotname { font-family: 'WM caveat', cursive; font-size: 3.4rem; color: var(--link); }
.lc-stars { color: var(--accent); letter-spacing: .3em; }
.lc-festkarte { margin: 15px 8px 27px; padding: 30px 18px; background: var(--field); border: 3px double #c9a227; border-radius: 10px; box-shadow: 0 0 0 6px var(--field), 0 0 0 7px #c9a227, 0 10px 24px rgb(0 0 0 / .18); }
.lc-festkarte .lotname { margin: 10px 0; font-family: 'WM playfair', Georgia, serif; font-size: 2.5rem; }
.lc-line { display: flex; gap: 10px; align-items: center; justify-content: center; margin-bottom: 8px; color: #c9a227; }
.lc-line::before, .lc-line::after { content: ""; width: 60px; height: 2px; background: #c9a227; }
.lc-corner { position: absolute; width: 22px; height: 22px; }
.lc-corner.top { top: 8px; left: 8px; }
.lc-corner.bottom { right: 8px; bottom: 8px; }

/* ---- Lotterie ---- */
.lotstage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 390px; overflow: hidden; }
.lotresult { min-height: 84px; margin-top: 14px; text-align: center; }
.lotstage.above .lotresult { order: -1; margin: 0 0 8px; }
.lotstage.below .lotresult { margin-top: 40px; }
.lotresult .lotname { font-size: 2.3rem; font-weight: 800; line-height: 1.12; color: var(--link); overflow-wrap: anywhere; }
.lotskip { justify-content: center; margin-top: 4px; }
.lotagain { justify-content: center; margin: -6px 0 14px; }
.lotreveal { position: relative; display: flex; flex-direction: column; justify-content: center; }
.lotresult .suspense { font-size: 1.05rem; animation: lotpulse 0.75s ease-in-out infinite alternate; }
@keyframes lotpulse { from { opacity: .35; transform: scale(.97); } to { opacity: 1; transform: scale(1.04); } }
.lotstage svg { max-width: 100%; overflow: visible; }
.lotstage .present { transform-origin: 50% 90%; }
.reel { position: relative; width: 88%; height: 190px; overflow: hidden; background: var(--field); border: 4px solid var(--accent); border-radius: 16px; box-shadow: inset 0 22px 26px -14px rgb(0 0 0 / .45), inset 0 -22px 26px -14px rgb(0 0 0 / .45); }
.reel .strip div { height: 62px; padding: 0 8px; overflow: hidden; font-size: 1.6rem; font-weight: 800; line-height: 62px; text-align: center; white-space: nowrap; text-overflow: ellipsis; }
.reel .mark { position: absolute; top: 60px; right: 0; left: 0; height: 62px; border-block: 3px solid #c9a227; pointer-events: none; }
.wheelbox { position: relative; padding-top: 20px; }
.wheelbox .pointer { position: absolute; top: 0; left: 50%; z-index: 2; width: 0; height: 0; margin-left: -14px; border-top: 26px solid #c9a227; border-right: 14px solid transparent; border-left: 14px solid transparent; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .4)); }
.drawnball { position: absolute; top: 150px; left: 50%; width: 76px; height: 76px; margin-left: -38px; }

/* ---- Reiter „Auslosung“: Checkliste mit Ampel ---- */
.ampel { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.ampel > i { display: flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; font-style: normal; font-weight: 800; color: #fff; background: #2e7d52; border-radius: 50%; }
.ampel.warn > i { background: #9a6a00; }
.ampel.bad > i { background: #b3261e; }
.ampel > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ampel b { display: block; }
.ampel span { display: block; font-size: .9rem; color: var(--muted); }
.ampel .row { margin-top: 8px; }
.drawbutton { width: 100%; padding: 16px; font-size: 1.2rem; border-radius: var(--radius); }
.progress { height: 14px; margin: 6px 0 2px; overflow: hidden; background: var(--line); border-radius: 999px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
details.danger { margin: 0 0 16px; padding: 12px 18px; background: var(--panel); border: 1px dashed var(--accent); border-radius: var(--radius); }
details.danger > summary { font-weight: 700; }

/* Titelbild zur Grundoptik auf der Hauptseite der Verwaltung */
.homebanner { display: block; width: 100%; max-width: 340px; aspect-ratio: 3 / 2; height: auto; margin: 0 auto 16px; border-radius: var(--radius); }

/* ── Karte D: Schneekugel ── */
.lc-kugel { display: flex; flex-direction: column; align-items: center; }
.lc-kugel .globe { position: relative; width: min(270px, 100%); aspect-ratio: 1; overflow: hidden; color: #fff; background: radial-gradient(circle at 50% 35%, #4b86c4, #1b3a66 70%, #122948); border: 4px solid #cfe6fa; border-radius: 50%; box-shadow: inset 0 0 30px rgb(255 255 255 / .45), 0 10px 24px rgb(0 0 0 / .22); }
.lc-kugel .land { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; }
.lc-kugel .inside { position: absolute; top: 24%; right: 8%; left: 8%; text-shadow: 0 2px 6px rgb(0 0 0 / .55); }
.lc-kugel .shine { position: absolute; top: 9%; left: 15%; width: 24%; height: 12%; background: linear-gradient(rgb(255 255 255 / .7), rgb(255 255 255 / .05)); border-radius: 50%; transform: rotate(-32deg); }
.lc-kugel > svg { max-width: 100%; height: auto; margin-top: -20px; position: relative; }
.lc-kugel .flakes i { position: absolute; top: -8px; background: #fff; border-radius: 50%; opacity: .85; animation: lc-snow linear infinite; }
@keyframes lc-snow { from { transform: translate(0, 0); } 50% { transform: translate(12px, 140px); } to { transform: translate(-4px, 290px); } }

/* ── Karte E: Brief vom Nordpol ── */
.lc-brief { padding: 10px; background: repeating-linear-gradient(135deg, #b3261e 0 12px, #fdf6e6 12px 20px, #1f6b4a 20px 32px, #fdf6e6 32px 40px); border-radius: 8px; box-shadow: 0 10px 24px rgb(0 0 0 / .22); transform: rotate(-1.2deg); margin: 12px 6px 40px; }
.lc-brief .paper { position: relative; padding: 92px 14px 46px; color: #3d2f22; background: radial-gradient(circle at 20% 15%, #fffaf0, #f6ead0); }
.lc-brief .stamp { position: absolute; top: 12px; right: 12px; transform: rotate(4deg); }
.lc-brief .postmark { position: absolute; top: 14px; right: 52px; transform: rotate(-9deg); }
.lc-brief .from { position: absolute; top: 16px; left: 14px; font: 800 .8rem/1.3 'WM playfair', Georgia, serif; letter-spacing: .06em; text-transform: uppercase; text-align: left; max-width: 8em; }
.lc-brief p { margin: 0; font-family: 'WM playfair', Georgia, serif; }
.lc-brief .lotname { font-family: 'WM caveat', cursive; color: #1d3f6e; }
.lc-brief .sign { font-size: .8rem; opacity: .75; }
.lc-brief .seal { position: absolute; bottom: -34px; left: 50%; transform: translateX(-50%) rotate(-8deg); filter: drop-shadow(0 4px 4px rgb(0 0 0 / .3)); }

/* ── Karte F: Lebkuchenherz ── */
.lc-herz { display: flex; flex-direction: column; align-items: center; }
.lc-herz .ribbon { margin-bottom: -22px; max-width: 100%; }
.lc-herz .heartbox { position: relative; width: min(300px, 100%); filter: drop-shadow(0 10px 12px rgb(0 0 0 / .25)); }
.lc-herz .heartbox > svg { display: block; width: 100%; height: auto; }
.lc-herz .icing { position: absolute; top: 27%; right: 15%; left: 15%; color: #fff; }
.lc-herz .lotname { font-family: 'WM caveat', cursive; text-shadow: 0 3px 0 #f58fb4; }

@media (prefers-reduced-motion: reduce) { .lc-kugel .flakes i { top: auto; bottom: 30%; animation: none; opacity: 0; } }

/* ---- Geschenkesuche in der Wunschliste ---- */
.giftsearch { margin-top: 10px; }
.shoplinks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-top: 6px; }
.shoplink { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 10px; font-weight: 700; text-align: center; text-decoration: none; color: var(--link); border: 1px solid var(--link); border-radius: 10px; }
.shoplink:hover { background: var(--field); }
.shoplink { cursor: pointer; }
.searchhint:not(:empty) { margin-bottom: 8px; font-size: .9rem; font-weight: 700; color: var(--link); }
input.needs-input { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.linkrow { display: flex; gap: 8px; align-items: stretch; }
.linkrow input { flex: 1; min-width: 0; }
.linkrow .iconbtn { flex: none; width: 48px; height: auto; }
.pastehint { margin-top: 4px; }

/* ---- Nummern beim Los: Haken bündig unter dem Wunschtext ---- */
.item.lotwish { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; row-gap: 6px; align-items: baseline; }
.lotwish .wishnum { grid-column: 1; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.lotwish .grow, .lotwish .check { grid-column: 2; }

/* ---- Eigene Wunschliste am Handy: Text über die volle Breite, Knöpfe darunter, Pfeile ganz rechts ---- */
@media (max-width: 620px) {
  table.wishtable, table.wishtable tbody { display: block; }
  table.wishtable tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 8px; padding: 10px 0; }
  table.wishtable td { display: block; width: auto; padding: 0; }
  table.wishtable .wishnum { grid-column: 1; grid-row: 1; width: auto; padding: 0; }
  table.wishtable .wishtext { grid-column: 2 / -1; grid-row: 1; padding: 0; }
  table.wishtable .wishactions { grid-column: 2; grid-row: 2; width: auto; margin-top: 8px; }
  table.wishtable .wishsort { grid-column: 3; grid-row: 2; width: auto; margin-top: 8px; padding: 0; }
  table.wishtable td[colspan] { grid-column: 1 / -1; }
}

/* ---- Sammel-Mails: Auswahl in der Teilnehmerliste ---- */
.mailchoice[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.pick { display: flex; gap: 10px; align-items: flex-start; }
.pick > input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.pick > div { min-width: 0; overflow-wrap: anywhere; }
.mailhint { margin-top: 2px; font-size: .85rem; font-weight: 600; color: var(--link); }
.mailhint.off { font-weight: 400; color: var(--muted); }
.mailbar { gap: 6px; }
.mailbar button { padding: 5px 10px; font-size: .9rem; }
.mailform { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.mailform p { margin: 0 0 6px; }
.mailform p.small { margin-top: 4px; font-size: .85rem; }
.mailtools { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin-bottom: 8px; }
.mailtools label.check { margin: 0; }
.mailsubject { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.mailsubject input { flex: 1; min-width: 0; }
.mailform input:not([type="checkbox"]), .mailform textarea { width: 100%; padding: 7px 10px; }
.mailform textarea { display: block; resize: vertical; }
.mailform .row { margin-top: 8px; }
button.mailstop { color: var(--text); background: var(--field); border-color: var(--line); }

/* ---- Editor für Mail-Templates ---- */
.templateform { margin-top: 0; padding-top: 0; border-top: 0; }
.templateform .mailbar { margin-top: 0; }
.templateform p.small { margin-top: 6px; }
.variables { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.variables > span { font-size: .85rem; }
.variables button { padding: 3px 8px; font: .82rem ui-monospace, Consolas, monospace; color: var(--link); background: var(--field); border-color: var(--line); }

/* ---- PIN auf der eigenen Seite ---- */
.pinbox { margin-bottom: 16px; text-align: center; }
.pinbox form { text-align: left; }

/* ---- Design „8-Bit-Spielekonsole“ (Layout konsole) und Schrift „pixel“ ---- */
[data-layout="konsole"] {
  --bg: #171829;
  --panel: #262842;
  --field: #14152a;
  --text: #f4f4ec;
  --muted: #bfc2e0;
  --brand: #0d0e1b;
  --brand-ink: #8dfc9a;
  --link: #6ee7ff;
  --accent: #d4303c;
  --accent-ink: #ffffff;
  --line: #5b5f8a;
  --radius: 0px;
}
/* feine Bildschirmzeilen */
[data-layout="konsole"] body { background-image: repeating-linear-gradient(0deg, rgb(255 255 255 / .028) 0 2px, transparent 2px 4px); }
[data-layout="konsole"] header.top { position: relative; border-bottom: 4px solid #000; }
/* vier Knopffarben als Zierleiste */
[data-layout="konsole"] header.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(90deg, #e43b44 25%, #ffd23f 25% 50%, #2fbf71 50% 75%, #3f86c9 75%); }
/* kantig mit Pixelrahmen und hartem Schatten */
[data-layout="konsole"] :is(.panel, button, input, select, textarea, .badge, .shoplink, .iconbtn, .card, .lotcard, .companions li, .pagetabs button, img.cover, .homebanner, .welcome-image, details.danger, .bubble, .msg, .lc-banner, .rolego) { border-radius: 0; }
[data-layout="konsole"] .panel { border: 3px solid var(--line); box-shadow: 5px 5px 0 #05060d; }
[data-layout="konsole"] button:not(.link):not(.iconbtn) { border-width: 2px; box-shadow: 3px 3px 0 #05060d; }
[data-layout="konsole"] button:not(.link):not(.iconbtn):not(:disabled):active { transform: translate(3px, 3px); box-shadow: none; }
[data-layout="konsole"] :is(input, select, textarea) { border: 2px solid var(--line); }
[data-layout="konsole"] .companions li { border-width: 2px; }
[data-layout="konsole"] img.cover { image-rendering: pixelated; border: 3px solid #05060d; box-shadow: 5px 5px 0 #05060d; }

/* Schriftart „8-Bit-Pixelschrift“: Überschriften und Knöpfe in Pixeln, Fließtext bleibt gut lesbar */
[data-font="pixel"] { --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --font-head: 'WM pixelify', monospace; }
[data-font="pixel"] header.top h1 { font-size: 1.6rem; }
[data-font="pixel"] .panel h2 { font-size: 1.4rem; }
[data-font="pixel"] :is(h3, button, .shoplink, .lc-label, .lotname) { font-family: var(--font-head); letter-spacing: .02em; }

/* ---- Tabs der Wichtel-Seite: breit oben, am Smartphone fest unten (wie Party-Snaps) ---- */
.pagetabs svg { display: none; }
@media (max-width: 620px) {
  /* Titelzeile bleibt oben stehen (nur Wichtel-Seiten, nicht die Verwaltung) */
  body:not(.admin) > header.top { position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 8px rgb(0 0 0 / .22); }
  body:has(> .pagetabs) > main { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .pagetabs { position: fixed; top: auto; right: 0; bottom: 0; left: 0; z-index: 40; gap: 0; max-width: none; margin: 0; padding: 0 0 env(safe-area-inset-bottom, 0px); background: var(--panel); border-top: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -2px 12px rgb(0 0 0 / .28); }
  .pagetabs button { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: flex-start; padding: 9px 4px 11px; font-size: .75rem; color: var(--muted); background: transparent; border: 0; border-radius: 0; -webkit-tap-highlight-color: transparent; }
  .pagetabs button[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); }
  .pagetabs svg { display: block; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .pagetabs button.has-new::after { position: absolute; top: 4px; left: calc(50% + 8px); margin: 0; line-height: 1.5; }
  [data-layout="konsole"] .pagetabs button:not(.link):not(.iconbtn) { border: 0; box-shadow: none; transform: none; }
  /* Beim Tippen in ein Textfeld weicht die Leiste, damit sie über der Bildschirmtastatur nichts verdeckt */
  body:has(> main input:not([type="checkbox"]):focus, > main textarea:focus) > .pagetabs { display: none; }
}

/* ---- „⋯“-Menü in der Titelzeile: Wichtel-Seite nur am Handy (ersetzt dort die Links unten), Oberwichtel-Bereich immer ---- */
.pagemenu { position: relative; flex: none; margin: -8px -6px -8px 0; }
.pagemenu-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 40px; padding: 0; color: var(--brand-ink); background: transparent; border: 0; border-radius: 10px; }
.pagemenu-toggle[aria-expanded="true"] { background: rgb(128 128 128 / .35); }
.pagemenu-toggle svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
.pagemenu-list { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; width: max-content; max-width: calc(100vw - 24px); padding: 4px 0; color: var(--text); text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .3); }
.pagemenu .pagemenu-list > button, .pagemenu .pagemenu-list > a { display: block; width: 100%; padding: 13px 18px; font: 400 1rem/1.3 var(--font); letter-spacing: normal; text-align: left; text-decoration: none; color: var(--text); background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.pagemenu .pagemenu-list > button[aria-current="page"] { font-weight: 700; color: var(--link); }
.pagemenu-list > hr { margin: 4px 12px; border: 0; border-top: 1px solid var(--line); }
.pagemenu-list > .pagemenu-info { margin: 0; padding: 6px 18px 8px; font-size: .8rem; color: var(--muted); }
[data-layout="konsole"] .pagemenu button:not(.link):not(.iconbtn) { border: 0; box-shadow: none; transform: none; }
@media (min-width: 621px) { body:not(.admin) .pagemenu { display: none; } }
@media (max-width: 620px) {
  .footlinks, .managelink { display: none; }
}

/* ---- Kleines Titelbild in der Titelzeile der Wichtel-Seiten ---- */
/* Titel mittig: links und rechts gleich breite Spalten für Titelbild und „⋯“, auch wenn nur eines davon da ist */
body:not(.admin) header.top .inner { display: grid; grid-template-columns: var(--side, 0px) minmax(0, 1fr) var(--side, 0px); column-gap: 8px; align-items: center; }
@media (max-width: 620px) { body:not(.admin) header.top .inner:has(.pagemenu) { --side: 44px; } }
body:not(.admin) header.top .inner:has(.headthumb) { --side: 60px; }
body:not(.admin) header.top .inner > * { grid-row: 1; }
.headthumb { grid-column: 1; }
.pagemenu { grid-column: 3; justify-self: end; }
body:not(.admin) header.top h1 { grid-column: 2; display: -webkit-box; overflow: hidden; line-height: 1.25; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
@media (max-width: 620px) {
  [data-font="handschrift"] body:not(.admin) header.top h1 { font-size: 1.55rem; line-height: 1.1; }
  [data-font="pixel"] body:not(.admin) header.top h1 { font-size: 1.3rem; }
}
.headthumb { flex: none; width: 60px; height: 40px; margin: -6px 0; object-fit: cover; border-radius: 8px; box-shadow: 0 2px 6px rgb(0 0 0 / .35); }
[data-layout="konsole"] .headthumb { border: 2px solid #000; border-radius: 0; image-rendering: pixelated; }

/* ---- Anmeldeseite: beide Schalter gleich groß und auf einer Linie ---- */
.entry .panel { display: flex; flex-direction: column; }
.entry form { display: flex; flex: 1; flex-direction: column; }
.entry form > .row { margin-top: auto; padding-top: 14px; }
.entry button.cta, .entry form > .row button[type="submit"] { width: 100%; min-height: 52px; margin-top: 0; padding: 12px 8px; font-size: clamp(.9rem, 4.4vw, 1.05rem); line-height: 1.3; }
.entry .panel.signup > button.cta { margin-top: auto; }
.entry .forgot { margin: 6px 0 0; text-align: right; }

/* ---- Hinweis „Als App installieren“ ---- */
.installbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius); font-size: .92rem; }
.installbar .installtext { flex: 1; min-width: 0; }
.installbar ol { margin: 6px 0 0; padding-left: 20px; }
.installbar li { margin-top: 4px; }
.installbar li button { padding: 5px 10px; font-size: .88rem; }
.installbar .installclose { flex: none; align-self: flex-start; padding: 2px 6px; text-decoration: none; }
[data-layout="konsole"] .installbar { border-radius: 0; }

/* ---- Teilnehmerliste: Zusammenfassung mit „Aktualisieren“ ---- */
.countrow { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.countrow p { flex: 1 1 260px; margin: 0; }
.countrow .refresh { flex: none; padding: 6px 12px; font-size: .92rem; }

/* ---- Oberwichtel-Bereich: feste Titelzeile („←“ Titel „⋯“), vier Bereiche (PC oben, Handy unten), Speicherbalken ---- */
body.admin > header.top { position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 8px rgb(0 0 0 / .22); }
body.admin header.top .inner { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; column-gap: 8px; align-items: center; }
body.admin header.top .inner > * { grid-row: 1; }
body.admin header.top h1 { grid-column: 2; display: -webkit-box; overflow: hidden; line-height: 1.25; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.headback { grid-column: 1; display: flex; align-items: center; justify-content: center; width: 44px; height: 40px; margin: -8px 0 -8px -6px; padding: 0; color: var(--brand-ink); background: transparent; border: 0; border-radius: 10px; }
.headback svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
[data-layout="konsole"] .headback:not(.link):not(.iconbtn) { border: 0; box-shadow: none; transform: none; }
body.admin .pagetabs { top: var(--headh, 56px); z-index: 20; grid-template-columns: repeat(4, 1fr); max-width: 860px; }
.subtabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-bottom: 16px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.subtabs button { min-width: 0; padding: 9px 4px; line-height: 1.25; color: var(--link); background: transparent; border: 0; overflow-wrap: anywhere; hyphens: auto; }
.subtabs button[aria-current="page"] { color: var(--brand-ink); background: var(--brand); }
[data-layout="konsole"] .subtabs button:not(.link):not(.iconbtn) { border: 0; box-shadow: none; transform: none; }
body.admin .savebar { bottom: 0; z-index: 15; }
.nextpanel { border: 2px solid var(--accent); }
.nextstep { display: block; width: 100%; padding: 13px 16px; font-size: 1.05rem; }
.nextpanel .also { margin: 12px 0 0; text-align: center; }
#login, #addpanel { scroll-margin-top: calc(var(--headh, 56px) + 70px); }
@media (max-width: 620px) {
  body.admin .pagetabs { top: auto; max-width: none; z-index: 40; }
  /* Von unten gestapelt: Hauptbereiche (--navh), direkt darüber ihre Unterpunkte (--subh), darüber der Speicherbalken */
  body.admin { --navh: 66px; --subh: 52px; }
  body.admin .subtabs { position: fixed; right: 0; bottom: calc(var(--navh) + env(safe-area-inset-bottom, 0px)); left: 0; z-index: 35; height: var(--subh); margin: 0; padding: 5px 6px; border-width: 1px 0 0; border-radius: 0; box-shadow: 0 -2px 10px rgb(0 0 0 / .18); }
  body.admin .subtabs[hidden] { display: none; }
  .subtabs button { font-size: .86rem; }
  body.admin:has(.subtabs:not([hidden])) > main { padding-bottom: calc(var(--navh) + var(--subh) + 22px + env(safe-area-inset-bottom, 0px)); }
  body.admin .savebar { bottom: calc(var(--navh) + env(safe-area-inset-bottom, 0px)); margin-bottom: 0; padding-bottom: 12px; }
  body.admin:has(.subtabs:not([hidden])) .savebar { bottom: calc(var(--navh) + var(--subh) + env(safe-area-inset-bottom, 0px)); }
  /* Beim Tippen weichen beide Leisten (die Hauptleiste schon durch die Regel für .pagetabs), der Speicherbalken rückt nach unten */
  body.admin:has(> main input:not([type="checkbox"]):focus, > main textarea:focus) .subtabs { display: none; }
  body.admin:has(> main input:not([type="checkbox"]):focus, > main textarea:focus) .savebar { bottom: 0; }
}

/* ---- Zugangscode ---- */
.codeinput { font-size: 1.15rem; letter-spacing: .04em; }
.codeinput::placeholder { letter-spacing: 0; }
.roledetail form { margin-bottom: 14px; }
.addround { margin-top: 14px; }
.addround summary { padding: 6px 0; font-weight: 600; color: var(--link); cursor: pointer; list-style: none; }    /* das „+“ genügt */
.addround summary::-webkit-details-marker { display: none; }
.pagemenu-info button.link { font-weight: 700; letter-spacing: .05em; }
.pagemenu .pagemenu-list > .pagemenu-info button { display: inline; width: auto; padding: 4px 0; font-size: .95rem; color: var(--link); }
.bigcode { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-weight: 700; }
.bigcode button { font-size: 1.2rem; letter-spacing: .06em; }
.roundcode { font-size: 1.2rem; letter-spacing: .06em; user-select: all; }

