:root {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --surface-2: #f0f2ee;
  --line: #d9ddd5;
  --text: #1c2420;
  --muted: #5d6963;
  --accent: #17694f;
  --accent-text: #ffffff;
  --accent-soft: #e2f0ea;
  --warn: #9a5b00;
  --warn-soft: #fdf1d8;
  --danger: #b3261e;
  --danger-soft: #fbe6e4;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 2px 8px rgba(20, 30, 25, .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #131714;
    --surface: #1b211d;
    --surface-2: #232a25;
    --line: #333d36;
    --text: #e8ece8;
    --muted: #9aa69f;
    --accent: #58c09d;
    --accent-text: #0c1a14;
    --accent-soft: #1e352c;
    --warn: #e9b55b;
    --warn-soft: #3a2e14;
    --danger: #f08a82;
    --danger-soft: #3d1f1c;
    --shadow: none;
  }
}
:root[data-theme=dark] {
    --bg: #131714;
    --surface: #1b211d;
    --surface-2: #232a25;
    --line: #333d36;
    --text: #e8ece8;
    --muted: #9aa69f;
    --accent: #58c09d;
    --accent-text: #0c1a14;
    --accent-soft: #1e352c;
    --warn: #e9b55b;
    --warn-soft: #3a2e14;
    --danger: #f08a82;
    --danger-soft: #3d1f1c;
    --shadow: none;
  }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
h1, h2, h3 { line-height: 1.25; margin: 0; text-wrap: balance; }
h1 { font-size: 1.15rem; font-weight: 650; }
h2 { font-size: 1.25rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.loading { padding: 3rem 1rem; text-align: center; color: var(--muted); }

/* Kopfzeile */
.topbar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .7rem 1.25rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: .6rem; }
.brand-logo { width: 30px; height: 30px; flex: none; display: block; }
.brand-logo.on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .brand-logo.on-light { display: none; }
  :root:not([data-theme=light]) .brand-logo.on-dark { display: block; }
}
:root[data-theme=dark] .brand-logo.on-light { display: none; }
:root[data-theme=dark] .brand-logo.on-dark { display: block; }
.topbar .spacer { flex: 1; }
.status { font-size: .87rem; color: var(--muted); }
.status.error { color: var(--danger); }

.page { max-width: 1080px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.page-head { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head .spacer { flex: 1; }

/* Flächen */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.25rem; margin-bottom: 1rem;
}
.card > h3 { margin-bottom: .2rem; }
.card > .hint { color: var(--muted); font-size: .9rem; margin-bottom: .9rem; }

/* Formulare */
label.field { display: flex; flex-direction: column; gap: .25rem; font-size: .87rem; color: var(--muted); }
label.field > span { font-weight: 550; }
input, select, button { font: inherit; color: inherit; }
input[type=text], input[type=email], input[type=url], input[type=password], input[type=date], input[type=time], input[type=number], select {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: .45rem .6rem; min-height: 2.3rem; color: var(--text); max-width: 100%;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
input[type=number] { width: 6rem; }
.grid { display: grid; gap: .9rem 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.check { display: flex; gap: .55rem; align-items: flex-start; color: var(--text); font-size: .95rem; }
.check input { margin-top: .3rem; }
.radio-set { display: grid; gap: .5rem; }

button, .btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 6px;
  padding: .45rem .85rem; min-height: 2.3rem; cursor: pointer; font-weight: 550; white-space: nowrap;
}
button:hover:not(:disabled) { background: var(--surface-2); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary, a.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.privacy-text p { margin: 0 0 .7rem; }
textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .45rem .6rem; max-width: 100%; box-sizing: border-box; }
button.primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.08); }
button.danger { color: var(--danger); }
button.quiet { border-color: transparent; background: transparent; padding: .3rem .5rem; min-height: 2rem; }
button.quiet:hover:not(:disabled) { background: var(--surface-2); }
button.small { padding: .25rem .6rem; min-height: 1.9rem; font-size: .87rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* Reiter */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs button {
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none;
  padding: .6rem .9rem; color: var(--muted);
}
.tabs button[aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { font-weight: 400; color: var(--muted); margin-left: .3rem; }

/* Zeilenlisten (Zeiträume, Regeln) */
.rows { display: grid; gap: .5rem; margin-bottom: .6rem; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row .grow { flex: 1 1 10rem; min-width: 8rem; }
.row .sep { color: var(--muted); }
.empty { color: var(--muted); font-size: .9rem; margin-bottom: .6rem; }

/* Serienliste */
.season-list { display: grid; gap: .6rem; }
.season-item { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.season-item .info { flex: 1 1 16rem; }
.season-item .name { font-weight: 650; font-size: 1.02rem; }

/* Mannschaften */
.teams-layout { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; align-items: start; }
.team-nav { display: grid; gap: .3rem; }
.team-nav button.team {
  display: flex; justify-content: space-between; gap: .5rem; text-align: left; white-space: normal;
  border-color: transparent; background: transparent; font-weight: 500;
}
.team-nav button.team:hover { background: var(--surface-2); }
.team-nav button.team[aria-current=true] { background: var(--accent-soft); border-color: var(--accent); }
.team-nav .n { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
details.dates summary { cursor: pointer; color: var(--accent); font-weight: 550; }
.date-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .6rem; }
.chip {
  display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .82rem;
  background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.chip.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.chip.danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }

/* Hinweise */
.notice { border-radius: var(--radius); padding: .7rem .9rem; margin-bottom: 1rem; font-size: .93rem; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.danger { background: var(--danger-soft); color: var(--danger); }
.notice.info { background: var(--accent-soft); color: var(--text); }
/* Veröffentlichen: Zustand des Spielplans mit den Schaltflächen daneben */
.notice.publish { color: var(--text); }
.notice.publish.warn strong { color: var(--warn); }
.notice.publish .row { gap: .5rem .75rem; }
.notice.publish .grow { flex: 1 1 18rem; }
#home-summary .notice { margin-bottom: .6rem; }
.notice ul { margin: .3rem 0 0; padding-left: 1.2rem; }

/* Spielplan */
.plan-head { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.plan-head .spacer { flex: 1; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-bottom: 1rem; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .1s linear; }
/* Spielplan (seit 8.3): Spieltage mit Datumskachel, Monatsüberschriften, gespielte Tage blasser */
.day { margin-bottom: 1.1rem; }
.day > h3 { margin-bottom: .45rem; font-variant-numeric: tabular-nums; }
.month-head { display: flex; align-items: center; gap: .8rem; margin: 2.2rem 0 1rem; font-size: 1.05rem; letter-spacing: .01em; }
.month-head::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
section.day[data-date] { display: grid; grid-template-columns: 4.4rem minmax(0, 1fr); gap: 1.1rem; margin-bottom: 1.9rem; }
.day-date { position: sticky; top: .8rem; align-self: start; display: flex; flex-direction: column; align-items: center; padding: .5rem .2rem .55rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); line-height: 1.15; }
.day-date .wd { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.day-date .dn { font-size: 1.65rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.day-date .mo { font-size: .78rem; color: var(--muted); }
.day.next .day-date { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.day.next .day-date .wd, .day.next .day-date .mo { color: inherit; opacity: .85; }
.day-title { display: flex; align-items: center; gap: .6rem; margin: .15rem 0 .6rem; font-size: 1rem; font-variant-numeric: tabular-nums; }
.day.past { opacity: .5; transition: opacity .15s; }
.day.past:hover, .day.past:focus-within { opacity: .85; }
.day.past .day-date { background: var(--surface-2); box-shadow: none; }
.past-toggle { margin: 1.2rem 0 .4rem; }
.event { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .75rem; overflow: hidden; box-shadow: var(--shadow); }
.event-head { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: .65rem 1rem; background: var(--surface-2); font-size: .9rem; }
.event-head strong { font-size: .95rem; }
.event-head .grow { flex: 1; }
.game { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; padding: .6rem 1rem; border-top: 1px solid var(--line); }
.game .round { color: var(--text); font-size: .85rem; font-weight: 600; width: 3.6rem; flex: none; font-variant-numeric: tabular-nums; }
.game .actions button:not(.primary) { background: transparent; border-color: transparent; color: var(--muted); }
.game .actions button:not(.primary):hover, .game .actions button:not(.primary):focus-visible { border-color: var(--line); color: var(--text); }
.game .actions button.unread { color: var(--accent); }
@media (max-width: 640px) {
  section.day[data-date] { grid-template-columns: 1fr; gap: .4rem; }
  .day-date { position: static; flex-direction: row; gap: .4rem; align-self: start; padding: .3rem .7rem; }
  .day-date .dn { font-size: 1.1rem; }
}
@media print {
  .day.past { opacity: 1; }
  .day-date { position: static; box-shadow: none; }
}
.game .pair { flex: 1 1 14rem; font-weight: 550; }
.game .pair .vs { color: var(--muted); font-weight: 400; margin: 0 .35rem; }
.game .issues { flex-basis: 100%; color: var(--danger); font-size: .87rem; }
.game.unplanned .reason { flex-basis: 100%; color: var(--muted); font-size: .87rem; }
table.stats { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.stats th, table.stats td { text-align: right; padding: .35rem .5rem; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.stats th:first-child, table.stats td:first-child { text-align: left; }
table.stats th { color: var(--muted); font-weight: 550; font-size: .85rem; }
.table-wrap { overflow-x: auto; }

.print-only { display: none; }
h4 { font-size: .95rem; margin: 1.2rem 0 .2rem; }
.copy-row input { flex: 1 1 14rem; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; }
.card a { color: var(--accent); }

/* Sprachumschalter, Benutzer */
select.lang { min-height: 2rem; padding: .25rem .4rem; font-size: .87rem; }
.row .grow > input { width: 100%; }
table.users td { vertical-align: top; text-align: left; }
table.users th { text-align: left; }
table.users td:last-child { text-align: right; }
table.users .actions { justify-content: flex-end; }
table.mail-log td, table.mail-log th { text-align: left; vertical-align: top; }
table.mail-log td .small { max-width: 32rem; overflow-wrap: anywhere; }
#mail-smtp .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.login a { color: var(--accent); }

/* Anmeldung */
.login { max-width: 380px; margin: 12vh auto 0; padding: 0 1.25rem; }
.login .card { padding: 1.5rem; }
.login form { display: grid; gap: .9rem; margin-top: 1rem; }

/* Dialog */
.modal-back { position: fixed; inset: 0; background: rgba(10, 15, 12, .5); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 1rem 1rem; z-index: 20; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 10px; border: 1px solid var(--line); width: 100%; max-width: 520px; padding: 1.25rem; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.modal h3 { margin-bottom: .75rem; }
.modal .actions { margin-top: 1.1rem; justify-content: flex-end; }
.modal select { width: 100%; }
.modal .row input[type=text] { flex: 1 1 100%; width: 100%; }
.modal form { display: grid; gap: .8rem; }

@media (max-width: 760px) {
  .teams-layout { grid-template-columns: 1fr; }
  .team-nav { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .page { padding: 1rem .9rem 3rem; }
  .topbar { padding: .6rem .9rem; gap: .5rem; }
  .topbar .user-email { display: none; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f2f2f2; --line: #bbb; --text: #000; --muted: #444; --shadow: none; }
  .topbar, .tabs, .no-print, button, .progress { display: none !important; }
  .page { max-width: none; padding: 0; }
  .print-only { display: block; margin-bottom: 1rem; }
  .event, .day { break-inside: avoid; }
  body { font-size: 11pt; }
}

/* Verlegungsanfragen (seit 7.0) */
#requests .request { border-top: 1px solid var(--line); padding: .7rem 0; display: flex; flex-direction: column; gap: .25rem; }
#requests .request:first-of-type { border-top: 0; }
.tabs .count.attention { background: var(--danger); color: #fff; border-radius: 999px; padding: 0 .45rem; margin-left: .35rem; font-weight: 650; }
.modal:has(#import-preview), .modal:has(#export-cols) { max-width: min(980px, 96vw); width: 100%; }
#import-map select, #export-cols select { min-width: 10rem; }
#export-cols .row { flex-wrap: nowrap; align-items: center; gap: .4rem; }
#export-cols .row select { width: 13rem; flex: 0 0 13rem; }
@media (max-width: 640px) { #export-cols .row { flex-wrap: wrap; } #export-cols .row select { width: 100%; flex: 1 1 100%; } }
.issues-chips .chip + .chip { margin-left: .3rem; }
.half-head { margin: 1.6rem 0 .7rem; font-size: 1.05rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding-bottom: .3rem; }
.history { list-style: none; padding: 0; margin: .4rem 0 1rem; max-height: 60vh; overflow: auto; }
.history li { border-left: 3px solid var(--line); padding: .35rem 0 .45rem .7rem; margin-bottom: .35rem; }
.history li[data-action=approve], .history li[data-action=publish] { border-left-color: var(--accent); }
.history li[data-action=reject], .history li[data-action=decline], .history li[data-action=void] { border-left-color: var(--danger); }
/* Bezahlung (seit 8.0) */
.license-box { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.license-box .grow { flex: 1 1 18rem; }
fieldset.locked { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.locked .card, fieldset.locked .day { opacity: .8; }
#webhook-url { word-break: break-all; }
/* Nachrichten je Spiel (seit 8.2) */
.messages { list-style: none; padding: 0; margin: .4rem 0 1rem; max-height: 50vh; overflow: auto; }
.messages li { border: 1px solid var(--line); border-radius: 8px; padding: .45rem .65rem; margin-bottom: .45rem; }
.messages li.mine { border-color: var(--accent); }
.messages li.empty { border-style: dashed; color: var(--muted); }
.messages .body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .2rem; }
button.unread { font-weight: 600; }
button .count { margin-left: .35rem; }
.messages .row { flex-wrap: nowrap; gap: .5rem; align-items: baseline; }

/* Farbkonzept nach dem Logo (seit 8.3): Marineblau = Marke und Bedienung,
   Orange = Aufmerksamkeit (nächster Spieltag, Ungelesenes), Grün = erledigt/veröffentlicht */
:root {
  --bg: #f5f6f9;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --line: #d8dee8;
  --text: #14213d;
  --muted: #5a6478;
  --accent: #14213d;
  --accent-text: #ffffff;
  --accent-soft: #e6eaf2;
  --hl: #f26b1d;
  --hl-text: #b4470b;
  --hl-soft: #fdebdd;
  --ok: #1f7a4d;
  --ok-soft: #e3f2ea;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 2px 8px rgba(20, 33, 61, .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #0d1424;
    --surface: #141d31;
    --surface-2: #1b263e;
    --line: #2a3652;
    --text: #e8ecf3;
    --muted: #9aa6bd;
    --accent: #a9bceb;
    --accent-text: #0d1424;
    --accent-soft: #22304e;
    --hl: #ff8a4c;
    --hl-text: #ff9b63;
    --hl-soft: #3a2416;
    --ok: #5cc795;
    --ok-soft: #173326;
  }
}
:root[data-theme=dark] {
    --bg: #0d1424;
    --surface: #141d31;
    --surface-2: #1b263e;
    --line: #2a3652;
    --text: #e8ecf3;
    --muted: #9aa6bd;
    --accent: #a9bceb;
    --accent-text: #0d1424;
    --accent-soft: #22304e;
    --hl: #ff8a4c;
    --hl-text: #ff9b63;
    --hl-soft: #3a2416;
    --ok: #5cc795;
    --ok-soft: #173326;
  }
.notice.info { background: var(--ok-soft); }
.chip.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.chip.hl { background: var(--hl-soft); border-color: transparent; color: var(--hl-text); }
.day.next .day-date { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: inset 0 4px 0 var(--hl), var(--shadow); }
.count.attention { background: var(--hl); color: #fff; }
.game .actions button.unread { color: var(--hl-text); }
/* Menü-Knopf (seit 8.3), z. B. Export */
details.menu { position: relative; display: inline-block; }
details.menu > summary { list-style: none; display: inline-flex; align-items: center; gap: .4rem; color: var(--text); }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary .caret { font-size: .75rem; color: var(--muted); transition: transform .15s; }
details.menu[open] > summary { background: var(--surface-2); }

.menu-list { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 20; min-width: 15rem; display: flex; flex-direction: column;
  padding: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(20, 33, 61, .14); }
.menu-list button { border: 0; background: transparent; text-align: left; font-weight: 500; border-radius: 6px; }
.menu-list button:hover:not(:disabled), .menu-list button:focus-visible { background: var(--surface-2); }
@media (max-width: 640px) {
  .menu-list { right: auto; left: 0; }
  /* Handy: das Datum steht in der Überschrift, die Kachel entfällt; Knöpfe in eigener Zeile */
  .day-date { display: none; }
  .game { column-gap: .5rem; }
  .game .pair { flex: 1 1 calc(100% - 4.4rem); }
}

/* Hell/dunkel per Schalter (seit 8.5); ohne Wahl gilt das Gerät */
:root[data-theme=dark] { color-scheme: dark; }
:root[data-theme=light] { color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { color-scheme: dark; } }
.theme-switch { padding: .25rem; min-height: 2rem; border-color: transparent; background: transparent; }
.theme-track { display: inline-flex; align-items: center; width: 2.6rem; height: 1.45rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); padding: 2px; transition: background .2s; }
.theme-thumb { display: inline-flex; align-items: center; justify-content: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--surface); color: var(--hl-text); font-size: .75rem; line-height: 1; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.theme-switch[aria-checked=true] .theme-track { background: var(--accent-soft); }
.theme-switch[aria-checked=true] .theme-thumb { transform: translateX(1.12rem); color: var(--accent); }

/* Nachrichten (seit 8.5): Verlauf mit Sprechblasen, rechts als Leiste oder unter dem Spiel */
.thread { list-style: none; margin: 0; padding: .2rem 0; display: flex; flex-direction: column; gap: .75rem; }
.thread .msg { max-width: 82%; align-self: flex-start; }
.thread .msg.mine { align-self: flex-end; }
.thread .bubble { background: var(--surface-2); border-radius: 14px 14px 14px 4px; padding: .6rem .85rem; font-size: 1rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.thread .msg.mine .bubble { background: var(--accent-soft); border-radius: 14px 14px 4px 14px; }
.thread .msg.deleted .bubble { background: transparent; border: 1px dashed var(--line); color: var(--muted); font-style: italic; font-size: .9rem; }
.thread .meta { font-size: .76rem; color: var(--muted); margin: .25rem .3rem 0; }
.thread .msg.mine .meta { text-align: right; }
.thread .empty { color: var(--muted); font-size: .9rem; border: 1px dashed var(--line); border-radius: 10px; padding: .7rem .9rem; }
button.linklike { border: 0; background: none; padding: 0; min-height: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
button.linklike:hover { color: var(--danger); background: none; }
.composer { display: flex; gap: .6rem; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 2.6rem; resize: vertical; border-radius: 10px; }
.thread-panel h3 { margin: 0; font-size: 1.05rem; }
.thread-panel .side-head .row { align-items: center; }
.thread-panel .side-head > .muted { margin-top: .15rem; }
.game.selected { box-shadow: inset 4px 0 0 var(--hl); background: var(--hl-soft); }
button.open { color: var(--hl-text); }
/* unter dem Spiel (schmale Fenster) */
.thread-panel.inline { border-top: 1px solid var(--line); background: var(--bg); padding: .9rem 1rem 1rem; }
.thread-panel.inline .side-body { margin: .8rem 0; }
/* rechts als Leiste (ab 1280 px) */
body.has-side main.page { max-width: none; margin: 0 calc(max(30vw, 360px) + 1.5rem) 0 1.5rem; }
aside.side-panel { position: fixed; right: 0; top: var(--topbar-h, 57px); bottom: 0; width: 30vw; min-width: 360px; background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: -6px 0 24px rgba(20, 33, 61, .08); z-index: 5; }
aside.side-panel .thread-panel { display: flex; flex-direction: column; height: 100%; }
aside.side-panel .side-head { padding: 1rem 1.2rem .8rem; border-bottom: 1px solid var(--line); }
aside.side-panel .side-body { flex: 1; overflow: auto; padding: 1rem 1.2rem; }
aside.side-panel .side-foot { padding: .8rem 1.2rem 1rem; border-top: 1px solid var(--line); }
@media print { aside.side-panel { display: none; } body.has-side main.page { margin: 0 auto; } }
.thread-panel .side-head .row { flex-wrap: nowrap; }
.thread-panel .side-head h3 { min-width: 0; overflow-wrap: anywhere; }
.game button .count, .event-head button .count { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .75rem; line-height: 1.3rem; text-align: center; }
.game button .count.attention, .event-head button .count.attention { background: var(--hl); color: #fff; }

/* Übersicht der Mannschaften (seit 8.6) */
.team-item .status-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.team-item .next-match { margin-top: .4rem; }
.team-item .actions button { min-width: 7.5rem; }
