/* Vereinsportal – ergänzt /assets/css/style.css der Webseite (Farben, Schriften, Buttons, Formulare) */

.portal { display: flex; flex-direction: column; min-height: 100vh; font-size: 1rem; }
.portal h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 0; }
.portal h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); letter-spacing: .03em; margin: 0 0 .7em; }
.portal h3 { font-size: 1.2rem; }
.portal code { font-size: .9em; background: var(--paper-2); padding: 1px 6px; border-radius: 3px; }
.code-block { display: block; overflow-x: auto; padding: 10px 14px !important; word-break: break-all; }

/* ---------- Kopf ---------- */
.portal-header { background: var(--white); border-bottom: 1px solid var(--line); }
.portal-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 12px; }
.portal-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.portal-brand img { height: 46px; width: auto; }
.portal-brand span {
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); border-left: 2px solid var(--line); padding-left: 14px; white-space: nowrap;
}
.portal-user { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; font-size: .95rem; }
.portal-user-name { display: flex; flex-direction: column; line-height: 1.25; font-weight: 600; }
.portal-user-name small { font-weight: 400; color: var(--ink-soft); }
.portal-user a { color: var(--ink); }

.portal-nav { background: var(--ink); }
.portal-nav .wrap { display: flex; align-items: center; gap: 12px; }
.portal-nav ul { display: flex; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: thin; }
.portal-nav a {
  display: block; padding: 12px 14px; color: #ddd8cf; text-decoration: none; white-space: nowrap;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; letter-spacing: .05em; text-transform: uppercase;
  border-bottom: 3px solid transparent;
}
.portal-nav a:hover { color: #fff; }
.portal-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--red); }
.portal-nav-admin { background: var(--ink-2); }
.portal-nav-admin a { font-size: .95rem; padding: 9px 12px; }
.portal-nav-label {
  font-family: var(--font-head); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: #fff; background: var(--red); padding: 2px 8px; border-radius: 2px; flex: none;
}
.portal-guest .portal-nav { display: none; }

/* ---------- Inhalt ---------- */
.portal-main { flex: 1; padding-block: clamp(24px, 4vw, 40px) clamp(40px, 6vw, 72px); }
.portal-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.portal-head-sub { margin-bottom: 16px; padding-bottom: 8px; }
.portal-head-sub h2 { margin: 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.eyebrow {
  margin: 0 0 4px; color: var(--red); font-family: var(--font-head); font-weight: 600;
  font-size: .95rem; letter-spacing: .14em; text-transform: uppercase;
}
.section-block { margin-block: 32px; }
.panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 28px); margin-bottom: 24px; }
.panel > :last-child { margin-bottom: 0; }
.panel-danger { border-top: 3px solid var(--red); }
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.grid-2 > .panel { margin-bottom: 0; }
.grid-2 + * { margin-top: 24px; }
.empty { color: var(--ink-soft); font-style: italic; }
.prose-small { max-width: 70ch; }
.nowrap { white-space: nowrap; }

/* ---------- Kacheln ---------- */
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); margin-bottom: 24px; }
.tile {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; background: var(--white); color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow); border-top: 3px solid var(--ink); text-decoration: none;
  transition: transform .15s;
}
.tile:hover { transform: translateY(-2px); color: var(--ink); }
.tile-todo { border-top-color: var(--red); }
.tile-num { font-family: var(--font-head); font-weight: 700; font-size: 2.6rem; line-height: 1; }
.tile-todo .tile-num { color: var(--red); }
.tile-label { color: var(--ink-soft); font-size: .95rem; line-height: 1.35; }

.plain-list { list-style: none; margin: 0 0 16px; padding: 0; }
.plain-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--paper-2); }
.plain-list li:last-child { border-bottom: 0; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 24px; }
.table-flat { box-shadow: none; border: 1px solid var(--paper-2); margin-bottom: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.table th {
  text-align: left; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  font-size: .9rem; color: var(--ink-soft); border-bottom: 2px solid var(--line); padding: 10px 12px; white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--paper-2); vertical-align: top; }
.table tbody tr:hover td { background: #fbfaf7; }
.table tfoot th, .table tfoot td { border-top: 2px solid var(--line); border-bottom: 0; color: var(--ink); }
.table .num { text-align: right; white-space: nowrap; }
.table td a { font-weight: 600; }
.table-compact td, .table-compact th { padding: 6px 10px; }
tr.muted td { color: var(--ink-soft); }
.select-sm { font: inherit; font-size: .92rem; padding: 4px 8px; border: 1px solid #bdb5a8; border-radius: var(--radius); background: var(--white); }

/* ---------- Status ---------- */
.badge {
  display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .84rem; font-weight: 600;
  background: var(--paper-2); color: var(--ink-2); white-space: nowrap; line-height: 1.6;
}
.badge-offen, .badge-eingereicht, .badge-angemeldet, .badge-eingeladen { background: #fff1c9; color: #6d4c00; }
.badge-in_bearbeitung { background: #e1e8f7; color: var(--blue); }
.badge-versendet { background: #dcf0f0; color: #0f5454; }
.badge-abgeschlossen, .badge-bestaetigt, .badge-bestanden, .badge-aktiv { background: #e0f1e4; color: #1b6331; }
.badge-storniert, .badge-abgelehnt, .badge-nicht_bestanden, .badge-inaktiv, .badge-none { background: #fbe4e7; color: var(--red-dark); }

/* ---------- Meldungen ---------- */
.flash { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; border-left: 4px solid var(--ink-soft); background: var(--white); box-shadow: var(--shadow); }
.flash ul { margin: 6px 0 0; padding-left: 1.2em; }
.flash p { margin: 0 0 8px; }
.flash-success { border-left-color: #2e7d43; background: #f0f8f1; }
.flash-error { border-left-color: var(--red); background: #fdf0f2; }
.flash-info { border-left-color: var(--blue); background: #f1f4fa; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font: inherit; font-size: .9rem; padding: 8px 10px; border: 1px solid #bdb5a8; border-radius: var(--radius); background: var(--white); }

/* ---------- Buttons ---------- */
.btn-sm { font-size: .98rem; padding: .42em 1em; }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--red); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linklike:hover { color: var(--red-dark); }
.inline { display: inline; }

/* ---------- Formulare ---------- */
.portal .form { gap: 16px 20px; }
.portal .form input, .portal .form select, .portal .form textarea { padding: 10px 12px; }
.portal .form textarea { min-height: 0; }
.portal .form input[type="file"] { padding: 8px; background: var(--paper); }
.form-1 { grid-template-columns: 1fr; }
.form-split { display: grid; grid-template-columns: 7rem 1fr; gap: 16px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.req { color: var(--red); }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.check { display: inline-flex; gap: 8px; align-items: baseline; font-weight: 400; cursor: pointer; }
.check input { width: auto; }

.filters { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; margin-bottom: 18px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.filters label.check { flex-direction: row; align-items: center; font-weight: 400; padding-bottom: 8px; }
.filters input[type="search"], .filters select { font: inherit; padding: 7px 12px; border: 1px solid #bdb5a8; border-radius: var(--radius); background: var(--white); min-width: 14rem; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tabs a { padding: 5px 14px; border-radius: 999px; background: var(--white); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .93rem; box-shadow: var(--shadow); }
.tabs a[aria-current="page"] { background: var(--ink); color: #fff; }

.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 18px; }
.dl dt { font-weight: 600; color: var(--ink-soft); }
.dl dd { margin: 0; }
.dl-wide { grid-template-columns: minmax(8rem, max-content) 1fr; }

.checklist { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 4px; font-size: .95rem; }
.checklist .ok { color: #1b6331; }
.checklist .fail { color: var(--red-dark); font-weight: 600; }

/* ---------- Anmeldung ---------- */
.auth-card { max-width: 480px; margin: clamp(8px, 4vw, 48px) auto; }
.auth-card-wide { max-width: 760px; }
.auth-card h1 { margin-bottom: 12px; }

/* ---------- Veranstaltungen ---------- */
.event-list { display: grid; gap: 16px; }
.event-card { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; margin: 0; }
.event-card h2 { margin: 0 0 4px; font-size: 1.35rem; text-transform: none; }
.event-card h2 a { color: var(--ink); text-decoration: none; }
.event-card h2 a:hover { color: var(--red); }
.event-card p { margin: 0 0 6px; }
.event-date { text-align: center; min-width: 76px; padding: 10px 8px; background: var(--ink); color: #fff; border-radius: var(--radius); line-height: 1; }
.event-day { display: block; font-family: var(--font-head); font-weight: 700; font-size: 2.2rem; }
.event-month { display: block; font-size: .85rem; margin-top: 4px; color: #ccc; }
@media (max-width: 640px) {
  .event-card { grid-template-columns: auto 1fr; }
  .event-action { grid-column: 1 / -1; }
}

/* ---------- Bestellformular ---------- */
.order-lines select, .order-lines input { width: 100%; font: inherit; font-size: .95rem; padding: 8px 10px; border: 1px solid #bdb5a8; border-radius: var(--radius); background: var(--white); }
.order-lines .qty { width: 5.5rem; }
.order-lines td { vertical-align: middle; }
@media (max-width: 760px) {
  .order-lines thead { display: none; }
  .order-lines tr.order-line { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
  .order-lines tr.order-line td { border: 0; padding: 0; }
  .order-lines tr.order-line td:first-child { grid-column: 1 / -1; }
  .order-lines tr.order-line td[data-label]::before { content: attr(data-label); display: block; font-size: .8rem; color: var(--ink-soft); }
}

/* ---------- Fuß ---------- */
.portal-footer { background: #0e0e0e; color: #a9a39a; font-size: .9rem; padding-block: 20px; }
.portal-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.portal-footer p { margin: 0; }
.portal-footer a { color: #f0ede8; text-decoration: none; }
.portal-footer a:hover { color: #ff7a8a; }

@media (max-width: 600px) {
  .portal-brand img { height: 36px; }
  .portal-brand span { font-size: 1rem; padding-left: 10px; }
  .portal-user { width: 100%; justify-content: space-between; }
  .filters input[type="search"], .filters select { min-width: 0; width: 100%; }
  .filters label { flex: 1 1 100%; }
}

@media print {
  .portal-header, .portal-footer, .page-actions, .filters, .tabs, form button, .no-print { display: none !important; }
  .club-block { break-inside: avoid; }
  body { background: #fff; }
  .panel, .table-wrap { box-shadow: none; }
}

/* ---------- Jahressichtmarken ---------- */
.stamp { display: inline-block; font-size: .82rem; font-weight: 600; padding: 0 7px; border-radius: 3px; margin-right: 4px; white-space: nowrap; line-height: 1.7; }
.stamp-ok { background: #e0f1e4; color: #1b6331; }
.stamp-missing { background: #fbe4e7; color: var(--red-dark); }
.stamp-na { background: var(--paper); color: #b3ada4; }
.stamp-summary { margin: -4px 0 16px; }
.stamp-col { text-align: center; width: 1%; white-space: nowrap; }
.stamp-col input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--red); cursor: pointer; }
.stamp-col .check { justify-content: center; font-weight: 600; }
/* Mitgliedermeldung: Bestell-Häkchen in der Tabelle innerhalb eines Formulars */
.portal .form .stamp-col input[type="checkbox"] { padding: 0; margin: 0; }
.form .stamp-col .check { display: inline-flex; align-items: center; margin: 0; }
.check-tools { margin: 0 0 12px; gap: 10px 12px; }
.report-actions { margin: 4px 0 18px; }
.stamp-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.stamp-box, .form .stamp-box {
  display: inline-flex; margin: 0; align-items: center; gap: 6px; padding: 6px 12px; cursor: pointer; font-weight: 600;
  background: var(--white); border: 1px solid #bdb5a8; border-radius: var(--radius);
}
.portal .stamp-box input { width: 18px; height: 18px; padding: 0; margin: 0; flex: none; accent-color: var(--red); }
.stamp-box:has(input:checked) { background: #e0f1e4; border-color: #2e7d43; color: #1b6331; }
.portal .form input.readonly { background: var(--paper); color: var(--ink-soft); }
.members-table td { white-space: nowrap; }

/* ---------- Artikel: Größen & Preise ---------- */
.size-table { border-collapse: collapse; margin-bottom: 10px; width: 100%; max-width: 520px; }
.size-table th { text-align: left; font-weight: 600; font-size: .9rem; color: var(--ink-soft); padding: 0 8px 6px 0; }
.size-table td { padding: 0 8px 8px 0; }
.size-chip { display: inline-block; padding: 1px 8px; margin: 2px 4px 2px 0; border-radius: 3px; background: var(--paper-2); font-size: .88rem; white-space: nowrap; }
.size-chip-own { background: #e1e8f7; color: var(--blue); font-weight: 600; }
.sizes-cell { max-width: 28rem; }
.more { border-top: 1px solid var(--paper-2); padding-top: 12px; }
.more summary { cursor: pointer; font-weight: 600; margin-bottom: 12px; }
.more > .form { margin-top: 4px; }

/* ---------- Bestellungen: Bearbeitungsstand ---------- */
.steps { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.step { display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: .84rem; font-weight: 600; white-space: nowrap; line-height: 1.7; }
.step small { font-weight: 400; font-size: .8rem; }
.step-done { background: #e0f1e4; color: #1b6331; }
.step-open { background: var(--paper); color: #9d968c; }
.step-rows { display: grid; gap: 10px; }
.step-row { display: grid; grid-template-columns: 9.5rem 1.6rem minmax(0, 12rem); justify-content: start; align-items: center; gap: 10px; }
.portal .form .step-row input[type="date"] { padding: 7px 10px; }
.step-am { color: var(--ink-soft); font-size: .92rem; }
.step-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.step-list li { display: flex; align-items: center; gap: 10px; }
.step-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none;
  border: 2px solid var(--line); color: #fff; }
.step-list .done .step-icon { background: #2e7d43; border-color: #2e7d43; }
.badge-ausgeliefert { background: #dcf0f0; color: #0f5454; }

/* ---------- Sammelbestellungen ---------- */
.club-block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 4px; }
.club-block-head h3 { margin: 0; }
.club-delivery { font-size: .95rem; margin-bottom: 10px; }
.summary-cell { white-space: normal; max-width: 26rem; font-size: .93rem; }

/* ---------- Anmeldung per Checkliste ---------- */
.reg-table tr.is-on td { background: #f3faf4; }
.reg-table .opt-cell { white-space: nowrap; }
.reg-table .opt-cell .check { margin-right: 10px; font-size: .92rem; }
.input-sm { font: inherit; font-size: .92rem; padding: 4px 8px; border: 1px solid #bdb5a8; border-radius: var(--radius); background: var(--white); width: 12rem; }
.input-sm:disabled, .select-sm:disabled { background: var(--paper); color: var(--ink-soft); }
.deadline-open { border-left: 4px solid #2e7d43; padding-left: 12px; }
.deadline-closed { border-left: 4px solid var(--red); padding-left: 12px; }
.panel-todo { border-top: 3px solid var(--red); }
.pdf-current { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 0 0 8px; }
.portal .form input[type="file"] { width: 100%; }

/* ---------- Sortierbare Tabellen & Karte ---------- */
.sort-btn { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit; color: inherit;
  text-transform: inherit; letter-spacing: inherit; white-space: nowrap; }
.sort-btn::after { content: " ↕"; color: #bdb5a8; }
th[aria-sort="ascending"] .sort-btn::after { content: " ▲"; color: var(--red); }
th[aria-sort="descending"] .sort-btn::after { content: " ▼"; color: var(--red); }
.sort-btn:hover, th[aria-sort="ascending"] .sort-btn, th[aria-sort="descending"] .sort-btn { color: var(--ink); }
.maps-link { white-space: nowrap; font-size: .93rem; }

/* ---------- Sofort speichern ---------- */
.autosave-hint { display: none; }
.is-autosave .autosave-hint { display: block; }
.is-autosave .reg-submit { display: none; }
.reg-table tr.is-saving td { opacity: .55; transition: opacity .15s; }
.reg-table tr.is-passed td[data-grade] { color: #1b6331; font-weight: 700; }

/* Vereinsübersicht: Klick auf einen Verein klappt seine Mitglieder auf */
.club-row { cursor: pointer; }
.club-toggle { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--red); cursor: pointer; text-align: left; }
.club-toggle::before { content: "▸"; display: inline-block; width: 1em; color: var(--ink-soft); transition: transform .15s; }
.club-toggle[aria-expanded="true"]::before { transform: rotate(90deg); }
.club-toggle:hover { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; }
.club-table tr.club-row.is-open td { background: #f6f3ee; border-bottom-color: transparent; }
.club-table tr.club-members > td, .club-table tbody tr.club-members:hover > td { background: #f6f3ee; padding-top: 0; }
.club-members .table-flat { background: #fff; }
.club-members-links { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 0 0 4px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 60; max-width: min(92vw, 560px);
  padding: 12px 18px; border-radius: var(--radius); box-shadow: 0 6px 24px rgb(0 0 0 / .18); font-weight: 600;
  background: var(--ink); color: #fff; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast-ok { background: #1b6331; }
.toast-error { background: var(--red-dark); }
@media print { .toast { display: none; } }

/* ---------- Hilfe (Kurzanleitung) ---------- */
.help { max-width: 920px; }
.help-lead { font-size: 1.08rem; max-width: 70ch; }
.help-toc { margin-bottom: 24px; }
.help-section { scroll-margin-top: 16px; }
.help-section ol, .help-section ul { padding-left: 1.4em; margin: 0 0 1em; }
.help-section li + li { margin-top: 4px; }
.help-section h3 { margin: 1.2em 0 .5em; }
.help-section dd ul { margin: 6px 0 0; }
.help-section .dl { gap: 12px 24px; }
@media (max-width: 640px) { .help-section .dl { grid-template-columns: 1fr; gap: 2px; } .help-section .dl dd { margin-bottom: 10px; } }
@media print { .help-toc { display: none; } }

/* ---------- Lernmaterialien ---------- */
.learn-lead { font-size: 1.08rem; max-width: 70ch; color: var(--ink-soft); margin: -8px 0 24px; }
.learn-levels { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.learn-level { position: relative; overflow: hidden; gap: 4px; min-height: 150px; border-top: 0; padding-top: 26px; }
.learn-level::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--ink); }
.learn-level-basics::before { background: var(--red); }
.learn-level-kup::before { background: linear-gradient(90deg, #ece7df 0 14%, #f2c500 14% 28%, #f08a00 28% 42%, #2e8b3a 42% 57%, #1f5fbf 57% 71%, #c8102e 71% 85%, #6b3e1e 85%); }
.learn-level-name { font-family: var(--font-head); font-weight: 700; font-size: 1.9rem; line-height: 1.05; }
.learn-level-sub { font-weight: 600; color: var(--ink-soft); }
.learn-level .tile-label { margin-top: auto; padding-top: 8px; }
.learn-level-topics { font-size: .88rem; color: var(--ink-soft); }
.tab-count { display: inline-block; min-width: 1.6em; padding: 0 6px; margin-left: 3px; border-radius: 999px; background: var(--paper-2); color: var(--ink-soft); font-size: .8rem; text-align: center; }
.tabs a[aria-current="page"] .tab-count { background: rgb(255 255 255 / .22); color: #fff; }

.learn-toc h2 { font-size: 1.1rem; margin-bottom: 10px; }
.learn-toc-groups { display: grid; gap: 10px 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.learn-toc h3 { font-size: .9rem; margin: 0 0 4px; color: var(--red); text-transform: uppercase; letter-spacing: .08em; }
.learn-toc ul { margin: 0; padding-left: 1.1em; }
.learn-toc li { margin: 3px 0; }
.learn-group { margin-top: 32px; }
.learn-topic { display: flex; align-items: center; gap: 14px; }
.learn-topic::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.learn-item { scroll-margin-top: 16px; }
.learn-item.is-draft { border-left: 4px solid #e0b100; }
.learn-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; }
.learn-item-head h3 { margin: 0; font-size: 1.4rem; text-transform: none; letter-spacing: .01em; }
.learn-edit { margin-left: auto; }
.learn-summary { font-size: 1.05rem; color: var(--ink-soft); margin: 0 0 18px; max-width: 75ch; }
.learn-videos { display: grid; gap: 28px; max-width: 960px; margin-bottom: 24px; }
.learn-video { margin: 0; }
.video-embed { position: relative; overflow: hidden; color: #eee; }
.video-embed-inner {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 16px; text-align: center; background: radial-gradient(circle at 50% 40%, #2c2c2c, #111 72%);
}
.video-play {
  width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--red); color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 4px 18px rgb(0 0 0 / .45); transition: transform .15s, background .15s;
}
.video-play span { display: none; }
.video-play::before { content: ""; border-left: 22px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.video-play:hover, .video-play:focus-visible { transform: scale(1.08); background: var(--red-dark); }
.video-provider { margin: 8px 0 0; font-weight: 700; color: #fff; }
.video-note { margin: 0; font-size: .85rem; color: #bdb8b0; max-width: 44ch; }
.video-out { color: #fff; font-size: .88rem; }
.video-out:hover { color: #ff7a8a; }
.learn-video-text { margin-top: 12px; }
.learn-video-text h4 { margin: 0 0 6px; font-size: 1.12rem; }
.learn-video-text .learn-body { margin-bottom: 6px; }
.learn-video-meta { font-size: .88rem; color: var(--ink-soft); margin: 4px 0 0; overflow-wrap: anywhere; }
.learn-video-link { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: 0; }
.learn-video-link a { overflow-wrap: anywhere; font-weight: 600; }

/* Lernplayer: Bild + eigene Steuerleiste */
.lp { position: relative; border-radius: var(--radius); background: #111; overflow: hidden; outline: none; }
.lp:focus-visible { box-shadow: 0 0 0 3px var(--red); }
.lp-stage { position: relative; aspect-ratio: 16 / 9; background: #000; }
.lp-stage video, .lp-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.lp-stage video { object-fit: contain; cursor: pointer; }
.lp-bar { background: #1b1b1b; color: #eee; padding: 8px 12px 10px; font-size: .92rem; }
.lp:not(.lp-ready) .lp-bar { opacity: .55; pointer-events: none; }
.lp-noapi .lp-bar, .lp-error .lp-bar { display: none; }
.lp-timeline { position: relative; padding: 4px 0 2px; }
.lp-seek {
  --lp-pct: 0%; display: block; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.lp-seek::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--red) var(--lp-pct), #555 var(--lp-pct)); }
.lp-seek::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--red) var(--lp-pct), #555 var(--lp-pct)); }
.lp-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 3px rgb(200 16 46 / .55); }
.lp-seek::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 3px rgb(200 16 46 / .55); }
.lp-seek:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lp-tip {
  position: absolute; bottom: 100%; transform: translateX(-50%); padding: 2px 7px; border-radius: 3px; pointer-events: none;
  background: #fff; color: var(--ink); font-size: .8rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.lp-tip[hidden] { display: none; }
.lp-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.lp-group { display: flex; gap: 4px; }
.lp-btn {
  display: inline-grid; place-items: center; min-width: 40px; height: 36px; padding: 0 9px; border: 1px solid #444; border-radius: var(--radius);
  background: #2a2a2a; color: #f4f1ec; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.lp-btn:hover { background: #3a3a3a; border-color: #666; }
.lp-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.lp-btn svg { width: 20px; height: 20px; fill: currentColor; }
.lp-play { min-width: 52px; background: var(--red); border-color: var(--red); }
.lp-play:hover { background: var(--red-dark); border-color: var(--red-dark); }
.lp-time { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.lp-goto { display: inline-flex; gap: 4px; }
.lp-goto input, .lp-speed select {
  height: 36px; padding: 0 8px; border: 1px solid #555; border-radius: var(--radius); background: #111; color: #fff; font: inherit; font-size: .9rem;
}
.lp-goto input { width: 6.5em; }
.lp-goto input.is-invalid { border-color: #ff7a8a; outline: 1px solid #ff7a8a; }
.lp-speed { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; color: #ccc; }
.lp-keys { margin: 6px 0 0; font-size: .78rem; color: #9d968c; }
.lp-error-msg { margin: 0; padding: 10px 14px; background: #fdf0f2; color: var(--red-dark); font-weight: 600; }
.lp:fullscreen { display: flex; flex-direction: column; border-radius: 0; }
.lp:fullscreen .lp-stage { flex: 1; aspect-ratio: auto; }
.lp:-webkit-full-screen { display: flex; flex-direction: column; width: 100%; height: 100%; }
.lp:-webkit-full-screen .lp-stage { flex: 1; aspect-ratio: auto; }
@media (max-width: 640px) {
  .lp-controls { gap: 8px; }
  .lp-group { width: 100%; justify-content: space-between; }
  .lp-group .lp-btn { flex: 1; padding: 0 4px; }
  .lp-keys { display: none; }
}

/* Formular: Videos */
.video-fieldset { display: grid; gap: 12px; }
.video-rows { display: grid; gap: 12px; }
.video-row { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.video-row.is-removed { opacity: .5; }
.video-row.is-removed input[type="text"], .video-row.is-removed textarea { text-decoration: line-through; }
.video-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.video-row-head a { overflow-wrap: anywhere; font-weight: 600; }
.video-row-tools { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.portal .form .video-row-tools .check { display: inline-flex; margin: 0 0 0 6px; }
.video-row-tools .btn { min-width: 2.4em; }
.video-row-drop { margin-left: auto; font-size: .9rem; }
.video-row-src { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px 12px; align-items: end; }
.video-row-or { padding-bottom: 12px; color: var(--ink-soft); font-weight: 600; }
.portal .form .video-row textarea { min-height: 0; }
@media (max-width: 700px) { .video-row-src { grid-template-columns: 1fr; } .video-row-or { padding: 0; } }
.upload-feedback:has([data-upload-status][hidden]):has([data-upload-progress][hidden]) { display: none; }
.learn-images { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); margin-bottom: 20px; }
.learn-images img { display: block; width: 100%; height: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--paper-2); }
.learn-body { max-width: 75ch; line-height: 1.65; }
.learn-body > :last-child { margin-bottom: 0; }
.learn-body h4 { font-size: 1.12rem; margin: 1.3em 0 .4em; }
.learn-body h4:first-child { margin-top: 0; }
.learn-body ul, .learn-body ol { padding-left: 1.4em; margin: 0 0 1em; }
.learn-body li + li { margin-top: 3px; }
.learn-files, .learn-file-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 6px; }
.learn-files li, .learn-file-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.learn-files a { overflow-wrap: anywhere; font-weight: 600; }
.learn-file-list { margin: 0 0 12px; }
.portal .form .learn-file-list .check { display: inline-flex; margin: 0; font-size: .92rem; }
.file-kind { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 1px 7px; border-radius: 3px; background: var(--paper-2); color: var(--ink-soft); }
.upload-status { color: var(--red-dark); font-weight: 600; margin: 8px 0 0; }
.upload-progress { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-weight: 600; }
.upload-progress progress { flex: 1; max-width: 420px; height: 14px; accent-color: var(--red); }
.upload-status[hidden], .upload-progress[hidden] { display: none; }
@media print { .lp, .learn-edit { display: none; } .learn-item { break-inside: avoid; } }
.video-row-server { display: grid; gap: 4px; }
.video-row-server select:disabled { color: var(--ink-soft); background: var(--paper-2); }
.video-server-hint { font-size: .9rem; color: var(--ink-soft); padding: 12px 14px; border-left: 3px solid var(--line); background: var(--white); line-height: 1.55; }
.video-server-hint strong { color: var(--ink); }
.video-server-skipped { color: var(--red-dark); }
.video-row-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .92rem; font-weight: 600; }
.video-row-upload[hidden] { display: none; }
.video-row-upload progress { flex: 1 1 200px; max-width: 360px; height: 12px; accent-color: var(--red); }
.video-row-upload.is-done { color: #1b6331; }
.video-row-upload.is-done progress { accent-color: #2e7d43; }
.video-row-upload.is-error { color: var(--red-dark); }
.video-row-upload.is-error progress { display: none; }
.learn-grade { margin: -12px 0 22px; }
.learn-level.is-locked { opacity: .55; cursor: not-allowed; box-shadow: none; border: 1px dashed var(--line); }
.learn-level.is-locked:hover { transform: none; }
.learn-locked { max-width: 760px; }
.learn-locked h2 { text-transform: none; }
.member-suggest { margin: 6px 0 0; font-size: .92rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
