/* Vereinsportal – Apple-inspired design system */

:root {
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --card-2: #F2F2F7;
  --label: #000000;
  --label-2: rgba(60, 60, 67, .62);
  --label-3: rgba(60, 60, 67, .32);
  --sep: rgba(60, 60, 67, .2);
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .2);
  --tint: #007AFF;
  --green: #34C759;
  --orange: #FF9500;
  --red: #FF3B30;
  --teal: #30B0C7;
  --material: rgba(242, 242, 247, .72);
  --material-edge: rgba(255, 255, 255, .55);
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-l: 0 10px 40px rgba(0, 0, 0, .14), 0 2px 8px rgba(0, 0, 0, .06);
  --radius: 14px;
  --nav-h: 44px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  /* Critically damped feel for CSS-driven transitions */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.32, .72, 0, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1C1C1E;
    --card-2: #2C2C2E;
    --label: #FFFFFF;
    --label-2: rgba(235, 235, 245, .62);
    --label-3: rgba(235, 235, 245, .3);
    --sep: rgba(84, 84, 88, .6);
    --fill: rgba(118, 118, 128, .24);
    --fill-2: rgba(118, 118, 128, .36);
    --tint: #0A84FF;
    --green: #30D158;
    --orange: #FF9F0A;
    --red: #FF453A;
    --teal: #40C8E0;
    --material: rgba(18, 18, 20, .72);
    --material-edge: rgba(255, 255, 255, .08);
    --shadow-s: 0 0 0 1px rgba(255, 255, 255, .04);
    --shadow-l: 0 10px 40px rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + var(--safe-t) + 56px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 400 1.0625rem/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-optical-sizing: auto;
  min-height: 100dvh;
}

img, svg { display: block; }
a { color: var(--tint); text-decoration: none; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--tint) 55%, transparent); outline-offset: 2px; border-radius: 8px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--card); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 12px; }

/* ---------- Navigation bar (translucent material, large-title collapse) ---------- */

.navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  padding-top: var(--safe-t);
  transition: background-color .25s ease, -webkit-backdrop-filter .25s ease, backdrop-filter .25s ease, box-shadow .25s ease;
}
.navbar-inner {
  height: var(--nav-h);
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.navbar-title {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -.022em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .3s var(--ease-out);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65%;
}
.nav-back { position: absolute; left: var(--gutter); display: flex; align-items: center; gap: 4px; font-size: 1.0625rem; }
.nav-back svg { width: 12px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

body.is-scrolled .navbar {
  background: var(--material);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 .5px 0 var(--sep);
}
body.is-scrolled .navbar-title { opacity: 1; transform: none; }

/* ---------- Page ---------- */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + var(--safe-t)) var(--gutter) calc(140px + var(--safe-b));
}

.large-title {
  font-size: clamp(1.625rem, 7.4vw, 2.125rem); /* shrinks on narrow phones so long venue names stay on one line */
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.026em;
  margin: 4px 0 6px;
}
.lead { margin: 0 0 16px; color: var(--label-2); font-size: 1.0625rem; line-height: 1.4; max-width: 46em; }

.section-title {
  font-size: 1.375rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.022em;
  margin: 32px 0 10px;
}

.notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--orange) 16%, transparent);
  color: color-mix(in srgb, var(--orange) 70%, var(--label));
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: -.005em;
}
.notice-info { background: color-mix(in srgb, var(--tint) 14%, transparent); color: color-mix(in srgb, var(--tint) 70%, var(--label)); }
.notice-info .notice-dot { background: var(--tint); }
.notice-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }

.title-eyebrow {
  margin: 10px 0 0;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--label-2);
}
.title-eyebrow + .large-title { margin-top: 0; }
.title-eyebrow + .hero { margin-top: 8px; }

/* Home hero: club logos on a soft field of the clubs' colours */
.hero {
  position: relative;
  margin: 14px 0 0;
  padding: 26px 20px 22px;
  border-radius: 24px;
  background: var(--glow), var(--card);
  box-shadow: var(--shadow-s);
  text-align: center;
  overflow: hidden;
}
.hero-title {
  margin: 0 0 20px;
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em; /* all caps need a little air */
}
.hero-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.hero-logos img { flex: 0 0 auto; width: clamp(60px, 19vw, 76px) !important; }
.hero-logos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  /* App-icon tile: rounded square + even inset, so round badges and shields both sit uncropped
     (fixed padding: in a flex row a % padding would refer to the whole row width) */
  padding: clamp(8px, 2.4vw, 10px);
  border-radius: 23%;
  background: #fff;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .08), 0 6px 18px rgba(0, 0, 0, .1);
  animation: logo-in .7s var(--ease-spring) both;
  animation-delay: calc(var(--i, 0) * 60ms + 80ms);
}
@keyframes logo-in {
  from { opacity: 0; transform: translateY(10px) scale(.8); }
}
.hero-claim {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 0;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--label);
  white-space: nowrap;
}
/* hairlines left and right, like an engraved divider */
.hero-claim::before, .hero-claim::after { content: ""; flex: 1; height: .5px; background: var(--label-3); }
.hero-claim .dot { color: var(--label-3); letter-spacing: 0; }
.hero-eyebrow {
  margin: 0 0 4px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--label-2);
}
@media (max-width: 400px) {
  .hero { padding-left: 14px; padding-right: 14px; }
  .hero-title { font-size: 1.75rem; }
}
@media (min-width: 900px) {
  .hero { padding: 36px 32px 30px; }
  .hero-title { font-size: 2.75rem; }
}

/* ---------- Inset grouped list ---------- */

.list { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-s); }
.list-spaced { margin-top: 12px; }
.list > li { position: relative; }
.list > li + li::before {
  content: "";
  position: absolute;
  top: 0; right: 0; left: 60px;
  border-top: .5px solid var(--sep);
}
.list > li.contact + li::before, .list.plain > li + li::before { left: 16px; }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 10px 16px;
  color: var(--label);
  transition: background-color .35s ease;
}
a.row:active, button.row:active { background: var(--fill-2); transition: none; }
@media (hover: hover) { a.row:hover { background: var(--fill); } }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-text strong { font-weight: 400; font-size: 1.0625rem; letter-spacing: -.016em; }
.row-text small { font-size: .875rem; color: var(--label-2); letter-spacing: -.006em; line-height: 1.3; }
.row-text .tabular { font-variant-numeric: tabular-nums; }
.row-text .eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--label-2); }
.row-icon { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.row-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tint-green { background: var(--green); }
.tint-blue { background: var(--tint); }
.tint-orange { background: var(--orange); }
.tint-teal { background: var(--teal); }
.tint-gray { background: #8E8E93; }
.tint-red { background: var(--red); }
.chev { flex: none; width: 8px; height: 8px; border-right: 2px solid var(--label-3); border-top: 2px solid var(--label-3); transform: rotate(45deg); margin-right: 4px; }
.ext { color: var(--label-3); font-weight: 600; }

.row-actions { display: flex; gap: 8px; flex: none; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--fill); color: var(--tint);
  transition: transform .3s var(--ease-spring), background-color .3s ease;
}
.icon-btn:active { transform: scale(.88); background: var(--fill-2); transition-duration: 0s; }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons, chips, search ---------- */

.btn-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 6px 16px; border: 0; border-radius: 999px;
  background: var(--tint); color: #fff; font-weight: 600; font-size: .9375rem; cursor: pointer;
  transition: transform .35s var(--ease-spring), opacity .2s;
}
.btn-pill:active { transform: scale(.95); opacity: .85; transition-duration: 0s; }
.link { background: none; border: 0; padding: 0; color: var(--tint); cursor: pointer; }

.legend { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 32px; padding: 5px 12px 5px 10px;
  border: 0; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow-s);
  font-size: .875rem; font-weight: 500; cursor: pointer;
  transition: background-color .25s ease, color .25s ease, transform .35s var(--ease-spring);
}
.chip:active { transform: scale(.94); transition-duration: 0s, 0s, 0s; }
.chip[aria-pressed="true"] { background: var(--label); color: var(--bg); }
.swatch { width: 12px; height: 12px; border-radius: 50%; background: var(--club); box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35); flex: none; }

.search { position: relative; margin: 0 0 12px; }
.search svg { position: absolute; left: 10px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; fill: none; stroke: var(--label-2); stroke-width: 2; stroke-linecap: round; }
.search input {
  width: 100%; height: 38px; padding: 0 12px 0 36px;
  border: 0; border-radius: 11px; background: var(--fill); color: var(--label);
  font: inherit; font-size: 1.0625rem; outline: none;
}
.search input::placeholder { color: var(--label-2); }
.search input:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tint) 40%, transparent); }

/* ---------- Segmented control + day pager ---------- */

.segmented-wrap {
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 10px;
}
.segmented {
  --pos: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--count), 1fr);
  padding: 4px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-s);
  touch-action: pan-y;
}
/* Week strip (like the iOS Calendar): weekday above the date, a filled pill marks the selected day
   and follows the swipe 1:1 */
.segmented-thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / var(--count));
  border-radius: 14px;
  background: var(--label);
  transform: translateX(calc(var(--pos) * 100%));
  will-change: transform;
  transition: background-color .25s ease;
}
.segmented.on-today .segmented-thumb { background: var(--red); }
@media (prefers-color-scheme: dark) {
  /* Dark club colours (e.g. black) need an edge to stay visible on dark cards. */
  .team, .swatch { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
}
.segmented button {
  position: relative;
  z-index: 1;
  min-height: 54px;
  padding: 6px 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: var(--label);
  transition: color .2s ease;
}
.seg-wd { font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--label-2); transition: color .2s ease; }
.seg-date { font-size: 1.25rem; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; min-height: 1.1em; }
.segmented button.is-today .seg-wd, .segmented button.is-today .seg-date { color: var(--red); }
.segmented button[aria-selected="true"], .segmented button[aria-selected="true"] .seg-wd, .segmented button[aria-selected="true"] .seg-date { color: var(--bg); }
.segmented.on-today button[aria-selected="true"] .seg-wd, .segmented.on-today button[aria-selected="true"] .seg-date { color: #fff; }
.seg-long { display: none; }
@media (min-width: 640px) { .seg-long { display: inline; } .seg-short { display: none; } }

.pager {
  /* containing block for the visually-hidden (absolute) labels inside – otherwise they escape the
     scroller and widen the whole page on phones */
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  column-gap: 32px;
  align-items: start;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 12px;
  scroll-padding: 0 var(--gutter);
  outline: none;
}
.pager::-webkit-scrollbar { display: none; }

/* Plan header: selected date on the left, Day | Week switch on the right */
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 10px; }
.plan-date { margin: 0; min-width: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-actions { flex: none; display: flex; align-items: center; gap: 8px; }
.print-btn { width: 38px; height: 38px; border: 0; border-radius: 12px; background: var(--card); box-shadow: var(--shadow-s); color: var(--tint); display: grid; place-items: center; cursor: pointer; transition: transform .35s var(--ease-spring); }
.print-btn:active { transform: scale(.92); transition-duration: .05s; }
.print-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.print-meta { display: none; }
.view-switch { flex: none; display: inline-flex; padding: 3px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow-s); }
.view-switch button { border: 0; background: none; padding: 6px 14px; border-radius: 9px; font-size: .8125rem; font-weight: 600; color: var(--label-2); cursor: pointer; transition: background-color .25s ease, color .25s ease; }
.view-switch button[aria-checked="true"] { background: var(--label); color: var(--bg); }
.view-switch button:active { transform: scale(.95); }

.day-empty { display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center; padding: 28px 16px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-s); color: var(--label-2); font-size: .9375rem; }
.day-empty strong { color: var(--label); font-size: 1.0625rem; }
.day-today { display: none; }

/* Week view: all seven days below each other */
.pager.is-week { display: block; height: auto !important; overflow: visible; scroll-snap-type: none; }
.pager.is-week .day { margin-bottom: 26px; }
.pager.is-week .day[inert] { pointer-events: auto; }
.pager.is-week .day-title { position: static; width: auto; height: auto; clip-path: none; display: flex; align-items: baseline; gap: 8px; margin: 0 4px 10px; font-size: 1.375rem; font-weight: 700; letter-spacing: -.022em; }
.pager.is-week .day-date { font-size: .9375rem; font-weight: 500; color: var(--label-2); letter-spacing: 0; }
.pager.is-week .day.is-today .day-today { display: inline-block; align-self: center; padding: 2px 8px; border-radius: 999px; background: var(--red); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.pager.is-week .day.is-today .day-title { color: var(--red); }
.pager.is-week .day-empty { flex-direction: row; justify-content: flex-start; gap: 8px; padding: 14px 16px; text-align: left; }
.pager.is-week .day-empty span { display: none; }
.pager.is-week .day-empty strong { font-size: .9375rem; font-weight: 500; color: var(--label-2); }
body.is-week-view .segmented-wrap { display: none; }
.day { scroll-snap-align: start; scroll-snap-stop: always; min-width: 0; }
.day-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.field-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow-s); overflow: hidden; }
.field-name { margin: 0; padding: 12px 16px 8px; font-size: .8125rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--label-2); }
.slots { list-style: none; margin: 0; padding: 0 0 6px; }
.slot {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 8px 12px 8px 16px;
}
/* Calendar layout (side-by-side fields): one shared time axis, tile height = duration */
.slot.is-gap .slot-time { opacity: .55; }
@media (min-width: 600px) {
  .fields.is-grid { --unit: 10px; align-items: start; }
  .fields.is-grid .slots { display: grid; grid-template-rows: repeat(var(--rows), var(--unit)); grid-template-columns: repeat(var(--lanes, 1), minmax(0, 1fr)); padding: 0 0 8px; }
  .fields.is-grid .slot { grid-row: var(--r) / span var(--s); grid-column: var(--c, 1); padding: 3px 12px 3px 16px; align-items: stretch; min-height: 0; }
  .fields.is-grid .slot-time { justify-content: flex-start; padding-top: 6px; }
  .fields.is-grid .slot-parts { align-content: stretch; }
  .fields.is-grid .team { min-height: 0; height: 100%; align-items: flex-start; padding-top: 9px; }
  .fields.is-grid .team.is-free { align-items: center; }
.fields.is-grid .slot.is-gap .slot-parts { min-height: 40px; }
.fields.is-grid .slot.is-gap .team.is-free {
  height: 100%;
  min-height: 40px;
  padding: 6px 8px;
  line-height: 1.2;
}
  .fields.is-grid .slot.is-now::after { top: 3px; bottom: 3px; }
  /* Tile layout: time on top, logo + name + club inside the coloured tile */
  .fields.is-grid .slot { display: flex; flex-direction: column; gap: 2px; padding: 1px 10px 3px; }
  .fields.is-grid .slot-time { flex-direction: row; align-items: baseline; gap: 6px; padding: 3px 2px 0; }
  .fields.is-grid .slot-time strong { font-size: .875rem; }
  .fields.is-grid .slot-time span::before { content: "– "; }
  .fields.is-grid .slot-parts { flex: 1; min-height: 0; }
  .fields.is-grid .team { flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 8px; padding: 10px 12px; overflow: hidden; }
  .fields.is-grid .team-logo { --logo: 36px; gap: 6px; flex-wrap: wrap; }
  /* Large tiles: all logos side by side, no overlap (e.g. "5 Vereine") */
  .fields.is-grid .slot:not(.is-short):not(.is-narrow) .team-logo img + img { margin-left: 0 !important; }
  .fields.is-grid .slot:not(.is-short):not(.is-narrow) .slot-parts.is-half .team-logo { --logo: 30px; gap: 4px; }
  .fields.is-grid .team-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 100%; }
  .fields.is-grid .team-text strong { font-size: 1.0625rem; }
  .fields.is-grid .team-club { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .75rem; line-height: 1.3; opacity: .8; }
  .fields.is-grid .team.is-free { align-items: center; justify-content: center; }
  /* Short entries (up to 1 h): logo left, name + club right – fits the lower height */
  .fields.is-grid .slot.is-short .team { flex-direction: row; align-items: center; gap: 10px; padding: 6px 12px; }
  .fields.is-grid .slot.is-short .team-logo { --logo: 32px; flex-wrap: nowrap; }
  .fields.is-grid .slot.is-short .team-text strong { font-size: 1rem; }
  .fields.is-grid .slot.is-short .team-club { -webkit-line-clamp: 1; }
  .fields.is-grid .slot.is-narrow .team-club { display: none; }
  /* Overlapping entries (conflict) side by side: time above the tile to save width */
  .fields.is-grid .slots.has-lanes .slot.is-narrow { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 4px; padding-left: 8px; padding-right: 8px; }
  .fields.is-grid .slots.has-lanes .is-narrow .slot-time { flex-direction: row; gap: 4px; padding-top: 2px; font-size: .8125rem; }
  .fields.is-grid .slots.has-lanes .is-narrow .slot-time strong, .fields.is-grid .slots.has-lanes .is-narrow .slot-time span { font-size: .8125rem; }
}
.slot-time { display: flex; flex-direction: column; justify-content: center; font-variant-numeric: tabular-nums; line-height: 1.2; }
.slot-time strong { font-size: .9375rem; font-weight: 600; letter-spacing: -.01em; }
.slot-time span { font-size: .8125rem; color: var(--label-2); }
.slot.is-now::after {
  content: "";
  position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--red);
}
.slot.is-now .slot-time strong { color: var(--red); }
.slot-parts { display: grid; gap: 6px; min-width: 0; }
.slot-parts.is-half { grid-template-columns: 1fr 1fr; }
.team {
  min-width: 0;
  padding: 8px 10px 8px 8px;
  border-radius: 12px;
  background: var(--club);
  color: var(--on-club);
  display: flex; align-items: center; gap: 8px;
  min-height: 48px;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12);
  transition: opacity .25s ease, filter .25s ease, transform .4s var(--ease-spring);
}
.team-club { display: none; }
.team-text { display: contents; }
.team strong { min-width: 0; font-size: .9375rem; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team small { font-size: .6875rem; opacity: .78; letter-spacing: .01em; }
.team.is-free { background: transparent; color: var(--label-3); box-shadow: inset 0 0 0 1px var(--sep); justify-content: center; padding: 8px; }
/* Half tiles: logo + short label side by side, a little tighter */
.slot-parts.is-half .team:not(.is-free) { gap: 6px; padding: 8px 8px 8px 7px; }

/* Round club logos (stacked when a Spielgemeinschaft has several) */
.logo-stack { display: inline-flex; flex: none; }
/* Rounded-square tile (like an app icon): the inset is large enough that no logo corner is clipped */
.logo-stack img { width: var(--logo, 24px); height: var(--logo, 24px); object-fit: contain; border-radius: 28%; background: #fff; padding: calc(var(--logo, 24px) * .1); box-shadow: 0 0 0 1.5px var(--ring, rgba(0, 0, 0, .08)); }
.logo-stack img + img { margin-left: calc(var(--logo, 24px) * -.35); }
/* many logos (e.g. all five clubs): overlap more so the stack stays compact */
.logo-stack:has(img:nth-child(3)) img + img { margin-left: calc(var(--logo, 24px) * -.6); }
.team-logo { --logo: 28px; --ring: color-mix(in srgb, var(--club) 70%, #fff); }
.slot-parts.is-half .team-logo { --logo: 26px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.team.is-free strong { font-weight: 500; }
.pager.is-filtering .team:not(.is-match) { opacity: .2; filter: saturate(.2); }
.pager.is-filtering .team.is-match { transform: scale(1.02); }

.empty-state { text-align: center; color: var(--label-2); padding: 48px 16px; }
.empty-state strong { color: var(--label); }

/* ---------- Home: today ---------- */

.today-cards { display: grid; gap: 14px; }
.today-card { background: var(--card); border-radius: 18px; padding: 14px 16px 16px; box-shadow: var(--shadow-s); color: var(--label); display: block; transition: transform .4s var(--ease-spring); }
.today-card:active { transform: scale(.985); transition-duration: .08s; }
.today-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.today-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.today-head h3 { margin: 0; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.02em; }
.today-meta { font-size: .8125rem; color: var(--label-2); }
.today-head .chev { align-self: center; margin-right: 2px; }
.today-fields {
  display: grid;
  gap: 10px;
  /* phones: one field per row so team names have room; wide screens: side by side */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.today-fields.is-compact { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
@media (min-width: 1000px) { .today-fields { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); } }
.today-field { background: var(--card-2); border-radius: 12px; padding: 8px 10px 4px; min-width: 0; }
@media (prefers-color-scheme: light) { .today-field { background: #F5F5F8; } }
.today-field h4 { margin: 0 0 4px; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--label-2); }
.today-slot { display: grid; grid-template-columns: 42px 1fr; gap: 8px; align-items: center; padding: 5px 0; }
.today-slot time { display: flex; flex-direction: column; line-height: 1.15; font-variant-numeric: tabular-nums; }
.today-slot time strong { font-size: .8125rem; font-weight: 600; }
.today-slot time span { font-size: .6875rem; color: var(--label-2); }
.today-slot.is-now time strong { color: var(--red); }
.today-slot.is-now { position: relative; }
.today-slot.is-now::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.today-slot.is-past { opacity: .4; }
.today-parts { display: grid; gap: 4px; min-width: 0; }
.today-parts.is-half { grid-template-columns: 1fr 1fr; }
.today-pill {
  display: block; min-width: 0;
  padding: 5px 8px; border-radius: 7px;
  background: var(--club); color: var(--on-club);
  font-size: .8125rem; font-weight: 600; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12);
}
.today-pill.has-logo { display: flex; align-items: center; gap: 6px; padding-left: 3px; }
.today-pill .logo-stack { --logo: 22px; --ring: color-mix(in srgb, var(--club) 70%, #fff); }

.today-pill-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.today-pill.is-free { background: transparent; color: var(--label-3); font-weight: 500; box-shadow: inset 0 0 0 1px var(--sep); }
.today-empty { margin: 2px 0 8px; font-size: .8125rem; color: var(--label-3); }
.today-none { margin: 0; color: var(--label-2); font-size: .9375rem; }

.install-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  margin-top: 28px; padding: 14px 16px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-s);
}
.install-card img { width: 52px; height: 52px; border-radius: 12px; }
.install-card p { margin: 2px 0 0; color: var(--label-2); font-size: .875rem; line-height: 1.35; }

.club-title { display: flex; align-items: center; gap: 12px; margin: 28px 0 10px; }
.club-group:first-of-type .club-title { margin-top: 20px; }
.club-title img { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 9px; padding: 4px; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .1), var(--shadow-s); flex: none; }

/* Club filter chips: wrap onto several lines so every club is visible at once */
.chips-scroll { flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.chips-scroll .chip { flex: none; }
.chip-logo { padding-left: 4px; gap: 8px; }
@media (max-width: 599px) {
  .chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; gap: 6px; margin: 2px calc(-1 * var(--gutter)) 10px; padding: 2px var(--gutter) 4px; }
  .chips-scroll::-webkit-scrollbar { display: none; }
  .chip-logo { padding: 4px; min-height: 0; border-radius: 12px; }
  .chip-logo .chip-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .chip-logo > img, .chip-logo .logo-stack img { width: 30px; height: 30px; }
  .chip-logo .logo-stack img { --logo: 30px; }
  .chip-logo[aria-pressed="true"] { background: var(--tint); box-shadow: 0 0 0 2px var(--tint); }
}
.chip-logo > img { width: 26px; height: 26px; object-fit: contain; border-radius: 28%; background: #fff; padding: 2.5px; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12); flex: none; }
.chip-logo .swatch { margin: 0 6px; }
.chip-logo[aria-pressed="true"] img { box-shadow: 0 0 0 1.5px var(--bg); }

/* Contact rows: fixed action column so buttons always line up */
.contact-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding-top: 12px; padding-bottom: 12px; align-items: center; }
.contact-row .row-text { gap: 2px; }
.contact-row .row-text strong { font-weight: 500; line-height: 1.25; }
.contact-row .eyebrow { margin-bottom: 1px; }
.contact-row .sg { color: var(--label-3); }
.icon-btn.is-placeholder { visibility: hidden; }

.page-foot {
  margin-top: 48px;
  padding-top: 16px;
  border-top: .5px solid var(--sep);
  text-align: center;
  font-size: .8125rem; color: var(--label-2);
}
.page-foot p { margin: 0; }
/* ---------- Info page ---------- */

.about-card { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow-s); margin-top: 8px; }
.about-card img { width: 64px; height: 64px; border-radius: 15px; box-shadow: var(--shadow-s); flex: none; }
.about-card div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.about-card strong { font-size: 1.1875rem; font-weight: 700; letter-spacing: -.02em; }
.about-card span { color: var(--label-2); font-size: .9375rem; }
.about-card small { color: var(--label-3); font-size: .8125rem; margin-top: 4px; }
.prose-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-s); padding: 14px 16px; }
.prose-card p { margin: 0; color: var(--label); font-size: 1rem; line-height: 1.5; }
.prose-card p + p { margin-top: 10px; color: var(--label-2); }
.info-row { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.info-row .row-icon { margin-top: 2px; }
.info-row .row-text small { font-size: .875rem; line-height: 1.4; margin-top: 2px; }
.info-row .row-text small a { color: var(--tint); }
.row-button { width: 100%; border: 0; background: none; text-align: left; font: inherit; cursor: pointer; }
.row-app-icon { width: 30px; height: 30px; border-radius: 7px; flex: none; }
.version-note { text-align: center; color: var(--label-3); font-size: .8125rem; margin: 28px 0 0; }

.page-foot .link { font-size: inherit; color: var(--label-2); text-decoration: underline; text-decoration-color: var(--label-3); text-underline-offset: 2px; }

/* Scroll edge effect: content fades out where it slides under the floating tab bar. */
body:not(.admin)::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: calc(96px + var(--safe-b));
  z-index: 39;
  pointer-events: none;
  background: linear-gradient(to top, var(--bg) 35%, color-mix(in srgb, var(--bg) 0%, transparent));
}

/* ---------- Floating tab bar ---------- */

.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(10px + var(--safe-b));
  translate: -50% 0;
  z-index: 40;
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  background: var(--material);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--shadow-l), inset 0 1px 0 var(--material-edge), inset 0 0 0 .5px var(--sep);
  max-width: calc(100vw - 24px);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-width: 68px; min-height: 50px; padding: 4px 10px;
  border-radius: 999px;
  color: var(--label-2);
  font-size: .6875rem; font-weight: 500; letter-spacing: .01em;
  transition: background-color .3s ease, color .3s ease, transform .4s var(--ease-spring);
}
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.tab.is-active { color: var(--tint); background: var(--fill); }
.tab:active { transform: scale(.92); transition-duration: .05s; }
@media (max-width: 380px) { .tab { min-width: 0; padding: 4px 8px; } }

/* ---------- Status pill (offline indicator) ---------- */

.status-pill {
  position: fixed;
  top: calc(var(--nav-h) + var(--safe-t) + 8px);
  left: 50%;
  z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(28, 28, 30, .86);
  color: #fff;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-l);
  font-size: .8125rem; font-weight: 600; letter-spacing: -.005em;
  translate: -50% -12px;
  scale: .92;
  opacity: 0;
  transition: translate .5s var(--ease-spring), scale .5s var(--ease-spring), opacity .25s ease;
  cursor: default;
  max-width: calc(100vw - 32px);
  border: 0;
}
.status-pill.is-visible { translate: -50% 0; scale: 1; opacity: 1; }
.status-pill.is-action { cursor: pointer; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }
.status-pill[data-kind="ok"] .status-dot { background: var(--green); }

/* ---------- Sheets ---------- */

.sheet {
  border: 0;
  padding: 0;
  margin: auto auto 0;
  width: 100%;
  max-width: 640px;
  max-height: calc(100dvh - var(--safe-t) - 24px);
  border-radius: 22px 22px 0 0;
  background: var(--card);
  color: var(--label);
  box-shadow: var(--shadow-l);
  overflow: hidden;
  display: none;
  flex-direction: column;
  overscroll-behavior: contain;
}
.sheet[open] { display: flex; }
.sheet::backdrop { background: rgba(0, 0, 0, .32); opacity: var(--scrim, 1); }
@media (min-width: 700px) {
  .sheet { margin: auto; border-radius: 22px; max-height: min(80dvh, 760px); }
}
.sheet-grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 6px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 10px 20px; flex: none; touch-action: none; cursor: grab; }
.sheet-grabber { touch-action: none; cursor: grab; }
.sheet-head h2 { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -.022em; }
.sheet-close { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--fill); color: var(--label-2); display: grid; place-items: center; cursor: pointer; }
.sheet-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.sheet-body { overflow-y: auto; padding: 0 20px calc(24px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
.prose h3 { font-size: .9375rem; font-weight: 600; margin: 18px 0 4px; letter-spacing: -.01em; }
.prose p { margin: 0 0 8px; color: var(--label-2); font-size: .9375rem; line-height: 1.5; }
.prose strong { color: var(--label); }
.steps { list-style: none; margin: 8px 0 16px; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 12px; font-size: 1rem; }
.steps li > span { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; font-weight: 600; font-size: .875rem; }
.inline-icon { display: inline; width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: var(--tint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Larger screens ---------- */

@media (min-width: 900px) {
  .large-title { font-size: 2.75rem; letter-spacing: -.03em; line-height: 1.08; margin-top: 18px; }
  .lead { font-size: 1.1875rem; }
}

/* ---------- Statistics ---------- */
.form-note { margin: 8px 16px 0; font-size: .8125rem; color: var(--label-2); line-height: 1.4; }
:root { --chart-1: #007AFF; --chart-2: #D97400; --grid: rgba(60, 60, 67, .12); }
@media (prefers-color-scheme: dark) { :root { --chart-1: #0A84FF; --chart-2: #C86E00; --grid: rgba(235, 235, 245, .12); } }

.stats-tabs { display: flex; gap: 8px; margin: 4px 0 0; }
.stats-tabs a, .seg-links a { padding: 6px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-s); color: var(--label); font-size: .875rem; font-weight: 600; }
.seg-links { display: flex; gap: 8px; margin: 0 0 14px; }
.seg-links a.is-active { background: var(--label); color: var(--bg); }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpis-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .kpis-4 { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-s); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi span { font-size: .75rem; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .04em; }
.kpi strong { font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }

.chart-title { margin: 26px 4px 8px; font-size: 1.0625rem; font-weight: 700; letter-spacing: -.016em; }
.chart-title small { display: block; margin-top: 2px; font-size: .8125rem; font-weight: 500; color: var(--label-2); letter-spacing: 0; }
.stats-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-s); padding: 12px 16px 14px; }
.stats-sub { font-size: .75rem; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .04em; margin: 6px 0 8px; }
.stats-sub:not(:first-child) { margin-top: 18px; }

/* Horizontal bars: thin marks, rounded data end, value as text in label ink */
.bar-list > li + li::before { left: 16px; }
.bar-row { position: relative; display: grid; grid-template-columns: minmax(0, 11rem) 1fr auto; align-items: center; gap: 12px; padding: 10px 16px; outline: none; }
.bar-label { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .9375rem; }
.bar-label > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-logo { --logo: 24px; }
.bar-track { height: 10px; position: relative; }
.bar { position: absolute; left: 0; top: 0; bottom: 0; width: max(4px, var(--w)); background: var(--c); border-radius: 2px 5px 5px 2px; }
@media (prefers-color-scheme: dark) { .bar { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); } }
.bar-value { font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--label); white-space: nowrap; }
@media (max-width: 480px) { .bar-row { grid-template-columns: minmax(0, 8.5rem) 1fr auto; } }

.meter-row { position: relative; display: grid; grid-template-columns: 4.5rem 1fr 3rem; align-items: center; gap: 12px; padding: 5px 0; outline: none; }
.meter-label { font-size: .9375rem; font-weight: 500; }
.meter { height: 10px; border-radius: 5px; background: var(--fill); overflow: hidden; }
.meter > span { display: block; height: 100%; width: var(--w); background: var(--chart-1); border-radius: 5px; }
.meter-row .bar-value { text-align: right; }

/* Column charts (weekday hours, views per day) */
.columns { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 8px; align-items: end; height: 140px; }
.col { position: relative; display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-align: center; gap: 4px; outline: none; }
.col-value { font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--label-2); }
.col-track { position: relative; border-bottom: .5px solid var(--grid); }
.col-bar { position: absolute; left: 50%; bottom: 0; width: min(28px, 70%); translate: -50% 0; height: var(--h); background: var(--chart-1); border-radius: 5px 5px 2px 2px; }
.col-label { font-size: .75rem; font-weight: 600; color: var(--label-2); }

.legend-row { display: flex; gap: 16px; font-size: .8125rem; color: var(--label-2); margin-bottom: 10px; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.key-web { background: var(--chart-1); }
.key-app { background: var(--chart-2); }
.daychart { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; align-items: end; height: 150px; border-bottom: .5px solid var(--grid); }
.dc-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; }
.dc-stack { width: min(16px, 80%); height: var(--h); display: flex; flex-direction: column; gap: 2px; }
.dc-stack > span { min-height: 2px; border-radius: 2px; }
.dc-stack > span:first-child { border-top-left-radius: 4px; border-top-right-radius: 4px; }
.dc-web { background: var(--chart-1); }
.dc-app { background: var(--chart-2); }
.dc-axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--label-2); margin-top: 6px; }

/* Hover / focus tooltip for every mark */
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute; z-index: 10; left: 50%; bottom: calc(100% + 6px); translate: -50% 0;
  width: max-content; max-width: min(320px, 80vw);
  padding: 7px 10px; border-radius: 10px;
  background: rgba(28, 28, 30, .92); color: #fff;
  font-size: .8125rem; font-weight: 500; line-height: 1.35; text-align: left; white-space: normal;
  box-shadow: var(--shadow-l); pointer-events: none;
}
.bar-row[data-tip]:hover, .meter-row[data-tip]:hover { background: var(--fill); }
.daychart .dc-col:first-child[data-tip]:hover::after { left: 0; translate: 0 0; }
.daychart .dc-col:last-child[data-tip]:hover::after { left: auto; right: 0; translate: 0 0; }

/* ---------- Statistics: shares ---------- */
.share-bar { display: flex; gap: 2px; height: 22px; margin: 2px 0 12px; }
.share-bar > span { width: var(--w); background: var(--c); min-width: 3px; position: relative; outline: none; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .15); }
.share-bar > span:first-child { border-radius: 6px 0 0 6px; }
.share-bar > span:last-child { border-radius: 0 6px 6px 0; }
.share-bar > span:only-child { border-radius: 6px; }
.share-table { width: 100%; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.share-table th { text-align: left; font-size: .75rem; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .04em; padding: 0 0 6px; }
.share-table td { padding: 6px 0; border-top: .5px solid var(--sep); }
.share-table th:not(:first-child), .share-table td:not(:first-child) { text-align: right; padding-left: 12px; white-space: nowrap; }
.share-table td:first-child { display: flex; align-items: center; gap: 8px; }
.share-table .swatch { width: 10px; height: 10px; flex: none; }
.share-table .bar-logo { --logo: 22px; }
.stats-share { margin-top: 14px; }
.stats-venue .stats-sub:first-child { margin-top: 2px; }
.bar-value small { font-weight: 500; color: var(--label-2); margin-left: 4px; }
/* JS tooltip (replaces the CSS one, which could be cut off at the screen edge) */
.has-js-tips [data-tip]:hover::after, .has-js-tips [data-tip]:focus-visible::after { display: none !important; }
.js-tip {
  position: fixed; z-index: 100; max-width: min(320px, calc(100vw - 16px));
  padding: 7px 10px; border-radius: 10px;
  background: rgba(28, 28, 30, .94); color: #fff;
  font-size: .8125rem; font-weight: 500; line-height: 1.35;
  box-shadow: var(--shadow-l); pointer-events: none;
}
@media print { .js-tip { display: none !important; } }
.stats-actions { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.print-only { display: none; }

@media print {
  .no-print, .public-toggle, .banner, .nav-back, .seg-links { display: none !important; }
  .print-only { display: block; }
  .print-head { margin: 0 0 6pt; font-size: 9pt; color: #555; }
  .admin-page { max-width: none; padding: 0; }
  .kpis { gap: 6pt; }
  .kpi, .stats-card, .bar-list { box-shadow: none !important; border: .6pt solid #ccc; break-inside: avoid; }
  .kpi strong { font-size: 14pt; }
  .chart-title { margin: 12pt 0 4pt; break-after: avoid; }
  .bar-row { padding: 4pt 8pt; }
  [data-tip]:hover::after, [data-tip]:focus-visible::after { display: none !important; }
  .share-bar > span, .bar, .meter > span, .col-bar, .swatch { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .share-table td { padding: 3pt 0; }
  .stats-venue-block { break-inside: avoid; page-break-inside: avoid; }
  .stats-venue-block .chart-title { break-after: avoid; }
  .form-note { margin: 4pt 0 0; }
}

/* ---------- Accessibility preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .status-pill { translate: -50% 0; scale: 1; transition: opacity .2s ease !important; }
  .pager { scroll-behavior: auto; }
}
@media (prefers-reduced-transparency: reduce) {
  body.is-scrolled .navbar, body.is-scrolled .segmented-wrap, .tabbar, .status-pill { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .status-pill { background: #1C1C1E; }
}
@media (prefers-contrast: more) {
  :root { --sep: rgba(60, 60, 67, .55); --label-2: rgba(60, 60, 67, .9); }
  .list, .field-card, .chip, .tabbar { box-shadow: 0 0 0 1px var(--sep); }
}

/* ---------- Print: all days on paper ---------- */

@page { size: A4 portrait; margin: 12mm 12mm 14mm; }
@page week { size: A4 landscape; margin: 10mm 10mm 12mm; }

@media print {
  /* Always a light paper layout, also when the device is in dark mode */
  :root {
    --bg: #fff; --card: #fff; --card-2: #fff; --label: #000; --label-2: #555; --label-3: #999;
    --sep: #d6d6d6; --fill: #f2f2f2; --shadow-s: none; --shadow-l: none; --red: #d70015;
  }
  html, body { background: #fff !important; color: #000; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .navbar, .tabbar, .segmented-wrap, body::after, .legend, .status-pill, .page-foot, .list-spaced,
  .skip, .plan-actions, .notice-dot, .sheet, .install-card { display: none !important; }
  .page { padding: 0; max-width: none; }
  .large-title { font-size: 20pt; margin: 0 0 2pt; letter-spacing: -.02em; }
  .lead { font-size: 10pt; margin: 0 0 4pt; color: #555; }
  .notice { padding: 0; background: none; color: #000; font-size: 9pt; }
  .plan-head { margin: 4pt 0 8pt; }
  .plan-date { font-size: 12pt; }
  .print-meta { display: block; margin: 6pt 0 0; font-size: 7.5pt; color: #777; }
  body:not(.is-week-view) .plan-head { display: none; }

  .pager { display: block !important; height: auto !important; overflow: visible !important; margin: 0; padding: 0; }
  .day[inert] { pointer-events: auto; }
  .day-title { position: static; width: auto; height: auto; clip-path: none; display: flex; align-items: baseline; gap: 6pt; font-size: 13pt; font-weight: 700; margin: 0 0 5pt; }
  .day-date { display: inline !important; font-size: 10pt; font-weight: 500; color: #555; }
  .day-today { display: none !important; }
  .slot.is-now::after { display: none; }
  .slot.is-now .slot-time strong { color: inherit; }
  .fields.is-grid { --unit: 7pt; }
  /* Week print: compact list instead of the calendar grid (fits on one landscape page) */
  .pager.is-week .fields.is-grid .slots { display: block !important; }
  .pager.is-week .fields.is-grid .slot { display: grid; }
  .pager.is-week .fields.is-grid .slot.is-gap { display: none; }
  .pager.is-week .fields.is-grid .team { height: auto; }
  .pager.is-week .fields.is-grid .team { flex-direction: row; align-items: center; gap: 4pt; }
  .pager.is-week .fields.is-grid .team-club { display: none; }
  .pager.is-week .fields.is-grid .slot-time { flex-direction: row; }
  .pager.is-week .fields.is-grid .slot, .pager.is-week .fields.is-grid .slots.has-lanes .slot.is-narrow { grid-template-columns: 56pt 1fr; grid-template-rows: auto; gap: 6pt; padding: 1.5pt 5pt; }
  .pager.is-week .fields.is-grid .slots.has-lanes .is-narrow .slot-time { padding-top: 0; gap: 3pt; }
  .pager.is-week .fields.is-grid .slots.has-lanes .is-narrow .slot-time strong, .pager.is-week .fields.is-grid .slots.has-lanes .is-narrow .slot-time span { font-size: 8pt; }
  .fields.is-grid .slots { display: grid !important; grid-template-rows: repeat(var(--rows), var(--unit)); }
  .fields.is-grid .slots { grid-template-columns: repeat(var(--lanes, 1), minmax(0, 1fr)); }
  .fields.is-grid .slot { grid-row: var(--r) / span var(--s); grid-column: var(--c, 1); align-items: stretch; padding-top: 1pt; padding-bottom: 1pt; }
  .fields.is-grid .team { height: 100%; min-height: 0; }

  /* Fields side by side on paper */
  .fields { grid-template-columns: repeat(var(--fields, 2), minmax(0, 1fr)) !important; gap: 8pt; }
  .field-card { box-shadow: none; border: .6pt solid #ccc; border-radius: 8pt; break-inside: avoid; }
  .field-name { padding: 6pt 8pt 3pt; font-size: 8pt; color: #555; }
  .slot { grid-template-columns: 38pt 1fr; gap: 6pt; padding: 4pt 8pt; }
  .slot-time strong { font-size: 10pt; }
  .slot-time span { font-size: 8pt; }
  .team { min-height: 0; padding: 4pt 6pt; border-radius: 5pt; gap: 5pt; box-shadow: inset 0 0 0 .6pt rgba(0, 0, 0, .25); }
  .team strong { font-size: 9.5pt; }
  .team-logo { --logo: 16pt !important; --ring: rgba(0, 0, 0, .15); }
  .team.is-free { box-shadow: inset 0 0 0 .6pt #bbb; color: #888; }
  .day-empty { padding: 6pt 8pt; border: .6pt solid #ddd; border-radius: 6pt; flex-direction: row; justify-content: flex-start; gap: 6pt; text-align: left; }
  .day-empty span { display: none; }
  .day-empty strong { font-size: 9pt; font-weight: 500; color: #777; }

  /* Day view: only the selected day, roomy */
  .pager:not(.is-week) .day[inert] { display: none !important; }
  .pager:not(.is-week) .day { margin: 0; }

  /* Week view: landscape, compact, every day kept together */
  body.is-week-view { page: week; }
  body.is-week-view .large-title { font-size: 15pt; }
  body.is-week-view .lead { font-size: 8.5pt; margin: 0; }
  body.is-week-view .plan-head { margin: 2pt 0 5pt; }
  body.is-week-view .plan-date { font-size: 10pt; }
  .pager.is-week .day { break-inside: avoid; margin: 0 0 5pt; }
  .pager.is-week .day-title { font-size: 9.5pt; margin: 0 0 2pt; }
  .pager.is-week .day-date { font-size: 8pt; }
  .pager.is-week .fields { gap: 5pt; }
  .pager.is-week .field-card { border-radius: 5pt; }
  .pager.is-week .field-name { padding: 3pt 6pt 1pt; font-size: 6.5pt; }
  .pager.is-week .slots { padding: 0 0 2pt; }
  .pager.is-week .slot { padding: 1.5pt 5pt 1.5pt 0; }
  .pager.is-week .day-empty { padding: 3pt 6pt; }
  .pager.is-week .day-empty strong { font-size: 8pt; }
  .pager.is-week .slot-time { flex-direction: row; gap: 3pt; align-items: baseline; }
  .pager.is-week .slot-time strong, .pager.is-week .slot-time span { font-size: 8pt; }
  .pager.is-week .slot-time span::before { content: "– "; }
  .pager.is-week .slot { grid-template-columns: 56pt 1fr; }
  .pager.is-week .team { padding: 1pt 4pt; border-radius: 3.5pt; gap: 4pt; }
  .pager.is-week .slot-parts { gap: 3pt; }
  .pager.is-week .slot-parts.is-half .team:not(.is-free) { padding: 1pt 4pt; gap: 4pt; }
  .pager.is-week .team.is-free { padding: 1pt 4pt; }
  .pager.is-week .team strong { font-size: 8pt; }
  .pager.is-week .team-logo { --logo: 11pt !important; }
}

/* Phones: full-width tiles have room for all logos side by side (half tiles stay overlapped) */
@media (max-width: 599px) {
  .slot-parts:not(.is-half) .team-logo { gap: 4px; }
  .slot-parts:not(.is-half) .team-logo img + img { margin-left: 0 !important; }
}

/* "Heute": logos side by side; full-width pills have room, half pills keep a slight overlap */
.today-pill .logo-stack { gap: 3px; }
.today-parts:not(.is-half) .today-pill .logo-stack img + img { margin-left: 0 !important; }
.today-parts.is-half .today-pill .logo-stack img + img { margin-left: -6px !important; }
