/* Cockpit 6b — v4 (06.09.2026): Aufgaben neu (Erinnerungen-Layout, Zeile mit Griff, Wisch, Langdruck, Blatt) · Stunde als Zeitleiste.
   v4.4 (09.09. abends): Phasenliste schlank (46 px) + Zeitstreifen · Material als Liste in der linken Spalte.
   v4.5 (09.09. spät): Tafelspiegel raus — Karte „An die Tafel“ als Klartext (Zonen als Spalten, wachsen mit dem Inhalt, schmal: gestapelt) ·
   Phasenkarte ohne Reiter: alle Blöcke untereinander mit kleiner Überschrift.
   Lädt NACH v3.css. Farben: --v3-*; Listenfarbe je Zeile/Chip über --lc, Sozialform-Farbe über --bc; Zonen-Gewicht über --g. */
:root { --v4-wait: #8b5cf6; --v4-late: #ff3b30; --v4-soon: #e6a817; }

/* ---- Layout: Nav-Spalte + Inhalt (iPad), Kacheln (Handy) ---- */
.v4page { padding-bottom: 150px; }
.v4split { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 22px; align-items: start; }
.v4navcol { position: sticky; top: 0; }
.v4navhd { font-size: 22px; font-weight: 800; letter-spacing: -.02em; padding: 4px 10px 12px; }
.v4nav { display: flex; flex-direction: column; gap: 10px; }
.v4navgrp { display: flex; flex-direction: column; gap: 2px; }
.v4navlbl { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--v3-ink3); padding: 6px 10px 0; }
.v4navi { border: 0; background: none; text-align: left; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 10px; font-weight: 600; font-size: 14.5px; color: var(--v3-ink2); cursor: pointer; min-height: 40px; width: 100%; }
.v4navi i { width: 10px; height: 10px; border-radius: 50%; background: var(--lc, var(--v3-ink3)); flex: none; }
.v4navi span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4navi .v4n { font-size: 11.5px; font-weight: 700; color: var(--v3-ink3); background: var(--v3-card2); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.v4navi.on { background: var(--v3-card); color: var(--v3-ink); box-shadow: var(--v3-shadow); }
.v4navi.on .v4n { color: var(--lc, var(--v3-accent)); }
.v4navi.soft { color: var(--v3-ink3); }
.v4navi:focus-visible { outline: 2px solid var(--v3-accent); }
.v4content { min-width: 0; }
.v4content .v3hdr { margin-bottom: 12px; }
.v4view { display: flex; flex-direction: column; gap: 12px; }
/* Kacheln (Handy-Start) */
.v4nav.tiles { gap: 14px; }
.v4nav.tiles .v4navgrp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.v4nav.tiles .v4navgrp.lists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v4nav.tiles .v4navi { background: var(--v3-card); box-shadow: var(--v3-shadow); border-radius: 14px; padding: 12px 14px; min-height: 76px; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; }
.v4nav.tiles .v4navi.smart { background: var(--lc, var(--v3-accent)); color: #fff; }
.v4nav.tiles .v4navi.smart i { background: rgba(255,255,255,.55); }
.v4nav.tiles .v4navi.smart .v4n { background: rgba(255,255,255,.25); color: #fff; font-size: 20px; padding: 0; }
.v4nav.tiles .v4navi .v4n { font-size: 18px; background: none; padding: 0; }
.v4nav.tiles .v4navi span:first-of-type { flex: none; font-size: 14px; white-space: normal; }
.v4nav.tiles .v4navi i { width: 12px; height: 12px; }
.v4nav.tiles .v4navlbl { padding-top: 0; }

/* ---- Erfassen ---- */
.v4cap { display: flex; flex-direction: column; gap: 8px; }
.v4caprow { display: flex; gap: 8px; align-items: center; }
.v4in { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--v3-line); background: var(--v3-card); color: var(--v3-ink); min-height: 46px; }
.v4in.big { font-size: 18px; font-weight: 600; }
.v4in:focus { outline: 2px solid color-mix(in srgb, var(--v3-accent) 55%, transparent); border-color: var(--v3-accent); }
.v4add { width: 46px; height: 46px; border-radius: 12px; border: 0; background: var(--v3-accent); color: #fff; font-size: 20px; font-weight: 700; cursor: pointer; flex: none; }
.v4preview { display: flex; gap: 6px; flex-wrap: wrap; }
.v4tag { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 4px 8px 4px 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; background: color-mix(in srgb, var(--v3-accent) 14%, transparent); color: var(--v3-accent); }
.v4tag span { opacity: .6; font-weight: 500; }
.v4tag.frist { background: rgba(255,59,48,.12); color: var(--v4-late); }
.v4tag.wichtig { background: rgba(230,168,23,.18); color: #b47a00; }
.v4tag.person { background: var(--v3-card2); color: var(--v3-ink); }
.v4tag.liste { background: var(--v3-card2); color: var(--v3-ink2); }
.v4chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.v4chips.filter { margin: -2px 0 0; }
.v4chip { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 0 11px; min-height: 32px; font-size: 13px; font-weight: 600; background: var(--v3-card2); color: var(--v3-ink2); cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; position: relative; }
.v4chip.on { background: var(--v3-accent); color: #fff; }
.v4chip.bang { font-weight: 800; padding: 0 12px; }
.v4chip.bang.on { background: var(--v4-soon); color: #2b1d00; }
.v4chip.wait.on { background: var(--v4-wait); }
.v4chip.clear { color: var(--v3-ink3); background: transparent; }
.v4chip.dot i { width: 10px; height: 10px; border-radius: 50%; background: var(--lc); }
.v4chip.dot { padding: 0 9px; }
.v4chip.dot.on { background: color-mix(in srgb, var(--lc) 18%, transparent); color: var(--v3-ink); }
.v4chip.cal input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.v4chip.cal.frist.on { background: var(--v4-late); }
.v4chipsep { width: 1px; height: 20px; background: var(--v3-line2); margin: 0 2px; }
.v4dateinp { font: inherit; }

/* ---- Liste & Zeile ---- */
.v4card { background: var(--v3-card); border-radius: 16px; box-shadow: var(--v3-shadow); }
.v4tasks { padding: 2px 6px; }
.v4empty { padding: 18px; color: var(--v3-ink3); font-size: 14px; }
.v4hint { color: var(--v3-ink3); font-size: 13px; margin: 0 4px; }
.v4list { padding: 4px 6px; display: flex; flex-direction: column; }
.v4sec + .v4sec { border-top: 1px solid var(--v3-line); margin-top: 2px; }
.v4sech { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--v3-ink3); padding: 12px 8px 4px; }
.v4sech .v3n { padding: 1px 7px; }
.v4secbody { display: flex; flex-direction: column; min-height: 6px; }
.v4sec.ghostsec { display: none; }
body.v4dragging .v4sec.ghostsec { display: block; }
body.v4dragging .v4sec.ghostsec .v4secbody { min-height: 40px; border: 1.5px dashed var(--v3-line2); border-radius: 10px; margin: 2px 6px 6px; }
body.v4dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.v4row { position: relative; overflow: hidden; border-radius: 10px; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.v4row + .v4row .v4body { border-top: 1px solid var(--v3-line); }
.v4body { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 7px 4px 7px 8px; min-height: 48px; background: var(--v3-card); will-change: transform; }
.v4row.open .v4body { transform: translateX(-168px); }
.v4main { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 4px 0; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.v4title { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.v4bang { color: var(--v4-soon); font-weight: 800; margin-right: 4px; }
.v4meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.v4m { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--v3-ink3); background: var(--v3-card2); border-radius: 999px; padding: 2px 8px; white-space: nowrap; font-variant-numeric: tabular-nums; border: 0; font-family: inherit; text-decoration: none; }
.v4m.late { color: var(--v4-late); background: rgba(255,59,48,.12); }
.v4m.soon { color: #b47a00; background: rgba(230,168,23,.18); }
.v4m.frist { color: var(--v3-ink2); }
.v4m.frist.late { color: var(--v4-late); background: rgba(255,59,48,.12); }
.v4m.wait { color: var(--v4-wait); background: rgba(139,92,246,.12); }
.v4m.ok { color: var(--v3-ok); background: rgba(46,158,99,.14); }
.v4m.person { color: var(--v3-ink); background: transparent; border: 1px solid var(--v3-line2); }
.v4m.dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--lc); }
.v4m.lesson { color: var(--lc); background: color-mix(in srgb, var(--lc) 14%, transparent); cursor: pointer; }
.v4m.link { color: var(--v3-accent); background: transparent; }
.v4grip { color: var(--v3-ink3); font-size: 20px; line-height: 1; letter-spacing: -1px; padding: 6px 8px; cursor: grab; touch-action: none; flex: none; min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.v4grip:active { cursor: grabbing; }
.v4actions { flex: none; display: flex; gap: 6px; }
.v4rev { position: absolute; top: 0; bottom: 0; display: flex; align-items: stretch; z-index: 0; visibility: hidden; }
.v4row.sw-r .v4rev.right, .v4row.sw-l .v4rev.left, .v4row.open .v4rev.left { visibility: visible; }
.v4rev button { border: 0; font: inherit; font-weight: 700; font-size: 13px; color: #fff; padding: 0 12px; min-width: 56px; cursor: pointer; }
.v4rev.right { left: 0; right: 0; justify-content: flex-start; background: var(--v3-ok); }
.v4rev.right button { background: var(--v3-ok); padding-left: 16px; }
.v4rev.left { right: 0; width: 168px; justify-content: flex-end; }
.v4rev.left button { background: var(--v3-ink3); width: 56px; padding: 0; }
.v4rev.left button:first-child { background: var(--v3-accent); }
.v4rev.left button.wait { background: var(--v4-wait); }
.v4row.sw-l .v4rev.right, .v4row.open .v4rev.right { visibility: hidden; }
.v4row.sw-r .v4rev.left { visibility: hidden; }
.v4ghost { position: fixed; z-index: 70; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.25); background: var(--v3-card); opacity: .95; transform: scale(1.02); border-radius: 10px; }
.v4ghost .v4rev { display: none; }
.v4hidden { display: none !important; }
.v4ph { border-radius: 10px; background: color-mix(in srgb, var(--v3-accent) 12%, transparent); border: 1.5px dashed color-mix(in srgb, var(--v3-accent) 50%, transparent); margin: 2px 0; }

/* ---- Langdruck-Menü ---- */
.v4menuwrap { position: fixed; inset: 0; z-index: 65; }
.v4menu { position: fixed; width: 224px; background: var(--v3-card); border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.25); padding: 6px; display: flex; flex-direction: column; }
.v4menu button { border: 0; background: none; text-align: left; font: inherit; font-size: 15px; font-weight: 600; color: var(--v3-ink); padding: 11px 12px; border-radius: 9px; cursor: pointer; min-height: 44px; }
.v4menu button + button { border-top: 1px solid var(--v3-line); border-radius: 0; }
.v4menu button:hover { background: var(--v3-card2); }
.v4menu button.danger { color: var(--v4-late); }

/* ---- Detail-Blatt ---- */
.v4sheetwrap { position: fixed; inset: 0; z-index: 62; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; justify-content: center; }
.v4sheet { background: var(--v3-ground); width: 100%; max-width: 640px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 12px 18px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 744px) { .v4sheetwrap { align-items: center; } .v4sheet { border-radius: 20px; max-height: 88vh; } }
.v4sheethd { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.v4sheethd b { flex: 1; font-size: 15px; }
.v4x { border: 0; background: none; color: var(--v3-accent); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; min-height: 44px; padding: 0 4px; }
.v4field { display: flex; flex-direction: column; gap: 6px; }
.v4lbl { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--v3-ink3); }
.v4check { display: flex; flex-direction: column; gap: 4px; background: var(--v3-card); border-radius: 12px; padding: 6px 10px; }
.v4ci { display: flex; align-items: center; gap: 10px; font-size: 14.5px; min-height: 40px; }
.v4ci span { flex: 1; }
.v4ci.done span { text-decoration: line-through; color: var(--v3-ink3); }
.v4ci.add .v4in { min-height: 40px; padding: 6px 10px; font-size: 15px; }
.v4ci.add .v4add { width: 40px; height: 40px; }
.v4notiz { font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--v3-line); background: var(--v3-card); color: var(--v3-ink); resize: vertical; min-height: 60px; }
.v4sheetft { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.v4soft { color: var(--v3-ink3); font-size: 12.5px; }
.v4qadd .qadd-sheet { display: flex; flex-direction: column; gap: 10px; max-width: 640px; width: 100%; }

/* ---- Undo-Toast ---- */
.v4toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; background: var(--v3-ink); color: var(--v3-ground); border-radius: 12px; padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.3); max-width: calc(100vw - 32px); }
.v4toast button { border: 0; background: none; color: var(--v3-accent); font: inherit; font-weight: 800; cursor: pointer; padding: 6px 8px; min-height: 36px; }
.v4toast.weg { opacity: 0; transition: opacity .4s ease; }
@media (prefers-color-scheme: dark) { .v4toast { background: #f2f2f7; color: #111; } }
@media (max-width: 743px) { .v4toast { bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* ---- Stunde: Zeitleiste + Phasenkarte ---- */
/* v4.1: iPad/Desktop = links die Phasenliste als senkrechte Zeitleiste (Höhe ∝ Dauer), rechts die Phasenkarte („Tafel“).
   Die waagerechte Leiste + Uhrzeit-Marken bleiben dem Handy vorbehalten. */
.v4lp { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.v4lp.v3lp { grid-template-columns: 300px minmax(0, 1fr); }
.v4tlwrap { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; position: sticky; top: 8px; }
.v4tlwrap .v4tl, .v4tlwrap .v4ticks { display: none; }
.v4stunde .v3hdr > div:first-child { min-width: 0; flex: 1 1 520px; }
.v4kb { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 10px 6px 8px; width: 100%; overflow: hidden; border: 1px solid var(--v3-line, #dfe2e8); border-radius: 10px; background: var(--v3-card); color: var(--v3-ink2); font: inherit; font-size: 13px; text-align: left; cursor: pointer; max-width: 100%; }
.v4kb .v4kblbl { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--v3-ink3); flex: none; }
.v4kb .v4kbtxt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4kb .v4kbcopy { color: var(--v3-accent, #0a7aff); flex: none; font-size: 14px; }
.v4kb:active { transform: scale(.99); }
.v3btn.v4doku { --fc: #2e9e63; border-color: #2e9e63; color: #2e9e63; font-weight: 700; }
.v4tl { display: flex; gap: 3px; height: 54px; }
.v4blk { border: 0; border-radius: 8px; background: var(--bc); color: #fff; min-width: 0; padding: 4px 8px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1px; cursor: pointer; text-align: left; opacity: .82; overflow: hidden; }
.v4blk.on { opacity: 1; outline: 3px solid var(--v3-ink); outline-offset: -3px; }
.v4blk:focus-visible { outline: 3px solid var(--v3-accent); outline-offset: -3px; }
.v4blkname { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; line-height: 1.2; }
.v4blkmin { font-size: 11px; font-weight: 600; opacity: .9; font-variant-numeric: tabular-nums; }
.v4blk.tiny { padding: 4px 3px; align-items: center; }
.v4blk.tiny .v4blkname { display: none; }
.v4ticks { position: relative; height: 16px; font-size: 11px; color: var(--v3-ink3); font-variant-numeric: tabular-nums; }
.v4ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.v4ticks span:first-child { transform: none; }
.v4ticks span:last-child { transform: translateX(-100%); }
/* v4.4: Zeitstreifen (8 px, Breite ∝ Dauer, aktiver Block voll) statt Legende; die Phasenzeilen sind fest ≈ 46 px hoch */
.v4strip { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; margin: 0 2px 2px; }
.v4strip i { display: block; min-width: 3px; background: var(--bc); opacity: .55; border-radius: 2px; transition: opacity .15s; }
.v4strip i.on { opacity: 1; }
.v4legende { display: none; }
.v4plist { display: flex; flex-direction: column; gap: 4px; margin-top: 0; }
.v4pitem { display: flex; align-items: center; gap: 8px; background: var(--v3-card); border-radius: 11px; padding: 0 12px 0 10px; box-shadow: var(--v3-shadow); border: 0; text-align: left; width: 100%; height: 46px; min-height: 46px; flex: 0 0 auto; font: inherit; color: inherit; cursor: pointer; overflow: hidden; }
.v4pitem i { width: 5px; height: 26px; border-radius: 3px; background: var(--bc); flex: none; }
.v4pitem b { font-variant-numeric: tabular-nums; color: var(--v3-ink3); font-size: 12.5px; width: 36px; flex: none; font-weight: 600; }
.v4pitem span { flex: 1; font-weight: 600; font-size: 14.5px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.v4pitem small { color: var(--v3-ink3); font-variant-numeric: tabular-nums; font-size: 12.5px; flex: none; }
.v4pitem.on { outline: 2px solid var(--bc); outline-offset: -2px; }
.v4pitem.on span { color: var(--v3-ink); }
/* v4.4: Material als Liste — links unter der Phasenliste (iPad) bzw. unter der Liste (Handy) */
.v4matcard { padding: 12px 6px 6px; margin-top: 8px; }
.v4matcard h4 { padding: 0 10px; }
.v4matlist { display: flex; flex-direction: column; }
.v4matrow { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px; border-radius: 9px; text-decoration: none; color: inherit; }
.v4matrow + .v4matrow, .v4matimg + .v4matrow { border-top: 1px solid var(--v3-line); border-radius: 0; }
.v4matrow:active { background: var(--v3-card2); }
.v4matsym { width: 26px; flex: none; text-align: center; font-size: 17px; line-height: 1; }
.v4matrow.film .v4matsym { color: var(--v3-accent); font-size: 15px; }
.v4mattxt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.v4mattxt b { font-size: 14.5px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.v4mattxt small { font-size: 12px; color: var(--v3-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.v4matcard .v4matimg { margin: 4px 8px 8px; }
.v4stunde .v3fbcard { margin-top: 22px; }
/* v4.4: „Aufbau & Tafel“ ist weg — der vorher-Text steht gedämpft in der Vorbereitungs-Kachel, 3 Zeilen, Tipp klappt auf */
.v3info .v3prepcard .v4vorher { margin: 6px 0 4px; font-size: 13.5px; line-height: 1.45; color: var(--v3-ink2); white-space: pre-wrap; overflow-wrap: anywhere; cursor: pointer; }
.v3info .v3prepcard .v4vorher.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.v3prepcard.open .v4vorher { border-top: 1px solid var(--v3-line); padding-top: 8px; margin-top: 4px; }
.v3info.top .v3prepcard.v4prepnur { padding: 10px 16px 8px; }
.v4pcard { min-height: 0; scroll-margin-top: 8px; }
.v4dur { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; color: var(--v3-ink2); }
.v4dur b { color: var(--fc); font-size: 15px; }
.v4form { color: var(--bc); }
.v4kern { font-size: 17px !important; font-weight: 600; margin-top: 8px !important; }
.v4ziel { max-width: 78ch; }
.v4stunde .v3fach { letter-spacing: .06em; }

/* ---- iPad Hochformat ---- */
@media (min-width: 744px) and (max-width: 1024px) {
  .v4split { grid-template-columns: 168px minmax(0, 1fr); gap: 16px; }
  .v4navi { font-size: 13.5px; padding: 8px 8px; }
}
/* ---- Handy ---- */
@media (max-width: 743px) {
  .v4page.phone .v3back { margin-bottom: 4px; }
  .v4chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .v4chips::-webkit-scrollbar { display: none; }
  .v4chips.filter { flex-wrap: wrap; }
  .v4body { padding: 6px 2px 6px 6px; }
  .v4meta { gap: 4px; }
  .v4lp, .v4lp.v3lp { display: flex; flex-direction: column; gap: 16px; }
  .v4tlwrap { position: static; }
  .v4tlwrap .v4tl, .v4tlwrap .v4ticks { display: flex; }
  .v4tlwrap .v4ticks { display: block; }
  .v4plist { display: flex; margin-top: 8px; }
  .v4pitem { height: 46px; min-height: 46px; }
  .v4strip { display: none; }
  .v4matcard { margin-top: 12px; }
  .v4kb { margin-top: 6px; padding: 4px 8px; font-size: 12px; }
  .v4tl { height: 44px; }
  .v4blkname { display: none; }
  .v4blk { align-items: center; padding: 4px 2px; }
  .v4lp.detail .v4tlwrap { display: none; }
  .v4lp.list .v3pdetail { display: none; }
  .v4legende { display: none; }
}

/* v4.1.1: Bild im Material (data-URI) */
.v4matimg { margin: 6px 0 10px; }
.v4matimg img { display: block; width: 100%; max-width: 680px; height: auto; border-radius: 10px; background: #fff; border: 1px solid rgba(0,0,0,.08); }

/* ================= v4.2: Phasenkarte „auf einen Blick“ ================= */
/* Florian 08.09.: Text stark reduzieren, das Wichtigste sofort sehen (Seite, Nummer, Lösung, Ansage);
   keine Editor-Optik; Handy: Phase als Vollbild ohne Scrollen. */
.v4pcard { display: flex; flex-direction: column; gap: 10px; }
.v4pcard > * { flex: none; }
.v4ptop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.v4ptop .v3phback { margin: 0; }
.v4pcount { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--v3-ink3); }
.v4ptop .v4dur { margin-left: auto; }
.v4ptitle { margin: 0; font-size: 24px; line-height: 1.15; letter-spacing: -.01em; }
.v4auftrag { font-size: 21px; line-height: 1.35; font-weight: 700; padding: 14px 16px; border-radius: 14px; background: var(--v3-tafel, #1f3b33); color: var(--v3-tafelink, #f4f7f2); white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.v4auftrag.soft { background: var(--v3-card2); color: var(--v3-ink); font-weight: 600; font-size: 18px; box-shadow: none; }
.v4facts { display: flex; flex-wrap: wrap; gap: 8px; }
.v4fact { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; font-size: 15px; font-weight: 700; background: var(--v3-card2); color: var(--v3-ink); font-variant-numeric: tabular-nums; }
.v4fact i { font-style: normal; font-size: 14px; }
.v4fact.wo { background: color-mix(in srgb, var(--fc) 14%, var(--v3-card)); color: var(--fc); }
.v4fact.lo { background: color-mix(in srgb, var(--v3-ok, #2e9e63) 14%, var(--v3-card)); color: var(--v3-ok, #2e9e63); }
.v4fact.form i { width: 10px; height: 10px; border-radius: 3px; background: var(--bc); }
.v4pcard .v4kern { font-size: 16px !important; font-weight: 500; color: var(--v3-ink2); margin: 0 !important; line-height: 1.45; }
.v4blkc { font-size: 16px; line-height: 1.5; border-radius: 14px; padding: 12px 14px; background: var(--v3-card2); color: var(--v3-ink); max-width: 76ch; }
.v4blkc .v3bl { white-space: pre-wrap; overflow-wrap: anywhere; }
.v4blkc .v3bl.sprech { font-style: italic; color: var(--v3-ink2); padding-left: 10px; border-left: 3px solid var(--v3-line2); margin: 2px 0; }
.v4blkc .v3bgap { height: 8px; }
.v4blkc .v3bt { border-collapse: collapse; width: 100%; margin: 4px 0; }
.v4blkc .v3bt td { padding: 5px 8px; border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); vertical-align: top; font-variant-numeric: tabular-nums; }
.v4blkc .v3bt td.last { font-weight: 700; white-space: normal; }
.v4blkc .v3bt td:first-child { white-space: nowrap; padding-right: 10px; }
.v4blkc .v4blksub { font-size: 12px; font-weight: 700; color: var(--v3-ink3); margin-bottom: 6px; }
.v4blkc.tafel { background: var(--v3-tafel, #1f3b33); color: var(--v3-tafelink, #f4f7f2); font-size: 17px; font-weight: 600; }
.v4blkc.tafel .v3bl.sprech { color: inherit; border-left-color: rgba(255,255,255,.35); font-style: normal; }
.v4blkc.tafel .v3bt td { border-bottom-color: rgba(255,255,255,.18); }
.v4blkc.tafel .v4blksub { color: rgba(255,255,255,.7); }
.v4blkc.heft { background: repeating-linear-gradient(transparent 0 27px, color-mix(in srgb, var(--v3-accent) 22%, transparent) 27px 28px), var(--v3-card); border: 1px solid var(--v3-line); line-height: 28px; }
.v4blkc.loesung { background: color-mix(in srgb, var(--v3-ok, #2e9e63) 10%, var(--v3-card)); border: 1px solid color-mix(in srgb, var(--v3-ok, #2e9e63) 30%, transparent); }
.v4blkc.ansage { background: transparent; border: 1.5px dashed var(--v3-line2); font-size: 17px; }
.v4blkc.ansage .v3bl { font-style: italic; }
.v4blkc.ansage .v3bl.sprech { border: 0; padding-left: 0; }
.v4blkc.warn { background: color-mix(in srgb, #e6a817 14%, var(--v3-card)); border: 1px solid color-mix(in srgb, #e6a817 40%, transparent); }
/* v4.5: keine Reiter — alle Blöcke untereinander: kleine gedämpfte Überschrift, Inhalt als ruhiger Text, feine Trennlinien.
   Nur der Tafel-Block (alte Stunden ohne Feld `tafel`) behält die dunkelgrüne Tafel-Optik. */
.v4pblocks { display: flex; flex-direction: column; margin-top: 2px; }
.v4pblk { padding: 9px 0 10px; border-top: 1px solid var(--v3-line); }
.v4pblk:first-child { border-top: 0; padding-top: 2px; }
.v4pblkl { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--v3-ink3); margin-bottom: 4px; }
.v4pblk .v4blkc, .v4pblk .v4blkc.ansage, .v4pblk .v4blkc.loesung, .v4pblk .v4blkc.warn, .v4pblk .v4blkc.heft { background: none; border: 0; border-radius: 0; padding: 0; font-size: 14.5px; line-height: 1.45; font-weight: 400; color: var(--v3-ink); max-width: 76ch; }
.v4pblk .v4blkc .v3bgap { height: 6px; }
.v4pblk .v4blkc .v3bt td { padding: 3px 8px 3px 0; }
.v4pblk .v4blkc .v3bt td:first-child { white-space: normal; } /* lange „a | b“-Zeilen (Fließtext mit |) laufen sonst aus der Karte */
.v4pblk .v4blkc .v4blksub { margin-bottom: 3px; }
.v4pblk .v4blkc.tafel { background: var(--v3-tafel, #22302a); color: var(--v3-tafelink, #e8f0ea); padding: 10px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; }
.v4pnav { margin-top: 4px; }
/* Aufbau & Tafel (vorher): gleiche Schrift wie die Karte, kein Monospace mehr */
.v4stunde .v3blk, .v4stunde .v3blk.tafel, .v4stunde .v3blk.heft { font-family: inherit; font-size: 15.5px; }
.v3btn.v4erg { --fc: #4a86d0; border-color: #4a86d0; color: #4a86d0; font-weight: 700; }

/* Handy: Phase als Vollbild-Seite — Auftrag ohne Scrollen sichtbar, Wischen blättert */
@media (max-width: 743px) {
  .v4stunde.detail .v3pdetail.v4pcard { position: fixed; inset: 0; z-index: 60; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--v3-ground, #f2f2f6); padding: calc(10px + env(safe-area-inset-top)) 14px calc(90px + env(safe-area-inset-bottom)); margin: 0; border-radius: 0; box-shadow: none; gap: 10px; }
  .v4stunde.detail .v4ptop { position: sticky; top: calc(-10px - env(safe-area-inset-top)); background: var(--v3-ground, #f2f2f6); padding: 6px 0; z-index: 1; }
  .v4ptitle { font-size: 21px; }
  .v4auftrag { font-size: 19px; padding: 12px 14px; }
  .v4stunde.detail .v4pnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--v3-ground, #f2f2f6); border-top: 1px solid var(--v3-line); margin: 0; }
  .v4stunde.detail .v4pnav .v3btn { flex: 1; text-align: center; padding: 12px 10px; }
  body.v4phase-open .v3tabbar, body.v4phase-open .v3side { display: none; }
}

/* ================= v4.5: Karte „An die Tafel“ ================= */
/* Florian 09.09. spät: „Ich muss nur auf einen Blick sehen, was nachher an die Tafel muss.“ Klartext auf ruhigem Dunkelgrün
   (in beiden Farbschemata), Zonen als Spalten (Breite ∝ Gewicht --g), die mit dem Inhalt wachsen — kein Maßstab, kein Zeilenzähler.
   Ist die Karte schmaler als 560 px (Handy, linke iPad-Spalte), stehen die Zonen untereinander (Container-Query). */
.v4tkarte { padding: 12px 10px 10px; margin-top: 8px; container-type: inline-size; }
.v4tkarte h4 { padding: 0 4px; }
.v4tbrett { display: flex; align-items: stretch; background: var(--v3-tafel, #22302a); color: var(--v3-tafelink, #e8f0ea); border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); font-size: 14.5px; line-height: 1.45; font-weight: 500; overflow: hidden; }
.v4tzone { flex: var(--g, 1) 1 0; min-width: 0; padding: 10px 12px 12px; }
.v4tzone + .v4tzone { border-left: 1px solid rgba(255,255,255,.14); }
.v4tzone.klappe { background: rgba(0,0,0,.16); }
.v4tzonehd { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--v3-tafelhead, #9fc7ad); margin-bottom: 6px; }
.v4tzonename { opacity: .7; }
.v4tzonetitel::before { content: "· "; opacity: .5; }
.v4tzonebody { display: flex; flex-direction: column; }
.v4tzl { white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 1em; text-indent: -1em; min-height: 1.45em; }
.v4tzl.kopf { font-weight: 800; font-size: 15.5px; margin: 1px 0 3px; }
.v4tzl.rot { color: #ffb0b6; font-weight: 700; }
.v4tzl.gelb { color: #ffe08a; }
.v4tzl.leer { min-height: 0; height: 7px; }
.v4tzl.strich { padding: 0; text-indent: 0; min-height: 0; margin: 6px 0 7px; }
.v4tzl.strich i { display: block; width: 100%; height: 1px; background: rgba(232,240,234,.4); }
.v4tt { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; margin: 2px 0; }
.v4tt td { padding: 1px 8px 1px 0; vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; }
.v4tt td + td { border-left: 1px solid rgba(255,255,255,.22); padding-left: 8px; }
@container (max-width: 559px) {
  .v4tbrett { flex-direction: column; }
  .v4tzone + .v4tzone { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); }
}
/* linke Spalte klebt nur, solange sie in den Bildschirm passt (Klasse setzt v4.js nach dem Messen) */
.v4tlwrap.lang { position: static; }
@media (max-width: 743px) {
  .v4tbrett { flex-direction: column; }
  .v4tzone + .v4tzone { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); }
  .v4tkarte { margin-top: 12px; }
}

/* Ergebnisse (v4.2) */
.v4ergsum { font-size: 14px; color: var(--v3-ink2); margin: -2px 0 10px; font-weight: 600; }
.v4ergt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.v4ergt th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--v3-ink3); padding: 6px 8px; border-bottom: 1px solid var(--v3-line); }
.v4ergt td { padding: 8px 8px; border-bottom: 1px solid color-mix(in srgb, var(--v3-line) 60%, transparent); }
.v4ergt td.k { font-weight: 800; letter-spacing: .04em; }
.v4ergt td.p { font-weight: 700; }
.v4ergt tr.low td.p { color: #e0524a; }
.v4ergt tr.high td.p { color: var(--v3-ok, #2e9e63); }
.v4ergcard h4 { display: flex; align-items: center; gap: 8px; }
