/* ==============================================================================
   HALOVE v4.0 — OFFICIAL BRAND GUIDELINES & MOBILE-NATIVE DESIGN SYSTEM
   Brand Palette: Halove Navy #0F172A · Halove Orange #FA681D · Bright Orange #FF7833 · White #FFFFFF
   Typography: Outfit (500, 600) + IBM Plex Sans (400, 500, 600) + IBM Plex Mono
   All interactive contrast pairs verified >= WCAG AA (4.5:1+), ZERO violet.
   ============================================================================== */

:root {
  --nav-bg: #0F172A;
  --nav-border: rgba(255, 255, 255, 0.10);
  --nav-ink: #FFFFFF;
  --nav-muted: #CBD5E1;
  --nav-pill-bg: rgba(255, 255, 255, 0.10);
  --nav-hover-bg: rgba(255, 255, 255, 0.17);
  --nav-chip-border: rgba(255, 255, 255, 0.22);
  --nav-cta-bg: #FF7833;          /* 6.79:1 with #0F172A */
  --nav-cta-ink: #0F172A;
  --nav-active-line: #FF7833;
  --tabbar-bg: rgba(255, 255, 255, 0.95);
  --tabbar-active: #0F172A;
  --tabbar-muted: #64748B;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
}

[data-theme="dark"] {
  --nav-bg: #0B1120;
  --nav-border: rgba(255, 255, 255, 0.08);
  --nav-ink: #FFFFFF;
  --nav-muted: #94A3B8;
  --nav-pill-bg: rgba(255, 255, 255, 0.09);
  --nav-hover-bg: rgba(255, 255, 255, 0.15);
  --nav-chip-border: rgba(255, 255, 255, 0.18);
  --nav-cta-bg: #FF7833;
  --nav-cta-ink: #0F172A;
  --nav-active-line: #FF7833;
  --tabbar-bg: rgba(11, 17, 32, 0.95);
  --tabbar-active: #FF7833;
  --tabbar-muted: #94A3B8;
}

/* ==============================================================================
   1. MOBILE-NATIVE BASELINE & ACCESSIBILITY
   ============================================================================== */
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
  overflow-x: clip !important;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: clip !important;
}

.main-wrapper {
  overflow-x: clip !important;
  min-height: calc(100dvh - 68px);
  display: flex;
  flex-direction: column;
}
.main-wrapper > .section-view.active {
  flex: 1 0 auto;
}
#section-map,
.explorer-container {
  overflow-x: clip !important;
}

/* Override legacy fixed height: calc(100vh - 65px) on #map-section so footer never cuts across overflowing cards/map */
#map-section.explorer-container.layout-split,
#map-section.explorer-container.layout-list {
  height: auto !important;
  min-height: calc(100dvh - 130px) !important;
  overflow: visible !important;
  overflow-x: clip !important;
}

/* Natural document scroll in Split View: scroll anywhere on page while map follows smoothly (sticky) */
.explorer-container.layout-split .explorer-main {
  align-items: flex-start !important;
  padding-bottom: 44px !important;
  position: relative;
  z-index: 1;
}
.explorer-container.layout-split .explorer-feed {
  max-height: none !important;
  overflow-y: visible !important;
  padding-right: 0 !important;
}
.explorer-container.layout-split .explorer-map-pane {
  position: sticky !important;
  top: 162px !important;
  height: calc(100dvh - 190px) !important;
  max-height: 760px;
  align-self: flex-start !important;
  isolation: isolate;
  z-index: 1 !important;
}

/* Full-screen Map View ("Pełna mapa"): exact remaining viewport height, zero bottom clipping */
body.is-full-map-mode .halove-brand-footer {
  display: none !important;
}
#map-section.explorer-container.layout-map {
  display: flex !important;
  flex-direction: column !important;
  height: calc(100dvh - 68px) !important;
  min-height: 460px !important;
  max-height: calc(100dvh - 68px) !important;
  overflow: hidden !important;
}
.explorer-container.layout-map .explorer-toolbar {
  position: relative !important;
  top: 0 !important;
  flex-shrink: 0 !important;
}
.explorer-container.layout-map .explorer-main {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: auto !important;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  display: flex !important;
  align-items: stretch !important;
}
.explorer-container.layout-map .explorer-map-pane {
  position: relative !important;
  top: 0 !important;
  flex: 1 1 100% !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  border-radius: 0 !important;
  border: 0 !important;
  isolation: isolate;
  z-index: 1 !important;
}
.explorer-container.layout-map #halove-map {
  width: 100% !important;
  height: 100% !important;
}
.explorer-container.layout-map .map-bottom-tray {
  display: flex !important;
  position: absolute !important;
  bottom: 16px !important;
  left: 16px !important;
  right: 16px !important;
  z-index: 500 !important;
}
.explorer-container.layout-map .games-carousel {
  padding-bottom: 2px !important;
}

@media (max-width: 1024px) {
  .explorer-container.layout-split .explorer-map-pane {
    position: relative !important;
    top: 0 !important;
    height: 360px !important;
    max-height: none;
  }
}

button, a, [role="button"], .nav-tab, .sport-tab-btn, .layout-btn, .filter-dropdown-btn {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

@media (pointer: coarse), (max-width: 768px) {
  input, select, textarea, .form-input, .form-select, .form-textarea {
    font-size: 16px !important;
  }
}

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

h1, h2, h3, .section-title, .feed-heading, .game-card-title, .notifications-panel-title {
  font-family: var(--font-display);
  font-weight: 600 !important;
  letter-spacing: -0.02em;
}

.h-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -3px;
}
.h-icon--sm {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
}

/* ==============================================================================
   2. BUTTONS & BADGES (WCAG AA/AAA — #0F172A ON #FA681D / #FF7833)
   ============================================================================== */
.btn {
  font-family: var(--font-family);
  font-weight: 600;
  border-radius: 10px;
  transition: background 140ms var(--ease-out), border-color 140ms var(--ease-out), transform 100ms var(--ease-out);
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--brand-orange) !important;
  color: #0F172A !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--brand-orange-hover) !important;
    color: #0F172A !important;
    transform: translateY(-1px);
  }
}
.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-hover);
  font-weight: 500;
}
@media (hover: hover) and (pointer: fine) {
  .btn-secondary:hover {
    background: var(--bg-card-subtle);
    border-color: var(--text-main);
  }
}

.badge {
  font-family: var(--font-family);
  font-weight: 500;
  border-radius: 6px;
  letter-spacing: 0;
}
.badge-volleyball,
.badge-basketball,
.badge-padel,
.badge-tennis,
.badge-badminton,
.badge-futsal {
  background: var(--bg-card-subtle) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-roster-open {
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-size: 11.5px;
  padding: 2px 8px;
}
.badge-roster-pos {
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid rgba(250, 104, 29, 0.25);
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
}

/* ==============================================================================
   3. OFFICIAL BRAND NAVY TOPBAR (DESKTOP 68PX, OFFICIAL VECTOR SVG LOGO)
   ============================================================================== */
header.navbar {
  background: var(--nav-bg) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid var(--nav-border) !important;
  color: var(--nav-ink) !important;
  height: 68px;
  min-height: 68px;
  padding: 0 24px !important;
  gap: 18px;
  box-shadow: none !important;
}

.navbar .brand-container {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  margin-left: -10px;
  border-radius: 10px;
  background: transparent;
  gap: 0;
  flex-shrink: 0;
}
.navbar .brand-logo-svg {
  height: 36px;       /* viewBox 820x256 -> ~115px wide (>= 104px Brand Guideline minimum) */
  width: auto;
  min-width: 104px;
  display: block;
}

.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.navbar .nav-tab {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  background: transparent !important;
  color: var(--nav-muted) !important;
  font-size: 14.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: relative;
  border: 0 !important;
}
.navbar .nav-tab:hover {
  color: var(--nav-ink) !important;
  background: var(--nav-pill-bg) !important;
}
.navbar .nav-tab.active {
  color: var(--nav-ink) !important;
  background: var(--nav-pill-bg) !important;
  font-weight: 600;
}
.navbar .nav-tab.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--nav-active-line);
}

.navbar .nav-invite-badge,
.navbar .nav-mygames-badge {
  position: static;
  margin-left: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--nav-cta-bg) !important;
  color: var(--nav-cta-ink) !important;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.navbar .nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.navbar .theme-toggle-btn,
.navbar .nav-bell-btn {
  width: 38px;
  height: 38px;
  border-radius: 50% !important;
  border: 1px solid var(--nav-chip-border) !important;
  background: var(--nav-pill-bg) !important;
  color: var(--nav-ink) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: background 140ms var(--ease-out), transform 100ms var(--ease-out);
}
.navbar .theme-toggle-btn:hover,
.navbar .nav-bell-btn:hover {
  background: var(--nav-hover-bg) !important;
}
.navbar .nav-bell-btn[aria-expanded="true"] {
  background: var(--nav-cta-bg) !important;
  color: var(--nav-cta-ink) !important;
  border-color: transparent !important;
}
.navbar .nav-notifications-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #DC2626 !important;
  color: #FFFFFF !important;
  border: 2px solid var(--nav-bg) !important;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.navbar #btn-open-login,
.navbar #btn-open-add-venue {
  background: var(--nav-pill-bg) !important;
  color: var(--nav-ink) !important;
  border: 1px solid var(--nav-chip-border) !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
}
.navbar #btn-open-login:hover,
.navbar #btn-open-add-venue:hover {
  background: var(--nav-hover-bg) !important;
}

.navbar #btn-nav-play,
.navbar #btn-open-register {
  background: var(--nav-cta-bg) !important;
  color: var(--nav-cta-ink) !important;
  border: 1px solid transparent !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
}

/* Concentric user pill: 38px outer height - 2px border = 36px inner; 3px uniform padding + 30px avatar => r=15+3=18 */
.navbar .nav-user-pill {
  background: var(--nav-pill-bg) !important;
  border: 1px solid var(--nav-chip-border) !important;
  color: var(--nav-ink) !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 3px 12px 3px 3px !important;
  gap: 8px !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  box-shadow: none !important;
}
.navbar .nav-user-pill:hover {
  background: var(--nav-hover-bg) !important;
  border-color: rgba(255, 255, 255, 0.34) !important;
  box-shadow: none !important;
}
.navbar .nav-user-pill .avatar-sm {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 1.5px solid var(--brand-bright-orange) !important;
  box-sizing: border-box !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}
.navbar .nav-user-name {
  color: var(--nav-ink) !important;
  font-size: 13px !important;
  line-height: 1 !important;
}
.navbar .dropdown-chevron {
  color: var(--nav-ink) !important;
  line-height: 1 !important;
}

/* Hide stacked legacy urgent ticker bar & heavy hero bento (replaced by compact #next-match-strip) */
#matchday-ticker-bar {
  display: none !important;
}
#featured-match-bento {
  display: none !important;
}

/* ==============================================================================
   4. COMPACT NEXT-MATCH STRIP & CLEAN EXPLORER TOOLBAR (MECZE)
   ============================================================================== */
.next-match-strip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 3.5px solid var(--brand-orange);
  border-radius: 12px;
  padding: 11px 15px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.next-match-strip__info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.next-match-strip__tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
}
.next-match-strip__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==============================================================================
   4. TWO-TIER STRUCTURED EXPLORER TOOLBAR (OPTION 1 — AIRBNB / LINEAR SYSTEM)
   ============================================================================== */
.explorer-toolbar {
  background: var(--bg-surface) !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  position: sticky !important;
  top: 68px !important;
  z-index: 420 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

/* Tier 1: Primary Category Ribbon & Locked View Switcher (Always 1 single row) */
.explorer-toolbar__primary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 8px 18px !important;
  border-bottom: 1px solid var(--border-color) !important;
  min-height: 48px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

/* Sport categories horizontal ribbon */
.sport-switch-group {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
  background: transparent !important;
  border: 0 !important;
  padding: 2px 0 !important;
  border-radius: 0 !important;
}
.sport-switch-group::-webkit-scrollbar {
  display: none !important;
}

.sport-tab-btn {
  height: 32px !important;
  padding: 0 11px !important;
  border-radius: 999px !important;
  border: 1px solid var(--border-hover) !important;
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
.sport-tab-btn:hover {
  background: var(--bg-card-subtle) !important;
  border-color: var(--text-main) !important;
}
.sport-tab-btn.active {
  background: var(--text-main) !important;
  color: var(--bg-primary) !important;
  border-color: var(--text-main) !important;
  font-weight: 600 !important;
}
.sport-tab-btn--accent.active {
  background: var(--brand-orange) !important;
  color: #0F172A !important;
  border-color: var(--brand-orange) !important;
}

/* Locked View Mode Segment (Always Right-Aligned, Never Wraps) */
.layout-switch-bar {
  margin-left: auto !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
}
.layout-switch-label {
  display: none !important;
}
.layout-switch-group {
  background: var(--bg-card-subtle) !important;
  padding: 3px !important;
  border-radius: 10px !important;
  border: 1px solid var(--border-color) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
}
.layout-btn {
  height: 28px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--text-muted) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}
.layout-btn:hover {
  color: var(--text-main) !important;
}
.layout-btn.active {
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.10) !important;
}

/* Tier 2: Secondary Bar (Location, Date, Radius + Quick Chips + Counter) */
.explorer-toolbar__secondary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 6px 18px !important;
  background: var(--bg-card-subtle) !important;
  min-height: 40px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}
.explorer-toolbar__filters {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  min-width: 0 !important;
  overflow: visible !important;
}

/* Dropdown buttons in Tier 2 */
.filter-dropdown-container {
  position: relative !important;
  flex-shrink: 0 !important;
}
.filter-dropdown-btn {
  height: 28px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  border: 1px solid var(--border-color) !important;
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: background 0.15s ease, border-color 0.15s ease !important;
}
.filter-dropdown-btn:hover {
  border-color: var(--border-hover) !important;
  background: var(--bg-card) !important;
}
.filter-dropdown-btn strong {
  font-weight: 600 !important;
}
.filter-dropdown-btn svg {
  color: var(--text-muted) !important;
}
.dropdown-chevron {
  font-size: 9px !important;
  color: var(--text-muted) !important;
  margin-left: 2px !important;
}

/* Vertical separator */
.toolbar-sep {
  width: 1px !important;
  height: 18px !important;
  background: var(--border-color) !important;
  flex-shrink: 0 !important;
  margin: 0 4px !important;
}

/* Quick chips in Tier 2 */
.explorer-toolbar__secondary .sport-tab-btn {
  height: 28px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* Right side context counter */
.explorer-toolbar__meta {
  flex-shrink: 0 !important;
  margin-left: auto !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.explorer-toolbar__count {
  display: inline-block !important;
  letter-spacing: -0.1px !important;
}

/* ==============================================================================
   5. CLEAN ATHLETIC MATCH CARDS (HONEST, HIGH-CONTRAST, NO RAINBOW GRADIENTS)
   ============================================================================== */
.game-card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  padding: 16px 18px !important;
  transition: transform 150ms var(--ease-out), border-color 140ms var(--ease-out), box-shadow 150ms var(--ease-out) !important;
}
.game-card::before,
.game-card::after {
  display: none !important;
}
@media (hover: hover) and (pointer: fine) {
  .game-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover) !important;
    box-shadow: var(--shadow-hover) !important;
  }
}
.game-card-date-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.game-card-title {
  font-size: 17px !important;
  line-height: 1.28 !important;
  color: var(--text-main) !important;
}
.game-card-footer {
  border-top: 1px solid var(--border-color) !important;
  padding-top: 12px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.game-card-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ==============================================================================
   6. DEDICATED "MOJE GRY" TAB (#section-my-games)
   ============================================================================== */
.my-games-page {
  width: min(100% - 32px, 1200px);
  margin: 0 auto;
  padding: 24px 0 40px;
}
.my-games-page.is-guest {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
}
.my-games-page.is-guest .my-games-head {
  justify-content: center;
  text-align: center;
  max-width: 580px;
}
.my-games-page.is-guest .my-games-head p {
  margin-left: auto;
  margin-right: auto;
}
.my-games-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.my-games-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: 20px;
  align-items: start;
  width: 100%;
}
.my-games-grid-layout.is-single-column {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}
.my-games-grid-layout.is-single-column #my-games-page-sidebar {
  display: none !important;
}
.my-games-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.my-game-card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 16px !important;
  padding: 16px 18px !important;
}
.my-game-card.is-organizer {
  border-left: 3.5px solid var(--brand-orange) !important;
}
.my-blik-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}
@media (max-width: 980px) {
  .my-games-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* ==============================================================================
   7. FACEBOOK-STYLE NOTIFICATIONS POPOVER (DESKTOP) & BOTTOM SHEET (MOBILE)
   ============================================================================== */
.notifications-panel {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-hover) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.24), 0 4px 12px rgba(15, 23, 42, 0.08) !important;
  transform-origin: top right;
}
.notifications-filter-pill.active {
  background: var(--accent-soft) !important;
  color: var(--accent-text) !important;
  font-weight: 600 !important;
}
.notifications-panel-body {
  overscroll-behavior: contain;
}

/* ==============================================================================
   7.1. REPEAT LAST GAME BUTTON (CREATE GAME MODAL)
   ============================================================================== */
.create-repeat-btn,
#btn-repeat-last-game {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  overflow: hidden !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 8px 12px !important;
}
.create-repeat-label,
#repeat-last-game-label {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  text-align: left !important;
}
.create-repeat-badge,
#btn-repeat-last-game .badge {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

/* ==============================================================================
   8. ROSTER MODE SELECTOR IN CREATE/EDIT GAME & DETAILS
   ============================================================================== */
.roster-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.roster-mode-option {
  border: 1px solid var(--border-hover);
  background: var(--bg-primary);
  color: var(--text-main);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 140ms var(--ease-out), background 140ms var(--ease-out);
}
.roster-mode-option strong {
  font-size: 13.5px;
  font-weight: 600;
}
.roster-mode-option span {
  font-size: 12px;
  color: var(--text-muted);
}
.roster-mode-option.active {
  border-color: var(--brand-orange);
  background: var(--accent-soft);
}
.roster-mode-option.active strong {
  color: var(--accent-text);
}

/* ==============================================================================
   9. BRAND FOOTER (DESKTOP + MOBILE)
   ============================================================================== */
.halove-brand-footer {
  position: relative;
  z-index: 20;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding: 18px 24px;
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.halove-brand-footer__left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.halove-brand-footer__links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.halove-brand-footer__link {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
@media (hover: hover) and (pointer: fine) {
  .halove-brand-footer__link:hover {
    color: var(--text-main);
    text-decoration: underline;
  }
}

/* ==============================================================================
   10. MOBILE NATIVE SHELL (<= 768PX): APPBAR, 5-SLOT THUMB BAR, FLOATING MAP FAB
   ============================================================================== */
.mobile-map-toggle-fab {
  display: none;
}

@media (min-width: 769px) and (max-width: 1100px) {
  .navbar #btn-open-add-venue {
    padding: 0 10px !important;
    font-size: 12.5px !important;
    gap: 4px !important;
  }
}

@media (max-width: 768px) {
  header.navbar {
    height: auto !important;
    min-height: 56px !important;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px !important;
    gap: 8px !important;
  }
  .navbar .brand-logo-svg {
    height: 33px !important;   /* ~105.7px wide (>= 104px min-width!) */
  }
  .navbar .nav-links,
  .navbar #btn-open-add-venue,
  .navbar #nav-play-wrap {
    display: none !important;
  }

  .explorer-toolbar {
    top: 56px !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  .explorer-toolbar__primary {
    padding: 6px 14px !important;
    gap: 8px !important;
    min-height: 42px !important;
  }
  .explorer-toolbar__secondary {
    padding: 6px 14px !important;
    gap: 6px !important;
    min-height: 38px !important;
  }
  .explorer-toolbar__filters {
    gap: 6px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    padding-right: 16px !important;
  }
  .explorer-toolbar__filters::-webkit-scrollbar {
    display: none !important;
  }
  .explorer-toolbar__meta {
    display: none !important;
  }
  .sport-switch-group {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    padding-bottom: 2px !important;
    padding-right: 16px !important;
  }
  .sport-switch-group::-webkit-scrollbar { display: none !important; }
  .layout-switch-bar {
    display: none !important;
  }

  /* Mobile Dropdown Popover (Escapes overflow-x container cleanly at fixed coordinates) */
  .filter-dropdown-menu.show {
    position: fixed !important;
    top: calc(56px + 42px + 38px + 6px) !important;
    left: 14px !important;
    right: 14px !important;
    max-width: 320px !important;
    width: auto !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.25) !important;
    z-index: 1200 !important;
    padding: 8px !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
  }
  .filter-dropdown-menu .dropdown-item {
    padding: 10px 14px !important;
    font-size: 13.5px !important;
    border-radius: 8px !important;
  }

  /* Native touch press feedback */
  .sport-tab-btn:active,
  .filter-dropdown-btn:active {
    transform: scale(0.96) !important;
  }
  .explorer-container.layout-map,
  #map-section.explorer-container.layout-map {
    height: calc(100dvh - 56px - 62px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100dvh - 56px - 62px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    min-height: 360px !important;
  }
  .explorer-container.layout-map .map-bottom-tray {
    bottom: 62px !important;
    left: 10px !important;
    right: 10px !important;
  }

  /* Floating Airbnb/Playtomic Map <-> List Pill on Mobile */
  .mobile-map-toggle-fab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    position: fixed;
    left: 50%;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 95;
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    border: 0;
    background: #0F172A;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.30);
    cursor: pointer;
  }
  [data-theme="dark"] .mobile-map-toggle-fab {
    background: #FF7833;
    color: #0F172A;
  }
  .mobile-map-toggle-fab:active {
    transform: translateX(-50%) scale(0.95);
  }

  /* 5-Slot Symmetrical Bottom Tab Bar */
  nav.mobile-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    align-items: end !important;
    background: var(--tabbar-bg) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-color) !important;
    padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    height: auto !important;
    box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.08) !important;
  }
  nav.mobile-bottom-nav .nav-tab {
    height: 48px !important;
    color: var(--tabbar-muted) !important;
    background: transparent !important;
    border: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    padding: 0 !important;
    position: relative;
  }
  nav.mobile-bottom-nav .nav-tab.active {
    color: var(--tabbar-active) !important;
    font-weight: 600 !important;
  }
  nav.mobile-bottom-nav .nav-tab.active::after {
    display: none !important;
  }
  nav.mobile-bottom-nav .bottom-nav-text {
    font-size: 11px !important;
    line-height: 1;
  }
  nav.mobile-bottom-nav .mobile-bottom-nav-play {
    justify-self: center;
    width: 48px !important;
    height: 42px !important;
    margin-bottom: 3px;
    border-radius: 14px !important;
    background: var(--brand-orange) !important;
    color: #0F172A !important;
    border: 0 !important;
    box-shadow: 0 6px 16px rgba(250, 104, 29, 0.34) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transform: none !important;
  }
  nav.mobile-bottom-nav .mobile-bottom-nav-play:active {
    transform: scale(0.92) !important;
  }

  /* Mobile Notification Panel -> Native Bottom Sheet */
  .notifications-panel.open,
  .notifications-panel.active {
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 86dvh !important;
    border-radius: 22px 22px 0 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: haloveSheetUp 230ms var(--ease-sheet) both;
  }
  @keyframes haloveSheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .halove-brand-footer {
    padding: 16px 14px calc(84px + env(safe-area-inset-bottom, 0px));
    justify-content: center;
    text-align: center;
  }
}

/* ==============================================================================
   11. CHRONOLOGICAL TIMELINE ("ROZKŁAD") + SNAP MAP CAROUSEL + PRICE-PILL PINS
   ============================================================================== */
.tl-day-group {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.tl-day-head {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 2px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tl-day-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}
.tl-row {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: transform 130ms var(--ease-out), border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
.tl-row:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) {
  .tl-row:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card);
  }
}
.tl-row__time {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}
.tl-row__dur {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.tl-row__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.28;
  margin-bottom: 3px;
}
.tl-row__meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tl-row__right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

/* Crisp Brand Leaflet Price-Pill Markers (Zero Emoji!) */
.custom-venue-icon {
  background: transparent !important;
  border: 0 !important;
}
.halove-map-pin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1.5px solid var(--border-hover);
  font-family: var(--font-sans, var(--font-family));
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.20);
  transform: translate(-50%, -50%);
  transition: transform 140ms var(--ease-out), background 140ms var(--ease-out), color 140ms var(--ease-out);
}
.halove-map-pin__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  flex-shrink: 0;
}
.halove-map-pin__dot--urgent {
  background: var(--brand-orange);
}
.halove-map-pin__count {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}
.halove-map-pin.is-hovered,
.halove-map-pin:hover {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
  transform: translate(-50%, -50%) scale(1.1);
}
[data-theme="dark"] .halove-map-pin.is-hovered,
[data-theme="dark"] .halove-map-pin:hover {
  background: #FF7833;
  color: #0F172A;
  border-color: #FF7833;
}
.halove-map-pin--empty {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2.5px solid #64748B;
  opacity: 0.72;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
}
.halove-map-pin--empty.is-hovered {
  border-color: var(--brand-orange);
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.3);
}

/* Snap-scroll Map Carousel */
#map-games-carousel {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
#map-games-carousel .game-preview-card {
  scroll-snap-align: center;
  border-radius: 16px !important;
  border: 1px solid var(--border-hover) !important;
  background: var(--bg-surface) !important;
}

/* ==============================================================================
   12. QUICK MATCH SLIDE-OVER DRAWER (DESKTOP) & BOTTOM SHEET (MOBILE)
   ============================================================================== */
.quick-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.54);
  display: none;
  justify-content: flex-end;
  animation: haloveFadeIn 150ms var(--ease-out) both;
}
.quick-drawer-overlay.active {
  display: flex;
}
@keyframes haloveFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes haloveDrawerIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.quick-drawer {
  width: min(540px, 100vw);
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -16px 0 42px rgba(15, 23, 42, 0.22);
  animation: haloveDrawerIn 220ms var(--ease-out) both;
}
.quick-drawer__handle {
  display: none;
}
.quick-drawer__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.quick-drawer__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.quick-drawer__foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.quick-roster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.quick-seat {
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  border-radius: 10px;
  padding: 9px 11px;
  text-align: left;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quick-seat--open {
  border: 1.5px dashed var(--brand-orange);
  background: var(--accent-soft);
  color: var(--accent-text);
  cursor: pointer;
  transition: background 130ms var(--ease-out), color 130ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .quick-seat--open:hover {
    background: var(--brand-orange);
    color: #0F172A;
    border-style: solid;
  }
}
.quick-seat--me {
  border: 1.5px solid var(--brand-orange);
  background: var(--accent-soft);
}
.quick-blik-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Crisp SVG Badges in Facebook-style Notifications */
.notif-svg-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notif-svg-badge--request { background: var(--accent-soft); color: var(--accent-text); }
.notif-svg-badge--chat { background: var(--bg-card-subtle); color: var(--text-main); border: 1px solid var(--border-color); }
.notif-svg-badge--payment { background: var(--accent-green-light); color: var(--accent-green); }
.notif-svg-badge--fairplay { background: var(--accent-yellow-light); color: var(--accent-yellow); }

.verified-pill {
  display: none !important;
}
.verified-pill.is-verified {
  position: absolute;
  bottom: 2px;
  right: 4px;
  background-color: var(--brand-orange) !important;
  color: #0F172A !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid var(--bg-surface) !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.20) !important;
}

/* Match Card Roster Occupancy Dots (from approved Halove prototype) */
.roster-dots {
  display: inline-flex;
  align-items: center;
}
.roster-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1.5px solid var(--bg-surface);
  margin-left: -6px;
  flex-shrink: 0;
}
.roster-dot:first-child { margin-left: 0; }
.roster-dot--open {
  background: var(--accent-soft);
  border: 1.5px dashed var(--brand-orange);
  color: var(--accent-text);
  margin-left: 3px;
}

/* Fair Play Card Chips Deprecated - Clean numeric stats only (Zero emoji, zero slop) */
.fairplay-card-chip {
  display: none !important;
}

/* Scalable Platform Tabs (Apple & Android vector icons) */
.pwa-tab-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  transition: all 0.15s ease !important;
}
.h-pwa-tab-icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Scalable PWA Step 3 "Dodaj" Action Badge */
.pwa-step-icon-wrap.pwa-step-icon-wrap--action {
  width: auto !important;
  min-width: 58px !important;
  height: 36px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  background: rgba(0, 122, 255, 0.1) !important;
  border: 1px solid rgba(0, 122, 255, 0.25) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}
.pwa-ios-add-btn {
  color: #007AFF !important;
  background: transparent !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Outfit", var(--font-sans) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  line-height: 1 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  white-space: nowrap !important;
  letter-spacing: -0.2px !important;
}
[data-theme="dark"] .pwa-step-icon-wrap.pwa-step-icon-wrap--action {
  background: rgba(10, 132, 255, 0.16) !important;
  border-color: rgba(10, 132, 255, 0.35) !important;
}
[data-theme="dark"] .pwa-ios-add-btn {
  color: #389BFF !important;
}
.pwa-ios-add-badge {
  display: inline-flex;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  color: #007AFF;
  background: rgba(0, 122, 255, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  margin: 0 2px;
  vertical-align: baseline;
}
[data-theme="dark"] .pwa-ios-add-badge {
  color: #389BFF;
  background: rgba(10, 132, 255, 0.16);
}

/* Adaptive Tactical Court Diagram ("Na pozycje") in Quick Drawer */
:root {
  --court-bg: #EEF2F6;
  --court-line: rgba(15, 23, 42, 0.28);
  --court-sub: rgba(15, 23, 42, 0.14);
}
[data-theme="dark"] {
  --court-bg: #0B1120;
  --court-line: rgba(255, 255, 255, 0.24);
  --court-sub: rgba(255, 255, 255, 0.12);
}
.court-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 204px;
  border-radius: 14px;
  background: var(--court-bg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.court-slot {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 52px;
  height: 52px;
  padding: 4px 6px;
  border-radius: 50%;
  border: 1.5px solid var(--border-hover);
  background: var(--bg-surface);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.14);
  transition: transform 130ms var(--ease-out), background 130ms var(--ease-out), border-color 130ms var(--ease-out);
}
.court-slot__code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.05;
}
.court-slot__label {
  font-size: 9.5px;
  line-height: 1.05;
  max-width: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}
.court-slot.is-open {
  border: 1.5px dashed var(--brand-orange);
  background: var(--accent-soft);
  color: var(--accent-text);
}
.court-slot.is-open .court-slot__label {
  color: var(--accent-text);
}
.court-slot.is-selected,
.court-slot.is-claimed {
  background: var(--brand-orange);
  border: 2px solid var(--brand-orange);
  color: #0F172A;
  transform: translate(-50%, -50%) scale(1.08);
}
.court-slot.is-selected .court-slot__label,
.court-slot.is-claimed .court-slot__label {
  color: #0F172A;
  font-weight: 600;
}
@media (hover: hover) and (pointer: fine) {
  .court-slot:hover {
    transform: translate(-50%, -50%) scale(1.07);
  }
}

@media (max-width: 768px) {
  .tl-row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 13px;
  }
  .tl-row__time { font-size: 17px; }
  .tl-row__title { font-size: 15px; }

  .quick-drawer-overlay {
    align-items: flex-end;
    justify-content: center;
  }
  .quick-drawer {
    width: 100%;
    height: auto;
    max-height: 88dvh;
    border-left: 0;
    border-top: 1px solid var(--border-hover);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -14px 40px rgba(15, 23, 42, 0.28);
    animation: haloveSheetUp 230ms var(--ease-sheet) both;
  }
  .quick-drawer__handle {
    display: flex;
    justify-content: center;
    padding: 10px 0 2px;
    cursor: pointer;
    flex-shrink: 0;
  }
  .quick-drawer__handle span {
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: var(--border-hover);
  }
  .quick-drawer__head { padding: 8px 16px 12px; }
  .quick-drawer__body { padding: 14px 16px; }
  .quick-drawer__foot {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  /* Native Mobile Bottom Sheet for "+" Action Sheet (#modal-play-sheet) */
  #modal-play-sheet.modal-overlay {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
  }
  #modal-play-sheet .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 22px 22px 0 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    padding: 6px 18px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    animation: haloveSheetUp 230ms var(--ease-sheet) both;
  }
}

/* ==============================================================================
   13. 2-STEP CREATE MATCH STEPPER, POSITION PILLS & SECONDARY SCREENS POLISH
   ============================================================================== */
.create-stepper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 10px;
  background: var(--bg-card-subtle);
  margin-bottom: 14px;
}
.create-stepper__item {
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.create-stepper__item.active {
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.10);
}

.quick-pos-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quick-pos-pill {
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border-hover);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 130ms var(--ease-out), border-color 130ms var(--ease-out);
}
.quick-pos-pill.active {
  background: var(--brand-orange);
  color: #0F172A;
  border-color: var(--brand-orange);
  font-weight: 600;
}

/* Secondary Screens Unification: Profile, Chats, Full Details & Modals */
.modal-box {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-hover) !important;
  border-radius: 18px !important;
}
.chat-bubble.me,
.message-bubble.own,
.msg-bubble.sent {
  background: var(--brand-orange) !important;
  color: #0F172A !important;
}
.chat-bubble.me *,
.message-bubble.own *,
.msg-bubble.sent * {
  color: #0F172A !important;
}
.athlete-id-card,
.profile-bento-card,
.messenger-layout,
.sports-card-banner,
.smart-ledger-box {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}
.settings-sport-chip.active {
  background: var(--text-main) !important;
  color: var(--bg-primary) !important;
  border-color: var(--text-main) !important;
}




/* ==========================================================================
   v4.3.0 — poprawki dostępności i układu z audytu UX (2026-11-22)
   ========================================================================== */

/* Nagłówek na wąskich telefonach: przycisk "Rejestracja" mieści się w 375 px */
@media (max-width: 420px) {
  .navbar #btn-open-register,
  .navbar #btn-open-login {
    padding: 0 10px !important;
    font-size: 12.5px !important;
    height: 34px !important;
    min-height: 34px !important;
  }
  .navbar .nav-guest-actions { gap: 4px; }
}

/* Linki w stopce: obszar dotyku co najmniej 24 px (WCAG 2.2, 2.5.8) */
.halove-brand-footer__link {
  min-height: 24px;
  padding-top: 4px;
  padding-bottom: 4px;
}

/* Fokus z klawiatury zawsze widoczny */
:where(a, button, input, select, textarea, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

/* Baner prywatności nad dolną nawigacją: nawigacja działa, zanim baner zostanie zamknięty */
@media (max-width: 960px) {
  .cookie-banner {
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    padding-bottom: 12px;
    border-radius: 14px 14px 0 0;
  }
}

/* ==========================================================================
   Jednorazowe okienko akceptacji regulaminu v2.0
   Nie używa .modal-overlay, więc nie zamyka się kliknięciem tła ani klawiszem Esc.
   ========================================================================== */
.terms-update-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.terms-update-overlay[hidden] { display: none; }

/* Pełna treść regulaminu otwierana z okienka musi być nad nim */
#modal-legal { z-index: 3100; }

.terms-update-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: min(88vh, 760px);
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  animation: termsUpdateIn 0.25s ease-out;
}
.terms-update-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 24px 24px 8px;
}
.terms-update-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
}
.terms-update-title {
  margin: 12px 0 6px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-main);
}
.terms-update-lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}
.terms-update-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.terms-update-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-card-subtle);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-main);
}
.terms-update-icon {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1.35;
}
.terms-update-links {
  margin: 14px 0 6px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.terms-update-link {
  background: none;
  border: none;
  padding: 4px 2px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-text);
  text-decoration: underline;
  cursor: pointer;
}
.terms-update-footer {
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}
.terms-update-accept {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
}
.terms-update-accept:disabled { opacity: 0.7; cursor: wait; }
.terms-update-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}
@keyframes termsUpdateIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* Telefon: arkusz wysuwany od dołu, przycisk zawsze widoczny */
@media (max-width: 640px) {
  .terms-update-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .terms-update-box {
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    animation-name: termsUpdateSheetIn;
  }
  .terms-update-scroll { padding: 20px 16px 6px; }
  .terms-update-title { font-size: 18px; }
  .terms-update-list li { font-size: 13.5px; padding: 9px 10px; }
  .terms-update-footer {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  }
}
@keyframes termsUpdateSheetIn {
  from { transform: translateY(100%); }
  to { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .terms-update-box { animation: none; }
}

body.terms-update-open { overflow: hidden; }
