/* Schriften liegen im Ordner schriften/ (SIL Open Font License, siehe schriften/LIZENZ.txt) – keine Verbindung zu Google */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('schriften/dm-sans-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('schriften/dm-sans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('schriften/jetbrains-mono-greek.woff2') format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('schriften/jetbrains-mono-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('schriften/jetbrains-mono-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 400; font-display: swap; src: url('schriften/source-serif-4-kursiv-greek.woff2') format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 400; font-display: swap; src: url('schriften/source-serif-4-kursiv-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 400; font-display: swap; src: url('schriften/source-serif-4-kursiv-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('schriften/source-serif-4-greek.woff2') format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('schriften/source-serif-4-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('schriften/source-serif-4-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #1a1a18; --ink-mid: #4a4a46; --ink-light: #8a8a84;
  --rule: #c8c8c0; --rule-light: #e4e4dc;
  --accent: #2a4a8a; --accent-light: #e8eef8;
  --ok: #1a6a30; --ok-light: #e6f3ea;
  --bad: #9a2a1a; --bad-light: #fbeae6;
  --paper: #fafaf6; --white: #ffffff; --bg: #f0f0e8;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }

/* ── Kopfzeile ── */
.topbar {
  background: var(--white); border-bottom: 1px solid var(--rule);
  /* Inhalt bündig mit der zentrierten Seitenspalte (.wrap: 980px, 1.25rem Innenabstand) */
  padding: 0.55rem max(1.5rem, calc((100% - 980px) / 2 + 1.25rem)); display: flex; align-items: center; gap: 0.9rem;
  position: sticky; top: 0; z-index: 20;
}
.topbar img { width: 34px; height: 34px; object-fit: contain; }
.topbar .brand { font-family: var(--serif); font-weight: 600; font-size: 15px; margin-right: auto; line-height: 1.2; }
.topbar .brand small { display: block; font-family: var(--sans); font-weight: 400; font-size: 11px; color: var(--ink-mid); }
.topbar .by { font-family: var(--sans); font-size: 15px; font-weight: 700; color: var(--ink-mid); font-style: italic; margin-left: 0.3rem; white-space: nowrap; }   /* Autorenzeile direkt hinter dem Titel */
.back-link {
  text-decoration: none; font-size: 13px; font-weight: 500; padding: 5px 12px;
  border: 1px solid var(--rule); border-radius: 4px; background: var(--white);
}
.back-link:hover { background: var(--rule-light); }

.wrap { max-width: 980px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }

/* ── Startseite ── */
.hero { margin-bottom: 1.75rem; }
.hero .kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-light); }
.hero h1 { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1.15; margin: 0.2rem 0 0.5rem; }
.hero p { color: var(--ink-mid); max-width: 60ch; }

.topic-group { margin-bottom: 1.75rem; }
.group-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mid);
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.7rem;
}
.group-title::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.topic-card {
  --c: var(--accent);
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--white); border: 1px solid var(--rule); border-top: 5px solid var(--c);
  border-radius: 4px; padding: 1.1rem 1.2rem 1rem; box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: transform 0.15s, box-shadow 0.15s;
}
.topic-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.09); }
.topic-card:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
.topic-card .glyph { font-family: var(--mono); font-weight: 600; font-size: 28px; color: var(--c); line-height: 1.1; min-height: 2.4rem; }
.topic-card .glyph sub { font-size: 0.5em; }
.topic-card h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 0.35rem 0 0.25rem; }
.topic-card p { font-size: 13.5px; color: var(--ink-mid); margin-bottom: 0.7rem; }
.topic-card ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 0.9rem; }
.topic-card li { font-size: 11.5px; background: var(--rule-light); border-radius: 3px; padding: 1px 7px; color: var(--ink-mid); }
.topic-card .go { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--c); }

.howto-box {
  margin-top: 2rem; background: var(--white); border: 1px solid var(--rule); border-radius: 4px; padding: 1.1rem 1.3rem;
}
.howto-box h3 { font-family: var(--serif); font-size: 18px; margin-bottom: 0.6rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem; counter-reset: s; }
.steps div { counter-increment: s; font-size: 13.5px; color: var(--ink-mid); padding-left: 2.1rem; position: relative; }
.steps div::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--ink); color: var(--white); font-weight: 700; font-size: 13px; display: grid; place-items: center;
}
.steps strong { color: var(--ink); display: block; }

/* ── Themenseite ── */
.topic-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.topic-head .glyph {
  font-family: var(--mono); font-weight: 600; font-size: 22px; color: var(--white); background: var(--c);
  border-radius: 6px; padding: 0.4rem 0.7rem; white-space: nowrap;
}
.topic-head .glyph sub { font-size: 0.55em; }
.topic-head h1 { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1.15; }
.topic-head p { color: var(--ink-mid); font-size: 14px; }

.panel { background: var(--white); border: 1px solid var(--rule); border-radius: 4px; padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.panel h2 { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-light); margin-bottom: 0.6rem; }

.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.level {
  text-align: left; cursor: pointer; background: var(--paper); border: 2px solid var(--rule-light);
  border-radius: 6px; padding: 0.7rem 0.85rem; transition: border-color 0.15s, background 0.15s;
}
.level:hover { border-color: var(--rule); }
.level[aria-pressed="true"] { border-color: var(--c); background: var(--white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 15%, transparent); }
.level .stars { color: var(--c); font-size: 15px; letter-spacing: 2px; }
.level .stars .off { color: var(--rule); }
.level strong { display: block; font-size: 16px; margin: 0.1rem 0; }
.level span.d { font-size: 12.5px; color: var(--ink-mid); line-height: 1.35; display: block; }

.settings-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; }
.h2-zeile { display: flex; align-items: baseline; gap: 10px; margin-bottom: 0.6rem; }
.h2-zeile h2 { margin-bottom: 0; }
.subs-knoepfe { display: inline-flex; gap: 4px; }
.subs-zahl { font-size: 12px; color: var(--ink-light); white-space: nowrap; }
.anzahl-zeile { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.anzahl-zeile[hidden] { display: none; }
.subs-knoepfe button:disabled { opacity: 0.45; cursor: default; }
.subs-knoepfe button:disabled:hover { color: var(--ink-light); border-color: var(--rule); }
.subs-knoepfe button { font: inherit; font-size: 12px; line-height: 1.3; padding: 1px 8px; color: var(--ink-light); background: transparent; border: 1px solid var(--rule); border-radius: 4px; cursor: pointer; }
.subs-knoepfe button:hover { color: inherit; border-color: currentColor; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--rule); border-radius: 20px; cursor: pointer; font-size: 13px; user-select: none; background: var(--white); }
.chip:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, white); }
.chip input { accent-color: var(--c); width: 15px; height: 15px; margin: 0; }
.stellen-wahl { margin-top: 14px; }
.stellen-an { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; cursor: pointer; }
.stellen-regler { margin-top: 8px; display: grid; gap: 8px; }
.stellen-regler[hidden] { display: none; }
.stellen-zeile { display: grid; grid-template-columns: 1fr 2.2ch; align-items: center; column-gap: 10px; row-gap: 2px; font-size: 14px; }
.stellen-zeile > span { grid-column: 1 / -1; }
.stellen-zeile small { color: var(--ink-light); }
.stellen-zeile input[type=range] { accent-color: var(--c); width: 100%; }
.stellen-zeile output { font-family: var(--mono); font-weight: 600; font-size: 16px; text-align: right; }
.stellen-info { font-size: 12px; color: var(--ink-light); margin: 2px 0 0; }
.opt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.opt-row[hidden] { display: none; }
.opt-zweizeilig .opt-label { flex-basis: 100%; }          /* Überschrift über den Knöpfen, damit beide nebeneinander passen */
.opt-label { font-size: 13px; font-weight: 600; color: var(--ink-mid); margin-right: 4px; }
.field { display: flex; flex-direction: column; gap: 0.45rem; font-size: 13px; }
.field label { font-weight: 500; }
.count-row { display: flex; align-items: center; gap: 0.6rem; }
.count-row input[type=range] { flex: 1; accent-color: var(--c); }
.count-row output { font-family: var(--mono); font-weight: 600; font-size: 18px; min-width: 2ch; text-align: right; }
select { padding: 5px 8px; border: 1px solid var(--rule); border-radius: 4px; background: var(--white); font-size: 13px; }
.warn { color: var(--bad); font-size: 13px; margin-top: 0.4rem; }

.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.actions-zeile { display: flex; flex-basis: 100%; gap: 0.6rem; flex-wrap: wrap; }   /* zweite Reihe: Live-Quiz, Hausaufgabe, gemischter Klapptest */
.btn {
  font-size: 14px; font-weight: 500; padding: 8px 16px; border-radius: 4px; border: 1px solid var(--rule);
  background: var(--white); cursor: pointer; transition: background 0.15s;
}
.btn:hover { background: var(--rule-light); }
.btn.primary { background: var(--c); border-color: var(--c); color: var(--white); font-weight: 700; }
.btn.primary:hover { filter: brightness(1.1); background: var(--c); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn.dark:hover { background: #333; }
.btn.small { font-size: 12.5px; padding: 5px 11px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--rule); margin: 1.5rem 0 0; }
.tab {
  background: none; border: none; cursor: pointer; padding: 0.55rem 1rem; font-size: 14px; font-weight: 500;
  color: var(--ink-mid); border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--c); font-weight: 700; }
.tabpanel { padding-top: 1rem; }
/* Seitenzahl des Drucks im Reiter „Arbeitsblatt“ und rote Linie, wo beim Drucken die nächste Seite beginnt (app.js seitenZeigen) */
.seiten-zahl { margin-left: 0.5rem; font-size: 12px; font-weight: 500; color: var(--ink-mid); background: var(--rule-light); border-radius: 99px; padding: 1px 8px; white-space: nowrap; }
.seiten-zahl:empty { display: none; }
.seiten-zahl.zu-lang { color: #a12a1a; background: #fde8e4; font-weight: 700; }
.druck-mass { position: absolute; left: -10000px; top: 0; width: 186mm; visibility: hidden; pointer-events: none; }
@media screen {
  table.kt tr.umbruch-vor > td { border-top: 2px dashed #c0392b; padding-top: 24px; }   /* Platz für das Schild (nur am Bildschirm) */
  table.kt tr.umbruch-vor > td:first-child, .sheet > .umbruch-vor { position: relative; }
  .sheet > .umbruch-vor { border-top: 2px dashed #c0392b; padding-top: 24px; }
  table.kt tr.umbruch-vor > td:first-child::before, .sheet > .umbruch-vor::before {
    content: attr(data-umbruch); position: absolute; left: 0; top: 3px; z-index: 2; white-space: nowrap;
    font: 700 11px/1.5 var(--sans); color: #fff; background: #c0392b; border-radius: 3px; padding: 0 6px;
  }
}
.tabpanel[hidden] { display: none; }

/* ── Üben am Bildschirm ── */
.practice-bar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.score { margin-right: auto; font-size: 14px; color: var(--ink-mid); }
.score b { color: var(--ink); font-family: var(--mono); }
.score.done { color: var(--ok); font-weight: 700; }

.rows { list-style: none; background: var(--white); border: 1px solid var(--rule); border-radius: 4px; }
.row {
  display: grid; grid-template-columns: 2.4rem minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(11rem, 1fr) 1.8rem;
  align-items: center; gap: 0.75rem; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--rule-light);
}
.row:last-child { border-bottom: none; }
.row .nr { font-family: var(--mono); font-size: 12px; color: var(--ink-light); }
.row .q { font-family: var(--mono); font-size: 16px; font-weight: 600; line-height: 1.45; }
.row .q br + * , .row .q { overflow-wrap: anywhere; }
.row .ans { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-family: var(--mono); font-size: 15px; }
.row .ans input, .row .ans select {
  font-family: var(--mono); font-size: 16px; padding: 5px 8px; border: 1.5px solid var(--rule); border-radius: 4px;
  background: var(--paper); width: 8.5ch;
}
.row .ans input.w-txt { width: 13ch; }
.row .ans input.w-rom { width: 14ch; text-transform: uppercase; }
.row .ans input.w-bin { width: 11ch; }
.row .ans input.w-set { width: 15ch; max-width: 100%; }
.row .ans input.w-set.w-kurz { width: 12ch; }
.row .ans select { width: auto; }
.row .ans input:focus, .row .ans select:focus { outline: none; border-color: var(--c); background: var(--white); }
.row.ok .ans input, .row.ok .ans select { border-color: var(--ok); background: var(--ok-light); }
.row.bad .ans input, .row.bad .ans select { border-color: var(--bad); background: var(--bad-light); }

/* Klappe über der Lösung */
.sol { position: relative; perspective: 700px; min-height: 2.4rem; }
.sol .sol-text {
  height: 100%; min-height: 2.4rem; display: flex; align-items: center; padding: 0 0.7rem;
  font-family: var(--mono); font-weight: 600; font-size: 15px; background: #fffdf2; border: 1px dashed #d8c890; border-radius: 4px;
}
.flap {
  position: absolute; inset: 0; border: none; border-radius: 4px; cursor: pointer;
  background: repeating-linear-gradient(135deg, var(--c) 0 10px, color-mix(in srgb, var(--c) 85%, black) 10px 20px);
  color: var(--white); font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  transform-origin: left center; transition: transform 0.45s cubic-bezier(.3,.7,.3,1), opacity 0.45s;
  backface-visibility: hidden;
}
.flap:hover { filter: brightness(1.12); }
.flap:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.row.open .flap { transform: rotateY(-115deg); opacity: 0; pointer-events: none; }
.row .mark { font-size: 20px; font-weight: 700; text-align: center; }

/* Tipp */
.tip-btn {
  display: inline-block; margin-left: 0.6rem; vertical-align: middle; cursor: pointer;
  font-family: var(--sans); font-size: 12px; font-weight: 500; padding: 2px 9px;
  border: 1px solid #e0c060; border-radius: 12px; background: #fff8dc; color: #6a5200;
}
.tip-btn:hover, .tip-btn.active { background: #ffe9a0; }
.row .hint {
  grid-column: 2 / -1; font-size: 13.5px; line-height: 1.5; color: var(--ink);
  background: #fffaf0; border: 1px solid #ecd9a0; border-left: 4px solid #e0b030; border-radius: 4px; padding: 0.55rem 0.8rem;
}
.hint .hint-title { font-weight: 700; margin-bottom: 0.3rem; }
.hint .vz { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0.35rem; }
.hint .vz span { font-family: var(--mono); font-weight: 600; padding: 3px 9px; border-radius: 4px; background: var(--white); border: 1px solid var(--rule); }
.hint .vz span.on { background: #ffe27a; border-color: #d8a800; box-shadow: 0 0 0 2px rgba(216,168,0,0.25); }
.hint .hint-note { color: var(--ink-mid); }
.row.ok .mark { color: var(--ok); }
.row.bad .mark { color: var(--bad); }
.row.empty .mark { color: var(--ink-light); }

.rom { font-family: var(--serif); font-weight: 600; letter-spacing: 0.06em; }
.bin sub, .ans sub { font-size: 0.65em; }
mark { background: #ffe27a; color: inherit; padding: 0 1px; border-radius: 2px; text-decoration: underline; text-underline-offset: 3px; }
.ph-box { display: inline-block; font-size: 1.2em; line-height: 1; }

/* ── Arbeitsblatt ── */
.sheet { background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; padding: 2rem 2.4rem; max-width: 820px; margin: 0 auto 1.5rem; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.sheet-header { border-bottom: 2px solid var(--ink); padding-bottom: 0.7rem; margin-bottom: 1rem; }
.branding-strip { display: flex; align-items: center; justify-content: space-between; padding-bottom: 0.55rem; margin-bottom: 0.55rem; border-bottom: 1px solid var(--rule-light); }
.branding-logo { width: 38px; height: 38px; object-fit: contain; }
.branding-school { text-align: center; flex: 1; padding: 0 0.75rem; }
.branding-school-name { font-family: var(--serif); font-size: 13px; font-weight: 600; }
.branding-school-sub { font-size: 10px; color: var(--ink-mid); }
.branding-by { font-size: 10px; color: var(--ink-light); font-style: italic; }
.sheet-title { font-family: var(--serif); font-weight: 600; font-size: 20px; }
.sheet-subtitle { font-size: 12px; color: var(--ink-mid); font-style: italic; }
.meta-row { display: flex; gap: 2rem; margin-top: 0.7rem; flex-wrap: wrap; }
.meta-field { display: flex; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--ink-mid); }
.meta-field span { border-bottom: 1px solid var(--ink-mid); min-width: 150px; height: 18px; display: inline-block; }
.meta-field span.short { min-width: 60px; }
.instructions { font-size: 12px; color: var(--ink-mid); border-left: 3px solid var(--c); padding: 0.4rem 0.7rem; background: color-mix(in srgb, var(--c) 8%, white); border-radius: 0 3px 3px 0; margin-bottom: 1rem; line-height: 1.55; }

table.kt { width: 100%; border-collapse: collapse; font-size: 13px; }
table.kt th { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-light); text-align: left; padding: 0 8px 4px; }
table.kt td { border-top: 1px solid var(--rule); padding: 0 8px; height: var(--rowh, 12mm); vertical-align: middle; }
table.kt tr:last-child td { border-bottom: 1px solid var(--rule); }
table.kt .c-nr { width: 2.2rem; font-family: var(--mono); color: var(--ink-light); font-size: 11px; }
table.kt .c-q { font-family: var(--mono); font-weight: 600; font-size: 14px; line-height: 1.35; padding-top: 0.5mm; padding-bottom: 0.5mm; }   /* mehrzeilige Aufgaben: Text berührt die Linien nicht */
table.kt .c-a { width: 30%; font-family: var(--mono); font-size: 13px; color: var(--ink-mid); }   /* ohne nowrap: bricht nur um, wenn der Platz nicht reicht */
table.kt .c-q .wort { hyphens: manual; overflow-wrap: anywhere; }
table.kt .c-ck { width: 1.8rem; text-align: center; }
table.kt .c-ck i { display: inline-block; width: 12px; height: 12px; border: 1.2px solid var(--ink-mid); border-radius: 2px; }
table.kt .c-sol { width: 24%; font-family: var(--mono); font-weight: 600; font-size: 13.5px; border-left: 2px dashed var(--ink); padding-left: 12px; background: #fffdf2; }
table.kt th.c-sol { border-left: 2px dashed var(--ink); padding-left: 12px; font-size: 9px; color: var(--ink); background: none; }
.blank { display: inline-block; border-bottom: 1px solid var(--ink-mid); width: 18mm; height: 1em; vertical-align: baseline; margin: 0 2px; }
.blank.wide { width: 28mm; }
.blank.xwide { width: 42mm; }
.opt { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; }
.opt i { display: inline-block; width: 11px; height: 11px; border: 1.2px solid var(--ink-mid); border-radius: 50%; }
.blank.sym { width: 7mm; height: 7mm; border: 1px solid var(--ink-mid); border-radius: 2px; vertical-align: middle; }
/* ein Feld der Spalte „Deine Lösung“: Vortext, Linie und Nachtext bleiben zusammen; reicht die Spalte nicht, wird die Linie kürzer */
.slot { display: inline-flex; align-items: baseline; max-width: 100%; white-space: nowrap; vertical-align: baseline; }
.slot > .blank { flex: 1 1 0; width: auto; min-width: 12mm; }
.slot > .blank.sym { flex: none; width: 7mm; min-width: 0; align-self: center; }
.s-pre { margin-right: 0.5ch; }
.s-post { margin-left: 0.5ch; }
.s-post:has(> sub:only-child) { margin-left: 0; }   /* Dualzahl: ___₂ */
.sheet-foot { display: flex; justify-content: space-between; margin-top: 0.8rem; font-size: 12px; color: var(--ink-mid); }
.sol-sheet .sheet-title::after { content: "Nur für Lehrkräfte"; font-family: var(--sans); font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: #c8a830; color: #fff; padding: 2px 7px; border-radius: 2px; margin-left: 0.7rem; vertical-align: middle; }

.footer-note { text-align: center; font-size: 12px; color: var(--ink-light); margin-top: 2rem; }
/* Urheberrechtshinweis */
footer.lizenz { max-width: 980px; margin: 0 auto; padding: 0.9rem 1.25rem 1.6rem; border-top: 1px solid var(--rule); text-align: center; font-size: 11.5px; line-height: 1.5; color: var(--ink-light); }
footer.lizenz a { color: var(--ink-mid); white-space: nowrap; }
footer.lizenz a.lizenz-still { color: inherit; text-decoration: none; cursor: text; }
.sheet-lizenz { margin-top: 0.5rem; text-align: center; font-size: 9px; color: var(--ink-light); }

/* ── Schmale Bildschirme ── */
@media (max-width: 760px) {
  .topbar { padding: 0.5rem 1rem; flex-wrap: wrap; row-gap: 0.3rem; }
  .topbar .by { display: none; }
  .topbar .brand { flex: 1 1 55%; min-width: 0; }       /* Titel bleibt neben dem Symbol, Knöpfe rücken darunter */
  .wrap { padding: 1.25rem 1rem 2.5rem; }
  .hero h1 { font-size: 27px; }
  .topic-grid { grid-template-columns: 1fr; }
  .levels { grid-template-columns: 1fr; }
  .settings-row { grid-template-columns: 1fr; }
  .row { grid-template-columns: 2rem minmax(0, 1fr) 1.6rem; grid-template-areas: "nr q mark" ". ans ans" ". sol sol"; row-gap: 0.45rem; }
  .row .nr { grid-area: nr; } .row .q { grid-area: q; } .row .ans { grid-area: ans; } .row .sol { grid-area: sol; } .row .mark { grid-area: mark; }
  .row .ans:has(> .graph-in) { grid-column: 1 / -1; }   /* Zeichenfeld über die ganze Zeile */
  .row .graph-in { max-width: none; }
  .topic-head { flex-wrap: wrap; }                      /* langer Titel unter das Symbol statt über den Rand */
  .topic-head h1 { overflow-wrap: anywhere; }
  .sheet { padding: 1.2rem 1rem; overflow-x: auto; }
}

/* ── Druck ── */
@media print {
  @page { size: A4; margin: 10mm 12mm; }
  body { background: white; font-size: 11px; }
  body > *:not(.wrap), .wrap > *:not(#panel-sheet):not(#panel-satz), .tabs { display: none !important; }
  body.druck-satz #panel-sheet { display: none !important; }
  body.druck-satz #panel-satz { display: block !important; }
  .wrap { padding: 0; max-width: none; }
  #panel-sheet { display: block !important; padding: 0; }
  .sheet { box-shadow: none; border: none; border-radius: 0; padding: 0; max-width: none; margin: 0; background: white; break-after: page; }
  .sheet:last-child { break-after: auto; }
  table.kt tr { break-inside: avoid; }
  table.kt .c-sol { background: none; }
  .instructions { background: none; }
  .sheet-title { font-size: 17px; }
}

.nw { white-space: nowrap; }
.hint .hint-steps { margin: 0.2rem 0 0.45rem 1.3rem; }
.hint .hint-steps li { margin: 0.1rem 0; }
.hint .hint-ex { background: var(--white); border: 1px dashed #d8c890; border-radius: 4px; padding: 0.35rem 0.6rem; margin-bottom: 0.35rem; }

/* Tipp- und Lösungsweg-Buttons, Lösungsweg-Box */
.help-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.help-btns .tip-btn { margin-left: 0; }
.step-btn { border-color: #9ab8e0; background: #eef4fc; color: #1a3e6e; }
.step-btn:hover, .step-btn.active { background: #d8e6f8; }
.row .steps-box { border-color: #b8cde8; border-left-color: #4a7ac0; background: #f6f9fe; }
.steps-list { margin: 0.1rem 0 0 1.4rem; }
.steps-list li { margin: 0.18rem 0; font-family: var(--mono); font-size: 13.5px; }
.steps-list li sup { font-size: 0.7em; }
.steps-list .res { background: #ffe27a; padding: 0 5px; border-radius: 3px; }
.steps-list mark.gem { background: #bde3ff; color: inherit; padding: 0 3px; border-radius: 3px; }
.steps-list mark.gem2 { background: #ffd3e2; color: inherit; padding: 0 3px; border-radius: 3px; }   /* zweite Farbe, z. B. Primfaktorzerlegung Schritt für Schritt */
/* Kästchen im Kästchen (Primfaktorzerlegung): das neue Paar groß, die Zahl darin, die als Nächstes zerlegt wird, klein mit Rand */
.steps-list mark.paar { padding: 3px 6px; border-radius: 5px; }
.steps-list li:has(mark.paar), .steps-list li:has(mark.paar) + li { margin: 0.4rem 0; }   /* Kästchen berühren sich nicht */
.steps-list mark.zahl { padding: 0 3px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.row.helped .mark { color: #b07800; font-size: 15px; }
.row.helped .ans input, .row.helped .ans select { border-color: #d8a800; background: #fff8dc; }

/* Stellenwerttafel im Lösungsweg */
.st-tafel { display: inline-table; border-collapse: collapse; margin: 3px 0 3px 4px; vertical-align: middle; font-family: var(--mono); font-size: 12.5px; }
.st-tafel th, .st-tafel td { border: 1px solid var(--rule); padding: 1px 6px; text-align: center; background: var(--white); }
.st-tafel th { font-size: 10.5px; color: var(--ink-mid); font-weight: 600; }
.st-tafel .on { background: #ffe27a; }
.row .q .wort { hyphens: manual; overflow-wrap: anywhere; }

/* Figuren (Skizzen) bei Umfang & Flächeninhalt */
svg.fig { display: block; margin: 6px 0 2px; max-width: 100%; height: auto; overflow: visible; }
.fig-shape { fill: color-mix(in srgb, var(--c) 14%, white); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.fig-hole { fill: var(--white); stroke: var(--ink); stroke-width: 1.6; }
.fig-tile { fill: color-mix(in srgb, var(--c) 32%, white); stroke: var(--ink-mid); stroke-width: 0.6; }
.fig-split { stroke: var(--c); stroke-width: 1.8; stroke-dasharray: 5 4; }
.fig-unk-edge { stroke: var(--c); stroke-width: 3.5; stroke-linecap: round; }
.fig-tick { stroke: var(--ink); stroke-width: 1.4; }
.fig-label { font-family: var(--mono); font-size: 12px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--white, #fff); stroke-width: 3px; stroke-linejoin: round; }
.fig-label.unk { fill: var(--c); font-weight: 700; }
.steps-list svg.fig { margin: 6px 0; }
/* Tipp mit Skizze (z. B. Drehung vom 1. zum 2. Vektor beim Flächeninhalt im KOS) */
.tipp-skizze { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tipp-skizze > div { flex: 1 1 260px; }
.tipp-fig { flex: 0 0 auto; max-width: 100%; height: auto; }
.tipp-fig .sk-flaeche { fill: var(--c); fill-opacity: 0.12; stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.tipp-fig .sk-vek line { stroke: var(--c); stroke-width: 2.4; }
.tipp-fig .sk-vek polygon { fill: var(--c); }
.tipp-fig .sk-dreh path { fill: none; stroke: #1f6fb2; stroke-width: 1.8; stroke-dasharray: 4 3; }
.tipp-fig .sk-dreh polygon { fill: #1f6fb2; }
.tipp-fig text { font-family: var(--sans); font-size: 14px; font-weight: 700; text-anchor: middle; fill: var(--ink); }
.tipp-fig .sk-nr { fill: var(--c); font-size: 15px; }
/* Dreisatz untereinander, Rechenschritte als Bögen links und rechts */
.dreisatz { border-collapse: collapse; margin: 4px 0 2px; font: inherit; }
.dreisatz td { padding: 0 5px; line-height: 1.75; white-space: nowrap; }
.dreisatz .ds-l { text-align: right; }
.dreisatz .ds-r { text-align: left; }
.dreisatz td:first-child, .dreisatz td:last-child { width: 4.6em; }
.dreisatz tr.ds-zw td { height: 0.45em; line-height: 0; padding: 0; position: relative; }
.dreisatz .ds-bogen { position: absolute; top: -0.65em; bottom: -0.65em; width: 9px; color: var(--c); border: 1.5px solid currentColor; }
.dreisatz .ds-li .ds-bogen { right: 0; border-right: none; border-radius: 10px 0 0 10px; }
.dreisatz .ds-re .ds-bogen { left: 0; border-left: none; border-radius: 0 10px 10px 0; }
.dreisatz .ds-bogen::after { content: ""; position: absolute; bottom: -4.5px; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; }
.dreisatz .ds-li .ds-bogen::after { right: -5px; border-left: 6px solid currentColor; }
.dreisatz .ds-re .ds-bogen::after { left: -5px; border-right: 6px solid currentColor; }
.dreisatz .ds-op { position: absolute; top: 50%; transform: translateY(-50%); font-size: 12px; line-height: 1; white-space: nowrap; }
.dreisatz .ds-li .ds-op { right: calc(100% + 4px); }
.dreisatz .ds-re .ds-op { left: calc(100% + 4px); }
.dreisatz .ds-wort { display: none; }
@media print {
  .fig-shape { fill: #e8e8e8; stroke: #000; }
  .fig-hole { fill: #fff; stroke: #000; }
  .fig-tile { fill: #e6e6e6; stroke: #000; }
  .fig-unk-edge { stroke: #000; stroke-width: 3; }
  .fig-label, .fig-label.unk { fill: #000; }
  table.kt svg.fig { margin: 1mm 0; width: auto; max-width: 52mm; max-height: 30mm; }
}

/* Schriftliche Rechnung im Lösungsweg */
.schr { display: inline-table; border-collapse: collapse; vertical-align: top; margin: 2px 0 2px 8px; font-family: var(--mono); font-size: 14px; }
.schr td { width: 1.15em; text-align: center; padding: 0 1px; line-height: 1.35; }
.schr tr.ue td { font-size: 10px; color: var(--c); line-height: 1; }
.schr tr.erg td { border-top: 2px solid var(--ink); font-weight: 700; }
.schr tr.erg td:first-child { border-top: none; }

/* Zahlenstrahl */
svg.strahl-fig { display: block; max-width: 100%; height: auto; }
.row .q .winkel-vordruck, .row .q .winkel-messen { display: none; }
.saeule-eigen { fill: var(--c); opacity: 0.65; }
.begriff-klammer { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-basis: 100%; }
.begriff-brace { width: 100%; height: 14px; display: block; }
.row .ans .begriff-klammer input { width: 15ch; }
.row .ans .begriff-klammer select { max-width: 17ch; }
@media (min-width: 761px) {                                /* Klammer genau über dem Rechenausdruck, Felder darunter */
  .row .ans:has(.begriff-klammer) { display: grid; grid-template-columns: repeat(5, auto); justify-content: start; align-items: end; }
  .begriff-klammer { grid-column: 1 / 4; grid-row: 1; }
  .row .ans:has(.begriff-klammer) > .begriff-feld, .row .ans:has(.begriff-klammer) > .begriff-op { grid-row: 2; }
}
.begriff-feld { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.begriff-zahl { font-weight: 700; font-size: 17px; min-height: 1.4em; }
.begriff-op { font-weight: 700; font-size: 17px; align-self: flex-start; padding: 0 4px; }
.row .ans .begriff-feld input { width: 15ch; }
.row .ans .begriff-feld select { max-width: 17ch; }
.row .q .strahl-liste + .strahl-vordruck { display: none; }
.winkel-bild { display: block; flex-basis: 100%; max-width: 400px; }
.winkel-bild svg { width: 100%; height: auto; margin: 0; }
table.kt svg.fig.winkel-fig, table.kt svg.fig.gitter-fig, table.kt svg.fig.daten-fig, table.kt svg.fig.saeulen-fig { max-width: 100%; max-height: none; }
table.kt svg.fig.kos-angabe { max-width: 65mm; max-height: 65mm; }   /* Parabel zum Ablesen: groß genug für das Gitter */
.row .q .strahl-vordruck { display: none; }                /* am Bildschirm ist der Strahl das Eingabefeld */
.strahl-liste { margin-top: 3px; font-weight: 600; }
.row .graph-in.strahl-in { max-width: 100%; }
.strahl-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.strahl-chip { font-family: var(--mono); font-size: 14px; font-weight: 600; padding: 4px 9px; border: 1.5px solid var(--rule); border-radius: 4px; background: var(--white); color: var(--ink); cursor: pointer; }
.strahl-chip.gesetzt { border-color: var(--c); color: var(--c); }
.strahl-chip.aktiv { background: var(--c); border-color: var(--c); color: var(--white); }
.row.open .strahl-chip { pointer-events: none; }
.slot-paar { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; margin-right: 8px; }
@media (min-width: 761px) {                                /* Aufgabe und Lösung oben, darunter der Strahl bzw. die Felder über die ganze Breite */
  .row:has(.strahl-in), .row:has(.strahl-ablesen) { grid-template-columns: 2.4rem minmax(0, 1fr) minmax(11rem, 15rem) 1.8rem; grid-template-areas: "nr q sol mark" ". ans ans ."; }
  .row:has(.strahl-in) > .nr, .row:has(.strahl-ablesen) > .nr { grid-area: nr; }
  .row:has(.strahl-in) > .q, .row:has(.strahl-ablesen) > .q { grid-area: q; }
  .row:has(.strahl-in) > .sol, .row:has(.strahl-ablesen) > .sol { grid-area: sol; }
  .row:has(.strahl-in) > .ans, .row:has(.strahl-ablesen) > .ans { grid-area: ans; }
  .row:has(.strahl-in) > .mark, .row:has(.strahl-ablesen) > .mark { grid-area: mark; }
  .row .graph-in.strahl-in { max-width: 620px; }
  .row .graph-in.winkel-in { max-width: 400px; }
  .row .graph-in.gitter-in { max-width: 440px; }
  .row .graph-in.saeulen-in { max-width: 520px; }
}
table.kt svg.fig.strahl-fig { max-width: 100%; max-height: none; width: 100%; height: auto; }
table.kt .c-q svg.fig.strahl-fig { max-width: 125mm; }
table.kt svg.fig.strahl-fig.daten-fig { width: auto; }      /* kleine Skizzen und Tabellen in ihrer eigenen Größe */
table.kt .strahl-felder { display: flex; flex-wrap: wrap; gap: 2mm 6mm; font-weight: 400; margin: 1mm 0; }
table.kt .strahl-felder .slot { width: auto !important; flex: 0 0 auto; }
table.kt .strahl-felder .slot .blank { width: 16mm; flex: none; }
.schr.dv td { width: .85em; padding: 0; }                  /* schriftliche Division: breite Rechnung, muss aufs Handy passen */
.schr.dv td.str { border-bottom: 1.5px solid var(--ink); }

/* Umschalter für Rechenwege im Lösungsweg (z. B. Abziehen / Ergänzen) */
.weg-switch { display: inline-flex; gap: 4px; margin-left: 0.7rem; vertical-align: middle; }
.weg-btn { font-family: var(--sans); font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 12px; cursor: pointer;
  border: 1px solid #9ab8e0; background: var(--white); color: #1a3e6e; }
.weg-btn[aria-pressed="true"] { background: #4a7ac0; border-color: #4a7ac0; color: var(--white); font-weight: 700; }
.weg-btn:hover { background: #d8e6f8; }
.weg-btn[aria-pressed="true"]:hover { background: #3d6aaf; }

/* Lehrer-Startseite: Karten der Jahrgangsstufen */
.jg-card { padding: 0; }
.jg-card .jg-link { display: flex; flex-direction: column; text-decoration: none; color: inherit; padding: 1.1rem 1.2rem 0.6rem; flex: 1; }
.jg-card.off { padding: 1.1rem 1.2rem 1rem; opacity: 0.55; }
.jg-card.off:hover { transform: none; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.jg-card .glyph { font-size: 34px; }
.jg-share { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0 1.2rem 1rem; }
.jg-msg { font-size: 12px; color: var(--ok); word-break: break-all; }

/* ── Brüche ── */
.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.05; margin: 0 2px; font-size: 0.92em; }
.frac .fz { border-bottom: 1.5px solid currentColor; padding: 0 3px 1px; }
.frac .fn { padding: 1px 3px 0; }
/* Bruch-Eingabe */
.frac-in { display: inline-flex; align-items: center; gap: 4px; }
.row .ans .frac-in input { width: 4.2ch; padding: 3px 4px; text-align: center; font-size: 15px; }
.frac-in .fi-bruch { display: inline-flex; flex-direction: column; gap: 3px; }
.frac-in .fi-bruch .fi-z { border-bottom-width: 2.5px; border-bottom-color: var(--ink); }
.lm-in { display: inline-flex; align-items: center; gap: 4px; }
.row .ans input.w-lm { width: 9ch; }
.row .ans input.w-lm.w-txt { width: 13ch; }
.lm-leer { font-family: var(--mono); font-size: 15px; padding: 2px 8px; border: 1px solid var(--rule); border-radius: 4px; background: var(--white); cursor: pointer; }
.lm-leer:hover { background: var(--rule-light); }
.lm-leerzeichen { font-family: var(--mono); font-size: 18px; margin: 0 10px 0 2px; }
.lm-leer[aria-pressed="true"] { font-size: 13px; }
/* fast richtig (z. B. noch kürzen) */
.row.partial .mark { color: #b07800; }
.row.teil .mark { color: #e07b00; }
.row .strahl-chip.feld-ok { border-color: var(--ok); background: var(--ok-light); color: var(--ok); }
.row .strahl-chip.feld-bad { border-color: var(--bad); background: var(--bad-light); color: var(--bad); }
.row.open .graph-in .kos-griff.feld-ok :not(text) { fill: var(--ok); stroke: var(--ok); }
.row.open .graph-in .kos-griff.feld-ok text { fill: var(--ok); }
.row.open .graph-in .kos-griff.feld-bad :not(text) { fill: var(--bad); stroke: var(--bad); }
.row.open .graph-in .kos-griff.feld-bad text { fill: var(--bad); }
.row .saeule-eigen.feld-ok { fill: var(--ok-light); stroke: var(--ok); }
.row .saeule-eigen.feld-bad { fill: var(--bad-light); stroke: var(--bad); }
.row input.feld-ok, .row select.feld-ok, .row .feld-ok input, .row .feld-ok select { border-color: var(--ok); background: var(--ok-light); }
.row input.feld-bad, .row select.feld-bad, .row .feld-bad input, .row .feld-bad select { border-color: var(--bad); background: var(--bad-light); }
.row input.feld-fast, .row select.feld-fast, .row .feld-fast input, .row .feld-fast select { border-color: #d8a800; background: #fff8dc; }
.row.partial .ans input, .row.partial .ans select { border-color: #d8a800; background: #fff8dc; }
.ans-msg { flex-basis: 100%; font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: #8a5a00; }
.blank-frac { display: inline-flex; align-items: flex-start; gap: 3px; vertical-align: middle; }
/* leere Bruchfelder auf dem Arbeitsblatt: Zähler über dem Bruchstrich, Nenner auf der Linie darunter; die ganze Zahl steht mittig auf Höhe des Bruchstrichs */
.blank-frac .bf { display: inline-flex; flex-direction: column; }
.blank-frac .bf .blank { width: 11mm; margin: 0; }
.blank-frac .bf .blank:first-child { height: 5.5mm; border-bottom: 1.6px solid var(--ink); }
.blank-frac .bf .blank:last-child { height: 6.5mm; }
.blank-frac .bf-g { width: 8mm; height: 5mm; margin: 3mm 2px 0; }
/* nur freier Platz zum Hinschreiben – ohne vorgedruckte Striche (Wunsch der Lehrkraft, 28.11.2026) */
.blank-frac .blank, .blank-frac .bf .blank:first-child { border-bottom: none; }
/* Gleichungen im Lösungsweg */
.gl-eq { display: inline-block; min-width: 16ch; }
.gl-op { color: var(--c); font-weight: 700; margin-left: 0.8rem; }
/* zusätzliche Elemente in Skizzen */
.fig-right { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.fig-arc { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.fig-baum { stroke: var(--ink); stroke-width: 1.2; }
.fig-arc.unk { stroke: var(--c); stroke-width: 2.4; }
.fig-line { stroke: var(--ink); stroke-width: 1.8; }
.fig-par { stroke: var(--c); stroke-width: 2.4; stroke-linecap: round; }
.fig-mass { fill: none; stroke: var(--ink-mid); stroke-width: 1; }
@media print { .fig-par { stroke: #000; } }
@media print { .fig-arc.unk { stroke: #000; } }

/* Wertetabelle in Aufgaben */
table.wtab { border-collapse: collapse; margin: 6px 0 2px; font-family: var(--mono); font-size: 14px; }
table.wtab th, table.wtab td { border: 1px solid var(--rule); padding: 2px 9px; text-align: center; background: var(--white); }
table.wtab th:first-child { background: var(--rule-light); }
table.kt table.wtab td, table.kt table.wtab th { height: auto; padding: 1px 3px; font-size: 11px; }   /* Wertetabellen mit 8 Spalten passen so in die Aufgabenspalte */
.row .q table.wtab { display: block; max-width: 100%; overflow-x: auto; }   /* beim Üben: zu breite Wertetabelle seitlich verschiebbar statt über das Antwortfeld */
/* Körper (Schrägbild) und Bildreihen */
.fig-side { fill: color-mix(in srgb, var(--c) 30%, white); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.fig-row { display: flex; align-items: center; gap: 2px; }
.fig-op { font-size: 22px; font-weight: 700; }
@media print {
  .fig-side { fill: #cfcfcf; stroke: #000; }
  table.kt .fig-row svg.fig { max-width: 32mm; }
}
/* Periodenstrich: 0,3̄ */
.per { background: linear-gradient(currentColor, currentColor) no-repeat 0 0.2em / 100% 1.5px; padding-top: 0; }
/* Vektoren: Spaltenvektor in runden Klammern, Pfeil über dem Namen, Determinante */
.vek { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.1; margin: 0 2px; padding: 1px 6px;
  border-left: 1.5px solid currentColor; border-right: 1.5px solid currentColor; border-radius: 9px / 50%; font-size: 0.95em; }
.mat { display: inline-grid; grid-template-columns: auto auto; gap: 0 10px; vertical-align: middle; line-height: 1.15; padding: 1px 7px; margin: 0 2px; text-align: center; font-size: 0.95em;
  border-left: 1.5px solid currentColor; border-right: 1.5px solid currentColor; border-radius: 9px / 50%; }
.vpf { display: inline-block; position: relative; padding-top: 0.35em; line-height: 1; }
.vpf::after { content: ""; position: absolute; left: 1px; right: 2px; top: 0.12em; border-top: 1.3px solid currentColor; }
.vpf::before { content: ""; position: absolute; right: -1px; top: calc(0.12em - 3px); border: 3.5px solid transparent; border-left: 6px solid currentColor; border-right: 0; }
.det { display: inline-grid; grid-template-columns: auto auto; gap: 0 10px; vertical-align: middle; line-height: 1.15; padding: 1px 6px; margin: 0 2px;
  border-left: 1.5px solid currentColor; border-right: 1.5px solid currentColor; text-align: center; font-size: 0.95em; }
.vec-in { display: inline-flex; flex-direction: column; gap: 3px; padding: 2px 6px; border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); border-radius: 12px / 50%; }
.row .ans .vec-in input { width: 5ch; padding: 3px 4px; text-align: center; font-size: 15px; }
/* Größe: Zahl + Einheit (Rechnen mit Größen) */
.gr-in { display: inline-flex; align-items: center; gap: 6px; }
.row .ans .gr-in input { width: 9ch; }
.row .ans .gr-in select { min-width: 6.5em; }
.blank.blank-einheit { min-width: 12mm; width: 12mm; }
.sol-auch { color: var(--ink-mid); font-weight: 400; font-size: 0.85em; }
.ln-q .ln-einheit { color: var(--ink-mid); white-space: nowrap; }   /* Zieleinheit in der Aufgabenkarte (Stegreif/Schulaufgabe) */
/* Einheitentafel (Größen umrechnen): Einheiten oben, Ziffern darunter, gesuchte Einheit hervorgehoben, roter Kommapunkt */
table.eh-tafel { border-collapse: collapse; margin: 6px 0 2px; font-family: var(--mono); font-size: 15px; background: var(--white); }
table.eh-tafel th, table.eh-tafel td { border: 1px solid #bbb; text-align: center; min-width: 1.6em; padding: 2px 6px; }
table.eh-tafel th { font-family: var(--sans); font-size: 13px; font-weight: 700; border-bottom: 2px solid var(--ink); }
table.eh-tafel td { height: 1.6em; font-weight: 700; border-left-style: dotted; }
table.eh-tafel td.ende { border-right: 2px solid var(--ink-mid); }
table.eh-tafel .ziel { background: #fff3b8; }
table.eh-tafel td.komma { position: relative; }
table.eh-tafel td.komma::after { content: ""; position: absolute; right: -4px; bottom: 3px; width: 6px; height: 6px; border-radius: 50%; background: #d22; }
.blank-vec { display: inline-flex; flex-direction: column; gap: 4mm; padding: 1mm 2mm; border-left: 1.4px solid #000; border-right: 1.4px solid #000; border-radius: 3mm / 50%; vertical-align: middle; }
.blank-vec .blank { width: 11mm; }
/* Koordinatensystem (Vektoren) */
svg.kos { color: var(--ink); }
.kos-grid { stroke: var(--gitter-farbe, #c8c8c0); stroke-width: var(--gitter-kos, 0.7); }   /* Stärke/Farbe: Einstellung „Karos und Gitterlinien“ */
.kos-achse { stroke: var(--ink); stroke-width: 1.2; }
.kos-pfeil { stroke: var(--c); stroke-width: 2.2; }
.kos-spitze { fill: var(--c); }
.kos-pkt { fill: var(--ink); }
.kos-t { font-family: var(--mono); font-size: 10px; fill: var(--ink-mid); }
.kos-t.b { font-size: 12px; font-weight: 700; fill: var(--ink); }
@media print { .kos-pfeil { stroke: #000; } .kos-spitze { fill: #000; } }
/* Graph zeichnen: Koordinatensystem mit Zahlen, Lösungskurve, ziehbare Griffe */
.kos-z { font-family: var(--mono); font-size: 8.5px; fill: var(--ink-mid); }
.kos-spitze-a { fill: var(--ink); }
.kos-kurve { fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linejoin: round; }
.kos-dreieck { fill: none; stroke: var(--ok); stroke-width: 1.6; stroke-dasharray: 4 3; }
.kos-name { fill: var(--ok); }
.kos-angabe .kos-kurve { stroke: var(--ink); } .kos-angabe .kos-name { fill: var(--ink); }
.kos-eigen { fill: none; stroke: var(--c); stroke-width: 2.2; }
.kos-griff { cursor: grab; touch-action: none; }
.kos-griff circle { fill: var(--white); stroke: var(--c); stroke-width: 2.5; }
.kos-griff circle.kos-treffer { fill: transparent; stroke: none; }
.kos-griff.aktiv circle:not(.kos-treffer) { fill: var(--c); }
.kos-griff text { font-family: var(--mono); font-size: 11px; font-weight: 700; fill: var(--c); paint-order: stroke; stroke: var(--white); stroke-width: 3px; }
.kos-griff-k { font-size: 8px; }
.graph-in { display: inline-flex; flex-direction: column; gap: 2px; width: 100%; max-width: 320px; border-radius: 6px; outline: none; }
.graph-in:focus-visible { box-shadow: 0 0 0 2px var(--c); }
.graph-in svg.kos-graph { width: 100%; height: auto; margin: 0; cursor: crosshair; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }   /* manipulation: zwei schnelle Tipper zoomen nicht */
@media (pointer: coarse) { .kos-griff circle:not(.kos-treffer) { r: 5.5px; stroke-width: 2; } }   /* klein zeichnen, der Fangbereich (FANG_TOUCH in app.js) bleibt groß */
@media (pointer: coarse) and (min-width: 761px) {   /* Tablet: Zeichenfeld unter die Aufgabe statt in die schmale Spalte */
  .row:has(.graph-in) { grid-template-columns: 2.4rem minmax(0, 1.4fr) minmax(11rem, 1fr) 1.8rem; grid-template-areas: "nr q q mark" ". ans sol sol"; }
  .row:has(.graph-in) > .nr { grid-area: nr; } .row:has(.graph-in) > .q { grid-area: q; } .row:has(.graph-in) > .ans { grid-area: ans; }
  .row:has(.graph-in) > .sol { grid-area: sol; } .row:has(.graph-in) > .mark { grid-area: mark; }
  .row .graph-in { max-width: 440px; }
}
.graph-hilfe { font-size: 11px; color: var(--ink-light); font-family: var(--sans, inherit); }
.row:not(.open) .graph-in .kos-soll { display: none; }
.row.open .graph-in .kos-eigen { opacity: 0.85; }
.graph-loes { font-size: 13px; font-weight: 500; }
.zeichen-rahmen { font-size: 12.5px; font-weight: 400; font-style: italic; color: var(--ink-mid); margin-top: 0.2rem; }
.graph-loes b { color: var(--ok); }
svg.kos-graph.kos-blatt { width: 52mm; height: auto; margin: 1mm 0; }
table.kt .c-sol svg.kos-graph { width: 40mm; height: auto; margin: 1mm 0; }
@media print { .kos-kurve, .kos-dreieck { stroke: #000; } .kos-name { fill: #000; } .kos-z { fill: #333; } }
/* Lösungsmenge (Intervall) mit Zeichen-Knöpfen, Term-Eingabe */
.ivl-in { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.row .ans input.w-ivl { width: 13ch; }
.ins-btns { display: inline-flex; gap: 2px; }
.ins-btn { font-family: var(--mono); font-size: 14px; min-width: 24px; padding: 2px 5px; border: 1px solid var(--rule); border-radius: 4px; background: var(--white); cursor: pointer; }
.ins-btn:hover { background: var(--rule-light); }
.ins-btn.ins-mal { font-size: 22px; font-weight: 700; line-height: 1; padding: 2px 9px; }
.mal-in { flex-wrap: nowrap; }
.row .ans input.w-term { width: 12ch; }
.row .ans input.w-breit { width: 20ch; max-width: 100%; }
.jg-card .glyph small { font-size: 0.45em; margin-left: 2px; vertical-align: super; }
.jg-card .glyph .zusatz { font-size: 0.6em; margin-left: 10px; }
/* Skizzen vergrößern */
svg.fig.zoombar { cursor: zoom-in; border-radius: 4px; }
svg.fig.zoombar:hover, svg.fig.zoombar:focus-visible { outline: 2px solid color-mix(in srgb, var(--c) 45%, transparent); outline-offset: 3px; }
.zoom-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(20, 20, 20, 0.72); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: zoom-out; padding: 16px; }
.zoom-box { background: var(--white); border-radius: 10px; padding: 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); max-width: 96vw; max-height: 86vh; display: flex; }
.zoom-box svg.fig { width: min(88vw, 820px); height: auto; max-height: 80vh; margin: 0; overflow: visible; }
.zoom-hint { color: #fff; font-size: 13px; }
@media print { .zoom-overlay { display: none; } }
/* QR-Code für die Klasse (neben den Schwierigkeitsstufen) */
.levels-row { display: flex; gap: 0.8rem; align-items: stretch; }
.levels-row .levels { flex: 1; }
.qr-box { display: flex; gap: 0.6rem; align-items: center; border: 1px dashed var(--rule); border-radius: 6px; padding: 0.5rem 0.7rem; max-width: 300px; }
.qr-bild { width: 92px; height: 92px; flex: none; cursor: zoom-in; border-radius: 4px; }
.qr-bild:hover, .qr-bild:focus-visible { outline: 2px solid color-mix(in srgb, var(--c) 45%, transparent); outline-offset: 2px; }
.qr-bild svg.qr { width: 92px; height: 92px; margin: 0; display: block; }
.qr-text { font-size: 12.5px; line-height: 1.35; color: var(--ink-mid); }
.qr-text strong { display: block; color: var(--ink); font-size: 13px; }
.qr-text strong { margin-bottom: 0.25rem; }
.qr-opt.trenn { margin-top: 0.3rem; padding-top: 0.3rem; border-top: 1px dotted var(--rule); }
.qr-hinweis .btn { margin-left: 0.6rem; }
.qr-opt { display: flex; align-items: center; gap: 5px; font-size: 12.5px; cursor: pointer; }
.qr-opt input { accent-color: var(--c); }
.qr-opt.druck { font-size: 13.5px; align-self: center; margin-left: 0.3rem; }
.zoom-box svg.qr { width: min(78vh, 88vw); }
.qr-hinweis { background: color-mix(in srgb, var(--c) 9%, white); border: 1px solid color-mix(in srgb, var(--c) 35%, white); border-radius: 4px; padding: 0.6rem 0.9rem; margin-bottom: 1rem; font-size: 14px; }
@media (max-width: 760px) { .levels-row { flex-direction: column; } .qr-box { max-width: none; } }
/* QR-Code im Kopf des Arbeitsblatts */
.sheet-header { position: relative; }
.sheet-qr { position: absolute; right: 0; top: 14mm; width: 21mm; text-align: center; font-size: 7pt; line-height: 1.2; color: #444; }
.sheet-qr svg.qr { width: 21mm; height: 21mm; margin: 0 auto 1px; display: block; }
.sheet-header.mit-qr .sheet-title, .sheet-header.mit-qr .sheet-subtitle, .sheet-header.mit-qr .meta-row { padding-right: 25mm; }
@media print { .qr-box, .qr-hinweis { display: none; } }
.back-link[hidden] { display: none; }
/* QR-Code auf der Themenübersicht */
.hero.mit-qr { display: grid; grid-template-columns: 1fr auto; column-gap: 1.5rem; align-items: start; }
.hero.mit-qr > :not(.qr-box) { grid-column: 1; }
.hero.mit-qr .qr-box.start { grid-column: 2; grid-row: 1 / span 3; max-width: 320px; background: var(--white); }
@media (max-width: 760px) { .hero.mit-qr { display: block; } .hero.mit-qr .qr-box.start { margin-top: 0.8rem; } }
/* Themensuche */
.suche-box { margin-bottom: 1.5rem; }
.suche-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-light); margin-bottom: 0.4rem; }
.suche-box input[type="search"] { width: 100%; max-width: 640px; font-size: 16px; padding: 0.6rem 0.8rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--white); }
.suche-box input[type="search"]:focus { outline: 2px solid color-mix(in srgb, var(--c, #2a5a8a) 40%, transparent); border-color: transparent; }
.treffer { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.45rem; max-width: 900px; }
.treffer-anzahl, .treffer-leer { font-size: 13px; color: var(--ink-light); margin: 0.2rem 0; }
.treffer-zeile { display: flex; gap: 0.8rem; align-items: flex-start; background: var(--white); border: 1px solid var(--rule); border-left: 4px solid var(--c); border-radius: 4px; padding: 0.55rem 0.8rem; }
.treffer-stufe { flex: none; min-width: 3.2rem; text-align: center; font-weight: 700; color: var(--c); font-size: 15px; padding-top: 1px; }
.treffer-titel { font-weight: 700; color: var(--ink); text-decoration: none; margin-right: 0.5rem; }
.treffer-titel:hover { text-decoration: underline; }
.treffer-bereich { font-size: 12px; color: var(--ink-light); }
.treffer-arten { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 0.3rem; }
.treffer-art { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--rule-light); color: var(--ink-mid); text-decoration: none; }
.treffer-art:hover { background: color-mix(in srgb, var(--c) 18%, white); color: var(--ink); }
.treffer-art.passt { background: color-mix(in srgb, var(--c) 22%, white); color: var(--ink); font-weight: 600; }
.topic-group[hidden], .topic-card[hidden] { display: none; }
.wurfliste { font-family: var(--mono); font-size: 14px; letter-spacing: 0.08em; line-height: 1.6; margin: 6px 0; max-width: 32ch; word-spacing: 0.25em; }
table.wtab th, table.wtab td { white-space: nowrap; }
.row .q .nw, .c-q .nw { white-space: nowrap; }
.formel { display: inline-block; }
.ergaenzung { color: #c0392b; font-weight: 700; background: #fdecea; border-radius: 3px; padding: 0 3px; }
@media print { .ergaenzung { color: #000; background: none; text-decoration: underline; } }
/* Baumdiagramm */
.baum-ast { stroke: var(--ink-mid); stroke-width: 1.3; }
.baum-t { font-family: var(--mono); font-size: 13px; font-weight: 700; fill: var(--ink); }
/* Lineare Gleichungssysteme */
.lgs-in { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.row .ans .lgs-in input { width: 6ch; }
.lgs-modus { font-weight: 600; }
.lgs-btn { font-size: 12px; padding: 3px 7px; border: 1px solid var(--rule); border-radius: 4px; background: var(--white); cursor: pointer; }
.lgs-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 18%, white); border-color: var(--c); font-weight: 700; }
.lgs-sys { display: inline-flex; flex-direction: column; margin: 4px 0 0 4px; padding-left: 8px; border-left: 2px solid var(--ink-mid); line-height: 1.5; }
.lgs-sys > span { white-space: nowrap; }

/* lange Auswahllisten (z. B. Symmetrie, Umkehrfunktion) nicht über die Antwortspalte hinaus */
.row .ans select { max-width: 100%; }

/* Schrägbilder von Pyramiden (AP-Vorbereitung) */
.pyr-kante { stroke: var(--ink); stroke-width: 1.4; }
.pyr-verdeckt { stroke: var(--ink-mid); stroke-width: 1.1; stroke-dasharray: 4 3; }
.pyr-hl { stroke: var(--c); stroke-width: 2.2; }
@media print { .pyr-hl { stroke: #000; } .pyr-verdeckt { stroke: #000; } }

/* ── Leistungsnachweis (Stegreif-/Schulaufgabe) ── */
.ln-knopf { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.8rem; border-radius: 6px; background: var(--ink); color: var(--white);
  text-decoration: none; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.ln-knopf:hover { background: #333; }
.ln-knopf .ln-zahl { display: inline-block; min-width: 1.5em; padding: 0 0.35em; border-radius: 999px; background: #e8a33c; color: var(--ink); font-family: var(--mono); text-align: center; }
.ln-knopf.leer .ln-zahl { background: var(--rule); }
.ln-hinweis { margin: 0.6rem 0 0.9rem; padding: 0.6rem 0.9rem; border-left: 4px solid #e8a33c; background: #fff7e8; border-radius: 4px; font-size: 14px; }
.row .nr .ln-pick { display: block; margin-bottom: 4px; cursor: pointer; }
.row .nr .ln-pick input { width: 20px; height: 20px; accent-color: var(--c, var(--accent)); cursor: pointer; }
.row.ln-gewaehlt { background: #fff7e8; box-shadow: inset 4px 0 0 #e8a33c; }
.ln-modus { margin: 1rem 0 1.4rem; padding: 1rem 1.2rem; background: var(--white); border: 1px solid var(--rule); border-radius: 8px; }
.ln-modus h2 { font-family: var(--serif); font-size: 18px; margin-bottom: 0.6rem; }
.ln-modus-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.ln-modus-btns button { text-align: left; padding: 0.7rem 0.9rem; border: 1.5px solid var(--rule); border-radius: 8px; background: var(--paper); cursor: pointer; font-weight: 700; font-size: 16px; }
.ln-modus-btns button small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-mid); }
.ln-modus-btns button[aria-checked="true"] { border-color: var(--ink); background: #fff7e8; box-shadow: inset 0 0 0 1px var(--ink); }
.ln-modus-text { margin-top: 0.6rem; font-size: 14px; color: var(--ink-mid); }
.ln-badge { display: block; margin: 0.2rem 1rem 0.6rem; padding: 0.35rem 0.6rem; background: #fff7e8; border-left: 3px solid #e8a33c; font-size: 13px; font-weight: 600; text-decoration: none; }
.ln-badge[hidden] { display: none; }
.ln-liste { list-style: none; margin: 1rem 0; display: grid; gap: 0.7rem; }
.ln-liste[hidden] { display: none; }                       /* sonst bleibt die Liste in der Vorschau stehen */
.ln-eintrag { background: var(--white); border: 1px solid var(--rule); border-radius: 8px; padding: 0.7rem 0.9rem; }
.ln-kopf { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.4rem; font-size: 13px; color: var(--ink-mid); }
.ln-nr { font-family: var(--mono); font-weight: 700; color: var(--ink); background: var(--rule-light); border-radius: 4px; padding: 0 0.45rem; }
button.ln-nr-knopf { border: none; font-size: inherit; cursor: pointer; line-height: inherit; }
button.ln-nr-knopf:hover, button.ln-nr-knopf:focus-visible { background: var(--c, #e8a33c); color: var(--white); outline: none; }
.ln-nr-ein { width: 3.2em; font-family: var(--mono); font-weight: 700; font-size: 13px; text-align: center; padding: 0 2px; border: 1.5px solid var(--ink); border-radius: 4px; }
.ln-eintrag.ln-versetzt { box-shadow: 0 0 0 2px #e8a33c; transition: box-shadow 0.3s; }
.ln-thema { margin-right: auto; }
.ln-punkte { font-family: var(--mono); font-weight: 700; color: var(--ink); }
.ln-q { font-family: var(--mono); font-weight: 600; font-size: 15px; line-height: 1.45; }
.ln-loesung { margin-top: 0.4rem; font-size: 13.5px; color: var(--ok); }
.ln-loesung span { font-weight: 700; }
.ln-bald { font-size: 13.5px; color: var(--ink-mid); margin-top: 0.6rem; }
@media (max-width: 720px) { .ln-modus-btns { grid-template-columns: 1fr; } .ln-knopf { font-size: 12px; padding: 0.35rem 0.55rem; } }
@media print { .ln-knopf, .ln-hinweis, .ln-pick { display: none !important; } }
.ln-form h2, .ln-liste + .actions { margin-top: 0.4rem; }
.ln-felder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; margin: 0.5rem 0 0.8rem; }
.ln-felder label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 13px; font-weight: 600; color: var(--ink-mid); }
.ln-felder .ln-nachhol { flex-direction: row; align-items: center; align-self: end; gap: 0.45rem; padding-bottom: 0.55rem; font-size: 14px; color: var(--ink); cursor: pointer; }
.ln-felder .ln-nachhol input { width: auto; padding: 0; }
.ln-felder input, .ln-felder select { padding: 0.4rem 0.5rem; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--white); font-size: 15px; color: var(--ink); }
.ln-optionen { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 14px; }
.ln-optionen label { display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.ln-gitter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin-top: 0.6rem; font-size: 14px; }
.ln-gitter label { display: inline-flex; align-items: center; gap: 0.35rem; }
.ln-gitter-probe { display: inline-block; width: 60px; height: 24px; vertical-align: middle; --gf: var(--gitter-farbe, #c4c4c4); --gp: var(--gitter-px, 1px);
  background-color: #fff; background-image: linear-gradient(var(--gf) var(--gp), transparent var(--gp)), linear-gradient(90deg, var(--gf) var(--gp), transparent var(--gp));
  background-size: 6px 6px; border-right: var(--gp) solid var(--gf); border-bottom: var(--gp) solid var(--gf); }
.ln-gruppen { display: flex; gap: 0.4rem; align-items: center; margin: 0.4rem 0 0.2rem; }
.ln-gruppen [data-g] { padding: 0.35rem 0.9rem; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--paper); font-weight: 700; cursor: pointer; }
.ln-gruppen [data-g][aria-pressed="true"] { border-color: var(--ink); background: #fff7e8; }
.ln-kopf { flex-wrap: wrap; }
.ln-kopf .btn.small { padding: 0.15rem 0.5rem; }
/* Einstellungen je Aufgabe: eigene Zeile zwischen Kopf und Aufgabentext, Löschen ganz rechts */
.ln-steuer { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.8rem; margin: 0 0 0.55rem; padding: 0.35rem 0 0.5rem; border-bottom: 1px dashed var(--rule); font-size: 13px; }
.ln-steuer .btn.small { padding: 0.15rem 0.5rem; }
.ln-steuer .ln-weg { margin-left: auto; }
/* Eigene Zahlen: Eingabefelder unter der Steuerzeile */
.ln-eigen { margin: -0.2rem 0 0.6rem; padding: 0.5rem 0.65rem; border: 1.5px solid var(--rule); border-radius: 7px; background: var(--paper); font-size: 13px; }
.ln-eigen-felder { display: flex; flex-wrap: wrap; gap: 0.45rem 0.9rem; align-items: center; }
.ln-eigen-felder label { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; color: var(--ink); }
.ln-eigen-felder input { width: 6.5em; padding: 0.15rem 0.3rem; border: 1.5px solid var(--rule); border-radius: 5px; font-family: var(--mono); }
.ln-eigen-pkt input { width: 3.6em; }
.ln-eigen-felder select { padding: 0.15rem 0.3rem; border: 1.5px solid var(--rule); border-radius: 5px; background: var(--white); font-size: 13px; }
.ln-eigen-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-top: 0.5rem; }
.ln-eigen-knoepfe .btn.small { padding: 0.15rem 0.6rem; }
.ln-eigen-meldung { color: var(--ink-mid); }
.ln-eigen-meldung.fehler { color: var(--bad); font-weight: 600; }
.ln-p { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; color: var(--ink); }
.ln-p input { width: 4.2em; padding: 0.15rem 0.3rem; border: 1.5px solid var(--rule); border-radius: 5px; font-family: var(--mono); }
.ln-platz { padding: 0.15rem 0.3rem; border: 1.5px solid var(--rule); border-radius: 5px; background: var(--white); font-size: 13px; }
.ln-status { font-size: 13.5px; color: var(--ink-mid); align-self: center; }
@media (max-width: 720px) { .ln-felder { grid-template-columns: 1fr 1fr; } }
/* Ziehen und Ablegen */
.ln-griff { cursor: grab; font-size: 20px; line-height: 1; color: var(--ink-light); padding: 0 0.2rem; user-select: none; }
.ln-griff:hover { color: var(--ink); }
.ln-griff-muster { font-size: 16px; }
.ln-eintrag.zieht { opacity: 0.45; }
.ln-eintrag.ziel-vor { box-shadow: 0 -4px 0 0 #e8a33c; }
.ln-eintrag.ziel-nach { box-shadow: 0 4px 0 0 #e8a33c; }
.ln-leiste { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.5rem; }
.ln-tabs { margin: 0.3rem 0 0.4rem; }
.ln-tabs-unten { margin: 1rem 0 0.8rem; }
.ln-tabs { align-items: center; }
.ln-tasten { margin-left: 1rem; font-size: 12.5px; color: var(--ink-light); white-space: nowrap; }
.ln-tasten kbd { font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--rule); border-radius: 3px; padding: 0 4px; background: var(--white); }
.ln-tabs .tab[aria-selected="true"] { border-bottom-color: var(--c); color: var(--ink); font-weight: 700; }
.ln-tipp { font-size: 13px; color: var(--ink-mid); margin: 0.3rem 0; }
/* Vorschau der Word-Datei: DIN-A4-Seiten (Ränder wie in der Vorlage: oben/unten 1,5 cm, links/rechts 2 cm) */
.lnv-seiten { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 1rem 0; background: #d8d8d0; border-radius: 6px; overflow-x: auto; }
.lnv-blatt { width: 210mm; height: 297mm; padding: 15mm 20mm; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); overflow: hidden; position: relative;
  font-family: Tahoma, Verdana, sans-serif; font-size: 11pt; line-height: 1.35; color: #000; flex: none; }
.lnv-blatt::after { content: "Seite " attr(data-seite); position: absolute; bottom: 5mm; right: 20mm; font-size: 8pt; color: #999; }
.lnv-kopf { width: 100%; border-collapse: collapse; font-size: 9.5pt; margin-bottom: 6mm; table-layout: fixed; }
.lnv-kopf td { border: 1px dotted #555; padding: 2px 4px; vertical-align: top; }
.lnv-kopf tr:first-child td, .lnv-kopf tr:last-child td { border-top-style: solid; }
.lnv-schule { text-align: center; border-left: 1px solid #000 !important; }
.lnv-schule img { display: block; width: 18mm; margin: 2mm auto; }
.lnv-titel { text-align: center; vertical-align: middle !important; font-size: 10.5pt; height: 13mm; }
.lnv-datum { text-align: center; border-right: 1px solid #000 !important; }
.lnv-name { height: 13mm; } .lnv-punkte { text-align: center; } .lnv-note { border-right: 1px solid #000 !important; } .lnv-unterschrift { font-size: 7.5pt; height: 10mm; }
.lnv-zuschlag { font-size: 8pt; line-height: 1.8; border: 1px solid #000 !important; border-top-style: dotted !important; }
.lnv-aufgabe { margin-top: 3mm; position: relative; }
.lnv-aufgabe.lnv-luft { padding-bottom: 3.5mm; }           /* Platz für die Handschrift (Word: nach 200) */
.lnv-blatt { overflow-x: visible; overflow-y: clip; }       /* die Platz-Auswahl darf seitlich aus dem Blatt ragen */
.lnv-platz-wahl { position: absolute; right: -37.5mm; top: 0; width: 16mm; font-size: 8pt; padding: 0; z-index: 1; }             /* neben dem Blatt, nur in der Vorschau */
.lnv-eigenkopf { border: 1.5px dashed #888; border-radius: 2mm; padding: 9mm 4mm; margin-bottom: 6mm; text-align: center; color: #555; font-size: 10pt; background: #f8f8f4; }
.ln-eigenkopf { font-size: 13.5px; color: var(--ink-mid); margin: -0.3rem 0 0.7rem; }
.lnv-text { display: grid; grid-template-columns: 7.5mm 1fr; }
.lnv-schreib .lnv-text > div { line-height: 2.15; }                /* Zeilen mit Antwortstrichen: Platz zum Hineinschreiben (Word: 1,8-facher Abstand) */
.lnv-nr { font-weight: 700; }
.lnv-text svg.fig { display: block; margin: 2mm 0; }
.lnv-text svg.fig.strahl-fig { max-width: none; }          /* Zahlenstrahl fast über die ganze Zeile (Größe aus data-cm wie in Word) */
.lnv-antwort { margin-top: 2mm; }
.lnv-platz { margin: 2mm 0 3.2mm 7.5mm; }                 /* unten Abstand zur nächsten Aufgabe (Word: nach 240) */
.lnv-platz.karo { --gf: var(--gitter-farbe, #c4c4c4); --gp: var(--gitter-px, 1px);
  background-image: linear-gradient(var(--gf) var(--gp), transparent var(--gp)), linear-gradient(90deg, var(--gf) var(--gp), transparent var(--gp));
  background-size: 5mm 5mm; width: 160mm; border-right: var(--gp) solid var(--gf); border-bottom: var(--gp) solid var(--gf); }
.lnv-p { text-align: right; font-size: 9pt; color: #555; margin-top: 1mm; }
.lnv-platz.lnv-kos { width: 150mm; height: auto !important; }
.ln-kos-wahl { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.8rem; font-size: 13px; color: var(--ink-mid); margin: 0 0 0.4rem; }
.ln-kos-wahl label { display: inline-flex; align-items: center; gap: 0.25rem; font-family: var(--mono); color: var(--ink); }
.ln-kos-wahl input { width: 3.6em; padding: 0.1rem 0.25rem; border: 1.5px solid var(--rule); border-radius: 5px; font-family: var(--mono); }
.ln-kos-info.warn { color: var(--bad); font-weight: 600; }
.lnv-platz.lnv-kos svg { display: block; width: 150mm; height: auto; }
.lnv-lh { font-size: 13pt; margin-bottom: 3mm; }
.lnv-loesung { display: grid; grid-template-columns: 7.5mm 1fr; margin-top: 2mm; }
.lnv-lp { font-size: 9pt; color: #555; }
.lnv-weg { font-size: 9.5pt; } .lnv-weg ol { list-style: none; padding-left: 0; }
@media (max-width: 900px) { .lnv-blatt { zoom: 0.5; } }
.lnv-linien { margin-left: 7.5mm; }
.lnv-linien div { height: 8mm; border-bottom: 1px solid #808080; }
/* Teilaufgaben und Notenschlüssel */
.ln-eintrag.ist-teil { margin-left: 2.2rem; border-left: 3px solid #e8a33c; }
.ln-teil[aria-pressed="true"] { background: #fff7e8; border-color: #e8a33c; font-weight: 700; }
.ln-notenwahl { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; margin-top: 0.6rem; font-size: 13.5px; }
.ln-notenwahl input { width: 4.6em; padding: 0.15rem 0.3rem; border: 1.5px solid var(--rule); border-radius: 5px; font-family: var(--mono); }
.ln-notenwahl[hidden] { display: none; }
.lnv-text { grid-template-columns: 7.5mm auto 1fr; }
.lnv-bst { font-weight: 700; width: 7.5mm; }
.lnv-aufgabe:not(.lnv-teil) .lnv-text > div { grid-column: 2 / 4; }
.lnv-teil { margin-top: 1.5mm; }
.lnv-teil .lnv-platz, .lnv-teil .lnv-linien { margin-left: 15mm; width: 152.5mm; }
.lnv-nh { font-size: 11pt; margin: 6mm 0 2mm; }
.lnv-noten { border-collapse: collapse; font-size: 10pt; }
.lnv-noten th, .lnv-noten td { border: 1px solid #000; padding: 1mm 2.5mm; text-align: center; }
.lnv-fuell { display: inline-block; height: 1em; border-bottom: 1px solid #000; vertical-align: baseline; margin-left: 1.5mm; }
/* Punkte am Ende der ersten Zeile, rechte Kante 8 mm im Seitenrand (wie in Word) */
.lnv-aufgabe .lnv-p { float: right; margin: 0.5mm -8mm 0 2mm; width: 20mm; text-align: right; white-space: nowrap; }
/* Vergleichsaufgaben: Kästchen zum Hineinschreiben von <, > oder = */
.ph-box.ln-vgl { display: inline-block; width: 6.5mm; height: 6.5mm; border: 1.3px solid #000; color: transparent; font-size: 0; vertical-align: middle; margin: 0 1.5mm; }
/* Cloud-Fassung: Gültigkeit der QR-Freigabe */
.qr-dauer select { margin-left: 0.2rem; padding: 0.1rem 0.25rem; border: 1px solid var(--rule); border-radius: 4px; font-size: 12.5px; background: var(--white); }
.qr-bis { display: block; font-size: 11.5px; color: var(--ink-light); margin-top: 0.15rem; }
.qr-bild:empty { min-width: 96px; min-height: 96px; }
.qr-fuer { margin-top: 0.3rem; cursor: default; }
.qr-fuer input { width: 6.5rem; margin-left: 0.2rem; padding: 0.1rem 0.3rem; border: 1px solid var(--rule); border-radius: 4px; font-size: 12.5px; background: var(--white); }
.qr-meine { display: inline-block; margin-top: 0.3rem; font-size: 11.5px; color: var(--accent); font-weight: 600; text-decoration: none; }
.qr-meine:hover { text-decoration: underline; }
/* Rückfrage „Fertig – neue … beginnen“ bzw. nach dem Speichern */
.ln-dialog { margin: auto; border: 1px solid var(--rule); border-radius: 10px; padding: 1.2rem 1.3rem; max-width: 460px; background: var(--white); color: var(--ink); }
.ln-dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
/* Klassensatz: Druckbereich nur beim Drucken; Dialog; Nummer auf jedem Blatt */
#panel-satz { display: none; }
.satz-dialog h3 { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 0.6rem; }
.satz-zeile { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; margin-bottom: 0.8rem; }
.satz-zeile input { width: 5em; padding: 0.3rem 0.4rem; border: 1.5px solid var(--rule); border-radius: 6px; font-family: var(--mono); font-size: 15px; }
.satz-wahl { border: 0; padding: 0; margin: 0 0 0.6rem; display: grid; gap: 0.3rem; font-size: 14px; }
.satz-wahl legend { font-weight: 600; margin-bottom: 0.3rem; }
.satz-status { min-height: 1.2em; font-size: 13px; color: var(--ink-mid); margin-bottom: 0.6rem !important; }
.sheet-nr { float: right; font-family: var(--mono); font-size: 15px; font-weight: 700; border: 1.5px solid var(--ink); border-radius: 4px; padding: 0 6px; margin-left: 0.6rem; }
.ln-dialog p { margin-bottom: 1rem; line-height: 1.45; }
.ln-dialog-knoepfe { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.ln-leer .ln-ok { background: var(--ok-light); color: var(--ok); padding: 0.55rem 0.75rem; border-radius: 6px; margin-bottom: 0.8rem; }
/* Cloud-Fassung: Knopf „Startseite“ in der Kopfzeile (wie „← Alle Themen“) */
.start-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 13px; font-weight: 600; padding: 5px 12px 5px 9px; border: 1.5px solid var(--accent); border-radius: 6px; background: var(--white); color: var(--accent); white-space: nowrap; }
.start-link svg { flex: none; }
.start-link:hover { background: var(--accent-light); }
@media print { .start-link { display: none; } }
/* Cloud-Fassung: Link des QR-Codes kopieren (z. B. für den Schulmanager) */
.qr-spalte { display: flex; flex-direction: column; gap: 6px; flex: none; width: 92px; }
.qr-link-knopf { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; padding: 4px 2px; border: 1.5px solid var(--accent); border-radius: 6px; background: var(--white); color: var(--accent); font-size: 11.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.qr-link-knopf:hover:not(:disabled) { background: var(--accent-light); }
.qr-link-knopf:disabled { opacity: 0.5; cursor: wait; }
.qr-link-knopf.ok { border-color: var(--ok); color: var(--ok); background: var(--ok-light); }
/* ── Gemischter Klapptest (mix.js): Liste der Themen, Kennzeichen über jeder Aufgabe, Zugang auf der Startseite ── */
.mix-editor { flex: 1; min-width: 0; }
.mix-liste { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.mix-eintrag { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem; border: 1px solid var(--rule); border-left: 4px solid var(--c); border-radius: 6px; background: var(--paper); }
.mix-eintrag.zieht { opacity: 0.45; }
.mix-eintrag.ziel-vor { box-shadow: 0 -4px 0 0 #e8a33c; }
.mix-eintrag.ziel-nach { box-shadow: 0 4px 0 0 #e8a33c; }
.mix-stufe { flex: none; min-width: 3.4em; padding: 0.15rem 0.4rem; border-radius: 4px; background: var(--c); color: #fff; font-size: 12px; font-weight: 700; text-align: center; white-space: nowrap; }
.mix-text { flex: 1; min-width: 0; }
.mix-text a { font-weight: 700; color: var(--ink); text-decoration: none; }
.mix-text a:hover { text-decoration: underline; }
.mix-text small { display: block; color: var(--ink-mid); font-size: 12.5px; }
.mix-anzahl { flex: none; font-size: 12.5px; color: var(--ink-mid); white-space: nowrap; }
.mix-anzahl input { width: 3.6em; margin-left: 0.25rem; padding: 0.2rem 0.3rem; border: 1px solid var(--rule); border-radius: 4px; font: inherit; color: var(--ink); }
.mix-weg { flex: none; border: none; background: none; color: var(--ink-light); font-size: 16px; cursor: pointer; padding: 0.1rem 0.3rem; border-radius: 4px; }
.mix-weg:hover { color: var(--bad); background: var(--white); }
.mix-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.6rem; font-size: 13px; color: var(--ink-mid); }
.mix-leer { padding: 0.4rem 0.2rem; font-size: 14px; line-height: 1.5; }
.mix-leer p { margin-bottom: 0.6rem; }
.mix-laden { padding: 2rem 0; color: var(--ink-mid); }
.mix-entfallen, .mix-fehler { margin: 0 0 0.8rem; }
.mix-druck { grid-template-columns: 1fr; }
.mix-thema { display: block; width: fit-content; margin-bottom: 0.2rem; padding: 0 0.35rem; border-left: 3px solid var(--c); color: var(--ink-mid); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; }
.c-q .mix-thema { font-size: 9px; margin-bottom: 0.1rem; }
.mix-hinzu { margin-left: auto; }
.mix-dialog .mix-dialog-info { font-size: 13px; color: var(--ink-mid); }
/* Live-Quiz (nur Cloud-Fassung): Startdialog auf der Themenseite */
.live-dialog .satz-zeile select { padding: 0.3rem 0.4rem; border: 1.5px solid var(--rule); border-radius: 6px; font-size: 14px; }
.live-dialog .live-check { font-weight: 400; align-items: flex-start; font-size: 14px; }
.live-dialog .live-check input { width: auto; margin-top: 0.25rem; }
.live-dialog .satz-zeile input[type="datetime-local"] { width: 14em; max-width: 100%; }   /* Datum und Uhrzeit vollständig sichtbar */
.mix-dialog .satz-status a { font-weight: 600; }
.mix-dialog a.btn { text-decoration: none; }
.mix-start { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.9rem; padding: 0.7rem 0.9rem; border: 1.5px dashed #5a4a8a; border-radius: 8px; background: #f6f3fb; color: var(--ink); text-decoration: none; }
.mix-start[hidden] { display: none; }
.mix-start:hover { background: #eee8f7; }
.mix-start-glyph { font-size: 26px; line-height: 1; }
.mix-start small { display: block; font-size: 13px; color: var(--ink-mid); }
.mix-start-go { margin-left: auto; font-weight: 700; color: #5a4a8a; white-space: nowrap; }
@media (max-width: 720px) { .mix-eintrag { flex-wrap: wrap; } .mix-text { flex-basis: calc(100% - 6rem); } .mix-hinzu { margin-left: 0; } }
@media print { .mix-knopf, .mix-hinzu { display: none !important; } .mix-thema { color: #444; } }
/* ── Grundwissen aus anderen Jahrgangsstufen in Stegreif-/Schulaufgaben (ln.js, Ziel-Jahrgang „ln:ziel“) ── */
.ln-gw { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; padding: 0.7rem 1.1rem; font-size: 14px; }
.ln-gw p { flex: 1 1 24rem; margin: 0; line-height: 1.45; }
.ln-gw-info { font-size: 13px; color: var(--ink-mid); }
.ln-gw-marke { display: inline-block; padding: 0 0.4rem; border-radius: 4px; background: #e8f0e0; color: #2a5a1a; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ln-hinweis-gw { border-left-color: #2a7a4a; background: #eef6ea; }
.ln-hinweis-gw .btn { margin-left: 0.4rem; }

/* Testzugang: Auswahl sichtbar, aber nicht nutzbar */
.test-aus { opacity: 0.55; cursor: not-allowed; }
.test-aus input, .test-aus select { cursor: not-allowed; }

/* Lösungsweg Schritt für Schritt (quadratische Ergänzung): „Lösungsweg“ zeigt alles, Regler/Weiter deckt auf */
.schritt-box .hint-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.schritt-alle { font: inherit; font-weight: 700; color: inherit; background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 2px 12px; cursor: pointer; }
.schritt-alle:hover { background: var(--rule-light); }
.schritt-steuer { display: inline-flex; align-items: center; gap: 6px; }
.schritt-steuer button { font: inherit; font-size: 13px; padding: 2px 10px; border: 1px solid var(--rule); border-radius: 4px; background: var(--white); cursor: pointer; }
.schritt-steuer button:disabled { opacity: .4; cursor: default; }
.schritt-regler { width: 150px; }
.schritt-nr { font-family: var(--mono); font-size: 12px; color: var(--ink-light); min-width: 3.5em; }
.schritt-box [data-s][hidden] { display: none; }

/* Haken: Hinweis „So geht's“ aufs Arbeitsblatt */
.hinweis-an { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.6rem; font-size: 13px; cursor: pointer; }

/* Punkte nur bei der Hauptnummer (Leistungsnachweis) */
.ln-haupt { margin-left: auto; display: inline-flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 13px; color: var(--ink); }
.ln-haupt label { display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.ln-haupt .ln-gesamt-in { width: 4.2rem; padding: 0.2rem 0.35rem; font: inherit; }
.ln-haupt .ln-gesamt-in:disabled, .ln-punkte-in:disabled { background: #eee; color: #888; }
.ln-gesamt-zurueck { border: 1px solid var(--line, #ccc); background: none; border-radius: 4px; cursor: pointer; padding: 0 0.4rem; }
.lnv-aufgabe .lnv-p-leer { visibility: hidden; }

/* Fenster „Notenschlüssel“ (Leistungsnachweis) */
.ln-noten-dialog { max-width: 520px; }
.ln-noten-dialog h3 { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 0.6rem; }
.ln-noten-dialog .ln-halb { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.7rem; cursor: pointer; }
.ln-noten-tab { border-collapse: collapse; width: 100%; margin-bottom: 0.7rem; font-size: 14px; }
.ln-noten-tab th, .ln-noten-tab td { padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--rule); text-align: left; }
.ln-noten-tab th { font-size: 12px; color: var(--ink-mid); font-weight: 600; }
.ln-noten-tab td:nth-child(2) { font-family: var(--mono); white-space: nowrap; }
.ln-noten-tab input { width: 5.5em; padding: 0.15rem 0.3rem; border: 1.5px solid var(--rule); border-radius: 5px; font-family: var(--mono); }
.ln-noten-dialog .ln-noten-info { font-size: 13px; color: var(--ink-mid); }
.ln-noten-warn { color: #b03a2e; }
.ln-noten-fest { font-size: 12.5px; color: #0a7a3a; font-weight: 600; }
.ln-notenwahl input:disabled { background: #eee; color: #888; }
.ln-noten-tab .ln-noten-proz { font-family: var(--mono); color: var(--ink-mid); white-space: nowrap; }
.ln-noten-hin { font-size: 12.5px; color: #8a5a00; }
.ln-noten-link { border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit; text-decoration: underline dotted; }
.ln-noten-link:hover { text-decoration: underline; }
.ln-noten-zeile { font-size: 13px; color: var(--ink-mid); }
.ln-noten-tab .ln-noten-proz input { width: 4.8em; }
.ans-msg.ans-gespickt { color: var(--bad); font-weight: 700; }
.ins-btn.ins-hoch { font-weight: 700; padding: 2px 7px; }
/* Feld mit Einfüge-Knöpfen (·, x², ^): bei wenig Platz wird das Feld schmaler, die Knöpfe bleiben daneben */
.mal-in { max-width: 100%; }
.mal-in > input { flex: 0 1 auto; min-width: 7ch; }
@media (min-width: 761px) {                                /* Felder mit Einfüge-Knöpfen: Lösungsspalte schmaler, „y =“, Feld und Knöpfe in einer Zeile */
  .row:has(.ans .mal-in) { grid-template-columns: 2.4rem minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(8.5rem, 0.75fr) 1.8rem; }
}
.row .ans:has(> .mal-in) { flex-wrap: nowrap; }
.row .ans:has(> .mal-in) > span:not(.mal-in) { white-space: nowrap; flex-shrink: 0; }
/* Potenz eingeben wie geschrieben: Basis normal, Exponent klein oben rechts */
.row .ans input.w-basis { width: 6ch; }
.row .ans input.w-hoch { width: 4ch; font-size: 13px; padding: 2px 4px; align-self: flex-start; margin-left: -3px; margin-top: -0.35em; }
.row .ans:has(input.w-hoch) { align-items: center; gap: 2px; }
.slot:has(> .blank.hoch) { margin-left: -1.5mm; position: relative; top: -0.75em; }
.slot > .blank.hoch { min-width: 6mm; height: 0.8em; }
.row .ans:has(> input.w-hoch) > span:not(.mal-in) { font-size: 18px; font-weight: 600; }
