/* Bereich „Schule“: Gestaltung aus Alexanders Nachhilfe-App, auf .schule beschränkt; Farben und Schrift kommen aus app.css. */
.schule { --font: var(--sans); font-family: var(--sans); }
.schule a { color: var(--accent); text-decoration: none; }
.schule h1 { font-size: 1.6rem; line-height: 1.2; margin: 0.4rem 0 0.8rem; letter-spacing: -0.01em; }
.schule h2 { font-size: 1.15rem; margin: 0 0 0.5rem; }
.schule h3 { font-size: 1rem; margin: 0.8rem 0 0.4rem; }
.schule p { margin: 0.3rem 0; }
.schule .muted { color: var(--muted); }
.schule .small { font-size: 0.85rem; }
.schule .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.schule .warn-text { color: var(--warn); }
.schule .grow { flex: 1; min-width: 0; }
.schule .center { text-align: center; justify-content: center; }
.schule .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 0 0 14px; box-shadow: var(--shadow); }
.schule .card.center { text-align: center; }
.schule .card.action { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.schule .card.action:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.schule .card.highlight { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.schule .card.warn-card { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.schule .card.error-card { border-color: var(--bad); }
.schule .chev { margin-left: auto; font-size: 1.8rem; color: var(--muted); line-height: 1; }
.schule .grid { display: grid; gap: 14px; }
.schule .grid > .card { margin: 0; }
.schule .grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-bottom: 14px; }
.schule .grid.subjects { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-bottom: 14px; }
.schule .grid.tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 14px; }
.schule .grid.chips { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.schule .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.schule .row.small { gap: 6px; margin-top: 6px; }
.schule .row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.schule .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.schule .section-title { margin: 22px 0 10px; }
.schule .hero h1 { font-size: 1.8rem; margin-bottom: 0; }
.schule .hero { margin-bottom: 14px; }
.schule .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent; }
.schule .btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.schule .btn:active { transform: translateY(1px); }
.schule .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.schule .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.schule .btn.ghost { background: transparent; }
.schule .btn.small { min-height: 36px; padding: 0 12px; font-size: 0.85rem; }
.schule .btn.icon { min-width: 40px; min-height: 40px; padding: 0 8px; }
.schule .btn.block { width: 100%; margin-top: 14px; }
.schule .btn.danger { color: var(--bad); }
.schule :focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.schule .pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.schule .pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.schule .pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.schule .tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.schule .code { font-family: ui-monospace, Menlo, monospace; font-size: 0.8rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; }
.schule .stars { color: #d97706; letter-spacing: 1px; }
.schule .bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 8px 0 4px; }
.schule .bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.3s; }
.schule .subject-dot { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px;
  color: #fff; font-weight: 800; font-size: 0.9rem; }
.schule .subject-dot.small { width: 24px; height: 24px; border-radius: 7px; font-size: 0.72rem; }
.schule .subject-dot.blank { background: var(--surface-2); }
.schule .subject-head { display: flex; align-items: center; gap: 10px; }
.schule .subject-head h2, .schule .subject-head h3, .schule .subject-head h1 { margin: 0; }
.schule .card.subject { color: var(--ink); }
.schule .big-num { font-size: 2.4rem; font-weight: 800; color: var(--accent); min-width: 64px; text-align: center; line-height: 1; }
.schule .big-icon { font-size: 2.4rem; }
.schule .list { list-style: none; margin: 0; padding: 0; }
.schule .list.cards li { margin: 0; }
.schule .list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.schule .list li:last-child .list-row, .schule .list > .list-row:last-child { border-bottom: 0; }
.schule .list-row.link:hover { background: var(--surface-2); }
.schule .card.skill { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.schule .skill-title { line-height: 1.35; }
.schule input[type=text], .schule input[type=password], .schule input[type=number], .schule input[type=date], .schule select, .schule textarea { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 11px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1.05rem; }
.schule textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.schule select { width: auto; min-width: 140px; }
.schule input:focus, .schule textarea:focus, .schule select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.schule input.ok, .schule .seg.ok { border-color: var(--ok); background: var(--ok-soft); }
.schule input.typo, .schule .seg.typo { border-color: var(--warn); background: var(--warn-soft); }
.schule input.bad, .schule .seg.bad { border-color: var(--bad); background: var(--bad-soft); }
.schule .form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 8px 0; }
.schule .form-col { display: grid; gap: 8px; margin-top: 8px; }
.schule .check { display: inline-flex; align-items: center; gap: 6px; }
.schule .checks { display: grid; gap: 6px; margin: 8px 0; }
.schule .ef { display: block; margin: 8px 0; }
.schule .ef .label, .schule .field .label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.schule .seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; border: 1.5px solid transparent; }
.schule .seg button, .schule .seg a { min-height: 40px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent;
  color: var(--ink-2); font: inherit; font-weight: 600; font-size: 0.92rem; cursor: pointer; display: inline-flex; align-items: center; }
.schule .seg [aria-checked=true], .schule .seg [aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); outline: 1.5px solid var(--accent); }
.schule .seg.modes { margin: 12px 0 4px; }
.schule .seg.tabs { margin-bottom: 14px; }
.schule .session-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.schule .session-stats { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.schule .stage { max-width: 640px; margin: 0 auto; }
.schule .flash { padding: 22px; }
.schule .flash.new { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.schule .ask { font-size: 1.9rem; font-weight: 700; line-height: 1.25; margin: 6px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; word-break: break-word; }
.schule .instruction { color: var(--ink-2); margin: 10px 0; }
.schule .fields { display: grid; gap: 10px; }
.schule .field input { font-size: 1.2rem; }
.schule .hint { min-height: 1.4em; margin-top: 8px; font-weight: 600; }
.schule .hint.typo { color: var(--warn); }
.schule .accents { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.schule .accents button { min-width: 40px; min-height: 40px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); font: inherit; font-size: 1.05rem; cursor: pointer; }
.schule .solution { margin-top: 14px; padding: 14px; border-radius: 12px; border: 1.5px solid; }
.schule .solution.ok { background: var(--ok-soft); border-color: var(--ok); }
.schule .solution.typo { background: var(--warn-soft); border-color: var(--warn); }
.schule .solution.bad { background: var(--bad-soft); border-color: var(--bad); }
.schule .verdict { font-weight: 800; margin-bottom: 4px; }
.schule .solution.ok .verdict { color: var(--ok); }
.schule .solution.bad .verdict { color: var(--bad); }
.schule .sol-term { font-size: 1.35rem; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.schule .sol-term.large { font-size: 2rem; }
.schule .sol-mean { font-size: 1.1rem; }
.schule .sol-mean.large { font-size: 1.4rem; margin: 8px 0; }
.schule .example { margin-top: 10px; padding-left: 10px; border-left: 3px solid var(--line); }
.schule .note { margin-top: 8px; font-size: 0.92rem; }
.schule .review .list-row.bad .mark { color: var(--bad); }
.schule .review .list-row.ok .mark { color: var(--ok); }
.schule .review .list-row.typo .mark { color: var(--warn); }
.schule .mark { font-weight: 800; width: 1.4em; text-align: center; flex: none; }
.schule .card.task { border-top: 5px solid var(--accent); }
.schule .task-title { font-size: 1.3rem; margin: 2px 0 8px; }
.schule .md { overflow-wrap: anywhere; }
.schule .md p { margin: 0.45rem 0; }
.schule .md ul, .schule .md ol { margin: 0.4rem 0; padding-left: 1.4rem; }
.schule .md table { border-collapse: collapse; margin: 8px 0; }
.schule .md th, .schule .md td { border: 1px solid var(--line); padding: 4px 8px; }
.schule .md code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.schule .prompt { font-size: 1.12rem; }
.schule .katex { font-size: 1.08em; }
.schule .katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.schule .answer { margin-top: 10px; }
.schule .choices { display: grid; gap: 8px; }
.schule .choice { text-align: left; padding: 12px 14px; border-radius: 11px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.schule .choice[aria-checked=true] { border-color: var(--accent); background: var(--accent-soft); }
.schule .choice p { margin: 0; }
.schule .gaps { display: grid; gap: 8px; }
.schule .gap { display: flex; align-items: center; gap: 8px; }
.schule .gap-no { font-weight: 700; color: var(--accent); min-width: 2.2em; }
.schule .steps { padding-left: 1.8rem; margin: 6px 0; display: grid; gap: 6px; }
.schule .steps input { font-family: ui-monospace, Menlo, monospace; }
.schule .photo-box .btn { margin: 6px 0; }
.schule .photo-preview img, .schule .thumb { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); margin-top: 8px; display: block; }
.schule .thumb { max-height: 260px; }
.schule .thumb.wide { max-height: 480px; }
.schule .thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.schule .thumbs img { height: 90px; border-radius: 8px; border: 1px solid var(--line); }
.schule .grading { margin-top: 12px; }
.schule .pad-wrap { margin-top: 6px; }
.schule .pad-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.schule .pad-tools .tool.active { border-color: var(--accent); background: var(--accent-soft); }
.schule .swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.schule .swatch.active { box-shadow: 0 0 0 2px var(--accent); }
.schule .pad-scroll { max-height: 70vh; overflow-y: auto; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; -webkit-overflow-scrolling: touch; }
.schule .pad { display: block; touch-action: none; cursor: crosshair; }
.schule .attempt { border-left: 4px solid var(--line); padding: 4px 0 8px 12px; margin: 12px 0; }
.schule .attempt.ok { border-color: var(--ok); }
.schule .attempt.typo { border-color: var(--warn); }
.schule .attempt.bad { border-color: var(--bad); }
.schule .score { font-weight: 800; }
.schule .graded-steps { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.schule .graded-steps li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.schule .graded-steps li.bad { background: var(--bad-soft); }
.schule .graded-steps li.ok .mark { color: var(--ok); }
.schule .graded-steps li.bad .mark { color: var(--bad); }
.schule .step-comment { flex-basis: 100%; font-size: 0.9rem; color: var(--ink-2); padding-left: 1.8em; }
.schule .feedback { background: var(--accent-soft); padding: 8px 12px; border-radius: 10px; margin-top: 6px; }
.schule .help-item { border-left: 4px solid var(--accent); padding: 4px 0 4px 12px; margin: 10px 0; }
.schule .help-item.l4 { border-color: var(--warn); }
.schule .done-card { border-color: var(--ok); }
.schule .stage-stop { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--line, rgba(127,127,127,0.25)); }
.schule .stage-stop h3 { margin: 0 0 0.25rem; }
.schule details summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.schule .answer-pre { white-space: pre-wrap; background: var(--surface-2); padding: 10px; border-radius: 10px; font: inherit; }
.schule .chip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.schule .chat-title { font-size: 1.2rem; }
.schule .chat-log { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.schule .msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; }
.schule .msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.schule .msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.schule .msg.pending { opacity: 0.7; }
.schule .msg .thumb { max-height: 180px; margin: 0 0 6px; }
.schule .typing { display: flex; gap: 4px; }
.schule .typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.schule .typing span:nth-child(2) { animation-delay: 0.2s; }
.schule .typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.schule .chat-input { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); }
.schule .chat-input textarea { min-height: 56px; }
.schule .chat-photo-prev img { max-height: 90px; border-radius: 8px; }
.schule .subnav { display: flex; gap: 4px; overflow-x: auto; margin: 0 -4px 10px; padding: 0 4px 4px; scrollbar-width: none; }
.schule .subnav a { white-space: nowrap; padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 0.9rem; }
.schule .subnav a.active { background: var(--accent-soft); color: var(--accent); }
.schule .tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.schule .tile-num { font-size: 1.4rem; font-weight: 800; }
.schule .table-wrap { overflow-x: auto; }
.schule table.data { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.schule table.data th, .schule table.data td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.schule table.data th { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.schule table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
.schule tr.bad-row td { background: var(--bad-soft); }
.schule .tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.schule .focus-list { margin: 6px 0 0; padding-left: 1.1rem; font-size: 0.9rem; }
.schule .subject-sum { padding: 6px 0; }
.schule .chart-box { margin: 0; }
.schule .chart-wrap { position: relative; }
.schule .chart { width: 100%; height: auto; display: block; }
.schule .chart .axis { font-size: 11px; fill: var(--muted); }
.schule .chart .baseline { stroke: var(--line); stroke-width: 1; }
.schule .chart-tip { position: absolute; top: -6px; transform: translate(-50%, -100%); pointer-events: none; opacity: 0;
  background: var(--ink); color: var(--bg); font-size: 0.8rem; padding: 4px 8px; border-radius: 6px; white-space: nowrap; transition: opacity 0.1s; }
.schule .chart-tip.show { opacity: 1; }
.schule .item-editor { display: grid; gap: 10px; margin-bottom: 14px; }
.schule .item-card { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.schule .item-no { font-weight: 800; color: var(--muted); min-width: 1.6em; padding-top: 28px; }
.schule .item-fields { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 10px; min-width: 0; }
.schule .item-fields .ef { margin: 4px 0; }
.schule .item-fields .ef.wide { grid-column: span 2; }
@media (max-width: 520px) {
  .schule .item-fields .ef.wide { grid-column: 1 / -1; }
}
.schule .item-fields input, .schule .item-fields select { min-height: 42px; font-size: 1rem; }
.schule .sticky-actions { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); z-index: 5;
  display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line); box-shadow: 0 4px 18px rgb(0 0 0 / 0.08); }
.schule .skill-admin { flex-wrap: wrap; }
.schule .skill-admin.inactive { opacity: 0.55; }
.schule .level { display: flex; align-items: center; gap: 6px; }
.schule .level input { width: 110px; }
.schule .timeline .time { min-width: 92px; }
@keyframes spin { to { transform: rotate(360deg); } }
.schule .empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.schule .empty h3 { color: var(--ink); }
.schule .modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / 0.4); display: grid; place-items: center; padding: 16px; }
.schule .modal { background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; padding: 16px; }
.schule .modal-head { display: flex; justify-content: space-between; align-items: center; }
@media (max-width: 520px) {
  .schule h1 { font-size: 1.4rem; }
  .schule .ask { font-size: 1.55rem; }
  .schule .card { padding: 14px; }
  .schule .flash { padding: 16px; }
  .schule .big-num { font-size: 2rem; min-width: 52px; }
}
@media print {
  .schule .btn { display: none !important; }
}
.schule .mic-wrap { display: inline-flex; gap: 4px; align-items: center; }
.schule .btn.mic.recording { color: #fff; background: #dc2626; border-color: #dc2626; animation: mic-pulse 1.2s ease-in-out infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 6px rgb(220 38 38 / 0.25); } }
@media (prefers-reduced-motion: reduce) {
  .schule .btn.mic.recording { animation: none; }
}
.schule .pill.info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.schule .pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.schule .pill.state { white-space: nowrap; }
.schule .exam-pill { margin-left: 8px; }
.schule .row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.schule .row-wrap > input, .schule .row-wrap > select { flex: 1 1 140px; min-width: 0; }
.schule .card.plan { border-top: 5px solid var(--accent); }
.schule .plan-list { list-style: none; margin: 12px 0 6px; padding: 0; display: grid; gap: 4px; }
.schule .plan-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.schule .plan-item:last-child { border-bottom: 0; }
.schule .plan-item .mark { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line); color: var(--muted); font-weight: 800; }
.schule .plan-item.done .mark { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.schule .plan-item.done strong { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.schule .plan-item.optional { opacity: 0.85; }
.schule .plan-item.optional .mark { border-style: dashed; }
.schule .card.intro-example { background: var(--surface-2); border-left: 4px solid var(--accent); }
.schule .card.intro-example h2 { font-size: 1rem; }
.schule .confidence-q { margin: 10px 0 4px; }
.schule .confidence-note { background: var(--warn-soft); color: var(--ink); border-radius: 10px; padding: 8px 12px; }
.schule .card.skill.inactive { opacity: 0.6; }
.schule .exam-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.schule .exam-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.schule .exam-row:last-child { border-bottom: 0; }
.schule .exam-row p { margin: 6px 0 0 26px; }
.schule .exam-head { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.schule .exam-head .grow { min-width: 180px; }
.schule .light { width: 16px; height: 16px; flex: none; border-radius: 50%; margin-top: 3px; background: var(--line); }
.schule .light.gruen { background: var(--ok); }
.schule .light.gelb { background: var(--warn); }
.schule .light.rot { background: var(--bad); }
.schule .exam-detail .table-wrap { margin-top: 10px; }
.schule .card.exam-card.unconfirmed { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.schule .card.exam-card details { margin-top: 12px; }
.schule .skill-grid { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; margin: 0; }
.schule .skill-grid legend { padding: 0 4px; }
.schule .skill-choice { align-items: flex-start; }
.schule .linklike { background: none; border: 0; padding: 4px 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }
.schule .linklike.small { font-size: 0.85rem; }
.schule .grading-item .solution { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.schule .grading-item .verdicts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.schule .grading-item.done { opacity: 0.6; }
.schule .answer-text { white-space: pre-wrap; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; font: inherit; }
.schule .lesson-head { border-top: 4px solid var(--accent); }
.schule .lesson-goal { font-weight: 600; }
.schule .lesson-steps { display: flex; gap: 6px; margin-top: 8px; }
.schule .lesson-steps span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.schule .lesson-steps span.done { background: var(--ok); }
.schule .lesson-steps span.now { background: var(--accent); }
.schule .lesson-section.current { border-color: var(--accent); }
.schule .lesson-example { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.schule .lesson-check { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; }
.schule .lesson-check input[type=text] { width: 100%; margin-bottom: 8px; }
.schule .lesson-mistakes .mistake { padding: 8px 0; border-bottom: 1px solid var(--line); }
.schule .lesson-mistakes .mistake:last-child { border-bottom: 0; }
.schule .lesson-mistakes .wrong, .schule .lesson-mistakes .right { display: flex; gap: 8px; align-items: baseline; }
.schule .lesson-mistakes .wrong .mark { color: var(--bad); font-weight: 800; }
.schule .lesson-mistakes .right .mark { color: var(--ok); font-weight: 800; }
.schule .lesson-summary { background: var(--accent-soft); border-color: transparent; }
.schule .pretest { border-color: var(--accent); }
.schule .ok-text { color: var(--ok); font-weight: 600; }
.schule .skill-item { display: grid; gap: 2px; }
.schule .skill-links { display: flex; gap: 16px; padding: 0 16px 6px; font-size: 0.85rem; }
.schule .detective-note { background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; }
.schule .explain-card textarea { width: 100%; }
.schule .explain-card blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--line); color: var(--ink-2); white-space: pre-wrap; }
.schule .explain-feedback { border-left: 4px solid var(--line); padding: 4px 0 4px 12px; }
.schule .explain-feedback.stark { border-color: var(--ok); }
.schule .explain-feedback.teilweise { border-color: var(--warn); }
.schule .explain-feedback.unklar { border-color: var(--bad); }
.schule .sim-timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1rem; }
.schule .sim-timer.soon { background: var(--warn-soft); color: var(--warn); }
.schule .sim-timer.over { background: var(--bad-soft); color: var(--bad); }
.schule .sim-task { padding: 6px 0 14px; border-bottom: 1px solid var(--line); }
.schule .sim-task:last-of-type { border-bottom: 0; }
.schule .sim-graded { border-left: 5px solid var(--line); }
.schule .sim-graded.ok { border-left-color: var(--ok); }
.schule .sim-graded.typo { border-left-color: var(--warn); }
.schule .sim-graded.bad { border-left-color: var(--bad); }
.schule .sim-result .grade-badge { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; color: #fff; background: var(--muted); }
.schule .grade-badge.g1, .schule .grade-badge.g2 { background: var(--ok); }
.schule .grade-badge.g3 { background: var(--warn); }
.schule .grade-badge.g4, .schule .grade-badge.g5 { background: var(--bad); }
.schule .thumbs figure { margin: 0; display: grid; gap: 4px; justify-items: center; }
.schule .calib-row { display: grid; grid-template-columns: 90px 1fr 140px; gap: 10px; align-items: center; margin: 6px 0; font-size: 0.9rem; }
.schule .calib-bar { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.schule .calib-bar span { display: block; height: 100%; }
.schule .calib-bar span.ok { background: var(--ok); }
.schule .calib-bar span.warn { background: var(--warn); }
.schule .calib-val { color: var(--muted); text-align: right; }
.schule .calib-verdict { padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.schule .calib-verdict.zu-sicher { background: var(--warn-soft); }
.schule .calib-verdict.passt, .schule .calib-verdict.zu-vorsichtig { background: var(--ok-soft); }
.schule .if-then .plan-text { font-size: 1.05rem; }
.schule .if-then-line { background: var(--accent-soft); border-radius: 10px; padding: 6px 10px; }
.schule .chip.small { font-size: 0.8rem; padding: 4px 10px; }
.schule .msg.assistant.max { background: var(--warn-soft); border-color: transparent; }
.schule .max-feedback { border-color: var(--ok); }
.schule .light.inline { display: inline-block; width: 10px; height: 10px; margin: 0 2px; vertical-align: middle; }
.schule .past-exam select, .schule .past-exam input { font-size: 0.85rem; }
@media (max-width: 520px) {
  .schule .calib-row { grid-template-columns: 70px 1fr; }
  .schule .calib-val { grid-column: 1 / -1; text-align: left; }
}
@media print {
  .schule .row, .schule .row-wrap, .schule .skill-links, .schule .lesson-steps, .schule .chat-input, .schule .sim-timer, .schule .muted.small { display: none !important; }
  .schule .card { box-shadow: none; border: 0; padding: 0; margin: 0 0 14px; }
}
.schule .grade-key { white-space: nowrap; }
.schule .grade-key input { width: 5.5rem; }

/* Außerhalb von .schule: Meldungen und Dialoge hängen direkt am body */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: all 0.2s;
  max-width: min(92vw, 520px); padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg);
  font-weight: 600; box-shadow: 0 6px 20px rgb(0 0 0 / 0.2);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--bad); color: #fff; }
#toast.ok { background: var(--ok); color: #fff; }
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / 0.4); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; padding: 16px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.schule .loading { display: grid; place-items: center; gap: 10px; padding: 48px 16px; color: var(--muted); text-align: center; }
