/* Vereins-CI: Farben kommen aus den Markeneinstellungen (per JS gesetzt), hier nur Startwerte */
@font-face { font-family: "Bebas Neue"; src: url("/ui-fonts/bebas-neue-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: url("/ui-fonts/bebas-neue-latin-ext-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "Oswald"; src: url("/ui-fonts/oswald-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("/ui-fonts/oswald-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --brand: #4a86c8;
  --brand-dark: #1f4fa8;
  --brand-ink: #ffffff;
  --font-head: "Bebas Neue", "Oswald", "Arial Narrow", sans-serif;
  --font-ui: "Oswald", "Arial Narrow", sans-serif;
  --bg: color-mix(in srgb, var(--brand) 9%, #f6f8fb);
  --surface: #ffffff;
  --text: #15233b;
  --muted: #5d6b80;
  --border: color-mix(in srgb, var(--brand) 22%, #e3e7ee);
  --accent: var(--brand-dark);
  --accent-text: #ffffff;
  --ok: #1f8a4c;
  --warn: #b26b00;
  --err: #c0392b;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: color-mix(in srgb, var(--brand-dark) 30%, #0a111e);
    --surface: color-mix(in srgb, var(--brand-dark) 22%, #121a2b);
    --text: #e8eef8;
    --muted: #9aa8bf;
    --border: color-mix(in srgb, var(--brand) 28%, #26314a);
    --accent: var(--brand);
    --ok: #4cc287;
    --warn: #e5a23a;
    --err: #ef6b5e;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
/* Kopfzeile im Vereins-Look: Markenfarbe, Logo, Navigation in Dunkelblau */
header.brandbar { background: var(--brand); color: var(--brand-ink); box-shadow: 0 2px 10px rgb(0 0 0 / .12); }
.brand-top { display: flex; align-items: center; gap: 16px; padding: 12px 20px 10px; max-width: 1240px; margin: 0 auto; }
.brand-logo { width: 58px; height: 58px; object-fit: contain; background: #fff; border-radius: 50%; padding: 4px; flex: none; }
.brand-title { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.brand-kicker { font-family: var(--font-ui); font-weight: 500; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.brand-home { display: flex; align-items: center; gap: 16px; color: inherit; text-decoration: none; min-width: 0; border-radius: 12px; }
.brand-home:hover .brand-logo { transform: scale(1.04); }
.brand-home:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.brand-logo { transition: transform .15s ease; }
.brand-h1 { font-family: var(--font-head); font-weight: 400; font-size: 40px; letter-spacing: .02em; margin: 2px 0 0; text-transform: uppercase; line-height: 1; }
.brand-nav { background: var(--brand-dark); display: flex; gap: 2px; flex-wrap: wrap; padding: 6px 14px; justify-content: center; }
.tab { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 7px 16px; border-radius: 6px; color: rgb(255 255 255 / .82); cursor: pointer;
  font-family: var(--font-ui); font-weight: 500; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.tab-icon { font-size: 17px; line-height: 1; }
.tab:hover { color: #fff; background: rgb(255 255 255 / .1); }
.tab.active { background: #fff; color: var(--brand-dark); font-weight: 600; }
.caps { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cap { font-size: 12px; padding: 2px 9px; border-radius: 99px; border: 1px solid rgb(255 255 255 / .5); color: rgb(255 255 255 / .75); font-family: var(--font-ui); letter-spacing: .04em; }
.cap.on { border-color: #fff; color: #fff; background: rgb(255 255 255 / .15); }
.cap.on::before { content: "● "; color: #7dffb0; }


main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }
.panel { display: none; }
.panel.active { display: block; }

label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
}
input[type="color"] { padding: 2px; height: 38px; width: 80px; }
textarea { resize: vertical; width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin: 14px 0; }
.actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
button.primary {
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: 8px;
  padding: 10px 20px; font-family: var(--font-ui); font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
button.primary:hover:not(:disabled) { filter: brightness(1.12); }
button.primary:disabled { opacity: .5; cursor: wait; }
button.ghost { background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; color: var(--text); cursor: pointer; font: inherit; }
.msg { font-size: 13px; color: var(--muted); }
.msg.err { color: var(--err); }
.muted { color: var(--muted); }
h3 { margin: 24px 0 8px; font-family: var(--font-head); font-weight: 400; font-size: 23px; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); }
h3 small { font-family: system-ui, sans-serif; font-size: 12px; text-transform: none; letter-spacing: 0; }
h3 small { font-weight: 400; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tile {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; font-size: 12px;
}
.tile img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: repeating-conic-gradient(#ccc 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.tile .audio { aspect-ratio: 1; display: grid; place-items: center; font-size: 28px; color: var(--muted); }
.tile .meta { padding: 6px 8px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.tile .meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker .tile { cursor: pointer; }
.picker .tile.selected { outline: 3px solid var(--accent); }
.badge {
  position: absolute; top: 6px; left: 6px; background: var(--accent); color: var(--accent-text);
  border-radius: 99px; min-width: 22px; height: 22px; display: grid; place-items: center; font-weight: 700;
}

.split { display: grid; grid-template-columns: 320px 1fr; gap: 20px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.item-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.item-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; cursor: pointer;
}
.item-list li.active { border-color: var(--accent); }
.item-list .title { font-weight: 600; display: block; }
.status { font-size: 12px; }
.status.done { color: var(--ok); }
.status.running, .status.queued { color: var(--warn); }
.status.failed { color: var(--err); }
.detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; }
.detail video { max-width: 100%; max-height: 70vh; border-radius: 8px; background: #000; }
.detail pre { white-space: pre-wrap; background: var(--bg); padding: 10px; border-radius: 8px; font-size: 13px; overflow-x: auto; }
.detail .media { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.detail .cover { width: 200px; border-radius: 8px; }

.brand-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; max-width: 800px; }
.brand-form .wide { grid-column: 1 / -1; }

/* --- Erweiterungen: Posttypen, Team, Versionen --- */
.small { font-size: 12px; }
.err { color: var(--err); }
.grow { flex: 1 1 260px; }
.wide { grid-column: 1 / -1; width: 100%; }
.kicker { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
h2 { margin: 2px 0 10px; font-family: var(--font-head); font-weight: 400; font-size: 34px; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.segmented button { background: none; border: 0; border-radius: 7px; padding: 6px 12px; font: inherit; color: var(--muted); cursor: pointer; }
.segmented button.active { background: var(--accent); color: var(--accent-text); }
.output-choice h3 { margin-top: 0; }
.output-switch { display: flex; width: 100%; }
.output-switch button { flex: 1 1 0; padding: 10px 12px; }
.output-choice p { margin: 8px 0 0; }

.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; margin: 14px 0; }
.fields textarea { min-height: 70px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.chip.disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }

.item-list li .title { font-weight: 600; display: block; }
.item-list li.person { display: flex; gap: 10px; align-items: center; }
.item-list li.person.inactive { opacity: .55; }
.item-list li.person img, .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar { display: grid; place-items: center; background: var(--bg); font-weight: 700; color: var(--muted); }
.item-list li > span:not(.avatar) { min-width: 0; }

.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.person-form textarea { width: 100%; }
.small-tiles { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.small-tiles .tile .meta { display: none; }

.detail textarea { width: 100%; }
.detail .row label:not(.check) { flex: 1 1 200px; }
.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); border-radius: 8px; padding: 4px 12px; margin: 10px 0; font-size: 13px; }
.revise { margin-top: 20px; border: 1px solid var(--accent); border-radius: var(--radius); padding: 10px 14px; }
.revise > summary { font-weight: 600; cursor: pointer; color: var(--accent); }
.revise details { margin: 10px 0; }
.revise details > summary { cursor: pointer; }
details > summary { cursor: pointer; margin: 8px 0; }
button.danger { color: var(--err); border-color: var(--err); }
a.ghost { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; color: var(--text); text-decoration: none; }
.tile .audio { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 8px; }
.tile .audio audio { width: 100%; }
[hidden] { display: none !important; }
.item-list li.person > span > span { display: block; overflow: hidden; text-overflow: ellipsis; }
.cap.off { border-color: var(--warn); color: var(--warn); cursor: help; }

/* --- Fortschritt, Abbruch, Wiederholung --- */
.status-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0; }
.status.cancelled { color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 4px; }
.step { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; padding: 7px 10px; border-radius: 8px; background: var(--bg); font-size: 14px; }
.step .icon { font-weight: 700; text-align: center; }
.step .label { display: flex; flex-direction: column; min-width: 0; }
.step .step-detail { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.step .time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.step.pending { opacity: .55; }
.step.running { outline: 2px solid var(--warn); }
.step.running .icon { color: var(--warn); animation: pulse 1.2s ease-in-out infinite; }
.step.done .icon { color: var(--ok); }
.step.failed { outline: 2px solid var(--err); }
.step.failed .icon, .step.failed .step-detail { color: var(--err); }
.step.cancelled .icon { color: var(--muted); }
.step.skipped { opacity: .6; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .step.running .icon { animation: none; } }
.error-box { background: color-mix(in srgb, var(--err) 10%, transparent); border-radius: 8px; padding: 8px 12px; margin: 10px 0; }
.error-box pre, .warn pre { background: none; padding: 4px 0 0; margin: 0; }

/* --- Spiele, Gegner, Bild-Infos --- */
.picker-toolbar { margin: 6px 0 10px; }
.tile-tags { padding: 0 8px 6px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-thumb { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; flex: none; }
.logo-preview { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; border: 1px solid var(--border); }
.asset-preview { width: 100%; max-height: 320px; object-fit: contain; background: var(--bg); border-radius: 8px; margin-bottom: 8px; }
.library-split { grid-template-columns: 1fr 340px; align-items: start; }
.library-split .detail { position: sticky; top: 12px; }
@media (max-width: 900px) { .library-split { grid-template-columns: 1fr; } .library-split .detail { position: static; } }
.tagging-status { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; margin: 4px 0 14px; min-height: 20px; }
.warn-text { color: var(--warn); }
.ok-text { color: var(--ok); }
.kpi.clickable { cursor: pointer; }
.tile.selected { outline: 3px solid var(--accent); }

/* --- handball.net-Import --- */
.import-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.import-info { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 8px; }
.import-info h4 { margin: 14px 0 6px; font-size: 13px; }
.timeline { display: flex; gap: 4px; align-items: flex-end; overflow-x: auto; padding-bottom: 4px; }
.tl-col { display: flex; flex-direction: column; align-items: center; min-width: 38px; font-size: 11px; }
.tl-bars { height: 80px; display: flex; align-items: flex-end; gap: 2px; }
.tl-bars span { width: 10px; border-radius: 3px 3px 0 0; min-height: 2px; }
.tl-own { background: var(--accent); }
.tl-opp { background: var(--muted); opacity: .6; }
.tl-label { color: var(--muted); }
.tl-score { font-variant-numeric: tabular-nums; font-weight: 600; }
.scorers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 16px; font-size: 13px; }
.scorers li { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding: 2px 0; }
.report { white-space: pre-wrap; }

/* --- Vorlagen, Schriften, Bildpost --- */
.font-tile { font-size: 42px; font-weight: 700; color: var(--text); }
.image-post { max-width: 360px; max-height: 70vh; border-radius: 8px; border: 1px solid var(--border); }
.ref-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin-bottom: 8px; }
.ref-grid .tile img { aspect-ratio: 4 / 5; object-fit: cover; }
#template-detail textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

/* --- Kosten --- */
.cost-box { margin: 8px 0; font-size: 14px; }
.cost-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.cost-table td { padding: 4px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.cost-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* --- Vereins-CI: Feinschliff --- */
.kicker { font-family: var(--font-ui); letter-spacing: .1em; color: var(--accent); }
.item-list li .title { font-family: var(--font-ui); font-weight: 500; letter-spacing: .02em; font-size: 16px; }
.item-list li.active { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.detail, .item-list li, .tile, .import-bar { box-shadow: 0 1px 3px rgb(21 35 59 / .06); }
.segmented button { font-family: var(--font-ui); letter-spacing: .05em; text-transform: uppercase; font-size: 14px; }
.chip { font-family: var(--font-ui); letter-spacing: .03em; }
a.ghost, button.ghost { font-family: var(--font-ui); letter-spacing: .04em; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.badge { background: var(--brand-dark); }
.tl-own { background: var(--brand-dark); }
@media (prefers-color-scheme: dark) { .tl-own { background: var(--brand); } h3 { color: var(--brand); } }

/* --- Grundstruktur: weiße Karten --- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; box-shadow: 0 1px 3px rgb(21 35 59 / .06); min-width: 0; }
.card > h3:first-child, .subcard > h3:first-child { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
#tab-library > .card { margin-bottom: 16px; }
.card .fields { margin: 8px 0 0; }
.card .row:last-child { margin-bottom: 0; }
.subcard { border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin: 16px 0; background: color-mix(in srgb, var(--surface) 92%, var(--brand) 8%); }
.submit-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 20px; box-shadow: 0 -4px 16px rgb(21 35 59 / .1); }
.library-split > .card { padding: 14px; }

/* --- Dashboard --- */
.dash-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-dark) 100%); color: var(--brand-ink); border: 0; }
.dash-hero .kicker { color: rgb(255 255 255 / .85); }
.dash-hero h2 { margin: 4px 0 0; color: #fff; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-hero button.primary { background: #fff; color: var(--brand-dark); }
.dash-hero button.ghost { color: #fff; border-color: rgb(255 255 255 / .6); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 2px; border-top: 4px solid var(--accent); }
.kpi.busy { border-top-color: var(--warn); }
.kpi.warn { border-top-color: var(--warn); }
.kpi-label { font-family: var(--font-ui); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font-family: var(--font-head); font-size: 44px; line-height: 1; color: var(--accent); }
.kpi-hint { font-size: 12px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dash-wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-list { display: flex; flex-direction: column; gap: 6px; }
.dash-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--border); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; font: inherit; color: inherit; }
.dash-row:last-child { border-bottom: 0; }
.link-row { cursor: pointer; border-radius: 8px; }
.link-row:hover { background: var(--bg); }
.dash-row-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dash-row-title { font-family: var(--font-ui); font-weight: 500; font-size: 16px; letter-spacing: .02em; }
.dash-score { font-family: var(--font-head); font-size: 20px; color: var(--accent); }
.dash-row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
button.primary.small-btn { padding: 6px 12px; font-size: 13px; }
.dash-empty { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.dash-post { display: flex; flex-direction: column; gap: 2px; text-align: left; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 8px; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.dash-post:hover { border-color: var(--accent); }
.dash-post img, .dash-post-empty { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; margin-bottom: 4px; background: var(--surface); }
.dash-post-empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.dash-post-title { font-family: var(--font-ui); font-weight: 500; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--err); }
.pulse { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--warn); }
.pulse.running { animation: pulse 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .pulse.running { animation: none; } }

/* --- Marke: Karten + Live-Vorschau --- */
.brand-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.brand-layout .submit-bar { grid-column: 1 / -1; }
.brand-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.brand-preview-card { position: sticky; top: 12px; }
@media (max-width: 900px) { .brand-layout { grid-template-columns: 1fr; } .brand-preview-card { position: static; } }
.color-fields { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.color-fields input[type="color"] { width: 100%; }
.logo-preview.big { width: 120px; height: 120px; margin-top: 12px; }
.brand-preview { --bp-bg: #4a86c8; --bp-own: #1f4fa8; --bp-ink: #fff; --bp-head: "Bebas Neue"; --bp-body: "Oswald";
  position: relative; aspect-ratio: 4 / 5; background: var(--bp-bg); color: var(--bp-ink); border-radius: 8px; padding: 18px; overflow: hidden; font-family: var(--bp-body); }
.bp-logo { position: absolute; top: 14px; right: 14px; width: 62px; height: 62px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; }
.bp-head { font-family: var(--bp-head); font-size: 58px; line-height: .9; text-transform: uppercase; }
.bp-league { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.bp-box { position: absolute; left: 18px; right: 18px; top: 120px; bottom: 18px; border: 3px solid var(--bp-ink); text-align: center; padding-top: 22px; font-family: var(--bp-head); text-transform: uppercase; }
.bp-team { font-size: 30px; line-height: 1.05; padding: 0 8px; overflow-wrap: anywhere; }
.bp-vs { font-size: 18px; margin: 4px 0; }
.bp-own { color: var(--bp-own); }
.bp-line { height: 2px; background: var(--bp-ink); opacity: .7; margin: 14px 40px; }
.bp-score { font-size: 72px; line-height: 1; }

/* --- Musik vorhören, Anzeigenamen --- */
.track-pick { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.music-player { height: 36px; max-width: 100%; min-width: 240px; }
.font-sample { font-size: 34px; padding: 16px; background: var(--bg); border-radius: 8px; margin-bottom: 8px; overflow-wrap: anywhere; }

/* Lange Auswahltexte (z. B. Spielnamen) dürfen das Layout nicht sprengen */
select { max-width: 100%; text-overflow: ellipsis; }
.row > label, .fields > label { min-width: 0; max-width: 100%; }


/* --- Smartphone (iPhone) --- */
@media (max-width: 800px) {
  main { padding: 12px 12px calc(40px + env(safe-area-inset-bottom)); }
  .brand-top { padding: calc(8px + env(safe-area-inset-top)) 14px 8px; gap: 10px; }
  .brand-logo { width: 42px; height: 42px; padding: 3px; }
  .brand-h1 { font-size: 28px; }
  .brand-kicker { font-size: 11px; }
  .caps { display: none; }
  /* Hauptmenü als feste Leiste am unteren Rand (wie in Apps), Kopf mit Logo bleibt oben */
  .brand-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; flex-wrap: nowrap; justify-content: space-around; gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 12px rgb(0 0 0 / .18); }
  .tab { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; padding: 4px 2px; border-radius: 10px;
    font-size: 11px; letter-spacing: 0; text-transform: none; line-height: 1.1; min-height: 52px; justify-content: center; }
  .tab-icon { font-size: 22px; width: 52px; padding: 3px 0; border-radius: 99px; text-align: center; }
  .tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab:hover { background: none; }
  .tab.active { background: none; color: #fff; font-weight: 600; }
  .tab.active .tab-icon { background: rgb(255 255 255 / .2); }
  header.brandbar { position: sticky; top: 0; z-index: 20; }
  .detail, .card, .item-list { scroll-margin-top: calc(var(--brand-top-h, 58px) + 56px); }
  /* iOS zoomt bei Eingabefeldern < 16 px – deshalb 16 px */
  input, select, textarea, button { font-size: 16px; }
  label > input:not([type="checkbox"]):not([type="color"]):not([type="file"]), label > select, label > textarea { width: 100%; }
  .row { gap: 12px; }
  .row > label:not(.check) { flex: 1 1 100%; }
  button.primary, button.ghost, a.ghost { min-height: 44px; }
  button.ghost, a.ghost { padding: 10px 14px; display: inline-flex; align-items: center; }
  .card { padding: 14px; border-radius: 12px; }
  .detail { padding: 14px; }
  h2 { font-size: 28px; }
  h3 { font-size: 21px; }
  .split { gap: 12px; }
  .item-list li { padding: 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-value { font-size: 36px; }
  .dash-hero { flex-direction: column; align-items: stretch; }
  .dash-actions { flex-direction: column; }
  .dash-actions button { width: 100%; }
  .dash-row { flex-wrap: wrap; }
  .dash-row-actions { width: 100%; justify-content: flex-start; }
  .dash-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented { display: flex; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; max-width: 100%; }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented button { flex: none; padding: 9px 12px; }
  .output-switch button { flex: 1 1 0; padding: 9px 6px; font-size: 13px; }
  .submit-bar { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-radius: 12px 12px 0 0; margin: 0 -12px; }
  .submit-bar button.primary { flex: 1; }
  .media { flex-direction: column; }
  .job-detail video, .detail video, .image-post { width: 100%; max-width: 100%; }
  .cover { width: 60%; }
  .steps .step { grid-template-columns: 20px 1fr; }
  .steps .step .time { grid-column: 2; }
  .cost-table td:nth-child(2) { display: none; }
  .library-split .detail { position: static; }
  .brand-preview-card { order: -1; }
  .music-player { width: 100%; min-width: 0; }
  .timeline { padding-bottom: 8px; }
}

/* --- Anmeldeseite --- */
.login-page { min-height: 100vh; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); display: grid; place-items: center; padding: 16px; }
.login-wrap { width: 100%; max-width: 400px; padding: 0; }
.login-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.login-card label input { width: 100%; font-size: 16px; }
.login-card button.primary { width: 100%; min-height: 46px; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; color: var(--accent); }
.login-brand .brand-logo { width: 64px; height: 64px; border: 1px solid var(--border); }
.login-brand .brand-kicker { color: var(--muted); }
.login-brand .brand-h1 { font-size: 34px; }

/* --- Benutzermenü in der Kopfzeile --- */
.user-menu { display: flex; align-items: center; gap: 6px; margin-left: 12px; flex: none; }
.user-button { display: flex; align-items: center; gap: 8px; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .35); color: #fff;
  border-radius: 99px; padding: 4px 12px 4px 4px; cursor: pointer; font-family: var(--font-ui); font-size: 14px; letter-spacing: .03em; }
.user-button:hover { background: rgb(255 255 255 / .22); }
.user-initials { width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--brand-dark); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.logout-button { background: none; border: 0; color: rgb(255 255 255 / .85); cursor: pointer; font-family: var(--font-ui); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; padding: 6px; }
.logout-button:hover { color: #fff; text-decoration: underline; }

/* --- Einstellungen: Unternavigation --- */
.sub-nav { margin-bottom: 16px; }
.readonly-note { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--text); border-radius: 8px; padding: 6px 10px; }

/* --- Rechte-Tabelle --- */
.perm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.perm-table th { text-align: center; font-family: var(--font-ui); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px; }
.perm-table th:first-child { text-align: left; }
.perm-table td { padding: 8px 6px; border-top: 1px solid var(--border); text-align: center; }
.perm-table td:first-child { text-align: left; }
.perm-table td.na { color: var(--muted); }
.perm-table label.radio { display: inline-flex; justify-content: center; }
.perm-table input[type="radio"] { width: 20px; height: 20px; accent-color: var(--accent); }
.perm-table.compact td { text-align: left; padding: 5px 6px; }
.lvl-edit { color: var(--ok); font-weight: 600; }
.lvl-view { color: var(--accent); }
.lvl-none { color: var(--muted); }

@media (max-width: 800px) {
  .user-menu { margin-left: auto; }
  .user-name, .logout-button { display: none; }
  .user-button { padding: 3px; border-radius: 50%; }
  .perm-table td:first-child .small { display: block; }
  .sub-nav { position: sticky; top: var(--brand-top-h, 58px); z-index: 10; margin: -12px -12px 12px; border-radius: 0; border-width: 0 0 1px; padding: 6px 12px; }
}
@media (max-width: 800px) {
  .perm-table { table-layout: fixed; font-size: 13px; }
  .perm-table th { font-size: 10px; letter-spacing: .02em; padding: 4px 2px; word-break: break-word; }
  .perm-table th:first-child, .perm-table td:first-child { width: 46%; }
  .perm-table td { padding: 8px 2px; }
  .perm-table td:first-child { overflow-wrap: anywhere; }
}
.voice-preview { display: flex; flex-direction: column; gap: 2px; }

/* Spieleliste: Gruppenüberschriften und „nächstes Spiel“ */
.item-list li.list-heading { background: none; border: 0; box-shadow: none; padding: 10px 4px 2px; cursor: default;
  font-family: var(--font-ui); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.next-badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px; background: var(--accent); color: var(--accent-text);
  font-family: var(--font-ui); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; }
.roster button.link:disabled { text-decoration: none; cursor: default; color: inherit; }
.ext-badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted);
  font-family: var(--font-ui); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; }
#game-filter, #club-filter { margin-bottom: 12px; }
.consent-missing { color: var(--warn); }
/* Datei-Auswahlfelder dürfen auf schmalen Bildschirmen nicht überstehen */
input[type="file"] { max-width: 100%; min-width: 0; }

/* Icon-Vorschau (Favicon / Home-Bildschirm) */
.icon-previews { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.icon-preview-set { display: flex; flex-direction: column; gap: 8px; }
.tab-mock { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px 8px 0 0; padding: 4px 10px; font-size: 12px; }
.tab-mock img { width: 16px; height: 16px; object-fit: contain; }
.icon-home { width: 60px; height: 60px; object-fit: contain; background: #fff; border-radius: 14px; padding: 4px; box-shadow: 0 2px 6px rgb(0 0 0 / .2); }

/* Live-Vorschau skaliert mit ihrer Breite (Container-Einheiten) */
.brand-preview { container-type: inline-size; padding: 5cqw; }
.bp-logo { width: 17cqw; height: 17cqw; top: 4cqw; right: 4cqw; }
.bp-head { font-size: 16cqw; padding-right: 20cqw; }
.bp-league { font-size: 3.2cqw; }
.bp-box { left: 5cqw; right: 5cqw; top: 34cqw; bottom: 5cqw; padding-top: 5cqw; border-width: max(2px, .8cqw); }
.bp-team { font-size: 8cqw; }
.bp-vs { font-size: 5cqw; margin: 1cqw 0; }
.bp-line { margin: 4cqw 11cqw; }
.bp-score { font-size: 19cqw; }
@media (max-width: 800px) {
  .brand-h1 { font-size: 26px; white-space: nowrap; }
}

/* --- Abstimmungen (Verwaltung) --- */
.poll-pick { display: flex; flex-direction: column; gap: 10px; }
.poll-pick-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.poll-group { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); overflow: hidden; }
.poll-group[open] > summary { border-bottom: 1px solid var(--border); }
.poll-group > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0; cursor: pointer; list-style: none; background: var(--surface); }
.poll-group > summary::-webkit-details-marker { display: none; }
.poll-group > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.poll-group[open] > summary::before { transform: rotate(90deg); }
.poll-group-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.poll-group-title strong { overflow-wrap: anywhere; line-height: 1.25; }
.poll-group-count { font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.small-btn { padding: 4px 10px; font-size: 13px; }
.poll-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 10px 12px 12px; }
.poll-tile { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 2px solid var(--border); border-radius: 10px; background: var(--surface); }
.poll-tile.selected { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.poll-tile-thumb { position: relative; display: block; padding: 0; border: 0; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg); cursor: zoom-in; }
.poll-tile-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poll-tile-empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 24px; }
.poll-tile-play { position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; }
.poll-tile-check { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; cursor: pointer; color: var(--text); }
.poll-tile-check > span { display: flex; flex-direction: column; min-width: 0; }
.poll-tile-check input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.poll-tile input:not([type="checkbox"]) { width: 100%; font-size: 14px; }
.poll-tile input:disabled { opacity: .5; }
.preview-dialog { color: var(--text); background: var(--surface); width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 14px; overflow: auto; }
.preview-dialog::backdrop { background: rgba(0,0,0,.7); }
.preview-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border); z-index: 1; }
.preview-media { background: #000; }
.preview-media video, .preview-media img { display: block; width: 100%; max-height: 70dvh; object-fit: contain; }
.preview-caption { margin: 0; padding: 12px; white-space: pre-wrap; }
.poll-results { display: flex; flex-direction: column; gap: 10px; }
.poll-result { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--border); border-radius: 10px; }
.poll-result.winner { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.poll-result img { width: 64px; height: 80px; object-fit: cover; border-radius: 6px; }
.poll-result-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.poll-result-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.poll-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--bg); }
.poll-bar .seg { display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; min-width: 18px; }
.seg.great { background: var(--ok); }
.seg.ok { background: var(--accent); }
.seg.bad { background: var(--err); }
.poll-voters { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.poll-voters li p { margin: 2px 0 0; }
a.primary.wa-button { background: #25d366; color: #fff; border-radius: 8px; padding: 10px 18px; text-decoration: none; font-family: var(--font-ui); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
@media (max-width: 800px) {
  .poll-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; gap: 8px; }
}

/* --- Abstimmungsseite (öffentlich) --- */
.vote-page { background: var(--bg); }
.vote-head { display: flex; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: linear-gradient(120deg, var(--brand), var(--brand-dark)); color: #fff; }
.vote-head .brand-logo { width: 48px; height: 48px; }
.vote-head .brand-h1 { font-size: 30px; }
.vote-main { max-width: 640px; margin: 0 auto; padding: 14px 12px calc(30px + env(safe-area-inset-bottom)); }
.vote-main label input, .vote-main label textarea { width: 100%; font-size: 16px; }
.vote-desc { white-space: pre-wrap; }
.vote-option-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.vote-option-head h3 { margin: 0 0 8px; }
.vote-media video, .vote-media img { width: 100%; max-height: 70vh; object-fit: contain; background: #000; border-radius: 8px; display: block; }
.vote-caption { white-space: pre-wrap; font-size: 14px; }
.rate-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.rate { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; min-height: 64px; border-radius: 10px;
  border: 2px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-family: var(--font-ui); font-size: 14px; letter-spacing: .02em; cursor: pointer; }
.rate-emoji { font-size: 24px; line-height: 1; }
.rate[aria-pressed="true"].rate-bad { border-color: var(--err); background: color-mix(in srgb, var(--err) 14%, var(--surface)); }
.rate[aria-pressed="true"].rate-ok { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.rate[aria-pressed="true"].rate-great { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, var(--surface)); }
.vote-option.rated { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.msg.ok { color: var(--ok); font-weight: 600; }
.vote-page .submit-bar { margin: 0 -12px; border-radius: 12px 12px 0 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.vote-page .submit-bar button.primary { flex: 1; min-height: 48px; font-size: 16px; }

/* Hilfe & Vorstellungsvideo */
.help-film { margin-bottom: 16px; }
.help-film .film-video { max-width: 640px; max-height: 360px; }
.film-video { width: 100%; max-height: 70vh; border-radius: 12px; background: #000; display: block; margin: 8px 0 12px; }
.film-main { max-width: 1040px; }
.help-search { display: block; margin-bottom: 10px; }
.help-title { margin-top: 0; }
.help-text { line-height: 1.55; }
.help-steps, .help-list-items { padding-left: 22px; line-height: 1.55; }
.help-steps li, .help-list-items li { margin: 6px 0; }
.help-tips { margin-top: 18px; }
a.button-link { display: inline-flex; align-items: center; text-decoration: none; }

/* Videos */
.tile .video-badge { position: absolute; left: 8px; top: 8px; background: rgba(10, 25, 60, .78); color: #fff; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-family: var(--font-ui); letter-spacing: .04em; pointer-events: none; }
.video-preview { width: 100%; max-height: 420px; background: #000; border-radius: 10px; }

/* Urheber */
.tile-credit { padding: 0 8px 4px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bulk-bar { margin-top: 8px; align-items: center; }
#bulk-tools { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#bulk-tools[hidden] { display: none; }

/* --- Listen mit Detailbereich: Liste bleibt stehen, Speichern-Leiste klebt unten --- */
.back-to-list, .split:not(.show-detail) > .back-to-list { display: none; }
.list-search { display: block; max-width: 420px; margin: 10px 0; }
.row .list-search { margin: 0; }
.detail form > .actions:last-child {
  position: sticky; bottom: 0; z-index: 4; background: var(--surface);
  padding: 12px 0 12px; margin-bottom: -4px; border-top: 1px solid var(--border);
}
.detail[data-dirty="1"] form > .actions:last-child::after { content: "● Ungespeicherte Änderungen"; color: var(--warn); font-size: 13px; }
@media (min-width: 801px) {
  .split:not(.library-split) { align-items: start; }
  .split:not(.library-split) > :first-child {
    position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain;
    padding: 2px 6px 2px 2px; scrollbar-width: thin;
  }
}
@media (max-width: 800px) {
  /* Smartphone: Liste und Details als getrennte Ansichten */
  .split > .detail { display: none; }
  .split.show-detail > .detail { display: block; }
  .split.show-detail > :first-child { display: none; }
  .split.show-detail > .back-to-list { display: inline-flex; justify-self: start; }
  .panel.detail-mode > :not(.split) { display: none; }
  .detail form > .actions:last-child { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .detail form > .actions:last-child button.primary { flex: 1; }
  .detail[data-dirty="1"] form > .actions:last-child::after { flex-basis: 100%; }
}

/* --- Postliste als Kacheln, Post als eigene Seite --- */
.post-filters { margin-top: 0; }
.post-filters > label.grow { flex: 1 1 220px; order: 1; }
.post-filter-selects { display: contents; }
.post-filter-selects > label { flex: 0 1 170px; }
#post-filter-toggle { display: none; }
#post-count { order: 2; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-top: 8px; }
.post-tile {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  color: inherit; text-decoration: none; box-shadow: 0 1px 3px rgb(21 35 59 / .06); transition: transform .12s, box-shadow .12s;
}
.post-tile:hover, .post-tile:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 16px rgb(21 35 59 / .14); }
.post-tile-media { position: relative; aspect-ratio: 4 / 5; background: var(--bg); }
.post-tile-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-tile-empty { height: 100%; display: grid; place-items: center; font-size: 34px; color: var(--muted); }
.post-tile .video-badge { position: absolute; left: 8px; top: 8px; background: rgba(10, 25, 60, .78); color: #fff; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-family: var(--font-ui); letter-spacing: .04em; }
.post-tile-status { position: absolute; left: 8px; right: 8px; bottom: 8px; background: var(--surface); border-radius: 8px; padding: 4px 8px; font-weight: 600; box-shadow: 0 1px 4px rgb(0 0 0 / .18); }
.post-tile-meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.post-tile-meta .title { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row.center { justify-content: center; margin-top: 18px; }
.back-row { margin: 0 0 12px; }
@media (max-width: 800px) {
  /* Smartphone: Suche + „Filter“-Knopf, die Auswahlfelder klappen auf */
  .row.post-filters { align-items: flex-end; }
  .row.post-filters > label.grow { flex: 1 1 0; min-width: 0; }
  #post-filter-toggle { display: inline-flex; order: 1; flex: none; }
  .post-filter-selects { display: none; order: 3; flex-basis: 100%; flex-wrap: wrap; gap: 12px; }
  .post-filter-selects.open { display: flex; }
  .post-filter-selects > label:not(.check) { flex: 1 1 calc(50% - 6px); }
  #post-count { flex-basis: 100%; order: 4; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .post-tile-meta { padding: 8px 9px 10px; }
  .post-tile-meta .small { font-size: 12px; }
}

/* --- Catering: Preislisten --- */
.catering-table { width: 100%; border-collapse: collapse; }
.catering-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 6px; }
.catering-table td { padding: 4px 6px; vertical-align: middle; }
.catering-table input, .catering-table select { width: 100%; }
.catering-table td:last-child { width: 1%; }
.catering-table td:first-child { min-width: 150px; }
.price-input { width: 90px; text-align: right; }
.catering-table .price-input { width: 100%; min-width: 70px; }
.catering-group { margin: 10px 0 14px; }
.catering-group h4 { margin: 0 0 6px; font-size: 15px; }
.catering-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.catering-row .check { flex: 1; }
#catering-detail label.price-field { display: flex; flex-direction: row; align-items: center; gap: 6px; flex: none; }
#catering-detail label.price-field > input.price-input { width: 90px; }
@media (max-width: 800px) {
  .catering-table thead { display: none; }
  .catering-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .catering-table td { padding: 0; min-width: 0 !important; }
  .catering-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .catering-table td:last-child { width: auto; grid-column: 2; justify-self: end; }
}

.check.sub-check { margin-left: 26px; }

/* --- Kalender-Abgleich --- */
.calendar-box { margin: 12px 0; }
.calendar-box > summary { cursor: pointer; padding: 2px 0; }
.calendar-feed { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.calendar-feed-main { min-width: 0; flex: 1 1 260px; }
.calendar-feed-main a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-feed-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.calendar-add { margin-top: 14px; }
.calendar-add h4 { margin: 0; }
.calendar-changes { margin-top: 12px; }
.calendar-changes > div { padding: 3px 0; }

/* --- Spielbericht / Spielverlauf im Detail --- */
.report-upload { margin: 6px 0 12px; }
.report-upload h4 { margin: 0 0 4px; }
.events-box { margin-top: 10px; }
.events { list-style: none; padding: 0; margin: 6px 0 0; max-height: 360px; overflow-y: auto; font-size: 13px; }
.events .ev { display: grid; grid-template-columns: 48px 52px 1fr; gap: 6px; padding: 2px 4px; border-radius: 4px; }
.events .ev.own .ev-x { font-weight: 600; }
.events .ev.opp { color: var(--muted); }
.events .ev:nth-child(odd) { background: var(--bg); }
.ev-t, .ev-s { font-variant-numeric: tabular-nums; }

/* --- Fahrten (Link-Seite und Tool) --- */
.trip-board { display: grid; gap: 10px; }
.trip-info h2 { margin: 0 0 6px; }
.trip-info p { margin: 4px 0; }
.trip-note { white-space: pre-wrap; }
.trip-dir { justify-self: start; }
.trip-hint { margin: 0; }
.trip-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.trip-card.missing { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.trip-card.full { opacity: .92; }
.trip-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 8px; }
.trip-card-actions { margin-left: auto; display: flex; gap: 10px; }
.trip-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.trip-chip { border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: 15px; cursor: pointer; }
.trip-chip.coach { border-style: dashed; }
.trip-chip.inherited { color: var(--muted); }
.trip-chip:disabled { cursor: default; }
.trip-add { justify-self: stretch; min-height: 46px; }
.trip-dialog { border: 0; border-radius: 14px; padding: 16px; width: min(420px, calc(100vw - 24px)); background: var(--surface); color: var(--text); }
.trip-dialog::backdrop { background: rgb(0 0 0 / .45); }
.trip-dialog h3 { margin: 0 0 10px; }
.trip-dialog label { display: block; margin: 8px 0; }
.trip-dialog label input, .trip-dialog label select { width: 100%; font-size: 16px; }
.trip-opts { display: grid; gap: 6px; margin-bottom: 10px; }
.trip-opt { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-size: 16px; text-align: left; cursor: pointer; }
.trip-opt.current { border-color: var(--accent); font-weight: 600; }
.trip-opt:disabled { opacity: .45; cursor: not-allowed; }
.trip-dialog-actions { display: flex; gap: 10px; margin-top: 10px; }
.trip-log { margin-top: 6px; }
.trip-log > div { padding: 2px 0; }
.trip-actor { margin-bottom: 0; }
.trip-link { width: 100%; font-size: 14px; }
.trip-linkbox h4 { margin: 0 0 6px; }

/* --- Mitbringlisten (Link-Seite und Tool) --- */
.pl-intro h2 { margin: 0 0 4px; }
.pl-intro p { margin: 4px 0; }
.pl-note { white-space: pre-wrap; padding: 8px 10px; border-radius: 8px; background: var(--bg); }
.pl-progress { font-weight: 600; color: var(--warn); }
.pl-progress.ok { color: var(--ok); }
.pl-items { display: grid; gap: 8px; margin-bottom: 12px; }
.pl-item { padding: 10px 14px; }
.pl-item.done { opacity: .75; }
.pl-item.mine { border-color: var(--accent); }
.pl-item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 17px; }
.pl-count { font-size: 14px; color: var(--warn); white-space: nowrap; font-weight: 600; }
.pl-count.ok { color: var(--ok); }
.pl-names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pl-name { border: 1px solid var(--border); background: var(--bg); border-radius: 999px; padding: 3px 10px; font-size: 14px; }
.pl-name.mine { border-color: var(--accent); font-weight: 600; }
.pl-name.internal { display: inline-flex; align-items: center; gap: 6px; }
.pl-actions, .pl-form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pl-actions button, .pl-form-actions button { min-height: 42px; }
.pl-form { margin-top: 8px; }
.pl-form label { display: block; }
.pl-form select { font-size: 16px; min-width: 90px; }
.pl-comment { border-top: 1px solid var(--border); padding: 6px 0; }
.pl-comment p { margin: 2px 0 0; white-space: pre-wrap; }
.pl-comment-form { margin-top: 8px; display: grid; gap: 8px; }
.pl-comment-form button { justify-self: start; }
.pl-privacy { margin: 4px 4px 0; }
.pl-badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--warn) 15%, var(--surface)); color: var(--warn); white-space: nowrap; }
.pl-badge.ok { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); }
.pl-badge.none { background: var(--bg); color: var(--muted); }
.pl-table { width: 100%; border-collapse: collapse; }
.pl-table td, .pl-table th { padding: 4px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.pl-table input[type="number"] { width: 64px; }
.pl-table td:first-child { width: 100%; }
.pl-table .pl-names { margin-top: 4px; }
.pl-table input.pl-item-name { width: 100%; }
.pl-wa { width: 100%; font-size: 14px; min-height: 120px; }

/* Erklärvideos in der Hilfe (Hochformat) */
.help-video-box { margin: 12px 0 6px; }
.help-video-box h3 { margin: 0 0 8px; }
#help-detail .help-video { display: block; width: 100%; max-width: 360px; max-height: 70vh; border-radius: 14px; background: #000; }

.film-page .film-video { display: block; width: 100%; max-height: 80vh; background: #000; border-radius: 12px; }

.trip-routes a { font-weight: 500; }

/* Mannschaftskasse */
.cash-season-label { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; }
.cash-season-label select { width: auto; }
.cash-export { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.cash-kpis { margin-top: 14px; }
.cash-list-col .list-search { margin: 0 0 10px; max-width: none; }
.cash-list-col .item-list { margin: 0; }
.cash-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cash-amount.in, .cash-big.in { color: var(--ok); }
.cash-amount.out, .cash-big.out { color: var(--err); }
.cash-item.cancelled { opacity: .6; }
.cash-item.cancelled .title, .cash-big.cancelled { text-decoration: line-through; }
.cash-big { font-family: var(--font-head); font-size: 44px; line-height: 1; margin: 4px 0 10px; font-variant-numeric: tabular-nums; }
.cash-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 8px; }
.cash-facts dt { color: var(--muted); }
.cash-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cash-receipt img { display: block; max-width: 100%; max-height: 60vh; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.cash-table-wrap { overflow-x: auto; }
.cash-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cash-table th, .cash-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.cash-table .num { text-align: right; white-space: nowrap; }
.cash-table .neg { color: var(--err); }
.cash-log { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
@media (max-width: 800px) {
  .cash-export { margin-left: 0; }
  .cash-season-label { display: flex; width: 100%; }
  .cash-season-label select { flex: 1; }
  .cash-kpis .kpi:first-child { grid-column: 1 / -1; }
  .cash-table { font-size: 13px; }
  .cash-table th, .cash-table td { padding: 6px 4px; }
  .cash-table th { font-size: 11px; letter-spacing: 0; }
}

/* Fahrtkosten */
.fund-head h3 { margin-bottom: 2px; }
.fund-kpis { margin: 12px 0; }
.fund-nav { margin: 4px 0 14px; flex-wrap: wrap; }
.fund-calc { margin: 16px 0; padding: 12px 14px; }
.fund-calc h4 { margin: 0 0 6px; }
.fund-items, .fund-people { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.fund-item, .fund-person { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; background: var(--surface); }
.fund-item .title, .fund-person .title { display: block; font-weight: 600; }
.fund-amount { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }
.fund-item-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fund-person { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.fund-person.off { opacity: .6; }
.fund-person-controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fund-person-controls .price-input { width: 90px; }
.dues-table tr.due-open td:first-child { font-weight: 600; }
.fund-money-actions { flex-wrap: wrap; }
.fund-form { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); }
@media (max-width: 800px) {
  .fund-person-controls { width: 100%; }
  .fund-person-controls select { flex: 1; }
}
@media (max-width: 480px) {
  /* „Stand“ steckt auf dem Handy schon in „Offen“ – Spalte ausblenden, damit die Tabelle passt */
  .dues-table th:nth-child(5), .dues-table td:nth-child(5) { display: none; }
}
.dues-table .small-btn { white-space: nowrap; }
.fund-form-new { margin-top: 0; padding-top: 0; border-top: 0; }
.brand-tagline { display: block; font-size: 15px; letter-spacing: .04em; opacity: .85; margin-top: 2px; }

/* --- Hilfe-Knopf in der Kopfzeile --- */
.help-button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .35); background: rgb(255 255 255 / .12); color: #fff;
  font: 600 17px/1 var(--font-ui); cursor: pointer; display: grid; place-items: center; padding: 0; flex: none; }
.help-button:hover { background: rgb(255 255 255 / .22); }

/* --- Smartphone: Platz für die untere Menüleiste --- */
@media (max-width: 800px) {
  .app-shell { --bottom-nav: calc(66px + env(safe-area-inset-bottom)); }
  .app-shell main { padding-bottom: calc(var(--bottom-nav) + 24px); }
  .app-shell .submit-bar, .app-shell .detail form > .actions:last-child { bottom: var(--bottom-nav); }
  .app-shell .submit-bar { padding-bottom: 10px; border-radius: 12px; }
  .app-shell .detail form > .actions:last-child { padding-bottom: 12px; }
  .help-button { min-height: 0; width: 34px; height: 34px; font-size: 17px; }
}

/* Elternliste (Link-Seite und Tool) */
.pa-section { margin-bottom: 10px; }
.parents-page fieldset { border: 1px solid var(--border); min-width: 0; }
.parents-page legend { font-weight: 600; padding: 0 6px; }
.pa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.pa-grid label { display: flex; flex-direction: column; }
.parents-page select { width: 100%; font-size: 16px; }
.pa-known { color: var(--warn); margin: 8px 0 0; }
.pa-add2 { margin: 0 0 10px; }
.vote-main label.pa-consent { display: flex; align-items: flex-start; gap: 10px; }
.vote-main label.pa-consent input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; }
.pa-consent span { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; }
.pa-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .pa-grid { grid-template-columns: 1fr; } }
.pa-badge { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 600; border: 1px solid var(--border); }
.pa-badge.ok { color: var(--ok); border-color: currentColor; }
.pa-badge.pending { color: var(--warn); border-color: currentColor; }
.pa-badge.missing { color: var(--muted); }
.pa-parent { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.pa-parent.pending { border-color: var(--warn); }
.pa-parent-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-weight: 600; }
.pa-contact { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0; }
.pa-contact a { word-break: break-all; }
.pa-kpis { margin-bottom: 8px; }
.parents-page legend .link { margin-left: 8px; }
@media (max-width: 700px) {
  .pa-kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .pa-kpis .kpi { padding: 10px 12px; }
  .pa-kpis .kpi-value { font-size: 30px; }
  .pa-kpis .kpi-label { font-size: 11px; letter-spacing: .04em; }
  .pa-kpis .kpi-hint { display: none; }
}
.pa-editbox { margin-top: 14px; padding: 12px; border: 1px solid var(--accent); border-radius: 10px; }
.pa-editbox h3 { margin: 0 0 4px; }
.pa-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pa-mine-list { margin: 6px 0 0; padding-left: 18px; }
.pa-access { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0; font-size: 14px; }
.pa-invite { border: 1px dashed var(--accent); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.pa-invite p { margin: 2px 0 6px; }
.pa-perm td, .pa-perm th { padding: 4px 6px; text-align: left; }
.pa-perm select { font-size: 14px; min-width: 112px; }
.pa-perm td:first-child strong { font-size: 14px; }
.dash-family .dash-row-title { font-weight: 600; }
.in-submit { width: 100%; min-height: 48px; margin-top: 8px; }
.pa-vcard-list { display: grid; gap: 8px; margin: 10px 0; }
.pa-vcard-list .button-link { text-align: left; }
.fund-collect { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin: 10px 0; min-width: 0; }
.fund-collect legend { font-weight: 600; padding: 0 6px; }
.fund-msg-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; }
.fund-msg-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; border-top: 1px solid var(--border); padding-top: 6px; }
.dues-table tr.due-late td { color: var(--warn); font-weight: 600; }
.claim-rejected { opacity: .65; }
.claim-approved { border-color: var(--warn); }
.settle-checks { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 4px; }
.settle-checks .chk-ok { color: var(--ok); }
.settle-checks .chk-bad { color: var(--warn); font-weight: 600; }
.settle-checks .chk-hint { color: var(--muted); }
.cash-table tr.sum td { font-weight: 700; border-top: 2px solid var(--border); }
.settle-refunds summary { cursor: pointer; font-weight: 600; margin: 8px 0; }

/* Benutzer: Rechte-Übersicht (Matrix) */
.um-controls { align-items: flex-end; }
.um-legend { margin: 4px 0 8px; }
.um-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); max-width: 100%; }
.user-matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.user-matrix th, .user-matrix td { padding: 7px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; text-align: center; }
.user-matrix thead th { position: sticky; top: 0; background: var(--surface); font-family: var(--font-ui); font-weight: 500; font-size: 11px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted); vertical-align: bottom; z-index: 1; }
.user-matrix th.um-area span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); padding-top: 2px; }
.user-matrix .um-name { position: sticky; left: 0; background: var(--surface); text-align: left; z-index: 2; min-width: 150px;
  box-shadow: 1px 0 0 var(--border); }
.user-matrix thead .um-name { z-index: 3; }
.user-matrix td.um-name strong, .user-matrix td.um-name span { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.user-matrix tbody tr { cursor: pointer; }
.user-matrix tbody tr:hover td, .user-matrix tbody tr:focus td { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.user-matrix tbody tr:last-child td { border-bottom: 0; }
.user-matrix .um-seen, .user-matrix .um-tpl { text-align: left; }
.user-matrix .um-seen.stale { color: var(--warn); }
.user-matrix .um-tpl { color: var(--muted); }
.user-matrix .um-tpl.indiv { color: var(--text); font-weight: 600; }
.user-matrix .um-lvl { font-weight: 700; min-width: 30px; }
.user-matrix .um-lvl.lvl-none { color: var(--muted); font-weight: 400; opacity: .6; }
.user-matrix .um-lvl.lvl-view { color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.user-matrix .um-lvl.lvl-edit, .user-matrix .um-lvl.lvl-plan { color: var(--ok); background: color-mix(in srgb, var(--ok) 11%, transparent); }
.user-matrix .um-lvl.lvl-manage { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); }
.user-matrix tr.um-off td { opacity: .55; }
.um-badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); }
.um-badge.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.um-badge.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
@media (max-width: 700px) {
  .user-matrix { font-size: 13px; }
  .user-matrix th, .user-matrix td { padding: 6px 5px; }
  .user-matrix .um-name { min-width: 120px; }
  .user-matrix td.um-name strong, .user-matrix td.um-name span { max-width: 140px; }
}

/* --- Turnier (Turnierbaum Jugendbundesliga) --- */
#tab-tournament .tour-section { margin-top: 8px; }
#tab-tournament h3 small { font-family: system-ui, sans-serif; font-size: 13px; text-transform: none; letter-spacing: 0; }
.tour-card h4 { margin: 0 0 8px; font-family: var(--font-ui); font-weight: 600; font-size: 16px; letter-spacing: .05em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tour-card h5 { margin: 12px 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.tour-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.tour-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
@media (max-width: 1100px) { .tour-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .tour-grid3, .tour-grid2 { grid-template-columns: minmax(0, 1fr); } }
.tour-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.tour-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tour-table th { font-family: var(--font-ui); font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 2px 4px 4px; }
.tour-table td { padding: 4px; border-top: 1px solid var(--border); white-space: nowrap; }
.tour-table .num { text-align: right; color: var(--muted); }
.tour-table td.pts { color: var(--text); font-weight: 700; }
.tour-table td.pl { width: 26px; color: var(--muted); }
.tour-table td.tm { width: 100%; white-space: normal; min-width: 140px; overflow-wrap: anywhere; }
.tour-table td.st { width: 1%; text-align: center; }
.tour-table tr.cut td { border-top: 2px dashed var(--muted); }
.tour-table tr.us td { background: color-mix(in srgb, var(--brand) 16%, transparent); }
.tour-table tr.us td.tm { font-weight: 700; color: var(--accent); }
.tour-team { display: inline-flex; align-items: center; gap: 6px; }
.tour-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.tour-dot.vr1 { background: #2a9d8f; } .tour-dot.vr2 { background: #7b61c9; } .tour-dot.vr3 { background: #c4572e; } .tour-dot.vr4 { background: #1d5fd1; }
.tour-dot.vr5 { background: #c08a12; } .tour-dot.vr6 { background: #b0367a; } .tour-dot.vr7 { background: #3a7d44; } .tour-dot.vr8 { background: #8a5a44; }
.tour-vr { font-size: 11px; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.tour-tb { font-size: 10px; color: var(--muted); margin-left: 6px; text-decoration: none; border: 1px solid var(--border); border-radius: 4px; padding: 0 3px; }
.tour-badge { display: inline-block; font-family: system-ui, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: none; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.tour-badge.fc { background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }
.tour-badge.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); }
.tour-badge.out { color: var(--err); border-color: color-mix(in srgb, var(--err) 45%, transparent); }
.tour-top { margin-top: 4px; }
.tour-steps, .tour-next, .tour-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tour-step { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
.tour-step-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--warn); }
.tour-step.sure .tour-step-icon { background: var(--ok); }
.tour-step.out .tour-step-icon { background: var(--err); }
.tour-plain li.us, .tour-tie-team.us { font-weight: 700; color: var(--accent); }
.tour-tie { border-top: 1px solid var(--border); padding: 8px 0; display: grid; gap: 3px; }
.tour-tie:first-of-type { border-top: 0; }
.tour-tie-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tour-tie-team { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tour-tie-team.win::after { content: "✓"; color: var(--ok); font-weight: 700; }
.tour-seed { font-size: 12px; color: var(--muted); min-width: 24px; }
.tour-notes p { margin: 0 0 6px; }
.tour-log summary { cursor: pointer; font-weight: 600; }
.tour-log ul { margin: 8px 0 0; padding-left: 18px; max-height: 320px; overflow-y: auto; }
.tour-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; margin-bottom: 12px; }
.tour-edit input { width: 100%; min-width: 0; }
.tour-edit td:nth-child(2) input { min-width: 170px; } .tour-edit td:nth-child(3) input { min-width: 220px; }
.tour-edit input.tour-id { width: 90px; } .tour-edit input.tour-grp { width: 60px; } .tour-goal { width: 70px; }
#tour-status .msg { margin-top: 4px; }
@media (max-width: 600px) {
  .tour-table { font-size: 13px; }
  .tour-table td.tm { min-width: 120px; }
}
