/* Book & Fight: spokojny, jasny układ. Białe karty na jasnoszarym tle, czarne akcje, jeden zielony akcent.
   Wszystkie kolory są w tokenach; ciemny wygląd (przełącznik w menu) podmienia tylko tokeny. */
:root {
  --bg: #f4f5f6;
  --surface: #fff;
  --surface-2: #f0f1f3;
  --field: #fff;
  --line: #e7e9ec;
  --line-strong: #d5d8dd;
  --card-line: transparent;
  --text: #15171a;
  --muted: #666b73;
  --placeholder: #9aa0a8;
  --accent: #15171a; /* główne akcje są czarne */
  --accent-ink: #fff;
  --pop: #3a7a00; /* akcent jako tekst lub obrys */
  --pop-bg: #e4f5c8; /* akcent jako wypełnienie */
  --pop-ink: #2b5a00;
  --gold: #a86400;
  --danger: #c22a2a;
  --danger-bg: #fdecec;
  --warn-bg: #fff7df;
  --warn-line: #f1dc9c;
  --glass: rgba(255, 255, 255, 0.92);
  --trainer-top: rgba(225, 236, 255, 0.95); /* pasek u góry, gdy zalogowany jest trener */
  --trainer-line: #c9daf6;
  --scrim: rgba(21, 23, 26, 0.38);
  --shadow: 0 1px 2px rgba(21, 23, 26, 0.04), 0 6px 20px rgba(21, 23, 26, 0.05);
  --shadow-up: 0 2px 4px rgba(21, 23, 26, 0.05), 0 12px 32px rgba(21, 23, 26, 0.1);
  --radius: 20px;
  --tabbar: 62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-look="dark"] {
  --bg: #000;
  --surface: #0e0e0e;
  --surface-2: #1a1a1a;
  --field: #1a1a1a;
  --line: #262626;
  --line-strong: #3d3d3d;
  --card-line: #262626;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --placeholder: #6f6f6f;
  --accent: #fff;
  --accent-ink: #000;
  --pop: #c8ff3d;
  --pop-bg: #c8ff3d;
  --pop-ink: #000;
  --gold: #ffc53d;
  --danger: #ff6b6b;
  --danger-bg: rgba(255, 92, 92, 0.16);
  --warn-bg: rgba(255, 197, 61, 0.08);
  --warn-line: rgba(255, 197, 61, 0.4);
  --glass: rgba(0, 0, 0, 0.85);
  --trainer-top: rgba(10, 24, 46, 0.9);
  --trainer-line: #1e3458;
  --scrim: rgba(0, 0, 0, 0.6);
  --shadow: none;
  --shadow-up: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button { font-family: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.22; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.1rem); font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
main.wrap { flex: 1; padding-top: 28px; padding-bottom: 64px; }
.muted { color: var(--muted); }
.strong { color: var(--text); font-weight: 600; }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
section + section { margin-top: 44px; }

/* nagłówek */
.top { position: sticky; top: 0; z-index: 20; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
:root[data-trainer] .top { background: var(--trainer-top); border-bottom-color: var(--trainer-line); }
.top-in { display: flex; align-items: center; height: 60px; gap: 8px; }
.icon-btn { flex: none; display: grid; place-items: center; width: 42px; height: 42px; margin-left: -9px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 24px; height: 24px; }
.logo { font-weight: 800; font-size: 1.05rem; letter-spacing: 0.04em; text-decoration: none; white-space: nowrap; }
.logo span { color: var(--pop); padding: 0 1px; }
#nav { display: flex; align-items: center; gap: 4px; min-width: 0; margin-left: auto; }
#nav a, #nav button.link { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 0.925rem; font-weight: 500; white-space: nowrap; }
#nav button.link { background: none; border: 0; cursor: pointer; }
#nav a:hover, #nav button.link:hover, #nav a.on { color: var(--text); background: var(--surface-2); }
#nav a.btn { color: var(--accent-ink); padding: 6px 16px; }
#nav a.btn:hover { background: var(--accent); }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 24px; }

/* wysuwane menu (trzy paski w lewym górnym rogu) */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; }
.scrim.open { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 41; display: flex; flex-direction: column; width: min(320px, 86vw); padding: calc(env(safe-area-inset-top, 0px) + 10px) 0 calc(env(safe-area-inset-bottom, 0px) + 16px); background: var(--surface); box-shadow: var(--shadow-up); overflow-y: auto; transform: translateX(-102%); visibility: hidden; transition: transform 0.22s ease-out, visibility 0.22s; }
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 6px max(20px, env(safe-area-inset-left, 0px)); }
.drawer-head .icon-btn { margin: 0; }
.drawer-group { padding: 10px 12px; }
.drawer-group + .drawer-group { border-top: 1px solid var(--line); }
.drawer-group:empty { display: none; }
.drawer-label { padding: 6px 12px 4px; color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.drawer-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: inherit; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.drawer-item:hover { background: var(--surface-2); }
.drawer-item svg { flex: none; width: 22px; height: 22px; color: var(--muted); }
.drawer-item.on { background: var(--surface-2); font-weight: 600; }
.drawer-item.on svg { color: var(--text); }
.drawer-item .badge { margin-left: auto; }
.drawer-item .tick { margin-left: auto; color: var(--pop); font-weight: 700; }
.drawer-note { padding: 4px 12px 8px; color: var(--muted); font-size: 0.875rem; }
.drawer-note ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.drawer-note code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); font-size: 0.82rem; overflow-wrap: anywhere; }
.drawer-foot { margin-top: auto; }
.switch { flex: none; position: relative; width: 44px; height: 26px; margin-left: auto; border-radius: 999px; background: var(--line-strong); transition: background 0.15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
[aria-checked="true"] .switch { background: var(--pop); }
[aria-checked="true"] .switch::after { transform: translateX(18px); }

/* dolny pasek aplikacji (tylko telefon) */
#tabbar { display: none; }

/* przyciski i formularze */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border: 1px solid transparent; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform 0.08s, opacity 0.15s, background 0.15s; }
.btn:hover { opacity: 0.86; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); opacity: 1; }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.sm { min-height: 38px; padding: 6px 16px; border-radius: 12px; font-size: 0.875rem; }
.btn.block { width: 100%; }
:focus-visible { outline: 2px solid var(--pop); outline-offset: 2px; }

label.field { display: block; }
label.field > span { display: block; margin-bottom: 6px; font-size: 0.875rem; font-weight: 500; color: var(--muted); }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--text); font: inherit; }
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--accent); }
input[type="range"] { padding: 0; min-height: 28px; accent-color: var(--accent); background: transparent; border: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
::placeholder { color: var(--placeholder); }
.form { display: grid; gap: 16px; }
.form .two { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form-error { color: var(--danger); font-size: 0.9rem; min-height: 1.2em; }

/* karty */
.card { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.narrow { max-width: 460px; margin: 0 auto; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--radius); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: var(--surface-2); color: var(--text); white-space: nowrap; }
.badge.ok { background: var(--pop-bg); color: var(--pop-ink); }
.badge.off { background: var(--surface-2); color: var(--muted); }
.badge.bad { background: var(--danger-bg); color: var(--danger); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.stars { color: var(--gold); font-weight: 600; white-space: nowrap; }
/* awatary to jedyne kolorowe plamy w interfejsie: pastele */
.avatar { --h: 10; flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-weight: 700; font-size: 1.05rem; color: #1b1d20; background: hsl(var(--h) 75% 86%); }
.avatar.lg { width: 84px; height: 84px; font-size: 1.7rem; }

/* strona główna */
.hero { padding: 16px 0 4px; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); line-height: 1.14; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--pop); }
.hero p { margin-top: 14px; max-width: 560px; color: var(--muted); font-size: 1.05rem; }
.search { display: grid; grid-template-columns: 1fr 190px; gap: 12px; margin-top: 24px; }
.search input, .search select { border-radius: 14px; padding-left: 16px; }
.chips { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 38px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer; }
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.list-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.trainer-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s; }
.trainer-card:hover { box-shadow: var(--shadow-up); border-color: var(--line-strong); transform: translateY(-2px); }
.tc-top { display: flex; gap: 14px; align-items: center; }
.tc-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price b { font-size: 1.1rem; color: var(--text); }
.next { padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--muted); }
.next b { color: var(--pop); font-weight: 600; }

/* profil trenera + rezerwacja */
.profile { display: grid; gap: 20px 24px; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto 1fr; grid-template-areas: "head box" "reviews box"; align-items: start; }
.p-head { grid-area: head; }
.p-reviews { grid-area: reviews; }
.profile-head { display: flex; gap: 16px; align-items: center; }
.booking-box { grid-area: box; position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; }
.svc { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid transparent; background: var(--surface-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.svc + .svc { margin-top: 8px; }
.svc.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.svc b { white-space: nowrap; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 62px; padding: 8px 4px; border-radius: 14px; border: 1px solid transparent; background: var(--surface-2); color: var(--text); font: inherit; text-align: center; cursor: pointer; }
.day small { display: block; color: var(--muted); font-size: 0.75rem; }
.day b { display: block; font-size: 1.15rem; font-weight: 600; }
.day.off { opacity: 0.35; cursor: default; }
.day.on { background: var(--accent); color: var(--accent-ink); }
.day.on small { color: inherit; opacity: 0.7; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.slot { min-height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-weight: 500; cursor: pointer; }
.slot:hover { border-color: var(--accent); }
.slot.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.step { font-size: 0.875rem; font-weight: 600; color: var(--muted); margin: 22px 0 10px; }
.step:first-child { margin-top: 0; }
.summary { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--pop-bg); color: var(--pop-ink); font-size: 0.925rem; }
.cta-bar { margin-top: 16px; }
.review + .review { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.success-icon { width: 60px; height: 60px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--pop-bg); color: var(--pop-ink); font-size: 1.8rem; font-weight: 700; }

/* rezerwacje */
.booking { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.booking + .booking { margin-top: 14px; }
.when { flex: none; width: 92px; text-align: center; padding: 10px 6px; border-radius: 14px; background: var(--surface-2); color: var(--text); }
.when b { display: block; font-size: 1.25rem; font-weight: 700; }
.when small { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.rate { display: flex; gap: 4px; }
.rate button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.rate button.on { color: var(--gold); border-color: var(--gold); }

/* miejsce treningu */
.btn svg { flex: none; width: 18px; height: 18px; }
.place-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 0.925rem; }
.place-row > svg { flex: none; width: 20px; height: 20px; color: var(--muted); }
.map-link { display: inline-flex; align-items: center; gap: 4px; color: var(--pop); font-weight: 600; text-decoration: none; white-space: nowrap; }
.map-link:hover { text-decoration: underline; }
.link-btn { padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.link-btn:disabled { opacity: 0.5; cursor: default; }
.feed-help { margin: 14px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.feed-copy { flex-wrap: nowrap; }
.feed-copy input { flex: 1; min-width: 0; font-size: 0.85rem; }
.map-link svg { width: 16px; height: 16px; }
.place-line { margin-top: 4px; }
.day-head { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px; }
.day-head:first-of-type { margin-top: 4px; }
.day-head a { margin-left: auto; color: var(--muted); }

/* okno z dołu ekranu (telefon) / na środku (komputer) */
body.sheet-open { overflow: hidden; }
.sheet-scrim { position: fixed; inset: 0; z-index: 60; background: var(--scrim); animation: fade 0.15s ease-out; }
.sheet { position: fixed; z-index: 61; left: 50%; top: 50%; width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; transform: translate(-50%, -50%); padding: 22px 20px 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-up); animation: fade 0.15s ease-out; }
.sheet:focus { outline: none; }
.sheet-x { position: absolute; top: 10px; right: 10px; margin: 0; }
.sheet-body { padding-right: 28px; }
.sheet-body > .row:first-child h2 { padding-right: 8px; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin: 16px 0; font-size: 0.925rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.sheet-actions { margin-top: 4px; }
.reject-form { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.wrap-chips { flex-wrap: wrap; overflow: visible; margin-top: 0; }
@keyframes fade { from { opacity: 0; } }

/* kalendarz trenera (jak Google Calendar) */
.cal-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-nav { gap: 4px; }
.cal-nav .icon-btn { margin: 0; }
.cal-title { font-size: 1.05rem; }
.seg { display: inline-flex; margin-left: auto; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.seg button { min-height: 34px; padding: 4px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 0.875rem; font-weight: 500; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.cal-wrap { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--card-line); box-shadow: var(--shadow); overflow: clip; }
.cal-load { padding: 40px; text-align: center; }
.cal-head, .cal-body { display: grid; grid-template-columns: 46px repeat(var(--cols), minmax(0, 1fr)); }
.cal-head { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 60px); z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line); }
.cal-dh { display: flex; flex-direction: column; align-items: center; padding: 8px 2px 6px; min-width: 0; text-align: center; }
.cal-dh small { color: var(--muted); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.cal-dh b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 1.15rem; font-weight: 600; }
.cal-dh.today small { color: var(--pop); }
.cal-dh.today b { background: var(--accent); color: var(--accent-ink); }
.cal-dh.past b { color: var(--muted); font-weight: 500; }
.cal-count { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pop); font-size: 0.7rem; font-weight: 600; }
.cal-times { position: relative; }
.cal-hour { position: relative; }
.cal-hour span { position: absolute; top: -0.6em; right: 6px; color: var(--muted); font-size: 0.7rem; font-variant-numeric: tabular-nums; }
/* kolumna dnia: szare tło = poza godzinami pracy, białe pola = godziny pracy, kreski co godzinę */
.cal-col { position: relative; min-width: 0; border-left: 1px solid var(--line); background: var(--surface-2); cursor: copy; }
.cal-col::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% var(--hh); }
.cal-col.past { cursor: default; }
.cal-col.past .cal-open { opacity: 0.55; }
.cal-open { position: absolute; left: 0; right: 0; background: var(--surface); }
.ev { position: absolute; z-index: 2; left: 2px; right: 3px; display: flex; flex-direction: column; gap: 1px; overflow: hidden; padding: 4px 6px; border: 0; border-left: 3px solid var(--pop); border-radius: 8px; background: var(--pop-bg); color: var(--pop-ink); font: inherit; font-size: 0.78rem; line-height: 1.25; text-align: left; cursor: pointer; }
.ev b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.85; }
.ev.short { flex-direction: row; align-items: center; padding-top: 1px; padding-bottom: 1px; }
.ev:hover { filter: brightness(0.97); }
.ev.focus { box-shadow: 0 0 0 2px var(--accent); }
.ev-completed, .ev-no_show { border-left-color: var(--line-strong); background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.ev-no_show b { text-decoration: line-through; }
.ev-block { border-left-color: var(--muted); background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--line) 6px 12px); color: var(--text); }
.cal-now { position: absolute; z-index: 3; left: -1px; right: 0; height: 2px; background: var(--danger); pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-strong); }
.sw-open { background: var(--surface); }
.sw-ev { background: var(--pop-bg); border-color: var(--pop); }
.sw-block { background: repeating-linear-gradient(135deg, var(--surface-2) 0 3px, var(--line-strong) 3px 6px); }

/* panele */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 24px 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi { padding: 16px 18px; }
.kpi small { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.kpi b { display: block; margin-top: 4px; font-size: 1.55rem; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 0.8rem; color: var(--muted); }
.kpi.hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kpi.hot small, .kpi.hot span { color: inherit; opacity: 0.72; }
.checklist { margin: 0; padding: 0; list-style: none; display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 0.9rem; }
.checklist li::before { content: "○ "; color: var(--muted); }
.checklist li.done::before { content: "✓ "; color: var(--pop); font-weight: 700; }
.day-row { display: grid; grid-template-columns: 150px 1fr 1fr; gap: 10px; align-items: center; padding: 10px 0; }
.day-row + .day-row { border-top: 1px solid var(--line); }
.day-row label { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.svc-row { display: grid; grid-template-columns: minmax(0, 2fr) 120px 110px auto auto; gap: 8px; align-items: end; }
.svc-row + .svc-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.9rem; font-weight: 500; cursor: pointer; }
.checks label:has(input:checked) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.checks label:has(input:checked) input { accent-color: var(--accent-ink); }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.plans.single { max-width: 460px; }
.plan { display: flex; flex-direction: column; gap: 12px; }
.plan.current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), var(--shadow); }
.plan .big { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em; }
.plan .big small { font-size: 0.95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.925rem; }
.plan ul li + li { margin-top: 6px; }
.plan .btn { margin-top: auto; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
th, td { padding: 12px 14px; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 0.8rem; font-weight: 500; }
td { border-top: 1px solid var(--line); }
td.num, th.num { text-align: right; }

/* dla trenerów */
.pitch { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pitch .card b { display: block; margin-bottom: 6px; }
.calc { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; align-items: center; }
.calc output { font-weight: 600; color: var(--text); }
.calc-result { display: grid; gap: 10px; }
.calc-line { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid transparent; }
.calc-line.best { border-color: var(--pop); }
.calc-line b { white-space: nowrap; }

/* dzwonek, lista powiadomień, konto */
img.avatar { object-fit: cover; background: var(--surface-2); }
#nav a.bell { position: relative; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; color: var(--text); }
#nav a.bell svg { width: 22px; height: 22px; }
#nav a.bell i { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-style: normal; font-size: 0.68rem; font-weight: 700; line-height: 18px; text-align: center; }
.narrow-l { max-width: 620px; margin-left: auto; margin-right: auto; }
.notif-list { padding: 6px 20px; }
.notif-row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; text-decoration: none; }
.notif-row + .notif-row { border-top: 1px solid var(--line); }
.notif-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
.notif-ic svg { width: 20px; height: 20px; }
.notif-row.unread .notif-ic { background: var(--pop-bg); color: var(--pop-ink); }
.channel { display: flex; gap: 12px; align-items: center; padding: 12px 0; }
.channel + .channel { border-top: 1px solid var(--line); }
.channel .badge { flex: none; min-width: 64px; text-align: center; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.consent input { flex: none; margin-top: 1px; }
.menu { padding: 6px 20px; }
.menu a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 0; text-decoration: none; font-weight: 500; }
.menu a::after { content: "›"; color: var(--muted); font-size: 1.3rem; line-height: 1; }
.menu a + a { border-top: 1px solid var(--line); }
details.card summary { cursor: pointer; font-weight: 500; color: var(--muted); }
.legal { max-width: 720px; margin: 0 auto; }
.legal h2 { margin: 28px 0 8px; font-size: 1.1rem; }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 6px; }

/* demo powiadomień: dwa telefony (ekran telefonu jest ciemny w obu wyglądach) */
.phones { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 24px; justify-content: center; }
.phone { position: relative; margin: 0; aspect-ratio: 9 / 17; padding: 46px 12px 40px; border-radius: 44px; border: 2px solid #3d3d3d; box-shadow: inset 0 0 0 6px #000; background: radial-gradient(120% 70% at 30% 0%, #3a3a3a 0%, #151515 55%, #050505 100%); color: #fff; overflow: hidden; text-align: center; }
.phone.android { border-radius: 34px; background: radial-gradient(120% 70% at 70% 0%, #2d3320 0%, #12140d 55%, #050505 100%); }
.phone .island { position: absolute; top: 16px; left: 50%; width: 84px; height: 24px; margin-left: -42px; border-radius: 999px; background: #000; }
.phone .punch { position: absolute; top: 18px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #000; }
.lock-clock { font-size: clamp(2.6rem, 9vw, 4rem); font-weight: 300; line-height: 1.05; letter-spacing: -0.03em; }
.phone.ios .lock-clock { font-weight: 600; }
.lock-date { font-size: 0.85rem; color: #e5e5e5; margin: 6px 0; }
.phone-notifs { margin-top: 22px; text-align: left; }
.phone figcaption { position: absolute; left: 0; right: 0; bottom: 14px; font-size: 0.78rem; font-weight: 500; color: #a3a3a3; }
.notif-ios, .notif-android { animation: drop 0.35s ease-out; }
.notif-ios { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 22px; background: rgba(245, 245, 245, 0.9); color: #000; font-size: 0.8rem; line-height: 1.3; }
.notif-ios img { flex: none; width: 38px; height: 38px; border-radius: 9px; }
.notif-ios b { font-size: 0.84rem; }
.notif-ios small { color: #6b6b6b; font-size: 0.72rem; }
.notif-ios p, .notif-android p { margin-top: 1px; }
.notif-android { padding: 12px 14px; border-radius: 26px; background: #262a22; color: #f1f1f1; font-size: 0.8rem; line-height: 1.3; }
.notif-android b { display: block; font-size: 0.86rem; }
.na-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; color: #c4c9b8; font-size: 0.72rem; }
.na-head img { width: 18px; height: 18px; border-radius: 50%; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) scale(0.97); } }

/* powiadomienia */
#toasts { position: fixed; left: 0; right: 0; bottom: 18px; z-index: 50; display: grid; gap: 8px; justify-items: center; pointer-events: none; padding: 0 16px; }
.toast { max-width: 480px; padding: 12px 18px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 500; box-shadow: var(--shadow-up); animation: pop 0.2s ease-out; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
@keyframes rise { from { transform: translateY(40px); opacity: 0.4; } }

@media (max-width: 860px) {
  .profile { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "head" "box" "reviews"; }
  .booking-box { position: static; max-height: none; overflow: visible; }
  .calc { grid-template-columns: 1fr; }
}

/* ---------- telefon: układ jak w aplikacji */
@media (max-width: 720px) {
  main.wrap { padding-top: 20px; padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 32px); }
  section + section { margin-top: 36px; }
  .top-in { height: 56px; }
  .hide-sm { display: none !important; }
  .foot { display: none; }
  #tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    height: calc(var(--tabbar) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  #tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; color: var(--muted); text-decoration: none; font-size: 0.7rem; font-weight: 500; }
  #tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  #tabbar svg { width: 23px; height: 23px; stroke-width: 1.7; }
  #tabbar a.on { color: var(--text); font-weight: 600; }
  #tabbar a.on svg { stroke-width: 2.2; }
  #toasts { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 12px); }
  .panel-tabs { display: none; }
  .panel-gap { margin-top: 20px; }
  /* przycisk rezerwacji zawsze pod kciukiem */
  .cta-bar { position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 10px); z-index: 5; margin: 16px -8px 0; padding: 8px; border-radius: 20px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .search { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .form .two { grid-template-columns: 1fr; }
  .day-row { grid-template-columns: 1fr 1fr; }
  .day-row label { grid-column: 1 / -1; }
  .svc-row { grid-template-columns: 1fr 1fr; }
  .svc-row .wide { grid-column: 1 / -1; }
  .avatar.lg { width: 68px; height: 68px; font-size: 1.4rem; }
  /* dwa telefony obok siebie byłyby za małe: przewijane w bok */
  .phones { display: flex; justify-content: flex-start; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 0 20px 8px; scrollbar-width: none; }
  .phones::-webkit-scrollbar { display: none; }
  .phone { flex: none; width: 264px; scroll-snap-align: center; }
  .lock-clock { font-size: 3.4rem; }
  .when { width: 78px; }
  /* okno szczegółów wysuwa się z dołu, nad paskiem aplikacji */
  .sheet { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 88dvh; transform: none; border-radius: 22px 22px 0 0; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); animation: rise 0.22s ease-out; }
  .cal-head { top: calc(env(safe-area-inset-top, 0px) + 56px); }
  .cal-bar { gap: 6px 8px; margin-bottom: 10px; }
  .cal-title { order: 3; width: 100%; }
  .cal-nav .icon-btn { width: 36px; }
  .seg button { min-height: 32px; padding: 4px 8px; font-size: 0.8rem; }
  .cal-head, .cal-body { grid-template-columns: 38px repeat(var(--cols), minmax(0, 1fr)); }
  .cal-dh b { width: 30px; height: 30px; font-size: 1rem; }
  .cal-count { display: none; }
  .ev { padding: 3px 4px; font-size: 0.72rem; border-left-width: 2px; }
  .cal-legend span:last-child { width: 100%; }
  /* wąskie tabele mają się mieścić bez przewijania w bok */
  th, td { padding: 12px 8px; }
  th:first-child, td:first-child { padding-left: 16px; white-space: normal; }
  th:last-child, td:last-child { padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
