:root{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:#17212b;background:#f5f7f9;font-synthesis:none;--green:#0caf83;--green-dark:#08795f;--blue:#2563eb;--muted:#718096;--line:#e4e9ee}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}.topbar{height:66px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 22px;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:500}.brand{display:flex;align-items:center;gap:10px}.brand-mark{display:grid;place-items:center;height:36px;background:transparent}.brand-mark img{height:28px;width:auto;display:block}.brand-mark .logo-dark{display:none}.brand strong{display:block;font-size:15px;font-style:italic;font-weight:800;letter-spacing:-.3px;white-space:nowrap}.brand strong b{color:var(--green)}.brand small{display:block;color:var(--muted);font-size:11px;margin-top:2px}.icon-btn{border:0;background:#f0f4f7;border-radius:50%;width:40px;height:40px;font-size:25px;color:#586575}main{max-width:1600px;margin:auto;padding:14px 18px 90px}.quick-filters{display:flex;gap:8px;overflow-x:auto;padding:3px 0 12px;scrollbar-width:none}.sport-chip{white-space:nowrap;border:1px solid #b9e7d7;border-radius:24px;background:#fff;color:#246653;padding:9px 15px;font-size:13px;font-weight:650}.sport-chip.active{background:#e4fbf2;border-color:#8bd9bf;color:var(--green-dark)}.toolbar{display:flex;align-items:center;gap:10px;margin-bottom:10px}.search-wrap{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid var(--line);border-radius:15px;padding:0 13px;flex:1;height:43px;min-width:130px}.search-wrap span{font-size:24px;color:#84909b}.search-wrap input{border:0;outline:0;width:100%;min-width:0;background:transparent}.secondary-btn{background:#fff;border:1px solid var(--line);color:#526170;border-radius:12px;padding:10px 13px;white-space:nowrap}.sort-label{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px}.sort-label select{border:1px solid var(--line);border-radius:10px;padding:10px;background:#fff;max-width:190px;color:#344253}.filters{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:12px}.filters label{display:flex;flex-direction:column;gap:5px;color:var(--muted);font-size:12px}.filters input:not([type=checkbox]){width:140px;border:1px solid var(--line);border-radius:9px;padding:9px;color:#24313d}.filters .check-label{flex-direction:row;align-items:center;padding:10px 2px;font-size:13px}.hidden{display:none!important}.status-row{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:12px;margin:7px 2px 10px;gap:8px}.status-row strong{color:#263445;font-size:14px}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 370px;gap:14px;height:calc(100vh - 225px);min-height:450px}.map-wrap{position:relative;min-width:0;overflow:hidden;border-radius:19px;background:#d8eee7;box-shadow:0 2px 12px #23334408}#map{width:100%;height:100%;min-height:420px;background:#e2f1eb}.map-hint{position:absolute;bottom:12px;left:12px;z-index:400;background:#fffE;border:1px solid #e4e9ee;border-radius:12px;padding:8px 11px;color:#526170;font-size:11px;box-shadow:0 3px 12px #24334412}.map-label-toggle{position:absolute;bottom:48px;right:10px;z-index:700;display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #e4e9ee;border-radius:20px;box-shadow:0 3px 12px #24334412;padding:10px 12px;font-size:13px;font-weight:650;color:#17212b}
.topbar-back{color:#08795f;text-decoration:none;font-weight:600;font-size:15px}
.topbar-title{font-weight:700;font-size:17px}
.admin-test-embed-btn{display:none}
body.admin-mode .admin-test-embed-btn{display:flex;align-items:center;justify-content:center;position:absolute;bottom:100px;right:10px;z-index:700;background:#fff;border:1px solid #e4e9ee;border-radius:20px;box-shadow:0 3px 12px #24334412;padding:10px 14px;font-size:13px;font-weight:700;color:#17212b;text-decoration:none}
.cal-archive-link{display:block;text-align:center;background:#e4fbf2;border:1px solid #8bd9bf;color:#08795f;font-weight:700;border-radius:20px;padding:10px 14px;font-size:14px;text-decoration:none;margin:0 0 12px}.map-label-toggle-switch{position:relative;width:38px;height:22px;border-radius:11px;background:#11a55f;transition:background .2s;flex-shrink:0}.map-label-toggle-knob{position:absolute;top:3px;left:19px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:left .2s}.map-label-toggle[aria-pressed="false"]{color:#687581}.map-label-toggle[aria-pressed="false"] .map-label-toggle-switch{background:#c3ccd6}.map-label-toggle[aria-pressed="false"] .map-label-toggle-knob{left:3px}.side-panel{background:#fff;border:1px solid var(--line);border-radius:19px;overflow:hidden;display:flex;flex-direction:column;min-height:0}.panel-heading{display:flex;justify-content:space-between;align-items:center;padding:16px 16px 12px;border-bottom:1px solid #f0f2f5}.panel-heading strong{font-size:16px}.panel-heading span{font-size:12px;color:var(--muted)}.event-list{overflow:auto;padding:7px}.event-card{position:relative;border:1px solid #edf0f3;border-radius:14px;padding:13px 12px;margin:5px 0;cursor:pointer;transition:background .15s,border .15s}.event-card:hover{border-color:#a6dfcd;background:#fbfffd}.card-top{display:flex;justify-content:space-between;gap:10px}.event-title{font-size:14px;line-height:1.35;font-weight:750;color:#1d2a35}.heart{border:0;background:transparent;color:#9ba6af;font-size:23px;cursor:pointer;padding:0 2px;align-self:flex-start;line-height:1}.heart.saved{color:#e14f71}.event-meta{font-size:12px;color:#718096;margin-top:7px;line-height:1.55}.event-price{font-weight:750;font-size:13px;margin-top:8px;color:var(--green-dark)}.status-pill{display:inline-block;border-radius:20px;padding:5px 8px;font-size:10px;font-weight:750;margin-top:8px;background:#e6faf2;color:#07805c}.status-pill.closed{background:#fff0e8;color:#b65a23}.status-pill.unknown{background:#eef1f4;color:#687581}.empty{padding:30px 15px;text-align:center;color:var(--muted);font-size:13px;line-height:1.6}.leaflet-popup-content{min-width:200px}.popup-title{font-weight:750;font-size:13px;line-height:1.3;margin-bottom:4px;padding-right:20px}.popup-meta{font-size:12px;color:#596774;line-height:1.45}.popup-link{display:inline-block;margin-top:6px;color:var(--green-dark);font-weight:750;font-size:12px;text-decoration:none}.bottom-nav{display:none}.modal{position:fixed;inset:0;z-index:1200;display:flex;align-items:flex-end;justify-content:center}.modal-shade{position:absolute;inset:0;background:#14203366}.detail-sheet{position:relative;background:#fff;border-radius:24px 24px 0 0;width:min(100%,680px);max-height:88vh;overflow:auto;padding:24px 20px calc(24px + env(safe-area-inset-bottom));box-shadow:0 -10px 40px #17212b20}.modal-close{position:absolute;right:16px;top:12px;border:0;background:#f0f3f6;border-radius:50%;width:34px;height:34px;font-size:24px;color:#667586}.detail-title{font-size:21px;line-height:1.25;font-weight:800;padding-right:36px;margin:0 0 6px}.detail-date{font-size:12px;color:var(--muted);margin-bottom:18px}.detail-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:18px 0}.detail-actions a,.detail-actions button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:50px;border:1px solid var(--line);border-radius:13px;background:#fafbfc;color:#243447;text-decoration:none;font-size:12px;font-weight:650;padding:8px}.detail-info{padding:14px;border:1px solid var(--line);border-radius:15px;margin-top:10px}.detail-info strong{display:block;margin-bottom:6px}.detail-info p{margin:0;color:#6b7888;font-size:13px;line-height:1.55}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#17212b;color:white;border-radius:12px;padding:11px 16px;z-index:1300;font-size:13px;box-shadow:0 5px 20px #0002}
@media(max-width:900px){.topbar{height:60px;padding:0 14px}.brand small{display:none}main{padding:10px 10px calc(82px + env(safe-area-inset-bottom))}.quick-filters{padding-bottom:10px}.sport-chip{padding:9px 12px}.toolbar{flex-wrap:wrap;gap:7px}.search-wrap{flex-basis:100%;order:0}.toolbar .secondary-btn{order:1}.sort-label{order:2;flex:1;justify-content:flex-end}.sort-label span{display:none}.sort-label select{max-width:100%;width:100%}.status-row{margin:6px 2px 8px}.status-row span{max-width:55%;text-align:right;font-size:10px}.workspace{display:block;height:calc(100dvh - 250px);min-height:380px;position:relative}.map-wrap{height:100%;border-radius:16px}.workspace #map{height:100%;min-height:380px}.side-panel{display:none;height:100%;border-radius:16px}.workspace.list-mode .map-wrap{display:none}.workspace.list-mode .side-panel{display:flex}.workspace.favorites-mode .map-wrap{display:none}.workspace.favorites-mode .side-panel{display:flex}.bottom-nav{position:fixed;z-index:900;bottom:0;left:0;right:0;display:flex;justify-content:space-around;gap:4px;padding:8px 8px calc(8px + env(safe-area-inset-bottom));background:#fffffff2;backdrop-filter:blur(14px);border-top:1px solid #e5eaf0}.nav-btn{flex:1;border:0;background:transparent;border-radius:14px;padding:7px 4px;display:flex;flex-direction:column;align-items:center;gap:3px;color:#687789;font-size:11px;font-weight:650}.nav-btn span{font-size:21px;line-height:1.1}.nav-btn.active{background:#e5fbf3;color:var(--green-dark)}.nav-btn i{font-style:normal;font-size:9px}.filters{max-height:45vh;overflow:auto}.filters input:not([type=checkbox]){width:calc(50vw - 35px)}.detail-sheet{padding:26px 16px calc(18px + env(safe-area-inset-bottom))}.detail-title{font-size:19px}.map-hint{bottom:10px;left:10px}.leaflet-control-zoom{margin-top:12px!important;margin-left:12px!important}}
@media(min-width:901px){.detail-sheet{border-radius:24px;margin-bottom:5vh}.modal{align-items:center}.bottom-nav{display:none}}


/* Спортивные маркеры на карте */
.sport-marker-wrap {
  background: transparent;
  border: 0;
}
.sport-marker {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pin-color);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 8px;
  transform: rotate(-45deg);
  box-shadow: 0 2px 7px #17212b55;
  opacity: .85;
}
.sport-marker svg {
  width: 19px;
  height: 19px;
  display: block;
  transform: rotate(45deg);
}
.sport-marker {
  line-height: 1;
}
.made-by-yr {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 400;
  padding: 6px 9px;
  border-radius: 8px;
  background: #ffffffed;
  color: #526170;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  box-shadow: 0 2px 8px #17212b20;
  pointer-events: none;
}

/* Search suggestions + sort only in list view (mobile) */
.search-wrap{position:relative}
.search-suggestions{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:1100;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 24px #2433441f;overflow:hidden;max-height:260px;overflow-y:auto;font-size:12px}
.suggestion-item{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #f0f2f5;background:#fff;padding:8px 12px;cursor:pointer}
.suggestion-item:last-child{border-bottom:0}
.suggestion-item:active{background:#e4fbf2}
.search-suggestions .suggestion-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;font-weight:700;color:#1d2a35;line-height:1.3}
.search-suggestions .suggestion-meta{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;color:#718096;margin-top:2px}
@media(max-width:900px){body:not(.list-view) .sort-label{display:none!important}}

/* List cards: separated, readable rows */
.event-card{padding:16px;margin:8px 0;border:1px solid #e4e9ee;border-radius:16px;box-shadow:0 2px 10px #2333440a}
.card-top{gap:12px;align-items:flex-start}
.event-title{font-size:15px;line-height:1.4}
.heart{width:36px;height:36px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;background:#f0f4f7;font-size:20px}
.heart.saved{background:#ffeef2}
.event-meta-rows{margin-top:12px;display:flex;flex-direction:column;gap:7px}
.event-meta-row{display:flex;gap:9px;align-items:flex-start;font-size:13px;line-height:1.5;color:#526170}
.meta-icon{flex-shrink:0;width:18px;text-align:center}
.card-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:13px;padding-top:12px;border-top:1px solid #eef1f4}
.event-price{margin-top:0;font-size:14px}
.status-pill{margin-top:0;flex-shrink:0;padding:6px 10px;font-size:11px}
.event-meta.event-nocoords{margin-top:10px;font-size:12px;color:#718096;line-height:1.5}
.event-list{padding:10px}
.panel-heading{padding:18px 16px 14px}
.panel-heading strong{font-size:17px}

/* Collapsible toolbar panel (variant 1) */
.toolbar-panel{display:flex;flex-direction:column;gap:10px;margin-bottom:10px}
.toolbar-panel .quick-filters{padding-bottom:0}
.toolbar-panel .sort-label{justify-content:space-between}
.toolbar-panel .sort-label select{max-width:none;width:100%}
.toolbar-panel .filters{margin-bottom:0}
.panel-updated{font-size:11px;color:var(--muted);text-align:right;padding:0 2px}
.toolbar-panel.closed{display:none}
@media(max-width:900px){
  .toolbar{flex-wrap:nowrap}
  .search-wrap{flex-basis:auto;flex:1;min-width:0}
  .toolbar .secondary-btn{order:1;flex-shrink:0}
  .toolbar-panel{display:none}
  .toolbar-panel.open{display:flex}
  .toolbar-panel .sort-label{flex:1;justify-content:space-between}
  .toolbar-panel .sort-label span{display:inline}
  .toolbar-panel .sort-label select{max-width:100%;width:100%}
  main{padding-bottom:calc(70px + env(safe-area-inset-bottom))}
  .workspace{height:calc(100dvh - 190px)}
}

/* No extended filters: chips always visible, sort row, colourful cards */
.sort-row{display:flex;align-items:center;margin-bottom:10px}
.sort-row .sort-label{flex:1}
.status-row{justify-content:flex-end}
.event-card{border-left:4px solid var(--card-accent, #e4e9ee)}
.event-prices{margin-top:12px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.event-prices-label{font-size:11px;font-weight:700;color:#718096;text-transform:uppercase;letter-spacing:.4px}
.price-chips{display:flex;flex-wrap:wrap;gap:6px}
.price-chip{display:inline-block;background:#e6faf2;color:#07805c;border-radius:20px;padding:4px 9px;font-size:12px;font-weight:750}
.detail-prices{margin-top:10px;display:flex;flex-wrap:wrap;gap:6px}
@media(max-width:900px){
  .sort-row{display:none}
  body.list-view .sort-row{display:flex}
  .status-row{display:none}
  body.list-view .status-row{display:flex}
  .workspace{height:calc(100dvh - 240px)}
  body.list-view .workspace{height:calc(100dvh - 310px)}
}

/* Modern list card: highlighted date / place / participants, detail distance rows */
.event-card{border-radius:18px;box-shadow:0 4px 16px #23334412}
.event-title{font-size:17px}
.event-meta-rows{background:#f7f9fb;border-radius:12px;padding:10px 12px;gap:9px}
.event-meta-row{font-size:14px;color:#2b3540;font-weight:600}
.event-meta-row.event-meta-date{font-size:15px;font-weight:800;color:#101820}
.event-meta-row .meta-icon{width:26px;height:26px;border-radius:8px;background:#e8eef3;display:inline-flex;align-items:center;justify-content:center;font-size:14px}
.card-footer .event-price{font-size:15px}
.detail-distances{margin-top:10px;display:flex;flex-direction:column;gap:6px}
.detail-distance-row{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#f7f9fb;border-radius:10px;padding:9px 12px;font-size:14px;color:#2b3540;font-weight:600}
.detail-distance-row strong{color:#07805c;font-weight:800;white-space:nowrap}

/* Compact list + detail, participants highlighted */
.event-meta-row.event-meta-participants{font-size:15px;font-weight:800;color:#2563eb}
.detail-participants{font-size:15px;font-weight:800;color:#2563eb}
@media(max-width:900px){
  .topbar{height:52px;padding:0 14px}
  .brand-mark{width:auto;height:30px;font-size:20px;border-radius:10px}
  .brand strong{font-size:16px}
  .brand small{display:none}
  .icon-btn{width:36px;height:36px;font-size:22px}
  .search-wrap{height:40px}
  .quick-filters{padding-bottom:8px}
  .sport-chip{padding:7px 12px;font-size:12px}
  .sort-label select{padding:8px}
  .sort-row{margin-bottom:8px}
  body.list-view .status-row{display:none}
  .panel-heading{padding:10px 12px 8px}
  .panel-heading strong{font-size:15px}
  body.list-view .workspace{height:auto}
  body.list-view .side-panel{height:auto}
  body.list-view .event-list{overflow:visible;padding:6px}
  .event-card{padding:12px;margin:6px 0}
  .event-title{font-size:16px}
  .event-meta-rows{padding:8px 10px;gap:7px}
  .event-meta-row .meta-icon{width:22px;height:22px;font-size:13px}
  .card-footer{margin-top:10px;padding-top:8px}
  .card-footer .event-price{font-size:14px}
  .status-pill{padding:5px 9px}
  .detail-sheet{padding:16px 16px calc(16px + env(safe-area-inset-bottom))}
  .detail-title{font-size:19px;margin-bottom:4px}
  .detail-date{margin-bottom:12px}
  .detail-actions{margin:12px 0;gap:6px}
  .detail-actions a,.detail-actions button{min-height:44px;padding:6px}
  .detail-info{padding:10px 12px}
  .detail-distances{margin-top:8px;gap:5px}
  .detail-distance-row{padding:7px 10px;font-size:13px}
}

/* Sport tag in list cards, coloured detail status and participants frames */
.sport-tag{flex-shrink:0;font-size:11px;font-weight:800;color:var(--tag-color);background:#eef2f6;background:color-mix(in srgb, var(--tag-color) 12%, white);border:1px solid #e4e9ee;border:1px solid color-mix(in srgb, var(--tag-color) 30%, white);border-radius:20px;padding:4px 9px;white-space:nowrap;align-self:flex-start}
.detail-status-open{background:#e6faf2;border-color:#a6dfcd}
.detail-status-open strong{color:#07805c}
.detail-status-closed{background:#ffe9e9;border-color:#f5c2c2}
.detail-status-closed strong{color:#b91c1c}
.detail-status-unknown{background:#eef1f4;border-color:#e4e9ee}
.detail-status-unknown strong{color:#687581}
.detail-status p{color:#3d4a5a}
.detail-participants-box{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#e8f0fe;border:1px solid #c2d6fb;border-radius:15px;padding:12px 14px;margin-top:10px;color:#1d4ed8;font-weight:700;font-size:14px}
.detail-participants-box strong{font-size:18px;font-weight:800}
.detail-weather{font-size:16px;font-weight:750;line-height:1.4;background:#fff7e0;border-color:#ffe9a8}
.detail-missing{margin-top:10px;padding:8px 12px;font-size:12px;line-height:1.4;color:#687581;background:#f7f8fa;border:1px solid #eef1f4;border-radius:12px}

/* Prominent list titles, map status row back, site footer */
.event-title{font-size:18px;line-height:1.25;font-weight:800;color:#0f172a;letter-spacing:-.2px}
.event-card:active{background:#f8fafc}
.status-row{justify-content:space-between}
.site-footer{text-align:center;color:var(--muted);font-size:12px;padding:14px 0 4px;font-family:'Unbounded',Inter,system-ui,sans-serif;font-weight:700;letter-spacing:.02em}
@media(max-width:900px){
  .status-row{display:flex}
  body.list-view .status-row{display:none}
  .workspace{height:calc(100dvh - 270px)}
}

/* Clusters, marker labels, hint close, footer links, visible footer on map */
.cluster-wrap{background:transparent;border:0}
.cluster-marker{display:grid;place-items:center;width:100%;height:100%;border-radius:50%;background:#17212b;color:#fff;font-weight:800;border:2px solid #fff;box-shadow:0 3px 10px #0003}
.cluster-marker.small{font-size:13px}
.cluster-marker.medium{font-size:14px}
.cluster-marker.large{font-size:15px}
.marker-label-tip{background:#ffffffe0;border:1px solid #e8edf1;border-radius:10px;box-shadow:0 2px 8px #24334414;padding:5px 8px}
.marker-label-tip:before{display:none}
.marker-label strong{display:block;font-size:12px;line-height:1.3;color:#414d59}
.marker-label span{font-size:11px;color:#8a97a3}
.map-hint{display:flex;align-items:center;gap:8px}
.map-hint-close{border:0;background:transparent;font-size:18px;line-height:1;color:#687581;cursor:pointer;padding:0 2px}
.site-footer a{color:var(--muted)}
@media(max-width:900px){
  .workspace{height:calc(100dvh - 320px)}
}

/* Reference style: count pins, multi popup, yellow price pills, bottom meta row, share */
.pin-count{transform:rotate(45deg);color:#fff;font-size:16px;font-weight:800;line-height:1}
.multi-popup{min-width:230px;max-width:280px}
.multi-popup-title{font-size:13px;font-weight:800;color:#17212b;margin-bottom:8px}
.multi-item{display:flex;gap:8px;width:100%;text-align:left;border:0;background:transparent;padding:8px 0;border-top:1px solid #f0f2f5;cursor:pointer}
.multi-item:first-of-type{border-top:0}
.multi-num{font-weight:800;color:#2563eb;flex-shrink:0}
.multi-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.multi-text strong{font-size:13px;line-height:1.3;color:#17212b}
.multi-text span{font-size:12px;color:#718096}
@media (max-width:700px){
  /* Cluster popups on phones: a 9-row list used to run off the bottom
     of the screen with no way to scroll it (both Yandex balloon and
     Leaflet popup). Cap the rows and scroll inside them, so the title
     stays visible and every row is reachable. */
  .multi-rows{max-height:45vh;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}
  /* Compact cluster rows: more rows fit before scrolling kicks in. */
  .multi-item{padding:6px 0}
  .multi-text strong{font-size:12px}
  .multi-text span{font-size:11px}
}
.event-price{display:inline-block;background:#ffecb3;color:#17212b;padding:6px 10px;border-radius:20px;font-size:13px}
.detail-actions{grid-template-columns:repeat(4,1fr)}
.detail-distances-title{text-transform:uppercase;letter-spacing:.5px;font-size:12px;color:#687581}
.detail-distance-row strong{background:#ffecb3;color:#17212b;padding:4px 10px;border-radius:20px;font-size:13px}

/* Statistics page */
.topbar-actions{display:flex;gap:8px;align-items:center}
.theme-btn{border:1px solid var(--line);background:#f0f4f7;color:#344253;border-radius:20px;padding:8px 12px;font-size:13px;font-weight:700;white-space:nowrap}
body.site-dark .theme-btn{background:#1a2739;border-color:#243447;color:#e2e8f0}
/* Single theme switch (2026-10-30): map and site change together, so
   the separate map/site theme buttons are gone for everyone. */
#map-theme-btn,#site-theme-btn{display:none!important}
body.stats-view .toolbar,body.results-view .toolbar{display:none}
body.stats-view .quick-filters,body.results-view .quick-filters{display:none}
body.stats-view .sort-row,body.results-view .sort-row{display:none}
.stats-panel,.results-panel{padding:4px 0 10px}
.stats-header h2{font-size:20px;font-weight:800;margin:0 0 4px}
.stats-header p{color:var(--muted);font-size:13px;margin:0 0 14px;line-height:1.5}
.stats-back{border:1px solid var(--line);background:#fff;border-radius:12px;padding:8px 12px;font-size:13px;font-weight:650;color:#526170;cursor:pointer;margin-bottom:12px}
.stats-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:12px}
.stats-card{background:#fff;border:1px solid #edf0f3;border-radius:18px;padding:14px;box-shadow:0 2px 10px #23334408}
.stats-card>strong{display:block;font-size:26px;font-weight:800;color:#0f172a;line-height:1.1}
.stats-card>span{font-size:13px;color:#718096}
.stats-card small{display:block;font-size:12px;color:#718096;margin-top:2px}
.stats-block{margin-bottom:12px}
.stats-card h3{font-size:16px;font-weight:800;margin:0 0 12px}
.stats-bar-row{display:flex;align-items:center;gap:8px;margin:8px 0}
.stats-bar-label{width:90px;flex-shrink:0;font-size:13px;font-weight:650}
.stats-bar-track{flex:1;height:12px;background:#f0f2f5;border-radius:20px;overflow:hidden}
.stats-bar-fill{height:100%;border-radius:20px}
.stats-bar-value{width:32px;text-align:right;font-size:13px;font-weight:800;flex-shrink:0}
.stats-tabs{display:flex;gap:8px;margin-bottom:14px}
.stats-tab-btn{flex:1;border:1px solid var(--line);background:#fff;border-radius:12px;padding:10px 8px;font-size:14px;font-weight:700;color:#526170;cursor:pointer}
.stats-tab-btn.active{background:#e4fbf2;border-color:#8bd9bf;color:#08795f}
.arch-row{display:flex;align-items:baseline;gap:8px;padding:7px 0;border-bottom:1px solid #f0f2f5}
.arch-row:last-child{border-bottom:0}
.arch-row .arch-name{flex:1;min-width:0;overflow-wrap:anywhere;font-size:14px;font-weight:650;color:inherit;text-decoration:none}
.stats-bar-fill{transition:width .9s cubic-bezier(.22,.8,.3,1)}
.stats-insights{margin:10px 0 0;padding-left:18px;font-size:14px;line-height:1.55}
.stats-insights li{margin-bottom:6px}
.stats-insights b{color:#08795f}
.donut-wrap{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.donut-seg{transition:stroke-dasharray 1s ease}
.donut-legend{font-size:13px;line-height:1.7}
.donut-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px}
.stats-months{display:flex;gap:10px;align-items:flex-end;min-height:170px;padding-top:8px;overflow-x:auto}
.stats-month-col{flex:1 0 44px;display:flex;flex-direction:column;align-items:center;gap:6px;min-width:44px}
.stats-month-val{font-size:11px;font-weight:700;color:#333}
.stats-month-bar{width:100%;max-width:44px;border-radius:8px 8px 0 0;background:#0caf83;transition:height .9s cubic-bezier(.22,.8,.3,1)}
.stats-month-label{font-size:12px;color:#718096;white-space:nowrap}
.arch-row .arch-meta{font-size:12px;color:#718096;white-space:nowrap}
.arch-row.arch-stack{flex-direction:column;align-items:stretch;gap:2px}
.arch-row.arch-stack .arch-topline{display:flex;align-items:baseline;gap:8px}
.arch-row.arch-stack .arch-athlete{flex:1;min-width:0}
.arch-row.arch-stack .arch-count{margin-left:auto}
.arch-row.arch-stack .arch-meta{white-space:normal}
.arch-row .arch-count{font-size:14px;font-weight:800;white-space:nowrap}
/* Results search cards (2026-11-01, user request): rows read as cards —
   a filled, rounded background instead of a bare divider, slightly
   larger padding and meta/count so long titles breathe. Scoped to the
   archive search list only; stats-tab rows keep the plain style. */
#archive-search-list .arch-row{border-bottom:0;padding:12px;margin-bottom:8px;border-radius:14px;border:1px solid #e5eaf0;background:#f5f7f9}
#archive-search-list .arch-row:last-child{margin-bottom:0}
#archive-search-list .arch-event{font-size:16px;line-height:1.35}
#archive-search-list .arch-meta{font-size:13px}
#archive-search-list .arch-count{font-size:15px}
/* Finisher count badge (2026-11-01, user request): the count stands
   out as a pill instead of a plain number. */
#archive-search-list .arch-count{display:inline-block;padding:4px 10px;border-radius:20px;background:#e6faf2;color:#07805c}
.stats-note{font-size:12px;color:#718096;margin:10px 0 0;line-height:1.5}
.stats-venue-row{display:flex;justify-content:space-between;gap:8px;padding:8px 0;border-top:1px solid #f0f2f5}
.stats-venue-row:first-of-type{border-top:0}
.stats-venue-row span{font-size:14px}
.stats-venue-row strong{font-size:14px;font-weight:800;flex-shrink:0}
.stats-facts{display:flex;gap:16px;flex-wrap:wrap}
.stats-facts div{display:flex;flex-direction:column;gap:2px}
.stats-facts span{font-size:12px;color:#718096}
.stats-facts strong{font-size:16px;font-weight:800}
.stats-big{font-size:16px;font-weight:800;margin:0 0 6px;line-height:1.3}
@media(min-width:901px){
  .stats-grid{grid-template-columns:repeat(4,1fr)}
}

#yandex-labels{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:400;transition:opacity .2s ease}
.yandex-label{position:absolute;left:0;top:0;will-change:transform;animation:ylabel-in .25s ease;background:#ffffffe0;border:1px solid #e8edf1;border-radius:10px;box-shadow:0 2px 8px #24334414;padding:5px 8px;pointer-events:auto;cursor:pointer;overflow:hidden}
@keyframes ylabel-in{from{opacity:0}to{opacity:1}}
.yandex-label strong{display:block;font-size:12px;line-height:1.3;color:#414d59;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.yandex-label span{display:block;font-size:11px;line-height:1.3;color:#8a97a3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.yandex-label.cluster-label{padding:0}
.marker-label-tip.cluster-label-tip{padding:0}
.yandex-label .cluster-label-row, .marker-label .cluster-label-row{display:block;box-sizing:border-box;min-height:50px;max-width:220px;padding:8px 11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.yandex-label .cluster-label-row + .cluster-label-row, .marker-label .cluster-label-row + .cluster-label-row{border-top:1px solid #e4e9ee}
.yandex-label .cluster-label-row:active, .marker-label .cluster-label-row:active{background:#f2f7f5}
.yandex-label .cluster-label-row strong, .marker-label .cluster-label-row strong{display:block;font-size:13px;line-height:1.35;color:#414d59;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.yandex-label .cluster-label-row span, .marker-label .cluster-label-row span{display:block;font-size:11px;line-height:1.35;color:#8a97a3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.yandex-label .cluster-label-row.more, .marker-label .cluster-label-row.more{min-height:44px;font-size:12px;color:#687581}

/* Variant 4: full-screen map with bottom carousel (mobile map view only) */
.map-carousel{display:none}
@media(max-width:900px){
  body.map-view main{padding:0;max-width:none}
  body.map-view .topbar{position:fixed;top:0;left:0;right:0;z-index:600;background:#fffffff2;backdrop-filter:blur(14px);height:48px}
  body.map-view .toolbar{position:fixed;top:48px;left:0;right:0;z-index:700;background:#fffffff2;backdrop-filter:blur(14px);padding:10px 10px 4px;margin:0}
  /* Suggestions hang below the search field: the toolbar must stack above
     the fixed chips/status rows (both z-index 600, later in the DOM),
     otherwise the dropdown is painted underneath them and looks missing. */
  body.map-view .quick-filters{position:fixed;top:102px;left:0;right:0;z-index:600;background:#fffffff2;backdrop-filter:blur(14px);padding:0 10px 10px;margin:0}
  body.map-view{background:#fff}
  body.map-view .workspace{background:#e2f1eb}
  body.map-view .map-wrap{background:#e2f1eb}
  body.map-view .bottom-nav{background:#fff;padding:8px 8px 0}
  body.map-view .nav-btn{padding-bottom:0}
  body.map-view .toolbar .search-wrap{flex-basis:auto}
  body.map-view .sort-row,body.map-view .site-footer{display:none!important}
  body.map-view .status-row{display:flex!important;position:fixed;top:144px;left:10px;right:10px;z-index:600;background:#fffffff2;backdrop-filter:blur(14px);border:1px solid var(--line);border-radius:12px;padding:8px 12px;margin:0;box-shadow:0 3px 12px #24334412}
  body.map-view .status-row strong{font-size:13px}
  body.map-view .status-row span{font-size:11px;max-width:60%;text-align:right}
  body.map-view .workspace{display:flex;flex-direction:column;height:calc(100dvh - 69px);min-height:0}
  body.map-view .map-wrap{flex:1 1 auto;min-height:0;height:auto;border-radius:0;box-shadow:none}
  body.map-view .workspace #map{height:100%;min-height:0}
  body.map-view #map>div{height:100%!important;width:100%!important}
  body.map-view .leaflet-control-zoom{margin-top:158px!important}
  body.map-view .map-carousel{display:block;flex:0 0 auto;background:#fff;border-top:1px solid var(--line);padding:4px 0 8px 10px;position:relative;z-index:500}
  .map-carousel-head{display:flex;align-items:center;gap:8px;padding-right:10px;margin-bottom:0}
  .map-carousel-head strong{font-size:15px}
  .map-carousel-head span{font-size:12px;color:var(--muted)}
  .map-carousel-head button{margin-left:auto;border:0;background:transparent;color:var(--green-dark);font-weight:750;font-size:13px;white-space:nowrap}
  .map-carousel-track{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;padding:2px 10px 4px 0;-webkit-overflow-scrolling:touch}
  .map-carousel-track .event-card{flex:0 0 272px;max-width:82vw;margin:0;scroll-snap-align:start}
  .map-carousel-empty{flex:1 0 100%}
  .map-carousel-handle{width:28px;height:4px;border-radius:4px;background:#cbd5e1;margin:0;flex-shrink:0;cursor:grab}
  body.map-view .map-carousel.collapsed{padding-bottom:8px}
  .map-carousel.collapsed .map-carousel-track{display:none}
  .map-carousel-head button#map-carousel-toggle{margin-left:8px;width:32px;height:32px;border-radius:50%;background:#f0f4f7;color:#526170;display:grid;place-items:center;font-size:13px}
  body.map-view .workspace,body.map-view .map-wrap,body.map-view .map-carousel{transition:none}
  .map-carousel-track .event-card{padding:12px}
  .map-carousel-track .event-title{font-size:15px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .map-carousel-track .event-meta-rows{padding:8px 10px;gap:6px;margin-top:8px}
  .map-carousel-track .event-meta-row{font-size:13px}
  .map-carousel-track .card-footer{margin-top:8px;padding-top:8px}
  .map-carousel-track .event-price{font-size:13px}
}

/* New features v28: nearby, calendar, new/changed, detail extras, favorites share */
#nearby-btn.active{background:#e4fbf2;border-color:#8bd9bf;color:var(--green-dark)}
.badge-new{display:inline-block;background:#e4fbf2;color:#07805c;border-radius:20px;padding:3px 7px;font-size:10px;font-weight:750;white-space:nowrap}
.badge-changed{display:inline-block;background:#fff3e0;color:#b65a23;border-radius:20px;padding:3px 7px;font-size:10px;font-weight:750;white-space:nowrap}
.event-distance{font-size:12px;color:#0caf83;font-weight:650;margin-top:6px}
.calendar-panel{max-width:900px;margin:0 auto;padding:6px 10px 90px}
.cal-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.cal-header h2{margin:0;font-size:17px}
.cal-header button{border:1px solid var(--line);background:#fff;border-radius:12px;padding:8px 12px;font-size:15px}
.cal-weekdays,.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center}
.cal-weekdays span{font-size:11px;color:var(--muted);padding:2px 0}
.cal-day{border:1px solid var(--line);background:#fff;border-radius:10px;padding:6px 2px;min-height:36px;display:flex;flex-direction:column;align-items:center;gap:1px;font-size:13px}
body.calendar-view .sort-row{display:none}
.cal-day.has-events{border-color:#8bd9bf;background:#e4fbf2}
.cal-day.selected{background:#0caf83;color:#fff;border-color:#0caf83}
.cal-day i{font-style:normal;font-size:10px;background:#2563eb;color:#fff;border-radius:10px;padding:1px 6px}
.cal-day.selected i{background:#fff;color:#0caf83}
.cal-empty{border:0;background:transparent}
.cal-selected{animation:calFade .25s ease}
@keyframes calFade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.cal-selected h3{font-size:15px;margin:12px 0 8px}
.cal-hint{color:var(--muted);font-size:13px}
.detail-countdown{font-size:15px;font-weight:750;color:#0caf83;margin:6px 0}
.detail-distance{font-size:13px;color:#0caf83;font-weight:650;margin:6px 0}
.weather-note{color:var(--muted);font-size:11px}
.detail-similar{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.similar-item{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;border:1px solid var(--line);background:#fafbfc;border-radius:12px;padding:10px;width:100%}
.similar-item span{font-size:12px;color:var(--muted)}
.fav-share-btn{border:1px solid var(--line);background:#fff;border-radius:12px;padding:8px 10px;font-size:12px;font-weight:650;color:var(--green-dark);white-space:nowrap}
.panel-heading{flex-wrap:wrap;gap:8px}
.detail-actions{grid-template-columns:repeat(2,1fr)}

/* Compact rounded marker popup: Yandex custom balloon + Leaflet fallback */
.ymap-balloon{position:relative;background:#fff;border-radius:16px;box-shadow:0 8px 24px #17212b2e;padding:12px 14px;width:max-content;max-width:min(280px,calc(100vw - 40px))}
.ymap-balloon-close{position:absolute;top:6px;right:8px;border:0;background:#f0f3f6;border-radius:50%;width:26px;height:26px;font-size:18px;line-height:1;color:#667586;cursor:pointer}
.ymap-balloon .multi-popup{min-width:0;max-width:none}
.leaflet-popup-content-wrapper{border-radius:16px;box-shadow:0 8px 24px #17212b2e}
.leaflet-popup-content{margin:11px 14px}
.leaflet-popup-content .popup-title{padding-right:16px}

/* Loading animation shown in place of the map until the first render */
.map-loading{position:absolute;inset:0;z-index:450;display:grid;place-items:center;background:linear-gradient(135deg,#e4fbf2,#d8eee7 45%,#eef7f3);background-size:200% 200%;animation:map-loading-bg 6s ease-in-out infinite alternate;transition:opacity .45s ease}
.map-loading.done{opacity:0;pointer-events:none}
.map-loading-inner{display:flex;flex-direction:column;align-items:center;gap:14px}
.map-loading-pin{position:relative;width:84px;height:84px;display:grid;place-items:center}
.map-loading-runner{position:relative;z-index:1;font-size:44px;animation:map-loading-bounce 1.6s ease-in-out infinite}
.map-loading-ripple{position:absolute;inset:0;border-radius:50%;border:2px solid #0caf8355;animation:map-loading-ripple 2s ease-out infinite}
.map-loading-ripple.r2{animation-delay:1s}
.map-loading-text{font-size:14px;font-weight:650;color:#246653;text-align:center;padding:0 16px}
.map-loading-text.swap{animation:map-loading-text-in .35s ease}
@keyframes map-loading-text-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.map-loading-bar{width:160px;height:6px;border-radius:20px;background:#ffffffaa;overflow:hidden;box-shadow:inset 0 0 0 1px #0caf8322}
.map-loading-bar span{display:block;height:100%;width:40%;border-radius:20px;background:linear-gradient(90deg,#0caf83,#34d399);animation:map-loading-bar 1.2s ease-in-out infinite}
@keyframes map-loading-bg{from{background-position:0% 50%}to{background-position:100% 50%}}
@keyframes map-loading-bounce{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-8px) scale(1.05)}}
@keyframes map-loading-ripple{0%{transform:scale(.6);opacity:1}100%{transform:scale(1.4);opacity:0}}
@keyframes map-loading-bar{0%{transform:translateX(-100%)}100%{transform:translateX(400%)}}

/* Selected marker highlight (Leaflet fallback; Yandex pins scale via options) */
.leaflet-marker-icon.pin-selected{z-index:1000!important}
.leaflet-marker-icon.pin-selected img{filter:drop-shadow(0 4px 8px rgba(23,33,43,.35))}
.leaflet-marker-icon.pin-selected .sport-marker{transform:scale(1.25);transform-origin:50% 100%}

/* Detail sheet v43: compact single-row actions, status + participants side by side */
.detail-actions{display:flex;gap:6px;margin:14px 0}
.detail-actions a,.detail-actions button{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:54px;padding:8px 2px;font-size:10px;font-weight:700;white-space:nowrap}
.detail-action-icon{font-size:16px;line-height:1}
.detail-status-row{display:flex;gap:10px;margin-top:10px;align-items:stretch}
.detail-status-row .detail-info{margin-top:0;flex:1;display:flex;align-items:center}
.detail-status-row .detail-status strong{margin-bottom:0}
.detail-status-row .detail-participants-box{margin-top:0;flex:1}

/* Consistent section headings site-wide: green accent bar + bold dark text,
   so a heading never blends into the content below it. Status blocks keep
   their own colours and are excluded. */
.stats-card h3{border-left:4px solid var(--green);padding-left:10px;font-size:17px}
.stats-header h2{border-left:4px solid var(--green);padding-left:10px}
.panel-heading strong{border-left:4px solid var(--green);padding-left:10px}
.cal-header h2{border-left:4px solid var(--green);padding-left:10px}
.detail-info:not(.detail-status)>strong{font-size:15px;font-weight:800;color:#0f172a;border-left:4px solid var(--green);padding-left:10px}
.detail-info .detail-distances-title{text-transform:none;letter-spacing:-.2px;font-size:15px;color:#0f172a}

/* Headings v45: badge pills instead of the v44 accent bar — colour, background
   and shape now differ from the content, not just weight. The page title
   keeps its size and gets the green colour. */
.stats-card h3{display:inline-block;background:#e4fbf2;border:1px solid #8bd9bf;color:#08795f;border-radius:20px;padding:5px 12px;font-size:15px}
.stats-header h2{color:#08795f}
.panel-heading strong{display:inline-block;background:#e4fbf2;border:1px solid #8bd9bf;color:#08795f;border-radius:20px;padding:5px 12px}
.cal-header h2{display:inline-block;background:#e4fbf2;border:1px solid #8bd9bf;color:#08795f;border-radius:20px;padding:5px 12px;font-size:15px}
.detail-info:not(.detail-status)>strong{display:inline-block;background:#e4fbf2;border:1px solid #8bd9bf;color:#08795f;border-radius:20px;padding:5px 12px;font-size:14px}
.detail-info .detail-distances-title{text-transform:none;letter-spacing:0;font-size:14px;color:#08795f}

/* Admin mode: temporary, in-memory only, gone on page refresh. The topbar
   smile replaces the old reload button; admin UI appears only in admin mode. */
.admin-badge{display:none;background:#17212b;color:#fff;border-radius:20px;padding:6px 10px;font-size:12px;font-weight:750}
body.admin-mode .admin-badge{display:inline-block}
.admin-exit-btn{display:none;border:1px solid #f5c2c2;background:#ffe9e9;color:#b91c1c;border-radius:12px;padding:8px 10px;font-size:12px;font-weight:700}
body.admin-mode .admin-exit-btn{display:inline-block}
.admin-float{display:none}
body.admin-mode .admin-float{display:flex;position:fixed;right:12px;bottom:calc(96px + env(safe-area-inset-bottom));z-index:950;flex-direction:column;gap:8px}
.admin-float button,.admin-float a{width:48px;height:48px;display:grid;place-items:center;background:#fff;border:1px solid var(--line);border-radius:50%;box-shadow:0 4px 14px #24334422;font-size:22px;color:#243447;text-decoration:none}
.admin-float button:active,.admin-float a:active{background:#e4fbf2}
@media(min-width:901px){body.admin-mode .admin-float{bottom:20px}}
/* Admin-only UI (2026-10-30): the stats tab, the map settings cluster
   and the "N мероприятий" status plaque are hidden for ordinary
   visitors; admins see them after the 5-tap smile entry. */
body:not(.admin-mode) .nav-btn[data-view="stats"]{display:none!important}
body:not(.admin-mode) .status-row{display:none!important}
body:not(.admin-mode) .map-settings-btn,body:not(.admin-mode) .map-settings-panel,body:not(.admin-mode) .map-settings-collapse-btn,body:not(.admin-mode) .map-settings-expand-btn{display:none!important}
.badge-admin{display:inline-block;background:#ede9fe;color:#6a42a3;border-radius:20px;padding:3px 7px;font-size:10px;font-weight:750;white-space:nowrap}
.detail-admin-actions{display:flex;gap:8px;margin:14px 0;flex-wrap:wrap}
.detail-admin-actions button{border:1px dashed #c2d6fb;background:#f4f7ff;color:#1d4ed8;border-radius:12px;padding:9px 12px;font-size:12px;font-weight:700}
.detail-badges{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 2px}
.detail-approx{margin-top:10px;font-size:12px;line-height:1.5;color:#8a6d1b;background:#fef9e7;border:1px solid #fde68a;border-radius:10px;padding:8px 11px}
.badge-adminmark{display:inline-flex;align-items:center;gap:3px;border-radius:20px;padding:4px 9px;font-size:11px;font-weight:800;white-space:nowrap;border:1px solid transparent;box-shadow:0 1px 4px #23334414}
.badge-mark-visited{background:#e4fbf2;color:#08795f;border-color:#8bd9bf}
.badge-mark-new{background:#e0f2fe;color:#0369a1;border-color:#7dd3fc}
.badge-mark-top{background:linear-gradient(135deg,#fef9c3,#fde68a);color:#92400e;border-color:#fcd34d}
.badge-mark-pinned{background:linear-gradient(135deg,#fff7ed,#ffedd5);color:#c2410c;border-color:#fdba74}
.detail-admin-badges{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:0 0 14px;font-size:12px;color:var(--muted);font-weight:650}
.detail-admin-badges button{border:1px solid var(--line);background:#fff;border-radius:20px;padding:6px 10px;font-size:12px;font-weight:650;color:var(--muted)}
.detail-admin-badges button.on{background:#e4fbf2;border-color:#8bd9bf;color:#08795f}
.detail-diag{border-left:4px solid #f59e0b;background:#fffbeb}
.diag-log{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;line-height:1.6;color:#78350f;margin-top:6px}
.admin-mass{display:flex;flex-direction:column;gap:8px;margin:8px 0 16px}
.admin-mass-row{display:flex;justify-content:space-between;align-items:center;gap:8px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;font-size:13px;font-weight:650}
.admin-mass-row .row{display:flex;gap:6px;flex-shrink:0}
.admin-mass-row button,.admin-mass-row select{border:1px solid var(--line);background:#fff;border-radius:10px;padding:7px 10px;font-size:12px;font-weight:650}
.admin-problem-tags{font-size:12px;color:#b65a23;font-weight:650;max-width:140px}
.admin-form{display:flex;flex-direction:column;gap:12px}
.admin-form label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--muted);font-weight:650}
.admin-form input,.admin-form select,.admin-form textarea{border:1px solid var(--line);border-radius:10px;padding:10px;font-size:14px;color:#243447;background:#fff}
.admin-form textarea{min-height:70px;resize:vertical}
.admin-form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.admin-dist-row{display:flex;gap:8px}
.admin-dist-row input:first-child{flex:1}
.admin-dist-row input:nth-child(2){width:110px}
.admin-dist-row button{border:1px solid var(--line);background:#fff;border-radius:10px;padding:0 12px;font-size:16px;color:#b91c1c}
.admin-form-actions{display:flex;gap:8px;flex-wrap:wrap}
.admin-form-actions .primary{background:var(--green);color:#fff;border:0;border-radius:12px;padding:12px 16px;font-weight:750}
.admin-form-actions button:not(.primary){border:1px solid var(--line);background:#fff;border-radius:12px;padding:12px 14px;font-weight:650}
.admin-note{font-size:12px;color:var(--muted);line-height:1.5;margin:0 0 14px}
.admin-section{font-size:15px;font-weight:800;margin:16px 0 8px}
.admin-list{display:flex;flex-direction:column;gap:8px;margin:8px 0 16px}
.admin-list-item{display:flex;justify-content:space-between;align-items:center;gap:8px;border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.admin-list-item strong{font-size:13px;line-height:1.3}
.admin-list-item span{font-size:12px;color:var(--muted)}
.admin-list-item .row{display:flex;gap:6px;flex-shrink:0}
.admin-list-item .row button{border:1px solid var(--line);background:#fff;border-radius:10px;padding:7px 10px;font-size:12px;font-weight:650}

/* Desktop navigation (v76): the bottom nav is hidden above 900px, so wide
   screens get their own tab row reusing the same .nav-btn switching. */
.desktop-nav{display:none}
@media(min-width:901px){
  .desktop-nav{display:flex;gap:8px;margin:2px 0 12px}
  .desktop-nav .nav-btn{flex:0 0 auto;border:1px solid var(--line);background:#fff;border-radius:20px;padding:9px 16px;display:flex;align-items:center;gap:7px;color:#526170;font-size:14px;font-weight:650}
  .desktop-nav .nav-btn span{font-size:17px;line-height:1}
  .desktop-nav .nav-btn.active{background:#e4fbf2;border-color:#8bd9bf;color:var(--green-dark)}
  /* Full-width list on desktop: hide the map column, list takes the row. */
  .workspace.list-mode, .workspace.favorites-mode{grid-template-columns:1fr;height:calc(100vh - 180px)}
  .workspace.list-mode .map-wrap, .workspace.favorites-mode .map-wrap{display:none}
}

/* Archive Top-10: clickable athlete names and win/podium counts. */
.arch-athlete{border:0;background:transparent;padding:0;font:inherit;font-weight:750;color:#17212b;cursor:pointer;text-align:left}
.arch-athlete:hover{color:var(--green-dark);text-decoration:underline}
.arch-filter{border:0;background:transparent;padding:0;font:inherit;color:#687581;cursor:pointer}
.arch-filter:hover{color:var(--green-dark);text-decoration:underline}
/* Wins/podiums pills under athlete names (top-10 and strugglers). */
.arch-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 9px;border:1px solid;border-radius:20px;font-size:12px;font-weight:700;white-space:nowrap;vertical-align:middle}
.arch-pill-win{background:#fff8d6;border-color:#e8c547;color:#7a5b00}
.arch-pill-podium{background:#e4fbf2;border-color:#8bd9bf;color:#08795f}
.arch-pill-zero{background:#f1f3f5;border-color:#d9dee3;color:#8a94a0}
.arch-filter.arch-pill-win:hover{color:#7a5b00;text-decoration:none}
.arch-filter.arch-pill-podium:hover{color:#08795f;text-decoration:none}
.arch-filter.arch-pill-zero:hover{color:#8a94a0;text-decoration:none}

/* Athlete results window (reuses the detail modal shell). */
.ath-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.ath-tab{border:1px solid var(--line);background:#fff;border-radius:20px;padding:7px 13px;font-size:13px;font-weight:650;color:#526170}
.ath-tab.active{background:#e4fbf2;border-color:#8bd9bf;color:var(--green-dark)}
.ath-row{display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-top:1px solid #f0f2f5}
.ath-row-date{flex-shrink:0;color:#687581;white-space:nowrap}
.ath-row-title{flex:1;min-width:0}
.ath-row-time{flex-shrink:0;color:#687581;white-space:nowrap}
.ath-row-place{flex-shrink:0;font-weight:800;border-radius:20px;padding:2px 9px;background:#f0f3f6;color:#243447}
.ath-stats{display:flex;gap:8px;margin:12px 0}
.ath-stat{flex:1;background:#e4fbf2;border:1px solid #8bd9bf;border-radius:16px;padding:10px 8px;text-align:center}
.ath-stat strong{display:block;font-size:26px;line-height:1.1;color:#08795f}
.ath-stat span{font-size:12px;font-weight:650;color:#526170}
.ath-stat-win{background:#fdf6d8;border-color:#e8c96a}
.ath-stat-win strong{color:#8a6d00}
.ath-num{flex-shrink:0;width:40px;text-align:right;font-size:12px;color:#9ba6af;padding-top:2px}
.ath-main{flex:1;min-width:0}
.ath-topline{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.ath-row-title{font-weight:750;font-size:14px;line-height:1.35;color:#1d2a35}
.ath-place-1{background:#fdf3c9;color:#8a6d00}
.ath-place-2{background:#e9edf2;color:#526170}
.ath-place-3{background:#fbeedf;color:#8a5a23}
.ath-meta{display:block;font-size:12px;color:#687581;margin-top:3px}

/* Stars block in archive statistics. */
.stars-sport{margin-top:16px}
.stars-sport-title{display:inline-block;background:#e4fbf2;border:1px solid #8bd9bf;color:#08795f;border-radius:20px;padding:8px 16px;margin:0 0 10px;font-size:17px;font-weight:800}
.stars-sport + .stars-sport{margin-top:24px;border-top:1px solid #eef1f4;padding-top:20px}
.stars-gender{margin-bottom:12px}
.stars-gender h5{margin:16px 0 10px;font-size:16px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:#17212b}
.stars-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.stars-row .star-card{min-width:0;max-width:none}
.stars-row .star-card:first-child:nth-last-child(n+3){grid-column:1 / -1}
.stars-row .star-card:only-child{grid-column:1 / -1}
.star-card{flex:1;min-width:150px;max-width:220px;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;background:#f7f9fb;border:1px solid #eef1f4;border-radius:16px;padding:14px 10px;text-decoration:none;color:inherit;position:relative}
.star-card.star-1{border-color:#f0c75e;background:#fffaf0}
.star-card.star-2{border-color:#cfd6dd;background:#f8fafc}
.star-card.star-3{border-color:#e0b48c;background:#fff7f2}
.star-medal{font-size:20px;line-height:1}
.star-photo{width:64px;height:64px;border-radius:50%;object-fit:cover;background:#e4fbf2}
.star-initials{display:grid;place-items:center;font-size:20px;font-weight:800;color:#08795f}
.star-name{font-size:14px;line-height:1.3}
.star-meta{font-size:12px;color:#687581;line-height:1.4}

/* Bulk-load progress bar on the archive statistics tab. */
.progress-bar{height:12px;background:#eef1f4;border-radius:8px;overflow:hidden;margin:10px 0}
.progress-fill{height:100%;background:#0caf83;border-radius:8px;transition:width .5s ease}

/* Compact stars (v80): three sports only, men/women side by side on desktop. */
.stars-sport{margin-top:12px}
.stars-genders{display:grid;gap:10px}
@media(min-width:901px){.stars-genders{grid-template-columns:1fr 1fr}}
.stars-gender{margin-bottom:0}
.stars-row{gap:8px}
.star-card{min-width:120px;max-width:190px;padding:10px 8px;gap:4px}
.star-photo{width:48px;height:48px}
.star-name{font-size:13px}
.star-meta{font-size:11px}

/* Records (v80): designed rows, distances ascending. */
.record-row{display:flex;gap:12px;align-items:center;padding:11px 12px;border:1px solid #eef1f4;border-radius:14px;margin:8px 0;text-decoration:none;color:inherit;background:#fbfdfc}
.record-dist{flex-shrink:0;background:#e4fbf2;border:1px solid #8bd9bf;color:#08795f;font-weight:800;font-size:13px;border-radius:20px;padding:6px 11px;white-space:nowrap}
.record-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.record-time{font-size:20px;color:#07805c}
.record-name{font-size:13px;font-weight:700}
.record-event{margin-left:auto;text-align:right;font-size:12px;color:#687581;max-width:45%}
/* Records compact rows (v84): two lines — name and event wrap fully,
   no ellipsis: on a phone every name was cut to a couple of letters. */
.record-compact{flex-direction:column;align-items:stretch;padding:8px 10px;gap:3px;margin:5px 0}
.record-compact .record-topline{display:flex;gap:10px;align-items:center;min-width:0}
.record-compact .record-time{font-size:15px;white-space:nowrap}
.record-compact .record-name{font-size:13px;font-weight:700;overflow-wrap:anywhere;min-width:0}
.record-compact .record-name.record-noname{font-weight:400;font-style:italic;color:#8a97a3}
.record-compact .record-event{max-width:none;margin-left:0;text-align:left;font-size:12px;white-space:normal;overflow-wrap:anywhere}

/* RESTYLE v92 (option A, 2026-10-26): gdebenz-style look, logic unchanged.
   Full-screen map + floating panels on desktop map view, cluster bubbles
   on both engines, floating pill bottom menu on all widths. The desktop
   tab row is hidden: the bottom menu now serves every width (JS toggles
   .active on all .nav-btn, so hiding one nav is safe). */
.map-cluster-bubble{display:flex;align-items:center;justify-content:center;border-radius:999px;background:rgba(16,23,35,.94);border:2px solid rgba(45,212,117,.85);color:#fff;font-weight:700;box-shadow:0 0 14px rgba(45,212,117,.35),0 4px 12px rgba(0,0,0,.45)}
.map-cluster-bubble span{line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.leaflet-marker-icon.pin-selected .map-cluster-bubble{transform:scale(1.25)}
.toast{bottom:88px}
.bottom-nav{display:flex;position:fixed;left:50%;transform:translateX(-50%);right:auto;bottom:12px;z-index:900;width:max-content;max-width:calc(100vw - 24px);background:#fffffff2;backdrop-filter:blur(14px);border:1px solid var(--line);border-radius:999px;box-shadow:0 8px 28px rgba(18,28,46,.18);padding:6px}
.bottom-nav .nav-btn{flex:0 0 auto;padding:8px 14px}
.desktop-nav{display:none}
@media(max-width:900px){
  main{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
  body.map-view .workspace{height:calc(100dvh - 88px)}
  body.map-view .map-carousel{border-radius:16px 16px 0 0}
  .bottom-nav .nav-btn{flex:1 1 0;min-width:0;padding:6px 2px;font-size:10px}
  .bottom-nav .nav-btn span{font-size:19px}
}
@media(min-width:901px){
  body.map-view main{max-width:none;padding:0}
  body.map-view .topbar{position:fixed;top:12px;left:12px;z-index:600;height:52px;width:auto;border:1px solid var(--line);border-radius:16px;box-shadow:0 8px 28px rgba(18,28,46,.18);background:#fffffff2;backdrop-filter:blur(14px);padding:0 14px}
  body.map-view .float-panel{position:fixed;top:76px;left:12px;width:392px;z-index:600;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 8px 28px rgba(18,28,46,.18);padding:12px 12px 8px}
  body.map-view .float-panel .toolbar{margin-bottom:8px}
  body.map-view .float-panel .quick-filters{padding-bottom:8px}
  body.map-view .float-panel .sort-row{margin-bottom:8px}
  body.map-view .float-panel .status-row{margin:4px 2px 2px}
  body.map-view .float-panel .status-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body.map-view .workspace{display:block;height:auto}
  body.map-view .map-wrap{position:fixed;inset:0;z-index:0;border-radius:0;box-shadow:none}
  body.map-view .workspace #map{height:100%;min-height:0}
  body.map-view #map>div{height:100%!important;width:100%!important}
  body.map-view .side-panel{position:fixed;left:12px;top:282px;bottom:92px;width:392px;z-index:600;box-shadow:0 8px 28px rgba(18,28,46,.18)}
  body.map-view .site-footer{display:none}
}

/* v92 fix: mobile map-view rules outrank the pill rules by specificity,
   so the pill needs its own scoped overrides there; safe-area aware. */
.bottom-nav{bottom:calc(12px + env(safe-area-inset-bottom))}
.toast{bottom:calc(96px + env(safe-area-inset-bottom))}
@media(max-width:900px){
  body.map-view .bottom-nav{background:#fffffff2;backdrop-filter:blur(14px);padding:6px}
  body.map-view .bottom-nav .nav-btn{padding:6px 2px}
}

/* v92 fixes (2026-10-26, from phone screenshots).
   1. Pill overlap: flex:1 1 0 squeezed every button to the same width,
   narrower than "Календарь"/"Статистика" need, so the labels ran into
   each other. Natural widths fix it (the pill still fits 320px screens).
   2. The favorites count sat on its own row (column flex); keep it
   inline with the label so all buttons are the same height.
   3. Mobile map view: the top strips were full-width and separate;
   make them one floating card like the mockup (brand card floats
   separately above it), and push the Leaflet zoom below the stack. */
.nav-btn .nav-label{display:flex;align-items:center;gap:3px;white-space:nowrap}
@media(max-width:900px){
  .bottom-nav .nav-btn{flex:0 0 auto;white-space:nowrap}
  body.map-view .topbar{top:12px;left:12px;right:12px;border:1px solid var(--line);border-radius:16px;box-shadow:0 8px 28px rgba(18,28,46,.18)}
  body.map-view .toolbar{top:68px;left:12px;right:12px;border:1px solid var(--line);border-bottom:0;border-radius:16px 16px 0 0}
  body.map-view .quick-filters{top:122px;left:12px;right:12px;border-left:1px solid var(--line);border-right:1px solid var(--line)}
  body.map-view .status-row{top:160px;left:12px;right:12px;border-radius:0 0 16px 16px;box-shadow:0 8px 28px rgba(18,28,46,.18)}
  body.map-view .leaflet-control-zoom{margin-top:208px!important}
}

/* v92 fix 2 (2026-10-26, "перекосило"): the 19px icon-span rule also hit
   the new .nav-label span, blowing "Избранное" up to icon size and
   skewing the pill. Pin the label back to the button's text size.
   Also: the narrower search card clipped the placeholder, so the map-view
   search input gets 14px and the Nearby button loses a little padding. */
.bottom-nav .nav-btn .nav-label{font-size:10px}
@media(max-width:900px){
  body.map-view .toolbar .search-wrap input{font-size:14px}
  body.map-view .toolbar .secondary-btn{padding:10px 9px}
}

/* v92 glass + full-height map (2026-10-26).
   Top: the search/filter stack goes transparent (glass) — the map shows
   through between the elements, and each element is highlighted on its
   own: solid white search field, buttons and chips with shadows, the
   status as a white pill. The brand bar stays a solid card.
   Bottom (mobile map view): the map now runs the full viewport height
   behind the pill menu; the "На карте" sheet becomes a floating card
   above the pill (tap/swipe expand still work, they only toggle
   .collapsed). Labels toggle and hint move above the floating sheet;
   the toggle hides while the sheet is expanded (modern :has(), ignored
   by older browsers where it simply stays visible). */
@media(max-width:900px){
  body.map-view .toolbar{background:transparent;border:0;box-shadow:none;backdrop-filter:none}
  body.map-view .quick-filters{background:transparent;border:0;backdrop-filter:none}
  body.map-view .status-row{background:#fff;border-radius:12px}
  body.map-view .toolbar .search-wrap{box-shadow:0 4px 14px rgba(18,28,46,.15)}
  body.map-view .toolbar .secondary-btn{box-shadow:0 4px 14px rgba(18,28,46,.15)}
  body.map-view .quick-filters .sport-chip{box-shadow:0 2px 8px rgba(18,28,46,.10)}
  body.map-view .workspace{height:100dvh}
  body.map-view .map-carousel{position:fixed;left:12px;right:12px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:500;border:1px solid var(--line);border-radius:16px;box-shadow:0 8px 28px rgba(18,28,46,.18)}
  body.map-view .map-label-toggle{bottom:calc(150px + env(safe-area-inset-bottom))}
  body.map-view .map-hint{bottom:calc(150px + env(safe-area-inset-bottom));left:12px}
  body.map-view .workspace:has(.map-carousel:not(.collapsed)) .map-label-toggle{display:none}
}
@media(min-width:901px){
  body.map-view .float-panel{background:transparent;border:0;box-shadow:none}
  body.map-view .float-panel .search-wrap{box-shadow:0 4px 14px rgba(18,28,46,.15)}
  body.map-view .float-panel .sport-chip{box-shadow:0 2px 8px rgba(18,28,46,.10)}
  body.map-view .float-panel .sort-label select{box-shadow:0 2px 8px rgba(18,28,46,.10)}
  body.map-view .float-panel .status-row{background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px 12px;box-shadow:0 3px 12px rgba(36,51,68,.07)}
  body.map-view .map-hint{bottom:92px}
}

/* PC layout 2026-10-28, second user correction (supersedes the
   left-column alignment above): desktop map view stays full-screen,
   the bottom pill menu stays, desktop-nav stays hidden.
   New geometry, all margins 12, all panels width 392:
   - header (topbar) centred: left 50% + translateX(-50%), top 12.
   - filter (float-panel) centred under the header: same left/width,
     top 76 (12 + 52 + 12), solid white card, chips wrap to two rows.
   - list (side-panel) on the RIGHT: right 12, bottom 92, width 392.
     At wide screens (>=1200px) its top is 12, level with the header,
     with no overlap (centred 392 + right 392 need 1200px). At
     narrower desktop widths JS (alignDesktopPanels) moves it below
     the filter (filter bottom + 12) so it never covers the filter;
     CSS top 12 is the wide-screen default, JS only moves it down.
   - bottom pill menu, restyled (was flat and ragged): a real dock,
     white with blur, border, strong shadow, padding 6, gap 4,
     buttons equal width, icon above an 11px label (favorites label
     was 10px, which made that button look smaller), active button
     solid green with white text instead of a near-white wash.
   - "Подписи" toggle and map-engine button move to the BOTTOM LEFT
     (84 / 132, left 12), because the right side is now the list;
     the map hint moves above them (bottom 180, left 12).
   Mobile (<=900px) rules are untouched except the engine button. */
.map-engine-btn{position:absolute;right:10px;bottom:96px;z-index:700;display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #e4e9ee;border-radius:20px;box-shadow:0 3px 12px #24334412;padding:10px 12px;font-size:13px;font-weight:650;color:#17212b;white-space:nowrap}
@media(max-width:900px){
  .map-engine-btn{bottom:198px}
  body.map-view .workspace:has(.map-carousel:not(.collapsed)) .map-engine-btn{display:none}
}
@media(min-width:901px){
  .desktop-nav{display:none}
  body.map-view main{max-width:none;padding:0}
  body.map-view .topbar{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:600;height:52px;width:392px;box-sizing:border-box;border:1px solid var(--line);border-radius:16px;box-shadow:0 8px 28px rgba(18,28,46,.18);background:#fffffff2;backdrop-filter:blur(14px);padding:0 14px}
  body.map-view .float-panel{position:fixed;top:76px;left:50%;transform:translateX(-50%);width:392px;box-sizing:border-box;z-index:600;background:#ffffffb8;border:1px solid var(--line);border-radius:16px;box-shadow:0 8px 28px rgba(18,28,46,.18);backdrop-filter:blur(14px);padding:12px 12px 8px}
  body.map-view .float-panel .toolbar{margin-bottom:8px}
  body.map-view .float-panel .quick-filters{flex-wrap:wrap;overflow-x:visible;padding-bottom:8px}
  body.map-view .float-panel .search-wrap{box-shadow:none}
  body.map-view .float-panel .sport-chip{box-shadow:none}
  body.map-view .float-panel .sort-label select{box-shadow:none}
  body.map-view .float-panel .sort-row{margin-bottom:8px}
  body.map-view .float-panel .status-row{margin:4px 2px 2px;background:transparent;border:0;border-radius:0;padding:0;box-shadow:none}
  body.map-view .float-panel .status-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body.map-view .workspace{display:block;height:auto}
  body.map-view .map-wrap{position:fixed;inset:0;z-index:0;border-radius:0;box-shadow:none}
  body.map-view .workspace #map{height:100%;min-height:0}
  body.map-view #map>div{height:100%!important;width:100%!important}
  body.map-view .side-panel{position:fixed;left:auto;right:12px;top:12px;bottom:92px;width:392px;box-sizing:border-box;z-index:600;box-shadow:0 8px 28px rgba(18,28,46,.18)}
  body.map-view .map-carousel{display:none}
  body.map-view .site-footer{display:none}
  body.map-view .bottom-nav{left:50%;transform:translateX(-50%);bottom:calc(16px + env(safe-area-inset-bottom));width:max-content;max-width:calc(100vw - 24px);background:#fffffff5;border:1px solid var(--line);border-radius:999px;box-shadow:0 12px 32px rgba(18,28,46,.22);padding:6px;gap:4px}
  body.map-view .bottom-nav .nav-btn{flex:1 1 0;min-width:0;padding:8px 12px;white-space:nowrap;display:flex;flex-direction:column;align-items:center;gap:2px;border-radius:999px;border:0;background:transparent;color:#687789;font-size:11px;font-weight:700}
  body.map-view .bottom-nav .nav-btn span{font-size:20px;line-height:1}
  body.map-view .bottom-nav .nav-btn .nav-label{font-size:11px;line-height:1.2;display:flex;align-items:center;gap:3px;white-space:nowrap}
  body.map-view .bottom-nav .nav-btn .nav-label i{font-size:11px;font-weight:750;font-style:normal}
  body.map-view .bottom-nav .nav-btn.active{background:#0caf83;color:#fff;box-shadow:0 4px 14px rgba(12,175,131,.35)}
  body.map-view .map-label-toggle{bottom:84px;left:12px;right:auto}
  body.map-view .map-engine-btn{bottom:132px;left:12px;right:auto}
  body.map-view .map-hint{bottom:180px;left:12px}
}
/* Ratings (2026-10-28): stars in the detail sheet, rows in stats. */
.rating-avg{font-size:15px;font-weight:750;margin:8px 0 4px}
.rating-stars{display:flex;gap:4px;margin:8px 0}
.rating-star{border:1px solid var(--line);background:#fff;border-radius:12px;width:44px;height:40px;font-size:22px;line-height:1;color:#9ba6af}
.rating-star.on{background:#e4fbf2;border-color:#8bd9bf;color:#0caf83}
.rating-row{display:block;width:100%;text-align:left;border:0;background:transparent;padding:8px 0;cursor:pointer;border-bottom:1px solid #f0f2f5}
.rating-row-plain{cursor:default}
.rating-row .arch-topline{display:flex;justify-content:space-between;gap:10px}
.rating-row .arch-name{font-size:14px;font-weight:650}
.rating-row .arch-count{font-size:13px;white-space:nowrap}
.rating-row .arch-meta{display:block;font-size:12px;color:#718096;margin-top:2px}
/* List collapse 2026-10-28 (user request, screenshot 15:26): the list
   used to cover the right side of the map. It is now collapsible on
   desktop map view only. Button is hidden everywhere else (mobile,
   list, stats, calendar) so it cannot hide the list where the list
   is the whole view. Expanded button shows › (panel goes right,
   away); collapsed button shows ‹ (panel comes back left).
   Collapsed panel is a single horizontal pill at top right
   (title + count + expand button, all readable), so the map
   is almost fully visible. The list always starts expanded
   on page load; collapsing lasts only until reload. */
.list-collapse-btn{display:none;border:1px solid #8bd9bf;background:#e4fbf2;border-radius:12px;height:36px;min-width:36px;padding:0 12px;font-size:13px;font-weight:750;line-height:1;color:#08795f;white-space:nowrap;flex-shrink:0}
@media(min-width:901px){
  body.map-view .list-collapse-btn{display:block}
  body.map-view.list-collapsed .side-panel{width:auto;max-width:calc(100vw - 24px);left:auto;right:12px;top:12px;bottom:auto;height:auto;overflow:hidden}
  body.map-view.list-collapsed .side-panel .event-list{display:none}
  body.map-view.list-collapsed .side-panel .panel-heading{flex-direction:row;align-items:center;padding:10px 12px;gap:10px;border-bottom:0}
  body.map-view.list-collapsed .side-panel #panel-title{writing-mode:horizontal-tb;transform:none;font-size:14px;white-space:nowrap;min-width:0;overflow:hidden;text-overflow:ellipsis}
  body.map-view.list-collapsed .side-panel #panel-count{writing-mode:horizontal-tb;font-size:12px;white-space:nowrap;flex-shrink:0}
  body.map-view.list-collapsed .side-panel #panel-count::after{content:" мероприятий"}
  body.map-view.list-collapsed .side-panel #fav-share{display:none}
}
/* Bottom pill everywhere on desktop 2026-10-28 (user screenshot,
   statistics page): the stylized pill was scoped to body.map-view
   only, so on list / favorites / calendar / stats pages the
   bottom menu fell back to unstyled browser buttons (border,
   buttonface background, no green active state) inside a plain
   strip, which looked like the old ragged menu. These rules are
   NOT scoped to map-view, so every desktop page gets exactly the
   same pill as the map page. They are at the end of the file on
   purpose, so they override the early desktop display:none rule
   and the base pill rules. Map-view rules above have higher
   specificity and set the same values, so the map page does not
   change. Mobile (<=900px) rules are untouched. */
@media(min-width:901px){
  .bottom-nav{display:flex;position:fixed;left:50%;transform:translateX(-50%);right:auto;bottom:calc(16px + env(safe-area-inset-bottom));z-index:900;width:max-content;max-width:calc(100vw - 24px);background:#fffffff5;border:1px solid var(--line);border-radius:999px;box-shadow:0 12px 32px rgba(18,28,46,.22);padding:6px;gap:4px}
  .bottom-nav .nav-btn{flex:1 1 0;min-width:0;padding:8px 12px;white-space:nowrap;display:flex;flex-direction:column;align-items:center;gap:2px;border-radius:999px;border:0;background:transparent;color:#687789;font-size:11px;font-weight:700}
  .bottom-nav .nav-btn span{font-size:20px;line-height:1}
  .bottom-nav .nav-btn .nav-label{font-size:11px;line-height:1.2;display:flex;align-items:center;gap:3px;white-space:nowrap}
  .bottom-nav .nav-btn .nav-label i{font-size:11px;font-weight:750;font-style:normal}
  .bottom-nav .nav-btn.active{background:#0caf83;color:#fff;box-shadow:0 4px 14px rgba(12,175,131,.35)}
}
/* Mobile zoom, 2026-10-28: Yandex zoom is moved to the middle of the
   left edge by JS (positionYandexZoom, API pixel position), because
   the default top-left spot is covered by the search/filter stack.
   Leaflet (fallback map) gets the same middle-left spot here, so
   switching engines does not move the zoom back under the stack.
   This block is last on purpose: it overrides the earlier
   margin-top:208px Leaflet rule for mobile map view. */
@media(max-width:900px){
  body.map-view .leaflet-top.leaflet-left{top:50%!important;transform:translateY(-50%)!important}
  body.map-view .leaflet-control-zoom{margin-top:0!important;margin-left:12px!important}
}
/* Extra filters, 2026-10-28: visible only in list/favorites views
   (the sort row follows the same rule), never on the map, so they
   cannot cover the map or the zoom slider there. The panel itself
   opens on toggle; the count badge and reset appear when set. */
.extra-filters-bar{display:none;gap:8px;margin-bottom:10px;flex-wrap:wrap}
body.list-view .extra-filters-bar,body.favorites-view .extra-filters-bar{display:flex}
.extra-filters{display:none}
body.list-view .extra-filters:not(.hidden),body.favorites-view .extra-filters:not(.hidden){display:flex;gap:12px;flex-wrap:wrap;align-items:end;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;margin-bottom:12px}
.extra-filter{display:flex;flex-direction:column;gap:5px;color:var(--muted);font-size:12px}
.extra-filter input:not([type=checkbox]),.extra-filter select{border:1px solid var(--line);border-radius:9px;padding:9px;color:#24313d;background:#fff;min-width:0}
.extra-filter input[type=number]{width:140px}
.extra-filter input[type=date]{width:150px}
.extra-filter select{max-width:190px}
.extra-filter.check-label{flex-direction:row;align-items:center;padding:10px 2px;font-size:13px;color:#526170}
.extra-filters-note{flex-basis:100%;margin:0;color:var(--muted);font-size:12px;line-height:1.5}
.extra-filters-count{display:inline-block;background:#0caf83;color:#fff;border-radius:10px;padding:1px 7px;font-size:11px;font-weight:750;margin-left:4px}
.extra-filters-toggle.active{border-color:#8bd9bf;background:#e4fbf2;color:#08795f}
@media(max-width:900px){
  body.list-view .extra-filters:not(.hidden),body.favorites-view .extra-filters:not(.hidden){padding:12px}
  .extra-filter input[type=number],.extra-filter input[type=date]{width:calc(50vw - 35px)}
  .extra-filter select{max-width:calc(50vw - 35px)}
}

/* Compact list on desktop (list/favorites views only, 2026-10-29):
   the list itself was taking too little of the screen: header chrome and
   tall cards ate the viewport. Tighten vertical rhythm only here; mobile
   and map views keep their own rules. */
@media(min-width:901px){
  body.list-view main, body.favorites-view main{padding:10px 18px 64px}
  body.list-view .topbar, body.favorites-view .topbar{height:54px;padding:0 16px}
  body.list-view .brand-mark, body.favorites-view .brand-mark{width:auto;height:30px;font-size:20px;border-radius:10px}
  body.list-view .brand strong, body.favorites-view .brand strong{font-size:16px}
  body.list-view .desktop-nav, body.favorites-view .desktop-nav{margin:2px 0 8px}
  body.list-view .desktop-nav .nav-btn, body.favorites-view .desktop-nav .nav-btn{padding:7px 13px;font-size:13px}
  body.list-view .toolbar, body.favorites-view .toolbar{margin-bottom:6px}
  body.list-view .search-wrap, body.favorites-view .search-wrap{height:38px}
  body.list-view .quick-filters, body.favorites-view .quick-filters{padding-bottom:6px}
  body.list-view .sport-chip, body.favorites-view .sport-chip{padding:7px 12px;font-size:12px}
  body.list-view .sort-row, body.favorites-view .sort-row{margin-bottom:6px}
  body.list-view .sort-label select, body.favorites-view .sort-label select{padding:8px}
  body.list-view .extra-filters-bar, body.favorites-view .extra-filters-bar{margin-bottom:6px}
  body.list-view .secondary-btn, body.favorites-view .secondary-btn{padding:7px 11px}
  body.list-view .status-row, body.favorites-view .status-row{margin:4px 2px 6px}
  body.list-view .workspace.list-mode, body.favorites-view .workspace.favorites-mode{height:calc(100vh - 148px);min-height:380px}
  body.list-view .panel-heading, body.favorites-view .panel-heading{padding:10px 14px 8px}
  body.list-view .panel-heading strong, body.favorites-view .panel-heading strong{font-size:15px}
  body.list-view .event-list, body.favorites-view .event-list{padding:6px}
  body.list-view .event-card, body.favorites-view .event-card{padding:11px 14px;margin:5px 0;border-radius:14px}
  body.list-view .event-title, body.favorites-view .event-title{font-size:15px}
  body.list-view .event-meta-rows, body.favorites-view .event-meta-rows{padding:7px 10px;gap:6px}
  body.list-view .event-prices, body.favorites-view .event-prices{margin-top:8px}
  body.list-view .card-footer, body.favorites-view .card-footer{margin-top:8px;padding-top:8px}
  body.list-view .card-footer .event-price, body.favorites-view .card-footer .event-price{font-size:14px}
}

/* One-row filters on desktop list/favorites (2026-10-29): sport chips +
   sort + extra-filters button share a single row, so the list starts
   higher. The wrapper is inert elsewhere: map view and mobile keep the
   stacked layout, where one row would not fit. */
@media(min-width:901px){
  body.list-view .filter-row, body.favorites-view .filter-row{display:flex;align-items:center;gap:10px;margin-bottom:6px}
  body.list-view .filter-row .quick-filters, body.favorites-view .filter-row .quick-filters{flex:1 1 auto;min-width:0;padding-bottom:0}
  body.list-view .filter-row .sort-row, body.favorites-view .filter-row .sort-row{margin-bottom:0;flex:0 0 auto}
  body.list-view .filter-row .sort-label, body.favorites-view .filter-row .sort-label{flex:0 0 auto}
  body.list-view .filter-row .sort-label select, body.favorites-view .filter-row .sort-label select{max-width:180px}
  body.list-view .filter-row .extra-filters-bar, body.favorites-view .filter-row .extra-filters-bar{margin-bottom:0;flex:0 0 auto}
}

/* Aligned sport tags in event cards (2026-10-29): the title used to
   stretch with space-between, so the tag landed at a different x on
   every card. Now the title takes the free space, the tag is a fixed
   92px centred column (longest labels are 8 letters: Плавание,
   Триатлон) and the heart is fixed, so every card's tag lines up.
   New/changed/admin marks moved out of the title row into the badges
   row below it, so they can no longer push the tag sideways either. */
.event-title{flex:1 1 auto;min-width:0}
.sport-tag{width:92px;text-align:center;padding:4px}
.heart{flex-shrink:0}

/* One left-aligned attribute strip in event cards (2026-10-29):
   the sport tag used to sit at the right edge and the price/status
   were split across the footer, so data lived on both sides of the
   card. Now everything reads top-down on the left: title, then one
   strip (sport tag, registration status, price, plus any marks),
   then place / date / participants. Only the favourite heart stays
   at the right edge of the title row: it is an action, not data. */
.card-attrs{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:10px}
.card-attrs .sport-tag{align-self:center}
.card-attrs .status-pill{margin-top:0}
.card-attrs .event-price{margin-top:0}

/* === 2026-10-29: two-per-row list cards, numbering, title frame, distinct pills === */
@media(min-width:901px){
  body.list-view .event-list,body.favorites-view .event-list{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:start}
  body.list-view .event-list .event-card,body.favorites-view .event-list .event-card{margin:0}
  body.list-view .event-list .empty,body.favorites-view .event-list .empty{grid-column:1/-1}
}
.card-num{flex-shrink:0;width:22px;height:22px;border-radius:50%;background:#0caf83;color:#fff;font-size:12px;font-weight:800;display:grid;place-items:center;margin-top:7px}
.event-title{background:color-mix(in srgb, var(--card-accent) 9%, white);border:1px solid color-mix(in srgb, var(--card-accent) 28%, white);border-radius:10px;padding:8px 10px}
.card-attrs .sport-tag{border-radius:8px;text-transform:uppercase;letter-spacing:.3px}
.card-attrs .status-pill{display:inline-flex;align-items:center;gap:6px}
.card-attrs .status-pill::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor;flex-shrink:0}
.event-price-label{font-size:10px;font-weight:800;letter-spacing:.4px;text-transform:uppercase;opacity:.65;margin-right:6px}
/* Selected pin: brighter + stronger shadow (in addition to the faded->full swap). */
.leaflet-marker-icon.pin-selected img{filter:drop-shadow(0 4px 10px rgba(23,33,43,.45)) brightness(1.12) saturate(1.25)}
/* === 2026-10-29: dark themes === */
.map-theme-btn{position:absolute;right:10px;bottom:144px;z-index:700;display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #e4e9ee;border-radius:20px;box-shadow:0 3px 12px #24334412;padding:10px 12px;font-size:13px;font-weight:700;color:#17212b;white-space:nowrap;cursor:pointer}
.map-theme-btn.site-theme-btn{bottom:192px}
.theme-offer{position:fixed;left:50%;transform:translateX(-50%);bottom:96px;z-index:1300;display:flex;flex-direction:column;gap:10px;align-items:center;background:#16202e;color:#f1f5f9;border:1px solid #2a3d55;border-radius:16px;box-shadow:0 12px 32px rgba(0,0,0,.35);padding:14px 16px;max-width:calc(100vw - 32px);text-align:center;font-size:14px;font-weight:650}
.theme-offer-actions{display:flex;gap:8px}
.theme-offer-actions button{border:0;border-radius:10px;padding:9px 14px;font-weight:750;cursor:pointer;font-size:13px}
#theme-offer-yes{background:#0caf83;color:#fff}
#theme-offer-no{background:#243447;color:#e2e8f0}
/* Dark map: Yandex 2.1 has no dark map type, so only the ground pane
   (tiles) is inverted; pins, balloons, controls and the custom labels
   layer sit outside it and stay untouched. */
#map.map-dark{background:#0f172a}
#map.map-dark [class*="ground-pane"]{filter:invert(.92) hue-rotate(180deg) brightness(.92) contrast(.9)}
/* Dark site theme: overrides appended last so they win on equal specificity. */
body.site-dark{--line:#243447;--muted:#94a3b8;background:#0f172a;color:#e2e8f0;color-scheme:dark}
body.site-dark .topbar,body.site-dark .side-panel,body.site-dark .detail-sheet,body.site-dark .stats-card{background:#16202e;border-color:#243447}
body.site-dark .brand-mark{background:#14352a}
body.site-dark .brand small,body.site-dark .panel-heading span,body.site-dark .stats-card>span,body.site-dark .stats-card small,body.site-dark .detail-info p,body.site-dark .map-carousel-head span{color:#94a3b8}
body.site-dark .search-wrap,body.site-dark .secondary-btn,body.site-dark .sort-label select,body.site-dark .sport-chip,body.site-dark .detail-actions a,body.site-dark .detail-actions button,body.site-dark .search-suggestions,body.site-dark .suggestion-item,body.site-dark .cal-day,body.site-dark .extra-filters-bar{background:#1a2739;border-color:#243447;color:#e2e8f0}
body.site-dark .search-wrap input{color:#e2e8f0}
body.site-dark .search-wrap input::placeholder{color:#94a3b8}
body.site-dark .sport-chip.active{border-color:#2a7a5f;background:#14352a;color:#7ee2b8}
body.site-dark .event-card{background:#16202e;border-color:#243447}
body.site-dark .event-card:hover{background:#1a2a3d;border-color:#2a7a5f}
body.site-dark .event-title{color:#f1f5f9;background:color-mix(in srgb, var(--card-accent) 16%, #16202e);border-color:color-mix(in srgb, var(--card-accent) 40%, #16202e)}
body.site-dark .event-meta-row,body.site-dark .event-meta{color:#cbd5e1}
body.site-dark .event-meta-date{color:#f1f5f9}
body.site-dark .event-meta-participants{color:#60a5fa}
body.site-dark .meta-icon{background:#243447}
body.site-dark .card-attrs .sport-tag{background:color-mix(in srgb, var(--tag-color) 22%, #16202e);border-color:color-mix(in srgb, var(--tag-color) 45%, #16202e)}
body.site-dark .card-attrs .status-pill{background:#14352a;color:#7ee2b8}
body.site-dark .card-attrs .status-pill.closed{background:#3a2415;color:#fbbf77}
body.site-dark .card-attrs .status-pill.unknown{background:#243447;color:#94a3b8}
body.site-dark .card-attrs .event-price{color:#17212b}
body.site-dark .detail-title,body.site-dark .panel-heading strong,body.site-dark .stats-card>strong,body.site-dark .cal-selected h3{color:#f1f5f9}
body.site-dark .detail-info{border-color:#243447}
body.site-dark .bottom-nav{background:#16202ef2;border-color:#243447}
body.site-dark .nav-btn{color:#94a3b8}
body.site-dark .nav-btn.active{background:#14352a;color:#7ee2b8}
body.site-dark .map-hint,body.site-dark .map-label-toggle,body.site-dark .map-engine-btn,body.site-dark .map-theme-btn{background:#1a2739;border-color:#243447;color:#e2e8f0}
body.site-dark .search-suggestions .suggestion-title{color:#f1f5f9}
body.site-dark .search-suggestions .suggestion-meta{color:#94a3b8}
body.site-dark .suggestion-item:active{background:#14352a}
body.site-dark .cal-day.has-events{border-color:#2a7a5f;background:#14352a}
body.site-dark .leaflet-popup-content-wrapper{background:#16202e;color:#e2e8f0}
body.site-dark .leaflet-popup-tip{background:#16202e}
body.site-dark .leaflet-popup-content .popup-meta{color:#94a3b8}
/* === 2026-10-29: map filter block smaller + more transparent (desktop map view) === */
@media(min-width:901px){
  body.map-view .float-panel{background:#ffffff99;padding:10px 12px 6px}
  body.map-view .float-panel .quick-filters{padding-bottom:6px}
  body.map-view .float-panel .sport-chip{padding:7px 11px;font-size:12px}
  body.map-view .float-panel .sort-row{margin-bottom:4px}
  body.map-view .float-panel .sort-label select{padding:7px}
  body.map-view .float-panel .status-row{margin:2px 2px 0}
  body.map-view .map-hint{bottom:276px;left:12px}
  body.map-view .map-theme-btn{left:12px;right:auto;bottom:180px}
  body.map-view .map-theme-btn.site-theme-btn{bottom:228px}
}
@media(max-width:900px){
  body.map-view .workspace:has(.map-carousel:not(.collapsed)) .map-theme-btn{display:none}
}
/* Dark filter panel on the map (must come after the desktop map-view filter rules). */
body.site-dark .float-panel{background:#16202e}
body.site-dark.map-view .float-panel{background:#16202ee0}
/* === 2026-10-29 fix: dark-theme contrast, sport tag into the title row, compact map filter === */
.card-top .event-title{flex:1;min-width:0}
.card-top .sport-tag{flex-shrink:0;width:92px;text-align:center;padding:4px;margin-top:6px;border-radius:8px;text-transform:uppercase;letter-spacing:.3px}
body.site-dark .event-meta-rows{background:#1a2739}
body.site-dark .panel-heading strong{background:#14352a;border-color:#2a7a5f;color:#7ee2b8}
body.site-dark .panel-heading span{color:#cbd5e1}
body.site-dark .status-row strong{color:#f1f5f9}
body.site-dark .bottom-nav,body.site-dark.map-view .bottom-nav{background:#1c2b3f;border-color:#2a3d55;box-shadow:0 12px 32px rgba(0,0,0,.45)}
body.site-dark .bottom-nav .nav-btn,body.site-dark.map-view .bottom-nav .nav-btn{color:#dbe4ee}
body.site-dark .bottom-nav .nav-btn.active,body.site-dark.map-view .bottom-nav .nav-btn.active{background:#0caf83;color:#fff;box-shadow:0 4px 14px rgba(12,175,131,.35)}
body.site-dark .desktop-nav .nav-btn{background:#1a2739;border-color:#243447;color:#dbe4ee}
body.site-dark .desktop-nav .nav-btn.active{background:#0caf83;border-color:#0caf83;color:#fff}
body.site-dark .card-top .sport-tag{background:color-mix(in srgb, var(--tag-color) 22%, #16202e);border-color:color-mix(in srgb, var(--tag-color) 45%, #16202e)}
@media(min-width:901px){
  body.map-view .float-panel{background:#ffffff80;padding:8px 10px 4px}
  body.map-view .float-panel .toolbar{margin-bottom:4px}
  body.map-view .float-panel .sort-row{margin-bottom:2px}
  body.map-view .float-panel .quick-filters{padding-bottom:4px;gap:6px}
  body.map-view .float-panel .sport-chip{padding:6px 9px}
  body.map-view .float-panel .sort-label select{padding:6px}
  body.map-view .float-panel .status-row{margin:0 2px}
  body.site-dark.map-view .float-panel{background:#16202eb8}
}
/* === 2026-10-29: map filter window -10% size, +10% transparency (desktop map view) === */
@media(min-width:901px){
  body.map-view .float-panel{width:353px;background:#ffffff66;padding:7px 9px 3px}
  body.map-view .float-panel .toolbar{margin-bottom:4px}
  body.map-view .float-panel .sort-row{margin-bottom:2px}
  body.map-view .float-panel .quick-filters{padding-bottom:4px;gap:6px}
  body.map-view .float-panel .sport-chip{padding:5px 8px;font-size:11px}
  body.map-view .float-panel .sort-label select{padding:5px}
  body.map-view .float-panel .secondary-btn{padding:8px 11px}
  body.map-view .float-panel .status-row{margin:0 2px;font-size:11px}
  body.site-dark.map-view .float-panel{background:#16202e9e}
}
/* === 2026-10-29: sport tag stands apart from the title frame; compact list search/filters === */
/* Title frame is a pale accent tint, so the tag is now the opposite: a
   solid darkened accent fill with white text and a shadow. Same in dark
   theme (the dark rule must repeat it: it outranks the plain rule). */
.card-top .sport-tag{background:color-mix(in srgb, var(--tag-color) 80%, black);border-color:transparent;color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.18)}
body.site-dark .card-top .sport-tag{background:color-mix(in srgb, var(--tag-color) 80%, black);border-color:transparent;color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.35)}
/* List/favorites page (desktop): search and filters more compact. */
@media(min-width:901px){
  body.list-view .toolbar,body.favorites-view .toolbar{margin-bottom:4px}
  body.list-view .search-wrap,body.favorites-view .search-wrap{height:34px;padding:0 11px}
  body.list-view .sport-chip,body.favorites-view .sport-chip{padding:6px 10px;font-size:11px}
  body.list-view .sort-label select,body.favorites-view .sort-label select{padding:6px}
  body.list-view .toolbar .secondary-btn,body.favorites-view .toolbar .secondary-btn,body.list-view .extra-filters-bar .secondary-btn,body.favorites-view .extra-filters-bar .secondary-btn{padding:8px 11px}
  body.list-view .status-row,body.favorites-view .status-row{margin:2px 2px 4px;font-size:11px}
  body.list-view .panel-heading,body.favorites-view .panel-heading{padding:8px 12px 6px}
  body.list-view .panel-heading strong,body.favorites-view .panel-heading strong{font-size:14px}
}
/* === 2026-10-29: slightly smaller scale for the nearest-starts panel and the list === */
@media(min-width:901px){
  body.list-view .event-card,body.favorites-view .event-card,body.map-view .side-panel .event-card{padding:9px 12px}
  body.list-view .event-card .event-title,body.favorites-view .event-card .event-title,body.map-view .side-panel .event-card .event-title{font-size:14px;padding:6px 8px}
  body.list-view .event-card .card-attrs,body.favorites-view .event-card .card-attrs,body.map-view .side-panel .event-card .card-attrs{margin-top:8px;gap:6px}
  body.list-view .event-card .event-meta-rows,body.favorites-view .event-card .event-meta-rows,body.map-view .side-panel .event-card .event-meta-rows{margin-top:6px;padding:6px 8px;gap:5px}
  body.list-view .event-card .event-meta-row,body.favorites-view .event-card .event-meta-row,body.map-view .side-panel .event-card .event-meta-row{font-size:12px}
  body.list-view .event-card .event-meta,body.favorites-view .event-card .event-meta,body.map-view .side-panel .event-card .event-meta{font-size:11px}
  body.list-view .event-card .card-num,body.favorites-view .event-card .card-num,body.map-view .side-panel .event-card .card-num{width:20px;height:20px;font-size:11px;margin-top:5px}
  body.list-view .event-card .card-top .sport-tag,body.favorites-view .event-card .card-top .sport-tag,body.map-view .side-panel .event-card .card-top .sport-tag{margin-top:5px}
  body.list-view .event-card .heart,body.favorites-view .event-card .heart,body.map-view .side-panel .event-card .heart{width:32px;height:32px;font-size:18px}
  body.list-view .event-card .status-pill,body.favorites-view .event-card .status-pill,body.map-view .side-panel .event-card .status-pill{padding:4px 7px}
  body.list-view .event-card .event-price,body.favorites-view .event-card .event-price,body.map-view .side-panel .event-card .event-price{font-size:12px}
  body.list-view .event-card .card-top,body.favorites-view .event-card .card-top,body.map-view .side-panel .event-card .card-top{gap:10px}
  body.map-view .side-panel .panel-heading{padding:8px 10px}
  body.map-view .side-panel .panel-heading strong{font-size:14px}
}
/* === 2026-10-29: mobile map button stack overlap fix ===
   Mobile right stack (bottom-up, collapsed "На карте" sheet):
   labels toggle 150, engine 198 — but the theme button was added
   with only its base bottom 144, so it landed on top of the labels
   toggle (150), and the site-theme button (base 192) would have
   landed on top of the engine button (198) once unlocked.
   Give them their own rungs, same 48px step as the rest of the
   stack: theme 246, site-theme 294. Desktop (min-width 901px)
   keeps its left-column positions (180/228) and is untouched. */
@media(max-width:900px){
  body.map-view .map-theme-btn{right:10px;bottom:246px}
  body.map-view .map-theme-btn.site-theme-btn{bottom:294px}
}
/* === 2026-10-29: dark theme, white pills left on the mobile map ===
   In site-dark, .status-row strong was turned near-white (#f1f5f9)
   and .map-carousel-head strong inherits the near-white body colour
   — correct on dark backgrounds, but on the mobile map both pills
   kept their white backgrounds, so "80 мероприятий" and "На карте"
   became light-on-white and unreadable (same latent issue inside
   the desktop float-panel status row). Fix by darkening the pills
   themselves in map view only, not by reverting the text: list-page
   status rows (dark page background) are untouched. The carousel
   toggle and "Все события" are recoloured to match the dark sheet. */
body.site-dark.map-view .status-row{background:#1a2739;border-color:#243447}
body.site-dark.map-view .status-row span{color:#94a3b8}
body.site-dark.map-view .map-carousel{background:#1a2739;border-color:#243447}
body.site-dark.map-view .map-carousel-head button#map-carousel-all{color:#7ee2b8}
body.site-dark.map-view .map-carousel-head button#map-carousel-toggle{background:#243447;color:#e2e8f0}
/* === 2026-10-29: map settings dropdown (mobile map view) ===
   The four map switches (labels, engine, map theme, site theme)
   used to stand as a tall stack on the right of the mobile map.
   Now they live in #map-settings-panel, hidden until the ⚙️ button
   opens it. Desktop is untouched: the button is hidden there and
   the panel is display:contents, so the switches keep their old
   absolute positions. The panel sits above the ⚙️ button (which
   takes the labels toggle's old 150px rung), and the whole thing
   hides while the "На карте" sheet is expanded, like the switches
   did before. */
.map-settings-btn{display:none}
.map-settings-collapse-btn,.map-settings-expand-btn{display:none}
.map-settings-panel{display:contents}
@media(max-width:900px){
  body.map-view .map-settings-btn{display:flex;position:absolute;right:10px;bottom:calc(150px + env(safe-area-inset-bottom));z-index:700;align-items:center;gap:6px;background:#fff;border:1px solid #e4e9ee;border-radius:20px;box-shadow:0 3px 12px #24334412;padding:10px 12px;font-size:13px;font-weight:700;color:#17212b;white-space:nowrap;cursor:pointer}
  body.site-dark.map-view .map-settings-btn{background:#1a2739;border-color:#243447;color:#e2e8f0}
  body.map-view .map-settings-panel{display:none}
  body.map-view .map-settings-panel.open{display:flex;flex-direction:column;gap:8px;position:absolute;right:10px;bottom:calc(222px + env(safe-area-inset-bottom));z-index:700;width:220px;max-width:calc(100vw - 24px)}
  body.map-view .map-settings-panel .map-label-toggle,body.map-view .map-settings-panel .map-engine-btn,body.map-view .map-settings-panel .map-theme-btn{position:static;right:auto;bottom:auto;left:auto;width:100%;box-sizing:border-box}
  body.map-view .map-settings-panel .map-label-toggle{justify-content:space-between}
  body.map-view .map-settings-panel .map-engine-btn,body.map-view .map-settings-panel .map-theme-btn{justify-content:flex-start}
  body.map-view .workspace:has(.map-carousel:not(.collapsed)) .map-settings-btn,body.map-view .workspace:has(.map-carousel:not(.collapsed)) .map-settings-panel,body.map-view .workspace:has(.map-carousel:not(.collapsed)) .map-settings-collapse-btn,body.map-view .workspace:has(.map-carousel:not(.collapsed)) .map-settings-expand-btn{display:none}
  /* The settings pill itself collapses to a mini gear button (and back).
     The collapse button sits just above the pill's top-right corner,
     mirroring the status chip's button, so both collapse controls look
     and sit exactly alike. The settings panel opens above it, so the
     panel's bottom is raised to clear the button. The collapsed state
     persists (see app.js + inline script in index.html). */
  body.map-view .map-settings-collapse-btn{display:grid;place-items:center;position:absolute;right:10px;bottom:calc(190px + env(safe-area-inset-bottom));z-index:700;width:26px;height:26px;padding:0;border-radius:50%;background:#fff;border:1px solid #e4e9ee;box-shadow:0 3px 12px #24334412;color:#687789;font-size:18px;line-height:1;cursor:pointer}
  body.site-dark.map-view .map-settings-collapse-btn,body.site-dark.map-view .map-settings-expand-btn{background:#1a2739;border-color:#243447;color:#e2e8f0}
  body.map-view.settings-collapsed .map-settings-btn,body.map-view.settings-collapsed .map-settings-collapse-btn{display:none}
  body.map-view.settings-collapsed .map-settings-expand-btn{display:grid;place-items:center;position:absolute;right:10px;bottom:calc(150px + env(safe-area-inset-bottom));z-index:700;width:44px;height:44px;padding:0;border-radius:50%;background:#fff;border:1px solid #e4e9ee;box-shadow:0 3px 12px #24334412;font-size:20px;cursor:pointer}
  /* Left zoom slider, mobile map view: 13% smaller, and dark when the
     map itself is dark (it follows the map theme, not the site theme,
     so a light map keeps a light slider). The Yandex container class
     ends in "-zoom" (version-prefixed, e.g. ymaps-2-1-79-zoom) while
     its inner parts end in __plus/__minus/__slider, so [class$="zoom"]
     hits the container only and the filter is not applied twice.
     Leaflet's container is .leaflet-control-zoom. */
  body.map-view #map .leaflet-control-zoom{transform:scale(.87);transform-origin:left top}
  body.map-view #map [class$="zoom"]{transform:scale(.87);transform-origin:left center}
  body.map-view #map.map-dark .leaflet-control-zoom,body.map-view #map.map-dark [class$="zoom"]{filter:invert(.92) hue-rotate(180deg)}
}
/* === 2026-10-29: dark extra-filters panel + standard mobile list cards ===
   Extra filters: the dark theme recoloured only .extra-filters-bar
   (the button row), not the .extra-filters panel itself nor its
   fields, so the panel stayed white in dark theme with pale muted
   labels/notes on white. Darken the panel, its inputs/selects and
   the check-label; the active toggle gets the dark green treatment
   like sport-chip.active.
   Mobile list cards: the visible chaos was a long unbreakable word
   ("Полумарафон") overflowing its title frame and sliding under
   the fixed sport tag, while other titles wrapped to 5 lines.
   Standard, mobile list/favorites only: title 15px/1.35, clamped
   to 2 lines (same as the map carousel already does) with long
   words broken, so no title ever runs under its tag; tag fixed
   92x28, number 22, heart 32, status/price pills fixed 28px tall
   with the same padding; meta rows 13px. Desktop list cards keep
   their own compact rules. */
body.site-dark .extra-filters{background:#16202e;border-color:#243447}
body.site-dark .extra-filter input:not([type=checkbox]),body.site-dark .extra-filter select{background:#1a2739;border-color:#243447;color:#e2e8f0}
body.site-dark .extra-filter.check-label{color:#cbd5e1}
body.site-dark .extra-filters-toggle.active{background:#14352a;border-color:#2a7a5f;color:#7ee2b8}
.card-top .event-title{overflow-wrap:anywhere;word-break:break-word}
@media(max-width:900px){
  body.list-view .card-top,body.favorites-view .card-top{align-items:flex-start;gap:10px}
  body.list-view .card-num,body.favorites-view .card-num{width:22px;height:22px;font-size:12px;margin-top:7px}
  body.list-view .event-title,body.favorites-view .event-title{font-size:15px;line-height:1.35;padding:7px 9px;overflow-wrap:anywhere;word-break:break-word}
  body.list-view .card-top .sport-tag,body.favorites-view .card-top .sport-tag{width:92px;height:28px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;font-size:11px;padding:4px;margin-top:7px;white-space:nowrap}
  body.list-view .heart,body.favorites-view .heart{width:32px;height:32px;font-size:18px;margin-top:4px}
  body.list-view .card-attrs,body.favorites-view .card-attrs{gap:6px;margin-top:8px;align-items:center}
  body.list-view .card-attrs .status-pill,body.favorites-view .card-attrs .status-pill,body.list-view .card-attrs .event-price,body.favorites-view .card-attrs .event-price{height:28px;box-sizing:border-box;display:inline-flex;align-items:center;padding:6px 10px;line-height:1;white-space:nowrap}
  body.list-view .card-attrs .status-pill,body.favorites-view .card-attrs .status-pill{font-size:11px}
  body.list-view .card-attrs .event-price,body.favorites-view .card-attrs .event-price{font-size:13px}
  body.list-view .event-meta-row,body.favorites-view .event-meta-row,body.list-view .event-meta-row.event-meta-date,body.favorites-view .event-meta-row.event-meta-date,body.list-view .event-meta-row.event-meta-participants,body.favorites-view .event-meta-row.event-meta-participants{font-size:13px}
}
/* === 2026-10-29: dark theme, event detail sheet + calendar ===
   Same recurring pattern as the map pills: a white background kept
   from the light theme, with text turned light by site-dark, so the
   text disappears. Detail sheet, all in site-dark:
   - weather box: pale yellow bg (#fff7e0) + light body text -> the
     forecast line was unreadable; darken the box itself.
   - similar events: white cards (#fafbfc) + light title text ->
     titles invisible, dates (muted) readable; darken the cards.
   - "Нет данных" note and rating stars: white in
     dark theme (readable dark text, but breaking the theme); darken
     them, with the dark-green .on states used
     elsewhere in dark theme.
   - modal close button and the distances title (#08795f, dark green
     on dark) get dark-theme colours.
   Calendar: month arrows are .cal-header buttons with white bg and
   inherited light text in dark theme -> arrows invisible on white
   squares; darken the buttons. The month pill itself (light green
   bg, dark green text) already reads fine and is untouched. */
body.site-dark .detail-weather{background:#1a2739;border-color:#243447;color:#e2e8f0}
body.site-dark .similar-item{background:#1a2739;border-color:#243447}
body.site-dark .similar-item strong{color:#f1f5f9}
body.site-dark .detail-missing{background:#1a2739;border-color:#243447;color:#94a3b8}
body.site-dark .rating-star{background:#1a2739;border-color:#243447;color:#94a3b8}
body.site-dark .rating-star.on{background:#14352a;border-color:#2a7a5f;color:#7ee2b8}
body.site-dark .modal-close{background:#243447;color:#e2e8f0}
body.site-dark .detail-info .detail-distances-title{color:#7ee2b8}
body.site-dark .cal-header button{background:#1a2739;border-color:#243447;color:#e2e8f0}
/* Stats, same pattern:
   - inactive tabs and the "К карте" button: white bg, grey text in
     light theme, white islands in dark; active tab keeps its light
     green pill, which reads fine, but gets the dark-green version
     for consistency.
   - athlete names (.arch-athlete): hard dark colour #17212b with
     no dark override, so in dark theme the names in the archive
     rows are invisible and only the count on the right shows.
   - stats header h2 is dark green #08795f on the dark page bg,
     too dim; row borders are light #f0f2f5 and meta grey #718096
     is dim on dark. */
body.site-dark .stats-tab-btn{background:#1a2739;border-color:#243447;color:#e2e8f0}
body.site-dark .stats-tab-btn.active{background:#14352a;border-color:#2a7a5f;color:#7ee2b8}
body.site-dark .stats-back{background:#1a2739;border-color:#243447;color:#e2e8f0}
body.site-dark .stats-header h2{color:#7ee2b8}
body.site-dark .arch-athlete{color:#f1f5f9}
body.site-dark .arch-athlete:hover{color:#7ee2b8}
body.site-dark .arch-row{border-color:#243447}
body.site-dark .arch-row .arch-meta,body.site-dark .rating-row .arch-meta,body.site-dark .stats-note{color:#94a3b8}
/* Results search cards, dark theme: colours only, geometry is shared. */
body.site-dark #archive-search-list .arch-row{background:rgba(99,140,255,.10);border-color:rgba(99,140,255,.30)}
body.site-dark #archive-search-list .arch-count{background:#14352a;color:#7ee2b8}
/* Athlete page (athlete modal reuses the detail sheet, so its
   close button is already covered by the .modal-close rule above):
   - result titles (.ath-row-title) are hard dark #1d2a35, so in
     dark theme the race names in the results list are invisible;
     only the number, date and place pill show.
   - filter tabs (.ath-tab) are white pills like the stats tabs.
   - place pills (.ath-row-place) are light-grey pills; the
     coloured 1st/2nd/3rd pills stay as-is (they read fine).
   - row borders and meta dates are light/dim on dark. */
body.site-dark .ath-row-title{color:#f1f5f9}
body.site-dark .ath-tab{background:#1a2739;border-color:#243447;color:#e2e8f0}
body.site-dark .ath-tab.active{background:#14352a;border-color:#2a7a5f;color:#7ee2b8}
body.site-dark .ath-row-place{background:#243447;color:#e2e8f0}
body.site-dark .ath-row{border-color:#243447}
body.site-dark .ath-meta{color:#94a3b8}
body.site-dark .stats-bar-track{background:#243447}
/* Favorite heart, dark theme: .heart was a light-grey circle
   #f0f4f7 (saved: pale pink #ffeef2) with no dark override, so
   in dark theme it sat as a white island on the card. Now a dark
   slate circle with a muted heart; saved keeps a pink heart on a
   dark plum circle. Light theme untouched. */
body.site-dark .heart{background:#243447;color:#94a3b8}
body.site-dark .heart.saved{background:#40222e;color:#fb7185}
/* Detail distance rows: .detail-distance-row was #f7f9fb with
   dark text and no dark override — white rows on the dark detail
   sheet (the yellow price pill inside stays, it reads fine). */
body.site-dark .detail-distance-row{background:#1a2739;color:#e2e8f0}
/* Archive records: .record-row was near-white #fbfdfc with
   color:inherit, so in dark theme the athlete name inherited the
   light body colour and vanished on the white card, while the
   time (hard dark green) and the event line (hard grey) stayed
   readable. Darken the row, brighten the time (dark green on dark
   would be dim) and the event/noname grey. The distance pill
   stays light green with dark text, like other coloured pills. */
body.site-dark .record-row{background:#1a2739;border-color:#243447;color:#e2e8f0}
body.site-dark .record-time{color:#7ee2b8}
body.site-dark .record-event{color:#94a3b8}
body.site-dark .record-compact .record-name.record-noname{color:#94a3b8}

/* Archive event search (Statistics -> "Прошедшие" tab). */
.arch-search-row{display:flex;gap:8px;margin:10px 0}
.arch-search-row input{flex:1;min-width:0;padding:9px 12px;border:1px solid var(--line);border-radius:10px;font-size:14px;background:#fff;color:inherit}
.arch-search-row select{flex-shrink:0;padding:9px 10px;border:1px solid var(--line);border-radius:10px;font-size:14px;background:#fff;color:inherit}
.arch-event{background:none;border:0;padding:0;text-align:left;font:inherit;font-weight:650;color:inherit;cursor:pointer;flex:1;min-width:0;overflow-wrap:anywhere}
.arch-pager{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}
.arch-pager .ath-tab:disabled{opacity:.4;cursor:default}
.arch-pager-info{font-size:13px;color:#718096}
.arch-dist-block{margin-top:14px}
.arch-dist-block h4{margin:0 0 4px;font-size:14px}
body.site-dark .arch-search-row input,body.site-dark .arch-search-row select{background:#1a2739;border-color:#243447;color:#e2e8f0}
body.site-dark .arch-pager-info{color:#94a3b8}

/* Results tab + event podium modal. */
.detail-title{overflow-wrap:anywhere}
.pod-dist{margin-top:16px;border:1px solid var(--line);border-radius:14px;padding:12px}
.pod-dist-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pod-dist-name{font-weight:800;font-size:15px}
.pod-dist-meta{font-size:12px;color:var(--muted)}
.pod-all-btn{margin-left:auto}
.pod-list{margin-top:8px}
.pod-row{display:flex;align-items:baseline;gap:10px;padding:7px 0;border-bottom:1px solid #f0f2f5}
.pod-row:last-child{border-bottom:0}
.pod-medal{flex-shrink:0;width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;color:#fff}
.pod-1{background:#e8a200}.pod-2{background:#9aa7b0}.pod-3{background:#b0713c}
.pod-name{flex:1;min-width:0;overflow-wrap:anywhere;font-weight:650}
.pod-time{flex-shrink:0;font-size:13px;color:#718096;white-space:nowrap;font-variant-numeric:tabular-nums}
.pod-laps{flex-shrink:0;font-size:12px;color:#718096;white-space:nowrap}
.pod-place{flex-shrink:0;width:26px;text-align:center;font-weight:800}
.pod-row-full .pod-name{font-weight:500}
.pod-dnf{font-size:11px;font-weight:800;color:#b91c1c}
.pod-gender{font-size:12px;color:#718096;margin:6px 0 0}
.pod-full{margin-top:8px}
body.site-dark .pod-dist{border-color:#243447;background:#16202e}
body.site-dark .pod-row{border-color:#243447}
body.site-dark .pod-time,body.site-dark .pod-laps,body.site-dark .pod-dist-meta,body.site-dark .pod-gender{color:#94a3b8}
/* Six nav buttons on narrow phones: labels stay on one line (no wrap),
   so the pill is tightened instead — smaller text and padding make all
   six nowrap labels fit even on 320px screens. */
@media(max-width:900px){
  .bottom-nav{padding:4px;gap:2px}
  .bottom-nav .nav-btn{flex:0 0 auto;min-width:0;white-space:nowrap;padding:6px 1px;font-size:9px}
  body.map-view .bottom-nav .nav-btn{padding:6px 1px;font-size:9px}
  body.map-view .bottom-nav{padding:4px}
  .bottom-nav .nav-btn .nav-label{font-size:9px}
}

/* Archive event modal: link to the source race page. */
.pod-source{display:inline-flex;align-items:center;gap:6px;margin:4px 0 2px;border:1px solid var(--line);border-radius:20px;padding:8px 14px;font-size:13px;font-weight:700;color:var(--green-dark);background:#e4fbf2;text-decoration:none}
body.site-dark .pod-source{background:#14352a;border-color:#2a7a5f;color:#7ee2b8}

@media (max-width:900px){
  /* Map view: the count/updated plaque moves off the top stack onto
     the map itself, as a compact bottom-left chip above the carousel,
     so it no longer crowds the balloon area. It never blocks taps.
     (Overrides the full-width top:144px rule above: same selector,
     later in the file.) */
  body.map-view .status-row{top:auto;bottom:calc(140px + env(safe-area-inset-bottom));left:10px;right:auto;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 11px;pointer-events:none}
  body.map-view .status-row strong{font-size:12px}
  body.map-view .status-row span{font-size:10px;max-width:none;text-align:left}
  /* On the map chip the button sits just above the chip's top-right
     corner, outside the chip itself, on a white card so it stays
     visible over the map. */
  body.map-view .status-row .status-collapse-btn{position:absolute;top:-28px;right:0;margin-left:0}
  /* When the carousel list is expanded, the chip would float over it:
     the carousel head already shows the on-map count, so hide the chip. */
  body.map-view:has(.map-carousel:not(.collapsed)) .status-row{display:none!important}
}

/* Collapse button for the status plaque (count/updated): the plaque
   collapses to just its count (and expands back) via its −/+ button,
   and the collapsed state persists in localStorage. The plaque itself
   can be pointer-events:none (map chip), but the button stays
   clickable. */
.status-collapse-btn{display:grid;place-items:center;border:0;background:#fff;border:1px solid var(--line);box-shadow:0 3px 12px #24334412;color:#687789;border-radius:50%;width:26px;height:26px;padding:0;font-size:18px;line-height:1;flex-shrink:0;margin-left:8px;cursor:pointer;pointer-events:auto}
.status-collapse-btn:active{background:#e2e8ee}
.status-row.status-collapsed #updated-at{display:none}

/* Compact desktop map panel (2026-10-30): the right panel on the map
   showed ~1.5 cards per screen. Tighten only this panel (list view
   cards are untouched) so at least 2 cards fit on a typical laptop
   viewport (~700px high): panel bottom 92 -> 76px is NOT used here,
   the bottom nav pill needs its clearance, so the gain comes from
   the heading and the cards themselves. */
@media(min-width:901px){
  body.map-view .side-panel .panel-heading{padding:12px 14px 10px}
  body.map-view .side-panel .event-card{padding:9px 12px;margin:6px 0}
  body.map-view .side-panel .event-title{font-size:13px;line-height:1.25}
  body.map-view .side-panel .card-attrs{margin-top:6px;gap:6px}
  body.map-view .side-panel .status-pill{padding:3px 8px}
  body.map-view .side-panel .event-meta-rows{margin-top:8px;padding:6px 10px;gap:6px}
  body.map-view .side-panel .event-meta-row{font-size:13px}
  body.map-view .side-panel .event-meta-date,body.map-view .side-panel .event-meta-participants{font-size:14px}
  body.map-view .side-panel .meta-icon{width:22px;height:22px;font-size:13px}
}
/* "Есть изменения" badge + hover popup (server-side change tracking,
   2026-10-30; replaces the old client-side "Изменилось" badge, which
   only compared price/status against the visitor's own last visit).
   Popup opens below the badge on hover/focus/tap; tapping elsewhere
   closes it (JS toggles .open). */
.badge-changes{position:relative;display:inline-block;background:#fff3e0;color:#b65a23;border-radius:20px;padding:3px 7px;font-size:10px;font-weight:750;white-space:nowrap;cursor:help}
.changes-popup{display:none;position:absolute;top:calc(100% + 6px);left:0;z-index:800;min-width:260px;max-width:320px;background:#fff;border:1px solid #e4e9ee;border-radius:12px;box-shadow:0 8px 24px #2433441f;padding:8px 10px;white-space:normal;text-align:left}
.badge-changes:hover .changes-popup,.badge-changes:focus-within .changes-popup,.badge-changes.open .changes-popup{display:block}
.ch-row{display:block;font-size:12px;line-height:1.5;color:#526170;font-weight:500;padding:1px 0}
.ch-date{font-weight:750;color:#1d2a35;white-space:nowrap}
body.site-dark .badge-changes{background:#3a2415;color:#fbbf77}
body.site-dark .changes-popup{background:#16202e;border-color:#243447}
body.site-dark .ch-row{color:#cbd5e1}
body.site-dark .ch-date{color:#f1f5f9}

/* Header logo light/dark (2026-10-30): the real O-Time logo comes in
   two variants — white lettering for the dark theme (original GIF),
   black lettering for the light theme (recolored PNG, red kept).
   No chip anymore: the transparent logo sits directly on the
   topbar, dark in the dark theme and white in the light one, and
   body.site-dark switches the variant (this also pins the mark
   background back to transparent over the dark-theme green rule). */
body.site-dark .brand-mark{background:transparent}
body.site-dark .brand-mark .logo-dark{display:block}
body.site-dark .brand-mark .logo-light{display:none}

/* Admin smiley (2026-10-30): .icon-btn has a fixed #f0f4f7 background,
   which reads as a grey ring on the light theme and stays a white
   circle on the dark theme. Transparent in both themes. */
#admin-smile{background:transparent}

/* Header title one line (2026-10-30): 17px wrapped to two lines next
   to the logo, so the title is now 15px italic bold (logo style) with
   nowrap. On very narrow screens nowrap would overflow, so below
   520px it falls back to wrapping at 13px. */
@media(max-width:520px){.brand strong{font-size:13px;white-space:normal}}

/* Header overflow + transparency (2026-10-30): desktop map-view
   topbar is fixed 392px wide, but logo + 15px title + smiley need
   ~421px, so the smiley spilled outside the card. Shrink the header
   content (logo 26px, gaps 8/12px, title 13px) to ~370px so it fits
   with margin. Background now matches the live filter panel (40%
   white light / 62% dark) instead of near-opaque. */
@media(min-width:901px){
  body.map-view .topbar{padding:0 12px;background:#ffffff66}
  body.map-view .brand{gap:8px}
  body.map-view .brand-mark img{height:26px}
  body.map-view .brand strong{font-size:13px}
  body.site-dark.map-view .topbar{background:#16202e9e}
}

/* Sort control in the side panel (2026-10-30): the sort moved from
   the filter panel into the "Ближайшие старты" block, right under
   its heading and above the cards. It is a static flex child, so
   it stays visible while the card list scrolls. JS binds by the
   select id, so the move needs no JS change; all view-based
   show/hide rules target .sort-row itself and keep working. */
.side-panel .sort-row{display:flex;align-items:center;padding:10px 16px 8px;margin-bottom:0;border-bottom:1px solid #f0f2f5}
.side-panel .sort-row .sort-label{flex:1}
body.site-dark .side-panel .sort-row{border-color:#243447}

/* Collapse buttons in dark theme (2026-10-30): the status-row and
   list collapse buttons kept their light backgrounds, showing as
   white circles/pills on the dark panels. Same dark treatment the
   map-settings collapse buttons already have. */
body.site-dark .status-collapse-btn{background:#1a2739;border-color:#243447;color:#e2e8f0}
body.site-dark .list-collapse-btn{background:#1a2739;border-color:#243447;color:#e2e8f0}

/* Status row background (2026-10-30): in dark map view the status
   row inside the filter panel kept a solid #1a2739 background (a
   later dark rule beat the transparent one), showing as a separate
   strip. The panel itself is the background now, so the row inside
   it is transparent; the floating mobile status card is untouched. */
@media(min-width:901px){
  body.site-dark.map-view .float-panel .status-row{background:transparent;border:0;box-shadow:none}
}

/* Collapse hides filters too (2026-10-30): when the status row is
   collapsed, the sport-type chips, the extra-filters bar and the
   open extra filters also hide, so only the search line (and the
   + button to expand back) remains. The lone button stays right. */
body.map-view .float-panel:has(.status-row.status-collapsed) .quick-filters,
body.map-view .float-panel:has(.status-row.status-collapsed) .extra-filters-bar,
body.map-view .float-panel:has(.status-row.status-collapsed) #extra-filters{display:none}
body.map-view .status-row.status-collapsed{justify-content:flex-end}
body.map-view .status-row.status-collapsed #result-count{display:none}

/* PC map controls (2026-10-30): the labels toggle is removed on
   desktop (labels are forced on there in updateMarkerLabels); the
   Leaflet zoom sits top-right and is centred vertically (the Yandex
   zoom is moved the same way in positionYandexZoom). The zoom
   control on a dark map is inverted on PC too, as on mobile. */
@media(min-width:901px){
  #map-label-toggle{display:none}
  body.map-view #map .leaflet-top.leaflet-right{top:50%;transform:translateY(-50%)}
  body.map-view #map.map-dark .leaflet-control-zoom,body.map-view #map.map-dark [class$="zoom"]{filter:invert(.92) hue-rotate(180deg)}
}

/* Marker labels on a dark map (2026-10-30): white pills became dark
   pills with near-white titles and muted grey subtitles, so they
   stay readable on dark tiles. Scoped to the map theme, both
   engines (Yandex labels and Leaflet tooltips share the markup). */
#map.map-dark .yandex-label,#map.map-dark .marker-label-tip{background:#1a2739e0;border-color:#243447;box-shadow:0 2px 8px #00000040}
#map.map-dark .yandex-label strong,#map.map-dark .marker-label strong{color:#f1f5f9}
#map.map-dark .yandex-label span,#map.map-dark .marker-label span{color:#94a3b8}
#map.map-dark .yandex-label .cluster-label-row,#map.map-dark .marker-label .cluster-label-row{border-color:#243447}
#map.map-dark .yandex-label .cluster-label-row strong,#map.map-dark .marker-label .cluster-label-row strong{color:#f1f5f9}
#map.map-dark .yandex-label .cluster-label-row span,#map.map-dark .marker-label .cluster-label-row span{color:#94a3b8}
#map.map-dark .yandex-label .cluster-label-row.more,#map.map-dark .marker-label .cluster-label-row.more{color:#94a3b8}
#map.map-dark .yandex-label .cluster-label-row:active,#map.map-dark .marker-label .cluster-label-row:active{background:#243447}

/* Compact toolbar + collapsed state (2026-10-30): the search line
   is slightly shorter with a smaller icon, the Nearby button is
   smaller and its icon + text are truly centred (flex), and the
   collapsed + button is smaller (22px, 14px glyph) with tighter
   margins, so less empty area is left under the search. */
.search-wrap{height:38px}
.search-wrap span{font-size:20px}
#nearby-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 11px;font-size:14px}
.status-row.status-collapsed .status-collapse-btn{width:22px;height:22px;font-size:14px}
body.map-view .float-panel:has(.status-row.status-collapsed) .toolbar{margin-bottom:2px}
body.map-view .float-panel:has(.status-row.status-collapsed) .status-row{margin:0 2px}

/* Dark loading splash (2026-10-30): on reload with a dark map the
   loading splash stayed light mint, flashing bright while the map
   engine loads. The splash is a sibling of #map, so applyMapTheme
   now also marks .map-wrap, and the splash + map backgrounds go dark. */
.map-wrap.map-dark{background:#0f1a26}
#map.map-dark{background:#0f1a26}
.map-wrap.map-dark .map-loading{background:linear-gradient(135deg,#12202e,#16202e 45%,#0f1a26)}
.map-wrap.map-dark .map-loading-text{color:#8bd9bf}

/* Dark theme: pin balloon + audit fixes (2026-10-30).
   The Yandex balloon frame stayed white on a dark theme (Leaflet
   popups already had a dark variant). Balloons follow the site
   theme, like the detail modal and the Leaflet popups. */
body.site-dark .ymap-balloon{background:#16202e;color:#e2e8f0}
body.site-dark .ymap-balloon-close{background:#243447;color:#94a3b8}
body.site-dark .ymap-balloon .multi-popup-title,body.site-dark .leaflet-popup-content .multi-popup-title{color:#f1f5f9}
body.site-dark .ymap-balloon .popup-meta{color:#94a3b8}
body.site-dark .ymap-balloon .popup-link,body.site-dark .leaflet-popup-content .popup-link{color:#7ee2b8}
body.site-dark .ymap-balloon .multi-item{border-color:#243447}
body.site-dark .ymap-balloon .multi-num,body.site-dark .leaflet-popup-content .multi-num{color:#60a5fa}
body.site-dark .ymap-balloon .multi-text strong,body.site-dark .leaflet-popup-content .multi-text strong{color:#f1f5f9}
body.site-dark .ymap-balloon .multi-text span,body.site-dark .leaflet-popup-content .multi-text span{color:#94a3b8}
/* Audit: card price was near-black on dark cards; distance rows
   kept a near-black title on a dark row. */
body.site-dark .card-attrs .event-price{color:#7ee2b8}
body.site-dark .detail-distance-row strong{color:#f1f5f9}
/* Audit: framed titles (stats, calendar, detail, stars) kept the
   pale green pill while the panel heading pill already went dark. */
body.site-dark .stats-card h3,body.site-dark .cal-header h2,body.site-dark .detail-info:not(.detail-status)>strong,body.site-dark .stars-sport-title{background:#14352a;border-color:#2a7a5f;color:#7ee2b8}
/* Audit: dim secondary texts, panel divider, share/archive/nearby buttons. */
body.site-dark .arch-filter{color:#94a3b8}
body.site-dark .arch-filter:hover{color:#7ee2b8}
body.site-dark .ath-row-date,body.site-dark .ath-row-time,body.site-dark .star-meta{color:#94a3b8}
body.site-dark .stars-gender h5{color:#f1f5f9}
body.site-dark .map-hint-close{color:#94a3b8}
body.site-dark .panel-heading{border-color:#243447}
body.site-dark .fav-share-btn{background:#1a2739;border-color:#243447;color:#7ee2b8}
body.site-dark .cal-archive-link{background:#14352a;border-color:#2a7a5f;color:#7ee2b8}
body.site-dark #nearby-btn.active{background:#14352a;border-color:#2a7a5f;color:#7ee2b8}
/* Audit: admin-only UI (test button, floating buttons, form controls). */
body.site-dark.admin-mode .admin-test-embed-btn,body.site-dark .admin-float button,body.site-dark .admin-float a{background:#1a2739;border-color:#243447;color:#e2e8f0}
body.site-dark .admin-form input,body.site-dark .admin-form select,body.site-dark .admin-form textarea,body.site-dark .admin-mass-row button,body.site-dark .admin-mass-row select,body.site-dark .admin-dist-row button,body.site-dark .admin-list-item .row button,body.site-dark .admin-form-actions button:not(.primary),body.site-dark .detail-admin-badges button,body.site-dark .detail-diag{background:#1a2739;border-color:#243447;color:#e2e8f0}
/* Audit: dark loading splash track (the splash itself went dark
   in the previous commit, the white bar track did not). */
.map-wrap.map-dark .map-loading-bar{background:#243447}
/* Audit: mobile dark floating cards (search + chips rows stayed
   white on a dark map); the status card keeps its solid dark bg. */
@media(max-width:900px){
  body.site-dark.map-view .toolbar,body.site-dark.map-view .quick-filters{background:#16202ee0;border-color:#243447}
}

/* Price pill fix (2026-10-30, user feedback): the price sits on a
   pale pill, so light text on it was unreadable. Per the user's
   suggestion the pill itself goes dark instead of the text. */
body.site-dark .card-attrs .event-price{background:#14352a;color:#7ee2b8}

/* Detail price + status/participants pills (2026-10-30, user
   feedback): the same pale-pill mistake as the card price — the
   detail distance price is a pale-yellow pill whose text was
   lightened in the audit, and the status/participants pills kept
   light bgs that clash with the dark sheet. All pill bgs go dark. */
body.site-dark .detail-distance-row strong{background:#14352a;color:#7ee2b8}
body.site-dark .detail-status-open{background:#14352a;border-color:#2a7a5f}
body.site-dark .detail-status-open strong{color:#7ee2b8}
body.site-dark .detail-status-closed{background:#3a2415;border-color:#5a3a1a}
body.site-dark .detail-status-closed strong{color:#fbbf77}
body.site-dark .detail-status-unknown{background:#243447;border-color:#243447}
body.site-dark .detail-status-unknown strong{color:#94a3b8}
body.site-dark .detail-status p{color:#94a3b8}
body.site-dark .detail-participants-box{background:#1a2739;border-color:#243447;color:#60a5fa}
body.site-dark .detail-participants{color:#60a5fa}

/* Status vs price pills (2026-10-30, user feedback): in dark theme
   the open pill and the price pill were the same dark teal, so they
   merged; closed was amber, not red. Statuses keep their semantic
   colors (open green, closed red, unknown gray); the price returns
   to its yellow identity, dark gold in dark theme. */
body.site-dark .card-attrs .status-pill.closed{background:#3f1d1d;color:#fca5a5}
body.site-dark .card-attrs .event-price{background:#3a2f12;color:#fcd34d}
body.site-dark .detail-distance-row strong{background:#3a2f12;color:#fcd34d}
body.site-dark .detail-status-closed{background:#3f1d1d;border-color:#5a2a2a}
body.site-dark .detail-status-closed strong{color:#fca5a5}

/* Detail title as a heading block (2026-10-30, user feedback):
   the event name sat as bare text on the sheet, so it did not read
   as a heading. It now gets a framed block with a green accent bar
   on the left, in both themes; padding-right keeps the close button
   clear of the text. */
.detail-title{background:#e4fbf2;border:1px solid #8bd9bf;border-left:4px solid var(--green);border-radius:12px;padding:10px 36px 10px 14px;margin:0 0 10px}
body.site-dark .detail-title{background:#1a2739;border-color:#243447;border-left-color:var(--green);color:#f1f5f9}

/* Detail modal fixes (2026-10-30, user feedback).
   - The close button glyph was off-centre in its circle (no grid
     centring, default button line box) and the title block ran under
     it; the title now ends 38px early, so the button sits beside the
     block instead of on top of it.
   - The rating block is tightened: title and average share one row,
     smaller stars, tighter text and padding.
   - On desktop map view the modal sheet used to cover the right
     list panel: the modal now reserves the panel's 404px on the
     right, so the sheet centres in the remaining area and never
     reaches the panel (its width already caps at the content box). */
.modal-close{display:grid;place-items:center;line-height:1}
.detail-title{padding-right:14px;margin-right:38px}
#detail-rating{padding:8px 12px}
#detail-rating>strong{padding:3px 10px;font-size:13px;margin-bottom:4px}
#detail-rating .rating-avg{display:inline-block;margin:0 0 0 8px;font-size:14px;vertical-align:middle}
#detail-rating .stats-note{font-size:12px;line-height:1.4}
#detail-rating .rating-stars{gap:4px;margin:6px 0}
#detail-rating .rating-star{width:32px;height:32px;font-size:18px;border-radius:10px}
@media(min-width:901px){
  body.map-view .modal{padding-right:420px;justify-content:flex-end}
}

/* Compact detail sheet on desktop (2026-10-30, user feedback):
   the 680px sheet covered too much of the map. On PC it is now
   560px wide with tighter padding; the action grid (3 columns) and
   the two-column status row still fit comfortably. Mobile keeps the
   full-width bottom sheet. */
@media(min-width:901px){
  .detail-sheet{width:min(100%,560px);padding:18px 16px calc(18px + env(safe-area-inset-bottom))}
}

/* Changes badge discoverability (2026-10-30, user feedback): the
   badge already opens its details popup on hover/tap, but nothing
   signalled that. A circled ? inside the badge (still part of the
   badge's hover/tap target) makes it obvious. */
.badge-changes .changes-q{display:inline-grid;place-items:center;width:14px;height:14px;margin-left:5px;border:1.5px solid currentColor;border-radius:50%;font-size:10px;font-weight:800;line-height:1}
/* Mobile map plaques (2026-10-30, user feedback): the status card
   is smaller, and the collapse buttons no longer float above their
   plaques as separate circles — they sit on the plaque surface
   itself (transparent, no border/shadow), with room reserved so no
   text runs under them. */
@media(max-width:900px){
  body.map-view .status-row{padding:6px 34px 6px 9px;gap:1px}
  body.map-view .status-row strong{font-size:12px}
  body.map-view .status-row span{font-size:10px}
  body.map-view .status-row .status-collapse-btn{top:4px;right:6px;background:transparent;border:0;box-shadow:none}
  body.map-view .map-settings-btn{padding-right:40px}
  body.map-view .map-settings-collapse-btn{bottom:calc(155px + env(safe-area-inset-bottom));background:transparent;border:0;box-shadow:none}
  body.site-dark.map-view .map-settings-collapse-btn{background:transparent;border:0;box-shadow:none}
}

/* Mobile map bottom plaques (2026-10-30, user feedback): the status
   card and the settings pill shared one row and, after the wider
   paddings for the on-plaque collapse glyphs, met in the middle on
   narrow screens. The whole settings cluster moves one row up
   (pill/collapse/panel/expand all +40px, gaps preserved), so the
   status card keeps its own row. Collapsed status card now keeps
   its count label ("80 мероприятий +") instead of a bare +. */
@media(max-width:900px){
  body.map-view .map-settings-btn{bottom:calc(190px + env(safe-area-inset-bottom))}
  body.map-view .map-settings-collapse-btn{bottom:calc(195px + env(safe-area-inset-bottom))}
  body.map-view .map-settings-panel.open{bottom:calc(262px + env(safe-area-inset-bottom))}
  body.map-view.settings-collapsed .map-settings-expand-btn{bottom:calc(190px + env(safe-area-inset-bottom))}
  body.map-view .status-row.status-collapsed #result-count{display:block}
}

/* Header title removed (2026-10-30, user request): the header keeps
   only the O-Time logo (admin smiley stays for admins). */
.brand strong{display:none}
/* iPhone compact pass (2026-10-30, user feedback + iPhone photo):
   mobile was bulky across the board — tighter paddings and smaller
   fonts for the header, search, chips, carousel cards, list cards
   and the detail sheet. Desktop untouched except the title above. */
@media(max-width:900px){
  body.map-view .topbar{height:44px}
  .brand-mark img{height:26px}
  .search-wrap{height:36px}
  .search-wrap span{font-size:18px}
  .sport-chip{padding:6px 10px}
  .map-carousel-head strong{font-size:14px}
  .map-carousel-head button#map-carousel-toggle{width:28px;height:28px}
  body.map-view .map-carousel{padding:2px 0 6px 10px}
  .map-carousel-track .event-card{padding:10px}
  .map-carousel-track .event-title{font-size:14px;line-height:1.3}
  .map-carousel-track .card-top{gap:8px}
  .map-carousel-track .sport-tag{padding:3px 8px}
  .map-carousel-track .heart{width:30px;height:30px;font-size:17px}
  .map-carousel-track .card-attrs{margin-top:6px}
  .map-carousel-track .status-pill{padding:4px 8px;font-size:10px}
  .map-carousel-track .event-price{font-size:12px}
  .map-carousel-track .event-meta-rows{padding:6px 8px;gap:4px;margin-top:6px}
  .map-carousel-track .event-meta-row{font-size:12px;line-height:1.4}
  .map-carousel-track .meta-icon{width:20px;height:20px;font-size:12px}
  body.list-view .event-card,body.favorites-view .event-card{padding:12px}
  body.list-view .event-title,body.favorites-view .event-title{font-size:14px}
  body.list-view .event-meta-row,body.favorites-view .event-meta-row{font-size:12px}
  .detail-sheet{padding:16px 12px calc(14px + env(safe-area-inset-bottom))}
  .detail-title{font-size:17px}
  .detail-info{padding:10px}
  .detail-distance-row{padding:7px 10px;font-size:13px}
  .detail-actions{margin:10px 0}
}

/* Header height = logo + smiley (2026-10-30, user request): the title
   is gone, so the tall bar was empty space. Bar fits the 40px admin
   smiley / 28px logo with a little breathing room; the desktop map
   filter panel moves up with the floating bar to keep its gap. */
.topbar{height:48px}
@media(max-width:900px){
  body.map-view .topbar{height:48px}
}
@media(min-width:901px){
  body.map-view .topbar{height:48px}
  body.map-view .float-panel{top:72px}
}

/* List redesign "race card" (2026-10-30, user feedback: the list
   looked sloppy — too many competing boxes per card). Mobile list
   and favorites only. One card, one sport stripe, no boxes inside
   boxes: plain bold title as the hero, sport-colored number ring,
   solid sport plate, quiet pills, meta as light text lines with the
   date bold and participants blue. Dark-theme overrides below. */
@media(max-width:900px){
  body.list-view .event-card,body.favorites-view .event-card{border-left-width:5px}
  body.list-view .event-title,body.favorites-view .event-title{background:transparent;border:0;padding:0;font-size:17px;line-height:1.25;font-weight:800;color:#0f172a;letter-spacing:-.2px}
  body.list-view .card-top,body.favorites-view .card-top{gap:10px}
  body.list-view .card-num,body.favorites-view .card-num{margin-top:0;background:transparent;color:var(--card-accent);border:2px solid var(--card-accent)}
  body.list-view .sport-tag,body.favorites-view .sport-tag{margin-top:0}
  body.list-view .heart,body.favorites-view .heart{width:32px;height:32px;font-size:18px}
  body.list-view .card-attrs,body.favorites-view .card-attrs{margin-top:8px;gap:6px}
  body.list-view .event-meta-rows,body.favorites-view .event-meta-rows{background:transparent;padding:0;margin-top:10px;gap:5px}
  body.list-view .event-meta-row,body.favorites-view .event-meta-row{font-size:13px;line-height:1.45;color:#3d4b5a}
  body.list-view .event-meta-date,body.favorites-view .event-meta-date{font-weight:800;color:#0f172a}
  body.list-view .event-meta-participants,body.favorites-view .event-meta-participants{color:var(--blue);font-weight:750}
  body.list-view .meta-icon,body.favorites-view .meta-icon{background:transparent;width:auto;height:auto;font-size:13px}
  body.site-dark.list-view .event-title,body.site-dark.favorites-view .event-title{color:#f1f5f9}
  body.site-dark.list-view .event-meta-row,body.site-dark.favorites-view .event-meta-row{color:#cbd5e1}
  body.site-dark.list-view .event-meta-date,body.site-dark.favorites-view .event-meta-date{color:#f1f5f9}
  body.site-dark.list-view .event-meta-participants,body.site-dark.favorites-view .event-meta-participants{color:#60a5fa}
}

/* Mobile bottom menu redesign (2026-10-30): the cramped 9px floating
   pill is replaced by a proper full-width tab bar — bigger icons and
   labels, equal tabs, a solid-green active tab, and the favorites
   count as a real badge instead of a small italic number. */
@media(max-width:900px){
  body .bottom-nav,body.map-view .bottom-nav{left:0;right:0;transform:none;width:auto;max-width:none;bottom:0;border:0;border-top:1px solid #e5eaf0;border-radius:0;box-shadow:0 -2px 12px rgba(18,28,46,.08);padding:8px 4px calc(8px + env(safe-area-inset-bottom));gap:2px;background:#fffffff2}
  body .bottom-nav .nav-btn,body.map-view .bottom-nav .nav-btn{flex:1 1 0;min-width:0;padding:8px 2px;font-size:11px;font-weight:700;gap:3px;border-radius:12px}
  body .bottom-nav .nav-btn span,body.map-view .bottom-nav .nav-btn span{font-size:22px;line-height:1}
  body .bottom-nav .nav-btn .nav-label,body.map-view .bottom-nav .nav-btn .nav-label{font-size:11px;line-height:1.2;gap:4px}
  body .bottom-nav .nav-btn .nav-label i,body.map-view .bottom-nav .nav-btn .nav-label i{background:var(--green);color:#fff;border-radius:10px;padding:1px 6px;font-size:10px;font-weight:800;font-style:normal}
  body .bottom-nav .nav-btn.active,body.map-view .bottom-nav .nav-btn.active{background:#0caf83;color:#fff;box-shadow:none}
  body .bottom-nav .nav-btn.active .nav-label i,body.map-view .bottom-nav .nav-btn.active .nav-label i{background:#fff;color:var(--green-dark)}
  body.site-dark .bottom-nav,body.site-dark.map-view .bottom-nav{background:#1a2739f2;border-top-color:#243447}
  body.site-dark .bottom-nav .nav-btn,body.site-dark.map-view .bottom-nav .nav-btn{color:#94a3b8}
}

/* MFL-style redesign, slice 1 (2026-10-30, mobile): bottom nav, page
   background, event cards, headings, chips. Dark = deep navy + our
   green accent (green replaces MFL orange); light = the same block
   language on light surfaces. Appended last so it wins the cascade. */
@media(max-width:900px){
  body.site-dark{background:#070b1d}
  body.site-dark .topbar{background:#0a0f26;border-bottom:1px solid rgba(99,140,255,.25)}
  body.site-dark .theme-btn{background:#0d1330;border-color:rgba(99,140,255,.30);color:#e2e8f0}
  body.site-dark .side-panel,body:not(.site-dark) .side-panel{background:transparent;border:0}
  .panel-heading strong,.map-carousel-head strong{text-transform:uppercase;letter-spacing:.03em;font-size:15px}
  body.site-dark .panel-heading strong,body:not(.site-dark) .panel-heading strong{background:transparent;border:0}
  body.site-dark .panel-heading strong{color:#fff}
  body:not(.site-dark) .panel-heading strong{color:#0f172a}
  body .bottom-nav,body.map-view .bottom-nav{background:#fffffff2;border-top:1px solid #e2e8f0}
  body.site-dark .bottom-nav,body.site-dark.map-view .bottom-nav{background:#0a0f26f2;border-top-color:rgba(99,140,255,.25)}
  body .bottom-nav .nav-btn,body.map-view .bottom-nav .nav-btn{color:#687789}
  body.site-dark .bottom-nav .nav-btn,body.site-dark.map-view .bottom-nav .nav-btn{color:#8b93b8}
  body .bottom-nav .nav-btn.active,body.map-view .bottom-nav .nav-btn.active,body.site-dark .bottom-nav .nav-btn.active,body.site-dark.map-view .bottom-nav .nav-btn.active{background:transparent;color:#0caf83;box-shadow:none}
  body .bottom-nav .nav-btn.active>span:first-child,body.map-view .bottom-nav .nav-btn.active>span:first-child,body.site-dark .bottom-nav .nav-btn.active>span:first-child,body.site-dark.map-view .bottom-nav .nav-btn.active>span:first-child{background:rgba(12,175,131,.14);border-radius:12px;padding:6px 8px}
  body .bottom-nav .nav-btn.active .nav-label i,body.map-view .bottom-nav .nav-btn.active .nav-label i{background:#0caf83;color:#fff}
  body.site-dark .event-card{background:linear-gradient(180deg,#151c42,#0e1330);border:1px solid rgba(99,140,255,.30);border-radius:18px;box-shadow:none}
  body.site-dark .event-card:hover{background:linear-gradient(180deg,#18204a,#101736);border-color:rgba(12,175,131,.55)}
  body:not(.site-dark) .event-card{background:#fff;border:1px solid #e2e8f0;border-radius:18px;box-shadow:0 2px 10px rgba(18,28,46,.06)}
  body.site-dark .event-title{color:#fff;background:transparent;border:0}
  body.site-dark .event-meta-row,body.site-dark .event-meta{color:#aab4d0}
  body.site-dark .sport-chip{background:transparent;border:1px solid rgba(99,140,255,.35);color:#aab4d0}
  body.site-dark .sport-chip.active{border-color:#0caf83;background:rgba(12,175,131,.15);color:#7ee2b8}
  body:not(.site-dark) .sport-chip{background:#fff;border:1px solid #dbe3ec;color:#526170}
  body:not(.site-dark) .sport-chip.active{border-color:#0caf83;background:#e4fbf2;color:#08795f}
  body.site-dark .search-wrap{background:#0d1330;border-color:rgba(99,140,255,.30)}
  body.site-dark .secondary-btn{background:#0d1330;border-color:rgba(99,140,255,.30);color:#cbd5e1}
}

/* Fixes + MFL compact list (2026-10-30, user screenshots).
   1. Carousel titles: the legacy -webkit-line-clamp silently dies on
      flex items (the title is a .card-top flex item, its display
      gets blockified), so long titles clipped mid-glyph. The
      standard line-clamp property does not depend on -webkit-box
      and survives; 13px gives two lines room for most titles.
   2. Dark extra-filters panel: the list-view white rule (0,3,1)
      beat the dark rule (0,2,1). View-scoped dark rules win now.
   3. Compact MFL-style list rows + Unbounded (MFL-like display
      font, Cyrillic, display=swap so text never blocks on it). */
@media(max-width:900px){
  .map-carousel-track .event-title{line-clamp:2;font-size:13px;line-height:1.35}
  body.list-view .panel-heading strong,body.favorites-view .panel-heading strong,.map-carousel-head strong{font-family:'Unbounded',Inter,system-ui,sans-serif;font-weight:800;font-size:13px;letter-spacing:.02em}
  body.list-view .event-card,body.favorites-view .event-card{padding:11px 13px;margin:8px 0}
  body.list-view .event-title,body.favorites-view .event-title{font-family:'Unbounded',Inter,system-ui,sans-serif;font-weight:700;font-size:14px;line-height:1.35;letter-spacing:0}
  body.list-view .card-attrs,body.favorites-view .card-attrs{margin-top:6px}
  body.list-view .event-meta-rows,body.favorites-view .event-meta-rows{margin-top:6px;gap:4px}
  body.list-view .event-meta-row,body.favorites-view .event-meta-row{line-height:1.4}
}
body.site-dark .extra-filters:not(.hidden),body.site-dark.list-view .extra-filters:not(.hidden),body.site-dark.favorites-view .extra-filters:not(.hidden){background:linear-gradient(180deg,#151c42,#0e1330);border-color:rgba(99,140,255,.30)}

/* MFL site-wide (2026-10-30, user: apply the map-block style everywhere).
   1. Carousel titles, bulletproof: the 2-line clamp attempts kept
      failing (photo proof twice), so: 3 lines + explicit height
      guards. If clamping works, long titles end with a clean
      ellipsis after line 3; if it ever fails, titles wrap fully —
      a mid-glyph cut is impossible either way.
   2. Dark map sheet: border transparent, cards keep their highlight.
   3. Dark search + Nearby: background removed (borders stay).
   4. Unbounded + navy blocks site-wide (both themes, all widths). */
@media(max-width:900px){
  .map-carousel-track .event-title{display:block;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;height:auto !important;max-height:none !important;font-family:'Unbounded',Inter,system-ui,sans-serif;font-weight:700;font-size:13px;line-height:1.35}
}
body.site-dark.map-view .map-carousel{border-color:transparent;box-shadow:none}
body.site-dark .search-wrap{background:transparent}
body.site-dark #nearby-btn{background:transparent}
.event-title{font-family:'Unbounded',Inter,system-ui,sans-serif;font-weight:700}
.panel-heading strong,.cal-header h2,.stats-panel h3,.results-panel h3,.detail-info>strong,.cal-selected h3,.stars-sport-title{font-family:'Unbounded',Inter,system-ui,sans-serif;font-weight:800}
.panel-heading strong,.cal-header h2,.stats-panel h3,.results-panel h3{text-transform:uppercase;letter-spacing:.02em}
.stats-card h3,.cal-header h2,.detail-info>strong,.stars-sport-title{background:transparent;border:0}
body.site-dark .stats-card h3,body.site-dark .cal-header h2,body.site-dark .detail-info:not(.detail-status)>strong,body.site-dark .stars-sport-title{background:transparent;border:0}
.detail-title{font-family:'Unbounded',Inter,system-ui,sans-serif;font-weight:800}
body.site-dark .topbar{background:#0a0f26}
body.site-dark .side-panel{background:#070b1d}
body.site-dark .detail-sheet{background:#0a0f26}
body.site-dark .detail-info{background:#0d1330;border-color:rgba(99,140,255,.30)}
body.site-dark .event-card{background:linear-gradient(180deg,#151c42,#0e1330);border:1px solid rgba(99,140,255,.30);border-radius:18px;box-shadow:none}
body.site-dark .event-card:hover{background:linear-gradient(180deg,#18204a,#101736);border-color:rgba(12,175,131,.55)}
body:not(.site-dark) .event-card{background:#fff;border:1px solid #e2e8f0;border-radius:18px;box-shadow:0 2px 10px rgba(18,28,46,.06)}
body:not(.site-dark) .event-card:hover{background:#fbfffd;border-color:#a6dfcd}
body.site-dark .stats-card{background:linear-gradient(180deg,#151c42,#0e1330);border-color:rgba(99,140,255,.30)}
body.site-dark .cal-day{background:#0d1330;border-color:rgba(99,140,255,.30)}
body.site-dark .search-suggestions,body.site-dark .suggestion-item,body.site-dark .extra-filters-bar,body.site-dark .sort-label select{background:#0d1330;border-color:rgba(99,140,255,.30)}
body.site-dark .rating-row{background:linear-gradient(180deg,#151c42,#0e1330);border:1px solid rgba(99,140,255,.30);border-bottom:0;border-radius:14px;margin-bottom:8px;padding:10px 12px}
body:not(.site-dark) .rating-row{background:#fff;border:1px solid #e2e8f0;border-bottom:0;border-radius:14px;margin-bottom:8px;padding:10px 12px;box-shadow:0 2px 10px rgba(18,28,46,.06)}

/* Desktop MFL pass + sheet framing + sort hides with collapsed list (2026-10-30).
   1. Sheet framing: the sheet had no border at all and a weak upward
      shadow, and its bg (#0a0f26 dark / white light) nearly matched
      the page — so it blended in. Now a real frame + deep shadow.
   2. Desktop MFL: dark page bg unified with mobile (#070b1d),
      desktop-nav dark active = MFL green tint (was solid green),
      chips = outline pills on all widths (were mobile-only).
   3. Collapsed list on desktop map: .sort-row lives inside
      #side-panel but the list-collapsed rules never hid it — now
      it disappears with the list. */
@media(min-width:901px){
  .detail-sheet{border:1px solid #dbe3ec;box-shadow:0 24px 64px rgba(18,28,46,.25)}
  body.site-dark .detail-sheet{border-color:rgba(99,140,255,.45);box-shadow:0 24px 64px rgba(0,0,0,.55)}
  body:not(.site-dark) .detail-info{background:#f8fafc;border-color:#dbe3ec}
  body:not(.site-dark) .detail-actions a,body:not(.site-dark) .detail-actions button{border-color:#dbe3ec}
  body.map-view.list-collapsed .side-panel .sort-row{display:none}
}
body.site-dark{background:#070b1d}
body.site-dark .desktop-nav .nav-btn.active{background:rgba(12,175,131,.14);border-color:rgba(12,175,131,.55);color:#34d399}
body.site-dark .sport-chip{background:transparent;border:1px solid rgba(99,140,255,.35);color:#aab4d0}
body.site-dark .sport-chip.active{border-color:#0caf83;background:rgba(12,175,131,.15);color:#7ee2b8}
body:not(.site-dark) .sport-chip{background:#fff;border:1px solid #dbe3ec;color:#526170}
body:not(.site-dark) .sport-chip.active{border-color:#0caf83;background:#e4fbf2;color:#08795f}

/* Really compact mobile list + cards (2026-10-30, user: still bulky).
   CSS-only on purpose — no markup, no JS, no card-builder changes,
   so nothing structural can break: the same card() renders, only
   sizes and gaps shrink. Readability floors kept on purpose:
   titles 13px, meta 11px, pills 10px — below that it stops being
   readable. The big win is meta rows: place keeps its own line,
   date + participants now share one line (flex-wrap), which saves
   a whole row per card. Applies to list, favorites and carousel
   cards alike (they share the same classes). */
@media(max-width:900px){
  .search-wrap{height:34px}
  .sport-chip{padding:5px 9px}
  body.list-view .panel-heading,body.favorites-view .panel-heading{padding:8px 12px 6px}
  .side-panel .sort-row{margin-bottom:6px}
  .side-panel .sort-label select{padding:6px 8px;font-size:12px}
  .event-list{padding:6px}
  body.list-view .event-card,body.favorites-view .event-card{padding:9px 11px;margin:6px 0}
  .map-carousel-track .event-card{padding:8px 10px}
  body.list-view .event-title,body.favorites-view .event-title{font-size:13px;line-height:1.3}
  body.list-view .card-top,body.favorites-view .card-top{gap:8px}
  .map-carousel-track .card-top{gap:6px}
  body.list-view .sport-tag,body.favorites-view .sport-tag,.map-carousel-track .sport-tag{padding:2px 7px;font-size:10px}
  body.list-view .heart,body.favorites-view .heart,.map-carousel-track .heart{width:28px;height:28px;font-size:17px}
  body.list-view .card-attrs,body.favorites-view .card-attrs,.map-carousel-track .card-attrs{margin-top:5px;gap:5px}
  body.list-view .status-pill,body.favorites-view .status-pill,.map-carousel-track .status-pill{padding:3px 7px}
  body.list-view .event-price,body.favorites-view .event-price,.map-carousel-track .event-price{font-size:11px}
  .event-meta.event-distance{margin-top:5px}
  body.list-view .event-meta-rows,body.favorites-view .event-meta-rows,.map-carousel-track .event-meta-rows{display:flex;flex-wrap:wrap;gap:3px 12px;margin-top:5px}
  body.list-view .event-meta-rows .event-meta-row:first-child,body.favorites-view .event-meta-rows .event-meta-row:first-child,.map-carousel-track .event-meta-rows .event-meta-row:first-child{flex-basis:100%}
  body.list-view .event-meta-row,body.favorites-view .event-meta-row,.map-carousel-track .event-meta-row{font-size:11px;line-height:1.4}
}

/* Dark mobile map backdrops (2026-10-30, user screenshot): the search
   input and Nearby button went transparent earlier, but their parent
   .float-panel still had #16202e (general dark rule), and the
   carousel sheet still had #1a2739 — those were the visible
   backgrounds under the search line and under "НА КАРТЕ / Все
   события". Cards keep their own navy bg + borders; only the
   backdrops go transparent. */
@media(max-width:900px){
  body.site-dark.map-view .float-panel{background:transparent;border-color:transparent;box-shadow:none}
  body.site-dark.map-view .map-carousel{background:transparent}
}

/* Dark mobile map translucency pass (2026-10-30, user photo + notes).
   1. The search strip backdrop was NOT .float-panel (fixed earlier)
      but the fixed .toolbar itself (dark rule 1538: #16202ee0) —
      that is the slab behind the search line + Nearby. Now fully
      transparent, blur removed too.
   2. Topbar: same transparency as the search line, 15% less —
      search is fully transparent (0), so topbar = 15% navy.
   3. Bottom carousel header: a 50% navy pill so the "НА КАРТЕ /
      Все события" controls read as buttons again (the fully
      transparent sheet left them unmarked).
   4. Bottom nav: slightly transparent (75% navy) so the map
      shows through it. */
@media(max-width:900px){
  body.site-dark.map-view .toolbar,body.site-dark.map-view .quick-filters{background:transparent;border-color:transparent;backdrop-filter:none}
  body.site-dark.map-view .topbar{background:rgba(10,15,38,0.15)}
  body.site-dark.map-view .map-carousel-head{background:rgba(10,15,38,0.5);border-radius:12px;padding:6px 10px}
  body.site-dark.map-view .bottom-nav{background:rgba(10,15,38,0.75)}
}

/* Desktop map list panel: translucent + 20% narrower + smaller
   elements (2026-10-30, user). Panel 392 -> 314px (x0.8); the detail
   sheet dock padding follows: 420 -> 342px (314 + 12 margin + 16 gap).
   Translucency matches the map chrome language: dark 50% navy (like
   the carousel header pill), light 75% white, plus blur; cards stay
   solid so text stays readable, only gaps/heading show the map.
   Selectors mirror the existing desktop card chains (0,4,1) so they
   win over the earlier compact rules. Collapsed strip untouched
   (its width:auto rule is more specific). */
@media(min-width:901px){
  body.map-view .side-panel{width:314px}
  body.site-dark.map-view .side-panel{background:rgba(7,11,29,0.5);border-color:rgba(99,140,255,.35);box-shadow:0 8px 28px rgba(0,0,0,.35);backdrop-filter:blur(10px)}
  body:not(.site-dark).map-view .side-panel{background:rgba(255,255,255,0.75);border-color:#dbe3ec;backdrop-filter:blur(10px)}
  body.map-view .modal{padding-right:342px}
  body.map-view .side-panel .panel-heading{padding:8px 12px 6px}
  body.map-view .side-panel .panel-heading strong{font-size:13px}
  body.map-view .side-panel .panel-heading span{font-size:11px}
  body.map-view .side-panel .sort-row{margin-bottom:6px}
  body.map-view .side-panel .sort-label select{padding:6px 8px;font-size:12px}
  body.map-view .side-panel .event-list{padding:6px}
  body.map-view .side-panel .event-card{padding:8px 10px;margin:5px 0}
  body.map-view .side-panel .event-card .event-title{font-size:12px;line-height:1.25}
  body.map-view .side-panel .event-card .card-top{gap:8px}
  body.map-view .side-panel .event-card .card-top .sport-tag{padding:2px 6px;font-size:10px}
  body.map-view .side-panel .event-card .heart{width:28px;height:28px;font-size:16px}
  body.map-view .side-panel .event-card .card-num{width:18px;height:18px;font-size:10px}
  body.map-view .side-panel .event-card .card-attrs{margin-top:6px;gap:5px}
  body.map-view .side-panel .event-card .status-pill{padding:3px 6px}
  body.map-view .side-panel .event-card .event-price{font-size:11px}
  body.map-view .side-panel .event-card .event-meta-rows{margin-top:5px;padding:5px 6px;gap:4px}
  body.map-view .side-panel .event-card .event-meta-row{font-size:11px}
}

/* Theme button + search strip readability (2026-10-30, user photo).
   1. Theme button: the pill stood out in the topbar — now plain
      text + icon like the smiley next to it, site-wide (the 1px
      border stays but transparent, so the button keeps its size).
   2. Search strip: fully transparent turned out unreadable over a
      busy map — back to a light 50% navy, the same value as the
      carousel header pill below. */
body.site-dark .theme-btn,body:not(.site-dark) .theme-btn{background:transparent;border-color:transparent}
@media(max-width:900px){
  body.site-dark.map-view .toolbar{background:rgba(10,15,38,0.5)}
}

/* Dark mobile map: even rounding + one shade (2026-10-30, user photo).
   1. The search strip was a full-width square-cornered bar while
      its inner controls are pills — uneven rounding. Now it floats
      with 10px side insets, an 8px gap under the header and a 12px
      radius, like the bottom pill.
   2. Topbar was 15% navy while the search strip and the carousel
      header read as one family at 50% — topbar joins them at the
      same rgba(10,15,38,0.5). The nav (75%) stays: same family, and
      it was not the odd one out. */
@media(max-width:900px){
  body.site-dark.map-view .toolbar{top:56px;left:10px;right:10px;border-radius:12px;padding:10px}
  body.site-dark.map-view .topbar{background:rgba(10,15,38,0.5)}
}

/* List/favorites filter block background (2026-10-30, user photo):
   the filter area sits inside .float-panel, which still had the
   general dark #16202e, and .extra-filters-bar had #0d1330 — a slab
   behind search/chips/filter toggle that does not match the page.
   Both go transparent; the controls keep their own outlines and
   backgrounds, so nothing loses readability. Map view untouched
   (its panels have their own rules). */
body.site-dark.list-view .float-panel,body.site-dark.favorites-view .float-panel{background:transparent}
body.site-dark.list-view .extra-filters-bar,body.site-dark.favorites-view .extra-filters-bar{background:transparent}

/* Mobile map header/search spacing (2026-10-30, user): the search
   pill sat 8px under the 48px header — too close. Now a 16px gap
   (toolbar top = 64px), both themes. The header transparency ask
   needed no code change: header and search strip are already the
   same rgba(10,15,38,0.5) since 19063ff; any remaining visual
   difference is the backdrop (page bg behind the header vs map
   tiles behind the search), not the value. */
@media(max-width:900px){
  body.map-view .toolbar{top:64px}
}

/* Mobile list/favorites chips (2026-10-30, user: "Плавание" cut off):
   the chips row had neither wrap nor a scroller on mobile list, so
   chips past the screen edge were simply clipped and unreachable.
   Now they wrap to a second row — nothing is cut, no swipe needed.
   Map view untouched (its chips are a separate fixed strip). */
@media(max-width:900px){
  body.list-view .quick-filters,body.favorites-view .quick-filters{display:flex;flex-wrap:wrap;overflow-x:visible;gap:8px}
}

/* Mobile map header/search separation (2026-10-30, user photo):
   on dark the header's bottom border read as touching the search
   pill's background — the 16px gap was not enough over a busy dark
   map. Now 24px (toolbar top = 72px). The chips strip below moves
   by the same amount (102 -> 126px) so it cannot slide under the
   search pill — the pill is 54px tall (10 + 34 + 10), so 72 + 54 =
   126 keeps the original flush rhythm. Both themes: the geometry
   must stay consistent, and light keeps its already-fine spacing,
   just a touch roomier. */
@media(max-width:900px){
  body.map-view .toolbar{top:72px}
  body.map-view .quick-filters{top:126px}
}

/* FIX 2026-10-31: the two previous gap bumps (64px, 72px) never
   applied on dark — they used body.map-view (0,2,1) while the dark
   rule from 19063ff is body.site-dark.map-view (0,3,1) and still
   won with top:56px. Lesson: always match or beat the specificity
   of the rule being overridden. This dark-specific rule finally
   moves the search pill to 72px = 24px gap under the 48px header. */
@media(max-width:900px){
  body.site-dark.map-view .toolbar{top:72px}
}

/* Detail card rework (2026-10-31, user feedback: messy card, mismatched
   badge backgrounds, "Факт о старте" removed).
   One section language for the whole sheet: same radius, same vertical
   rhythm, same box in both themes. The status strip is ONE box with two
   cells, so registration and participants can no longer drift apart. */
.detail-status-strip{display:flex;border:1px solid var(--line);border-radius:15px;margin-top:12px;overflow:hidden;background:#fff}
.detail-status-cell{flex:1;display:flex;flex-direction:column;gap:2px;padding:12px 14px;min-width:0}
.detail-status-cell+.detail-status-cell{border-left:1px solid var(--line)}
.dss-label{font-size:11px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--muted)}
.dss-value{font-size:17px;font-weight:800;line-height:1.25}
.dss-value.dss-closed{color:#b91c1c}
.dss-value.dss-open{color:#07805c}
.dss-value.dss-participants{color:#1d4ed8}
/* Quiet meta lines: countdown + distance sit under the date in the same
   muted voice instead of competing loud green. */
.detail-countdown,.detail-distance{font-size:13px;font-weight:650;color:var(--muted);margin:8px 0 0}
.detail-date{margin-bottom:12px}
/* Weather joins the section language instead of its yellow box. */
.detail-weather{font-size:14px;font-weight:650;line-height:1.5;background:#fff;border-color:var(--line)}
/* One vertical rhythm for every section + notes. */
.detail-info{margin-top:12px}
.detail-missing,.detail-approx{margin-top:12px;border-radius:14px;padding:10px 14px}
body.site-dark .detail-status-strip{background:#1a2739;border-color:#243447}
body.site-dark .detail-status-cell+.detail-status-cell{border-left-color:#243447}
body.site-dark .detail-status-strip .dss-label{color:#94a3b8}
body.site-dark .dss-value.dss-closed{color:#fca5a5}
body.site-dark .dss-value.dss-open{color:#7ee2b8}
body.site-dark .dss-value.dss-participants{color:#60a5fa}
body.site-dark .detail-weather{background:#1a2739;border-color:#243447;color:#e2e8f0}

/* Theme-equal geometry (2026-10-31, user feedback: bottom gaps differ
   between dark and light). Theme rules must carry COLOURS only; these
   rules pin the geometry so both themes measure the same. Found by
   audit: dark .map-carousel-head had 6px vertical padding (light: 0),
   making the "НА КАРТЕ" bar 12px taller in dark, and the dark .toolbar
   had 10px side insets + 10px padding (light: 12px + 10px 10px 4px),
   shifting the search pill and the chips gap. The dark overrides below
   tie the old dark rules in specificity and win by order. */
body.map-view .map-carousel-head{padding:6px 10px}
body.site-dark.map-view .map-carousel-head{padding:6px 10px}
body.map-view .toolbar{left:12px;right:12px;padding:10px 10px 4px}
body.site-dark.map-view .toolbar{left:12px;right:12px;padding:10px 10px 4px}

/* Neon cyberpunk pass, DARK theme only (2026-10-31, user request).
   Layout, geometry, content and the light theme are untouched: this
   block only adds glow (box-shadow / text-shadow) and slightly brighter
   neon tints on elements that already carry those colours. Green is the
   primary neon, cyan the secondary, magenta only the saved heart, gold
   only prices/stars. No animation: static glow stays readable and fast. */
body.site-dark .bottom-nav .nav-btn.active,body.site-dark .desktop-nav .nav-btn.active{box-shadow:0 0 18px rgba(12,175,131,.65),0 0 4px rgba(52,245,181,.9)}
body.site-dark .nav-btn.active{text-shadow:0 0 10px rgba(126,226,184,.55)}
body.site-dark .event-card{box-shadow:0 0 0 1px rgba(99,140,255,.18),0 0 22px rgba(99,140,255,.12)}
body.site-dark .event-card:hover{box-shadow:0 0 0 1px rgba(12,175,131,.55),0 0 26px rgba(12,175,131,.28)}
body.site-dark .event-title,body.site-dark .panel-heading strong,body.site-dark .detail-info:not(.detail-status)>strong{text-shadow:0 0 12px rgba(126,226,184,.30)}
body.site-dark .detail-title{box-shadow:0 0 20px rgba(12,175,131,.28)}
body.site-dark .detail-status-strip{box-shadow:0 0 18px rgba(99,140,255,.16)}
body.site-dark .dss-value.dss-open{text-shadow:0 0 12px rgba(126,226,184,.7)}
body.site-dark .dss-value.dss-closed{text-shadow:0 0 12px rgba(252,165,165,.7)}
body.site-dark .dss-value.dss-participants{text-shadow:0 0 12px rgba(96,165,250,.8)}
body.site-dark .heart.saved{color:#ff2d78;text-shadow:0 0 14px rgba(255,45,120,.85)}
body.site-dark .sport-chip.active{box-shadow:0 0 14px rgba(12,175,131,.45)}
body.site-dark .event-price,body.site-dark .detail-distance-row strong{text-shadow:0 0 10px rgba(252,211,77,.45)}
body.site-dark .rating-star.on{box-shadow:0 0 14px rgba(12,175,131,.5);text-shadow:0 0 10px rgba(126,226,184,.7)}
body.site-dark.map-view .map-carousel{box-shadow:0 8px 28px rgba(0,0,0,.5),0 0 26px rgba(99,140,255,.30)}
body.site-dark.map-view .topbar{box-shadow:0 0 22px rgba(99,140,255,.20)}
body.site-dark .search-wrap{box-shadow:0 0 16px rgba(12,175,131,.25)}
body.site-dark .status-row{box-shadow:0 0 18px rgba(99,140,255,.22)}
body.site-dark .toast{box-shadow:0 5px 20px rgba(0,0,0,.5),0 0 18px rgba(12,175,131,.35)}
body.site-dark .modal-close{box-shadow:0 0 14px rgba(99,140,255,.30)}

/* Neon on desktop (2026-10-31, user request): the first neon block
   already covered shared elements (cards, titles, status strip, chips,
   prices, stars); this one adds the desktop-only surfaces. Same rule:
   glow only, no geometry, dark theme only. */
body.site-dark .desktop-nav .nav-btn{box-shadow:0 0 12px rgba(99,140,255,.18)}
body.site-dark .side-panel{box-shadow:0 0 26px rgba(99,140,255,.20)}
body.site-dark .detail-sheet{box-shadow:0 24px 64px rgba(0,0,0,.55),0 0 30px rgba(99,140,255,.25)}
body.site-dark .stats-card{box-shadow:0 0 22px rgba(99,140,255,.18)}
body.site-dark .rating-row,body.site-dark .arch-row{box-shadow:0 0 18px rgba(99,140,255,.15)}
body.site-dark .topbar{box-shadow:0 4px 24px rgba(99,140,255,.18)}

/* PC map list "only open registration" checkbox (2026-10-31, user request).
   Visible only on the desktop map panel, right under the sort control;
   it also hides with the collapsed list, like the sort row itself. */
.sort-open-only{display:none}
@media(min-width:901px){
  body.map-view .sort-open-only{display:flex;align-items:center;gap:8px;padding:8px 16px 10px;border-bottom:1px solid #f0f2f5;font-size:12px;font-weight:650;color:var(--muted);cursor:pointer}
  body.map-view .sort-open-only input{accent-color:var(--green);width:16px;height:16px;margin:0;cursor:pointer}
  body.site-dark.map-view .sort-open-only{color:#94a3b8;border-bottom-color:#243447}
  body.map-view.list-collapsed .side-panel .sort-open-only{display:none}
}

/* Header logo is a home button (2026-10-31, user request). */
.brand{cursor:pointer}

/* Short dark pages showed a white strip below the footer (2026-10-31,
   user report: Results search with few rows). Cause: :root (html) has
   background #f5f7f9, and body is only as tall as its content, so below
   short content the canvas showed html's light bg. Stretching the dark
   body to viewport height keeps the dark bg everywhere, on any view. */
body.site-dark{min-height:100vh;min-height:100dvh}

/* Footer neon (2026-10-31, dark only): Unbounded is set on .site-footer
   above for both themes; the glow lives here, with the rest of neon. */
body.site-dark .site-footer{color:#7ee2b8;text-shadow:0 0 12px rgba(12,175,131,.55),0 0 28px rgba(12,175,131,.25)}

/* Search clear button (2026-10-31): the native type=search × never
   showed on the user's PC browser, so the field gets an explicit
   button, identical on desktop and mobile. The native affordance is
   hidden to avoid a double × on mobile browsers that render it. */
.search-wrap input[type="search"]::-webkit-search-cancel-button{display:none}
.search-clear{border:0;background:transparent;color:#84909b;font-size:20px;line-height:1;padding:0 2px;flex:none}
.search-clear:hover{color:#17212b}
body.site-dark .search-clear{color:#94a3b8}
body.site-dark .search-clear:hover{color:#e2e8f0}

/* Made by YR always visible (2026-10-31): on desktop the footer is
   fixed at the bottom-left corner on every view — the centered pill
   nav used to cover the in-flow footer, and the map view hid it
   entirely (two display:none rules above). The pill stays centered,
   the credit sits left, so they never overlap. z-index sits above
   the map (0) and side panel (600), below the pill (900) and modals. */
@media(min-width:901px){
  body.map-view .site-footer,.site-footer{position:fixed;left:16px;bottom:20px;z-index:650;text-align:left;padding:0;display:block}
}

/* Calendar entry from the panel (2026-10-31): calendar left the menus,
   so the panel heading carries the only way in — in list and map views
   (not favorites), hidden when the desktop map list is collapsed. */
.panel-calendar-btn{display:none;border:1px solid #8bd9bf;background:#e4fbf2;border-radius:12px;height:36px;padding:0 12px;font-size:13px;font-weight:750;line-height:1;color:#08795f;white-space:nowrap;flex-shrink:0}
body.list-view .panel-calendar-btn,body.map-view .panel-calendar-btn{display:block}
body.map-view.list-collapsed .side-panel .panel-calendar-btn{display:none}
body.site-dark .panel-calendar-btn{background:rgba(12,175,131,.14);border-color:rgba(12,175,131,.4);color:#7ee2b8}

/* Dark map loading (2026-11-01): on refresh the map engine needs ~1s
   to init and apply the dark theme, and the loading overlay + map
   container were light, so a pale flash showed inside the dark UI.
   Dark variants keep the whole sequence dark: overlay, container
   behind it, and the gap before dark tiles paint. Colours only. */
body.site-dark .map-loading{background:linear-gradient(135deg,#0a0f26,#070b1d 45%,#0e1330)}
body.site-dark .map-loading-text{color:#7ee2b8}
body.site-dark .map-loading-bar{background:#ffffff22;box-shadow:inset 0 0 0 1px #0caf8344}
body.site-dark #map,body.site-dark .map-wrap{background:#070b1d}
body.site-dark .leaflet-container{background:#070b1d}
