/* Attraction Tracker — Nocturne tokens (subset) + app layout.
   Keep every value referenced from the variables below. */
:root {
  --color-bg: #161826;
  --color-surface: #232532;
  --color-raised: #1b1d2b;
  --color-text: #e9e9ed;
  --color-text-dim: #c3c6d4;
  --color-muted: #9397ab;
  --color-accent: #9184d9;
  --color-accent-100: #f5f4ff;
  --color-accent-300: #d2cefd;
  --color-accent-400: #b5abfc;
  --color-accent-500: #968ae0;
  --color-accent-700: #5d5294;
  --color-accent-900: #2b2741;
  --color-neutral-700: #3f424d;
  --color-divider: color-mix(in srgb, #e9e9ed 16%, transparent);
  --color-section: #262a60;
  --font-heading: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --space-2: 5.6px; --space-3: 8.4px; --space-4: 11.2px; --space-6: 16.8px; --space-8: 22.4px;
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 14px;
  --shadow-sm: 0 0 0 1px #3f424d;
  --shadow-md: 0 0 0 1px #595d6c, 0 6px 18px rgba(0,0,0,0.55);
  --tone-short: var(--color-accent-300);
  --tone-mid: var(--color-accent-500);
  --tone-long: var(--color-accent-700);
  --tone-closed: #6f7381;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  /* Matches .tabs/.topbar (--color-raised), not the page content's --color-bg —
     if .app's box ever falls short of the true screen edge for any reason, this
     is what shows through, and it should be invisible against the bottom bar
     rather than a visible seam. */
  margin: 0; background: var(--color-raised); color: var(--color-text);
  font-family: var(--font-body); font-size: 14px; -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-300); }
::selection { background: color-mix(in srgb, var(--color-accent) 32%, transparent); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 500; letter-spacing: -0.025em; margin: 0; }
button { font-family: inherit; }

/* ---------- splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 26px;
  background: radial-gradient(70% 55% at 50% 42%, #1f2135 0%, var(--color-bg) 70%);
  transition: opacity .4s ease, visibility .4s ease;
}
.splash[hidden] { display: flex; opacity: 0; visibility: hidden; pointer-events: none; }
.splash-mark { position: relative; display: grid; place-items: center; width: 112px; height: 112px; }
.splash-glow {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(145,132,217,.45) 0%, rgba(145,132,217,0) 68%);
  animation: glow 1.7s ease-in-out infinite;
}
.splash svg rect { transform-box: fill-box; transform-origin: bottom; animation: bar 1.15s ease-in-out infinite; }
.splash svg .b2 { animation-delay: .14s; }
.splash svg .b3 { animation-delay: .28s; }
.splash-word { font-family: var(--font-heading); font-size: 21px; font-weight: 500; letter-spacing: -.03em; }
.splash-word span { color: var(--color-accent-400); }
.splash-sub { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--color-muted); }
.splash-bar { width: 132px; height: 2px; border-radius: 2px; background: #2b2d3a; overflow: hidden; }
.splash-bar span { display: block; width: 32%; height: 100%; background: var(--color-accent); animation: sweep 1.1s ease-in-out infinite; }
@keyframes bar { 0%, 100% { transform: scaleY(.2); } 45% { transform: scaleY(1); } }
@keyframes glow { 0%, 100% { opacity: .25; transform: scale(.94); } 50% { opacity: .6; transform: scale(1.06); } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(320%); } }

.offline {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 7px 14px; text-align: center;
  font-size: 12px; background: var(--color-accent-900); color: var(--color-accent-300);
  border-bottom: 1px solid var(--color-accent-700);
}

/* ---------- shell ---------- */
/* No viewport-fit=cover (see index.html) — the browser keeps the whole page
   within the safe area automatically, so nothing here has to fight iOS over
   home-indicator/notch space with vh/dvh math or env(safe-area-inset-*). */
.app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.rail { display: none; }
.main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; height: 100%; }
.view { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 14px 12px; }

.topbar {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--color-divider); background: var(--color-raised);
}
.topbar-park {
  display: flex; align-items: center; gap: 7px; background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  padding: 6px 10px 6px 12px; cursor: pointer; color: var(--color-text);
}
.topbar-park-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.topbar-park b { font-size: 13px; font-weight: 500; }
.topbar-park span { font-size: 10.5px; color: var(--color-muted); }
.topbar-park svg { flex: none; color: var(--color-muted); }
#topbar-settings { margin-left: auto; }

.live-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 6px; border-radius: 999px; font-size: 10.5px; font-weight: 500; letter-spacing: .01em; white-space: nowrap; }
.live-chip-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.live-chip.is-live { background: var(--color-accent-900); color: var(--color-accent-300); }
.live-chip.is-live .live-chip-dot { background: var(--color-accent-400); animation: live-chip-pulse 1.7s ease-in-out infinite; }
.live-chip.is-connecting { background: #2b2d3a; color: var(--color-muted); }
.live-chip.is-connecting .live-chip-dot { background: var(--color-muted); animation: live-chip-pulse 1s ease-in-out infinite; }
.live-chip.is-offline { background: #2b2d3a; color: var(--color-text-dim); }
.live-chip.is-offline .live-chip-dot { background: var(--tone-closed); }
@keyframes live-chip-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.view-header {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px;
  border-bottom: 1px solid var(--color-divider); background: var(--color-bg);
}
.view-header h1 { font-size: 18px; flex: 1; min-width: 0; }
.view-header .view-back { flex: none; padding: 6px 8px 6px 2px; }
.view-header-live { display: inline-flex; margin-left: auto; flex: none; }

/* "More" bottom sheet (mobile) — a lightweight overlay instead of a full page. */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 55; background: rgba(10, 10, 16, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-backdrop[hidden] { display: none; }
.sheet {
  width: 100%; max-width: 480px; background: var(--color-raised); border-radius: 16px 16px 0 0;
  padding: 8px 14px 14px; box-shadow: var(--shadow-md);
  animation: sheet-up .18s ease-out;
}
.sheet-grip { width: 36px; height: 4px; border-radius: 2px; background: var(--color-neutral-700); margin: 6px auto 12px; }
#more-sheet-rows { display: flex; flex-direction: column; gap: 8px; }
@keyframes sheet-up { from { transform: translateY(16px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }

.tabs {
  /* Extra bottom breathing room so the label text isn't crowded by the
     home-indicator swipe area on iPhones with one. */
  flex: none; display: flex; gap: 2px; padding: 6px 6px 20px;
  border-top: 1px solid var(--color-divider); background: var(--color-raised);
}
.tabs button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0;
  border: 0; border-radius: var(--radius-sm); background: none; cursor: pointer;
  color: var(--color-muted); font-size: 10px; letter-spacing: .02em;
}
.tabs button svg { display: block; }
.tabs button[aria-current="page"] { color: var(--color-accent-400); }
.tab-icon { position: relative; display: flex; }
.tab-badge {
  position: absolute; top: -4px; right: -7px; min-width: 14px; height: 14px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center; border-radius: 999px;
  background: var(--color-accent-400); color: var(--color-bg); font-size: 9px; font-weight: 700;
  font-variant-numeric: tabular-nums; line-height: 1; box-shadow: 0 0 0 2px var(--color-raised);
}

@media (min-width: 900px) {
  .rail {
    display: flex; flex-direction: column; gap: 16px; width: 238px; flex: none;
    padding: 20px 14px; background: var(--color-raised); border-right: 1px solid var(--color-divider);
    height: 100%; overflow-y: auto;
  }
  .brand {
    display: flex; align-items: center; gap: 9px; font-family: var(--font-heading); font-size: 16px;
    font-weight: 500; letter-spacing: -.02em; color: inherit;
  }
  .brand b { color: var(--color-accent-400); font-weight: 500; }
  .rail-park {
    display: flex; flex-direction: column; gap: 5px; padding: 12px; background: var(--color-surface);
    border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  }
  .rail-park-name { font-size: 14px; font-weight: 500; color: var(--color-text); }
  .rail-park-meta { font-size: 11px; color: var(--color-muted); }
  .rail-park-btn { width: 100%; justify-content: center; margin-top: 3px; }
  .rail-nav { display: flex; flex-direction: column; gap: 2px; }
  .rail-nav button {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: var(--radius-md);
    background: none; color: var(--color-text-dim); font-size: 13px; text-align: left; cursor: pointer;
  }
  .rail-nav button:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
  .rail-nav button[aria-current="page"] { background: var(--color-accent-900); color: var(--color-text); font-weight: 500; }
  .rail-nav .count { margin-left: auto; font-size: 11px; color: var(--color-muted); font-variant-numeric: tabular-nums; }
  .rail-settings { margin-top: auto; }
  .rail-foot { margin: 0; font-size: 11px; line-height: 1.5; color: var(--color-muted); }
  .topbar, .tabs { display: none; }
  .view-header { padding: 20px 26px 16px; }
  .view-header h1 { font-size: 20px; }
  .view { padding: 22px 26px 44px; }
}

/* ---------- pieces ---------- */
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card h2 { font-size: 15px; }
.park-head { background: linear-gradient(150deg, var(--color-accent-900) 0%, var(--color-surface) 62%); }
.park-head h1 { font-size: 22px; }
.park-head-closed, .park-head-open {
  position: absolute; right: 16px; bottom: 12px;
  font-size: 22px; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase; opacity: 0.85; pointer-events: none;
}
.park-head-closed { color: #e5484d; }
.park-head-open { color: var(--color-accent-400); }
.kicker { font-size: 11px; letter-spacing: .11em; text-transform: uppercase; color: var(--color-muted); }
.stat { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.stat b { font-family: var(--font-heading); font-size: 18px; font-weight: 500; }
.stat small { font-size: 11px; color: var(--color-muted); }
.stat-link { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; }
.stat-link small { color: var(--color-accent-300); }
.stat-link:hover b { color: var(--color-accent-300); }
.meter { height: 4px; border-radius: 2px; background: #2b2d3a; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 2px; }
.row { display: flex; gap: 18px; flex-wrap: wrap; }

/* The park home and live-queues top cards each open with a row of 3 stats —
   at mobile widths .stat's own min-width:120px doesn't fit 3 across, so .row's
   flex-wrap folded it onto a 3rd/4th line. Below the rail breakpoint (900px,
   where there's no room to spare) keep the row to one line by shrinking the
   columns to fit instead, truncating anything that doesn't. */
@media (max-width: 899px) {
  .stats-row { flex-wrap: nowrap; gap: 10px; }
  .stats-row .stat { min-width: 0; flex: 1; }
  .stats-row .stat b, .stats-row .stat small, .stats-row .kicker {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
}

.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11px; }
.tag-accent { background: var(--color-accent-900); color: var(--color-accent-300); }
.tag-neutral { background: #2b2d3a; color: var(--color-muted); }
.tag-outline { border: 1px solid var(--color-divider); color: var(--color-text-dim); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13px; border-radius: var(--radius-md); cursor: pointer; background: transparent; }
.btn-primary { border: 1px solid var(--color-accent); color: var(--color-accent-300); }
.btn-primary:hover { background: color-mix(in srgb, var(--color-accent) 14%, transparent); }
.btn-primary:active { border-color: var(--color-accent-400); }
.btn-secondary { border: 1px solid var(--color-divider); color: var(--color-text); }
.btn-secondary:hover { border-color: var(--color-accent-700); }
.btn-ghost { border: 0; color: var(--color-text-dim); }
.btn-icon { border: 0; padding: 6px; color: var(--color-text-dim); font-size: 15px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; font-size: 12px; border-radius: 999px; border: 1px solid var(--color-divider); background: none; color: var(--color-text-dim); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--color-accent-900); border-color: var(--color-accent-700); color: var(--color-text); }

.park-list { display: flex; flex-direction: column; gap: 8px; }
.park-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%;
  background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); color: inherit; text-align: left; cursor: pointer;
}
.park-card:hover { border-color: var(--color-accent-700); }
.park-card[aria-current="true"] { border-color: var(--color-accent); background: var(--color-accent-900); }
.park-card h3 { font-size: 15px; font-weight: 500; }
.park-card .col { flex: 1; min-width: 0; }
.park-card .stat { flex: none; gap: 2px; }
.park-card .stat b { font-size: 14px; }
.park-card .stat small { font-size: 10.5px; }

/* ---------- opening-times calendar ---------- */
.cal-yearnav { display: flex; align-items: center; gap: 4px; }
.cal-yearnav h1 { font-size: 18px; margin: 0 4px; min-width: 52px; text-align: center; }
.cal-month h3 { font-size: 14px; margin-bottom: 2px; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-weekdays span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--color-muted); text-align: center; padding-bottom: 2px; }
.cal-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 6px 2px; border-radius: var(--radius-sm); background: var(--color-raised); min-width: 0;
}
.cal-cell-blank { background: none; }
.cal-cell-num { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--color-text-dim); }
.cal-cell-hours { font-size: 8px; line-height: 1.2; color: var(--color-muted); text-align: center; padding: 0 1px; }
.cal-cell.is-open { background: var(--color-accent-900); }
.cal-cell.is-open .cal-cell-num { color: var(--color-accent-300); font-weight: 600; }
.cal-cell.is-closed .cal-cell-num { color: var(--tone-closed); }
@media (min-width: 720px) {
  .cal-cell-hours { font-size: 9px; }
}

.more-row {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px;
  background: var(--color-surface); border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  color: inherit; text-align: left; cursor: pointer;
}
.more-row:hover { background: #2a2c3a; }
.more-row-icon { flex: none; width: 22px; display: flex; align-items: center; justify-content: center; color: var(--color-accent-400); }
.more-row b { font-size: 14px; font-weight: 500; }
.more-row small { font-size: 11.5px; color: var(--color-muted); }
.more-row-arrow { margin-left: auto; flex: none; font-size: 16px; color: var(--color-muted); }
.count { font-size: 11px; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.more-row .count { margin-left: auto; padding-right: 4px; }

.list { display: flex; flex-direction: column; gap: 7px; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--color-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.item:hover { background: #2a2c3a; }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; background: none; border: 0; padding: 0; text-align: left; color: inherit; cursor: pointer; }
.item-main b { font-size: 14px; font-weight: 500; }
.item-main small { font-size: 11.5px; color: var(--color-muted); }
.item-notice { font-style: italic; color: var(--color-text-dim); }
.wait { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; background: none; border: 0; cursor: pointer; color: inherit; }
.wait-n { font-family: var(--font-heading); font-size: 17px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.wait-u { font-size: 10px; color: var(--color-muted); letter-spacing: .06em; }
.wait .meter { width: 62px; }
.fav { border: 0; background: none; cursor: pointer; font-size: 16px; color: var(--color-muted); }
.fav[aria-pressed="true"] { color: var(--color-accent-400); }
.plan-toggle { display: flex; align-items: center; }

.short { display: flex; gap: 8px; flex-wrap: wrap; }
.short button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-md); color: var(--color-text); cursor: pointer; text-align: left; }
.short button:hover { border-color: var(--color-accent-700); }

.hero { position: relative; height: 172px; padding: 16px; display: flex; align-items: flex-end; border-radius: var(--radius-lg); overflow: hidden; background: radial-gradient(120% 120% at 22% 12%, var(--color-accent-900) 0%, var(--color-raised) 74%); box-shadow: inset var(--shadow-sm); }
.hero svg { position: absolute; right: 18px; top: 8px; opacity: .16; }
.hero h1 { font-size: 22px; position: relative; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,24,38,0) 40%, rgba(22,24,38,.92) 100%); }
.hero > .col { position: relative; }
.trend { display: flex; align-items: flex-end; gap: 6px; height: 52px; }
.trend span { flex: 1; border-radius: 3px; background: var(--color-neutral-700); }
.info { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding-top: 4px; border-top: 1px solid var(--color-divider); }
.info div { display: flex; flex-direction: column; gap: 3px; }
.info span { font-size: 13px; }

/* ---------- ride detail: gallery + history chart ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.gallery-item { display: block; width: 100%; border: 0; padding: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--color-raised); cursor: pointer; }
.gallery-item img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery-item:hover img { opacity: .85; }

/* Full-screen photo viewer opened from the gallery (see openLightbox in app.js) */
.lightbox-backdrop {
  position: fixed; inset: 0; z-index: 70; background: rgba(10, 10, 16, .92);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-backdrop[hidden] { display: none; }
.lightbox-stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; width: 100%; height: 100%; padding: 56px 64px; box-sizing: border-box;
}
.lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-md); }
.lightbox-caption { font-size: 12.5px; color: var(--color-text-dim); text-align: center; max-width: 560px; }
.lightbox-caption[hidden] { display: none; }
.lightbox-close, .lightbox-nav {
  position: fixed; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff;
  cursor: pointer; font-size: 22px; line-height: 1;
}
.lightbox-close { top: 14px; right: 14px; width: 38px; height: 38px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 44px; height: 44px; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
.lightbox-nav[hidden] { display: none; }
.lightbox-counter {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
  font-size: 11.5px; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums;
}
@media (min-width: 900px) {
  .lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, .22); }
}

.ride-layout { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.history-card { min-width: 0; }
.history-chart-wrap { position: relative; }
.history-chart { display: block; width: 100%; height: auto; overflow: visible; }
.history-chart rect { transition: opacity .1s; }
.history-chart rect:hover, .history-chart rect:focus { opacity: .75; outline: none; }
.history-tooltip {
  position: absolute; top: -8px; transform: translate(-50%, -100%); white-space: nowrap;
  padding: 4px 8px; border-radius: var(--radius-sm); background: var(--color-raised);
  border: 1px solid var(--color-divider); font-size: 11px; color: var(--color-text); pointer-events: none;
}
@media (min-width: 900px) {
  /* The ride detail page has real width to spare here — the history chart
     fills it instead of sitting in dead space to the right of a
     max-width:760px column. ride-history spans both rows so it runs the
     full height of ride-top + ride-bottom, not just the first. */
  .ride-layout {
    display: grid; grid-template-columns: minmax(0, 760px) 1fr; grid-template-rows: auto 1fr;
    align-items: start; gap: 16px 24px; max-width: none;
  }
  .ride-top { grid-column: 1; grid-row: 1; }
  .ride-history { grid-column: 2; grid-row: 1 / span 2; }
  .ride-bottom { grid-column: 1; grid-row: 2; }
}

/* Home page: park info + reliability chart + area tiles, laid out so the
   chart sits under the park card on mobile and beside it on desktop — same
   trick as .ride-layout, same side (the aside is the right-hand column). */
.home-layout { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
@media (min-width: 900px) {
  .home-layout { display: grid; grid-template-columns: minmax(0, 760px) 280px; grid-auto-rows: min-content; align-items: start; gap: 16px 24px; max-width: none; }
  .home-head { grid-column: 1; grid-row: 1; }
  .home-uptime { grid-column: 2; grid-row: 1 / span 2; }
  .home-rest { grid-column: 1; grid-row: 2; }
}

.uptime-bar { display: flex; width: 100%; height: 14px; border-radius: 7px; overflow: hidden; background: var(--color-raised); }
.uptime-seg { display: block; height: 100%; }
.uptime-up { background: var(--color-accent-400); }
.uptime-down { background: #e5484d; }
.uptime-legend { display: flex; flex-wrap: wrap; gap: 14px; }
.uptime-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--color-text-dim); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot-up { background: var(--color-accent-400); }
.dot-down { background: #e5484d; }

.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.area-tile {
  position: relative; display: flex; flex-direction: column; gap: 0; padding: 0;
  background: var(--color-raised); border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  overflow: hidden; cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.area-tile-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--color-accent-900); }
.area-tile-placeholder { display: flex; align-items: center; justify-content: center; color: var(--color-accent-400); font-size: 28px; font-weight: 600; }
.area-tile-body { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; }
.area-tile-body b { font-size: 13px; font-weight: 500; }
.area-tile-body small { font-size: 11px; color: var(--color-muted); }
.area-tile-wait {
  position: absolute; top: 6px; right: 6px; padding: 2px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--color-bg) 70%, transparent); font-size: 11px; font-weight: 600; color: var(--color-accent-300);
}

.area-hero-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius-lg); display: block; }

/* Park history — a plain flex rail per entry (dot + connecting line) rather
   than absolutely-positioned dots on a shared line, so nothing depends on
   pixel-matching two separately-laid-out elements. */
.history-timeline { display: flex; flex-direction: column; }
.history-entry { display: flex; gap: 12px; }
.history-rail { display: flex; flex-direction: column; align-items: center; width: 10px; flex: none; }
.history-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent-400); flex: none; margin-top: 5px; }
.history-line { width: 2px; flex: 1; min-height: 14px; background: var(--color-divider); margin-top: 2px; }
.history-entry:last-child .history-line { display: none; }
.history-body { flex: 1; min-width: 0; padding-bottom: 16px; }
.history-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.history-date { font-size: 11px; color: var(--color-muted); font-variant-numeric: tabular-nums; }

/* Park history — Areas and Attractions no longer here, both plain rows. */
.hist-list { display: flex; flex-direction: column; }
.hist-list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-divider); }
.hist-list-row:first-child { border-top: 0; padding-top: 0; }

.input { width: 100%; padding: 12px 14px; font: inherit; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-md); }
.input:focus { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.pref { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--color-divider); }
.pref:last-child { border-bottom: 0; }
.pref div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pref small { font-size: 11.5px; color: var(--color-muted); }
.switch { width: 40px; height: 23px; flex: none; padding: 2px; border: 0; border-radius: 12px; background: var(--color-neutral-700); display: flex; justify-content: flex-start; align-items: center; cursor: pointer; }
.switch[aria-checked="true"] { background: var(--color-accent-700); justify-content: flex-end; }

.customise-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--color-divider); }
.customise-row:last-child { border-bottom: 0; }
.customise-label { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; font-size: 14px; }
.customise-label svg { flex: none; color: var(--color-accent-400); }
.customise-move { display: flex; gap: 4px; flex: none; }
.customise-row.is-pinned .customise-label { opacity: .65; }
.customise-row.is-pinned .customise-label svg { color: var(--color-muted); }
.customise-pinned-note { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--color-muted); flex: none; }
.customise-divider {
  padding: 12px 0 6px; margin-top: 2px; border-top: 1px dashed var(--color-divider);
  font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--color-muted); text-align: center;
}
.switch span { display: block; width: 19px; height: 19px; border-radius: 50%; background: var(--color-muted); }
.switch[aria-checked="true"] span { background: var(--color-accent-300); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px; text-align: center; background: var(--color-surface); border-radius: var(--radius-lg); font-size: 13px; color: var(--color-muted); }
.foot { font-size: 11.5px; line-height: 1.7; color: var(--color-muted); }
