/* kakuro.de – Gestaltung „Spieleabend“ (gewählt 15.11.2026)
   Tiefes Indigo oben, Sonnengelb als Akzent, helle Karten, Lexend durchgehend.
   Spielfelder bleiben eckig; nur Karten und Knöpfe sind abgerundet. */

@font-face { font-family: "Lexend"; src: url("../fonts/lexend-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("../fonts/lexend-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("../fonts/lexend-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --nacht: #121a3a;      /* Kopf, Fuß, Hero */
  --indigo: #1a2550;     /* Summenfelder, Tinte */
  --indigo-2: #24306a;   /* Flächen im Dunklen */
  --indigo-3: #4a5795;   /* Linien im Dunklen */
  --blass: #c8d0ef;      /* Text im Dunklen */
  --sonne: #ffc83d;      /* Akzent, gewähltes Feld */
  --sonne-hell: #fff1c7;
  --minze: #1f9e74;      /* Erfolg */
  --flaeche: #f2f4fb;    /* Seitengrund */
  --feld: #eef1fb;       /* Knöpfe, Chips */
  --weiss: #ffffff;
  --text: #141a33;
  --leise: #56607f;
  --linie: #d5dbef;
  --lauf: #e3e8f9;
  --rot: #d0342c;
  --rot-hell: #fde6e4;
  --schatten: 0 18px 50px -24px rgba(10, 16, 40, 0.45);
  --schrift: 1;
  --rand: clamp(14px, 3vw, 32px);
  font-family: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: calc(100% * var(--schrift));
  line-height: 1.55;
  color: var(--text);
  background: var(--flaeche);
  -webkit-text-size-adjust: 100%;
}
html[data-kontrast="hoch"] {
  --nacht: #000000; --indigo: #000000; --indigo-2: #1a1a1a; --blass: #ffffff;
  --flaeche: #ffffff; --feld: #ffffff; --text: #000000; --leise: #1a1a1a;
  --linie: #000000; --lauf: #d6e2ff; --rot: #a00000;
}
html[data-kontrast="hoch"] .taste, html[data-kontrast="hoch"] .werkzeug, html[data-kontrast="hoch"] .chip { border: 2px solid #000; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--indigo); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--sonne); outline-offset: 2px; }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0 0 0.9em; }
.huelle { max-width: 1320px; margin: 0 auto; padding: 0 var(--rand); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--weiss); padding: 8px 12px; z-index: 10; }
.nur-vorleser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopf ---------- */
.kopf { background: var(--nacht); color: var(--weiss); font-size: 16px; }
.kopf .huelle { display: flex; align-items: center; gap: 14px; min-height: 68px; }
.marke { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--weiss); }
.marke-zeichen { width: 40px; height: 40px; display: block; border-radius: 8px; }
.marke-zeichen text { font-family: inherit; }
.marke-name { font-size: 1.5em; font-weight: 700; letter-spacing: -0.03em; }
.marke-tld { color: var(--sonne); }
.haupt { display: flex; gap: 6px; margin-left: 24px; }
.haupt a { padding: 8px 14px; border-radius: 999px; color: var(--blass); text-decoration: none; font-weight: 500; }
.haupt a:hover { color: var(--weiss); }
.haupt a[aria-current="page"] { background: var(--indigo-2); color: var(--weiss); }
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.serie { background: var(--indigo-2); border-radius: 999px; padding: 7px 14px; font-weight: 500; white-space: nowrap; }
.serie b { color: var(--sonne); }
.ansicht-knopf { background: transparent; border: 1.5px solid var(--indigo-3); color: var(--weiss); border-radius: 999px; padding: 7px 16px; cursor: pointer; }
.ansicht-knopf:hover { border-color: var(--blass); }

/* ---------- Bühne (dunkles Band oben, Spiel ragt hinein) ---------- */
.buehne {
  background: linear-gradient(var(--nacht), var(--nacht)) top / 100% 300px no-repeat;
  padding: 6px 0 36px;
}
.buehne h1 { color: var(--weiss); font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2.1rem); margin: 6px 0 2px; }
.unterzeile { color: var(--blass); margin: 0 0 16px; max-width: 70ch; }

.schalter-reihe { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.segmente { display: flex; background: var(--indigo-2); border-radius: 12px; padding: 4px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmente button {
  border: 0; background: transparent; color: var(--blass); padding: 9px 16px; border-radius: 9px; cursor: pointer; font-weight: 500; white-space: nowrap;
}
.segmente button:hover { color: var(--weiss); }
.segmente button[aria-pressed="true"] { background: var(--sonne); color: var(--nacht); font-weight: 700; }

.spiel { display: grid; gap: 22px; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .spiel { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (min-width: 1240px) {
  .spiel { grid-template-columns: minmax(0, 1fr) 340px 300px; }
  /* Groß und Riesig: Statistik unter das Spiel, Feld bekommt die Breite */
  .spiel[data-gross] { grid-template-columns: minmax(0, 1fr) 340px; }
  .spiel[data-gross] .seite { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
}

.karte { background: var(--weiss); border-radius: 20px; box-shadow: var(--schatten); }

/* Spielfeld-Karte */
.platte { padding: 16px; container-type: inline-size; min-width: 0; }
.anzeige { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.anz { background: var(--flaeche); border-radius: 10px; padding: 5px 12px; color: var(--leise); }
.anz-wert { color: var(--text); font-weight: 700; font-size: 1.1em; margin-left: 4px; }
.brett-rahmen { overflow-x: auto; overscroll-behavior-x: contain; }
.brett {
  --n: 10; --m: 10;
  /* Feldgröße: nach Breite der Karte und Höhe des Bildschirms – kein Scrollbalken im Feld */
  --z: clamp(30px, min(calc((100cqw - 4px) / var(--n)), calc((100svh - 230px) / var(--m))), 58px);
  display: grid;
  grid-template-columns: repeat(var(--n), var(--z));
  grid-auto-rows: var(--z);
  width: calc(var(--z) * var(--n) + 4px);
  border: 2px solid var(--indigo);
  background: var(--indigo);
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
  margin: 0 auto;
}
.brett-laden { grid-column: 1 / -1; color: var(--blass); padding: 1rem; }

.zelle {
  position: relative; display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 0; border: 0;
  border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie);
  background: var(--weiss); color: var(--indigo);
  font-weight: 700; font-size: calc(var(--z) * 0.56); line-height: 1; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.zelle:focus-visible { outline: 3px solid var(--indigo); outline-offset: -3px; z-index: 1; }
.zelle.lauf { background: var(--lauf); }
.zelle.gleich .wert { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.zelle.gewaehlt { background: var(--sonne); }
.zelle.tipp-feld { background: var(--sonne-hell); box-shadow: inset 0 0 0 3px var(--indigo); }
.zelle.falsch .wert, .zelle.doppelt .wert { color: var(--rot); }
.zelle.falsch, .zelle.doppelt { background-image: linear-gradient(var(--rot-hell), var(--rot-hell)); }
.zelle.gewaehlt.falsch, .zelle.gewaehlt.doppelt { background-image: none; }
.notizen {
  position: absolute; inset: 2px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  font-size: calc(var(--z) * 0.21); font-weight: 400; color: var(--leise);
}
.notizen span { display: flex; align-items: center; justify-content: center; }

.summe {
  position: relative; background: var(--indigo); color: var(--weiss);
  font-weight: 500; font-size: max(11px, calc(var(--z) * 0.29)); line-height: 1;
  font-variant-numeric: tabular-nums;
  border-right: 1px solid #2a3668; border-bottom: 1px solid #2a3668;
}
.summe.geteilt { background:
  linear-gradient(to bottom left, transparent calc(50% - 0.8px), #8fa0d8 calc(50% - 0.8px), #8fa0d8 calc(50% + 0.8px), transparent calc(50% + 0.8px)) var(--indigo); }
.summe .rechts { position: absolute; right: 8%; top: 9%; }
.summe .unten { position: absolute; left: 8%; bottom: 9%; }
.summe.aktiv-rechts .rechts, .summe.aktiv-unten .unten { color: var(--sonne); font-weight: 700; }

.brett.geloest .zelle { animation: geloest 0.9s ease-out both; animation-delay: calc(var(--d, 0) * 18ms); }
@keyframes geloest { 0% { background: var(--weiss); } 40% { background: var(--sonne); } 100% { background: var(--weiss); } }
@media (prefers-reduced-motion: reduce) { .brett.geloest .zelle { animation: none; } }

/* Bedien-Karte */
.pult { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.tasten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.taste {
  min-height: 62px; border: 0; border-radius: 14px; background: var(--feld);
  font-size: 1.7rem; font-weight: 700; color: var(--indigo); cursor: pointer; font-variant-numeric: tabular-nums;
}
.taste:hover { background: var(--lauf); }
.taste:active { transform: translateY(1px); }
.taste.aus { color: #aab3d3; }
.notizmodus .taste { font-size: 1.15rem; font-weight: 500; }
.aktionen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.werkzeug { min-height: 46px; border: 0; border-radius: 12px; background: var(--feld); cursor: pointer; font-size: 0.92rem; padding: 0 4px; }
.werkzeug[aria-pressed="true"] { background: var(--indigo); color: var(--weiss); }
.werkzeug-tipp { background: var(--sonne); font-weight: 700; }
.werkzeug-tipp:hover { background: #ffd666; }

.hilfe-tipp { background: var(--sonne-hell); border-radius: 14px; padding: 12px 14px; }
.hilfe-tipp p { margin: 0 0 8px; }
.kombi { margin-top: 4px; }
.kombi-kopf { font-size: 0.9rem; color: var(--leise); margin: 6px 0 4px; }
.kombi-kopf strong { color: var(--text); }
.kombi-liste { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.chip, .kombi-liste li { padding: 3px 9px; border-radius: 8px; background: var(--feld); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.kombi-liste li.weg { opacity: 0.45; text-decoration: line-through; }
.kombi-liste li.einzig { background: var(--indigo); color: var(--weiss); font-weight: 700; }
.hinweis { color: var(--leise); font-size: 0.9rem; margin: 0; }

/* Seitenspalte */
.seite { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 900px) and (max-width: 1239px) { .seite { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; } }
.box { padding: 18px 20px; }
.box h2 { font-size: 1.1rem; margin: 0 0 10px; }
.zahlen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.zahl { background: var(--flaeche); border-radius: 12px; padding: 10px 12px; }
.zahl b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.zahl span { color: var(--leise); font-size: 0.85rem; }
.schalter { display: flex; align-items: center; gap: 0.6em; cursor: pointer; margin-bottom: 12px; }
.schalter input { width: 1.25em; height: 1.25em; accent-color: var(--indigo); }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: 8px; }
.knopf-leise { border: 0; background: var(--feld); border-radius: 10px; padding: 9px 14px; cursor: pointer; }
.knopf-leise:hover { background: var(--lauf); }
.knopf-leise.bestaetigen { background: var(--rot-hell); color: var(--rot); }

/* Knöpfe */
.knopf { display: inline-block; border: 0; border-radius: 12px; background: var(--feld); padding: 11px 18px; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--text); }
.knopf-haupt { background: var(--nacht); color: var(--weiss); }
.knopf-haupt:hover { background: var(--indigo-2); color: var(--weiss); }

/* Dialoge */
.dlg { border: 0; border-radius: 20px; padding: 0; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; color: var(--text); box-shadow: var(--schatten); }
.dlg-breit { width: min(640px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(18, 26, 58, 0.55); }
.dlg-inhalt { padding: 22px 24px; }
.dlg h2 { margin: 0 0 12px; font-size: 1.4rem; }
.dlg-knoepfe { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.wahl { border: 0; padding: 0; margin: 0 0 14px; }
.wahl legend { font-weight: 700; margin-bottom: 8px; }
.wahl label { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 6px 0; background: var(--feld); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.wahl label:has(input:checked) { background: var(--sonne); font-weight: 700; }
.geloest-zeile { font-size: 1.1rem; }
.geloest-rekord { color: var(--minze); font-weight: 700; }
.statistik { overflow-x: auto; }
.statistik table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.statistik th, .statistik td { text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.statistik td small { color: var(--leise); }
.statistik caption { caption-side: bottom; text-align: left; color: var(--leise); font-size: 0.82rem; padding-top: 6px; }
.statistik .gesamt { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 12px; }
.statistik .gesamt strong { font-size: 1.4rem; }

/* ---------- Inhalt unter dem Spiel ---------- */
.abschnitt { padding: 4px 0 30px; }
.buehne + .huelle { padding-top: 4px; }
.abschnitt h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin: 0 0 18px; }
.stufen { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 0; padding: 0; list-style: none; }
.stufe { padding: 20px; }
.stufe .balken { height: 6px; border-radius: 3px; background: var(--feld); margin-bottom: 14px; overflow: hidden; }
.stufe .balken i { display: block; height: 100%; background: var(--indigo); }
.stufe h3 { margin: 0 0 6px; font-size: 1.15rem; }
.stufe p { margin: 0; color: var(--leise); font-size: 0.95rem; }
.zwei { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.text-karte { padding: 26px 28px; margin-bottom: 22px; }
.zwei { margin-bottom: 22px; }
.zwei .text-karte { margin-bottom: 0; }
.groessen-hinweis { margin-top: 14px; }
.stufe .balken i.b1 { width: 25%; } .stufe .balken i.b2 { width: 50%; } .stufe .balken i.b3 { width: 75%; } .stufe .balken i.b4 { width: 100%; }
.text-karte h2 { font-size: 1.4rem; margin: 0 0 12px; }
.text-karte p, .text-karte li { max-width: 68ch; }
.regel-block { display: grid; gap: 20px; grid-template-columns: 150px 1fr; align-items: start; }
.beispiel { margin: 0; }
.beispiel svg { width: 100%; display: block; }
.beispiel text { font-family: inherit; }
.beispiel figcaption { font-size: 0.82rem; color: var(--leise); margin-top: 6px; }
.liste { padding-left: 1.2em; margin: 0 0 1em; }
.liste li { margin-bottom: 0.45em; }
.fragen details { border-bottom: 1px solid var(--linie); padding: 12px 0; }
.fragen details:last-child { border-bottom: 0; }
.fragen summary { cursor: pointer; font-weight: 500; }
.fragen details p { margin: 0.6em 0 0.2em; color: var(--leise); }

/* ---------- Fuß ---------- */
.fuss { background: var(--nacht); color: var(--blass); padding: 26px 0 30px; font-size: 0.92rem; }
.fuss .huelle { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 32px; }
.fuss-gruppe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.fuss-copy, .fuss-titel { color: var(--blass); opacity: 0.75; }
.fuss-links { display: flex; flex-wrap: wrap; gap: 2px 4px; list-style: none; margin: 0; padding: 0; }
.fuss a, .fuss-knopf {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  color: var(--blass); text-decoration: none; font-weight: 500;
  transition: color 0.15s, background-color 0.15s;
}
.fuss a:hover, .fuss-knopf:hover { color: var(--sonne); background: var(--indigo-2); }
.fuss a[aria-current="page"] { color: var(--weiss); background: var(--indigo-2); }
.fuss a:focus-visible, .fuss-knopf:focus-visible { outline: 2px solid var(--sonne); outline-offset: 1px; }
@media (max-width: 899px) {
  .fuss .huelle { flex-direction: column; align-items: flex-start; }
  .fuss-links { margin-left: -10px; }
}
@media (prefers-reduced-motion: reduce) { .fuss a, .fuss-knopf { transition: none; } }

/* ---------- App-Ansicht ---------- */
.is-app .kopf .huelle { min-height: 56px; padding-top: env(safe-area-inset-top); }
.is-app .buehne { background-size: 100% 200px; }
.app-fuss { text-align: center; font-size: 0.9rem; padding: 0 0 24px; }

/* ---------- Handy ---------- */
@media (max-width: 899px) {
  .serie { display: none; }
  .kopf .huelle { min-height: 58px; flex-wrap: wrap; row-gap: 2px; padding-top: max(5px, env(safe-area-inset-top)); }
  .haupt { order: 3; width: 100%; margin: 0 0 8px -6px; overflow-x: auto; scrollbar-width: none; }
  .haupt a { padding: 6px 10px; font-size: 0.9rem; white-space: nowrap; }
  .nav-zusatz { display: none; }
  .buehne { background-size: 100% 300px; padding-top: 2px; }
  .unterzeile { font-size: 0.92rem; margin-bottom: 12px; }
  .schalter-reihe { gap: 8px; margin-bottom: 12px; }
  .segmente button { padding: 7px 11px; font-size: 0.92rem; }
  .spiel { gap: 14px; }
  .platte { padding: 10px; border-radius: 16px; }
  .brett { --z: clamp(30px, calc((100cqw - 4px) / var(--n)), 58px); }
  .pult { padding: 10px; border-radius: 16px; }
  .tasten { grid-template-columns: repeat(9, 1fr); gap: 5px; }
  .taste { min-height: 52px; font-size: 1.4rem; border-radius: 10px; }
  .regel-block { grid-template-columns: 1fr; }
  .beispiel svg { max-width: 160px; }
  .text-karte { padding: 20px; }
}

/* ---------- App installieren ---------- */
.app-knopf { border: 1.5px solid var(--sonne); background: transparent; color: var(--sonne); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.app-knopf:hover { background: var(--sonne); color: var(--nacht); }
.app-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--indigo-2); color: var(--weiss); border-radius: 16px; padding: 10px 12px; margin: 12px 0 4px;
}
.app-banner[hidden] { display: none; }
.app-banner-zeichen { width: 40px; height: 40px; border-radius: 10px; flex: none; background: url("/icons/icon-192.png") center / cover; }
.app-banner-text { flex: 1 1 200px; font-size: 0.92rem; color: var(--blass); }
.app-banner-text strong { color: var(--weiss); }
.app-banner .knopf { padding: 8px 14px; }
.app-banner-zu { border: 0; background: none; color: var(--blass); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 4px 6px; }
@media (min-width: 900px) { .app-banner { display: none !important; } }
@media (max-width: 899px) { .kopf .app-knopf { display: none !important; } }
@media (max-width: 400px) {
  #spiel-bereich .segmente button { padding: 7px 8px; font-size: 0.85rem; }
  .druck-wahl .segmente button { padding: 7px 9px; font-size: 0.88rem; }
}
html[data-app="ja"] .app-knopf, html[data-app="ja"] [data-app-banner] { display: none !important; }

/* ---------- Kakuro des Tages ---------- */
.tages-knopf { border: 0; border-radius: 12px; padding: 9px 16px; background: var(--sonne); color: var(--nacht); font-weight: 700; cursor: pointer; }
.tages-knopf[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--weiss); }
.anz-tag { background: var(--sonne-hell); color: var(--text); font-weight: 500; }
.tageskarte { background: var(--sonne); color: var(--nacht); padding: 20px; }
.tageskarte h2 { font-size: 1.5rem; margin: 2px 0 2px; }
.tk-datum { margin: 0; font-size: 0.9rem; opacity: 0.85; }
.tk-stufe { margin: 0 0 10px; font-weight: 500; }
.tk-info { margin: 0 0 8px; font-size: 0.9rem; }
.tk-top { list-style: none; margin: 0 0 12px; padding: 0; background: rgba(255, 255, 255, 0.45); border-radius: 12px; }
.tk-top li { display: grid; grid-template-columns: 26px 1fr auto; padding: 6px 10px; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.tk-top li + li { border-top: 1px solid rgba(18, 26, 58, 0.12); }
.tk-los { display: block; width: 100%; text-align: center; }
.tk-serie { margin: 8px 0 0; font-weight: 500; font-size: 0.92rem; }
.tk-serie:empty { display: none; }
.tk-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; font-size: 0.9rem; }
.tk-link { background: none; border: 0; padding: 0; color: var(--nacht); font-weight: 700; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.tk-countdown { margin-left: auto; font-variant-numeric: tabular-nums; opacity: 0.85; }
.geloest-tag { border-top: 1px solid var(--linie); margin-top: 12px; padding-top: 12px; }
.gt-ergebnis { font-weight: 500; }
.gt-ergebnis:empty { display: none; }
.gt-mitmachen { background: var(--sonne-hell); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.gt-mitmachen p { font-size: 0.92rem; }
.bl-tabs { margin-bottom: 14px; width: max-content; }
.bl-tabelle { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bl-tabelle th, .bl-tabelle td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--linie); }
.bl-tabelle tr.ich td { background: var(--sonne-hell); font-weight: 700; }
.bl-tabelle .melden { border: 0; background: none; color: var(--leise); font-size: 0.8rem; cursor: pointer; text-decoration: underline; }
.bl-liste { min-height: 120px; margin-bottom: 14px; }
.bl-liste .hinweis { margin-top: 8px; }
.bl-mitmachen { background: var(--flaeche); border-radius: 14px; padding: 14px 16px; }
.bl-mitmachen p { font-size: 0.92rem; }
.bl-name-reihe { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.eingabe { font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--linie); min-width: 0; flex: 1 1 180px; }
.ar-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ar-kopf .knopf-leise { font-size: 1.3rem; padding: 4px 14px; }
.ar-kopf .knopf-leise:disabled { opacity: 0.3; }
.ar-wochentage, .ar-tage { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.ar-wochentage { font-size: 0.8rem; color: var(--leise); margin-bottom: 4px; }
.ar-tage button { aspect-ratio: 1; border: 0; border-radius: 10px; background: var(--feld); cursor: pointer; font-variant-numeric: tabular-nums; }
.ar-tage button:disabled { background: transparent; color: #b3bad0; cursor: default; }
.ar-tage button.geloest { background: var(--sonne); font-weight: 700; }
.ar-tage button.angefangen { box-shadow: inset 0 0 0 2px var(--sonne); }
.ar-tage button.heute { outline: 2px solid var(--indigo); outline-offset: -2px; }
@media (max-width: 899px) { .tages-knopf { padding: 7px 12px; font-size: 0.92rem; } }

/* ---------- Seite „Zum Ausdrucken“ ---------- */
.buehne-flach { background-size: 100% 250px; }
.pfad { color: var(--blass); font-size: 0.9rem; padding-top: 14px; }
.pfad a { color: var(--blass); }
.druck { display: grid; gap: 22px; align-items: start; }
@media (min-width: 980px) { .druck { grid-template-columns: 430px minmax(0, 1fr); } }
.druck-wahl { padding: 22px; }
.druck-wahl h2 { font-size: 1.2rem; margin: 0 0 14px; }
.feld { margin-bottom: 14px; }
.feld-name { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.95rem; }
.segmente-hell { background: var(--feld); flex-wrap: wrap; overflow: visible; }
.druck-wahl .segmente button { padding: 8px 12px; }
.segmente-hell button { color: var(--text); }
.segmente-hell button:hover { color: var(--text); background: var(--lauf); }
.segmente-hell button:disabled { opacity: 0.35; cursor: not-allowed; }
.auswahl-liste { font: inherit; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--linie); background: var(--weiss); min-width: 90px; }
.knopf-sonne { background: var(--sonne); color: var(--nacht); }
.knopf-sonne:hover { background: #ffd666; }
.druck-vorschau { background: #dfe3f0; border-radius: 20px; padding: 18px; max-height: 760px; overflow: auto; }
.blaetter { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.blatt {
  zoom: 0.42; width: 210mm; height: 297mm; padding: 12mm 12mm 10mm; background: #fff; color: #000;
  display: flex; flex-direction: column; box-shadow: 0 10px 30px -12px rgba(10, 16, 40, 0.4);
}
@media (max-width: 600px) { .blatt { zoom: 0.36; } }
.blatt-kopf { display: flex; justify-content: space-between; font-size: 12pt; font-weight: 700; border-bottom: 1.5px solid #000; padding-bottom: 3mm; margin-bottom: 6mm; }
.blatt-raster { flex: 1; display: grid; gap: 8mm; align-content: start; justify-items: center; }
.blatt.pro-2 .blatt-raster { grid-template-rows: 1fr 1fr; align-content: stretch; }
.blatt.pro-4 .blatt-raster { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; align-content: stretch; }
.blatt.loesungen .blatt-raster { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, auto); gap: 6mm; }
.blatt-raetsel { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2mm; }
.blatt-raetsel figcaption { font-size: 10pt; align-self: flex-start; color: #333; }
.blatt-raetsel svg { display: block; max-width: 100%; height: auto; }
.blatt.pro-2 .blatt-raetsel svg { height: 112mm; width: auto; }
.blatt.pro-4 .blatt-raetsel svg { height: 84mm; width: auto; }
.blatt.loesungen .blatt-raetsel svg { height: 72mm; width: auto; }
.blatt.grossdruck .blatt-kopf { font-size: 15pt; }
.blatt-fuss { font-size: 9pt; color: #444; text-align: center; padding-top: 3mm; }
.kachel { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 22px 24px; text-decoration: none; color: var(--text); }
.kachel:hover { box-shadow: 0 22px 50px -20px rgba(10, 16, 40, 0.55); }
.kachel-text strong { display: block; font-size: 1.15rem; margin-bottom: 4px; }
.kachel-text span { color: var(--leise); font-size: 0.95rem; }
.kachel-zeichen { width: 84px; height: 84px; border-radius: 16px; background: var(--feld); display: grid; place-items: center; font-weight: 700; font-size: 1.5rem; color: var(--indigo); }

@media print {
  html:has(body.seite-druck), body.seite-druck { background: #fff; }
  body.seite-druck .blatt { page: blatt; }
  body.seite-druck * { visibility: hidden; }
  body.seite-druck .blaetter, body.seite-druck .blaetter * { visibility: visible; }
  body.seite-druck .druck-vorschau { position: absolute; left: 0; top: 0; padding: 0; background: none; max-height: none; overflow: visible; }
  body.seite-druck .blaetter { display: block; }
  body.seite-druck .blatt { zoom: 1; box-shadow: none; break-after: page; page-break-after: always; }
}
@page blatt { size: A4; margin: 0; }

/* ---------- Druck: nur das leere Rätsel ---------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; }
  .kopf, .fuss, .unterzeile, .schalter-reihe, .pult, .seite, .anzeige, .abschnitt, .app-fuss, .skip { display: none !important; }
  .buehne { background: none; padding: 0; }
  .buehne h1 { color: #000; font-size: 14pt; }
  .spiel { display: block; }
  .karte { box-shadow: none; }
  .platte { padding: 0; container-type: normal; }
  .brett-rahmen { overflow: visible; }
  .brett { --z: calc(170mm / var(--n)); border-color: #555; background: #555; }
  .brett[data-n="20"] { --z: calc(180mm / var(--n)); }
  .zelle { background: #fff !important; background-image: none !important; box-shadow: none !important; border-color: #888; }
  .zelle .wert, .zelle .notizen { visibility: hidden; }
  .summe { background-color: #dcdfe4 !important; color: #000 !important; border-color: #aaa; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .summe.geteilt { background: linear-gradient(to bottom left, transparent calc(50% - 0.6px), #333 calc(50% - 0.6px), #333 calc(50% + 0.6px), transparent calc(50% + 0.6px)) #dcdfe4 !important; }
  .brett.geloest .zelle { animation: none; }
}

/* ---------- Kakuro-Löser ---------- */
.loeser { display: grid; gap: 22px; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .loeser { grid-template-columns: minmax(0, 1fr) 380px; } }
.loeser-modus { margin-bottom: 12px; display: flex; justify-content: center; }
.loeser-brett > button { margin: 0; padding: 0; font-family: inherit; cursor: pointer; }
.loeser-brett .summe { border: 0; border-right: 1px solid #2a3668; border-bottom: 1px solid #2a3668; color: var(--weiss); }
.loeser-brett .summe .leer { color: var(--indigo-3); }
.loeser-brett .summe:focus-visible { outline: 3px solid var(--sonne); outline-offset: -3px; z-index: 1; }
.loeser-brett.modus-summen .zelle { cursor: default; }
.loeser-brett .gewaehlt-summe { box-shadow: inset 0 0 0 3px var(--sonne); }
.loeser-brett .fehler-markiert { box-shadow: inset 0 0 0 3px var(--rot); }
.loeser-brett .zelle.fehler-markiert { background: var(--rot-hell); }
.loeser-pult { padding: 22px; }
.loeser-schritte { margin: 0 0 16px; padding-left: 1.4em; }
.loeser-schritte li { margin-bottom: 14px; }
.loeser-schritte li::marker { font-weight: 700; color: var(--leise); }
.loeser-schritte h2, .loeser-titel { font-size: 1.1rem; margin: 0 0 8px; }
.loeser-groesse { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.loeser-groesse label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.loeser-groesse .auswahl-liste { min-width: 72px; }
.summen-felder { display: grid; gap: 10px; }
.summen-eingabe { display: grid; grid-template-columns: 7.5em 4.5em 1fr; align-items: center; gap: 10px; font-weight: 500; }
.summen-eingabe[hidden] { display: none; }
.summen-eingabe input { font: inherit; font-weight: 700; font-size: 1.2rem; width: 100%; padding: 7px 10px; border-radius: 10px; border: 1.5px solid var(--linie); text-align: center; }
.summen-eingabe input:focus { border-color: var(--indigo); outline: 3px solid var(--sonne); outline-offset: 1px; }
.summen-eingabe small { color: var(--leise); font-weight: 400; font-size: 0.85rem; }
.summen-eingabe small.falsch { color: var(--rot); }
.loeser-ergebnis { font-weight: 500; }
.loeser-erklaerung { margin: 14px 0 10px; }
.loeser-erklaerung:not(:empty) { background: var(--sonne-hell); border-radius: 14px; padding: 14px 16px; }
.loeser-erklaerung .liste { margin-bottom: 8px; }
.loeser-erklaerung p { margin: 0; }
.loeser-meldung { margin: 12px 0 0; }
.loeser-meldung:empty { display: none; }
.loeser-meldung[data-art="fehler"] { background: var(--rot-hell); color: #8a1f19; border-radius: 12px; padding: 10px 14px; }
.loeser-pult .knopf-reihe + .loeser-erklaerung, .loeser-pult .hinweis + .knopf-reihe { margin-top: 12px; }
[hidden] { display: none !important; }

/* ---------- Startseite: Inhalt ---------- */
.abschnitt-text { max-width: 75ch; margin-bottom: 18px; }
.kacheln { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .kacheln { grid-template-columns: 1fr 1fr; } }
.summen-tabelle { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.summen-tabelle th, .summen-tabelle td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.summen-tabelle thead th { font-size: 0.85rem; color: var(--leise); font-weight: 500; }
.summen-tabelle tbody th { font-weight: 700; color: var(--indigo); width: 3.5em; }
.summen-tabelle td { white-space: nowrap; }
@media (max-width: 520px) {
  .summen-tabelle { font-size: 0.82rem; }
  .summen-tabelle th, .summen-tabelle td { padding: 7px 5px; }
  .summen-tabelle tbody th { width: 2em; }
}
/* Summen im Löser als Pseudo-Inhalt: Vorleser bekommen das aria-label des Knopfs */
.loeser-brett .summe span::after { content: attr(data-z); }

/* ---------- Impressum / Datenschutz ---------- */
.rechtstext { max-width: 860px; }
.rechtstext h2 { font-size: 1.2rem; margin: 1.6em 0 0.5em; scroll-margin-top: 16px; }
.rechtstext > h2:first-of-type { margin-top: 0.4em; }
.rechtstext code { background: var(--feld); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
.rechts-warnung { background: var(--rot-hell); color: #8a1f19; border-radius: 12px; padding: 12px 16px; font-weight: 500; }
.fuss-knopf { background: none; border: 0; cursor: pointer; font-size: inherit; font-family: inherit; }

/* ---------- Tabelle & Strategie ---------- */
.kt-gitter { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); align-items: start; }
.kt-karte { padding: 20px 22px; }
.kt-karte h3 { margin: 0 0 10px; font-size: 1.15rem; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.kt-anzahl { font-size: 0.85rem; font-weight: 400; color: var(--leise); }
.kt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.kt th, .kt td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.kt thead th { font-size: 0.8rem; color: var(--leise); font-weight: 500; }
.kt tbody th { width: 3.6em; font-weight: 700; color: var(--indigo); }
.kt td:last-child:not(:nth-child(2)) { width: 6.5em; color: var(--leise); }
.kt tr.kt-eindeutig th, .kt tr.kt-eindeutig td { background: var(--sonne-hell); }
.kt-eindeutig-muster { background: var(--sonne-hell); padding: 1px 6px; border-radius: 6px; }
.technik { margin-bottom: 0; }
.technik h3 { font-size: 1.15rem; margin: 0 0 8px; }
.technik-stufe { font-size: 0.85rem; font-weight: 700; color: var(--minze); margin: 0 0 4px; }

/* ---------- Werbung: Anker-Anzeige unten ---------- */
/* Höhe misst werbung.js; der Platz wird unten freigehalten, damit nichts verdeckt wird */
html[data-anker] { scroll-padding-bottom: calc(var(--anker, 0px) + 8px); }
html[data-anker] body { padding-bottom: var(--anker, 0px); }
html[data-anker] .skip:focus { bottom: auto; }

/* ---------- Vollbild ---------- */
.neu-knopf {
  margin-left: auto; border: 0; border-radius: 10px; padding: 5px 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; background: var(--feld); color: var(--text); font-weight: 500;
}
.neu-knopf:hover { background: var(--lauf); }
.neu-knopf { position: relative; }
.neu-knopf.bestaetigen { background: var(--rot-hell); color: var(--rot); }
/* Rückfrage als Blase unter dem Knopf – nichts verrutscht */
.neu-knopf.bestaetigen::after {
  content: "Nochmal tippen: neues Rätsel"; position: absolute; top: calc(100% + 6px); right: 0; z-index: 5;
  white-space: nowrap; background: var(--rot); color: #fff; font-weight: 500; font-size: .9rem;
  padding: 6px 10px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.18); pointer-events: none;
}
@media (max-width: 899px) { .neu-knopf span { display: none; } .neu-knopf { padding: 5px 9px; } }
.neu-knopf + .vollbild-knopf { margin-left: 0; }
.vollbild-knopf {
  margin-left: auto; border: 0; border-radius: 10px; padding: 5px 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--feld); color: var(--text); font-weight: 500;
}
.vollbild-knopf:hover { background: var(--lauf); }
.vollbild-knopf[aria-pressed="true"] { background: var(--sonne); color: var(--nacht); font-weight: 700; }
.vollbild-knopf[hidden] { display: none; }
@media (max-width: 899px) { .vollbild-text { display: none; } .vollbild-knopf { padding: 5px 9px; } }
#spiel-bereich:fullscreen {
  background: var(--nacht); overflow-y: auto; padding: max(12px, env(safe-area-inset-top)) var(--rand) 16px;
  box-sizing: border-box; width: 100%; height: 100%;
}
#spiel-bereich:fullscreen .spiel { max-width: 1320px; margin: 0 auto; }
#spiel-bereich:fullscreen .schalter-reihe { max-width: 1320px; margin-left: auto; margin-right: auto; }
#spiel-bereich:fullscreen .brett { --z: clamp(30px, min(calc((100cqw - 4px) / var(--n)), calc((100vh - 170px) / var(--m))), 72px); }
#spiel-bereich:-webkit-full-screen { background: var(--nacht); overflow-y: auto; padding: 12px var(--rand) 16px; width: 100%; height: 100%; }
@media (max-width: 400px) { .anzeige { gap: 6px; } .anz { padding: 5px 8px; font-size: .92rem; } }

/* ---------- Seite Kakuro App ---------- */
.app-kopf { display: flex; align-items: center; gap: 18px; }
.app-kopf-icon { width: 76px; height: 76px; border-radius: 18px; flex: none; }
.app-kopf h1 { margin-top: 0; }
.geraete { display: grid; gap: 10px; margin: 14px 0 12px; }
.geraete details { background: var(--flaeche); border-radius: 14px; padding: 12px 16px; border: 2px solid transparent; }
.geraete details.dein-geraet { border-color: var(--sonne); background: var(--sonne-hell); }
.geraete summary { font-weight: 700; cursor: pointer; }
.geraete .liste { margin: 10px 0 0; }
.app-probe { background: var(--indigo); color: var(--weiss); }
.app-probe h2, .app-probe p { color: var(--weiss); }
@media (max-width: 899px) { .app-kopf-icon { width: 60px; height: 60px; border-radius: 14px; } }

/* ---------- Fehler oder Idee melden ---------- */
.feedback { max-width: 560px; }
.feld-block { display: block; font-weight: 500; margin-bottom: 12px; }
.feld-block textarea, .feld-block input { display: block; width: 100%; margin-top: 6px; font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--linie); background: var(--weiss); color: var(--text); }
.feld-block textarea { resize: vertical; min-height: 110px; }
.feld-block textarea:focus, .feld-block input:focus { border-color: var(--indigo); outline: 3px solid var(--sonne); outline-offset: 1px; }
.feedback-falle { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.feedback-meldung { margin: 10px 0 0; font-weight: 500; }
.feedback-meldung:empty { display: none; }
.feedback-meldung[data-art="fehler"] { color: var(--rot); }
.feedback-meldung[data-art="ok"] { color: var(--minze); }
.feedback-art { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.feedback-art legend { grid-column: 1 / -1; }
.feedback-art label { margin: 0; font-size: 0.92rem; padding: 8px 10px; }
@media (max-width: 899px) { .feedback .feld-block textarea { min-height: 90px; } .feedback > p:first-of-type { margin-bottom: 10px; } }

/* „Fehler entdeckt oder eine Idee? Melden“ – unter den Tasten, gut sichtbar */
.melden-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--linie); color: var(--leise); font-size: 0.92rem; }
.melden-knopf { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--indigo); background: var(--weiss); color: var(--indigo); border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.melden-knopf:hover { background: var(--indigo); color: var(--weiss); }
@media (max-width: 370px) { .anzeige { gap: 4px; } .anz { padding: 5px 6px; } .neu-knopf, .vollbild-knopf { padding: 5px 7px; } }
