/* Direkte Werkzeuge rechts von der Zahl, gemeinsame Navigation unten. */
html .app > .topbar.zdt-zeile {
  display: grid !important; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 16px; padding: 0; border: 0; background: transparent;
}
html .zdt-zeile > .left { display: none !important; }
html .app > .topbar.zdt-zeile .task {
  grid-column: 1; grid-row: 1; justify-content: center; width: auto; min-width: 0; gap: 32px;
}
html .app > .topbar.zdt-zeile .task-label { font-size: clamp(1.15rem, 2.6vw, 1.6rem); }
html .zdt-zeile .task-toolbar {
  grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 8px;
}
html .zdt-zeile .task-toolbar button, html .gsr-lu [data-menu-toggle], html .gsr-lu-heim {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; width: 44px; height: 44px; min-width: 44px; padding: 8px;
  border: 2px solid var(--ink, #1c2230); border-radius: 50%; background: #fff; color: var(--ink, #1c2230);
}
html .zdt-zeile .task-toolbar svg, html .gsr-lu-heim svg { width: 26px; height: 26px; }
html .zdt-zeile .task-toolbar .sz-schild { display: none; }
html .zdt-zeile .task-toolbar [data-check] { background: var(--rose, #e11d48); color: white; --art-color: white; }
html .zdt-zeile > .sz-text { position: absolute; pointer-events: none; }
html .gsr-lu .tools { gap: 8px; }
html .gsr-lu .tk-fenster { width: min(680px, calc(100vw - 32px)) !important; }
html .gsr-lu .tk-fenster .range-picker { margin-bottom: 16px; }
html .gsr-lu .tk-fenster .range-picker summary { width: fit-content; }
html .gsr-lu .tk-fenster .range-picker .segmented { display: flex; flex-wrap: wrap; margin-top: 8px; gap: 8px; }
html .gsr-lu .tk-fenster .range-picker button { min-height: 44px; padding: 8px 14px; }
html.gsr-lu-ruhe .zdt-zeile .task-toolbar { display: none !important; }
html.gsr-lu-ruhe .app > .topbar.zdt-zeile .task { grid-column: 1 / -1; }

html .gsr-lu .tk-fenster .zdt-zahlenraum { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
html .gsr-lu .tk-fenster .zdt-zahlenraum button { min-height:44px; padding:8px 14px; }
html .gsr-lu { padding-right:80px; }
html .gsr-lu [data-lu-auge] { position:absolute; right:20px; bottom:6px; }
html .gsr-lu .tools .tk-fenster:not([hidden]) {
  display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:8px 12px;
  max-height:calc(100dvh - 32px) !important; padding:16px !important; overflow:visible;
}
html .tk-fenster > h3 { grid-column:1/-1; margin:0; font-size:1.1rem; }
html .tk-fenster .zdt-zahlenraum { grid-column:1/-1; margin:0 0 8px !important; }
html .tk-fenster .menu-title { grid-column:1/-1; margin:0; }
html .tk-fenster .menu-list { grid-column:1/-1; grid-row:4; columns:2; column-gap:8px; }
html .tk-fenster .menu-group { margin-bottom:6px; }
html .tk-fenster .menu-item { min-height:44px; padding:4px; gap:6px; font-size:.9rem; }
html .tk-fenster .menu-icon { display:none; }
html .tk-fenster .menu-box { width:24px; height:24px; }
html .tk-fenster .gsr-lu-allg { grid-column:1; grid-row:5; margin:0; padding:0; border:0; }
html .tk-fenster .gsr-lu-allg .zeile { min-height:44px; padding:4px 0; }
html .tk-fenster .menu-switch { grid-column:2; grid-row:6; margin:0; padding:4px; }
html .tk-fenster .menu-reset { grid-column:2; grid-row:7; margin:0; min-height:44px; }
html .tk-fenster .gsr-lu-fertig { grid-column:2; grid-row:5; align-self:center; width:120px; margin:0; min-height:44px; }
html .tk-fenster .menu-note { grid-column:1/-1; grid-row:6; }
html .tk-fenster [hidden] { display:none !important; }
html .gsr-lu .tools { position:static !important; }
html .gsr-lu [data-lu-auge] { z-index:1; }
html .gsr-lu .tools .tk-fenster:not([hidden]) { background:#fff !important; opacity:1 !important; }

/* Auch die frühere haftende Kopfzeile erhält keinen grauen Kasten. */
html .app > .topbar.zdt-zeile, html .app.is-scroll > .topbar.zdt-zeile {
  background:transparent !important; border:0 !important; box-shadow:none !important; border-radius:0 !important;
}
html .zdt-zeile [data-auto-toggle][aria-pressed="true"] { background:#e8f8ee; color:#13753c; border-color:#13753c; }

/* Größerer Schriftzug nach Alex, 11.10.2026. */
html .app > .topbar.zdt-zeile .task-label { font-size:clamp(1.5rem, 3.4vw, 2.25rem); }

/* Kleine Aufgaben zeigen nur die Lupe; Werkzeuge erst in der großen Ansicht. */
html .card:not(.is-zoomed) .card-tools :is(.card-check, .card-clear) { display:none !important; }
html .card:not(.is-zoomed) .card-head { --tools:calc(var(--btn) * 2 + var(--btn-gap)); }
html .card:not(.is-zoomed) .card-mark { right:calc(8px + var(--btn) * 1.09 + var(--btn-gap)); }
html:has([data-auto-check]:checked) .card.is-zoomed .card-check { display:none !important; }
html .card.is-zoomed .card-clear, html:not(:has([data-auto-check]:checked)) .card.is-zoomed .card-check { display:grid; }

html .card .raum-karten-tools { display:none !important; }
html .card:not(.is-zoomed) .card-tools [data-cmp-new] { display:none !important; }
html.raum-effizient[data-raum-modul^="zahl-des-tages"] .card-compare .card-head { padding-right:calc(var(--tools) + 8px) !important; }

/* Automatisch gelegte Geldstücke ebenfalls in sichtbaren Fünfergruppen. */
html .money-field .money-item:nth-child(5n + 6) { margin-inline-start:1em; }

/* Vorlagen: Stellenwert unter dem Material, im Zoom ausgeschrieben. */
html .card-build .palette .tile-label { display:block; font-size:14px; line-height:1.1; }
html .card-build .palette .tile-name { display:none; }
html .card-build .palette .tile-short { display:inline; }
html .card-build.is-zoomed .palette .tile-name { display:inline; }
html .card-build.is-zoomed .palette .tile-short { display:none; }
html.raum-effizient .card-build .palette .tile { max-height:none; }
html.raum-effizient .card-build .palette .tile-art { height:auto; }
html .card-build .palette .tile-z .tile-art svg { height:100%; max-height:120px; }
html .card-build.is-zoomed .palette .tile-z .tile-art svg { max-height:180px; }
html .card-build .palette .tile-art svg { top:auto; bottom:0; }

/* Zahlenstrahl: Überschrift mittig, mit eigener Höhe oberhalb der Striche. */
html.raum-effizient[data-raum-modul^="zahl-des-tages"] .app .sheet-line { flex:0 0 152px !important; }
html .card-line .card-head { display:flex; justify-content:center; padding-inline:calc(var(--tools) + 8px); margin-bottom:8px; }
html .card-line .card-head::before { display:none; }
html .card-line .card-title { text-align:center; }

/* Vergleichen: größere Zahlen, Zeichen hineinziehen oder antippen. */
html .card-compare .cmp-num { font-size:clamp(28px, 12cqi, 64px); }
html .card-compare .compare[data-digits="4"] .cmp-num { font-size:clamp(24px, 10cqi, 56px); }
html .card-compare .compare[data-digits="5"] .cmp-num { font-size:clamp(20px, 8cqi, 48px); }
html .card-compare .cmp-slot { background:var(--field); color:var(--ink); cursor:pointer; touch-action:none; }
html .card-compare .cmp-slot.is-over { border-style:solid; border-color:var(--c); background:var(--tint); }
html .card-compare .cmp-buttons button { cursor:grab; touch-action:none; }
html .card-compare .compare.has-answer .cmp-buttons { visibility:hidden; pointer-events:none; }
html .card-compare .card-tools [data-cmp-new] { display:grid; place-items:center; width:var(--btn); height:var(--btn); min-width:0; padding:0; border:0; border-radius:50%; background:var(--soft); }
html .card-compare .card-tools [data-cmp-new] span { display:none; }
html .card-compare .card-tools [data-cmp-new] svg { width:70%; height:70%; }
html .card-compare.is-zoomed .card-head { display:block; padding:52px 0 0; }
html .card-compare.is-zoomed .card-head::before { display:none; }
html .card-compare.is-zoomed .card-title { font-size:16px; text-align:center; }

/* Allgemein: Vorlesen bleibt; doppelte Navigation aus dem Menü entfernen. */
html .gsr-lu-allg .zeile:has([data-lu-voll]),
html .gsr-lu-allg .zeile:has([data-lu-melden]),
html .gsr-lu-allg .zeile:has(a[href="/interaktiv/"]) { display:none; }

/* Vorlesen: kompakter Symbolschalter mit ausgeschriebenem Zustand. */
html .gsr-lu-allg [data-lu-vorlesen].schalter { display:flex; align-items:center; justify-content:center; gap:8px; width:88px; height:44px; border-radius:12px; background:#fff; color:#1c2230; }
html .gsr-lu-allg [data-lu-vorlesen].schalter::before { content:""; width:24px; height:24px; flex:none; background:center / contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%231c2230%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M11%205%206%209H3v6h3l5%204zM15%208a6%206%200%200%201%200%208M18%205a10%2010%200%200%201%200%2014%22%2F%3E%3C%2Fsvg%3E"); }
html .gsr-lu-allg [data-lu-vorlesen].schalter::after { content:"Aus"; position:static; width:auto; height:auto; border-radius:0; background:transparent; font-family:inherit; font-weight:600; font-size:16px; line-height:1; transform:none; transition:none; }
html .gsr-lu-allg [data-lu-vorlesen].schalter[aria-checked="true"] { background:#ecfdf5; border-color:#166534; }
html .gsr-lu-allg [data-lu-vorlesen].schalter[aria-checked="true"]::after { content:"An"; transform:none; }
html .gsr-lu-allg [data-lu-vorlesen].schalter:focus-visible { outline:3px solid #2563eb; outline-offset:3px; }

/* Autokorrektur neben der Zahl; Menü ohne doppelten Schalter und Rücksetzen. */
html [data-menu] .menu-switch:has([data-auto-check]),
html [data-menu] [data-menu-reset] { display:none !important; }

/* Fußzeile direkt unter der Auswahl, ohne reservierte Reihen. */
html .tk-fenster .gsr-lu-allg h3 { display:none; }
html .tk-fenster .gsr-lu-allg .zeile { gap:12px; }
html .tk-fenster .gsr-lu-allg .zeile b { font-size:.9rem; }
html .tk-fenster .gsr-lu-allg .zeile small { font-size:.8rem; }
@media (min-width:900px) { html .tk-fenster .menu-list { columns:3; } }
html .tk-fenster .menu-group { break-inside:auto; }
html .tk-fenster .menu-group-title { break-after:avoid; }
html .tk-fenster .menu-item { break-inside:avoid; }

/* Zahlwort: Bausteine oder Handschrift, dieselbe Arbeitsfläche in beiden Größen. */
html .card-word .word { grid-template-rows:auto minmax(0,1fr) auto; gap:6px; }
html .card-word .word-modes { display:flex; gap:4px; align-items:center; }
html .card-word .word-modes button { min-height:44px; padding:4px 10px; border:1px solid var(--line); border-radius:12px; background:#fff; font:600 14px/1.1 var(--font-display); color:var(--ink); }
html .card-word .word-modes button[aria-pressed="true"] { background:var(--tint); border-color:var(--c); }
html .card-word .word [hidden] { display:none !important; }
html .card-word .word[data-mode="hand"] { grid-template-rows:auto minmax(0,1fr); }
html .card-word .word-hand { display:grid; grid-template-rows:minmax(0,1fr) auto; gap:6px; min-height:0; }
html .card-word .word-paper { width:100%; height:100%; min-height:0; touch-action:none; user-select:none; background:#fff; border:1px solid #cfd4e0; border-radius:12px; cursor:crosshair; }
html .card-word .word-hand-tools { display:flex; gap:6px; align-items:center; min-height:44px; }
html .card-word .word-hand-status { flex:1; min-width:0; font-size:12px; line-height:1.2; height:2.4em; overflow-wrap:anywhere; }
html .card-word .word-hand-tools button { min-width:44px; min-height:44px; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); font-size:12px; }
html .card-word [data-word-help] svg { width:24px; height:24px; }
html .card-word.is-zoomed .word-modes button { font-size:14px; }
/* Der Kartenzoom vergrößert diese Maße bereits mit. Platz bleibt fürs Schreiben. */
html .card-word.is-zoomed .word-modes button { min-height:24px !important; font-size:10px; padding:3px 8px; border-radius:8px; }
html .card-word.is-zoomed .word-hand-tools { min-height:24px !important; }
html .card-word.is-zoomed .word-hand-tools button { min-width:24px !important; min-height:24px !important; padding:2px 5px; font-size:9px; border-radius:8px; }
html .card-word.is-zoomed .word-hand-status { font-size:8px; }
html .card-word.is-zoomed [data-word-help] svg { width:16px; height:16px; }

/* Eigene Tageszahlgrenze rechts neben den festen Zahlenräumen. */
html .gsr-lu .tk-fenster .zdt-zahlenraum { flex-wrap:nowrap; gap:4px; align-items:center; }
html .gsr-lu .tk-fenster .zdt-zahlenraum button { padding:8px 10px; flex:1 1 auto; }
html .zdt-zahlenraum .range-max { display:flex; align-items:center; gap:6px; margin-left:auto; padding:0 6px; border:1px solid transparent; border-radius:12px; color:var(--ink); font-size:14px; font-weight:600; }
html .zdt-zahlenraum .range-max input { width:76px; min-width:0; min-height:44px; padding:6px; border:1px solid #cfd4e0; border-radius:10px; background:#fff; color:var(--ink); font:inherit; text-align:center; }
html .zdt-zahlenraum .range-max.is-selected { border-color:var(--ink); background:#fff; }
html .zdt-zahlenraum .range-max input:focus-visible { outline:3px solid #2563eb; outline-offset:2px; }
@media (max-width:600px) { html .gsr-lu .tk-fenster .zdt-zahlenraum { flex-wrap:wrap; } }

/* Alex, 06.11.2026: Werkzeuge (Stift, Auto, Würfel, Papierkorb, Lupe) in der ersten Zeile neben „Zahl des Tages“.
   Die Kopfzeile hat hier keine benannten Rasterflächen, daher rutschte grid-area: knoepfe in eine neue Zeile. */
html body .zdt-zeile.tkl-kopfzeile .tkl-oben { grid-area: auto; grid-row: 1; grid-column: -2 / -1; align-self: center; }
