/* ============================================================
   tennis-court — screen-specific layer on top of styles.css
   Reuses the same tokens (--accent lime, dark surfaces, radii).
   ============================================================ */

/* logo mark in header */
.brand { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.brand-logo {
  width: 38px; height: 38px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
}
.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-title { font-size: 18px; color: var(--text); line-height: 1.1; }
.brand-sub { font-size: 12px; color: var(--text-3); }

/* date selector (segmented, scrollable) */
.date-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.date-tabs::-webkit-scrollbar { display: none; }
.date-chip {
  flex: 0 0 auto; background: var(--card); border: 0; color: var(--text-2);
  border-radius: var(--radius-sm); padding: 10px 16px; cursor: pointer; font-family: inherit;
  font-size: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  box-shadow: 0 0 0 2px transparent; transition: background var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
}
.date-chip:hover:not(.active) { background: var(--card-2); }
.date-chip.active { background: var(--card); color: var(--text); box-shadow: 0 0 0 2px var(--text); }
.date-chip .dc-day { font-size: 15px; }
.date-chip .dc-date { font-size: 12px; color: var(--text-3); }
.date-chip.active .dc-date { color: var(--text-2); }

/* day-locked banner (запись на завтра ещё не открыта) */
.locked-note .banner-action { color: var(--accent); }

/* slot grid */
.slot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slot-card {
  position: relative; background: var(--card); border: 0; border-radius: var(--radius);
  padding: 14px 14px 13px; cursor: pointer; text-align: left; font-family: inherit; color: var(--text);
  display: flex; flex-direction: column; gap: 8px; box-shadow: 0 0 0 2px transparent;
  transition: background var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
}
.slot-time { font-size: 17px; font-feature-settings: "tnum"; display: flex; align-items: baseline; gap: 6px; }
.slot-time .dash { color: var(--text-3); font-size: 14px; }
.slot-state { font-size: 13px; display: flex; align-items: center; gap: 6px; color: var(--text-3); }
.slot-state .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* states */
.slot-card.free:hover { background: var(--card-2); }
.slot-card.free .slot-state { color: var(--accent-ink); background: var(--accent); align-self: flex-start; padding: 3px 9px; border-radius: var(--radius-pill); font-weight: 600; }
.slot-card.mine { box-shadow: none; background: var(--accent); color: var(--accent-ink); }
.slot-card.mine .slot-time, .slot-card.mine .slot-time .dash, .slot-card.mine .slot-state { color: var(--accent-ink); }
.slot-card.mine .slot-state { background: rgba(0,0,0,0.12); align-self: flex-start; padding: 3px 9px; border-radius: var(--radius-pill); font-weight: 600; }
.slot-card.taken { cursor: pointer; }
.slot-card.taken:hover { background: var(--card-2); }
.slot-card.taken .slot-state { color: var(--text-3); }
.slot-card.waiting { box-shadow: 0 0 0 2px var(--warn); }
.slot-card.waiting .slot-state { color: var(--warn); }
.slot-card.past { opacity: 0.4; cursor: not-allowed; }
.slot-card.locked { opacity: 0.5; cursor: not-allowed; }
.slot-card .wait-badge {
  position: absolute; top: 12px; right: 12px; font-size: 11px; color: var(--text-3);
  background: var(--input-bg); border-radius: var(--radius-pill); padding: 2px 8px; font-feature-settings: "tnum";
}

/* confirm sheet body */
.confirm-slot { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 6px 0 18px; }
.confirm-slot .cs-time { font-size: 34px; font-feature-settings: "tnum"; }
.confirm-slot .cs-date { font-size: 15px; color: var(--text-2); }

/* my-bookings list reuse .list-row; small status pill on the right via .pill */
.mb-empty-ico svg { width: 26px; height: 26px; }

/* deep-link highlight: pulse the targeted booking row */
@keyframes rowFlash {
  0% { box-shadow: 0 0 0 0 var(--accent); }
  25% { box-shadow: 0 0 0 2px var(--accent); }
  100% { box-shadow: 0 0 0 0 rgba(196, 242, 60, 0); }
}
.list-row.row-flash { animation: rowFlash 1.6s ease-out; border-radius: var(--radius); }

/* hide scrollbars on content */
.content { scrollbar-width: none; }
.content::-webkit-scrollbar { display: none; }

/* ============================================================
   Map view (Leaflet, dark)
   ============================================================ */
.map-page { position: relative; height: 100vh; padding: 0; overflow: hidden; }
.map-page #map { position: absolute; inset: 0; height: auto; z-index: 0; }
#map { width: 100%; height: 46vh; min-height: 260px; background: var(--map-bg); z-index: 0; }

/* draggable bottom sheet over the map (peek / half / full snap) */
.map-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; height: 88vh; z-index: 15;
  background: var(--glass-bg-sheet); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-top-left-radius: 22px; border-top-right-radius: 22px;
  box-shadow: var(--sh-up);
  display: flex; flex-direction: column; transform: translateY(60vh); will-change: transform;
}
.map-sheet-handle { padding: 11px 0 9px; display: flex; justify-content: center; cursor: grab; touch-action: none; flex-shrink: 0; }
.map-sheet-handle::before { content: ''; width: 42px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.26); }
:root[data-theme="light"] .map-sheet-handle::before { background: rgba(15, 20, 28, 0.22); }
.map-sheet-handle:active { cursor: grabbing; }
.map-sheet-scroll { flex: 1; overflow-y: auto; scrollbar-width: none; }
.map-sheet-scroll::-webkit-scrollbar { display: none; }
/* no CTA footer (court list view): keep the last row clear of the tab bar */
.map-sheet-scroll:has(+ .map-sheet-cta[hidden]) { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 104px); }
.map-sheet-head { display: flex; align-items: center; gap: 10px; padding: 4px 16px 12px; }
.map-sheet-head h2 { font-size: 22px; font-weight: 400; color: var(--text); min-width: 0; }
.map-sheet-head .ms-sub { margin-left: auto; font-size: 13px; color: var(--text-3); flex-shrink: 0; }
.map-sheet-head.detail { padding-top: 0; }
.map-sheet-head .back-btn { width: 36px; height: 36px; border-radius: var(--radius-xs); flex-shrink: 0; }
.court-row .row-chevron { color: var(--text-3); display: flex; align-items: center; }

/* fixed CTA footer inside the map sheet — always above the tab bar */
.map-sheet-cta {
  flex-shrink: 0;
  padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 104px);
  background: var(--glass-bg-sheet);
  border-top: 1px solid var(--hairline);
}
.map-sheet-cta[hidden] { display: none; }
.map-sheet-cta .btn { width: 100%; }

/* reliability bar (Мои) */
.rel-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--radius); font-size: 14px; line-height: 1.4; margin-bottom: 6px; }
.rel-bar svg { flex-shrink: 0; }
.rel-bar.good { background: var(--accent); color: var(--accent-ink); }
.rel-bar.ok { background: var(--accent-soft); color: var(--accent); }
.rel-bar.risk { background: var(--error-bg); color: var(--error); }
.rel-bar.new { background: var(--card-2); color: var(--text-2); align-items: flex-start; }

/* Tier-2 (document verification) CTA card in profile */
.kyc-cta { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 6px; border: 0; background: var(--accent); border-radius: var(--radius); color: var(--accent-ink); cursor: pointer; }
.kyc-cta:active { opacity: 0.9; }
.kyc-cta.risk { background: var(--error-bg); color: var(--error); }
.kyc-cta-ico { flex-shrink: 0; color: var(--accent-ink); display: flex; }
.kyc-cta.risk .kyc-cta-ico { color: var(--error); }
.kyc-cta-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kyc-cta-txt b { font-size: 14px; font-weight: 600; }
.kyc-cta-txt span { font-size: 13px; line-height: 1.35; color: var(--accent-ink); opacity: 0.78; }
.kyc-cta-go { margin-left: auto; flex-shrink: 0; color: var(--accent-ink); display: flex; }

/* check-in button (compact, in a list row) */
.btn-checkin {
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius-pill);
  font-family: inherit; font-size: 14px; font-weight: 500; padding: 9px 15px; cursor: pointer;
  white-space: nowrap; transition: background var(--t-fast), transform 0.1s;
}
.btn-checkin:hover { background: var(--accent-h); }
.btn-checkin:active { transform: scale(0.97); }
.pill.success svg { vertical-align: -3px; }
.leaflet-container { background: var(--map-bg); font-family: var(--font-sans); outline: none; }
.leaflet-control-attribution {
  background: var(--glass-bg) !important; color: var(--text-3) !important;
  font-size: 10px !important; padding: 1px 6px !important;
}
.leaflet-control-attribution a { color: var(--text-2) !important; }

/* court pins (divIcon) */
.court-pin {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center; position: relative;
  box-shadow: var(--sh-pin), 0 0 0 3px var(--bg);
  transition: transform var(--t-fast);
}
.court-pin::after {
  content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid var(--accent);
}
.court-pin svg { width: 20px; height: 20px; }
.court-pin.school { background: var(--warn); color: var(--accent-ink); }
.court-pin.school::after { border-top-color: var(--warn); }
.pin-free {
  position: absolute; top: -6px; right: -6px; background: var(--bg); color: var(--text);
  font-size: 11px; min-width: 18px; height: 18px; border-radius: var(--radius-xs); padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  font-feature-settings: "tnum"; box-shadow: 0 0 0 2px var(--accent);
}
.court-pin.school .pin-free { box-shadow: 0 0 0 2px var(--warn); }

/* court list rows */
.row-ico.school, .row-ico.yard { background: var(--accent); color: var(--accent-ink); }
.court-row .pill { font-size: 11px; padding: 2px 7px; vertical-align: middle; }

/* court sheet */
.court-sheet { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.court-meta { display: flex; gap: 8px; }
.court-addr { font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.court-addr svg { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; }

/* chevron inside brand sub */
.brand-sub svg { vertical-align: -3px; }
.court-switch { background: none; border: 0; cursor: pointer; padding: 0; text-align: left; }

/* ============================================================
   Registration / profile (Open Match Phase 0)
   ============================================================ */
.profile-card { background: var(--card); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 6px; }
.profile-card .pc-head { display: flex; align-items: center; gap: 12px; }
.pc-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-title b { font-size: 17px; color: var(--text); }
.pc-title span { font-size: 13px; color: var(--text-3); }
.pc-note { font-size: 14px; color: var(--text-2); line-height: 1.45; }
.pc-grid { display: flex; flex-direction: column; gap: 1px; background: var(--hairline); border-radius: var(--radius-sm); overflow: hidden; }
.pc-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; background: var(--card-2); font-size: 14px; }
.pc-row span { color: var(--text-3); }
.pc-row b { color: var(--text); font-weight: 400; font-family: var(--font-mono); font-feature-settings: "tnum"; text-align: right; }
.profile-card.guest .pc-head .row-ico { color: var(--accent); }

/* full game profile */
.pc-top { display: flex; align-items: center; gap: 14px; }
.pc-avatar { position: relative; width: 64px; height: 64px; border: 0; padding: 0; cursor: pointer; flex-shrink: 0; background: none; }
.pc-av-img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: block; }
.pc-av-ph { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-mute); font-size: 22px; }
.pc-cam { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px var(--card); }
.pc-id { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.pc-name { font-size: 19px; color: var(--text); }
.pc-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-badges .pill { font-size: 12px; display: inline-flex; align-items: center; gap: 3px; }
.pill-tap { font: inherit; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pill-tap:active { opacity: 0.85; }
.pill-info { display: inline-flex; align-items: center; justify-content: center; padding: 5px; margin: -5px 0 -5px 2px; border: 0; background: none; color: inherit; opacity: 0.6; -webkit-tap-highlight-color: transparent; }
.pill-info svg { width: 14px; height: 14px; }
.pc-info { display: flex; flex-direction: column; gap: 7px; }
.pc-line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.pc-line svg { color: var(--text-3); flex-shrink: 0; }
.pc-bio { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.profile-card .btn-row .btn-danger { color: var(--error); }
.pc-docs { border-top: 1px solid var(--hairline); padding-top: 12px; }
.pc-docs summary { font-size: 13px; color: var(--text-3); cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
.pc-docs summary::-webkit-details-marker { display: none; }
.pc-docs summary svg { transition: transform var(--t-fast); }
.pc-docs[open] summary svg { transform: rotate(180deg); }
.pc-docs .pc-grid { margin-top: 12px; }

/* editable profile fields: tappable rows, empty ones expose an "Add" CTA */
.pc-fields { display: flex; flex-direction: column; gap: 1px; background: var(--hairline); border-radius: var(--radius-sm); overflow: hidden; }
.pc-erow { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 14px; background: var(--card-2); border: 0; cursor: pointer; text-align: left; font: inherit; color: var(--text); }
.pc-erow:active { background: var(--input-bg); }
.pc-erow-l { color: var(--text-3); font-size: 14px; flex-shrink: 0; }
.pc-erow-v { color: var(--text); font-weight: 500; font-size: 14px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-erow-add { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 14px; font-weight: 600; }
.pc-erow-add svg { width: 15px; height: 15px; }
:root[data-theme="light"] .pc-erow-add { color: var(--text); }

/* docs divider header (replaces collapsible summary — always visible) */
.pc-divider { border-top: 1px solid var(--hairline); padding-top: 14px; font-size: 13px; color: var(--text-3); }
.pc-na { color: var(--text-3); font-family: inherit; font-weight: 400; }

/* reliability info button inline in the rel-bar */
.rel-bar .rel-info { margin-left: auto; flex-shrink: 0; width: 36px; height: 36px; margin-top: -4px; margin-bottom: -4px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: 0.7; cursor: pointer; padding: 0; }
.rel-bar .rel-info:active { opacity: 1; }

/* profile sub-tabs: media | bookings */
.prof-tabs { display: flex; gap: 8px; margin: 4px 0 12px; }
.prof-tab { position: relative; flex: 1; padding: 9px 12px; border: 0; border-radius: var(--radius-pill); background: var(--card); color: var(--text-3); font-size: 14px; font-weight: 600; cursor: pointer; }
.prof-tab.active { background: var(--text); color: var(--bg); }
.prof-tab-badge { display: inline-block; max-width: 50%; margin-left: 7px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* bottom logout */
.pc-logout-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; margin-bottom: 16px; color: var(--error); }
.pc-logout-btn svg { color: var(--error); }

/* info sheet body text */
.sheet-text { font-size: 15px; line-height: 1.55; color: var(--text-2); margin: 0 0 16px; }

/* registration form */
.reg-form { display: flex; flex-direction: column; gap: 13px; margin: 2px 0 8px; }
.reg-photo { width: 92px; height: 92px; border-radius: 50%; border: 2px dashed var(--input-bg-h); background: var(--card); cursor: pointer; padding: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.reg-photo:hover { border-color: var(--accent); }
.reg-photo-prev { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.reg-photo-prev.has { color: var(--text); }
.reg-photo-prev img { width: 100%; height: 100%; object-fit: cover; }
.reg-photo-hint { font-size: 13px; color: var(--text-2); }
.field[data-f="avatar"].has-error .reg-photo { border-color: var(--error); }
.reg-actions { position: sticky; bottom: -1px; padding: 16px 0 4px; margin-top: 2px; background: linear-gradient(to top, var(--glass-bg-sheet) 74%, transparent); }
.reg-actions .btn { width: 100%; }
.reg-form textarea.input { min-height: 64px; }
.reg-form .error-msg#e-consent { margin-top: -6px; }

/* Login gate (standalone website): email code · phone · Telegram widget */
.auth-screen { display: flex; align-items: center; justify-content: center; min-height: 100dvh; padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); }
.auth-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; }
.auth-ico { width: 52px; height: 52px; color: var(--accent); margin: 0 auto 2px; }
.auth-ico svg { width: 100%; height: 100%; }
.auth-h1 { font-size: 26px; font-weight: 700; text-align: center; margin: 0; }
.auth-p { text-align: center; color: var(--text-2); margin: 0 0 6px; font-size: 15px; }
.auth-card .error-msg { display: block; }
.auth-card .error-msg:empty { display: none; }
.auth-card .hint { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; margin: 6px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.auth-tg { display: flex; justify-content: center; min-height: 48px; }
.btn-tg { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: #54a9eb; color: #fff; border: 0; }
.btn-tg:hover { background: #4a9ad8; }
.btn-tg:disabled { opacity: .6; cursor: default; }
.btn-tg svg { stroke: #fff; }
/* Auth screen has no usable navigation — hide the tabbar so locked tabs don't show. */
#app:has(.auth-screen) ~ .tabbar { display: none; }
/* Signed-in-but-not-registered profile: identity card above the verify CTA. */
.prof-hello { display: flex; align-items: center; gap: 12px; padding: 4px 2px 10px; }
.prof-hello-ava { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.prof-hello-ava svg { width: 24px; height: 24px; }
.prof-hello-name { font-size: 18px; font-weight: 700; }
.prof-hello-sub { font-size: 13px; color: var(--text-2); }
.auth-foot { display: flex; justify-content: center; gap: 12px; margin-top: 6px; }
.linkbtn { background: none; border: 0; color: var(--accent); font-size: 14px; padding: 6px 2px; cursor: pointer; }
.linkbtn:disabled { color: var(--text-3); cursor: default; }
.linkbtn.resend-black { color: var(--text); }
.linkbtn.resend-black:disabled { color: var(--text-3); }
.auth-sentline { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 6px; }
.auth-sentline .auth-p { margin: 0; }
.auth-back { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; background: none; border: 0; color: var(--text-2); cursor: pointer; border-radius: 8px; }
.auth-back:hover { background: var(--input-bg-h); color: var(--text); }
.auth-back svg { display: block; }

/* Input focus mode: full-screen editor, user 1-on-1 with the field. */
.focus-edit { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: none; }
.focus-edit.open { display: block; }
.fe-wrap { position: fixed; left: 16px; right: 16px; top: 50%; z-index: 1; }
.fe-box { position: relative; }
.fe-hint {
  position: fixed; left: 16px; right: 16px; z-index: 0; top: 25%;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; pointer-events: none; opacity: 0.34;
}
.fe-hint-ico { color: var(--text-2); display: flex; }
.fe-hint-ico svg { width: 38px; height: 38px; }
.fe-hint-title { color: var(--text-2); font-size: 17px; font-weight: 500; }
.fe-input {
  width: 100%; box-sizing: border-box; background: var(--input-bg-h);
  border: 0; border-radius: var(--radius-sm); color: var(--text);
  font-family: inherit; font-size: 16px; line-height: 1.25;
  min-height: 54px; padding: 16px 150px 16px 16px; resize: none; outline: none;
  box-shadow: 0 0 0 2px var(--accent); max-height: 40vh; overflow-y: auto;
}
.fe-input::placeholder { color: var(--text-3); }
/* anchored to the top so they stay put when the field grows; equal 8px gaps for one line */
.fe-actions { position: absolute; right: 8px; top: 8px; display: flex; align-items: center; gap: 4px; }
.fe-clear {
  width: 38px; height: 38px; border: 0; border-radius: var(--radius-pill); background: transparent;
  color: var(--text-3); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.fe-clear:active { color: var(--text); }
.fe-send {
  height: 38px; border: 0; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-ink);
  font-family: inherit; font-size: 15px; font-weight: 600; padding: 0 16px; cursor: pointer; white-space: nowrap;
}
.fe-send:active { filter: brightness(0.92); }

/* ============================================================
   Players catalog · chat · media · reviews (Open Match Phase 1)
   ============================================================ */
/* 4-tab bar */
.tabbar-4 { padding: 9px 6px 20px; }
.tabbar-4 .tab { padding: 4px 6px; font-size: 10px; gap: 3px; }
.tab-ico { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; transition: background var(--t-fast); }
.tab-ico svg { color: var(--tab-ico-off); transition: color var(--t-fast); }
.tab.active .tab-ico { background: var(--accent); }
.tab.active .tab-ico svg { color: var(--accent-ink); }
.tab-badge { position: absolute; top: -3px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--error); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; font-feature-settings: "tnum"; }
.flt-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* player rows */
.pl-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.pl-av.ph { display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-mute); font-size: 16px; }
.pl-av.sm { width: 34px; height: 34px; font-size: 13px; }
.lvl-tag { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 19px; font-size: 12px; font-weight: 600; color: var(--accent-ink); background: var(--accent); border-radius: 6px; padding: 0 6px; font-feature-settings: "tnum"; margin-left: 4px; vertical-align: 1px; }
.player-row .row-end { align-items: flex-end; gap: 5px; }
/* reliability badge — always neutral grey, fixed width so 78% / 100% read the same */
.rel-pill { min-width: 48px; justify-content: center; background: var(--input-bg); color: var(--text-2); font-feature-settings: "tnum"; }

/* screen-level CTA pinned to the bottom (above the tab bar) */
.page-cta { position: fixed; left: 0; right: 0; bottom: var(--tabbar-h, 78px); max-width: var(--max-w); margin: 0 auto; padding: 14px 16px 16px; background: linear-gradient(to top, var(--bg) 62%, transparent); z-index: 18; }
.page-cta .btn { width: 100%; }
.has-cta .content { padding-bottom: 150px; }

/* header action group (right-aligned, tight) */
.hdr-actions { display: flex; gap: 2px; flex-shrink: 0; margin-left: auto; }
.hdr-actions .header-action { margin-left: 0; }

/* players grid (2-up cards) */
.players-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pcard { display: flex; flex-direction: column; background: var(--card); border: 0; border-radius: var(--radius); overflow: hidden; cursor: pointer; text-align: left; font-family: inherit; padding: 0; transition: background var(--t-fast); }
.pcard:hover { background: var(--card-2); }
.pcard-photo { position: relative; width: 100%; aspect-ratio: 1 / 1; background: var(--input-bg); }
.pcard-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-img.ph { display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-mute); font-size: 34px; }
/* on-photo badge: solid dark chip so it reads on any photo (reliability = neutral, price = lime) */
.pcard-rel { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; align-items: center; min-height: 22px; padding: 4px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; font-feature-settings: "tnum"; background: rgba(8, 11, 15, 0.66); color: #fff; backdrop-filter: blur(8px); gap: 1px; }
.pcard-rel.accent { background: var(--accent); color: var(--accent-ink); }
.pcard-rel-lbl { font-size: 8px; font-weight: 400; opacity: 0.75; letter-spacing: 0.02em; line-height: 1; }
.pcard-body { padding: 10px 12px 13px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pcard-name { font-size: 15px; color: var(--text); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pcard-meta { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-meta.dim { color: var(--text-3); }

/* media strip in player detail */
.media-strip { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 4px; padding: 2px 16px; scrollbar-width: none; }
.media-strip::-webkit-scrollbar { display: none; }
.media-cell { position: relative; width: 110px; height: 140px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--input-bg); cursor: pointer; }
.media-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-cell.video { display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.92); background: #11151b; }
.media-cell.video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.media-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; pointer-events: none; z-index: 1; }
.media-play svg { width: 34px; height: 34px; filter: drop-shadow(0 1px 5px rgba(0,0,0,0.55)); }
.media-full { width: 100%; max-height: 70vh; border-radius: var(--radius); object-fit: contain; background: #000; }

/* fullscreen story-style media viewer */
.media-viewer { position: fixed; inset: 0; z-index: 4000; background: #000; opacity: 0; transition: opacity var(--t-fast, .18s); touch-action: pan-y; }
.media-viewer.show { opacity: 1; }
.mv-viewport { position: absolute; inset: 0; overflow: hidden; }
.mv-track { display: flex; height: 100%; will-change: transform; }
.mv-slide { flex: 0 0 100%; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.mv-media { max-width: 100%; max-height: 100%; object-fit: contain; display: block; -webkit-user-select: none; user-select: none; }
.mv-top { position: absolute; left: 0; right: 0; top: calc(var(--tg-content-top, env(safe-area-inset-top, 0px)) + 10px); z-index: 3; display: flex; align-items: center; gap: 10px; padding: 0 14px; }
.mv-top-sp { width: 42px; flex: 0 0 42px; }
.mv-back { width: 42px; height: 42px; border: none; border-radius: 50%; background: rgba(28,32,38,0.62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform var(--t-fast, .18s); }
.mv-back:active { transform: scale(0.92); }
.mv-back svg { width: 22px; height: 22px; }
.mv-bottom { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; }
.mv-bl, .mv-br { display: flex; }
.mv-br { justify-content: flex-end; }
.mv-dots { flex: 1 1 0; display: flex; gap: 5px; justify-content: center; pointer-events: none; }
.mv-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.34); transition: background var(--t-fast, .18s), transform var(--t-fast, .18s); }
.mv-dot.on { background: #fff; transform: scale(1.25); }
.mv-pill { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border: none; border-radius: var(--radius-lg); background: rgba(28,32,38,0.62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #fff; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: transform var(--t-fast, .18s); }
.mv-pill:active { transform: scale(0.94); }
.mv-pill svg { width: 19px; height: 19px; }
.mv-pill.danger { color: #ff6b6b; }

/* reviews (base blocks defined once below: .reviews/.review/.rv-head) */
.rv-head b { font-weight: 400; }
.rv-stars { color: var(--accent); font-size: 13px; letter-spacing: 1px; }
.review p { font-size: 14px; color: var(--text-2); line-height: 1.45; }
.stars-pick { display: flex; gap: 8px; justify-content: center; padding: 6px 0 14px; }
.star-btn { background: none; border: 0; cursor: pointer; color: var(--input-bg-h); padding: 4px; }
.star-btn.on { color: var(--accent); }
.star-btn svg { width: 30px; height: 30px; }

/* media edit grid (profile) */
.media-edit { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.media-edit .media-cell { width: 100%; height: 0; padding-bottom: 100%; }
.media-edit .media-cell img { position: absolute; inset: 0; }
.media-edit .media-cell.video { position: relative; }
.media-del { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.55); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.media-add { aspect-ratio: 1; border: 1px dashed var(--input-bg-h); border-radius: var(--radius-sm); background: var(--card); color: var(--text-3); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.media-add:hover { background: var(--card-2); color: var(--text-2); }

/* chat thread */
.chat-thread { gap: 6px !important; padding-bottom: 84px; }
.msg { max-width: 78%; padding: 8px 13px 6px; border-radius: var(--radius-md); font-size: 15px; line-height: 1.35; word-wrap: break-word; display: flex; flex-direction: column; gap: 3px; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.msg.them { align-self: flex-start; background: var(--card-2); color: var(--text); border-bottom-left-radius: 5px; }
.msg-time { font-size: 10px; opacity: 0.6; align-self: flex-end; font-feature-settings: "tnum"; line-height: 1; }
.chat-ts { font-size: 11px; color: var(--text-3); white-space: nowrap; font-feature-settings: "tnum"; }
.chat-search-wrap { padding: 8px 0 4px; }
.chat-search-input { height: 38px; font-size: 14px; }
.chat-input { position: fixed; left: 0; right: 0; bottom: 0; max-width: var(--max-w); margin: 0 auto; display: flex; gap: 8px; align-items: center; padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 104px); background: var(--glass-bg-sheet); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); z-index: 18; }
.chat-input .input { flex: 1; height: 44px; }
.chat-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.chat-send:active { transform: scale(0.95); }

/* live court card */
.court-mini { width: 100%; height: 130px; border-radius: var(--radius-sm); overflow: hidden; background: var(--map-bg); cursor: pointer; z-index: 0; position: relative; }
.court-hint { font-size: 13px; color: var(--text-3); line-height: 1.45; margin-bottom: 10px; }
.players-here { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.players-here .stack { display: flex; flex-shrink: 0; }
.stack-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--card); margin-left: -8px; flex-shrink: 0; }
.stack-av:first-child { margin-left: 0; }
.stack-av.ph { display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-mute); font-size: 12px; }
.ph-txt { font-size: 13px; color: var(--text-2); }
.map-sheet-cta .btn-row { display: flex; gap: 10px; }
.map-sheet-cta .btn-row .btn { flex: 1; }
.map-sheet-cta .btn-row .btn-secondary { width: auto; }
.cta-slot { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 10px; color: var(--text-3); font-size: 13px; }
.cta-slot svg { width: 14px; height: 14px; flex-shrink: 0; }
.pill .bulb, .pill svg { vertical-align: -2px; }

/* ============================================================
   Catalog role segment (Игроки / Тренеры) + coach sheet
   ============================================================ */
.role-seg { display: flex; gap: 4px; background: var(--card); border-radius: var(--radius-pill); padding: 4px; margin: 0 0 14px; }
.role-tab { flex: 1; border: 0; background: none; color: var(--text-3); font-family: inherit; font-size: 14px; font-weight: 600; padding: 9px 12px; border-radius: var(--radius-pill); cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.role-tab.active { background: var(--accent); color: var(--accent-ink); }

.coach-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.coach-photo { width: 84px; height: 84px; border-radius: var(--radius-lg); object-fit: cover; flex-shrink: 0; }
.coach-photo.ph { display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-mute); font-size: 30px; }
.coach-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.coach-tags .pill { font-size: 13px; }
.coach-tags .pill.big { font-size: 16px; font-weight: 600; padding: 5px 12px; }
.coach-tags .pill .dim { opacity: 0.6; font-weight: 400; font-size: 13px; }
.coach-tags .pill svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
.coach-bio { font-size: 14px; color: var(--text-2); line-height: 1.5; margin: 0 0 14px; }

.coach-courts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.court-chip { display: inline-flex; align-items: center; gap: 5px; border: 0; background: var(--card); color: var(--text-2); font-family: inherit; font-size: 13px; font-weight: 500; padding: 8px 12px; border-radius: var(--radius-pill); cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.court-chip svg { width: 14px; height: 14px; color: var(--text-3); }
.court-chip.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.court-chip.active svg { color: var(--accent); }
.coach-court-one { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.coach-court-one svg { width: 16px; height: 16px; color: var(--text-3); }

.coach-days { display: flex; flex-direction: column; gap: 14px; }
.coach-day-label { font-size: 13px; color: var(--text-3); margin-bottom: 8px; text-transform: capitalize; }
.coach-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.coach-slot { border: 0; background: var(--card); color: var(--text); font-size: 15px; font-feature-settings: "tnum"; padding: 11px 0; border-radius: var(--radius-sm); cursor: pointer; transition: background var(--t-fast), transform 0.1s; }
.coach-slot:hover { background: var(--accent-soft); color: var(--accent); }
.coach-slot:active { transform: scale(0.95); }
.confirm-slot .cs-price { font-size: 14px; color: var(--accent); display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.confirm-slot .cs-price svg { width: 14px; height: 14px; }

/* ============================================================
   Court card extras: coaches / amenities / rating / reviews / leaderboard / gallery
   ============================================================ */
.court-sec { margin-top: 20px; }
.court-sec .section-label { margin-bottom: 10px; }
.section-label .sec-count { color: var(--text-3); font-weight: 400; }
.list.compact .list-row { padding: 10px 12px; }
.coach-mini .row-meta { display: inline-flex; align-items: center; gap: 2px; }
.coach-mini .row-meta svg { width: 12px; height: 12px; }

.amenities { display: flex; flex-wrap: wrap; gap: 8px; }
.amenity { display: inline-flex; align-items: center; gap: 6px; background: var(--card); color: var(--text-2); font-size: 13px; padding: 7px 12px; border-radius: var(--radius-pill); }
.amenity svg { width: 14px; height: 14px; color: var(--accent); }

.stars { display: inline-flex; gap: 1px; }
.stars .star svg { width: 15px; height: 15px; color: var(--text-3); }
.stars .star.on svg { color: var(--accent); }
.rating-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rating-num { font-size: 22px; font-weight: 600; font-feature-settings: "tnum"; }
.rating-cnt { font-size: 13px; color: var(--text-3); }
.reviews { display: flex; flex-direction: column; gap: 12px; }
.review { background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px; }
.rv-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rv-name { font-size: 14px; font-weight: 500; flex: 1; }
.rv-head .stars .star svg { width: 13px; height: 13px; }
.rv-text { font-size: 14px; color: var(--text-2); line-height: 1.45; }

.mayor { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, var(--accent-soft), var(--card)); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; position: relative; }
.mayor-crown { position: absolute; left: 44px; top: 8px; }
.mayor-crown svg { width: 18px; height: 18px; color: var(--accent); filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.mayor .pl-av { width: 52px; height: 52px; }
.mayor-info { flex: 1; min-width: 0; }
.mayor-label { font-size: 12px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.mayor-name { font-size: 16px; color: var(--text); margin-top: 2px; }
.mayor-plays { font-size: 24px; font-weight: 700; color: var(--accent); font-feature-settings: "tnum"; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.mayor-plays span { font-size: 11px; font-weight: 400; color: var(--text-3); text-transform: none; }
.lb { display: flex; flex-direction: column; gap: 2px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; }
.lb-rank { width: 20px; text-align: center; font-size: 14px; color: var(--text-3); font-feature-settings: "tnum"; flex-shrink: 0; }
.lb-name { flex: 1; font-size: 14px; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-plays { font-size: 13px; color: var(--text-3); font-feature-settings: "tnum"; }

.court-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gal-cell { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--input-bg); }
.gal-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-add { aspect-ratio: 1; border: 1px dashed var(--hairline); background: var(--card); color: var(--text-3); border-radius: var(--radius-sm); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-family: inherit; font-size: 12px; transition: background var(--t-fast), color var(--t-fast); }
.gal-add:hover { background: var(--card-2); color: var(--accent); }
.gal-add svg { width: 20px; height: 20px; }

.rate-pick { display: flex; justify-content: center; gap: 8px; padding: 6px 0 16px; }
.rate-star { border: 0; background: none; cursor: pointer; padding: 4px; }
.rate-star svg { width: 34px; height: 34px; color: var(--text-3); transition: color var(--t-fast), transform 0.1s; }
.rate-star.on svg { color: var(--accent); }
.rate-star:active svg { transform: scale(1.2); }
.btn-secondary.sm { width: auto; padding: 9px 16px; font-size: 14px; }

/* ============================================================
   Stretched empty-state screens (Чаты пусто, Профиль гость)
   card fills to 16px above the in-flow CTA, content vertically centered
   ============================================================ */
.empty-screen { gap: 16px; padding-bottom: 4px; }
.empty-screen .empty.fill { flex: 1 1 auto; justify-content: center; margin: 0; }
.empty-screen .card-fill { flex: 1 1 auto; display: flex; flex-direction: column; }
.empty-screen .card-fill > .profile-card { flex: 1 1 auto; justify-content: center; margin: 0; }
.empty-screen .empty-cta { flex: 0 0 auto; width: 100%; margin: 0; }

/* ============================================================
   Avatar cropper (circular, drag + pinch/wheel zoom)
   ============================================================ */
.crop-overlay { position: fixed; inset: 0; background: var(--bg); z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; opacity: 0; transition: opacity var(--t-fast); overscroll-behavior: contain; }
.crop-overlay.open { opacity: 1; }
.crop-title { font-size: 17px; color: var(--text); }
.crop-hint { font-size: 12px; color: var(--text-3); text-align: center; }
.crop-box { position: relative; overflow: hidden; border-radius: var(--radius-sm); user-select: none; -webkit-user-select: none; background: #000; cursor: grab; }
.crop-box:active { cursor: grabbing; }
.crop-img { position: absolute; top: 0; left: 0; will-change: transform; pointer-events: none; -webkit-user-drag: none; max-width: none; }
.crop-mask { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 9999px rgba(6, 8, 10, 0.72); pointer-events: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--accent); pointer-events: none; }
.crop-actions { display: flex; gap: 12px; width: 100%; max-width: 360px; }
.crop-actions .btn, .crop-actions .btn-secondary { flex: 1; width: auto; }

/* ============================================================
   Icon size normalization — icons have varied intrinsic w/h (12–34px).
   Force a consistent glyph size inside each container so nothing looks
   mismatched across the app.
   ============================================================ */
.brand-logo svg { width: 20px; height: 20px; }
.row-ico svg { width: 20px; height: 20px; }
.empty-ico svg { width: 26px; height: 26px; }
.pill svg { width: 14px; height: 14px; }
.pc-line svg { width: 16px; height: 16px; }
.pc-cam svg { width: 13px; height: 13px; }
.banner-ico svg { width: 18px; height: 18px; }
.header-action svg { width: 21px; height: 21px; }
.section-label svg { width: 15px; height: 15px; vertical-align: -2px; }
.court-hint svg, .court-addr svg { width: 16px; height: 16px; }

/* ---------- settings sheet ---------- */
.set-group { margin: 0 0 22px; }
.set-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.set-label svg { width: 16px; height: 16px; }
.seg { display: flex; gap: 6px; background: var(--input-bg); border-radius: var(--radius); padding: 5px; }
.seg-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 11px 6px; border: 0; background: none; color: var(--text-2); font-family: inherit; font-size: 13px; border-radius: var(--radius-sm); cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.seg-btn .seg-ico { display: flex; }
.seg-btn .seg-ico svg { width: 19px; height: 19px; }
.seg-btn.active { background: var(--accent); color: var(--accent-ink); }
.seg-btn:not(.active):hover { background: var(--input-bg-h); color: var(--text); }
.set-foot { font-size: 12px; text-align: center; padding: 6px 0 4px; }

/* Sign-in methods (account linking) */
.field-hint { font-size: 12px; color: var(--text-3); margin: -4px 0 10px; }
.lm-list { display: flex; flex-direction: column; gap: 8px; }
.lm-row { display: flex; align-items: center; gap: 12px; background: var(--input-bg); border-radius: var(--radius); padding: 12px 14px; }
.lm-ico { display: flex; color: var(--text-2); flex: 0 0 auto; }
.lm-ico svg { width: 20px; height: 20px; }
.lm-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lm-name { font-size: 14px; color: var(--text); }
.lm-val { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-val.on { color: var(--text-2); }
.lm-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent); flex: 0 0 auto; }
.lm-badge svg { width: 15px; height: 15px; }
.lm-badge.on { color: var(--accent); }
:root[data-theme="light"] .lm-badge.on { color: var(--accent-ink); }
.lm-attach { flex: 0 0 auto; border: 0; background: var(--accent); color: var(--accent-ink); font-family: inherit; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer; transition: filter var(--t-fast); }
.lm-attach:hover { filter: brightness(1.08); }
.lm-sheet { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 8px; }

/* Light theme: kill lime-on-pale-lime washout — dark ink on any lime/soft-lime fill */
:root[data-theme="light"] .banner.accent .banner-ico,
:root[data-theme="light"] .rel-bar.ok,
:root[data-theme="light"] .court-chip.active,
:root[data-theme="light"] .court-chip.active svg,
:root[data-theme="light"] .coach-slot:hover,
:root[data-theme="light"] .slot-card.mine .slot-state,
:root[data-theme="light"] .profile-card.guest .pc-head .row-ico {
  color: var(--accent-ink);
}

/* ----- court snippet cards (map list, airbnb-style) ----- */
.snip-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 104px); }
.court-snip {
  display: flex; align-items: stretch; gap: 12px;
  width: 100%; padding: 10px; border: 0; border-radius: var(--radius-md);
  background: var(--card); color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.court-snip:hover { background: var(--card-2); }
.court-snip:active { transform: scale(0.985); }
.cs-media { position: relative; flex: 0 0 auto; width: 108px; height: 92px; border-radius: var(--radius-sm); overflow: hidden; }
.cs-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cs-img.ph { display: flex; align-items: center; justify-content: center; color: var(--accent); }
.cs-img.ph svg { width: 34px; height: 34px; }
.cs-img.ph.yard { background: linear-gradient(135deg, rgba(196, 242, 60, 0.18), var(--card-2)); }
.cs-img.ph.school { background: linear-gradient(135deg, rgba(255, 176, 32, 0.18), var(--card-2)); }
.cs-free {
  position: absolute; left: 6px; bottom: 6px;
  padding: 2px 7px; border-radius: var(--radius-pill);
  background: rgba(10, 12, 16, 0.72); color: var(--accent);
  font-size: 11px; font-weight: 700; backdrop-filter: blur(4px);
}
.cs-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.cs-title { font-size: 15px; font-weight: 700; line-height: 1.25; display: flex; align-items: center; gap: 6px; }
.cs-kyc { display: inline-flex; color: var(--warn); }
.cs-kyc svg { width: 13px; height: 13px; }
.cs-sub { font-size: 12px; color: var(--text-2); }
.cs-addr { font-size: 12px; color: var(--text-3, var(--text-2)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-rate { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--text); }
.cs-rate svg { width: 13px; height: 13px; color: var(--accent); }
.cs-rate-n { font-weight: 500; color: var(--text-2); }
/* hovered snippet highlights its map pin */
.leaflet-marker-icon.hot { z-index: 1000 !important; }
.leaflet-marker-icon.hot .court-pin { transform: scale(1.18); box-shadow: 0 6px 18px rgba(196, 242, 60, 0.45); }
.court-pin { transition: transform 0.15s ease, box-shadow 0.15s ease; }

/* ============================================================
   RESPONSIVE (desktop) — map split + fixed-bar offsets.
   Lives here (last stylesheet) so it wins over the base
   .map-sheet / .page-cta / .chat-input rules above.
   Pairs with the @media block in styles.css (sidebar nav).
   ============================================================ */
@media (min-width: 1024px) {
  /* map sits under the fixed top navbar; snippet panel docks LEFT, map fills the rest (airbnb split) */
  .map-page { max-width: none; width: 100%; height: calc(100vh - 84px); }
  .map-page #map { left: 460px; height: 100%; }
  .map-sheet {
    transform: none !important;
    left: 0; right: auto; top: 0; bottom: 0;
    width: 460px; height: 100%;
    border-radius: 0;
    border-right: 1px solid var(--hairline);
    box-shadow: none;
  }
  .map-sheet-handle { display: none; }
  .map-sheet-scroll { padding-top: 18px; }
  /* no tab bar on desktop — fixed-bar offsets shrink to plain margins */
  .map-sheet-scroll:has(+ .map-sheet-cta[hidden]) { padding-bottom: 24px; }
  .map-sheet-cta { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); }
  .chat-input { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); }

  /* larger snippets on desktop */
  .court-snip { padding: 12px; gap: 14px; }
  .cs-media { width: 148px; height: 108px; }
}

/* keyboard a11y: visible focus ring for buttons (desktop/web users tabbing through) */
button:focus-visible, .btn:focus-visible, .tab:focus-visible, .pill:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* floating topnav pill must not cover section headings on anchor-scroll */
.ln-sec, [id^="ln-"] { scroll-margin-top: 84px; }
