:root {
  --bg: #f6f7f3;
  --ink: #172019;
  --muted: #617067;
  --line: #cfd8cf;
  --panel: #ffffff;
  --court: #e9f3ea;
  --court-hover: #dbeada;
  --accent: #1f7a4d;
  --accent-ink: #ffffff;
  --warn: #9f2f2f;
  --magnet-waiting: #9fd3ff;
  --magnet-complete: #1f4f8f;
  --magnet-ink: #ffffff;
  --magnet-waiting-ink: #12304d;
  --shadow: 0 8px 24px rgba(23, 32, 25, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  -webkit-text-size-adjust: 100%;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 14px;
  cursor: pointer;
}

button.secondary {
  background: #e5ebe5;
  color: var(--ink);
}

button.danger {
  background: var(--warn);
}

input,
select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 10px;
  max-width: 100%;
}

button,
.nav-button,
.logout-link {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e8f3ee, #eef4fb);
}

.login-page .login-shell {
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.login-shell {
  width: min(420px, calc(100vw - 32px));
}

.login-card {
  display: grid;
  gap: 14px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-card h1,
.login-card p {
  margin: 0;
}

.login-notice {
  padding: 10px 12px;
  border: 1px solid #9fc9ad;
  border-radius: 8px;
  background: #eaf6ef;
  color: #185c3b;
  font-weight: 600;
}

.login-card p {
  color: var(--muted);
}

.login-card label {
  font-weight: 700;
}

.login-card button {
  margin-top: 8px;
}
.login-card button[type="submit"] { font-weight:800;text-align:center; }
.registration-link { margin-top:4px;background:#e5ebe5;color:var(--ink);font-weight:400;text-align:center;justify-content:center; }
.registration-shell { width:min(680px,calc(100vw - 32px));padding-block:24px; }
.registration-card { gap:12px; }
.registration-card>label:not(.registration-consent) { display:grid;gap:6px; }
.registration-grid { display:grid;grid-template-columns:1fr 1fr;gap:14px; }
.registration-grid label { display:grid;gap:6px;font-weight:700;color:var(--muted); }
.registration-consent { display:flex;align-items:flex-start;gap:10px;font-size:13px; }
.registration-consent input { flex:0 0 auto;min-height:22px;margin:1px 0 0; }
.registration-honeypot { position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important; }
.registration-success { text-align:center; }
.registration-success .nav-button { justify-content:center;margin-top:8px; }
.member-card.is-pending { border:2px solid #d49a24;background:#fff8e7; }
.member-card.is-pending small { color:#805600;font-weight:800; }
.approve-member { background:#176b42;color:#fff; }
@media(max-width:600px){.registration-grid{grid-template-columns:1fr}.registration-shell{width:min(100% - 20px,680px)}}

.login-error {
  padding: 10px 12px;
  border: 1px solid #e3a1a1;
  border-radius: 8px;
  color: #8d1f1f;
  background: #fff1f1;
}

/* Öffentliche Startseite mit anonymisierter Wochenbelegung. */
.login-page { display:block;min-height:100dvh;background:#f3f6f3; }
.public-home { width:min(1380px,100%);margin:auto;padding:24px; }
.public-welcome { display:grid;grid-template-columns:minmax(0,1fr) 220px;align-items:center;gap:36px;padding:clamp(32px,6vw,72px);border-radius:28px;background:linear-gradient(135deg,#eef7f0,#fff);box-shadow:var(--shadow); }
.public-welcome h1 { max-width:760px;margin:0 0 16px;font-size:clamp(38px,6vw,70px);line-height:1;letter-spacing:-.05em;color:var(--ink); }
.public-welcome p { max-width:720px;color:var(--muted);font-size:18px; }
.public-welcome-mark { display:grid;width:190px;height:190px;place-items:center;border-radius:50%;background:#1f7a4d;color:#fff;font-size:92px;box-shadow:0 24px 55px rgba(31,122,77,.24); }
.public-board-panel { margin-top:24px;padding:22px;border:1px solid var(--line);border-radius:24px;background:#fff;box-shadow:var(--shadow); }
.public-board-toolbar { display:grid;grid-template-columns:1fr;gap:18px;align-items:end;text-align:center; }
.public-board-toolbar h2 { margin:0 0 5px;font-size:clamp(25px,4vw,38px); }
.public-board-toolbar p { margin:0;color:var(--muted); }
.public-date-controls { --public-picker-height:37.5px;display:grid;grid-template-columns:44px 44px minmax(83px,113px) 44px 44px;gap:3px;width:min(100%,301px);align-items:center;justify-self:center;justify-content:center; }
.public-date-controls>* { box-sizing:border-box;min-width:0;width:100%;height:var(--public-picker-height);min-height:var(--public-picker-height);max-height:var(--public-picker-height);margin:0;padding:3px;text-align:center; }
.public-week-days { display:grid;grid-template-columns:repeat(7,1fr);gap:7px;margin:18px 0 12px; }
.public-week-days button { display:grid;gap:2px;padding:10px 5px;border:1px solid var(--line);border-radius:10px;background:#f4f7f4;color:var(--ink);box-shadow:none; }
.public-week-days button.is-selected { border-color:var(--accent);background:#e4f3e9;color:var(--accent); }
.public-week-days button:disabled { opacity:.35;cursor:not-allowed; }
.public-week-days span { font-size:12px; }
.public-board-scroll { width:100%;overflow:auto;padding:0;border:1px solid #cbd5cf;border-radius:14px;background:#fff;box-shadow:0 6px 18px #1734230f;scrollbar-gutter:stable; }
.public-board { width:2164px;min-width:2164px;table-layout:fixed;border-collapse:separate;border-spacing:0;background:#fff; }
.public-board th { height:46px;padding:4px;border:0;background:#e8edea;color:#26332c;text-align:center; }
.public-board thead th:first-child,.public-board tbody th { position:sticky;left:0;z-index:3;width:64px;min-width:64px;font-weight:900; }
.public-board thead th { position:sticky;top:0;z-index:2;border-bottom:2px solid #9eaca4;background:#e1e7e3;box-shadow:0 3px 8px #17342312; }
.public-board thead th:first-child { z-index:4; }
.public-board th small { display:block;font-size:8px; }
.public-board td { width:37.5px;min-width:37.5px;height:58px;padding:0;border:0;border-bottom:1px solid #e5ebe7;cursor:pointer;transition:filter .15s ease; }
.public-board tbody th{border-bottom:1px solid #cbd5cf;background:#e3e9e5;font-size:25px;box-shadow:3px 0 8px #17342312}
.public-board td.is-free { background:#fff; }
.public-board td.is-free.public-hour-end{box-shadow:inset -1px 0 #d8ddda}
.public-board td.is-occupied{width:auto;min-width:0;border:4px solid #fff;border-radius:9px;background-clip:padding-box;box-shadow:inset 0 0 0 1px #293b33,0 2px 6px #122b2026}
.public-board td.is-occupied:hover,.public-board td.is-occupied:focus-visible{filter:brightness(1.06)}
.public-booking-label{display:grid;place-content:center;height:100%;min-width:0;padding:4px 8px;color:#fff;text-align:center}.public-booking-label strong{overflow:hidden;font-size:11px;letter-spacing:.02em;text-overflow:ellipsis;white-space:nowrap}.public-booking-label small{font-size:9px;opacity:.86}
.public-board td.is-occupied { background:#45484a; }
.public-board td:hover,.public-board td:focus-visible { outline:3px solid #1f7a4d;outline-offset:-3px; }
.public-privacy-note { margin:12px 0 0;color:var(--muted);font-size:13px; }
.public-board td.is-occupied{position:relative;border-color:#6d7777;box-shadow:inset 4px 0 rgba(29,42,48,.55)}.public-board td.public-type-single{background:#41627a}.public-board td.public-type-double{background:#526f63}.public-board td.public-type-group{background:#685f7c}.public-board td.public-type-training{background:#5d7183}.public-board td.public-type-team{background:#70664f}.public-board td.public-type-competition{background:#765a61}.public-board td.public-type-closed{background:#666b6d}.public-board [data-public-tooltip]::after{content:attr(data-public-tooltip);position:absolute;z-index:20;left:50%;bottom:calc(100% + 7px);width:max-content;max-width:min(260px,80vw);padding:8px 10px;border:1px solid #34434b;border-radius:8px;background:#182832;color:#fff;box-shadow:0 7px 20px #0004;font-size:12px;font-weight:700;white-space:normal;opacity:0;pointer-events:none;transform:translate(-50%,4px);transition:.15s}.public-board [data-public-tooltip]:hover::after,.public-board [data-public-tooltip]:focus::after,.public-board [data-public-tooltip].tooltip-open::after{opacity:1;transform:translate(-50%,0)}
.public-login-section { display:grid;place-items:center;padding:70px 16px; }
.public-login-section .login-card { width:min(480px,100%); }
.public-login-section .login-card h2 { margin:0;font-size:28px; }

@media(max-width:700px){
  .public-home{padding:10px}.public-welcome{grid-template-columns:1fr;padding:30px 22px}.public-welcome-mark{display:none}.public-board-panel{padding:13px}.public-board-toolbar{grid-template-columns:1fr}.public-date-controls{grid-template-columns:44px 44px minmax(59px,83px) 44px 44px;width:100%;justify-self:center;justify-content:center;gap:3px}.public-date-controls>*{height:var(--public-picker-height)}.public-week-days{gap:3px;overflow-x:auto}.public-week-days button{min-width:60px}.public-login-section{padding:42px 4px}
}

.logout-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  padding: 0 12px;
}

.nav-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 14px;
  font-weight: 700;
  text-decoration: none;
}

.members-layout {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}
.members-intro { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; border: 1px solid #b8d6c4; border-radius: 10px; background: #eaf6ef; color: #185c3b; }

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.member-form {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.member-form label {
  margin-top: 4px;
  font-weight: 700;
}

.member-form label small {
  font-weight: 400;
}

.member-form .checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0;
  color: var(--ink);
}

.checkbox-row input {
  min-height: auto;
  width: 18px;
  height: 18px;
}

.member-partner-search {
  position: relative;
}

.member-partner-search input {
  width: 100%;
}

.selected-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 8px;
}

.partner-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: #e5ebe5;
  padding: 4px 5px 4px 10px;
}

.partner-chip button {
  min-height: 24px;
  width: 24px;
  padding: 0;
  border-radius: 50%;
}

.form-message {
  min-height: 22px;
  color: var(--warn);
  font-weight: 600;
}

.member-filter {
  width: 100%;
  margin: 14px 0;
}

.member-cards {
  display: grid;
  gap: 10px;
}

.member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.member-card.is-inactive {
  opacity: .62;
  background: #f1f2f1;
}

.member-card div:first-child {
  display: grid;
  gap: 3px;
}

.member-card span,
.member-card small {
  color: var(--muted);
}

.member-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.member-color-dot { display: inline-block; width: 14px; height: 14px; margin-right: 7px; border: 1px solid rgba(0,0,0,.2); border-radius: 50%; vertical-align: -1px; }
.color-picker-row { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.color-picker-row input[type="color"] { width: 64px; padding: 3px; cursor: pointer; }

@media (max-width: 820px) {
  .welcome-panel { align-items: flex-start; flex-direction: column; }
  .overview-summary { grid-template-columns: 1fr; }
  .overview-booking { grid-template-columns: 1fr; }

  .members-layout { grid-template-columns: 1fr; }
  .members-intro { align-items: flex-start; flex-direction: column; }
  .members-intro > span { display: none; }
  .member-card { align-items: flex-start; flex-direction: column; }
  .member-actions { justify-content: flex-start; }
  .members-layout,
  .booking-overview { padding: 12px; }
  .members-topbar .header-actions,
  body > .topbar .header-actions { width: 100%; }
  .header-actions > a { flex: 1 1 150px; }
}

.topbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.4fr) minmax(170px, auto);
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  font-weight: 600;
}

h2 {
  font-size: 16px;
  font-weight: 600;
}

.topbar p,
.rules,
.selected,
label {
  color: var(--muted);
}

.data-status {
  margin-top: 4px;
  font-weight: 600;
}

.session-status {
  margin-top: 4px;
  font-weight: 600;
  color: var(--ink);
}

.data-status[data-mode="remote"] {
  color: var(--accent);
}

.date-box {
  display: grid;
  gap: 6px;
  min-width: 170px;
}
.load-level-0{--load-color:#238443;--load-ink:#fff}.load-level-1{--load-color:#8fd18b;--load-ink:#17341f}.load-level-2{--load-color:#f1db65;--load-ink:#3f3505}.load-level-3{--load-color:#eea447;--load-ink:#402000}.load-level-4{--load-color:#ef8b83;--load-ink:#4b1010}.load-level-5{--load-color:#c93636;--load-ink:#fff}
.date-load-title { grid-column:1/-1;display:flex;align-items:baseline;gap:8px;margin:8px 0 0;color:var(--ink);font-size:12px; }
.date-load-title span { color:var(--muted);font-size:11px; }
.date-load-picker { grid-column:1/-1;display:flex;gap:6px;max-width:100%;overflow-x:auto;padding:3px 1px 7px;scroll-snap-type:x proximity;scrollbar-width:thin; }
.date-load-day { flex:0 0 auto;min-width:78px;min-height:48px;display:grid;gap:2px;place-items:center;padding:6px;border:2px solid transparent;border-radius:10px;background:var(--load-color);color:var(--load-ink);scroll-snap-align:start;box-shadow:none; }
.date-load-day span{font-size:11px}.date-load-day strong{font-size:13px}.date-load-day strong small{font-size:9px;font-weight:800}.date-load-day.is-selected{border-color:var(--ink);box-shadow:0 0 0 2px #fff inset}.date-load-day:hover{filter:brightness(.93)}
@media(max-width:600px){.date-load-day{min-width:72px}.date-load-picker{margin-inline:-2px}}

.date-step-label { display: flex; align-items: center; gap: 7px; font-weight: 700; }
.date-time-choice { display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:18px; }
.date-time-choice > div { display:grid;gap:7px; }
.date-time-choice input,.date-time-choice select { width:100%; }
.quick-window-label { margin-top:5px;color:var(--muted);font-size:13px;font-weight:700; }
.board-date-navigation { display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:8px;margin:12px 0; }
.board-date-navigation button { min-height:44px; }
.compact-date-button { min-width:44px;padding:8px 10px;font-size:18px;line-height:1; }
.date-inline-nav { display:grid;grid-template-columns:44px 44px minmax(145px,1fr) 44px 44px;gap:6px;align-items:center; }
.board-overview-header { display:none; }
.overview-date-row { display:grid;grid-template-columns:44px 44px minmax(140px,220px) 44px 44px;gap:6px;align-items:center; }
.time-utilization { display:grid;gap:8px;padding:10px;border:1px solid var(--line);border-radius:10px;background:#f7faf7; }
.time-utilization > div { display:grid;grid-template-columns:repeat(4,1fr);gap:6px; }
.utilization-chip { display:grid;gap:2px;min-width:0;padding:7px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink);text-align:center;box-shadow:none; }
.utilization-chip:hover,.utilization-chip.is-selected { border-color:var(--accent);background:#eaf6ef; }
.utilization-chip small,.guest-help { color:var(--muted); }
.guest-booking-action{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}.guest-add-button{width:auto;min-height:36px;padding:7px 12px;font-size:.85rem}.guest-booking-action .guest-help{margin:0}
.guest-help { display:block;margin-top:5px; }
.board-overview-page .booking-guide,.board-overview-page .workflow-controls,.board-overview-page #bookingDate,.board-overview-page .device-booking-flow,.board-overview-page #playerHome,.board-overview-page .sidebar,.board-overview-page .board-step,.board-overview-page .board-wrap > .board-date-navigation,.board-overview-page .quick-availability,.board-overview-page .full-board-toggle,.board-overview-page .mobile-bottom-nav { display:none!important; }
.board-overview-page .layout { display:block;max-width:none; }
.board-overview-page .board-wrap { display:block!important; }
.board-overview-page .board-overview-header { display:grid;grid-template-columns:1fr auto;gap:14px;align-items:start;margin-bottom:14px; }
.board-overview-page .overview-date-row { grid-column:1/-1; }
.board-overview-page #boardScroll { display:block!important;max-height:none; }
.board-overview-page #boardScroll { max-height:calc(100dvh - 245px);overflow:auto;overscroll-behavior:contain; }
.board-overview-page .board-scroll .board thead th { position:sticky!important;top:0!important;z-index:40!important; }
.board-overview-page .board-scroll .board tbody .time-cell { position:sticky!important;left:0!important;z-index:39!important; }
.board-overview-page .board-scroll .board thead th:first-child { position:sticky!important;top:0!important;left:0!important;z-index:45!important; }
.magnet-page-main { display:grid;grid-template-rows:auto minmax(0,1fr);gap:12px;height:calc(100dvh - 112px);padding:12px;overflow:hidden; }
.magnet-page-toolbar { display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:10px;align-items:center;padding:12px; }
.magnet-page-toolbar .overview-date-row { grid-column:2;grid-row:1; }
.magnet-page-toolbar .data-status { grid-column:1/-1; }
.magnet-page-board { min-height:0;height:100%;padding:0;overflow:hidden; }
.magnet-page-board .board-scroll { display:block;width:100%;height:100%;max-width:100%;max-height:100%;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;scrollbar-gutter:stable both-edges;-webkit-overflow-scrolling:touch; }
.magnet-page-board .board thead th { position:sticky!important;top:0!important;z-index:40!important; }
.magnet-page-board .board tbody .time-cell { position:sticky!important;left:0!important;z-index:39!important; }
.magnet-page-board .board thead th:first-child { position:sticky!important;top:0!important;left:0!important;z-index:45!important; }
.magnet-page-board .overview-free-slot.is-hour-free { cursor:pointer;outline:1px solid rgba(31,79,143,.18);outline-offset:-2px; }
.magnet-page-board .court-number small{display:block;font-size:9px;line-height:1;letter-spacing:.02em;white-space:nowrap}.magnet-page-board .court-number strong{display:block;font-size:22px;line-height:1.05;overflow:hidden;text-overflow:ellipsis}
.magnet-page-board .overview-free-slot.is-hour-free:hover,.magnet-page-board .overview-free-slot.is-hour-free:focus-visible { background:#dff3e5;outline:3px solid var(--accent);outline-offset:-3px; }
.magnet-page-board .overview-free-slot:not(.is-hour-free) { opacity:1;cursor:not-allowed; }
.magnet-page{background:#d7d5ca}.magnet-page-board{background:#ebe9df;border:10px solid #9b9b91;box-shadow:inset 0 0 0 2px #f7f6ed,0 8px 24px rgba(20,25,21,.25)}.magnet-page-board .board{table-layout:fixed;min-width:1500px;border-collapse:collapse;background:#efeee6}.magnet-page-board .board thead th{height:48px;padding:4px 0;background:#deddd3;color:#20231f;border:1px solid #373b36;font-size:15px}.magnet-page-board .board thead th:first-child{width:64px;font-size:12px}.magnet-page-board .board thead small{display:block;font-size:8px;letter-spacing:.05em}.magnet-page-board .board tbody tr{height:58px}.magnet-page-board .board tbody td{width:25px;min-width:25px;padding:0;border:1px solid #555a54}.magnet-page-board .board .court-number{position:sticky;left:0;z-index:39;width:64px;min-width:64px;background:#e5e4dc;color:#1c201c;border:2px solid #30342f;font-size:30px;font-weight:900;text-align:center}.magnet-page-board .quarter-0,.magnet-page-board .quarter-1{background:#45464b}.magnet-page-board .quarter-2,.magnet-page-board .quarter-3{background:#e6e5dd}.magnet-page-board .booking-cell{padding:3px;background:#e6e5dd}.magnet-page-board .magnet{min-height:28px;border-radius:2px;border:1px solid rgba(0,0,0,.55);box-shadow:1px 2px 2px rgba(0,0,0,.4);transform:rotate(-.4deg);font-size:10px;overflow:hidden}.magnet-page-board tr:nth-child(even) .magnet{transform:rotate(.35deg)}.magnet-page-board .magnet-names{display:flex;align-items:center;justify-content:space-around;height:100%;gap:4px;white-space:nowrap}.magnet-page-board .overview-free-slot.is-hour-free{cursor:pointer}.magnet-page-board .overview-free-slot.is-hour-free:hover{box-shadow:inset 0 0 0 3px #4d9d68}
body.role-player[data-workflow-step="3"] #boardScroll { max-height:calc(100dvh - 285px);overflow:scroll;scrollbar-gutter:stable both-edges; }
@media(max-width:600px){.magnet-page-main{height:calc(100dvh - 145px);padding:8px}.magnet-page-toolbar{grid-template-columns:1fr}.magnet-page-toolbar .overview-date-row{grid-column:1;grid-row:auto;width:100%}}
.board-wrap > .board-date-navigation { margin:0 0 14px; }
body.role-player .board-wrap > .board-date-navigation { grid-template-columns:repeat(2,minmax(120px,1fr)); }
.board-date-navigation button:disabled { opacity:.4;cursor:not-allowed; }
.field-step-number { display: inline-grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: var(--accent); color: white; font-weight: 800; }

.session-countdown {
  justify-self: end;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.session-countdown-warning { color: var(--warn); }
.session-countdown-slot { display:flex;align-items:center;min-height:20px; }
.unified-player-header .header-identity { min-width:0; }
.unified-player-header .welcome-panel { min-width:0; }

.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  padding: 18px;
}

.booking-guide { display: flex; align-items: stretch; justify-content: center; gap: 12px; padding: 14px 18px 0; }
.guide-step { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.guide-step > span:first-child, .step-heading > span:first-child { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--accent); color: white; font-weight: 800; }
.guide-step > span:last-child { display:grid;gap:2px;min-width:0;width:auto;height:auto;place-items:start;border-radius:0;background:transparent;color:var(--ink); }
.guide-step strong { display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.guide-step small, .step-help, .board-step p { color: var(--muted); }
.guide-arrow { align-self: center; color: var(--accent); font-size: 22px; font-weight: 800; }
.step-heading { display: flex; align-items: center; gap: 10px; }
.step-heading h2 { margin: 0; }
.step-help { margin: 8px 0 12px; }
.field-label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 700; }
.board-step { position: sticky; left: 0; z-index: 7; padding: 12px 14px; background: #f8faf8; border-bottom: 1px solid var(--line); }
.board-step p { margin: 5px 0 0 40px; }

.welcome-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin: 0; padding: 10px 14px; border: 1px solid #b8d6c4;
  border-radius: 8px; background: #eaf6ef;
}
.welcome-panel h2 { margin-bottom: 6px; color: var(--accent); font-size: 18px; }
.next-bookings { display: grid; gap: 3px; color: var(--muted); }
.header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.player-icon-actions {
  position:relative;
  z-index:120;
  display:flex;
  justify-content:flex-start;
  gap:8px;
  margin-top:10px;
}
.player-icon-actions a {
  position:relative;
  display:grid;
  width:44px;
  height:44px;
  flex:0 0 44px;
  place-items:center;
  border:1px solid #b8d6c4;
  border-radius:12px;
  background:#fff;
  color:var(--accent);
  box-shadow:0 4px 12px rgba(23,63,42,.08);
  pointer-events:auto;
  touch-action:manipulation;
}

/* Version 5.8: Die reine Magnettafel bleibt unabhängig vom Assistentenschritt sichtbar. */
body.board-overview-page .layout,
body.board-overview-page #bookingBoard,
body.board-overview-page #boardScroll { display:block!important; }
body.board-overview-page .booking-guide,
body.board-overview-page .workflow-controls,
body.board-overview-page #bookingDate,
body.board-overview-page .device-booking-flow,
body.board-overview-page #playerHome,
body.board-overview-page .sidebar,
body.board-overview-page .board-step,
body.board-overview-page .board-wrap > .board-date-navigation,
body.board-overview-page .quick-availability,
body.board-overview-page .full-board-toggle,
body.board-overview-page .mobile-bottom-nav { display:none!important; }
body.board-overview-page .board-overview-header { display:grid!important; }
.player-icon-actions svg { width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round; }
.player-icon-actions a:hover,.player-icon-actions a:focus-visible { background:#eaf6ef;outline:2px solid var(--accent);outline-offset:2px; }
.player-icon-actions a::after {
  content:attr(data-label);
  position:absolute;
  z-index:110;
  top:calc(100% + 7px);
  right:0;
  width:max-content;
  padding:5px 8px;
  border-radius:6px;
  background:#173f2a;
  color:#fff;
  font-size:12px;
  font-weight:700;
  opacity:0;
  pointer-events:none;
  transform:translateY(-3px);
  transition:.15s ease;
}
.player-icon-actions a:hover::after,.player-icon-actions a:focus-visible::after { opacity:1;transform:none; }
.unified-icon-navigation { flex-wrap:nowrap;align-items:center; }
body.role-player > .topbar > .unified-icon-navigation { justify-self:end;margin:0; }
.booking-overview { display: grid; gap: 18px; padding: 18px; }
.overview-summary { display: grid; grid-template-columns: repeat(2, minmax(150px, 220px)) minmax(260px, 1fr); gap: 12px; }
.summary-card { display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); padding: 16px; }
.summary-card > strong { color: var(--accent); font-size: 24px; }
.summary-card span, .overview-booking span { color: var(--muted); }
.summary-partners > strong { font-size: 16px; }
.overview-bookings { display: grid; gap: 8px; margin-top: 12px; }
.overview-booking { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 14px; border-top: 1px solid var(--line); padding: 12px 2px 4px; }
.overview-booking > div { display: grid; gap: 3px; }
.booking-actions { display: flex !important; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.waitlist-form { display:grid; grid-template-columns:repeat(3,minmax(130px,1fr)) auto; gap:10px; align-items:end; margin:14px 0; }
.waitlist-form label { display:grid; gap:5px; font-weight:700; }
.danger-action { border:0; border-radius:8px; background:#a72b2b; color:#fff; padding:10px 14px; font-weight:800; cursor:pointer; }
.rules-panel { border-left:5px solid var(--primary); }
@media (max-width:760px) { .waitlist-form { grid-template-columns:1fr; } }
.compact-action { min-height: 38px; padding-inline: 12px; font-size: 13px; }

.sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.add-player {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.block-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.player-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.favorite-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.favorite-player {
  background: #e5ebe5;
  color: var(--ink);
}

.favorite-player.is-selected {
  background: var(--accent);
  color: var(--accent-ink);
}

.empty-favorites {
  color: var(--muted);
  font-size: 14px;
}

.partner-picker {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 12px;
}

.partner-search {
  position: relative;
  min-width: 0;
}

.partner-search input {
  width: 100%;
}

.player-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.player-options[hidden] {
  display: none;
}

.player-option {
  display: block;
  width: 100%;
  min-height: 38px;
  border-radius: 0;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
}

.player-option:hover,
.player-option.is-active {
  background: var(--court-hover);
}

.role-admin .favorite-list,
.role-admin .partner-picker {
  display: none;
}

.role-player .player-panel,
.role-player .guest-panel,
.role-player .block-panel,
.role-player .stats-panel {
  display: none;
}

.player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf7;
  padding: 6px 8px;
  cursor: grab;
}

.player.is-selected {
  border-color: var(--accent);
  outline: 2px solid rgba(31, 122, 77, .2);
}

.remove-player {
  min-height: 28px;
  padding: 0 8px;
}

.selected {
  margin: 10px 0;
  min-height: 24px;
}

.rules {
  margin: 10px 0 0;
  padding-left: 20px;
}

.stats {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.board-wrap {
  min-width: 0;
  position: relative;
  max-height: calc(100vh - 138px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.message {
  min-height: 28px;
  color: var(--warn);
  font-weight: 600;
}

.board {
  width: 100%;
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
}

.board th,
.board td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.board th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f1f5f1;
  font-weight: 600;
  height: 42px;
}

.board th:first-child,
.time-cell {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  width: 78px;
}

/* Zuverlässige Fixierung innerhalb der scrollbaren Tafel auf iOS und Android. */
@media (hover: none), (pointer: coarse), (max-width: 820px) {
  .board-wrap {
    overflow: auto;
    max-height: calc(100dvh - 220px);
    padding-left: 0;
    padding-right: 0;
    touch-action: pan-x pan-y;
  }

  .board thead th {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 20;
    background: #f1f5f1;
  }

  .board tbody .time-cell {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 21;
    background: #f8faf8;
  }

  .board thead th:first-child {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 25;
    background: #f1f5f1;
  }
}

.board th:first-child {
  z-index: 6;
}

.time-cell {
  z-index: 3;
  background: #f8faf8;
  color: var(--muted);
  font-weight: 600;
}

/* Bei kleinen Browserfenstern bleiben Navigation und Zeitachse sichtbar. */
@media (max-width: 1100px), (max-height: 760px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 4px 14px rgba(23, 32, 25, .12);
  }

  .board thead th {
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .board th:first-child,
  .time-cell {
    position: sticky;
    left: 0;
  }

  .board th:first-child { z-index: 12; }
  .time-cell { z-index: 9; }
}

.slot {
  height: 44px;
  min-width: 104px;
  background: var(--court);
  cursor: pointer;
}

.slot:hover,
.slot.drag-over,
.booking-cell.drag-over {
  background: var(--court-hover);
}

.free-label {
  color: rgba(23, 32, 25, .42);
  font-size: 12px;
  font-weight: 700;
}

.booking-cell {
  padding: 5px;
  background: var(--court);
  cursor: grab;
}

.booking-cell[draggable="true"] {
  cursor: grab;
}

.booking-cell[draggable="true"]:active {
  cursor: grabbing;
}

.booking-cell.block-cell {
  padding: 0;
}

.booking-cell.block-training {
  background: #ffd98f;
}

.booking-cell.block-team {
  background: #d7c7ff;
}
.booking-cell.block-competition{background:#f0d8ff}.booking-cell.block-competition .block{background:#713b8f;color:#fff}.type-competition{background:#f0d8ff;color:#713b8f}
.audit-filters{display:grid;grid-template-columns:2fr repeat(3,minmax(140px,1fr)) auto;gap:12px;align-items:end}.audit-filters>div{grid-column:1/-1}.audit-filters h2{margin:0}.audit-filters label{display:grid;gap:5px;font-weight:700}.audit-list{display:grid;gap:10px}.audit-entry{display:grid;grid-template-columns:110px 1fr;gap:18px;padding:15px;border:1px solid var(--line);border-radius:12px}.audit-time{display:grid;align-content:start;gap:3px;color:var(--muted)}.audit-entry h3{margin:7px 0 4px;font-size:16px}.audit-entry p{margin:0;color:var(--muted)}.audit-entry details{margin-top:9px}.audit-entry pre{overflow:auto;padding:10px;border-radius:8px;background:#f4f6f4;font-size:11px}.type-created{background:#e1f2e7;color:#195b36}.type-updated{background:#e5ecff;color:#284f9c}.type-cancelled,.type-deleted{background:#f8dfdf;color:#8b2929}@media(max-width:700px){.audit-filters{grid-template-columns:1fr}.audit-filters>*{grid-column:1!important}.audit-entry{grid-template-columns:1fr}.audit-time{display:flex;gap:8px}}

.booking-cell.block-closed {
  background: #d6d8da;
}

.magnet {
  position: relative;
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 80px;
  border-radius: 8px;
  padding: 8px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  height: 100%;
}

.magnet.is-waiting {
  background: var(--magnet-waiting);
  color: var(--magnet-waiting-ink);
}

.magnet.is-complete {
  background: var(--magnet-complete);
  color: var(--magnet-ink);
}

.magnet.block {
  color: #172019;
  min-height: 100%;
  border-radius: 0;
  padding: 12px 8px 18px;
}

.magnet.block.training {
  background: #ffd98f;
}

.magnet.block.team {
  background: #d7c7ff;
}

.magnet.block.closed {
  background: #d6d8da;
}

.magnet-names {
  display: grid;
  grid-template-rows: 20px 20px;
  gap: 2px;
  align-items: center;
  min-height: 42px;
}

.magnet strong {
  overflow-wrap: anywhere;
}

.magnet .empty-name {
  visibility: hidden;
}

.magnet small {
  opacity: .9;
}

.magnet .magnet-close {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: inherit;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.resize-handle {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 5px;
  height: 9px;
  border-radius: 999px;
  background: rgba(23, 32, 25, .28);
  cursor: ns-resize;
}

.resize-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 3px;
  border-top: 1px solid rgba(255,255,255,.6);
  border-bottom: 1px solid rgba(255,255,255,.6);
  transform: translate(-50%, -50%);
}

@media (max-width: 820px) {
  .booking-guide { align-items: stretch; flex-direction: column; padding: 12px 12px 0; }
  .guide-step { min-width: 0; }
  .guide-arrow { display: none; }
  .board-step p { margin-left: 0; }
  .topbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: max(14px, env(safe-area-inset-top)) 14px 14px;
  }

  .topbar > *,
  .welcome-panel > * { min-width: 0; }

  .welcome-panel .nav-button { width: 100%; }

  .date-box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .date-box .date-step-label,
  .date-box input { grid-column: 1 / -1; }
  .date-box > a { text-align: center; }

  h1 {
    font-size: 22px;
  }

  .date-box {
    min-width: 0;
  }

  .layout {
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 12px;
  }

  .sidebar {
    display: contents;
  }

  .player-panel {
    order: 1;
  }

  .selection-panel {
    order: 2;
  }

  .board-wrap {
    order: 3;
  }

  .guest-panel {
    order: 4;
  }

  .block-panel {
    order: 5;
  }

  .stats-panel {
    order: 6;
  }

  .rules-panel {
    order: 7;
  }

  .panel {
    padding: 12px;
  }

  .player-list {
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  }

  .player {
    min-height: 42px;
  }

  .block-form {
    grid-template-columns: 1fr 1fr;
  }

  .block-form input,
  .block-form button {
    grid-column: 1 / -1;
  }

  .board-wrap {
    margin: 0 -12px;
    padding: 0 0 12px;
    height: clamp(420px, 68dvh, 720px);
    max-height: none;
    -webkit-overflow-scrolling: touch;
  }

  .message {
    position: sticky;
    left: 12px;
    min-height: 24px;
  }

  .board {
    min-width: 720px;
  }

  .board th,
  .board td {
    font-size: 13px;
  }

  .board th {
    height: 38px;
  }

  .board th:first-child,
  .time-cell {
    left: 0;
    width: 64px;
  }

  .time-cell {
    font-size: 12px;
  }

  .slot {
    height: 40px;
    min-width: 88px;
  }

  .booking-cell {
    padding: 4px;
  }

  .magnet {
    min-height: 72px;
    padding: 7px 6px;
    border-radius: 6px;
  }

  .magnet.block {
    padding: 10px 6px 17px;
  }

  .magnet-names {
    grid-template-rows: 18px 18px;
    min-height: 38px;
  }

  .magnet .magnet-close {
    width: 22px;
    height: 22px;
    min-height: 22px;
  }
}

@media (max-width: 520px) {
  button,
  input,
  select {
    min-height: 44px;
  }

  .topbar p {
    font-size: 14px;
  }

  .login-shell { width: min(100%, calc(100vw - 20px)); }
  .login-card { padding: 20px 16px; }

  .booking-guide { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 85vw); overflow-x: auto; justify-content: start; scroll-snap-type: x mandatory; }
  .guide-step { scroll-snap-align: start; }

  .partner-picker { grid-template-columns: 1fr; }
  .partner-picker > button,
  #clearSelection { width: 100%; }

  .members-layout,
  .booking-overview { padding: 10px; gap: 10px; }
  .member-form-panel,
  .member-list-panel { min-width: 0; }
  .member-actions { width: 100%; }
  .member-actions button { flex: 1 1 120px; }
  .color-picker-row { align-items: flex-start; }

  .overview-summary { gap: 10px; }
  .summary-card { padding: 13px; }

  .layout {
    padding: 10px;
  }

  .board-wrap {
    margin: 0 -10px;
    padding: 0 10px 12px;
    height: clamp(400px, 66dvh, 640px);
  }

  .add-player {
    grid-template-columns: 1fr auto;
  }

  .add-player input {
    min-width: 0;
  }

  .add-player button {
    padding: 0 10px;
  }

  .player-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .player {
    flex: 0 0 164px;
  }

  .rules {
    font-size: 14px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stats p {
    padding: 8px;
    border-radius: 8px;
    background: #f7faf7;
  }

  .board {
    min-width: 680px;
  }

  .board th:first-child,
  .time-cell {
    width: 58px;
  }

  .slot {
    min-width: 82px;
  }

  .magnet small {
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  h1 { font-size: 20px; }
  .topbar { padding-inline: 10px; }
  .date-box { grid-template-columns: 1fr; }
  .date-box > * { grid-column: 1; }
  .section-heading { align-items: flex-start; }
  .member-card { padding: 10px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .topbar { position: static; }
  .booking-guide { display: none; }
  .layout { grid-template-columns: minmax(240px, 32vw) 1fr; align-items: start; }
  .sidebar { display: grid; }
  .board-wrap { order: initial; height: calc(100dvh - 24px); margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

/* Geräteoptimierte Buchungsführung */
.device-booking-flow { display: none; }

/* Eine gemeinsame Sticky-Implementierung für Desktop, iOS und Android. */
.board-wrap { isolation: isolate; }
.board thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 40;
  background: #f1f5f1;
  background-clip: padding-box;
}
.board tbody .time-cell {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 35;
  background: #f8faf8;
  background-clip: padding-box;
  box-shadow: 1px 0 0 var(--line);
}
.board thead th:first-child {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 50;
  background: #f1f5f1;
  box-shadow: 1px 1px 0 var(--line);
}

/* Tablet quer: Bedienfelder links, große Platztafel rechts. */
@media (min-width: 901px) and (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(240px, .8fr) minmax(320px, 1.2fr);
    padding: 14px 18px;
  }
  .topbar .date-box {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
  }
  .topbar .date-step-label { grid-column: 1; }
  .topbar .date-box input { grid-column: 1; }
  .layout { grid-template-columns: 260px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .booking-guide { padding-inline: 14px; }
  .guide-step { min-width: 0; flex: 1 1 0; }
  .board-wrap { height: calc(100dvh - 190px); max-height: 760px; }
  .board { min-width: 760px; }
}

/* Tablet hoch: linearer Ablauf, danach eine großzügige scrollbare Tafel. */
@media (min-width: 601px) and (max-width: 900px) {
  .topbar { grid-template-columns: 1fr 1fr; }
  .header-identity { grid-column: 1; }
  .welcome-panel { grid-column: 2; }
  .date-box { grid-column: 1 / -1; }
  .booking-guide { display: none; }
  .device-booking-flow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px 14px 0;
  }
  .device-booking-flow span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    font-weight: 700;
  }
  .device-booking-flow strong {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: white;
  }
  .layout { grid-template-columns: 1fr; padding: 14px; }
  .sidebar { display: contents; }
  .selection-panel { order: 1; }
  .board-wrap { order: 2; height: 66dvh; max-height: none; margin: 0; }
  .rules-panel { order: 3; }
  .board { min-width: 760px; }
}

/* Handy: kompakte Führung und auf das Antippen optimierte Bedienung. */
@media (max-width: 600px) {
  body.role-player > .topbar { display:grid; }
  body.role-player > .topbar > .unified-icon-navigation { grid-column:1/-1;width:100%;justify-self:stretch;justify-content:flex-start;overflow-x:auto; }
  body { padding-bottom: env(safe-area-inset-bottom); }
  .topbar { position: static; gap: 10px; }
  .header-identity > p:not(.session-status) { display: none; }
  .welcome-panel { padding: 10px 12px; }
  .welcome-panel h2 { font-size: 16px; }
  .next-bookings { font-size: 13px; }
  .date-box { grid-template-columns: 1fr 1fr; }
  .date-box .date-step-label,
  .date-box input { grid-column: 1 / -1; }
  .booking-guide { display: none; }
  .device-booking-flow {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 60;
    padding: 8px 10px;
    gap: 5px;
    border-bottom: 1px solid var(--line);
    background: rgba(246,247,243,.96);
    backdrop-filter: blur(8px);
  }
  .device-booking-flow span {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 40px;
    border-radius: 9px;
    background: var(--panel);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
  }
  .device-booking-flow strong {
    display: grid;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: white;
  }
  .selection-panel { border-color: #9fc9ad; }
  .favorite-list { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .favorite-player { flex: 0 0 auto; }
  .board-step { padding: 10px; }
  .board-step .step-heading > span { display: grid; }
  .board-step p { margin: 4px 0 0; font-size: 13px; }
  .board-wrap {
    margin-inline: -10px;
    padding: 0 0 max(10px, env(safe-area-inset-bottom));
    height: 70dvh;
    min-height: 430px;
    border-radius: 0;
    scroll-padding-left: 58px;
    touch-action: pan-x pan-y;
  }
  .board { min-width: 660px; }
  .board th { height: 44px; }
  .board th:first-child,
  .time-cell { width: 58px; min-width: 58px; }
  .slot { min-width: 84px; min-height: 44px; }
  .free-label { font-size: 11px; }
}

/* Vollflächige Buchungsmagnete: Spieleranzahl ist ohne Öffnen erkennbar. */
.booking-cell { padding: 2px; }
.magnet:not(.block) { position: relative; display: block; min-height: 100%; padding: 0; overflow: hidden; border-radius: 8px; background: #eef3ef; isolation: isolate; }
.magnet:not(.block) .magnet-names { position: absolute; inset: 0; width: 100%; max-width: none; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: inherit; overflow: hidden; }
.magnet:not(.block) .magnet-names strong { position: absolute; display: flex; align-items: center; justify-content: center; width: auto; height: auto; min-width: 0; padding: 5px; overflow: hidden; color: #fff; font-size: clamp(10px, .78vw, 13px); font-weight: 850; line-height: 1.05; text-align: center; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,.85); white-space: normal; overflow-wrap: anywhere; }
.magnet:not(.block) .magnet-names.players-1 { background: var(--player-1); }
.magnet:not(.block) .magnet-names.players-1 strong { inset: 0; font-size: clamp(12px, .9vw, 15px); }
.magnet:not(.block) .magnet-names.players-2 { background: linear-gradient(135deg, var(--player-1) 0 49.5%, #fff 49.5% 50.5%, var(--player-2) 50.5% 100%); }
.magnet:not(.block) .magnet-names.players-2 strong:nth-child(1) { inset: 5px 42% 48% 5px; justify-content: flex-start; align-items: flex-start; text-align: left; }
.magnet:not(.block) .magnet-names.players-2 strong:nth-child(2) { inset: 48% 5px 5px 42%; justify-content: flex-end; align-items: flex-end; text-align: right; }
.magnet:not(.block) .magnet-names.players-3 { background: conic-gradient(from -60deg at 50% 50%, var(--player-1) 0 33.333%, var(--player-2) 33.333% 66.666%, var(--player-3) 66.666% 100%); }
.magnet:not(.block) .magnet-names.players-3 strong:nth-child(1) { top: 7%; left: 25%; right: 25%; }
.magnet:not(.block) .magnet-names.players-3 strong:nth-child(2) { right: 2%; bottom: 25%; width: 48%; justify-content: flex-end; text-align: right; }
.magnet:not(.block) .magnet-names.players-3 strong:nth-child(3) { left: 2%; bottom: 25%; width: 48%; justify-content: flex-start; text-align: left; }
.magnet:not(.block) .magnet-names.players-4 { display: grid; grid-template: 1fr 1fr / 1fr 1fr; gap: 2px; background: #fff; }
.magnet:not(.block) .magnet-names.players-4 strong { position: static; display: flex; width: 100%; height: 100%; min-height: 0; border-radius: 0; }
.magnet:not(.block) .magnet-names.players-4 strong:nth-child(1) { background: var(--player-1); color: var(--player-ink-1); }
.magnet:not(.block) .magnet-names.players-4 strong:nth-child(2) { background: var(--player-2); color: var(--player-ink-2); }
.magnet:not(.block) .magnet-names.players-4 strong:nth-child(3) { background: var(--player-3); color: var(--player-ink-3); }
.magnet:not(.block) .magnet-names.players-4 strong:nth-child(4) { background: var(--player-4); color: var(--player-ink-4); }
.magnet:not(.block) .magnet-edit, .magnet:not(.block) .magnet-close { z-index: 6; width: 26px; min-width: 26px; height: 26px; min-height: 26px; padding: 0; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); font-size: 15px; line-height: 1; }
.magnet:not(.block) .magnet-edit { position: absolute; top: 3px; right: 33px; margin: 0; }
.magnet:not(.block) .magnet-close { top: 3px; right: 3px; }
@media (max-width: 600px) {
  .booking-cell { padding: 1px; }
  .magnet:not(.block), .board-wrap.is-board-expanded .magnet:not(.block) { min-height: 100%; }
  .magnet:not(.block) .magnet-names strong { padding: 3px; font-size: 9px; }
  .magnet:not(.block) .magnet-edit { top: 2px; right: 27px; }
  .magnet:not(.block) .magnet-close { top: 2px; right: 2px; }
  .magnet:not(.block) .magnet-edit, .magnet:not(.block) .magnet-close { width: 23px; min-width: 23px; height: 23px; min-height: 23px; font-size: 13px; }
}


/* Version 3.0: vollständiger, mobiler Buchungsfluss. */
.player-home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 18px 0;
  border: 1px solid #b8d6c4;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7fbf8, #eaf6ef);
  padding: 18px;
}
.player-home h2 { margin: 3px 0 5px; font-size: 22px; }
.player-home p { color: var(--muted); }
.eyebrow,
.dialog-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.home-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
}
.primary-action { background: var(--accent); color: #fff; }
.secondary-action { border: 1px solid #b9c6bb; background: #fff; color: var(--ink); }

.quick-availability {
  flex: 0 0 auto;
  border-block: 1px solid var(--line);
  background: #fff;
  padding: 12px 14px 14px;
}
.quick-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.quick-heading h3 { margin: 2px 0 0; font-size: 16px; }
.quick-title-row { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 12px; }
.quick-date-label { display:inline-flex; border-radius:999px; background:#eaf6ef; color:var(--accent); padding:4px 9px; font-size:14px; white-space:nowrap; }
.quick-heading small { color: var(--muted); }
.quick-slots {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 3px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.quick-slot {
  display: grid;
  flex: 0 0 105px;
  min-height: 62px;
  place-content: center;
  gap: 2px;
  border: 1px solid #9fc9ad;
  border-radius: 12px;
  background: #f4faf6;
  color: var(--ink);
  scroll-snap-align: start;
}
.quick-slot strong { color: var(--accent); font-size: 17px; }
.quick-slot span { font-size: 12px; }
.member-import-panel{grid-column:1/-1}.import-fields{display:grid;grid-template-columns:minmax(260px,1fr) minmax(280px,1fr);gap:16px;align-items:end}.import-preview{margin:14px 0;overflow:auto;border:1px solid var(--line);border-radius:12px;max-height:360px}.import-preview table{width:100%;border-collapse:collapse;font-size:13px}.import-preview th,.import-preview td{padding:8px 10px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}.import-preview .import-error{color:#9b261f;background:#fff1ef}@media(max-width:700px){.import-fields{grid-template-columns:1fr}}

.full-board-toggle { width: calc(100% - 28px); min-height: 44px; margin: 12px 14px; border: 1px solid var(--line); font-weight: 800; }
.board-scroll.is-collapsed { display: none; }
.board-wrap.has-collapsed-board { height: auto !important; min-height: 0 !important; }
.admin-mode-panel { border-color: #9fc9ad; background: #f4faf6; }
.admin-mode-panel h2 { margin: 4px 0 12px; font-size: 18px; }
.admin-mode-actions { display: grid; gap: 8px; }
.admin-mode-button { min-height: 46px; text-align: left; font-weight: 800; }
.admin-mode-button.is-active { box-shadow: 0 0 0 3px rgba(31,122,77,.16); }
[hidden] { display: none !important; }

.mobile-bottom-nav { display: none; }
.booking-dialog {
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(10,25,15,.3);
  padding: 22px;
}
.booking-dialog::backdrop { background: rgba(10,25,15,.56); backdrop-filter: blur(3px); }
.booking-dialog h2 { margin: 5px 0 16px; font-size: 22px; }
.booking-summary { display: grid; gap: 0; margin: 0; }
.booking-summary div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; border-top: 1px solid #e3e9e4; padding: 10px 0; }
.booking-summary dt { color: var(--muted); font-weight: 700; }
.booking-summary dd { margin: 0; font-weight: 800; }
.dialog-note { margin: 12px 0; color: var(--muted); font-size: 13px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 16px; }
.success-dialog { text-align: center; }
.success-check { display: grid; width: 58px; height: 58px; margin: 0 auto 12px; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 30px; font-weight: 900; }
.success-text { color: var(--muted); line-height: 1.5; }
.success-actions { display: grid; gap: 8px; margin-top: 18px; }
.text-button { background: transparent; color: var(--muted); text-decoration: underline; }

@media (max-width: 600px) {
  body.role-player { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .player-home { display: grid; margin: 10px; padding: 16px; }
  .player-home h2 { font-size: 20px; }
  .home-actions { display: grid; grid-template-columns: 1.25fr 1fr; }
  .quick-heading { align-items: start; flex-direction: column; }
  .quick-heading small { font-size: 11px; }
.quick-availability { padding-inline: 10px; }
  .mobile-date-filters { display:flex; gap:7px; overflow-x:auto; padding:4px 0 10px; }
  .mobile-date-filters button { flex:0 0 auto; min-height:44px; border:1px solid var(--line); background:#fff; color:var(--accent); padding:8px 13px; }
  .mobile-date-filters button.is-active { background:var(--accent); color:#fff; }
  .quick-slots { grid-template-columns:1fr 1fr; }
  .quick-slot { min-height:58px; text-align:left; }
  .wait-slot { border-style:dashed; background:#fff8e8; }
  .occupied-heading { grid-column:1/-1; margin-top:8px; color:var(--muted); font-weight:800; font-size:13px; }
  .mobile-bottom-nav {
    display: grid;
    position: fixed;
    z-index: 100;
    right: 0;
    bottom: 0;
    left: 0;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 7px max(8px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    box-shadow: 0 -5px 18px rgba(23,32,25,.1);
    backdrop-filter: blur(10px);
  }
  .mobile-bottom-nav a {
    display: grid;
    min-height: 52px;
    place-items: center;
    align-content: center;
    gap: 1px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
  }
  .mobile-bottom-nav a span { font-size: 21px; line-height: 1; }
  .mobile-bottom-nav a strong { font-size:11px; }
  .mobile-bottom-nav a.is-primary { background: #eaf6ef; color: var(--accent); }
  .booking-dialog { margin: auto auto max(10px, env(safe-area-inset-bottom)); padding: 20px 16px; }
  .booking-dialog h2 { font-size: 20px; }
  .dialog-actions button { min-height: 50px; }
}

.device-booking-flow .flow-link.is-complete strong { background:var(--accent); color:transparent; position:relative; }
.device-booking-flow .flow-link.is-complete strong::after { content:"✓"; position:absolute; color:#fff; }

/* Version 5.1: echter geführter Buchungsassistent. */
.workflow-step-button { appearance:none; font:inherit; color:inherit; cursor:pointer; }
.workflow-step-button.is-current { border-color:var(--accent); background:#eaf6ef; box-shadow:0 0 0 3px rgba(31,122,77,.12); }
.workflow-step-button.is-complete > span:first-child { background:var(--accent); color:#fff; }
.workflow-controls { display:grid;grid-template-columns:auto minmax(280px,620px) auto;align-items:center;justify-content:center;gap:14px;max-width:1180px;margin:12px auto 22px;padding:12px 18px;border:1px solid #b8d6c4;border-radius:14px;background:#fff;box-shadow:0 8px 22px rgba(23,63,42,.08); }
.workflow-progress-copy { display:grid;gap:3px;text-align:center; }
.workflow-progress-copy strong { color:var(--accent);font-size:16px; }
.workflow-progress-copy span { color:var(--muted);font-size:13px;font-weight:650; }
.workflow-nav-button { min-width:150px;min-height:46px; }
.workflow-nav-button:disabled { opacity:.42;cursor:not-allowed; }
.wizard-step-content { width:min(820px,calc(100% - 40px));margin:0 auto 40px; }
.wizard-next { min-height:44px; margin-top:8px; }
.wizard-actions { display:flex; align-items:center; gap:10px; margin-top:14px; }
.wizard-actions > button { min-height:48px; }
.wizard-actions .continue-booking { flex:1; margin-top:0; }
.board-wizard-actions { justify-content:space-between; margin:0 14px 10px; }
.board-wizard-actions span { color:var(--muted); font-weight:700; }

body.role-player[data-workflow-step="1"] .layout,
body.role-player[data-workflow-step="1"] .player-home { display:none; }
body.role-player[data-workflow-step="2"] .player-home,
body.role-player[data-workflow-step="2"] .player-panel,
body.role-player[data-workflow-step="2"] .guest-panel,
body.role-player[data-workflow-step="2"] .stats-panel,
body.role-player[data-workflow-step="2"] .rules-panel,
body.role-player[data-workflow-step="2"] .board-wrap { display:none; }
body.role-player[data-workflow-step="2"] .layout { display:block; max-width:760px; margin-inline:auto; }
body.role-player[data-workflow-step="3"] .player-home,
body.role-player[data-workflow-step="3"] .sidebar { display:none; }
body.role-player[data-workflow-step="3"] .layout { display:block; }

@media (max-width:600px) {
  .board-date-navigation { grid-template-columns:repeat(4,44px)!important;justify-content:center; }
  .overview-date-row { grid-template-columns:36px 36px minmax(125px,1fr) 36px 36px;gap:4px; }
  .date-inline-nav { grid-template-columns:32px 32px minmax(0,1fr) 32px 32px;gap:4px;width:100%; }
  .date-inline-nav input[type="date"] { min-width:0;width:100%;padding-inline:4px;font-size:13px; }
  .compact-date-button { min-width:32px;padding:7px 3px; }
  .time-utilization > div { grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;font-size:11px; }
  .utilization-chip { padding:6px 2px; }
  .board-overview-page .board-overview-header { grid-template-columns:1fr; }
  .booking-guide { display:flex; padding:8px; gap:5px; overflow-x:auto; justify-content:flex-start; }
  .booking-guide .guide-arrow, .booking-guide small { display:none; }
  .workflow-step-button { flex:0 0 auto; min-width:86px; padding:8px; }
  .workflow-controls { grid-template-columns:1fr 1fr;margin:8px 10px 14px;padding:10px;gap:8px; }
  .workflow-progress-copy { grid-column:1/-1;grid-row:1; }
  .workflow-nav-button { min-width:0;grid-row:2; }
  .wizard-actions { display:grid; grid-template-columns:1fr 1.5fr; }
  .board-wizard-actions { grid-template-columns:1fr; }
}

.booking-review-step{display:none;width:min(760px,calc(100% - 32px));margin:24px auto;padding:28px}.booking-review-step .booking-summary{margin:20px 0}.booking-review-step .dialog-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}body.role-player[data-workflow-step="4"] .booking-review-step{display:block}body.role-player[data-workflow-step="4"] .workflow-controls{display:grid}body.role-player[data-workflow-step="4"] .booking-guide{display:flex}
body.role-player[data-workflow-step="3"] .quick-availability,body.role-player[data-workflow-step="3"] .full-board-toggle,body.role-player[data-workflow-step="3"] .board-date-navigation{display:none!important}body.role-player[data-workflow-step="3"] #boardScroll{display:block!important;height:calc(100dvh - 330px);min-height:500px;overflow:auto;touch-action:pan-x pan-y}.planning-magnet-board .board{table-layout:fixed;width:2164px!important;min-width:2164px!important}.planning-magnet-board .board thead th{height:48px}.planning-magnet-board .board thead small{display:block;font-size:8px}.planning-magnet-board .board tbody tr{height:62px}.planning-magnet-board .board tbody td{width:37.5px!important;min-width:37.5px!important;padding:0;border:1px solid #555a54}.planning-magnet-board .court-number{position:sticky;left:0;z-index:20;width:64px;min-width:64px;background:#e5e4dc;font-size:28px;text-align:center}.planning-magnet-board .quarter-0,.planning-magnet-board .quarter-1{background:#45464b}.planning-magnet-board .quarter-2,.planning-magnet-board .quarter-3{background:#e6e5dd}.planned-booking-cell{padding:3px!important;background:#f5e8a8!important}.planned-magnet{height:100%;min-height:54px;border:3px dashed #bd7218!important;cursor:grab;box-shadow:0 4px 14px rgba(90,54,10,.35)!important}.planned-magnet>span,.planned-magnet>small{position:relative;z-index:4;display:block;padding:2px 6px;background:rgba(255,255,255,.86);color:#542f08;font-size:10px;font-weight:800}.planned-magnet:active{cursor:grabbing}

/* Version 2.2.1: Spielernamen bleiben auch in schmalen Handyspalten getrennt. */
.magnet-names,
.magnet-names strong {
  min-width: 0;
  max-width: 100%;
}
.magnet-names strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .magnet {
    overflow: hidden;
    gap: 3px;
    padding-inline: 5px;
  }
  .magnet-names {
    display: grid;
    grid-template-rows: repeat(2, minmax(17px, 1fr));
    align-items: center;
    gap: 2px;
    width: 100%;
    min-height: 36px;
    padding-right: 18px;
    overflow: hidden;
  }
  .magnet-names strong {
    width: 100%;
    height: 17px;
    font-size: 12px;
    line-height: 17px;
  }
  .magnet > small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 13px;
  }
  .magnet .magnet-close {
    top: 4px;
    right: 4px;
  }
}

/* Version 2.2: klare, fehlertolerante Schrittführung für Jung und Alt. */
.choice-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 10px;
  background: #edf7f1;
  color: #185c3b;
  padding: 9px 11px;
  font-weight: 750;
  line-height: 1.35;
}
.choice-status::before {
  content: "✓";
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
}
.continue-booking {
  width: 100%;
  min-height: 50px;
  margin-top: 9px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(31,122,77,.2);
}
.device-booking-flow .flow-link {
  color: var(--muted);
  text-decoration: none;
}
.device-booking-flow .flow-link.is-current {
  color: var(--accent);
}
.device-booking-flow .flow-link > span {
  display: inline;
  flex: 0 1 auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

@media (min-width: 601px) and (max-width: 900px) {
  .device-booking-flow .flow-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    font-weight: 750;
  }
  .device-booking-flow .flow-link.is-current {
    border-color: #8dc5a4;
    background: #eaf6ef;
  }
}

@media (max-width: 600px) {
  .device-booking-flow .flow-link {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 42px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
  }
  .device-booking-flow .flow-link strong {
    display: grid;
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
    place-items: center;
    border-radius: 50%;
    background: #dfe6e0;
    color: #526057;
  }
  .device-booking-flow .flow-link.is-current {
    background: #eaf6ef;
  }
  .device-booking-flow .flow-link.is-current strong {
    background: var(--accent);
    color: #fff;
  }
  .selection-panel { scroll-margin-top: 64px; }
  .board-wrap { scroll-margin-top: 64px; }
  .choice-status { font-size: 14px; }
}

/* Handy quer: Auswahl kompakt oberhalb, maximaler Raum für die Tafel. */
@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  .topbar { display: none; }
  .device-booking-flow { position: static; }
  .layout { display: grid; grid-template-columns: minmax(220px, 32vw) minmax(0, 1fr); padding: 8px; gap: 8px; }
  .sidebar { display: contents; }
  .selection-panel { order: 1; max-height: calc(100dvh - 72px); overflow-y: auto; }
  .board-wrap { order: 2; height: calc(100dvh - 72px); min-height: 0; margin: 0; border-radius: 8px; }
  .rules-panel,
  .player-panel,
  .guest-panel,
  .block-panel,
  .stats-panel { display: none; }
}

/* Konto und Benachrichtigungen */
.account-layout { width: min(760px, calc(100% - 24px)); margin: 24px auto; }
.account-card { display: grid; gap: 22px; padding: clamp(18px, 4vw, 32px); }
.account-card form { display: grid; gap: 12px; }
.admin-profile-zone { width:min(1100px,calc(100% - 28px)); margin:0 auto 90px; padding:22px; border:2px solid #8cb99c; border-radius:16px; background:#f1f8f3; }
.admin-zone-heading { margin-bottom:16px; }.admin-zone-heading h2 { margin:4px 0; }.admin-zone-heading p { margin:0;color:var(--muted); }
.admin-tool-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }.admin-tool-card { display:grid;gap:5px;min-height:100px;padding:17px;border:1px solid #b7d4c1;border-radius:12px;background:#fff;color:var(--ink);text-decoration:none; }.admin-tool-card:hover { border-color:var(--accent);transform:translateY(-1px); }.admin-tool-card span { color:var(--muted); }
@media(max-width:650px){.admin-tool-grid{grid-template-columns:1fr}.admin-profile-zone{padding:16px}}
.workflow-heading { display: flex; align-items: flex-start; gap: 12px; }
.workflow-heading.compact { margin-top: 18px; }
.workflow-heading > span { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; }
.workflow-heading h2, .workflow-heading p { margin: 0; }
.workflow-heading p { margin-top: 3px; color: var(--muted); }
.notification-settings { display: grid; gap: 8px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.notification-settings legend { padding: 0 6px; font-weight: 800; }
.request-privacy{display:grid;gap:10px;margin-top:18px;padding:14px;border:1px solid var(--line);border-radius:12px}.request-privacy legend{padding:0 6px;font-weight:800}.request-privacy select{width:100%}.request-privacy select[multiple]{min-height:180px}.request-privacy [hidden]{display:none}
.mail-settings-panel { grid-column: 1 / -1; }
.mail-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.mail-settings-grid label { display: grid; gap: 6px; font-weight: 700; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.role-admin #adminPlayerFilter { width: 100%; margin: 8px 0 0; }
.admin-feedback { display:flex; gap:10px; align-items:center; }.admin-feedback .message { flex:1; }
.magnet-edit { min-height:28px; padding:3px 7px; margin:0 28px 4px 0; font-size:11px; background:rgba(255,255,255,.88); color:var(--ink); }
@media (min-width: 901px) {
  .role-admin .layout { align-items: stretch; }
  .role-admin .sidebar { height: calc(100dvh - 138px); min-height: 0; display: flex; flex-direction: column; overflow: hidden; gap: 10px; }
  .role-admin .player-panel { min-height: 180px; flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; }
  .role-admin .player-list { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding-right: 5px; }
  .role-admin .stats-panel, .role-admin .rules-panel { display: none; }
}

/* Version 5.3.1: ruhige, zusammenhängende Desktop-Oberfläche. */
@media (min-width: 901px) {
  body.role-player .topbar,
  body.role-player[data-workflow-step="1"] .topbar,
  body.role-player[data-workflow-step="2"] .topbar,
  body.role-player[data-workflow-step="3"] .topbar {
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:18px;
    width:min(1180px,calc(100% - 40px));
    max-width:none;
    margin:18px auto 0;
    padding:14px 18px;
    border:1px solid var(--line);
    border-radius:16px;
    box-shadow:0 5px 18px rgba(23,63,42,.06);
  }
  body.role-player .header-identity {
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
  }
  body.role-player .header-identity > p:not(.session-status):not(.data-status) { display:none; }
  body.role-player .header-identity h1 { flex:0 0 auto;font-size:20px; }
  body.role-player .header-identity .app-version { flex:0 0 auto; }
  body.role-player .header-identity .session-status,
  body.role-player .header-identity .data-status { margin:0;font-size:12px; }
  .header-identity .player-icon-actions { margin:0 0 0 auto; }
  body.role-player .player-icon-actions a { width:40px;height:40px;flex-basis:40px;box-shadow:none; }

  body.role-player .booking-guide {
    position:static;
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
    width:min(1180px,calc(100% - 40px));
    max-width:none;
    margin:18px auto 0;
    padding:12px 12px 8px;
    border:1px solid #b8d6c4;
    border-bottom:0;
    border-radius:16px 16px 0 0;
    background:#fff;
    box-shadow:0 8px 22px rgba(23,63,42,.07);
    backdrop-filter:none;
  }
  body.role-player .booking-guide .guide-arrow { display:none; }
  body.role-player .booking-guide .guide-step {
    min-width:0;
    padding:10px 12px;
    border-color:transparent;
    background:#f3f6f3;
    box-shadow:none;
  }
  body.role-player .booking-guide .guide-step.is-current { border-color:var(--accent);background:#eaf6ef; }
  body.role-player .booking-guide .guide-step small { display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }

  body.role-player .workflow-controls {
    grid-template-columns:190px minmax(300px,1fr) 230px;
    width:min(1180px,calc(100% - 40px));
    max-width:none;
    margin:0 auto 24px;
    padding:10px 12px 14px;
    border:1px solid #b8d6c4;
    border-top:0;
    border-radius:0 0 16px 16px;
    box-shadow:0 8px 22px rgba(23,63,42,.07);
  }
  body.role-player .workflow-progress-copy strong { font-size:17px; }
  body.role-player .workflow-nav-button { width:100%; }

  body.role-player[data-workflow-step="1"] .date-box {
    width:min(820px,100%);
    margin:0 auto;
    padding:26px 30px;
  }
  body.role-player[data-workflow-step="2"] .layout { width:min(820px,calc(100% - 40px));max-width:none; }
  body.role-player[data-workflow-step="2"] #bookingPartner { border-radius:18px; }
  body.role-player[data-workflow-step="3"] .layout { width:min(1240px,calc(100% - 32px));max-width:none; }
  body.role-player[data-workflow-step="3"] #bookingBoard { border-radius:18px;overflow:hidden; }
}
@media (min-width: 901px) and (max-width: 1180px) { .role-admin .sidebar { height: calc(100dvh - 190px); } }
.analytics-layout { width: min(1500px, 100%); margin: 0 auto; padding: 18px; display: grid; gap: 16px; }
.analytics-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.analytics-filters label { display: grid; gap: 5px; font-weight: 700; }
.analytics-kpis { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 12px; }
.analytics-kpi { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.analytics-kpi strong { display: block; font-size: clamp(24px, 4vw, 38px); color: var(--accent); }
.analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.analytics-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.bar-list { display: grid; gap: 9px; }.bar-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr 54px; gap: 10px; align-items: center; }
.bar-track { height: 12px; overflow: hidden; border-radius: 999px; background: #e7ece8; }.bar-fill { height: 100%; border-radius: inherit; background: var(--accent); }
.analytics-table { width: 100%; border-collapse: collapse; }.analytics-table th, .analytics-table td { padding: 9px 7px; border-bottom: 1px solid var(--line); text-align: left; }
@media (max-width: 900px) { .analytics-kpis { grid-template-columns: repeat(2, 1fr); } .analytics-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .analytics-layout { padding: 10px; } .bar-row { grid-template-columns: 90px 1fr 45px; font-size: 13px; } }
.form-message.is-success { color: #17613c; background: #eaf6ef; padding: 10px; border-radius: 8px; }
.form-message.is-error { color: #9b1c1c; background: #fff0f0; padding: 10px; border-radius: 8px; }
@media (max-width: 700px) { .mail-settings-grid { grid-template-columns: 1fr; } .mail-actions > button { width: 100%; } }
.email-status { width: fit-content; padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 750; }
.email-status.is-verified { background: #e3f4e9; color: #16633b; }
.email-status.is-pending { background: #fff2cf; color: #755400; }
.verification-action { display: grid; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.text-link { display: inline-block; margin-top: 10px; color: var(--accent); font-weight: 700; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 600px) { .account-layout { margin: 12px auto 90px; } .account-card { padding: 16px; } .notification-settings .checkbox-row { min-height: 48px; } }

.app-version {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  border-radius: 999px;
  background: #edf1ed;
  color: var(--muted);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .02em;
}

@media (max-width: 600px) {
  .board-step .step-heading {
    align-items: center;
  }
  .board-step .step-heading > span {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
  }
  .header-identity .app-version {
    margin: 0 auto 0 0;
  }
}

/* Professionelle Mobile-Oberfläche: ein dedizierter Scrollbereich macht
   die Fixierung in Mobile Safari und Android-Browsern zuverlässig. */
.board-wrap {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: none;
  background: var(--panel);
}
.board-scroll {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  scrollbar-gutter: stable;
}
.board-scroll:focus-visible {
  outline: 3px solid rgba(31,122,77,.28);
  outline-offset: -3px;
}
.board-scroll .board {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}
.board-scroll .board thead th {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
  background: #f1f5f1;
  box-shadow: 0 1px 0 var(--line);
}
.board-scroll .board tbody .time-cell {
  position: -webkit-sticky !important;
  position: sticky !important;
  left: 0 !important;
  z-index: 35 !important;
  background: #f8faf8;
  box-shadow: 1px 0 0 var(--line);
}
.board-scroll .board thead th:first-child {
  top: 0 !important;
  left: 0 !important;
  z-index: 50 !important;
  box-shadow: 1px 1px 0 var(--line);
}

.player-options {
  max-height: min(320px, 42dvh);
  padding: 5px;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(23,32,25,.2);
}
.player-option {
  min-height: 48px;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
}
.player-option + .player-option { border-top: 1px solid #edf0ed; }

@media (min-width: 1181px) {
  .board-wrap { height: calc(100dvh - 138px); }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .board-wrap { height: calc(100dvh - 190px); }
}

@media (min-width: 601px) and (max-width: 900px) {
  .board-wrap { height: 68dvh; }
  .selection-panel {
    border: 1px solid #b8d6c4;
    box-shadow: 0 10px 28px rgba(23,32,25,.08);
  }
}

@media (max-width: 600px) {
  :root { --shadow: 0 5px 18px rgba(23,32,25,.08); }
  body { background: #f2f5f2; }
  .topbar {
    padding: max(12px, env(safe-area-inset-top)) 12px 12px;
    border: 0;
    box-shadow: none;
    background: #fff;
  }
  .header-identity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }
  .header-identity h1 { font-size: 20px; letter-spacing: -.3px; }
  .header-identity .session-status {
    display: inline-flex;
    margin: 0;
    border-radius: 999px;
    background: #eaf6ef;
    color: var(--accent);
    padding: 5px 9px;
    font-size: 12px;
  }
  .header-identity .player-icon-actions {
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  body.role-player .player-icon-actions a {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  .welcome-panel {
    border: 0;
    border-radius: 12px;
    background: #f4f8f5;
    box-shadow: none;
  }
  .welcome-panel h2 { margin: 0; }
  .welcome-panel .next-bookings { margin-top: 4px; }
  .date-box {
    gap: 8px;
    padding-top: 2px;
  }
  .date-box .logout-link,
  .date-box .nav-button { min-height: 42px; border-radius: 10px; }
  .date-step-label { color: var(--ink); font-size: 14px; }
  .field-step-number { width: 24px; height: 24px; }
  #boardDate {
    min-height: 50px;
    border-color: #aebcaf;
    border-radius: 12px;
    font-weight: 750;
  }
  .device-booking-flow {
    padding: 7px 10px;
    box-shadow: 0 4px 14px rgba(23,32,25,.08);
  }
  .device-booking-flow span {
    background: transparent;
    color: #536158;
  }
  .layout { gap: 10px; }
  .panel { border-radius: 14px; box-shadow: var(--shadow); }
  .selection-panel {
    padding: 14px;
    border: 1px solid #a9ceb8;
  }
  .selection-panel .step-heading h2 { font-size: 18px; }
  .step-help { line-height: 1.45; }
  .favorite-list { margin-block: 10px 12px; }
  .favorite-player {
    min-height: 42px;
    border: 1px solid #d6dfd7;
    border-radius: 999px;
    background: #f8faf8;
  }
  .partner-picker { gap: 7px; }
  .partner-search input {
    min-height: 50px;
    border-radius: 12px;
    border-color: #aebcaf;
    padding-inline: 13px;
  }
  #selectPartner { min-height: 48px; border-radius: 12px; font-weight: 800; }
  #clearSelection {
    min-height: 44px;
    margin-top: 8px;
    background: transparent;
    color: var(--muted);
    text-decoration: underline;
  }
  .board-wrap {
    height: 72dvh;
    min-height: 460px;
    margin-inline: -10px;
    padding: 0;
    border-inline: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .board-step {
    position: relative;
    flex: 0 0 auto;
    left: auto;
    z-index: 2;
    background: #fff;
  }
  .message {
    position: relative;
    flex: 0 0 auto;
    left: auto;
    padding-inline: 10px;
    background: #fff;
  }
  .board-scroll { scrollbar-gutter: auto; }
  .board-wrap.is-board-expanded {
    height: min(78dvh, calc(100dvh - env(safe-area-inset-top) - 72px));
    min-height: 560px;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .board-wrap.is-board-expanded .quick-availability { display: none; }
  .board-wrap.is-board-expanded .board-step { padding: 7px 10px; }
  .board-wrap.is-board-expanded .board-step p { display: none; }
  .board-wrap.is-board-expanded .full-board-toggle { min-height: 38px; margin-block: 6px; }
  .board-wrap.is-board-expanded .board th { height: 36px; }
  .board-wrap.is-board-expanded .slot { height: 32px; min-height: 32px; }
  .board-wrap.is-board-expanded .time-cell { height: 32px; font-size: 11px; }
  .board-wrap.is-board-expanded .magnet { min-height: 58px; padding-block: 4px; }
  .board-wrap.is-board-expanded .magnet-names { min-height: 30px; grid-template-rows: 14px 14px; }
  .board-wrap.is-board-expanded .magnet-names strong { height: 14px; line-height: 14px; font-size: 11px; }
  .board-scroll::after {
    content: "Seitlich wischen für weitere Plätze";
    position: sticky;
    left: 10px;
    display: inline-block;
    margin: 8px 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }
}

@media (max-width: 430px) and (min-height: 800px) {
  .board-wrap.is-board-expanded { height: 80dvh; min-height: 600px; }
}

@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  .board-wrap { height: calc(100dvh - 72px); min-height: 0; }
  .board-step { padding-block: 7px; }
  .board-step p { display: none; }
}

/* Mobile workflow: one clear reading direction and comfortable touch targets. */
@media (max-width: 600px) {
  html { scroll-behavior: smooth; scroll-padding-top: 62px; }
  body { font-size: 16px; line-height: 1.45; overflow-x: hidden; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  h1 { font-size: 22px; line-height: 1.15; }
  h2 { font-size: 19px; line-height: 1.25; }
  p { text-wrap: pretty; }
  button, input, select, .nav-button, .logout-link, .primary-action, .secondary-action { min-height: 48px; }
  input, select { width: 100%; font-size: 16px; }
  body > .topbar, .members-topbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: max(12px, env(safe-area-inset-top)) 12px 12px; }
  body > .topbar > div:first-child p { margin: 3px 0 0; font-size: 13px; }
  body > .topbar .header-actions { display: flex; width: 100%; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  body > .topbar .header-actions > * { flex: 1 0 auto; min-width: max-content; }
  .welcome-panel { padding: 12px; }
  .welcome-panel .header-actions { margin-top: 8px; }
  .date-box { grid-template-columns: 1fr 1fr; width: 100%; }
  .date-box > .logout-link, .date-box > .nav-button { min-width: 0; padding-inline: 8px; font-size: 13px; }
  .date-box .date-step-label, #boardDate, .date-load-title, .date-load-picker { grid-column: 1 / -1; }
  .date-load-picker { gap: 8px; margin-inline: -12px; padding: 2px 12px 9px; scroll-snap-type: x mandatory; }
  .date-load-day { min-width: 76px; min-height: 54px; scroll-snap-align: start; }
  .booking-guide, .player-home { display: none; }
  .device-booking-flow { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 7px 8px; border-block: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
  .flow-link { min-width: 0; min-height: 46px; padding: 4px 2px; border-radius: 10px; text-align: center; }
  .flow-link strong { margin-inline: auto; }
  .flow-link span { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .layout, .booking-overview, .members-layout, .analytics-layout, .account-layout { width: 100%; margin: 0 auto; padding: 10px; gap: 12px; }
  .sidebar { display: contents; }
  .panel { width: 100%; padding: 14px; border-radius: 14px; }
  .selection-panel { order: 1; scroll-margin-top: 62px; }
  .admin-mode-panel { order: 0; }
  .player-panel { order: 2; max-height: 58dvh; overflow-y: auto; }
  .guest-panel, .block-panel { order: 3; }
  .stats-panel, .rules-panel { order: 5; }
  .board-wrap { order: 4; width: calc(100% + 20px); scroll-margin-top: 62px; }
  .step-heading { align-items: flex-start; }
  .step-heading > span { flex-basis: 32px; }
  .choice-status { min-height: 46px; padding: 11px 12px; }
  .partner-picker, .add-player, .admin-mode-actions, .home-actions, .mail-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .favorite-list { display: flex; max-width: 100%; overflow-x: auto; padding-bottom: 3px; }
  .favorite-player { flex: 0 0 auto; }
  .quick-availability { padding: 12px 10px; }
  .quick-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .quick-slot { min-width: 0; min-height: 64px; padding: 9px; }
  .mobile-date-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .mobile-date-filters button { min-width: 0; }
  .full-board-toggle { width: calc(100% - 20px); margin-inline: 10px; }
  .board-wrap:not(.is-board-expanded) { height: auto; min-height: 0; }
  .board-wrap:not(.is-board-expanded) .board-scroll.is-collapsed { max-height: 0; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; }
  .section-heading > h2 { margin-block: 4px; }
  .overview-summary, .analytics-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .overview-booking, .member-card, .analytics-card { padding: 12px; }
  .waitlist-form, .member-form, .analytics-filters, .mail-settings-grid { grid-template-columns: 1fr; }
  .members-intro { justify-content: flex-start; overflow-x: auto; white-space: nowrap; font-size: 13px; }
  .member-form-panel { order: 1; }
  .member-list-panel { order: 0; }
  .mail-settings-panel { order: 2; }
  .member-cards { max-height: 52dvh; overflow-y: auto; }
  .workflow-heading { gap: 10px; }
  .workflow-heading > span { flex-basis: 32px; }
  .verification-action { align-items: stretch; }
  dialog.booking-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 24px); margin: auto; padding: 18px; border-radius: 18px; }
  .dialog-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .dialog-actions button { width: 100%; }
  .login-shell { width: 100%; padding: 12px; }
  .login-card { gap: 12px; padding: 20px 16px; border-radius: 16px; }
  .login-card button { width: 100%; }
}

@media (max-width: 370px) {
  .quick-slots, .overview-summary, .analytics-kpis { grid-template-columns: 1fr; }
  .flow-link span { font-size: 10px; }
}

.help-tip { position: relative; display: inline-grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; border: 1px solid #9db6a5; border-radius: 50%; background: #eef6f0; color: var(--accent); font-size: 14px; font-weight: 800; cursor: help; }
.help-tip::after { content: attr(data-tooltip); position: absolute; z-index: 60; left: 50%; bottom: calc(100% + 9px); width: min(260px, calc(100vw - 32px)); padding: 10px 12px; border-radius: 10px; background: #172019; color: #fff; font-size: 13px; font-weight: 500; line-height: 1.4; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 5px); transition: .15s ease; }
.help-tip:hover::after, .help-tip:focus::after, .help-tip:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.help-layout { width: min(880px, calc(100% - 24px)); margin: 20px auto 40px; display: grid; gap: 14px; }
.help-index { position: sticky; top: 8px; z-index: 10; display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 10px 12px; }
.help-index a { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; background: #eef6f0; color: var(--accent); font-weight: 700; text-decoration: none; }
.help-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; scroll-margin-top: 78px; }
.help-card h2, .help-card p { margin-top: 0; }
.help-card ol,.help-card ul { padding-left: 20px; }
.help-card li + li { margin-top: 7px; }
.help-number { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; }
.help-note, .help-contact { border-left: 4px solid var(--accent); }

@media (max-width: 600px) {
  .mobile-bottom-nav { grid-template-columns: repeat(4, 1fr); }
  .help-layout { width: 100%; margin: 0 auto; padding: 10px 10px calc(90px + env(safe-area-inset-bottom)); }
  .help-index { top: 0; margin-inline: -10px; border-radius: 0; }
  .help-index > strong { display: none; }
  .help-card { grid-template-columns: 34px minmax(0, 1fr); padding: 14px 12px; }
  .help-number { width: 32px; height: 32px; }
  .help-tip::after { position: fixed; left: 16px; right: 16px; bottom: calc(82px + env(safe-area-inset-bottom)); width: auto; transform: translateY(5px); }
  .help-tip:hover::after, .help-tip:focus::after, .help-tip:focus-visible::after { transform: translateY(0); }
}

.selected-partner-chip { display: inline-flex; min-height: 34px; align-items: center; gap: 5px; margin: 3px 2px; padding: 4px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; }

/* Stabiler Stundenblock: rowSpan-Zellen benötigen eine explizite Höhe. */
.board .booking-cell:not(.block-cell) { height: 88px !important; min-height: 88px; padding: 2px !important; vertical-align: top; }
.board .booking-cell:not(.block-cell) > .magnet:not(.block) { width: 100%; height: 84px !important; min-height: 84px !important; }
.board .booking-cell:not(.block-cell) .magnet-names { height: 84px !important; min-height: 84px !important; }
@media (max-width: 600px) {
  .board .booking-cell:not(.block-cell) { height: 80px !important; min-height: 80px; padding: 1px !important; }
  .board .booking-cell:not(.block-cell) > .magnet:not(.block),
  .board .booking-cell:not(.block-cell) .magnet-names { height: 78px !important; min-height: 78px !important; }
  .board-wrap.is-board-expanded .board .booking-cell:not(.block-cell) { height: 64px !important; min-height: 64px; }
  .board-wrap.is-board-expanded .board .booking-cell:not(.block-cell) > .magnet:not(.block),
  .board-wrap.is-board-expanded .board .booking-cell:not(.block-cell) .magnet-names { height: 62px !important; min-height: 62px !important; }
}

/* Mobil: Namen nutzen die gesamte Stundenfläche, unabhängig vom Farbsegment. */
@media (max-width: 600px) {
  .magnet:not(.block) .magnet-names.players-4 {
    display: block !important;
    background:
      linear-gradient(var(--player-1),var(--player-1)) 0 0 / 50% 50% no-repeat,
      linear-gradient(var(--player-2),var(--player-2)) 100% 0 / 50% 50% no-repeat,
      linear-gradient(var(--player-3),var(--player-3)) 0 100% / 50% 50% no-repeat,
      linear-gradient(var(--player-4),var(--player-4)) 100% 100% / 50% 50% no-repeat;
  }
  .magnet:not(.block) .magnet-names.players-2 strong,
  .magnet:not(.block) .magnet-names.players-3 strong,
  .magnet:not(.block) .magnet-names.players-4 strong {
    position: absolute !important;
    right: 3px !important;
    left: 3px !important;
    display: flex !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2px 4px !important;
    border: 0 !important;
    border-radius: 4px !important;
    background: rgba(17,28,21,.58) !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 850 !important;
    line-height: 1.05 !important;
    text-align: center !important;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px #000;
    white-space: nowrap !important;
  }
  .magnet-names.players-2 strong:nth-child(1) { top: 5% !important; bottom: 52% !important; }
  .magnet-names.players-2 strong:nth-child(2) { top: 52% !important; bottom: 5% !important; }
  .magnet-names.players-3 strong:nth-child(1) { top: 3% !important; bottom: 69% !important; }
  .magnet-names.players-3 strong:nth-child(2) { top: 36% !important; bottom: 36% !important; }
  .magnet-names.players-3 strong:nth-child(3) { top: 69% !important; bottom: 3% !important; }
  .magnet-names.players-4 strong:nth-child(1) { top: 2% !important; bottom: 76% !important; }
  .magnet-names.players-4 strong:nth-child(2) { top: 27% !important; bottom: 51% !important; }
  .magnet-names.players-4 strong:nth-child(3) { top: 52% !important; bottom: 26% !important; }
  .magnet-names.players-4 strong:nth-child(4) { top: 77% !important; bottom: 1% !important; }
}
.app-toast {
  position: fixed;
  z-index: 300;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(620px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 12px;
  background: #173f2a;
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .25);
  font-weight: 700;
}

.app-toast[hidden] { display: none; }
.flow-link.is-disabled { opacity: .5; }
.booking-limit-note { padding: 12px; border-radius: 10px; background: #fff3cd; color: #553d00; }
.booking-limit-notice { display:grid;gap:6px;width:min(1180px,calc(100% - 24px));margin:12px auto;padding:16px 18px;border:2px solid #c47b00;border-radius:14px;background:#fff3cd;color:#553d00;box-shadow:var(--shadow); }
.booking-limit-notice[hidden] { display:none; }
.booking-limit-notice strong { font-size:18px; }
.booking-limit-notice a { width:max-content;color:#553d00;font-weight:800; }
.global-booking-limit-notice { margin-top:16px; }
.booking-entry-disabled { opacity:.55!important;cursor:not-allowed!important;box-shadow:none!important; }
.booking-limit-inline { display:inline-flex;align-items:center;min-height:42px;padding:7px 12px;border-radius:9px;background:#fff3cd;color:#553d00;font-weight:800; }
.booking-rules-form { display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:18px; }
.booking-rules-form label { display:grid;gap:7px;font-weight:700; }
.booking-rules-actions,.booking-rules-form .form-message { grid-column:1/-1; }
.booking-rules-actions { display:flex;flex-wrap:wrap;gap:10px; }
@media (max-width:720px) { .booking-rules-form { grid-template-columns:1fr; } }
body.booking-limit-reached .date-box,
body.booking-limit-reached .booking-guide { opacity:.68; }
body.booking-limit-reached .workflow-step-button:not([data-flow-step="1"]) { pointer-events:none; }

@media (max-width: 600px) {
  .app-toast {
    left: 10px;
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    transform: none;
    max-width: none;
  }
}

/* Desktop-Endkorrektur: muss nach allen älteren Assistentenregeln stehen. */
@media (min-width:901px) {
  body.role-player .topbar,
  body.role-player[data-workflow-step="1"] .topbar,
  body.role-player[data-workflow-step="2"] .topbar,
  body.role-player[data-workflow-step="3"] .topbar { display:grid!important;grid-template-columns:1fr!important;width:min(1180px,calc(100% - 40px));max-width:none;margin:18px auto 0;padding:14px 18px; }
  body.role-player .booking-guide { position:static;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));width:min(1180px,calc(100% - 40px));max-width:none;margin:18px auto 0;padding:12px 12px 8px; }
  body.role-player .workflow-controls { grid-template-columns:190px minmax(300px,1fr) 230px;width:min(1180px,calc(100% - 40px));max-width:none;margin:0 auto 24px;padding:10px 12px 14px; }
  body.role-player[data-workflow-step="1"] .date-box { width:min(820px,100%);margin:0 auto;padding:26px 30px; }
  body.role-player[data-workflow-step="2"] .layout { width:min(820px,calc(100% - 40px));max-width:none;margin:0 auto 40px; }
  body.role-player[data-workflow-step="3"] .layout { width:min(1240px,calc(100% - 32px));max-width:none;margin:0 auto 40px; }
}


/* Version 5.2: Desktop-Buchungsassistent mit genau einem sichtbaren Schritt. */
@media (min-width: 901px) {
  body.role-player .player-home,
  body.role-player .device-booking-flow { display: none !important; }

  body.role-player .booking-guide {
    position: sticky;
    z-index: 90;
    top: 0;
    display: flex !important;
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 18px;
    background: rgba(247, 250, 247, .96);
    box-shadow: 0 8px 22px rgba(23, 63, 42, .08);
    backdrop-filter: blur(10px);
  }
  body.role-player .booking-guide .guide-step { flex: 1; }
  body.role-player .workflow-controls { display:grid !important; }

  body.role-player[data-workflow-step="1"] .welcome-panel,
  body.role-player[data-workflow-step="1"] .layout { display: none !important; }
  body.role-player[data-workflow-step="1"] .topbar {
    grid-template-columns: minmax(220px, .65fr) minmax(440px, 1fr);
    max-width: 1050px;
    margin: 24px auto 0;
  }
  body.role-player[data-workflow-step="1"] .date-box {
    display: block !important;
    padding: 24px;
    border: 2px solid var(--accent);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(23, 63, 42, .13);
  }
  body.role-player[data-workflow-step="1"] .wizard-next { width: 100%; }

  body.role-player[data-workflow-step="2"] .welcome-panel,
  body.role-player[data-workflow-step="2"] .date-box,
  body.role-player[data-workflow-step="2"] #bookingBoard { display: none !important; }
  body.role-player[data-workflow-step="2"] .topbar {
    display: block;
    max-width: 1180px;
    margin: 18px auto 0;
  }
  body.role-player[data-workflow-step="2"] .layout {
    display: block !important;
    max-width: 760px;
    margin: 0 auto 40px;
  }
  body.role-player[data-workflow-step="2"] .sidebar { display: block !important; }
  body.role-player[data-workflow-step="2"] .sidebar > :not(#bookingPartner) { display: none !important; }
  body.role-player[data-workflow-step="2"] #bookingPartner {
    display: block !important;
    padding: 28px;
    border: 2px solid var(--accent);
    box-shadow: 0 16px 38px rgba(23, 63, 42, .13);
  }

  body.role-player[data-workflow-step="3"] .welcome-panel,
  body.role-player[data-workflow-step="3"] .date-box,
  body.role-player[data-workflow-step="3"] .sidebar { display: none !important; }
  body.role-player[data-workflow-step="3"] .topbar {
    display: block;
    max-width: 1180px;
    margin: 18px auto 0;
  }
  body.role-player[data-workflow-step="3"] .layout {
    display: block !important;
    max-width: 1240px;
    margin: 0 auto 40px;
  }
  body.role-player[data-workflow-step="3"] #bookingBoard {
    display: block !important;
    width: 100%;
    min-height: 420px;
    padding: 18px;
    border: 2px solid var(--accent);
    box-shadow: 0 16px 38px rgba(23, 63, 42, .13);
  }
  body.role-player[data-workflow-step="4"] .topbar,
  body.role-player[data-workflow-step="4"] .layout { display: none !important; }
}

@media (min-width:901px) {
  body.role-player .topbar,
  body.role-player[data-workflow-step="1"] .topbar,
  body.role-player[data-workflow-step="2"] .topbar,
  body.role-player[data-workflow-step="3"] .topbar { display:grid!important;grid-template-columns:1fr!important;width:min(1180px,calc(100% - 40px));max-width:none;margin:18px auto 0;padding:14px 18px; }
  body.role-player .booking-guide { position:static;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));width:min(1180px,calc(100% - 40px));max-width:none;margin:18px auto 0;padding:12px 12px 8px; }
  body.role-player .workflow-controls { grid-template-columns:190px minmax(300px,1fr) 230px;width:min(1180px,calc(100% - 40px));max-width:none;margin:0 auto 24px;padding:10px 12px 14px; }
  body.role-player[data-workflow-step="1"] .date-box { width:min(820px,100%);margin:0 auto;padding:26px 30px; }
  body.role-player[data-workflow-step="2"] .layout { width:min(820px,calc(100% - 40px));max-width:none;margin:0 auto 40px; }
  body.role-player[data-workflow-step="3"] .layout { width:min(1240px,calc(100% - 32px));max-width:none;margin:0 auto 40px; }
}

/* Version 5.3.5: einheitliches Desktop-Raster für alle Assistentenschritte. */
@media (min-width:901px) {
  body.role-player .topbar,
  body.role-player[data-workflow-step="1"] .topbar,
  body.role-player[data-workflow-step="2"] .topbar,
  body.role-player[data-workflow-step="3"] .topbar,
  body.role-player .booking-guide,
  body.role-player .workflow-controls,
  body.role-player[data-workflow-step="1"] .date-box,
  body.role-player[data-workflow-step="2"] .layout,
  body.role-player[data-workflow-step="3"] .layout {
    width:min(1240px,calc(100% - 32px));
    max-width:none;
    margin-left:auto;
    margin-right:auto;
  }
  body.role-player[data-workflow-step="1"] .date-box,
  body.role-player[data-workflow-step="2"] .layout,
  body.role-player[data-workflow-step="3"] .layout { margin-top:0;margin-bottom:40px; }
  body.role-player[data-workflow-step="1"] .date-box,
  body.role-player[data-workflow-step="2"] #bookingPartner,
  body.role-player[data-workflow-step="3"] #bookingBoard { min-height:440px;padding:28px;border-radius:18px; }
  body.role-player[data-workflow-step="1"] .date-box { align-content:start; }
  body.role-player[data-workflow-step="2"] #bookingPartner { width:100%; }
}

@media (max-width:600px) {
  .date-time-choice { grid-template-columns:1fr;gap:12px; }
  .board-date-navigation { grid-template-columns:repeat(2,1fr); }
}

/* Einheitliche analoge Magnettafel: Viertelstunden-Spalten um Faktor 1,5 verbreitert. */
.magnet-page-board .board { width:2164px!important;min-width:2164px!important; }
.magnet-page-board .board tbody td { width:37.5px!important;min-width:37.5px!important; }

/* Stundenweise Flächen: gerade Stunden weiß, ungerade hellgrau. */
.magnet-page-board .board tbody td.hour-even { background:#fff!important; }
.magnet-page-board .board tbody td.hour-odd { background:#e7e9e7!important; }
.planning-magnet-board .board tbody td.hour-even,
.planning-magnet-board .board tbody td.hour-odd { background:#fff!important; }
.planning-magnet-board .board tbody td.booking-cell:not(.block-cell){background:#fff!important}
.planning-magnet-board .board tbody td.booking-cell[colspan]{width:auto!important;min-width:0!important}
.planning-magnet-board .board tbody td.planned-booking-cell { background:#f5e8a8!important; }

/* Version 5.17: konsistenter geführter Buchungsablauf. */
.planned-magnet {
  display:grid;
  grid-template-rows:auto 1fr;
  align-content:center;
  gap:3px;
  padding:5px 7px;
  overflow:hidden;
}
.planned-magnet .planned-time,
.planned-magnet .planned-players {
  position:static;
  display:block;
  min-width:0;
  overflow:hidden;
  color:#542f08;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.planned-magnet .planned-time { font-size:11px; }
.planned-magnet .planned-players { font-size:10px;font-weight:800; }
.planning-magnet-board .board tbody td.planned-booking-cell.hour-even,.planning-magnet-board .board tbody td.planned-booking-cell.hour-odd{background:#fff!important}
.planning-magnet-board .board .booking-cell.planned-booking-cell{height:88px!important;min-height:88px!important;padding:2px!important;vertical-align:middle!important}.planning-magnet-board .board .booking-cell.planned-booking-cell>.planned-magnet:not(.block){width:100%!important;height:84px!important;min-height:84px!important;max-height:84px!important;margin:0!important}
.planned-magnet:not(.block){position:relative;display:grid!important;grid-template-rows:1fr;align-content:stretch;gap:0;padding:0!important;overflow:visible!important;border:0!important;border-radius:11px!important;background:linear-gradient(90deg,color-mix(in srgb,var(--player-1) 48%,white) 0 7px,var(--player-1) 7px)!important;color:var(--player-ink-1)!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--player-1) 65%,white),0 10px 22px color-mix(in srgb,var(--player-1) 30%,transparent),0 2px 5px rgba(20,35,28,.18)!important;cursor:grab;transform:translateY(-4px);transition:transform .16s ease,box-shadow .16s ease}
.planned-magnet:not(.block):hover{transform:translateY(-6px);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--player-1) 55%,white),0 14px 27px color-mix(in srgb,var(--player-1) 36%,transparent),0 3px 7px rgba(20,35,28,.2)!important}.planned-magnet:not(.block):active{cursor:grabbing;transform:translateY(-2px) scale(.985)}
.planned-magnet .planned-time{position:static;display:flex;align-items:center;justify-content:center;min-height:25px;padding:4px 30px 3px 10px;background:rgba(7,30,57,.3);color:#fff;font-size:11px;font-weight:800;letter-spacing:.015em;text-shadow:0 1px 2px rgba(0,0,0,.25);white-space:nowrap}
.planned-main-booker{display:grid;place-items:center;width:100%;height:100%;min-width:0;min-height:0;margin:0;padding:6px 17px;border:0;border-radius:11px;background:transparent!important;color:inherit;box-shadow:none;cursor:pointer;overflow:hidden}
.planned-magnet:hover .planned-main-booker,.planned-magnet:focus-within .planned-main-booker{background:color-mix(in srgb,var(--player-ink-1) 9%,transparent)!important}.planned-main-booker span{display:block;width:100%;max-width:100%;overflow:hidden;font-size:14px;font-weight:850;line-height:1.15;text-align:center;white-space:nowrap;-webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 18px),transparent 100%);mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 18px),transparent 100%)}
.planned-magnet[data-tooltip]::after{position:absolute;z-index:50;left:50%;bottom:calc(100% + 8px);width:max-content;max-width:min(300px,80vw);padding:8px 10px;border-radius:8px;background:#172b3d;color:#fff;box-shadow:0 8px 22px rgba(0,0,0,.22);content:attr(data-tooltip);font-size:12px;font-weight:700;line-height:1.35;opacity:0;pointer-events:none;transform:translate(-50%,5px);transition:opacity .15s ease,transform .15s ease}.planned-magnet[data-tooltip]:hover::after,.planned-magnet[data-tooltip]:focus-within::after{opacity:1;transform:translate(-50%,0)}
@media(max-width:600px){.planned-magnet[data-tooltip]::after{display:none}.planned-main-booker{padding-inline:15px}.planned-main-booker span{font-size:12px}}
.completed-booking-magnet[data-tooltip]::after{position:absolute;z-index:50;left:50%;bottom:calc(100% + 8px);width:max-content;max-width:min(300px,80vw);padding:8px 10px;border-radius:8px;background:#172b3d;color:#fff;box-shadow:0 8px 22px rgba(0,0,0,.22);content:attr(data-tooltip);font-size:12px;font-weight:700;line-height:1.35;opacity:0;pointer-events:none;transform:translate(-50%,5px);transition:opacity .15s ease,transform .15s ease}.completed-booking-magnet[data-tooltip]:hover::after,.completed-booking-magnet[data-tooltip]:focus-within::after{opacity:1;transform:translate(-50%,0)}@media(max-width:600px){.completed-booking-magnet[data-tooltip]::after{display:none}}
body.role-player[data-workflow-step="4"] .layout,
body.role-player[data-workflow-step="4"] .date-box,
body.role-player[data-workflow-step="4"] .welcome-panel,
body.role-player[data-workflow-step="4"] .booking-guide,
body.role-player[data-workflow-step="4"] .workflow-controls,
body.role-player[data-workflow-step="4"] .device-booking-flow,
body.role-player[data-workflow-step="4"] .mobile-bottom-nav { display:none!important; }
body.role-player[data-workflow-step="4"] .booking-review-step {
  display:block!important;
  width:min(760px,calc(100% - 24px));
  margin:clamp(18px,7vh,72px) auto;
}
body.role-player[data-workflow-step="4"] .topbar { display:grid!important; }

@media (max-width:900px) {
  body.role-player[data-workflow-step] .mobile-bottom-nav { display:none!important; }
  body.role-player[data-workflow-step="3"] .workflow-controls {
    position:sticky;
    top:0;
    z-index:110;
    grid-template-columns:82px minmax(0,1fr) 128px;
    gap:6px;
    margin:0;
    padding:8px;
    background:#fff;
    box-shadow:0 5px 16px rgba(23,63,42,.16);
  }
  body.role-player[data-workflow-step="3"] .workflow-progress-copy span { display:none; }
  body.role-player[data-workflow-step="3"] #boardScroll {
    height:calc(100dvh - 285px);
    min-height:360px;
    max-height:640px;
    overscroll-behavior:contain;
  }
  body.role-player[data-workflow-step="3"] #bookingBoard { padding:10px; }
}

@media (max-width:600px) {
  body.role-player[data-workflow-step="1"] .date-box { display:block!important;padding:16px; }
  body.role-player[data-workflow-step="1"] .time-utilization { margin-top:12px;min-height:0; }
  body.role-player[data-workflow-step="1"] .time-utilization > div { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.role-player[data-workflow-step="1"] .date-load-picker { margin-top:8px; }
  .magnet-page-toolbar .overview-date-row {
    display:grid;
    grid-template-columns:38px 38px minmax(142px,1fr) 38px 38px;
    gap:5px;
  }
  .magnet-page-toolbar .overview-date-row > * { width:100%;min-width:0; }
}
.training-range,.training-admin-actions{display:flex;gap:1rem;align-items:end;flex-wrap:wrap}.training-range label{flex:1;min-width:12rem}.training-admin-panel hr{border:0;border-top:1px solid var(--border-color,#d7ddd8);margin:1.25rem 0}.training-admin-panel .danger{margin-top:.75rem}
.admin-portal-page{background:#f3f6f4}.admin-portal-header{border-bottom:4px solid var(--accent)}.admin-dashboard,.admin-subpage{width:min(1120px,calc(100% - 32px));margin:24px auto 70px;display:grid;gap:20px}.admin-topic{padding:24px;border:1px solid #cad8cf;border-radius:18px;background:#fff;box-shadow:0 10px 30px rgba(26,55,38,.07)}.admin-topic>div:first-child{margin-bottom:16px}.admin-topic h2{margin:4px 0}.admin-topic p{margin:0;color:var(--muted)}.admin-nav-icon{background:#e8f3ec!important;border-color:#79a98a!important}.danger-zone{border:2px solid #d49a9a;background:#fff8f8}.admin-operation-message{position:sticky;bottom:14px;padding:12px 16px;border-radius:10px;background:#fff;box-shadow:0 5px 20px #0002}@media(max-width:650px){.admin-dashboard,.admin-subpage{width:min(100% - 20px,1120px);margin-top:12px}.admin-topic{padding:16px}}
.booking-list-filters{display:grid;grid-template-columns:2fr repeat(4,minmax(130px,1fr)) auto;gap:12px;align-items:end}.booking-list-filters>div{grid-column:1/-1}.booking-list-filters h2{margin:0}.booking-list-filters label{display:grid;gap:5px;font-weight:700}.admin-booking-table-wrap{overflow:auto}.admin-booking-table{width:100%;border-collapse:collapse}.admin-booking-table th,.admin-booking-table td{padding:11px 9px;border-bottom:1px solid var(--line);text-align:left}.admin-booking-table th{font-size:12px;text-transform:uppercase;color:var(--muted)}.booking-type{display:inline-block;padding:4px 8px;border-radius:999px;background:#e8edf0;font-size:12px;font-weight:800}.type-play{background:#e1f2e7;color:#195b36}.type-training{background:#e5ecff;color:#284f9c}.type-team{background:#fff0cf;color:#80540b}.type-closed{background:#f8dfdf;color:#8b2929}.admin-booking-cards{display:none}.admin-edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.admin-edit-grid label{display:grid;gap:5px;font-weight:700}.admin-edit-grid .wide{grid-column:1/-1}.admin-edit-dialog{max-width:650px}.empty-state{text-align:center;color:var(--muted);padding:30px}@media(max-width:800px){.booking-list-filters{grid-template-columns:1fr 1fr}.booking-list-filters>div,.booking-list-filters label:first-of-type{grid-column:1/-1}.admin-booking-table-wrap{display:none}.admin-booking-cards{display:grid;gap:10px}.admin-booking-card{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:12px}.admin-booking-card>div{display:grid;gap:6px}.admin-edit-grid{grid-template-columns:1fr}.admin-edit-grid .wide{grid-column:auto}}@media(max-width:480px){.booking-list-filters{grid-template-columns:1fr}.booking-list-filters>*{grid-column:1!important}.admin-booking-card{grid-template-columns:1fr}.admin-booking-card button{width:100%}}
.profile-name-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.profile-name-grid label{display:grid;gap:5px}.profile-name-grid input[readonly]{background:#f2f4f2;color:var(--muted)}@media(max-width:600px){.profile-name-grid{grid-template-columns:1fr}}
.booking-save-status{margin:14px 0;padding:14px 16px;border-radius:12px;font-weight:800}.booking-save-status.is-success{border:1px solid #76b58c;background:#e5f5ea;color:#145b32}.booking-save-status.is-error{border:1px solid #d39090;background:#fff0f0;color:#8a2424}
.compact-booking-row{display:flex;align-items:center;gap:12px;min-width:max-content;padding:8px 2px;border-top:1px solid var(--line);white-space:nowrap}.compact-booking-row .compact-booking-date{min-width:145px}.compact-booking-row .compact-booking-players{max-width:280px;overflow:hidden;text-overflow:ellipsis}.compact-booking-row .booking-actions{margin-left:auto;flex-wrap:nowrap}.compact-booking-row .compact-action{min-height:34px;padding:6px 10px;font-size:12px}.overview-bookings{overflow-x:auto}.compact-booking-row.is-past{color:var(--muted)}
.club-selection-step{display:grid;gap:.8rem;scroll-margin:20vh 0}.club-switcher{margin:.45rem 0;min-width:0}.club-switcher label{display:flex;align-items:center;gap:.55rem;font-size:.85rem;min-width:0}.club-switcher select{min-width:0;max-width:100%;padding:.45rem}.current-club{margin-bottom:.2rem}.club-header-logo{display:block;width:auto;height:auto;max-width:120px;max-height:48px;object-fit:contain;object-position:left center;margin-bottom:.5rem;flex:0 1 120px}.header-identity .player-icon-actions{flex:0 0 auto;max-width:100%;overflow-x:auto}.court-settings-list{display:grid;gap:.65rem;margin:1rem 0 1.5rem}.court-setting-row{display:grid;grid-template-columns:minmax(10rem,1fr) minmax(9rem,.45fr) auto;gap:.6rem;padding:.7rem;border-radius:12px}.court-setting-row.outdoor,.court-outdoor{background-color:#ead8b5!important}.court-setting-row.indoor,.court-indoor{background-color:#dbe8ef!important}@media(max-width:900px){.club-header-logo{max-width:80px;max-height:40px;flex-basis:80px}}@media(max-width:620px){.court-setting-row{grid-template-columns:1fr}.club-switcher label{align-items:flex-start;flex-direction:column}.club-switcher select{width:100%}.club-header-logo{max-width:96px;max-height:42px}}
.modal-open,.modal-open body{overflow:hidden}.club-selection-backdrop{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:rgba(27,34,30,.72);backdrop-filter:blur(3px);overscroll-behavior:contain}.club-selection-dialog{box-sizing:border-box;display:grid;gap:.85rem;width:min(430px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:clamp(1.15rem,4vw,1.8rem);border:1px solid rgba(255,255,255,.7);border-radius:20px;background:#fff;box-shadow:0 24px 80px rgba(0,0,0,.35)}.club-selection-dialog h2,.club-selection-dialog p{margin:0}.club-selection-dialog select,.club-selection-dialog button{width:100%;min-height:48px}.club-selection-dialog:focus{outline:none}@media(max-height:480px){.club-selection-backdrop{place-items:start center}.club-selection-dialog{border-radius:14px;padding:1rem}}
.club-selection-viewport{position:fixed!important;inset:0!important;z-index:2147483000!important;box-sizing:border-box!important;width:100vw!important;height:100vh!important;height:100dvh!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:clamp(12px,3vw,32px)!important;background:rgba(32,36,34,.78)!important;overflow:auto!important;overscroll-behavior:contain!important}.club-selection-viewport>.club-selection-dialog{position:relative!important;inset:auto!important;transform:none!important;flex:0 1 440px!important;width:min(440px,100%)!important;max-width:440px!important;max-height:calc(100dvh - 24px)!important;margin:auto!important;overflow:auto!important;background:#fff!important;color:#172019!important}.club-selection-viewport select,.club-selection-viewport button{box-sizing:border-box;width:100%;min-height:50px}@supports(padding:max(0px)){.club-selection-viewport{padding-top:max(12px,env(safe-area-inset-top))!important;padding-right:max(12px,env(safe-area-inset-right))!important;padding-bottom:max(12px,env(safe-area-inset-bottom))!important;padding-left:max(12px,env(safe-area-inset-left))!important}}@media(max-height:520px){.club-selection-viewport{align-items:flex-start!important}.club-selection-viewport>.club-selection-dialog{margin:0 auto!important;max-height:calc(100dvh - 24px)!important}}
.court-setting-row{grid-template-columns:repeat(auto-fit,minmax(9rem,1fr))!important;border:1px solid var(--line)}
.court-setting-row legend{font-weight:800;padding:0 .35rem}.court-setting-row label{display:grid;gap:.25rem;font-size:.8rem}
.court-setting-row.is-inactive{opacity:.62;filter:grayscale(.55)}.court-setting-row .court-active-label{display:flex;align-items:center;gap:.5rem;font-weight:800}.court-setting-row .court-active-label input{width:auto;margin:0}
.court-setting-row.sport-padel,.sport-padel>th,.sport-padel .court-number{background-color:#cbe8e5!important;border-color:#70aaa4!important}
.super-members-page{width:min(100% - 24px,1800px);margin:18px auto 60px;display:grid;gap:16px}.super-members-toolbar{display:grid;gap:14px}.super-member-filters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px}.super-member-filters label{display:grid;gap:5px;font-weight:800}.column-picker summary{cursor:pointer;font-weight:850}.column-picker>div{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:10px}.column-picker label{display:flex;align-items:center;gap:5px;font-size:.82rem}.global-members-table-wrap{overflow:auto;padding:0}.global-members-table{border-collapse:collapse;min-width:100%;font-size:.82rem}.global-members-table th{position:sticky;top:0;z-index:2;background:#eef3ef}.global-members-table th,.global-members-table td{padding:7px;border:1px solid var(--line);white-space:nowrap}.global-members-table input:not([type=checkbox]):not([type=color]),.global-members-table select{min-width:125px;padding:7px}.global-row-actions{display:flex;gap:6px}.global-row-actions button{min-height:34px;padding:6px 9px;font-size:.75rem}@media(max-width:700px){.super-member-filters{grid-template-columns:1fr}}
.court-number small{display:block;font-size:.58rem;text-transform:uppercase;letter-spacing:.05em}.sport-padel .planned-magnet{outline:3px solid #287f78}
.booking-assistant{display:flex;align-items:center;gap:.75rem;width:min(760px,calc(100% - 24px));margin:12px auto;padding:12px 16px;border:1px solid color-mix(in srgb,var(--accent) 45%,#fff);border-radius:14px;background:color-mix(in srgb,var(--accent) 9%,#fff);box-shadow:0 8px 24px #00000012}.booking-assistant[hidden]{display:none}.booking-assistant div{display:grid;gap:2px}.booking-assistant strong{font-size:.9rem}.booking-assistant span:not(.assistant-icon){color:var(--muted);font-size:.85rem}.assistant-icon{display:grid;place-items:center;flex:0 0 28px;height:28px;border-radius:50%;background:var(--accent);color:#fff;font-weight:900}.assistant-target{position:relative;z-index:2;outline:3px solid color-mix(in srgb,var(--accent) 68%,#fff)!important;outline-offset:4px;box-shadow:0 0 0 7px color-mix(in srgb,var(--accent) 18%,transparent),0 8px 20px #0002;animation:assistant-nudge 1.8s ease-in-out infinite}@keyframes assistant-nudge{0%,65%,100%{transform:translateY(0)}75%{transform:translateY(-3px)}85%{transform:translateY(1px)}}@media(prefers-reduced-motion:reduce){.assistant-target{animation:none}}@media(max-width:600px){.booking-assistant{width:calc(100% - 20px);padding:10px 12px}}
.magnet-page-board .booking-cell{position:relative;overflow:visible}.magnet-page-board .booking-cell .magnet{position:relative;display:flex;align-items:center;justify-content:center;height:calc(100% - 4px);min-height:48px;border:1px solid rgba(24,35,42,.68);border-left-width:5px;border-radius:9px;box-shadow:0 3px 7px rgba(21,31,38,.24),inset 0 1px rgba(255,255,255,.3);transform:none;color:#fff;overflow:visible;isolation:isolate}.magnet-page-board .booking-type-single{background:#41627a!important;border-left-color:#263f52!important}.magnet-page-board .booking-type-double{background:#526f63!important;border-left-color:#304b40!important}.magnet-page-board .booking-type-group{background:#685f7c!important;border-left-color:#453d58!important}.magnet-page-board .booking-type-training{background:#5d7183!important;border-left-color:#344b5e!important}.magnet-page-board .booking-type-team{background:#70664f!important;border-left-color:#4c432f!important}.magnet-page-board .booking-type-competition{background:#765a61!important;border-left-color:#513a40!important}.magnet-page-board .booking-type-closed{background:#666b6d!important;border-left-color:#383e40!important}.magnet-page-board [data-booking-tooltip]::after{content:attr(data-booking-tooltip);position:absolute;z-index:80;left:50%;bottom:calc(100% + 9px);width:max-content;max-width:min(360px,80vw);padding:9px 12px;border:1px solid #34434b;border-radius:8px;background:#182832;color:#fff;box-shadow:0 8px 22px rgba(14,25,31,.3);font-size:12px;font-weight:650;line-height:1.4;white-space:normal;opacity:0;pointer-events:none;transform:translate(-50%,5px);transition:opacity .16s ease,transform .16s ease}.magnet-page-board [data-booking-tooltip]:hover::after,.magnet-page-board [data-booking-tooltip]:focus::after,.magnet-page-board [data-booking-tooltip].tooltip-open::after{opacity:1;transform:translate(-50%,0)}.magnet-page-board .booking-cell .magnet-names,.magnet-page-board .booking-cell .magnet-names.players-1{position:static;background:transparent!important}.magnet-page-board .booking-cell .magnet-names.players-1 strong{position:static;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.45);font-weight:800;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.magnet-page-board .booking-cell .magnet:focus-visible{outline:3px solid #fff;outline-offset:-5px}
