/* App-Modus (vom Startbildschirm gestartet) und Installations-Hinweis */
#app-hint { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px;
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--primary); border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: .92rem; }
#app-hint img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
#app-hint .txt { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
#app-hint .txt strong { font-size: 1rem; }
#app-hint .btn { flex: none; }
/* 2.9.3: Hinweis „In Chrome öffnen“ (Samsung-Browser): Knopf in eigener Zeile über die ganze Breite */
#app-hint.wrap { flex-wrap: wrap; }
#app-hint.wrap .txt { flex: 1 1 0; min-width: 0; }
#app-hint.wrap .btn { order: 3; flex: 1 1 100%; text-align: center; }
#app-hint .close { flex: none; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 6px; }
.ios-share { display: inline-block; border: 1px solid currentColor; border-radius: 3px; padding: 0 3px; font-size: .8em; }
#offline-bar { background: var(--warn-bg); color: var(--warn); padding: 8px 16px; text-align: center; font-size: .9rem;
  font-weight: 600; position: sticky; top: 0; z-index: 40; }

/* Als installierte App: unten Platz für die Menüleiste lassen */
@media (max-width: 760px) {
  body.logged-in #app-hint { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* v1.25: Abmelden von Busfahrten nur per Antrag */
.check.big.locked { opacity: .85; }
.check.big.locked input { cursor: not-allowed; }
.cancel-box { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 6px; background: #fbfbf8; }
.cancel-box > p { margin-top: 0; }
.cancel-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }
details.cancel-row { display: block; }
details.cancel-row > summary { list-style: none; display: inline-block; cursor: pointer; }
details.cancel-row > summary::-webkit-details-marker { display: none; }
details.cancel-row[open] > summary { background: var(--warn-bg); }
details.cancel-row form { margin-top: 8px; }
details.cancel-row textarea { width: 100%; }
.cancel-req { border-left: 4px solid var(--warn); }
.cancel-req .req { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.cancel-req .req:first-of-type { border-top: 0; }
.cancel-req .req > div { flex: 1 1 280px; }
.cancel-req .req form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; flex: 1 1 420px; }
.cancel-req .req input[name=note] { width: auto; flex: 1 1 100%; margin: 0; }
.ical-box .btn + .btn { margin-left: 6px; }

/* NarrenApp 2.0: Verwaltung → Verein & Aussehen */
.swatch-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255,255,255,.9); box-shadow: 0 0 0 1px rgba(0,0,0,.15); cursor: pointer; padding: 0; }
.color-pick { display: flex; align-items: center; gap: 8px; margin: 0; }
.color-pick input[type=color] { width: 48px; height: 36px; padding: 2px; border-radius: 6px; flex: none; }
.palette-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius, 8px); background: var(--b-bg); border: 1px solid var(--line); }
.media-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0; }
.media-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.media-form input[type=file], .media-row input[type=file] { max-width: 100%; width: auto; }
.media-prev { border: 1px solid var(--line); border-radius: var(--radius, 8px); background: var(--in-bg, #fff); flex: none; }
.logo-prev { width: 88px; height: 88px; display: grid; place-items: center; padding: 8px; }
.logo-prev img { max-width: 100%; max-height: 100%; }
.bg-prev { width: 200px; max-width: 100%; aspect-ratio: 16 / 9; background-size: cover; background-position: center; }
.bg-grid { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.bg-grid input[type=color] { width: 56px !important; min-width: 0; height: 38px; padding: 2px; flex: none; }
.pill-demo { padding: 4px 12px; border-radius: 99px; background: var(--pill-on, rgba(var(--b-rgb),.2)); color: var(--pill-on-ink, var(--b-ink)); font-weight: 600; }
.swatch-row { display: inline-flex; gap: 4px; margin-left: auto; }
.swatch-row i { width: 22px; height: 22px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.group-table input:not([type=checkbox]) { margin: 0; }
/* 2.0: Wer fährt noch mit? */
.rider-list { list-style: none; padding: 0; margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.rider-list li { padding: 3px 10px; border-radius: 99px; background: var(--pill-on, rgba(var(--b-rgb),.15)); color: var(--pill-on-ink, var(--b-ink)); font-size: .92rem; }

/* NarrenApp 2.1: Fahrgemeinschaften */
.tag.fg { background: #fdebd3; color: #8a4b00; }
html[data-theme=dark] .tag.fg { background: rgba(240,150,40,.22); color: #f6cf9c; }
@media (prefers-color-scheme: dark) { html:not([data-theme=light]) .tag.fg { background: rgba(240,150,40,.22); color: #f6cf9c; } }
.seats.fg small { display: block; }
.fg-family { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 4px; }
.fg-cars { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.fg-car { border: 1px solid var(--line, rgba(0,0,0,.1)); border-radius: 14px; padding: 12px 14px; background: var(--card2, rgba(255,255,255,.5)); }
html[data-theme=dark] .fg-car { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }
.fg-car h3 { margin: 0; font-size: 1.05rem; }
.fg-car p { margin: 6px 0; }
.fg-riders { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }
.fg-riders form.inline, form.inline { display: inline; margin: 0 0 0 6px; }
.fg-join { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 8px 0 4px; }
.kind-choice { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.kind-choice legend { font-weight: 600; margin-bottom: 4px; }
.bus-only[hidden] { display: none !important; }
/* 2.7: Linien-Symbole (inc/icons.php) statt Emojis */
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; display: inline-block; }
.ic-xs { width: .85em; height: .85em; vertical-align: 0; }
h2 > .ic, h3 > .ic, .ic-demo .ic { color: var(--ic, var(--b-strong, currentColor)); margin-right: .1em; }
html[data-theme=dark] h2 > .ic, html[data-theme=dark] h3 > .ic, html[data-theme=dark] .ic-demo .ic { color: var(--ic-dk, var(--b-dk-light, currentColor)); }
.ic-demo { display: flex; flex-wrap: wrap; gap: 14px; font-size: 1.5rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius, 8px); margin: 10px 0; }
.btn .ic { margin-right: .15em; }
.btn.icon .ic, .btn.small.danger .ic { margin: 0; }
.theme-toggle .ic { width: 1.05em; height: 1.05em; }
/* 2.8: gebuchte Bausteine, Vorschau, Betreiber-Konto, Freischaltcode */
.module-form .module-row > label.check { flex: 1; align-items: flex-start; }
.module-form .module-row > label.check.book { flex: none; font-size: .85em; white-space: nowrap; padding-top: 2px; }
.module-form .module-row.not-booked > label.check:last-child > input { opacity: .45; cursor: not-allowed; }
.module-form .module-row.not-booked strong { opacity: .75; }
.module-preview .preview-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.module-preview .preview-pic { margin-top: 8px; }
.module-preview .preview-pic summary { cursor: pointer; font-weight: 600; }
.module-preview .preview-pic img { display: block; max-width: 100%; height: auto; margin-top: 8px; border-radius: var(--radius, 8px); border: 1px solid var(--line); }
.tag.betreiber { background: var(--warn-bg, #fff3d6); color: var(--heading); white-space: nowrap; }
.row-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 8px 0 12px; }
.row-form .grow { flex: 1 1 260px; }
.row-form textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em; word-break: break-all; }
.module-preview .preview-pic summary { display: list-item; }

/* 2.8.2: Garden anderer Trainer ausgegraut */
.gd-choice label.check.disabled { opacity: .45; cursor: not-allowed; }

/* 2.9: Häs & Larven */
.tag.haes { background: #fde9d4; color: #8a4300; }
html[data-theme=dark] .tag.haes { background: rgba(255,138,61,.22); color: #ffc9a3; }
.h-table td, .h-table th { vertical-align: top; }
.h-table tr.muted td { opacity: .7; }
.h-table tr.h-sub td { background: var(--warn-bg); }
html[data-theme=dark] .h-table tr.h-sub td { background: rgba(255,200,80,.08); }
.h-table tr.h-sub .inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.h-table tr.h-sub label { display: flex; flex-direction: column; font-size: .85rem; gap: 2px; }
.h-table tr.h-sub label.check { flex-direction: row; align-items: center; }
.h-table tr.h-err td { background: var(--err-bg); }
html[data-theme=dark] .h-table tr.h-err td { background: rgba(220,60,60,.12); }
.h-map select { min-width: 220px; }
.h-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.h-item { border: 1px solid var(--line); border-left: 4px solid #ff8a3d; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.h-item.h-loan { border-left-color: var(--primary); }
.h-item.h-pending { border-left-color: var(--warn); border-style: dashed; }
.h-item header { font-size: 1.05rem; color: var(--heading); }
.h-item p { margin: 0; }
.h-item footer { margin-top: 6px; }
.h-item .h-nr { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 10px; background: #1F2128; color: #fff; font-weight: 700; font-size: .85rem; }
.h-report { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.h-next { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; border-left: 4px solid #ff8a3d; }
.h-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; counter-reset: s; }
.h-steps li { counter-increment: s; padding: 4px 12px; border-radius: 16px; background: var(--line); font-size: .88rem; }
.h-steps li::before { content: counter(s) ". "; }
.h-steps li.on { background: var(--primary); color: var(--primary-ink); font-weight: 600; }
@media print {
  body.page-wide .tabs, .noprint, .page-head .actions, .tabbar, header.top, .subnav { display: none !important; }
  .h-table { font-size: 10pt; }
  .print-title { font-size: 14pt; }
}
.h-filter select, .h-table select { width: auto; flex: 0 1 auto; margin: 0; max-width: 100%; }
.h-filter input[name=q] { flex: 1 1 220px; }
.h-filter input[size] { flex: 0 1 auto; }
.h-table tr.h-sub label input, .h-table tr.h-sub label select { flex: 0 0 auto; width: auto; margin: 0; }
html[data-theme=dark] .h-item .h-nr { background: #ff8a3d; color: #1F2128; }

/* 2.10: Termine (Grundfunktion) und Umzug-Infoblatt */
.t-umzug-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 20px; margin: 10px 0 0; padding: 8px 12px; border-left: 4px solid var(--primary); background: var(--m-open, #f6f6f6); border-radius: 0 8px 8px 0; }
.t-umzug-info h4 { margin: 4px 0; font-size: .9rem; }
.t-umzug-info ol, .t-umzug-info ul { margin: 0 0 6px; padding-left: 20px; }
.t-umzug-form { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 10px; margin: 6px 0 12px; }
.t-umzug-form legend { font-weight: 700; color: var(--heading); padding: 0 4px; }
.t-infoblatt { max-width: 760px; }
.t-infoblatt h1 { margin: 0 0 4px; }
.t-ib-verein { margin: 0; font-weight: 700; color: var(--primary-dark, #c8601a); text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; }
.t-ib-when { font-size: 1.1rem; font-weight: 600; margin: 0 0 8px; }
.t-ib-facts { font-size: 1rem; }
.t-ib-facts .small { word-break: break-all; color: var(--muted); }
.t-ib-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 24px; margin-top: 12px; }
.t-ib-cols h2 { font-size: 1.05rem; margin: 10px 0 6px; }
.t-ib-cols ol, .t-ib-cols ul { padding-left: 22px; margin: 0; }
.t-ib-cols li { margin: 2px 0; }
@media print { .t-infoblatt { box-shadow: none !important; border: 0 !important; max-width: none; } .t-ib-cols { grid-template-columns: 1fr 1fr 1fr; } }

/* 2.10: Vereinsinfo (Grundfunktion) */
.vi { display: flex; flex-direction: column; gap: 0; }
.vi-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.vi-sec > summary::-webkit-details-marker { display: none; }
.vi-sec > summary h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.vi-sec > summary::after { content: "▾"; color: var(--muted); font-size: 1.1rem; transition: transform .15s; }
.vi-sec:not([open]) > summary::after { transform: rotate(-90deg); }
.vi-sec[open] > summary { margin-bottom: 10px; }
.vi-kontakte, .vi-docs, .vi-regeln { list-style: none; margin: 0; padding: 0; }
.vi-kontakte li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.vi-kontakte li:last-child, .vi-docs li:last-child, .vi-regeln li:last-child { border-bottom: 0; }
.vi-k-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vi-docs li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.vi-docs li > a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.vi-kat { margin: 12px 0 0; text-transform: uppercase; letter-spacing: .04em; }
.vi-regeln li { padding: 8px 0 8px 14px; border-left: 3px solid var(--primary); margin: 0 0 8px; border-bottom: 0; }
.vi-faq { border-bottom: 1px solid var(--line); padding: 8px 0; }
.vi-faq > summary { cursor: pointer; font-weight: 600; }
.vi-faq p { margin: 6px 0 2px; }
.vi-move { display: inline-flex; gap: 2px; margin: 0; }
.vi-admin-list .actions { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* 2.10: Mitteilungen (Grundfunktion) */
.card.mt-item { border-left: 4px solid var(--line) !important; }
.card.mt-item.mt-neu { border-left-color: var(--primary) !important; }
.card.mt-item.mt-wichtig { border-left-color: var(--err) !important; }
.tag.mt-w { background: var(--err-bg); color: var(--err); font-weight: 600; }
.mt-item.mt-alt { opacity: .7; }
.mt-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; }
.mt-head h2 { margin: 0; font-size: 1.15rem; }
.mt-meta { margin: 4px 0 10px; }
.mt-text { line-height: 1.55; overflow-wrap: anywhere; }
.mt-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.mt-foot .btnrow { margin: 0; }
.mt-ziel .mt-sub { margin: 2px 0 10px 26px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.mt-ziel .mt-sub[hidden] { display: none; }
.mt-ziel .mt-sub select { max-width: 100%; }
.mt-home { margin-bottom: 16px; }
.mt-home ul { list-style: none; margin: 0; padding: 0; }
.mt-home li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.mt-home li:last-child { border-bottom: 0; }
.mt-home li a { font-weight: 600; }
.mt-home .mt-excerpt { display: block; color: var(--muted); font-size: .92rem; margin-top: 2px; }
.tabbar .badge, .menu-pop .badge { margin-left: 4px; }
.mt-ziel { margin-bottom: 10px; }

/* 2.11: Kinder-Zugang (nur lesen): Knöpfe zum Speichern ausblenden, Felder sperren. Gesperrt wird zusätzlich auf dem Server. */
body.readonly form[method="post"] button, body.readonly form[method="post"] [type="submit"],
body.readonly details:has(> form[method="post"]) > summary, body.readonly .shift-actions, body.readonly .ro-hide { display: none !important; }
body.readonly form[method="post"] :is(input, select, textarea) { pointer-events: none; opacity: .55; }
.memberview-bar.readonly-bar, html[data-theme] .memberview-bar.readonly-bar { background: var(--hint-bg); border-color: var(--hint-border); }
.fam-logins li { align-items: center; }
.fam-logins .tag { margin-left: 4px; }
