:root{
  /* Typography */
  --cike-font:system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif;
  --cike-font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

  /* Semantic color */
  --cike-text:#263343;
  --cike-text-strong:#25374a;
  --cike-muted:#687587;
  --cike-muted-soft:#758090;
  --cike-brand:#8b2533;
  --cike-brand-hover:#a02b37;
  --cike-brand-active:#761c29;
  --cike-primary:#365e89;
  --cike-primary-hover:#27496d;
  --cike-status:#6f3578;
  --cike-status-strong:#660874;
  --cike-status-soft:#f5eff6;
  --cike-focus:#3974bd;
  --cike-line:#dce3eb;
  --cike-control-line:#cbd5e1;
  --cike-surface:#fff;
  --cike-surface-soft:#f3f6f9;
  --cike-surface-muted:#f7f9fb;
  --cike-now:#9d3d42;
  --cike-now-soft:#f8eeee;
  --cike-danger:#ad3535;
  --cike-danger-soft:#fff5f4;

  /* Map chrome: one visual material shared by 2D, 3D and indoor controls. */
  --cike-map-canvas:#eef0eb;
  --cike-map-paper:#fffdfa;
  --cike-map-paper-solid:#fff;
  --cike-map-line:#d3d0c9;
  --cike-map-line-soft:#e4e1da;
  --cike-map-text:#4b5156;
  --cike-map-muted:#687078;
  --cike-map-accent:#7b2432;
  --cike-map-accent-soft:#f3e8e9;
  --cike-map-chip:#edf2ef;
  --cike-map-chip-text:#48675d;

  /* Shape: semantic names intentionally describe usage, not size. */
  --cike-radius-control:7px;
  --cike-radius-card:8px;
  --cike-radius-dialog:11px;
  --cike-radius-sheet:18px;
  --cike-radius-pill:999px;

  /* Control */
  --cike-control-height:40px;
  --cike-control-height-comfortable:42px;
  --cike-touch-size:44px;

  /* Spacing */
  --cike-space-1:4px;
  --cike-space-2:8px;
  --cike-space-3:12px;
  --cike-space-4:16px;
  --cike-space-5:20px;
  --cike-space-6:24px;

  /* Elevation: shadow represents floating relationship, not decoration. */
  --cike-shadow-popover:0 6px 20px rgba(35,54,71,.13);
  --cike-shadow-map-control:0 4px 18px rgba(35,54,71,.15);
  --cike-shadow-sheet:0 -8px 28px rgba(34,56,75,.17);
  --cike-shadow-dialog:0 15px 65px rgba(24,45,67,.17);

  /* Motion */
  --cike-motion-control:160ms;
  --cike-motion-overlay:220ms;
  --cike-motion-sheet:280ms;
  --cike-motion-map-attention:300ms;
  --cike-motion-map-hover:160ms;
  --cike-motion-map-stage:220ms;
  --cike-ease-standard:cubic-bezier(.2,.8,.2,1);
  --cike-ease-enter:cubic-bezier(.16,1,.3,1);
  --cike-control-lift:-2px;
  --cike-control-press-scale:.975;
  --cike-control-press-scale-strong:.96;
  --cike-shadow-control-rest:0 2px 8px rgba(35,54,71,.07);
  --cike-shadow-control-hover:0 8px 22px rgba(35,54,71,.15);
  --cike-shadow-control-pressed:0 2px 7px rgba(35,54,71,.10);

  /* Shared liquid-glass material. Components keep their own geometry. */
  --cike-glass-control-bg:linear-gradient(180deg,rgba(248,250,250,.72),rgba(234,238,239,.58));
  --cike-glass-control-bg-hover:linear-gradient(180deg,rgba(252,253,253,.80),rgba(239,242,243,.66));
  --cike-glass-control-border:rgba(255,255,255,.62);
  --cike-glass-control-shadow:0 0 0 1px rgba(32,45,55,.08),0 6px 20px rgba(38,57,77,.13),inset 0 1px 0 rgba(255,255,255,.70);
  --cike-glass-control-filter:blur(20px) saturate(1.20);
  --cike-glass-panel-bg:rgba(236,240,241,.86);
  --cike-glass-panel-border:rgba(186,197,203,.72);
  --cike-glass-panel-shadow:0 10px 30px rgba(35,54,71,.15),inset 0 1px 0 rgba(255,255,255,.54);
  --cike-glass-panel-filter:blur(22px) saturate(1.12);

  /* Product layer semantics. Leaflet panes may keep their own internal z-index scale. */
  --cike-z-map:0;
  --cike-z-map-overlay:10;
  --cike-z-map-ui:20;
  --cike-z-popover:40;
  --cike-z-sheet:60;
  --cike-z-dialog:100;
  /* Map product layers share the page with Leaflet panes, so they use a separate semantic scale. */
  --cike-z-map-control:320;
  --cike-z-map-detail-card:760;
  --cike-z-map-popover:880;
  --cike-z-map-topbar:900;
  --cike-z-map-sheet:1000;
}

html[data-theme="dark"]{
  --cike-text:#dce5ec;--cike-text-strong:#eef4f8;--cike-muted:#9aa9b5;--cike-muted-soft:#81919e;
  --cike-brand:#d97986;--cike-brand-hover:#e48a95;--cike-brand-active:#c86775;
  --cike-primary:#78a9d3;--cike-primary-hover:#8db9dd;--cike-status:#d59bdd;--cike-status-strong:#e5b3eb;--cike-status-soft:#29202d;
  --cike-focus:#78aee8;--cike-line:#2c3943;--cike-control-line:#3a4955;
  --cike-surface:#182129;--cike-surface-soft:#222d36;--cike-surface-muted:#111820;
  --cike-now:#df8d94;--cike-now-soft:#321f22;--cike-danger:#ed8888;--cike-danger-soft:#351f21;
  --cike-map-paper:#182129;--cike-map-paper-solid:#182129;--cike-map-line:#394752;--cike-map-line-soft:#2b3740;
  --cike-map-text:#d9e2e8;--cike-map-muted:#9eabb5;--cike-map-accent:#df8591;--cike-map-accent-soft:#372329;--cike-map-chip:#26332f;--cike-map-chip-text:#9fc3b5;
  --cike-shadow-popover:0 8px 24px rgba(0,0,0,.28);--cike-shadow-map-control:0 5px 20px rgba(0,0,0,.30);--cike-shadow-sheet:0 -8px 30px rgba(0,0,0,.34);--cike-shadow-dialog:0 18px 70px rgba(0,0,0,.42);
  --cike-shadow-control-rest:0 2px 8px rgba(0,0,0,.18);--cike-shadow-control-hover:0 8px 22px rgba(0,0,0,.30);--cike-shadow-control-pressed:0 2px 7px rgba(0,0,0,.22);
  --cike-glass-control-bg:linear-gradient(180deg,rgba(43,55,64,.60),rgba(25,34,41,.50));
  --cike-glass-control-bg-hover:linear-gradient(180deg,rgba(52,66,76,.66),rgba(31,42,50,.56));
  --cike-glass-control-border:rgba(224,235,241,.22);
  --cike-glass-control-shadow:0 0 0 1px rgba(0,0,0,.20),0 7px 22px rgba(0,0,0,.20),inset 0 1px 0 rgba(236,244,248,.14);
  --cike-glass-control-filter:blur(20px) saturate(1.14);
  --cike-glass-panel-bg:rgba(29,40,48,.82);
  --cike-glass-panel-border:rgba(137,159,172,.24);
  --cike-glass-panel-shadow:0 12px 34px rgba(0,0,0,.28),inset 0 1px 0 rgba(220,234,241,.08);
  --cike-glass-panel-filter:blur(22px) saturate(1.08);
}
/* Shared compact two-way view switch. */
:is(.events-view-switch,.cike-segmented-control){display:flex;flex:none;gap:2px;padding:2px;border:1px solid var(--cike-line);border-radius:8px;background:var(--cike-surface-muted)}
:is(.events-view-switch,.cike-segmented-control) button{min-height:28px;padding:3px 8px;border:0;border-radius:5px;background:transparent;color:var(--cike-muted);font:inherit;font-size:11px;cursor:pointer}
:is(.events-view-switch,.cike-segmented-control) button[aria-pressed="true"]{background:var(--cike-surface);color:var(--cike-primary);box-shadow:0 1px 4px #17283a10;font-weight:650}
:is(.events-view-switch,.cike-segmented-control) button:focus-visible{outline:2px solid var(--cike-primary);outline-offset:1px}
