/* Tennisplatz-Buchung – SG Gronau. Schrift lokal gehostet (DSGVO). */
@font-face {
  font-family: "Jakarta"; src: url("fonts/jakarta-latin-var.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jakarta"; src: url("fonts/jakarta-latin-ext-var.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02AF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --green: #218541;
  --green-600: #1b7137;
  --green-700: #155a2c;
  --green-900: #0c3a1f;
  --green-50: #edf7f0;
  --green-100: #d9f0e0;
  --green-300: #86d29f;
  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --line: #e4eae6;
  --line-2: #d3ddd6;
  --ink: #0f1f15;
  --ink-2: #33433a;
  --muted: #66756c;
  --red: #e5484d;
  --red-600: #c93035;
  --red-50: #fdecec;
  --ball: #dcf04a;
  --ball-600: #b9cc22;
  --ball-ink: #26300a;
  --grey: #a3ada7;
  --focus: #3b82f6;
  --r-sm: 3px;
  --r: 4px;
  --r-lg: 6px;
  --r-xl: 6px;
  --row: 22px;               /* Höhe eines 15-Minuten-Slots */
  --time-col: 58px;
  --shadow-sm: 0 0 0 1px var(--line);
  --shadow: 0 0 0 1px var(--line), 0 1px 3px rgba(15, 45, 25, .06);
  --shadow-lg: 0 0 0 1px var(--line), 0 12px 32px -16px rgba(15, 45, 25, .28);
  --font: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 15.5px/1.55 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 0;
}
a { color: var(--green-600); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--green-900); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.12; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.4rem); }
h2 { font-size: 1.2rem; letter-spacing: -0.015em; }
p { margin: 0 0 .8em; }
code { font-size: .9em; background: var(--surface-2); padding: .15em .4em; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; }
.ta-r { text-align: right; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.num, .g-time, .ribbon-scale, .stat-n { font-variant-numeric: tabular-nums; }

.app { min-height: 100vh; display: flex; flex-direction: column; }
.main, .foot, .topbar-in { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.main { flex: 1; padding-top: 28px; padding-bottom: 48px; }

/* ---------- Kopfzeile ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 4px; background: var(--green); display: grid; place-items: center; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.brand-mark svg { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em; }
.brand-text small { color: var(--muted); font-size: .76rem; }
.tabs { display: flex; gap: 2px; padding: 4px; background: var(--bg); border-radius: 4px; overflow-x: auto; scrollbar-width: none; }
.tab {
  font-weight: 600; font-size: .9rem; padding: 8px 16px; text-decoration: none; color: var(--muted);
  border-radius: 4px; white-space: nowrap; transition: color .15s, background .15s;
}
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--surface); color: var(--green-700); box-shadow: var(--shadow-sm); }
.logout { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--green-50); color: var(--green-700); box-shadow: inset 0 0 0 1px var(--green-100); font-weight: 700; font-size: .8rem; letter-spacing: .02em;
}
.who { display: flex; flex-direction: column; line-height: 1.2; max-width: 170px; }
.who b { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: var(--muted); font-size: .75rem; }
.badge { font-style: normal; font-size: .72rem; font-weight: 600; background: var(--ball); color: var(--ball-ink); padding: 3px 9px; border-radius: 4px; }

.foot { display: flex; gap: 20px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 28px; font-size: .82rem; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Buttons & Formulare ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .92rem/1 var(--font); letter-spacing: -0.005em; padding: 12px 20px; border-radius: 4px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; min-height: 44px;
  transition: background .15s, box-shadow .15s, transform .1s var(--ease), color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; min-height: 36px; font-size: .84rem; border-radius: 4px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-600); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--green-300); color: var(--green-700); }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover { background: var(--bg); color: var(--ink); }
.btn-danger { background: var(--red-600); color: #fff; }
.btn-danger:hover { background: #a9262a; color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--red-600); border-color: #f3c9ca; }
.btn-danger-ghost:hover { background: var(--red-50); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 4px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #fff;
  transition: background .15s;
}
.icon-btn:hover { background: rgba(255,255,255,.2); }
.pill-btn {
  height: 42px; padding: 0 18px; border-radius: 4px; cursor: pointer; font: 600 .9rem var(--font);
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #fff;
}
.pill-btn:hover { background: rgba(255,255,255,.2); }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label, .seg legend { font-weight: 600; font-size: .85rem; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url], select, textarea {
  font: 400 .95rem/1.3 var(--font); color: var(--ink);
  padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); width: 100%; min-height: 46px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #bccac0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(33, 133, 65, .14); }
input::placeholder, textarea::placeholder { color: #9aa8a0; }
.has-error input { border-color: var(--red); }
.has-error input:focus { box-shadow: 0 0 0 4px rgba(229, 72, 77, .14); }
.field-error { color: var(--red-600); font-size: .82rem; margin: 0; font-weight: 500; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: .87rem; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--green); }
.check .field-error { grid-column: 2; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 8px 0; font-weight: 500; }
.switch input {
  appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 4px; background: var(--line-2);
  position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; margin: 0;
}
.switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease);
}
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(16px); }
.seg { border: 0; padding: 0; margin: 0; display: flex; gap: 6px; flex-wrap: wrap; background: var(--bg); padding: 4px; border-radius: 4px; width: max-content; }
.seg legend { margin-bottom: 8px; padding: 0; float: left; width: 100%; }
.seg label { display: flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 4px; cursor: pointer; font-weight: 500; font-size: .9rem; }
.seg label:has(input:checked) { background: var(--surface); box-shadow: var(--shadow-sm); color: var(--green-700); }
.seg input { accent-color: var(--green); }
.row2, .row3 { display: grid; gap: 16px; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: repeat(3, 1fr); } }
.btn-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.card { background: var(--surface); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); }
.card h2 { margin-bottom: 14px; }
.cols { display: grid; gap: 20px; margin-bottom: 20px; }
@media (min-width: 860px) { .cols { grid-template-columns: 1fr 1fr; } .cols-wide { grid-template-columns: 400px 1fr; align-items: start; } }

.flash { padding: 14px 18px; border-radius: var(--r); margin-bottom: 18px; font-weight: 500; font-size: .92rem; display: flex; gap: 10px; align-items: flex-start; }
.flash::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; background: currentColor; }
.flash-ok { background: var(--green-50); color: var(--green-700); box-shadow: inset 0 0 0 1px var(--green-100); }
.flash-error { background: var(--red-50); color: #8f1f23; box-shadow: inset 0 0 0 1px #f6cfd0; }
.flash-key { background: #fbfde6; color: var(--ball-ink); box-shadow: inset 0 0 0 1px #ecf3a8; display: block; }
.flash-key::before { display: none; }
.flash-key .pw { font-size: 1.25rem; letter-spacing: .06em; background: #fff; padding: 6px 12px; cursor: copy; border-radius: 4px; }
.notice {
  background: #fffbe6; padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 18px;
  border: 1px solid #f0e2a8; border-left: 4px solid #e2b93b; font-weight: 500; color: #4a3d0c;
}
.empty { text-align: center; padding: 40px 24px; color: var(--muted); }
.section-h { margin-top: 36px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }

/* ---------- Anmeldung ---------- */
body.is-auth { background: var(--bg); }
body.is-auth .main { display: grid; place-items: center; padding-top: 40px; }
.auth {
  display: grid; width: 100%; max-width: 1040px; border-radius: var(--r-xl); overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(15,45,25,.05); background: var(--surface);
}
@media (min-width: 860px) { .auth { grid-template-columns: 1.1fr 1fr; min-height: 620px; } }
.auth-visual {
  position: relative; overflow: hidden; color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  background: var(--green);
}
.auth-court { margin: 0 -40px; }
.court-hero { width: 100%; height: auto; aspect-ratio: 36.57 / 18.29; display: block; }
.auth-claim { font-weight: 700; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
.auth-claim small { display: block; font-size: .95rem; font-weight: 500; letter-spacing: 0; opacity: .85; margin-top: 10px; line-height: 1.5; }
.auth-club { margin: 0; font-size: .85rem; opacity: .8; font-weight: 500; }
.auth-panel { padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; }
.auth-panel h1 { font-size: 1.9rem; margin-bottom: .3em; }
.auth-panel .lead { color: var(--muted); margin-bottom: 26px; }
.auth-switch { margin-top: 22px; font-size: .92rem; color: var(--muted); }
.auth-switch a { font-weight: 600; }
.auth-hint { font-size: .82rem; color: var(--muted); margin-top: 8px; }
@media (max-width: 859px) {
  .auth-visual { padding: 28px 24px; }
  .auth-court { max-width: 420px; }
  .auth-panel { padding: 30px 22px; }
}

/* ---------- Buchen: Kopfbereich ---------- */
.hero {
  position: relative; color: #fff; border-radius: var(--r-lg); padding: 24px 24px 14px; margin-bottom: 20px;
  background: var(--green);
}
.hero-top { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.hero-kicker { margin: 0 0 2px; font-weight: 600; font-size: .9rem; color: rgba(255,255,255,.8); }
.hero h1 { color: #fff; margin: 0 0 6px; font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem); letter-spacing: -0.01em; font-weight: 700; }
.hero #daySub { margin: 0; color: rgba(255,255,255,.78); font-weight: 500; font-size: .93rem; }
.day-nav { display: flex; align-items: center; gap: 8px; }
.date-pick input {
  height: 42px; min-height: 0; padding: 0 12px; width: auto; border-radius: 4px; color: #fff; font-weight: 600;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color-scheme: dark;
}
.date-pick input:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.18); }

.day-strip { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.day-strip::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 auto; width: 60px; padding: 9px 0 8px; border-radius: 4px; scroll-snap-align: center;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.07); color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; font: inherit;
  transition: background .15s, transform .15s var(--ease);
}
.day-chip small { font-size: .72rem; font-weight: 600; opacity: .75; }
.day-chip b { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.day-chip:hover { background: rgba(255,255,255,.16); }
.day-chip.is-closed { opacity: .45; }
.day-chip.is-today small { color: var(--ball); opacity: 1; }
.day-chip[aria-selected="true"] { background: #fff; color: var(--green-700); border-color: #fff; }
.day-chip[aria-selected="true"] small { color: var(--green); opacity: 1; }

/* ---------- Buchen: Platz-Karten ---------- */
.court-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-bottom: 22px; }
.tile {
  display: flex; flex-direction: column; text-align: left; padding: 0; border: 0; cursor: pointer; font: inherit; color: inherit;
  background: var(--surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.tile:hover { box-shadow: 0 0 0 2px var(--green-300); }
.tile-img { position: relative; display: block; aspect-ratio: 16 / 8.6; overflow: hidden; }
.tile-img .court-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tile-status {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px 5px 8px; border-radius: 6px; font-size: .78rem; font-weight: 600;
  background: #fff; color: var(--ink);
}
.tile-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grey); }
.tile-status.is-free::before { background: #1f9d50; }
.tile-status.is-busy::before { background: var(--red); }
.court-svg .grain { mix-blend-mode: soft-light; }
.tile-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; }
.tile-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tile-title b { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.tile-title small { color: var(--muted); font-size: .8rem; font-weight: 500; text-align: right; }
.ribbon { display: flex; gap: 1.5px; height: 10px; }
.ribbon i { flex: 1; border-radius: 2px; background: var(--green-300); }
.ribbon i.r-booked { background: var(--red); }
.ribbon i.r-own { background: var(--ball-600); }
.ribbon i.r-block { background: var(--grey); }
.ribbon i.r-past { background: var(--line); }
.ribbon i:first-child { border-radius: 5px 2px 2px 5px; }
.ribbon i:last-child { border-radius: 2px 5px 5px 2px; }
.ribbon-scale { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); font-weight: 600; margin-top: -4px; }

/* ---------- Buchen: Zeitplan ---------- */
.plan { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px 20px 16px; scroll-margin-top: 84px; }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.plan-head h2 { margin: 0; }
.plan-tip { color: var(--muted); font-size: .85rem; margin: 4px 0 14px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; font-weight: 500; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-free { background: var(--green-300); }
.sw-booked { background: var(--red); }
.sw-own { background: var(--ball-600); }
.sw-block { background: var(--grey); }

.grid-wrap { border-radius: var(--r); overflow: auto; max-height: 72vh; background: var(--surface); position: relative; overscroll-behavior: contain; box-shadow: inset 0 0 0 1px var(--line); }
.grid { display: grid; position: relative; min-width: min-content; }
.g-corner, .g-head { position: sticky; top: 0; z-index: 4; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.g-corner { left: 0; z-index: 5; }
.g-head { padding: 12px 12px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.g-head b { font-weight: 700; font-size: .95rem; letter-spacing: -0.01em; }
.g-dot { width: 10px; height: 10px; border-radius: 3px; background: #cb6b42; }
.g-dot-hard { background: #3b6fb3; }
.g-dot-grass { background: #3d9e55; }
.g-dot-indoor { background: #2f7d5c; }
.g-status { flex-basis: 100%; font-size: .75rem; font-weight: 600; color: var(--muted); }
.g-status.is-free { color: #1a9a4c; }
.g-status.is-busy { color: var(--red-600); }

.g-times { position: sticky; left: 0; z-index: 3; background: var(--surface); }
.g-time { height: var(--row); font-weight: 600; font-size: .75rem; color: var(--muted); text-align: right; padding-right: 10px; position: relative; }
.g-time span { position: absolute; right: 10px; top: -.6em; background: var(--surface); padding: 0 2px; }
.g-time:first-child span { top: 2px; }

.g-col { position: relative; padding: 0 5px; touch-action: pan-x pan-y; }
.g-col + .g-col, .g-times + .g-col { box-shadow: inset 1px 0 0 var(--line); }
.slot { position: relative; display: block; width: 100%; height: var(--row); border: 0; margin: 0; padding: 0; background: transparent; cursor: pointer; }
.slot::before {
  content: ""; position: absolute; inset: 1.5px 0; border-radius: 6px; background: var(--green-50);
  transition: background .12s, box-shadow .12s;
}
.slot.q4::after { content: ""; position: absolute; left: -5px; right: -5px; bottom: 0; height: 1px; background: var(--line); }
.slot:hover::before { background: var(--green-100); box-shadow: inset 0 0 0 1.5px var(--green-300); }
.slot.past { cursor: not-allowed; }
.slot.past::before { background: var(--surface-2); box-shadow: none; }
.slot:focus-visible { outline: none; }
.slot:focus-visible::before { box-shadow: inset 0 0 0 2px var(--focus); }
.grid.is-locked .slot:not(.past)::before { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.grid.is-locked .slot { cursor: not-allowed; }

.item {
  position: absolute; left: 6px; right: 6px; border-radius: 4px; padding: 5px 10px; overflow: hidden;
  font-size: .78rem; line-height: 1.25; z-index: 2; cursor: pointer; border: 0; text-align: left; font-family: inherit; font-weight: 500;
  transition: transform .15s var(--ease), box-shadow .15s;
}
.item:hover { filter: brightness(.96); }
.item b { display: block; font-weight: 700; font-size: .82rem; letter-spacing: -0.01em; }
.item.booked { background: var(--red); color: #fff; }
.item.own { background: var(--ball); color: var(--ball-ink); box-shadow: inset 0 0 0 1px rgba(120,140,0,.35); }
.item.block {
  background: repeating-linear-gradient(135deg, #e3e8e5 0 6px, #eef2ef 6px 12px); color: var(--ink-2);
  box-shadow: inset 3px 0 0 #7d8a82, inset 0 0 0 1px var(--line-2);
}
.item.short { white-space: nowrap; text-overflow: ellipsis; padding-top: 3px; }
.item.short b { display: inline; margin-right: 6px; }

.sel {
  position: absolute; left: 4px; right: 4px; z-index: 3; border-radius: 4px; pointer-events: none;
  background: var(--green-700); color: #fff; padding: 5px 10px; font-weight: 700; font-size: .85rem;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--green-700);
}
@keyframes pop { from { transform: scale(.96); opacity: .4; } }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 3; pointer-events: none; box-shadow: 0 0 0 2px rgba(229,72,77,.15); }
.g-col:first-of-type .now-line::before, .g-times + .g-col .now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.flash-col { animation: flashcol 1.2s var(--ease); }
@keyframes flashcol { 0%, 30% { background: rgba(220,240,74,.35); } 100% { background: transparent; } }

.grid-msg { padding: 56px 20px; text-align: center; color: var(--muted); }
.grid-msg strong { display: block; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 4px; }
.grid-msg-full { grid-column: 1 / -1; padding: 22px; }

/* Auswahl-Leiste */
.sheet {
  position: sticky; bottom: 16px; z-index: 20; margin-top: 18px;
  background: var(--green-900); color: #fff; border-radius: var(--r); padding: 16px 18px;
  box-shadow: 0 10px 30px -12px rgba(12, 42, 24, .55);
  animation: rise .25s var(--ease);
}
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.sheet-body { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.sheet-info { display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.sheet-info strong { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.sheet-info span { color: rgba(255,255,255,.8); font-weight: 500; font-size: .9rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sheet-partner { flex: 1; min-width: 180px; display: grid; gap: 4px; font-size: .75rem; font-weight: 600; color: rgba(255,255,255,.7); }
.sheet-partner input { min-height: 42px; padding: 9px 12px; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); color: #fff; }
.sheet-partner input::placeholder { color: rgba(255,255,255,.45); }
.sheet-partner input:focus { border-color: var(--ball); box-shadow: 0 0 0 4px rgba(220,240,74,.2); }
.sheet-actions { display: flex; gap: 8px; }
.sheet .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); box-shadow: none; }
.sheet .btn-ghost:hover { background: rgba(255,255,255,.08); }
.sheet .btn-primary { background: var(--ball); color: var(--ball-ink); }
.sheet .btn-primary:hover { background: #e8f76a; }
.sheet-msg { margin: 10px 0 0; font-weight: 600; font-size: .88rem; color: #ffc4c6; }
.sheet-msg:empty { display: none; }
.step { display: inline-flex; background: rgba(255,255,255,.1); border-radius: 4px; overflow: hidden; }
.step button { background: transparent; color: #fff; border: 0; padding: 4px 11px; font: 700 .8rem var(--font); cursor: pointer; }
.step button + button { box-shadow: inset 1px 0 0 rgba(255,255,255,.15); }
.step button:hover { background: rgba(255,255,255,.12); }
.step button:disabled { opacity: .35; cursor: not-allowed; }

.dlg { border: 0; border-radius: var(--r-lg); padding: 0; max-width: 440px; width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
.dlg[open] { animation: pop .2s var(--ease); }
.dlg::backdrop { background: rgba(10, 30, 18, .45); backdrop-filter: blur(3px); }
.dlg-body { padding: 26px; }
.dlg-body h2 { font-size: 1.3rem; }
.dlg-body .sheet-msg { color: var(--red-600); }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: #fff; padding: 13px 20px; border-radius: 4px; font-weight: 600; font-size: .92rem;
  box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); animation: rise .25s var(--ease);
}

/* ---------- Listen & Tabellen ---------- */
.booking-list, .block-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.booking-item { display: grid; grid-template-columns: 1fr; gap: 0; padding: 0; overflow: hidden; }
.bi-court { position: relative; aspect-ratio: 16 / 6; overflow: hidden; }
.court-mini { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bi-main { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px 4px; }
.bi-main strong { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.bi-time { font-weight: 600; color: var(--green-700); }
.bi-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 20px 18px; }
@media (min-width: 720px) {
  .booking-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}
.block-item { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 16px 20px; }
.block-item div { display: flex; flex-direction: column; gap: 2px; }

.table-wrap { overflow-x: auto; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 600; font-size: .76rem; color: var(--muted); padding: 14px 16px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
:not(.table-wrap) > .table { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.row-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Verwaltung ---------- */
.subnav { display: inline-flex; gap: 2px; flex-wrap: wrap; margin: 0 0 24px; padding: 4px; background: var(--surface); border-radius: 4px; box-shadow: var(--shadow-sm); }
.subnav a { padding: 8px 16px; border-radius: 4px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem; transition: background .15s, color .15s; }
.subnav a:hover { color: var(--ink); background: var(--surface-2); }
.subnav a.is-active { background: var(--green-50); color: var(--green-700); box-shadow: inset 0 0 0 1px var(--green-100); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; padding: 20px 22px; }
.stat-n { font-weight: 700; font-size: 2.4rem; line-height: 1; letter-spacing: -0.01em; color: var(--ink); }
.stat-l { color: var(--muted); font-size: .85rem; margin-top: 8px; font-weight: 500; }
.stat:first-child .stat-n { color: var(--green); }

.court-admin { display: grid; gap: 20px; }
@media (min-width: 900px) { .court-admin { grid-template-columns: 1fr 1fr; } }
.court-card { display: grid; gap: 0; padding: 0; overflow: hidden; }
.court-card-visual { position: relative; aspect-ratio: 16 / 7.5; overflow: hidden; }
.court-card-visual .court-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.court-card-fields { display: grid; gap: 14px; padding: 20px 22px 22px; }
.court-card-fields h2 { margin: 0; }
.court-card.is-off .court-card-visual { filter: grayscale(1) brightness(1.05); opacity: .55; }
.court-new { box-shadow: inset 0 0 0 2px var(--line-2); background: var(--surface-2); }
.court-new .court-card-visual { opacity: .6; }

.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.search { display: flex; gap: 8px; }
.search input { min-height: 40px; padding: 8px 14px; width: 260px; }
.add-user { position: relative; }
.add-user summary { list-style: none; }
.add-user summary::-webkit-details-marker { display: none; }
.add-user[open] .form { position: absolute; right: 0; top: 48px; z-index: 6; width: min(360px, calc(100vw - 40px)); box-shadow: var(--shadow-lg); }

.settings { display: grid; gap: 20px; }
.hours { display: grid; gap: 6px; margin-bottom: 18px; }
.hours-row { display: grid; grid-template-columns: 170px 1fr auto 1fr; gap: 12px; align-items: center; max-width: 560px; padding: 6px 10px; border-radius: 4px; }
.hours-row:nth-child(odd) { background: var(--surface-2); }
.hours-row .switch { margin: 0; }
.hours-row input[type=time] { min-height: 40px; padding: 6px 12px; }
.hours-row:has(input[type=checkbox]:not(:checked)) input[type=time] { opacity: .35; }
.save-bar { position: sticky; bottom: 0; padding: 18px 0 10px; background: linear-gradient(rgba(243,246,244,0), var(--bg) 40%); }
.danger-zone { box-shadow: var(--shadow), inset 0 0 0 1px #f6d5d6; }
.form-inline { grid-template-columns: 1fr; max-width: 440px; }

.prose { max-width: 780px; }
.prose h1 { font-size: 1.9rem; }
.prose h2 { margin-top: 1.4em; font-size: 1.1rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

@media (max-width: 760px) {
  .topbar-in { height: auto; flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .brand-text small { display: none; }
  .who { display: none; }
  .tabs { order: 3; flex-basis: 100%; }
  .tab { flex: 1 0 auto; text-align: center; padding: 8px 9px; font-size: .8rem; }
  .main { padding-top: 18px; }
  .main, .foot, .topbar-in { padding-left: 14px; padding-right: 14px; }
  .hero { padding: 22px 18px 12px; border-radius: 4px; }
  .hero::before { width: 360px; height: 200px; right: -120px; }
  .day-nav { width: 100%; }
  .date-pick { margin-left: auto; }
  .court-tiles { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -14px 18px; padding: 4px 14px 10px; scrollbar-width: none; }
  .court-tiles::-webkit-scrollbar { display: none; }
  .tile { flex: 0 0 82%; scroll-snap-align: center; }
  .plan { padding: 14px 10px 12px; border-radius: 4px; }
  .plan-head, .plan-tip { padding: 0 6px; }
  .hours-row { grid-template-columns: 1fr auto 1fr; }
  .hours-row .switch { grid-column: 1 / -1; }
  .sheet { bottom: 10px; padding: 14px; }
  .sheet-actions { width: 100%; }
  .sheet-actions .btn { flex: 1; }
  .card { padding: 20px 18px; }
  :root { --time-col: 48px; --row: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Sperrzeiten / Trainings ---------- */
.stack { display: grid; gap: 28px; }
.list-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.count { font-size: .75rem; font-weight: 600; background: var(--surface); color: var(--muted); padding: 2px 8px; border-radius: 6px; box-shadow: var(--shadow-sm); }
.series { display: grid; gap: 14px; margin-bottom: 14px; padding: 20px; }
.series.is-open { box-shadow: 0 0 0 2px var(--green-300); }
.series-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.series-head h3 { font-size: 1.08rem; margin: 0 0 4px; }
.series-meta { margin: 0; font-size: .9rem; color: var(--ink-2); }
.occ { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.occ-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.occ-date { font-weight: 600; font-variant-numeric: tabular-nums; }
.occ-row.is-skipped .occ-date { color: var(--muted); text-decoration: line-through; }
.occ-actions { display: flex; gap: 4px; align-items: center; justify-content: flex-end; position: relative; }
.occ-actions form { margin: 0; }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.tag-off { background: var(--red-50); color: var(--red-600); }
.tag-moved { background: #fff6dc; color: #7a5a00; }
.move summary, .edit summary { list-style: none; cursor: pointer; }
.move summary::-webkit-details-marker, .edit summary::-webkit-details-marker { display: none; }
.move[open] summary { background: var(--bg); color: var(--ink); }
.move-form {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 8; width: 280px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-lg);
}
.move-form label { display: grid; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.move-form label:first-of-type, .move-form .btn { grid-column: 1 / -1; }
.move-form input { min-height: 38px; padding: 6px 10px; }
.edit summary { font-weight: 600; font-size: .88rem; color: var(--green-700); }
.edit summary::before { content: "+ "; }
.edit[open] summary::before { content: "− "; }
.edit[open] .form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.conflict { background: var(--red-50); border: 1px solid #f3c9ca; border-radius: var(--r-sm); padding: 12px 14px; font-size: .87rem; color: #6d1a1d; }
.conflict p { margin: 0 0 6px; }
.conflict ul { margin: 0 0 10px; padding-left: 1.1em; }
.block-item-main { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.block-item-main .conflict { margin-top: 10px; }
.days, .court-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.days legend, .court-pick legend { font-weight: 600; font-size: .85rem; color: var(--ink-2); margin-bottom: 8px; padding: 0; width: 100%; float: left; }
.day-tog input, .chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.day-tog span, .chip-check span {
  display: inline-grid; place-items: center; min-width: 42px; height: 38px; padding: 0 12px; border-radius: 4px; cursor: pointer;
  font-weight: 600; font-size: .87rem; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); user-select: none;
}
.day-tog input:checked + span, .chip-check input:checked + span { background: var(--green); color: #fff; box-shadow: none; }
.day-tog input:focus-visible + span, .chip-check input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.chip-check.is-dim span { opacity: .45; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: .87rem; color: var(--ink-2); }
.check-line input { width: 18px; height: 18px; accent-color: var(--green); margin-top: 1px; }
@media (max-width: 760px) {
  .occ-row { grid-template-columns: 1fr auto; }
  .occ-state { grid-column: 1; grid-row: 2; font-size: .82rem; color: var(--muted); }
  .occ-actions { grid-row: 1 / 3; grid-column: 2; flex-direction: column; align-items: flex-end; }
  .series-head { flex-direction: column; }
}
.block-form [data-when] { display: grid; gap: 16px; }
.block-form .seg { background: none; padding: 0; gap: 6px; width: auto; }
.block-form .seg label { padding: 8px 14px; box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 4px; }
.block-form .seg label:has(input:checked) { background: var(--green-50); box-shadow: inset 0 0 0 1.5px var(--green); color: var(--green-700); }

/* =========================================================
   Vereins-Look: grüner Balken wie sg-gronau.de, flache Flächen
   ========================================================= */
.topbar { background: var(--green); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; }
.topbar-in { height: 58px; gap: 28px; }
.brand { color: #fff; }
.brand-mark { background: none; box-shadow: none; width: auto; height: auto; }
.brand-mark svg { width: 28px; height: 28px; }
.brand-text strong { color: #fff; font-size: 1.05rem; }
.brand-text small { color: rgba(255,255,255,.75); }
.tabs { background: none; padding: 0; border-radius: 0; gap: 0; align-self: stretch; }
.tab {
  display: flex; align-items: center; color: rgba(255,255,255,.88); border-radius: 0; padding: 0 16px; font-weight: 500; font-size: .95rem;
  border-top: 3px solid transparent; border-bottom: 3px solid transparent;
}
.tab:hover { color: #fff; background: rgba(0,0,0,.08); }
.tab.is-active { color: #fff; background: rgba(0,0,0,.14); box-shadow: none; border-bottom-color: #fff; font-weight: 600; }
.avatar { display: none; }
.who b { color: #fff; font-weight: 600; }
.who small { color: rgba(255,255,255,.7); }
.topbar .btn-quiet { color: #fff; border: 1px solid rgba(255,255,255,.45); min-height: 32px; }
.topbar .btn-quiet:hover { background: rgba(255,255,255,.12); color: #fff; }

.hero { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; padding: 20px 20px 18px; }
.hero h1 { color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
.hero-kicker { color: var(--green); }
.hero #daySub { color: var(--muted); }
.hero .icon-btn, .hero .pill-btn, .hero .date-pick input {
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 4px; height: 40px;
}
.hero .icon-btn { width: 40px; }
.hero .icon-btn:hover, .hero .pill-btn:hover { background: var(--green-50); border-color: var(--green); color: var(--green-700); }
.hero .date-pick input { color-scheme: light; font-weight: 500; }
.hero .date-pick input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(33,133,65,.15); }

.day-strip { gap: 0; padding: 0; margin: 0; border: 1px solid var(--line-2); border-radius: 4px; overflow-x: auto; scroll-snap-type: none; }
.day-chip {
  flex: 1 0 54px; width: auto; border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 7px 0 6px;
  background: var(--surface); color: var(--ink); gap: 0;
}
.day-chip:last-child { border-right: 0; }
.day-chip small { color: var(--muted); opacity: 1; font-weight: 500; }
.day-chip b { font-size: 1.1rem; font-weight: 600; }
.day-chip:hover { background: var(--green-50); }
.day-chip.is-today small { color: var(--green); font-weight: 600; }
.day-chip.is-closed { opacity: 1; background: var(--surface-2); color: var(--grey); }
.day-chip[aria-selected="true"] { background: var(--green); color: #fff; }
.day-chip[aria-selected="true"] small { color: rgba(255,255,255,.85); }

.subnav { display: flex; width: 100%; background: none; box-shadow: none; padding: 0; gap: 0; border-radius: 0; border-bottom: 1px solid var(--line-2); }
.subnav a { border-radius: 0; padding: 10px 16px; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.subnav a:hover { background: none; color: var(--green-700); }
.subnav a.is-active { background: none; box-shadow: none; color: var(--green-700); border-bottom-color: var(--green); font-weight: 600; }

.slot::before { border-radius: 2px; inset: 1px 0; }
.item, .sel { border-radius: 3px; }
.ribbon { gap: 1px; height: 8px; }
.ribbon i, .ribbon i:first-child, .ribbon i:last-child { border-radius: 0; }
.tile-status { border-radius: 3px; }
.legend .sw, .sw { border-radius: 2px; }

@media (max-width: 760px) {
  .topbar-in { height: auto; padding-top: 8px; padding-bottom: 0; gap: 6px 12px; }
  .brand { padding-bottom: 4px; }
  .who { display: none; }
  .tabs { order: 3; flex-basis: 100%; margin: 0 -14px; }
  .tab { flex: 1 0 auto; justify-content: center; height: 42px; padding: 0 10px; font-size: .85rem; }
  .hero { padding: 16px 14px 14px; }
  .day-chip { flex: 0 0 52px; }
}

/* =========================================================
   Mittelweg: Vereinsbalken bleibt, Rundungen moderat (8–12 px)
   ========================================================= */
:root { --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-xl: 16px; }
.card, .plan, .tile, .hero, .table-wrap, .court-card, :not(.table-wrap) > .table { border-radius: 12px; }
.auth { border-radius: 16px; }
.grid-wrap { border-radius: 10px; }
.btn { border-radius: 8px; }
.btn-sm { border-radius: 7px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url], select, textarea { border-radius: 8px; }
.flash, .notice, .conflict { border-radius: 8px; }
.sheet, .dlg { border-radius: 12px; }
.toast { border-radius: 10px; }
.move-form { border-radius: 10px; }
.day-tog span, .chip-check span, .block-form .seg label { border-radius: 8px; }
.badge, .tag, .count { border-radius: 6px; }

/* Navigation: aktiver Punkt als helle Fläche im grünen Balken */
.tabs { align-self: center; gap: 4px; }
.tab { border: 0; border-radius: 8px; padding: 8px 14px; }
.tab.is-active { background: rgba(255,255,255,.18); border-bottom: 0; }
.tab:hover { background: rgba(255,255,255,.1); }
.topbar .btn-quiet { border-radius: 8px; }

/* Datum */
.hero { padding: 22px 22px 18px; }
.hero .icon-btn, .hero .pill-btn, .hero .date-pick input { border-radius: 8px; }
.day-strip { gap: 6px; border: 0; border-radius: 0; padding: 2px 0 4px; overflow-x: auto; }
.day-chip { flex: 1 0 54px; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 0 7px; }
.day-chip:last-child { border-right: 1px solid var(--line-2); }
.day-chip[aria-selected="true"] { border-color: var(--green); }

/* Platz-Karten wie vorher */
.tile { transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.tile:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line), 0 14px 30px -16px rgba(12,58,31,.35); }
.tile-status {
  top: 12px; bottom: auto; left: 12px; border-radius: 99px; padding: 6px 11px 6px 9px;
  background: rgba(255,255,255,.94); box-shadow: 0 4px 14px -4px rgba(0,0,0,.3);
}
.tile-status.is-free::before { background: #22b35a; box-shadow: 0 0 0 3px rgba(34,179,90,.22); }
.tile-status.is-busy::before { background: var(--red); box-shadow: 0 0 0 3px rgba(229,72,77,.22); }
.ribbon { gap: 1.5px; height: 10px; }
.ribbon i { border-radius: 2px; }
.ribbon i:first-child { border-radius: 5px 2px 2px 5px; }
.ribbon i:last-child { border-radius: 2px 5px 5px 2px; }

/* Zeitplan */
.slot::before { border-radius: 5px; inset: 1.5px 0; }
.item { border-radius: 7px; }
.sel { border-radius: 7px; }

@media (max-width: 760px) {
  .tabs { margin: 0 -6px 6px; gap: 2px; }
  .tab { height: auto; padding: 8px 10px; }
  .day-chip { flex: 0 0 52px; }
}

/* =========================================================
   Lesbarkeit (auch für 70+) und gezielte Animationen
   ========================================================= */
:root { --muted: #56655c; }
body { font-size: 16.5px; }
.g-time { font-size: .8rem; color: #4c5a51; }
.g-head b { font-size: 1rem; }
.btn { min-height: 46px; }
.btn-sm { min-height: 38px; }

/* Stundenlinie als Hintergrund, damit ::after frei für die Uhrzeit ist */
.slot.q4 { background: linear-gradient(var(--line), var(--line)) left bottom / 100% 1px no-repeat; }
.slot.q4::after { content: none; }
.slot:not(:disabled):hover::after, .slot:focus-visible::after {
  content: attr(data-t); position: absolute; left: 10px; right: auto; top: 50%; bottom: auto; height: auto; width: auto;
  transform: translateY(-50%); background: none; z-index: 1; pointer-events: none;
  font-size: .74rem; font-weight: 700; color: var(--green-700); letter-spacing: .01em;
}

/* "Jetzt frei" im Kopfbereich */
.now-info { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; font-size: .92rem; color: var(--ink-2); }
.now-info b { color: var(--green-700); }
.now-dot, .tile-status.is-live::before { position: relative; }
.now-dot { width: 10px; height: 10px; border-radius: 50%; background: #22b35a; display: inline-block; margin-right: 4px; }
.now-dot::after, .tile-status.is-live::after {
  content: ""; position: absolute; border-radius: 50%; background: #22b35a; opacity: .5; animation: ping 1.8s cubic-bezier(0,0,.2,1) infinite;
}
.now-dot::after { inset: 0; }
.tile-status.is-live::after { width: 8px; height: 8px; left: 9px; top: 50%; margin-top: -4px; }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

/* Größere, beschriftete Schritt-Knöpfe in der Auswahl-Leiste */
.step { border-radius: 8px; }
.step button { padding: 8px 12px; font-size: .85rem; }
.sheet-info strong { font-size: 1.2rem; }
.sheet-info span { font-size: .98rem; color: #fff; }

/* Einblenden beim ersten Laden */
@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } }
@keyframes fadeIn { from { opacity: 0; } }
.hero { animation: riseIn .45s var(--ease) both; }
.tile.enter { animation: riseIn .5s var(--ease) both; }
.tile.enter:nth-child(2) { animation-delay: .07s; }
.tile.enter:nth-child(3) { animation-delay: .14s; }
.tile.enter:nth-child(4) { animation-delay: .21s; }
.tile.enter:nth-child(n+5) { animation-delay: .28s; }
.plan { animation: riseIn .5s .12s var(--ease) both; }
.tile.enter .ribbon { animation: ribbonFill .9s .25s cubic-bezier(.3,.7,.2,1) both; }
@keyframes ribbonFill { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Tagwechsel */
.day-title.swap h1, .day-title.swap #daySub { animation: swapIn .35s var(--ease) both; }
@keyframes swapIn { from { opacity: 0; transform: translateX(-8px); } }
.grid, .court-tiles { transition: opacity .2s; }
.grid.is-loading, .court-tiles.is-loading { opacity: .4; }
.day-chip { transition: background .2s, color .2s, border-color .2s, transform .15s var(--ease); }
.day-chip:active { transform: scale(.96); }

/* Auswahl wächst weich mit */
.sel { transition: top .12s ease-out, height .12s ease-out; }

/* frisch gebucht */
.item.is-new { animation: newItem 1.8s var(--ease); }
@keyframes newItem {
  0% { transform: scale(.94); box-shadow: 0 0 0 0 rgba(220,240,74,.9); }
  30% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(220,240,74,.35); }
  100% { transform: none; box-shadow: inset 0 0 0 1px rgba(120,140,0,.35); }
}

/* Knöpfe reagieren spürbar */
.btn, .icon-btn, .pill-btn { transition: background .15s, border-color .15s, color .15s, transform .1s var(--ease); }
.icon-btn:active, .pill-btn:active { transform: scale(.95); }

@media (prefers-reduced-motion: reduce) {
  .now-dot::after, .tile-status.is-live::after { display: none; }
}

/* ---------- Schnell buchen ---------- */
.quick { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 18px 20px 16px; margin-bottom: 20px; animation: riseIn .5s .06s var(--ease) both; }
.quick-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.quick-head h2 { margin: 0 0 2px; }
.quick-sub { margin: 0; color: var(--muted); font-size: .9rem; }
.dur { display: inline-flex; background: var(--bg); border-radius: 10px; padding: 4px; gap: 2px; }
.dur button {
  font: 600 .92rem var(--font); color: var(--ink-2); background: none; border: 0; border-radius: 8px; padding: 9px 16px; cursor: pointer; min-height: 40px;
  transition: background .15s, color .15s, box-shadow .15s;
}
.dur button:hover { color: var(--green-700); }
.dur button[aria-checked="true"] { background: var(--surface); color: var(--green-700); box-shadow: 0 1px 3px rgba(15,45,25,.12), 0 0 0 1px var(--line); }
.slots-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.slot-chip {
  flex: 0 0 auto; min-width: 92px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--green-100); background: var(--green-50); color: var(--green-900);
  font: inherit; cursor: pointer; text-align: left; transition: background .15s, border-color .15s, transform .12s var(--ease);
}
.slot-chip b { font-size: 1.08rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.slot-chip small { font-size: .74rem; color: var(--green-700); font-weight: 500; white-space: nowrap; }
.slot-chip:hover { background: var(--green-100); border-color: var(--green-300); transform: translateY(-1px); }
.slot-chip:active { transform: scale(.97); }
.slot-chip:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.quick-empty { margin: 4px 0; color: var(--muted); font-size: .92rem; }

/* Platzwechsel in der Buchungsleiste */
.sheet-alt { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .82rem; color: rgba(255,255,255,.7); margin-top: 4px; }
.sheet-alt:empty { display: none; }
.sheet-alt button {
  font: 600 .82rem var(--font); color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 7px; padding: 5px 10px; cursor: pointer;
}
.sheet-alt button:hover { background: rgba(255,255,255,.22); }
@media (max-width: 760px) {
  .quick { padding: 16px 14px 12px; }
  .dur { width: 100%; }
  .dur button { flex: 1; padding: 9px 6px; }
}
.slot-chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.slot-chip.is-active small { color: rgba(255,255,255,.85); }

/* =========================================================
   Zeitplan im Kalender-Stil
   ========================================================= */
.grid-wrap { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.g-head { padding: 12px 14px 10px; background: rgba(255,255,255,.96); gap: 6px 8px; }
.g-head b { font-size: 1rem; }
.g-dot { border-radius: 3px; }
.g-status { flex-basis: auto; margin-left: auto; font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.g-status.is-free { background: var(--green-50); color: #157a3c; }
.g-status.is-busy { background: var(--red-50); color: var(--red-600); }

/* freie Fläche: eine ruhige grüne Spalte mit Stunden- und Halbstundenlinien */
.g-col { padding: 0 6px; background: #f2faf5; transition: background-color .2s; }
.g-col:hover { background: #ebf7ef; }
.g-col + .g-col, .g-times + .g-col { box-shadow: inset 1px 0 0 var(--line); }
.slot { background: none; }
.slot::before { content: ""; position: absolute; inset: 1px -2px; border-radius: 6px; background: transparent; box-shadow: none; transition: background .12s; }
.slot.q4 { background: linear-gradient(#dbe9e0, #dbe9e0) left bottom / 100% 1px no-repeat; }
.slot.q2 { background: repeating-linear-gradient(90deg, #dbe9e0 0 4px, transparent 4px 9px) left bottom / 100% 1px no-repeat; }
.slot.q4, .slot.q2 { margin: 0 -6px; width: calc(100% + 12px); padding: 0 6px; }
.slot.q4::before, .slot.q2::before { left: 4px; right: 4px; }
.slot:not(:disabled):hover::before { background: var(--green-100); box-shadow: inset 0 0 0 1.5px var(--green-300); }
.slot:not(:disabled):hover::after, .slot:focus-visible::after { left: 14px; }
.slot.past::before { background: none; }
.slot.past { background-color: #f3f4f3; }
.slot.past.q4, .slot.past.q2 { background-color: #f3f4f3; }
.grid.is-locked .slot:not(.past)::before { background: none; box-shadow: none; }
.grid.is-locked .g-col { background: var(--surface-2); }

/* Buchungen als Karten */
.item {
  left: 6px; right: 6px; border-radius: 8px; padding: 6px 10px 6px 12px; font-size: .8rem;
  box-shadow: 0 1px 2px rgba(15,45,25,.12), 0 4px 10px -6px rgba(15,45,25,.3);
}
.item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.item.booked { background: #e5484d; }
.item.booked::before { background: #b42529; }
.item.own { background: #e3f257; box-shadow: 0 1px 2px rgba(80,90,0,.2), 0 4px 10px -6px rgba(80,90,0,.4); }
.item.own::before { background: #9bab12; }
.item.block { background: repeating-linear-gradient(135deg, #e7ebe8 0 6px, #f2f4f2 6px 12px); box-shadow: inset 0 0 0 1px var(--line-2); }
.item.block::before { background: #7d8a82; }
.item b { font-size: .84rem; }
.item:hover { filter: none; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(15,45,25,.14), 0 8px 18px -8px rgba(15,45,25,.4); }
.item.block:hover { box-shadow: inset 0 0 0 1px var(--line-2); }

/* Auswahl */
.sel { left: 4px; right: 4px; border-radius: 8px; background: var(--green-700); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--green-300), 0 10px 20px -10px rgba(12,58,31,.6); }
.sel::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 24px; height: 3px; margin-left: -12px; border-radius: 3px; background: rgba(255,255,255,.55); }

/* Jetzt-Linie mit Uhrzeit */
.now-line { height: 2px; background: var(--red); box-shadow: none; }
.now-line::before { display: none; }
.g-times { position: sticky; }
.now-tag {
  position: absolute; right: 4px; z-index: 4; transform: translateY(-50%);
  background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 5px; border-radius: 5px; font-variant-numeric: tabular-nums;
}
.g-time span { font-weight: 600; }
.g-col { padding: 0; }
.slot, .slot.q4, .slot.q2 { margin: 0; width: 100%; padding: 0; }
.slot::before, .slot.q4::before, .slot.q2::before { left: 6px; right: 6px; }
.sw-free { background: #e3f4e9; box-shadow: inset 0 0 0 1px var(--green-300); }

/* =========================================================
   Zeitplan: klar getrennte Platz-Spalten
   ========================================================= */
.grid-wrap { background: var(--surface); box-shadow: none; border-radius: 0; padding: 0 2px 4px; }
.grid { column-gap: 10px; }
.g-corner { background: var(--surface); border-bottom: 0; }

.g-head {
  background: var(--surface); border: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  border-radius: 10px 10px 0 0; padding: 14px 14px 10px; margin-top: 2px;
  box-shadow: inset 0 5px 0 #c4643a; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
}
.g-head-hard { box-shadow: inset 0 5px 0 #3569b0; }
.g-head-grass { box-shadow: inset 0 5px 0 #3d9e55; }
.g-head-indoor { box-shadow: inset 0 5px 0 #2f7f59; }
.g-head .g-dot { display: none; }
.g-head b { font-size: 1.08rem; font-weight: 700; flex: 1 1 auto; }
.g-status { margin-left: 0; }

.g-col {
  background: #eaf6ee; border: 1px solid var(--line-2); border-top: 0; border-radius: 0 0 10px 10px; overflow: hidden;
}
.g-col + .g-col, .g-times + .g-col { box-shadow: none; }
.g-col:hover { background: #e2f2e7; }
.slot.band, .slot.band.q4, .slot.band.q2 { background-color: #def0e4; }
.slot.q4 { background-image: linear-gradient(#c6dccf, #c6dccf); }
.slot.q2 { background-image: repeating-linear-gradient(90deg, #cfe3d6 0 4px, transparent 4px 9px); }
.slot.past, .slot.past.band, .slot.past.q4, .slot.past.q2 { background-color: #eef0ef; }
.slot:not(:disabled):hover::before { background: #fff; box-shadow: inset 0 0 0 2px var(--green); }

.g-times { background: var(--surface); }
.g-time { padding-right: 8px; }
.g-time.band { background: transparent; }
.g-time span { font-size: .8rem; color: var(--ink-2); font-weight: 700; }

.item { left: 5px; right: 5px; }
.item.booked { background: #d93a3f; }
.grid.is-locked .g-col { background: var(--surface-2); }

@media (max-width: 760px) {
  .grid { column-gap: 6px; }
  .g-head { padding: 12px 10px 8px; }
  .g-head b { font-size: 1rem; }
}

/* =========================================================
   Zeitplan ohne eigenen Scrollbereich – ganzer Tag sichtbar
   ========================================================= */
:root { --time-col-r: 52px; --row: 22px; }
.grid-wrap { max-height: none; overflow: visible; padding: 0; }
.g-corner, .g-head { top: 58px; }                 /* klebt unter der grünen Navigation */
.g-corner { z-index: 5; }
.g-times-r { position: static; }
.g-times-r .g-time { text-align: left; padding: 0 0 0 10px; }
.g-times-r .g-time span { left: 10px; right: auto; }

.plan { padding: 22px 22px 22px; }
.plan-head h2 { font-size: 1.25rem; }
.g-head { padding: 14px 14px 12px; }
.g-head b { font-size: 1.12rem; }
.g-col { border-radius: 0 0 12px 12px; }
.g-head { border-radius: 12px 12px 0 0; }
.g-time span { font-size: .82rem; }

/* letzte Zeile: Schlusszeit als Beschriftung */
.g-times { padding-bottom: 0; }

@media (max-width: 760px) {
  :root { --time-col-r: 0px; }
  .g-times-r, .g-corner-r { visibility: hidden; overflow: hidden; padding: 0; }
  .grid-wrap { overflow-x: auto; overflow-y: visible; }
  .g-corner, .g-head { top: 0; }
  .plan { padding: 14px 10px 14px; }
}
.g-times { position: relative; }
.g-times:not(.g-times-r) { position: sticky; }
.g-time-end { position: absolute; left: 0; right: 0; bottom: 0; height: 0; }
.g-time-end span { position: absolute; right: 10px; top: -.6em; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.g-times-r .g-time-end span { left: 10px; right: auto; }
.grid-wrap.is-fit { overflow: visible; }
.grid-wrap.is-fit .g-corner, .grid-wrap.is-fit .g-head { top: var(--stick-top, 58px); }
@media (max-width: 760px) {
  .grid-wrap.is-fit .grid { column-gap: 5px; }
  .grid-wrap.is-fit .g-head { padding: 12px 8px 8px; flex-direction: column; align-items: flex-start; }
  .grid-wrap.is-fit .g-head b { font-size: .95rem; }
  .grid-wrap.is-fit .g-status { font-size: .66rem; padding: 2px 6px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .grid-wrap.is-fit .item { left: 3px; right: 3px; padding: 5px 6px 5px 9px; font-size: .72rem; }
  .grid-wrap.is-fit .item b { font-size: .76rem; }
  .grid-wrap.is-fit .slot:not(:disabled):hover::after { left: 8px; }
}
