/* Öffentliche Seiten. Gestaltung nach den Lehrbüchern: Figtree, weißer Grund,
   Tinte statt Schwarz, feine Linien, Rot als einziger Akzent. Bedeutung tragen
   Wörter und Typografie, keine Farbcodes. Mobile zuerst. */

:root {
  --paper: #ffffff;
  --ink: #1b1e25;
  --ink-soft: #3d424d;
  --muted: #626873;
  --hair: #e4e7ec;
  --rule: #c7ccd4;
  --tint: #f5f6f8;
  --accent: #b3261e;
  --font: "Figtree", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --radius: 8px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
a { color: var(--ink); text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
abbr[title] { text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -80px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; z-index: 50; }
.skip:focus { top: 8px; }
.nowrap { white-space: nowrap; }
.t { font-variant-numeric: tabular-nums; white-space: nowrap; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }

/* ---------- Kopf ---------- */
.masthead { border-bottom: 1px solid var(--hair); }
.masthead-in { display: flex; align-items: center; gap: 16px; min-height: 72px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; flex-direction: column; gap: 1px; margin-right: auto; text-decoration: none; min-width: 0; }
.brand-name { font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.brand-sub { font-size: 14px; color: var(--muted); line-height: 1.35; }
.views { display: none; gap: 4px; }
.view {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--ink-soft); text-decoration: none;
}
.view:hover { background: var(--tint); color: var(--ink); }
.view.is-on { color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }

/* ---------- Bausteine ---------- */
main { padding-top: 24px; padding-bottom: 56px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.head-meta { font-size: 15px; color: var(--muted); white-space: nowrap; }
.empty { color: var(--muted); padding: 16px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #000; }

/* Link „Route“: kompakt im Text, Trefferfläche mindestens 44px hoch. */
.route {
  display: inline-block; padding: 12px 0 12px 12px; margin: -12px 0 -12px -12px;
  font-weight: 600; color: var(--ink); white-space: nowrap;
}

/* ---------- Training ---------- */
.training { display: grid; gap: 28px; }
.next { border: 1px solid var(--rule); border-radius: 12px; padding: 20px 20px 18px; }
.next-day { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; font-size: 30px; font-weight: 700; letter-spacing: -.015em; line-height: 1.15; }
.next-rel { color: var(--accent); }
.next-sessions { margin-top: 14px; display: grid; gap: 8px; }
.next-sessions li { display: grid; grid-template-columns: 7.2em 1fr; gap: 12px; align-items: baseline; font-size: 17px; }
.next-sessions .t { font-weight: 600; }
.next-sessions .what { color: var(--ink-soft); }
.moved { display: block; font-size: 14px; color: var(--muted); }
.next-none { margin-top: 4px; font-size: 17px; color: var(--ink-soft); }
.place { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 15px; }
.place-name { font-weight: 600; }
.place-addr { color: var(--muted); }

.side { display: grid; gap: 28px; align-content: start; }
.times-table { border-collapse: collapse; font-size: 16px; }
.times-table th { text-align: left; font-weight: 700; width: 2.6em; padding: 5px 0; vertical-align: baseline; }
.times-table td { padding: 5px 0; vertical-align: baseline; }
.times-table td.t { padding-right: 18px; }
.times-table tr.newday > * { border-top: 1px solid var(--hair); padding-top: 9px; }
.times-table tr.dim td { color: var(--muted); }
.rules { margin-top: 10px; font-size: 15px; color: var(--ink-soft); display: grid; gap: 2px; }
.notices ul { display: grid; gap: 8px; }
.notices li { display: grid; grid-template-columns: minmax(5.6em, max-content) 1fr; gap: 10px; font-size: 15px; line-height: 1.4; }
.notices .when { font-weight: 700; white-space: nowrap; }

/* ---------- Mannschaftswahl ---------- */
.teams {
  position: sticky; top: 0; z-index: 10;
  margin: 36px calc(-1 * var(--gutter)) 0; padding: 10px 0;
  background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--hair);
  -webkit-backdrop-filter: saturate(1.4) blur(6px); backdrop-filter: saturate(1.4) blur(6px);
}
.teams.static { position: static; margin: 0 calc(-1 * var(--gutter)) 20px; border-bottom: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.teams-scroll {
  display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 2px var(--gutter); scrollbar-width: none; scroll-padding: 0 var(--gutter);
}
.teams-scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 52px; padding: 0 16px;
  border: 1px solid var(--rule); border-radius: 999px;
  font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Spiele ---------- */
.columns { display: grid; gap: 48px; margin-top: 28px; }
.agenda { margin-top: 4px; }
.aday-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-top: 22px; padding-bottom: 6px; border-bottom: 1px solid var(--hair);
  font-size: 15px; font-weight: 700; letter-spacing: .02em;
}
.aday:first-child .aday-head { margin-top: 14px; }
.aday-head .rel { color: var(--accent); font-weight: 700; }
.game { display: grid; grid-template-columns: 3.6em 1fr; gap: 12px; padding: 14px 0 13px; border-bottom: 1px solid var(--hair); }
.alist .game:last-child { border-bottom: 0; }
.g-time { font-size: 17px; font-weight: 600; line-height: 1.35; }
.g-body { min-width: 0; }
.g-meta { display: flex; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); line-height: 1.6; }
.g-team { color: var(--ink); font-weight: 700; }
.g-ha::before { content: "·"; margin-right: 8px; color: var(--rule); }
.g-opp { font-size: 17px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.g-place { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 16px; margin-top: 3px; font-size: 15px; color: var(--muted); line-height: 1.4; }
.g-place .route { font-size: 15px; }
.g-links { display: inline-flex; gap: 0 18px; justify-self: end; }
.g-moved { margin-top: 2px; font-size: 14px; color: var(--muted); }
/* Liga-Link der gewählten Mannschaft: ruhig, Trefferfläche mindestens 44px. */
.league-link { display: inline-flex; align-items: center; min-height: 44px; margin: 2px 0 -6px; font-size: 15px; font-weight: 600; color: var(--ink); }
.more {
  display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 16px;
  border: 1px solid var(--ink); border-radius: var(--radius); font-weight: 600; text-decoration: none;
}
.more:hover { background: var(--tint); }

details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.results, .evmore, .howto { margin-top: 24px; border-top: 1px solid var(--hair); }
.results > summary, .evmore > summary, .howto > summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px;
  font-weight: 600;
}
.results > summary::after, .evmore > summary::after, .howto > summary::after {
  content: ""; width: 8px; height: 8px; margin-right: 4px;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-2px) rotate(45deg); transition: transform .15s ease;
}
details[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.result { display: grid; grid-template-columns: 5.4em 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hair); font-size: 15px; }
.r-date { color: var(--muted); }
.r-body { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.r-score { white-space: nowrap; }
.score { font-weight: 700; }
.verdict { color: var(--muted); }

/* ---------- Vereinstermine ---------- */
.aside { display: grid; gap: 48px; align-content: start; }
.evlist { margin-top: 4px; }
.ev { display: grid; grid-template-columns: 5.6em 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hair); font-size: 16px; line-height: 1.4; }
.ev-date { color: var(--muted); white-space: nowrap; }
.ev.is-key .ev-title { font-weight: 600; }
.ev-flag {
  display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent); white-space: nowrap; vertical-align: 1px;
}
.evmore { margin-top: 0; border-top: 0; }
.evmore .evlist { margin-top: 0; }

/* ---------- Abo ---------- */
.abo-for { margin-top: 14px; font-size: 17px; line-height: 1.45; }
.abo-for [data-abo-text] { font-weight: 600; }
.abo-hint { margin-top: 6px; font-size: 15px; color: var(--muted); }
.abo-actions { display: grid; gap: 10px; margin-top: 16px; }
.abo-url { margin-top: 10px; }
.abo-url code { font: 13px/1.4 ui-monospace, "SF Mono", Menlo, monospace; color: var(--muted); overflow-wrap: anywhere; }
.copied { min-height: 1.4em; margin-top: 4px; font-size: 15px; font-weight: 600; }
.howto { margin-top: 8px; }
.howto dl { margin: 0 0 8px; font-size: 15px; }
.howto dt { font-weight: 700; margin-top: 10px; }
.howto dd { margin: 2px 0 0; color: var(--ink-soft); }
.howto p { font-size: 15px; color: var(--muted); margin: 10px 0 16px; }

/* ---------- Fuß ---------- */
.foot { border-top: 1px solid var(--hair); }
.foot-in { padding-top: 12px; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--ink-soft); }
.foot-note { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ---------- Rechtliches ---------- */
.legal { max-width: 68ch; padding-top: 8px; }
.legal h1 { font-size: 30px; font-weight: 700; letter-spacing: -.015em; margin-bottom: 16px; }
.legal p { margin-bottom: 14px; font-size: 17px; line-height: 1.6; }
.pending-tag {
  display: inline-block; padding: 4px 10px; border: 1px solid var(--accent); border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent);
}
.legal .back { margin-top: 28px; font-size: 16px; }

/* ---------- Monat ---------- */
.month-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.month-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -.015em; }
.month-nav { display: flex; gap: 8px; }
.month-nav .btn { min-width: 48px; padding: 0 14px; }
.mcal { width: 100%; border-collapse: collapse; }
.mcal thead { display: none; }
.mcal tr, .mcal td { display: block; }
.mcal td { padding: 12px 0; border-bottom: 1px solid var(--hair); }
.mcal td.empty, .mcal td.freeonly { display: none; }
.mday-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; font-weight: 700; }
.mday-d { display: none; }
.mday-today { font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.mcal p { font-size: 15px; line-height: 1.4; padding: 2px 0; }
.mcal .t { display: inline-block; min-width: 3.1em; font-weight: 600; }
.m-free { color: var(--muted); font-style: italic; }
.m-ev { font-weight: 600; }
.m-sub { color: var(--muted); }
.month-foot { margin-top: 24px; }

/* ---------- ab Tablet ---------- */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .brand { flex-direction: row; align-items: baseline; gap: 14px; }
  .brand-name { font-size: 24px; }
  .brand-sub { font-size: 15px; }
  main { padding-top: 36px; }
  .next { padding: 26px 28px 22px; }
  .next-day { font-size: 36px; }
  .abo-actions { display: flex; flex-wrap: wrap; }
  .foot-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .foot-note { margin-top: 0; }
}

/* ---------- ab Desktop ---------- */
@media (min-width: 960px) {
  .views { display: flex; }
  .side { padding-top: 27px; }
  .training { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .teams { margin: 44px 0 0; padding: 12px 0; }
  .teams-scroll { padding: 2px 0; flex-wrap: wrap; overflow: visible; }
  .teams.static { margin: 0 0 24px; }
  .columns { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; margin-top: 36px; }

  .mcal { table-layout: fixed; }
  .mcal thead { display: table-header-group; }
  .mcal tr { display: table-row; }
  .mcal td, .mcal td.empty, .mcal td.freeonly { display: table-cell; }
  .mcal th { padding: 8px 8px; text-align: left; font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); }
  .mcal td { height: 118px; padding: 8px 8px 10px; vertical-align: top; border: 1px solid var(--hair); border-top: 0; }
  .mcal td:first-child { border-left: 0; }
  .mcal td:last-child { border-right: 0; }
  .mcal td.out { background: var(--tint); }
  .mcal td.out .mday-d { color: var(--muted); font-weight: 500; }
  .mcal td.out > p { display: none; }
  .mday-wd { display: none; }
  .mday-d { display: inline; font-size: 15px; }
  .mcal td.today .mday-d { color: var(--accent); }
  .mcal p { font-size: 13.5px; line-height: 1.35; padding: 1px 0; }
  .mcal .t { min-width: 2.9em; }
}

/* Monat: Gegner nur auf dem Handy ausgeschrieben, in der Tabelle als Titel. */
@media (min-width: 960px) {
  .m-opp { display: none; }
}
