/* Race Travel — Tripsy-style redesign */
:root {
  /* surfaces */
  --bg-app: #F2EFE9;
  --bg-stage: #E8E4DC;
  --card: #FFFFFF;
  --card-dark: #1C1B1A;
  --card-dark-2: #16181D;

  /* ink */
  --ink: #1C1B1A;
  --ink-2: #6A655E;
  --ink-3: #9A9388;
  --ink-4: #A39A8C;
  --placeholder: #A8A094;

  /* hairlines */
  --hairline: #ECE8E0;
  --hairline-2: #F1ECE3;

  /* coral */
  --coral: #E2533B;
  --coral-grad: linear-gradient(150deg,#FF6B45,#E2533B);
  --coral-tint: #FBEDE9;
  --coral-text: #9A4634;
  --coral-deep: #C2410C;

  /* categorical */
  --blue: #3F5BB5; --blue-tint: #EDF1FB; --blue-deep: #1F3A6E;
  --green: #2F8A55; --green-tint: #EAF5EE;
  --orange: #E8842B; --orange-tint: #FFF1DE;
  --purple: #7C4FC4; --purple-tint: #F0EAFB;
  --pink: #C44E7A; --pink-tint: #FFEFF4;

  /* radii */
  --r-card: 20px;
  --r-card-lg: 22px;
  --r-tile: 14px;
  --r-pill: 20px;
  --r-btn: 14px;
  --r-sheet: 26px;

  /* shadows */
  --sh-card: 0 6px 18px -12px rgba(40,30,20,.22);
  --sh-card-lg: 0 10px 28px -14px rgba(40,30,20,.40);
  --sh-coral: 0 4px 10px -2px rgba(226,83,59,.5);

  /* tab inactive */
  --tab-inactive: #B0A89B;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg-stage); }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  min-height: 100vh;
}
button { font-family: inherit; }
input, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* Stage:
 *  - mobile (<960px): full-screen single column
 *  - desktop (≥960px): two-column layout with sidebar nav + content
 */
#app { display: flex; justify-content: stretch; align-items: stretch; min-height: 100vh; }
.stage {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background: var(--bg-app);
  position: relative;
  overflow: hidden;
}

@media (min-width: 960px) {
  #app { background: var(--bg-app); }
  body { background: var(--bg-app); }
  .stage {
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }
  /* Hide mobile tab bar on desktop — replaced by sidebar */
  .tabbar { display: none; }
  /* Override scroll container: not absolute, lives inside grid column */
  .stage > .scr {
    position: relative;
    grid-column: 2;
    overflow-y: auto;
    height: 100vh;
    padding-bottom: 40px;
  }
  /* Overlays cover content column only (not sidebar) */
  .stage > .ovl,
  .stage > .sheet-wrap {
    left: 260px;
  }
  /* Bento expands to wider columns on desktop */
  .bento {
    margin: 14px 32px 0;
    grid-template-columns: 1fr 1fr 1fr;
    max-width: 1100px;
  }
  .bento .hero-race.span2 { grid-column: 1 / span 3; height: 280px; }
  .bento .weather-mini,
  .bento .sources-mini { height: 160px; }
  .bento .quick-svc.span2 { grid-column: 1 / span 3; }
  /* Map gets more height on desktop */
  .gmap-wrap { margin: 14px 32px 0; height: 460px; max-width: 1100px; }
  /* Section padding */
  .pad { padding: 0 32px; max-width: 1100px; }
  /* Headers stretch wider */
  .topbar { padding-left: 32px; padding-right: 32px; max-width: 1100px; }
  /* Render hero+stats wider */
  .h1 { font-size: 38px; line-height: 1.08; letter-spacing: -.025em; }
  /* Race grid: 2-column race list */
  .pad[style*="flex-direction:column"] .race-card,
  .race-list-grid {
    /* no-op: parent grid */
  }
}

/* Sidebar (desktop only) */
.sidebar {
  display: none;
}
@media (min-width: 960px) {
  .sidebar {
    display: flex; flex-direction: column;
    grid-column: 1;
    background: linear-gradient(180deg, var(--bg-app), #e8e4dc);
    border-right: 1px solid var(--hairline);
    padding: 22px 14px 14px;
    overflow-y: auto;
  }
  .sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px 18px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 16px;
  }
  .sidebar-brand .r {
    width: 36px; height: 36px; border-radius: 11px;
    background: var(--coral-grad);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font: 800 18px/1 system-ui;
  }
  .sidebar-brand .name { font: 700 16px/1 system-ui; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 13px; border-radius: 11px;
    background: none; border: none; cursor: pointer;
    text-align: left; width: 100%;
    color: var(--ink-2); font: 600 13.5px/1 system-ui;
    transition: background .12s, color .12s;
  }
  .side-nav-item:hover { background: rgba(0,0,0,.04); color: var(--ink); }
  .side-nav-item.active { background: var(--coral-tint); color: var(--coral-text); }
  .side-nav-item.active svg { stroke: var(--coral); }
  .side-nav-item svg { stroke: currentColor; flex-shrink: 0; }
  .sidebar-footer {
    margin-top: auto; padding-top: 16px;
    border-top: 1px solid var(--hairline);
    display: flex; flex-direction: column; gap: 8px;
  }
  .sidebar-footer .lang-row {
    display: flex; gap: 4px; margin-top: 4px;
  }
  .sidebar-footer .lang-btn {
    background: rgba(0,0,0,.04); border: none; cursor: pointer;
    border-radius: 7px; padding: 6px 8px;
    font: 600 11px/1 system-ui; color: var(--ink-2);
    flex: 1;
  }
  .sidebar-footer .lang-btn.active {
    background: var(--coral); color: #fff;
  }
}

@media (max-width: 959px) {
  .sidebar { display: none !important; }
}

/* Scroll container */
.scr {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 104px;
}
.scr::-webkit-scrollbar { display: none; }

.pad { padding: 0 16px; }
.h1 { font: 700 27px/1.1 system-ui; color: var(--ink); letter-spacing: -.02em; }
.h2 { font: 700 19px/1.1 system-ui; color: var(--ink); }
.muted { color: var(--ink-3); font: 500 13px/1.4 system-ui; }
.uppercase { font: 700 12px/1 system-ui; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
}
.card-lg { box-shadow: var(--sh-card-lg); }

/* Tab bar */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  background: rgba(242,239,233,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid #e7e2da;
  padding: 9px 12px max(26px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  max-width: 100%;
}
@media (min-width: 720px) {
  .tabbar { position: absolute; }
}
.tb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  color: var(--tab-inactive);
}
.tb.active { color: var(--coral); }
.tb svg { display: block; }
.tlab { font: 600 10px/1 system-ui; }

/* Chips */
.chip {
  border: none;
  cursor: pointer;
  font: 600 13px/1 system-ui;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  background: var(--card);
  color: var(--ink-2);
  transition: background .12s;
}
.chip.active { background: var(--coral); color: #fff; }
.chip.dark.active { background: var(--ink); color: #fff; }
.chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 16px 4px;
  scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }

/* Buttons */
.btn {
  border: none; cursor: pointer; border-radius: var(--r-btn);
  font: 600 14px/1 system-ui; padding: 14px;
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-coral { background: var(--coral); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); border: 1px solid #e6e0d6; }

/* Search box */
.searchbox {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border-radius: 15px;
  padding: 14px 15px;
  box-shadow: 0 2px 8px -3px rgba(40,30,20,.1);
  cursor: pointer;
  border: none;
  width: 100%;
}
.searchbox .ph { font: 400 14.5px/1 system-ui; color: var(--placeholder); }

/* Top header (logo + lang + pro) */
.topbar {
  padding: 14px 16px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-r {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--coral-grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font: 800 18px/1 system-ui;
}
.wordmark { font: 600 16px/1 system-ui; color: var(--ink); }
.lang-pill {
  background: #fff; border: none; cursor: pointer;
  border-radius: 20px; padding: 7px 12px;
  font: 700 12px/1 system-ui; color: #3a342c;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.circle-btn {
  width: 34px; height: 34px;
  border-radius: 50%; background: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/* Bento grid */
.bento {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin: 14px 16px 0;
}
.bento .span2 { grid-column: 1 / span 2; }

/* Hero card (featured race) */
.hero-race {
  height: 182px; position: relative; overflow: hidden; cursor: pointer;
  box-shadow: 0 12px 30px -14px rgba(40,40,90,.5);
  border-radius: var(--r-card);
}
.hero-race .grad { position: absolute; inset: 0; }
.hero-race .high { position: absolute; inset: 0; background: radial-gradient(180px 130px at 80% 8%, rgba(255,255,255,.35), transparent 70%); }
.hero-race .wave { position: absolute; bottom: 0; left: 0; opacity: .32; }
.hero-race .badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,255,255,.92); border-radius: 8px;
  padding: 5px 9px; font: 700 10.5px/1 system-ui; color: var(--blue-deep);
}
.hero-race .countdown {
  position: absolute; top: 14px; right: 14px;
  background: rgba(12,14,18,.32); backdrop-filter: blur(6px);
  border-radius: 9px; padding: 5px 9px;
  font: 700 11px/1 system-ui; color: #fff;
}
.hero-race .info { position: absolute; left: 14px; bottom: 14px; color: #fff; }
.hero-race .lab { font: 500 11px/1 system-ui; opacity: .85; margin-bottom: 5px; }
.hero-race .name { font: 700 20px/1.05 system-ui; }
.hero-race .place { font: 500 12px/1 system-ui; opacity: .9; margin-top: 5px; }

/* Weather mini card */
.weather-mini {
  height: 130px;
  background: linear-gradient(160deg,#FFE3C4,#FFC98E);
  padding: 14px; position: relative; overflow: hidden; cursor: pointer;
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
}
.weather-mini .sun { position: absolute; top: 13px; right: 13px; }
.weather-mini .lab { font: 600 12px/1 system-ui; color: #9a5a22; }
.weather-mini .tmp { font: 700 34px/1 system-ui; color: #7a3f16; margin-top: 24px; }
.weather-mini .sub { font: 500 11px/1 system-ui; color: #a0682e; margin-top: 5px; }

/* Sources card (dark) */
.sources-mini {
  height: 130px; background: var(--card-dark); padding: 14px; color: #fff;
  position: relative; overflow: hidden; cursor: pointer;
  border-radius: var(--r-card);
}
.sources-mini .lab { font: 600 12px/1 system-ui; color: #9c958c; }
.sources-mini .n { font: 700 34px/1 system-ui; margin-top: 18px; }
.sources-mini .chips { display: flex; gap: 5px; margin-top: 12px; }
.sources-mini .chips span { font: 700 9.5px/1 system-ui; padding: 4px 6px; border-radius: 6px; }
.sources-mini .chips .a { background: rgba(226,83,59,.25); color: #FF9176; }
.sources-mini .chips .b { background: rgba(90,120,220,.25); color: #9DB2FF; }

/* Quick services row */
.quick-svc {
  background: var(--card); padding: 14px; border-radius: var(--r-card);
  box-shadow: var(--sh-card);
}
.quick-svc-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 13px;
}
.quick-svc-head .t { font: 700 14px/1 system-ui; color: var(--ink); }
.quick-svc-head .link {
  background: none; border: none; cursor: pointer;
  font: 600 12px/1 system-ui; color: var(--coral);
}
.quick-svc-grid { display: flex; justify-content: space-between; }
.qsvc {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.qsvc-ic {
  width: 46px; height: 46px; border-radius: var(--r-tile);
  display: flex; align-items: center; justify-content: center;
}
.qsvc-lab { font: 600 10px/1 system-ui; color: var(--ink-2); }

/* Race list card */
.race-card {
  border-radius: var(--r-card); overflow: hidden; cursor: pointer;
  background: var(--card);
  box-shadow: 0 10px 26px -16px rgba(40,30,20,.4);
}
.race-card .cover { height: 118px; position: relative; }
.race-card .cover .high { position: absolute; inset: 0; background: radial-gradient(140px 90px at 82% 6%, rgba(255,255,255,.28), transparent 70%); }
.race-card .badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,.92); border-radius: 7px;
  padding: 4px 8px; font: 700 10px/1 system-ui; color: var(--ink);
}
.race-card .status {
  position: absolute; top: 12px; right: 12px;
  border-radius: 7px; padding: 4px 8px;
  font: 700 10px/1 system-ui; color: #fff;
}
.race-card .status.open { background: rgba(47,138,85,.92); }
.race-card .status.soldout { background: rgba(120,120,130,.85); }
.race-card .name {
  position: absolute; left: 12px; bottom: 11px; color: #fff;
  font: 700 17px/1.1 system-ui;
}
.race-card .ft { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; }
.race-card .ft-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.race-card .place-line {
  display: flex; align-items: center; gap: 5px;
  font: 500 12.5px/1 system-ui; color: #8a857d;
  white-space: nowrap; overflow: hidden;
}
.race-card .date { font: 600 12.5px/1 system-ui; color: var(--ink); }
.race-card .sport-tag {
  display: inline-flex; align-items: center; gap: 3px;
  background: #F4F1EB; border-radius: 9px;
  padding: 7px 10px; font: 700 11px/1 system-ui; color: var(--ink-2);
  flex-shrink: 0; margin-left: 10px;
}

/* Packing list */
.pack-card {
  padding: 16px; display: flex; align-items: center; gap: 14px;
  cursor: pointer;
}
.pack-card .abbr {
  width: 46px; height: 46px; border-radius: var(--r-tile);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font: 700 17px/1 system-ui;
}
.pack-card .body { flex: 1; min-width: 0; }
.pack-card .label { font: 700 15px/1.2 system-ui; color: var(--ink); }
.pack-card .meta { font: 500 12px/1 system-ui; color: var(--ink-3); margin-top: 4px; }
.pack-card .bar {
  height: 6px; border-radius: 4px; background: #ECE7DE;
  margin-top: 9px; overflow: hidden;
}
.pack-card .bar > div { height: 100%; border-radius: 4px; }
.pack-card .chev svg { stroke: #c9c2b6; }

.ai-note {
  background: var(--coral-tint); border-radius: 18px; padding: 16px;
  display: flex; align-items: center; gap: 12px;
  font: 500 12.5px/1.45 system-ui; color: var(--coral-text);
}

/* Services row */
.svc-row {
  padding: 13px 14px; display: flex; align-items: center; gap: 13px;
  cursor: pointer;
  background: var(--card); border-radius: var(--r-card);
  box-shadow: 0 4px 14px -12px rgba(40,30,20,.3);
}
.svc-row .ic {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.svc-row .body { flex: 1; min-width: 0; }
.svc-row .name { font: 600 14px/1.2 system-ui; color: var(--ink); }
.svc-row .partner { font: 500 11.5px/1 system-ui; color: var(--ink-4); margin-top: 3px; }
.svc-row .chk {
  width: 24px; height: 24px; border-radius: 8px;
  border: 2px solid #d8d2c8; background: transparent;
  display: flex; align-items: center; justify-content: center;
}
.svc-row .chk.on { border-color: var(--coral); background: var(--coral); }

/* Sticky CTA */
.sticky-cta {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: 12px 16px max(26px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg-app) 32%);
}

/* Cabinet */
.cab-signin {
  padding: 20px; text-align: center;
  background: linear-gradient(160deg,#fff,#FBF6F2);
  border-radius: var(--r-card); box-shadow: var(--sh-card);
}
.cab-signin .av {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--coral-grad);
  margin: 0 auto; display: flex; align-items: center; justify-content: center;
  color: #fff; font: 800 26px/1 system-ui;
}
.cab-signin .title { font: 700 17px/1.2 system-ui; margin-top: 14px; }
.cab-signin .desc { font: 500 12.5px/1.5 system-ui; color: var(--ink-3); margin: 7px auto 0; max-width: 240px; }

.cab-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.cab-metric {
  padding: 15px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--sh-card);
}
.cab-metric .lab { font: 500 12px/1 system-ui; color: var(--ink-3); }
.cab-metric .num { font: 700 30px/1 system-ui; color: var(--ink); margin-top: 10px; }
.cab-metric .sub { font: 600 12px/1 system-ui; margin-top: 6px; }

/* Pro card */
.pro-card {
  border-radius: var(--r-card); padding: 18px; cursor: pointer;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg,#1c1b1a,#2c2722);
}
.pro-card .glow {
  position: absolute; top: -30px; right: -20px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(226,83,59,.5), transparent 70%);
}
.pro-card .tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(226,83,59,.2); border-radius: 8px;
  padding: 5px 9px; font: 700 10px/1 system-ui; color: #FF9176;
  position: relative;
}
.pro-card .t { font: 700 18px/1.2 system-ui; color: #fff; margin-top: 12px; position: relative; }
.pro-card .d { font: 500 12.5px/1.5 system-ui; color: #b8b2a8; margin-top: 7px; max-width: 260px; position: relative; }
.pro-card .cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  background: var(--coral); border-radius: 11px; padding: 10px 15px;
  font: 600 13px/1 system-ui; color: #fff; position: relative;
}

/* Menu list */
.menu-list {
  overflow: hidden; padding: 0;
  background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh-card);
}
.menu-item {
  width: 100%; background: none; border: none;
  border-top: 1px solid var(--hairline-2); cursor: pointer;
  display: flex; align-items: center; gap: 13px;
  padding: 14px 15px; text-align: left;
}
.menu-item:first-child { border-top: none; }
.menu-item .ic {
  width: 36px; height: 36px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.menu-item .lab { flex: 1; font: 600 14.5px/1.2 system-ui; color: var(--ink); }
.menu-item .chev { color: #c9c2b6; }

/* Overlays (push pages, race detail) */
.ovl {
  position: absolute; inset: 0; z-index: 50; background: var(--bg-app);
  animation: slidein .26s cubic-bezier(.22,.9,.3,1);
  overflow: hidden;
}
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.ovl-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 8;
  background: rgba(242,239,233,.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  display: flex; align-items: center; gap: 12px;
  min-height: 64px;
}
.ovl-back {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.ovl-title { font: 700 18px/1.1 system-ui; color: var(--ink); }
.ovl .scr { padding-top: 76px; padding-bottom: 60px; }

/* Race detail hero */
.det-hero {
  height: 300px; position: relative;
}
.det-hero .high {
  position: absolute; inset: 0;
  background: radial-gradient(220px 160px at 80% 4%, rgba(255,255,255,.32), transparent 70%),
              linear-gradient(transparent 40%, rgba(0,0,0,.45));
}
.det-hero .top-btn {
  position: absolute; top: max(54px, env(safe-area-inset-top)); width: 38px; height: 38px;
  border-radius: 50%; background: rgba(255,255,255,.92);
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.det-hero .top-btn.left { left: 16px; }
.det-hero .top-btn.right {
  right: 16px; width: auto;
  background: rgba(12,14,18,.32); border-radius: 11px;
  padding: 9px 13px; font: 700 12px/1 system-ui; color: #fff;
  gap: 5px;
}
.det-hero .info {
  position: absolute; left: 18px; bottom: 18px; right: 18px; color: #fff;
}
.det-hero .badge {
  display: inline-block; background: rgba(255,255,255,.92);
  border-radius: 7px; padding: 4px 9px;
  font: 700 10.5px/1 system-ui; color: var(--ink); margin-bottom: 10px;
}
.det-hero .name { font: 700 24px/1.1 system-ui; }
.det-hero .place {
  display: flex; align-items: center; gap: 8px; margin-top: 9px;
  font: 500 13px/1 system-ui; opacity: .95;
}

/* Action grid 2x2 */
.action-tile {
  border: none; cursor: pointer; text-align: left; padding: 15px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh-card);
}
.action-tile .ic {
  width: 42px; height: 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
}
.action-tile .t { font: 600 13px/1.2 system-ui; color: var(--ink); }
.action-tile .s { font: 500 11px/1 system-ui; color: var(--ink-4); }

/* Bottom sheet modal */
.sheet-wrap {
  position: absolute; inset: 0; z-index: 70;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: rgba(20,15,10,.42);
  animation: fade .2s ease;
}
.sheet {
  background: #F4F1EB; border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  max-height: 86%; overflow-y: auto;
  padding: 8px 16px max(30px, env(safe-area-inset-bottom));
  animation: up .3s cubic-bezier(.22,.9,.3,1);
}
.sheet::-webkit-scrollbar { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes up { from { transform: translateY(70px); } to { transform: translateY(0); } }
.grip { width: 38px; height: 5px; border-radius: 3px; background: #cfc8bd; margin: 8px auto 12px; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px;
}
.sheet-title { font: 700 19px/1 system-ui; color: var(--ink); }
.sheet-close {
  background: #ECE7DE; border: none; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%;
  font: 600 16px/1 system-ui; color: var(--ink-2);
}
.sheet-sub { font: 500 12.5px/1.5 system-ui; color: var(--ink-3); margin: 6px 0 14px; }

/* Toast modal */
.toast-icon {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--green-tint);
  margin: 0 auto; display: flex; align-items: center; justify-content: center;
}

/* Google Map on home */
.gmap-wrap {
  position: relative;
  margin: 14px 16px 0;
  height: 240px;
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--sh-card-lg);
  background: #d8d4ca;
}
.gmap-wrap #gmap { width: 100%; height: 100%; }
.gmap-loader {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); font: 500 13px/1 system-ui;
  pointer-events: none;
}
.gmap-fab {
  position: absolute; bottom: 12px; right: 12px; z-index: 5;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border: none; cursor: pointer; padding: 8px 14px;
  border-radius: 14px; font: 600 12px/1 system-ui; color: var(--coral);
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
  display: flex; align-items: center; gap: 6px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(1.3); }
}

/* Skeleton shimmer loaders */
@keyframes shimmer {
  0% { background-position: -800px 0; }
  100% { background-position: 800px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #ece7de 0%, #f4f1eb 50%, #ece7de 100%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--r-card);
}
.skel-race-card {
  height: 180px;
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--sh-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.skel-race-card .cover {
  height: 118px;
  background: linear-gradient(90deg, #d9dce0 0%, #e8ebef 50%, #d9dce0 100%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}
.skel-race-card .ft {
  flex: 1; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.skel-race-card .ft-line {
  height: 10px; background: #ece7de; border-radius: 4px;
}
.skel-race-card .ft-line.short { width: 60%; }
.skel-race-card .ft-line.long { width: 90%; }

/* Hidden */
.hidden { display: none !important; }

/* Status bar spacer (mobile-only safe inset) */
.safe-top { height: env(safe-area-inset-top); }
