/* ===== Scene layers ===== */
#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100lvh;
  z-index: 0;
  display: block;
}
.scene-fallback {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 80% at 30% 10%, #2a4a7d 0%, #142440 45%, #070a12 100%);
}
.no-webgl #scene { display: none; }
.scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* --scrim follows how bright the sky is (set from the engine), so text stays legible at noon. */
  background:
    radial-gradient(60% 55% at 14% 44%, rgba(0, 0, 0, var(--scrim, .34)), transparent 72%),
    linear-gradient(to bottom, rgba(0, 0, 0, .28), transparent 20%, transparent 62%, rgba(0, 0, 0, .34));
}
.veil {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: var(--veil);
  opacity: 0;
}
main { position: relative; z-index: 3; }

/* ===== Glass ===== */
.glass, .glass-strong {
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
}
.glass { background: var(--glass); }
.glass-strong { background: var(--glass-strong); }

/* Elements over the scene use light ink regardless of theme. */
.hero-wrap, .topbar {
  --text: var(--on-scene);
  --text-2: var(--on-scene-2);
  --text-3: var(--on-scene-3);
  --track: rgba(255, 255, 255, .14);
  --i-cloud: #eef3fa;
  --i-cloud-2: #b6c2d4;
  --i-moon: #eef1f8;
  --i-snow: #ffffff;
  --i-sun: #ffc85a;
  --rain-ink: #8fd0ff;
}

/* ===== Top bar ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  color: var(--text);
  transition: color .4s;
}
/* The glass lives on a pseudo-element: a backdrop-filter on the bar itself would trap the
   fixed-position mobile tab bar inside it. */
.topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--stroke-2);
  transition: opacity .4s var(--ease);
}
.is-scrolled .topbar::before, .is-map .topbar::before, .is-page .topbar::before { opacity: 1; }
[data-theme="light"] .is-scrolled .topbar,
[data-theme="light"] .is-map .topbar,
[data-theme="light"] .is-page .topbar,
[data-theme="light"] body.is-scrolled .topbar {
  --text: #0f1726;
  --text-2: rgba(15, 23, 38, .68);
  --track: rgba(15, 23, 38, .08);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 650;
  font-size: 17px;
  letter-spacing: .01em;
}
.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--track);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.tab {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: background-color .25s, color .25s;
}
.tab.is-active { background: rgba(255, 255, 255, .18); color: var(--text); }
[data-theme="light"] .is-scrolled .tab.is-active, [data-theme="light"] .is-map .tab.is-active, [data-theme="light"] .is-page .tab.is-active { background: #fff; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  min-width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  background: var(--track);
  border: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: background-color .2s, transform .2s var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, .2); }
.icon-btn:active { transform: scale(.95); }
.lab-btn { padding: 0 14px 0 12px; font-size: 13.5px; font-weight: 550; }

/* ===== Hero ===== */
.hero-wrap {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto auto;
  padding: 92px var(--gutter) 18px;
  color: var(--text);
}
.hero { align-self: center; align-self: safe center; max-width: 700px; text-shadow: 0 2px 30px rgba(0, 0, 0, .28); }
.hero-place { display: flex; align-items: flex-start; gap: 10px; }
.place-btn { display: flex; flex-direction: column; align-items: flex-start; text-align: left; border-radius: 12px; }
.place-name { display: inline-flex; align-items: center; gap: 8px; font-size: clamp(20px, 2vw, 24px); font-weight: 600; letter-spacing: -.01em; }
.place-name .ui-icon { opacity: .6; }
.place-meta { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.save-btn { min-width: 34px; height: 34px; margin-top: 2px; background: transparent; border-color: transparent; color: var(--text-2); }
.save-btn[aria-pressed="true"] { color: var(--i-sun); }
.save-btn[aria-pressed="true"] .ui-icon { fill: currentColor; }
.hero-main { margin-top: 10px; }
.temp-xl {
  display: flex;
  align-items: flex-start;
  font-size: clamp(112px, 17vw, 236px);
  font-weight: 200;
  letter-spacing: -.07em;
  line-height: .86;
  margin-left: -.06em;
  font-variant-numeric: proportional-nums;
}
.temp-xl .deg { font-size: .62em; font-weight: 200; opacity: .55; margin-left: .04em; letter-spacing: 0; }
.temp-xl.roll .num { animation: roll .9s var(--ease-out) both; }
@keyframes roll {
  from { transform: translateY(.12em); opacity: 0; filter: blur(8px); }
  to { transform: none; opacity: 1; filter: none; }
}
.cond-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: clamp(19px, 1.8vw, 23px); font-weight: 500; }
.cond-icon .wx-icon { filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .25)); }
.hilo { margin-top: 6px; font-size: 15px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.poem {
  margin-top: 26px;
  max-width: 26ch;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.22;
  letter-spacing: -.005em;
}
.summary { margin-top: 10px; font-size: 15px; color: var(--text-2); max-width: 46ch; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; min-height: 36px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 550;
  color: var(--text);
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  text-shadow: none;
  animation: fadeUp .5s var(--ease-out) both;
}
.preview-pill:hover { background: rgba(255, 255, 255, .22); }
.pill-sep { width: 1px; height: 12px; background: rgba(255, 255, 255, .35); }
.lab-pill { background: color-mix(in oklab, var(--accent) 26%, transparent); border-color: color-mix(in oklab, var(--accent) 50%, transparent); }

.is-ready .hero > .hero-inner > * { animation: rise 1.1s var(--ease-out) both; }
.is-ready .hero-inner > :nth-child(2) { animation-delay: .08s; }
.is-ready .hero-inner > :nth-child(3) { animation-delay: .22s; }
.is-ready .hero-inner > :nth-child(4) { animation-delay: .3s; }
.is-ready .hero-inner > :nth-child(5) { animation-delay: .36s; }
.is-ready .hourly { animation: rise 1.1s .3s var(--ease-out) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ===== Hourly ribbon ===== */
.hourly {
  min-width: 0;
  margin-top: 26px;
  padding: 14px 0 6px;
  border-radius: var(--r-lg);
  background: rgba(10, 14, 24, .26);
  border-color: rgba(255, 255, 255, .1);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5);
  min-height: 200px;
}
.ribbon-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 20px 4px; }
.ribbon-head h2 { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.ribbon-hint { font-size: 12px; color: var(--text-3); }
.ribbon-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  padding: 0 12px;
  cursor: grab;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22px, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 22px, #000 calc(100% - 22px), transparent);
}
.ribbon-scroll::-webkit-scrollbar { display: none; }
.ribbon-scroll:active { cursor: grabbing; }
.ribbon-track { position: relative; display: flex; height: 164px; }
.ribbon-curve { position: absolute; top: 0; left: 0; pointer-events: none; }
.hour {
  position: relative;
  flex: none;
  width: 60px;
  height: 100%;
  border-radius: 16px;
  transition: background-color .25s;
}
.hour:hover { background: rgba(255, 255, 255, .06); }
.hour.is-sel { background: rgba(255, 255, 255, .12); }
.hour > span { position: absolute; left: 0; right: 0; text-align: center; }
.h-temp { top: calc(var(--y) - 24px); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.h-icon { top: 98px; display: flex; justify-content: center; }
.h-time { top: 132px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.is-now .h-time { color: var(--text); font-weight: 650; }
.h-pop { top: 148px; font-size: 11px; font-weight: 600; color: var(--rain-ink); }
.mark .h-icon { color: var(--warm); }
.mark .h-temp { color: var(--warm); }
.mark .h-pop { display: none; }

.scroll-cue {
  justify-self: center;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
}
.scroll-cue .ui-icon { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* ===== Details ===== */
.details {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px var(--gutter) 40px;
  display: grid;
  grid-template-columns: minmax(320px, 410px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.daily { position: sticky; top: 86px; border-radius: var(--r-lg); padding: 18px 14px 12px; }
.daily > .card-title { padding: 0 8px; }
.days { margin-top: 6px; }
.day {
  display: grid;
  grid-template-columns: 86px 32px 40px 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border-radius: 12px;
  text-align: left;
  font-variant-numeric: tabular-nums;
  transition: background-color .2s;
}
.day:hover { background: var(--track); }
.d-name b { display: block; font-weight: 600; font-size: 14.5px; }
.d-name small { display: block; font-size: 12px; color: var(--text-3); }
.d-pop { font-size: 12px; font-weight: 650; color: var(--rain-ink); }
.d-lo { text-align: right; color: var(--text-2); }
.d-hi { font-weight: 650; }
.d-bar { position: relative; height: 6px; border-radius: 3px; background: var(--track); }
.d-fill { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.d-dot {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text);
  border: 2px solid var(--card-solid);
  transform: translate(-50%, -50%);
}
.is-ready .day { animation: fadeUp .6s var(--ease-out) both; animation-delay: calc(var(--i) * 30ms + .2s); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  grid-auto-flow: row dense; /* narrow cards fill the gaps the wide ones leave */
  gap: 20px;
}
.card {
  position: relative;
  border-radius: var(--r-lg);
  padding: 18px 20px 20px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.card-wide { grid-column: span 2; }
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.card p { font-size: 14px; }
.metric { font-size: 46px !important; font-weight: 300; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.metric small { font-size: 20px; color: var(--text-2); letter-spacing: 0; }
.big-line { font-size: 18px !important; font-weight: 550; letter-spacing: -.01em; }
.sub-title { font-size: 12px !important; color: var(--text-3); }
.center { text-align: center; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.gauge { width: 100%; max-width: 168px; margin: 0 auto; }
.g-val { font-size: 22px; font-weight: 550; fill: var(--text); font-family: var(--font-ui); }
.g-sub { font-size: 11px; fill: var(--text-2); font-family: var(--font-ui); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; gap: 4px; font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--track); margin: 0 4px 4px 0; }
.chip b { font-weight: 650; }
.unit-note { font-size: 11px !important; color: var(--text-3); }

.wind-wrap { display: flex; align-items: center; gap: 22px; flex: 1; }
.compass { width: 140px; flex: none; }
.c-ticks line { stroke: var(--track); stroke-width: 1.4; }
.c-letters text { fill: var(--text-3); font-size: 9px; font-weight: 650; font-family: var(--font-ui); }
.c-needle { transform-box: view-box; transform-origin: 60px 60px; transition: transform 1.4s var(--ease-out); }
.c-needle line { stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; }
.c-needle path { fill: var(--accent); }
.c-needle circle { fill: var(--accent-2); }
.c-hub { fill: var(--card-solid); stroke: var(--track); }
.c-val { font-size: 15px; font-weight: 650; fill: var(--text); font-family: var(--font-ui); }
.c-unit { font-size: 8px; fill: var(--text-3); font-family: var(--font-ui); }
.wind-text { display: flex; flex-direction: column; gap: 4px; }

.nowcast { display: flex; align-items: flex-end; gap: 5px; height: 56px; margin-top: 4px; }
.nowcast i {
  flex: 1;
  height: max(var(--h), 4%);
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(to top, var(--i-rain), color-mix(in oklab, var(--i-rain) 35%, transparent));
}
.nowcast-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); }

.sun-arc { width: 100%; height: auto; max-height: 120px; }
.sun-times { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; margin-top: -4px; }
.up { color: #46c983; }
.down { color: #ff8a6b; }
[data-theme="light"] .up { color: #1a9c57; }
[data-theme="light"] .down { color: #d4552f; }

.moon-wrap { display: flex; gap: 18px; align-items: center; flex: 1; }
.moon-svg { flex: none; filter: drop-shadow(0 0 18px rgba(255, 248, 230, .18)); }

.vis-layers { display: flex; gap: 6px; height: 34px; align-items: flex-end; margin: 4px 0; }
.vis-layers i { flex: 1; height: calc(100% - var(--i) * 6px); border-radius: 6px; background: var(--accent-2); opacity: max(.08, var(--o)); }

.cl-rows { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 6px; }
.cl-row { display: grid; grid-template-columns: 62px 1fr 38px; align-items: center; gap: 10px; font-size: 13px; }
.cl-name small { display: block; font-size: 10px; color: var(--text-3); }
.cl-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }

.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px var(--gutter) 56px;
  font-size: 12.5px;
  color: var(--text-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer a { color: var(--text-2); text-underline-offset: 3px; }

/* The design credit, small in the bottom right corner (on phones under the 48-hour strip; not over a tour or the map). */
.credit {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 15;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--on-scene-2);
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .4);
  opacity: .75;
  transition: opacity .2s;
}
.credit:hover, .credit:focus-visible { opacity: 1; }
.is-tour .credit, .is-map .credit { display: none; }
.hero-credit { display: none; }

/* ===== A short film, the ambient screen ===== */
/* While filming and on the ambient screen the page steps aside, as for a tour. */
.is-filming main, .is-filming .topbar, .is-filming .scrim, .is-filming .veil, .is-filming .credit,
.is-ambient main, .is-ambient .topbar, .is-ambient .scrim, .is-ambient .veil, .is-ambient .credit { display: none; }
.film-bar {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 8px 7px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
}
.film-left { min-width: 3.2em; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff4b4b; animation: recPulse 1.2s ease-in-out infinite; }
@keyframes recPulse { 50% { opacity: .3; } }
.film-done {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 55;
  width: min(620px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 18px;
  border-radius: 22px;
  display: grid;
  gap: 14px;
  color: var(--text);
}
.film-title { font-size: 17px; font-weight: 600; }
.film-done video { width: 100%; max-height: 62vh; border-radius: 14px; background: #000; object-fit: contain; }
.film-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.film-btns a { text-decoration: none; }
.film-btns .tour-stay { margin-left: 0; }
.film-btns .primary-btn { display: inline-flex; align-items: center; gap: 8px; width: auto; margin: 0; height: 40px; padding: 0 18px 0 15px; border-radius: 999px; }
.settings-ambient { margin-top: 18px; }
.ambient { position: fixed; inset: 0; z-index: 30; pointer-events: none; color: var(--on-scene); }
.ambient-dim { position: absolute; inset: 0; background: #000; transition: opacity 20s linear; }
.ambient-info {
  position: absolute;
  left: max(36px, env(safe-area-inset-left));
  bottom: max(30px, env(safe-area-inset-bottom));
  display: grid;
  gap: 4px;
  text-shadow: 0 2px 22px rgba(0, 0, 0, .55);
}
.ambient-info b { font-size: clamp(22px, 2.6vw, 42px); font-weight: 600; letter-spacing: -.01em; }
.ambient-info span { font-size: clamp(14px, 1.3vw, 20px); color: var(--on-scene-2); }
.ambient-ctrls {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  display: flex;
  gap: 8px;
  pointer-events: auto;
  transition: opacity .6s;
}
.is-still .ambient-ctrls { opacity: 0; pointer-events: none; }
.is-ambient.is-still, .is-ambient.is-still * { cursor: none; }

/* ===== Search palette ===== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 6, 12, .42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .22s var(--ease);
}
.overlay.is-open { opacity: 1; }
.palette {
  margin: 12vh auto 0;
  width: min(600px, calc(100% - 28px));
  border-radius: 22px;
  overflow: hidden;
  transform: translateY(-12px) scale(.98);
  transition: transform .3s var(--ease-out);
}
.is-open .palette { transform: none; }
.pal-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--stroke-2); color: var(--text-2); }
.pal-input input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-size: 18px; color: var(--text); }
.pal-input input::-webkit-search-cancel-button { display: none; }
.pal-input kbd { font-family: var(--font-ui); font-size: 11px; padding: 3px 7px; border-radius: 6px; background: var(--track); color: var(--text-2); }
.pal-list { max-height: 58vh; overflow: auto; padding: 8px; }
.pal-group { padding: 10px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.pal-empty { padding: 14px 12px; color: var(--text-2); }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; }
.pal-item.is-active { background: var(--track); }
.pi-flag { width: 28px; font-size: 22px; text-align: center; display: inline-flex; justify-content: center; }
.pi-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pi-main b { font-weight: 600; font-size: 15px; }
.pi-main small { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-side { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.pi-side b { font-weight: 600; }

/* ===== Drawers ===== */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  width: min(410px, 100%);
  padding: 12px;
  transform: translateX(105%);
  transition: transform .38s var(--ease-out);
}
.drawer.is-open { transform: none; }
.drawer-panel { height: 100%; border-radius: 24px; display: flex; flex-direction: column; overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 8px 22px; }
.drawer-head h2 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.drawer-head .icon-btn { border-color: transparent; }
.drawer-body { overflow: auto; padding: 4px 22px 28px; overscroll-behavior: contain; }
.drawer-body section + section { margin-top: 28px; }
.drawer-body h3 { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.field-label { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 8px; font-size: 13px; color: var(--text-2); }
.field-label output { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.hint { margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.seg { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--track); }
.seg button { flex: 1 1 auto; padding: 8px 10px; border-radius: 9px; font-size: 13px; color: var(--text-2); transition: background-color .2s, color .2s; }
.seg button[aria-checked="true"] { background: var(--card-solid); color: var(--text); font-weight: 600; box-shadow: 0 1px 6px rgba(0, 0, 0, .16); }
.seg[data-key="director"] { display: grid; grid-template-columns: 1fr 1fr; } /* the styles two by two, under "by the weather" */
.seg[data-key="director"] button:first-child { grid-column: 1 / -1; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0; font-size: 11px; color: var(--text-2); text-align: center; }
.swatch i { width: 42px; height: 42px; border-radius: 50%; outline: 2px solid transparent; outline-offset: 3px; transition: outline-color .2s, transform .2s var(--ease); }
.swatch:hover i { transform: scale(1.06); }
.swatch[aria-checked="true"] i { outline-color: var(--text); }
.accent-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.accent-row .field-label { flex: 1; margin: 0; }
.accent-row input[type="color"] { width: 42px; height: 32px; padding: 0; border: 0; background: none; border-radius: 8px; cursor: pointer; }
.text-btn { font-size: 13px; font-weight: 650; color: var(--accent-ink); padding: 4px 6px; border-radius: 8px; }
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 16px 0 4px; }
.lab-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  border-radius: 14px;
  background: var(--track);
  font-size: 12px;
  color: var(--text-2);
  transition: background-color .2s, color .2s;
}
.lab-chip[aria-checked="true"] {
  background: color-mix(in oklab, var(--accent) 22%, transparent);
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.range { width: 100%; accent-color: var(--accent); }
.primary-btn {
  margin-top: 24px;
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-weight: 650;
}

/* ===== Toast & loader ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity .3s var(--ease), transform .3s var(--ease-out);
}
.toast.is-open { opacity: 1; transform: translate(-50%, 0); }
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: radial-gradient(80% 60% at 50% 40%, #0f1730, #05070d);
  color: rgba(255, 255, 255, .72);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  transition: opacity 1.1s .15s var(--ease);
}
.loader.is-done { opacity: 0; pointer-events: none; }
.loader-mark circle { stroke-dasharray: 48; animation: draw 2.4s var(--ease) infinite; transform-origin: 16px 14px; }
@keyframes draw { 0% { stroke-dashoffset: 48; transform: rotate(0); } 60% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -48; transform: rotate(180deg); } }
.noscript { position: fixed; inset: auto 0 40% 0; text-align: center; z-index: 200; color: #fff; }

/* ===== Weather icon motion ===== */
.wx-icon { overflow: visible; }
.i-rays { transform-box: fill-box; transform-origin: center; animation: spin 30s linear infinite; }
.i-cloud { animation: drift 7s ease-in-out infinite; }
.i-cloud-b { animation-delay: -3s; }
.i-drop { animation: drop 1.1s linear infinite; }
.i-drizzle { animation-duration: 1.6s; }
.i-flake { animation: flake 2.8s ease-in-out infinite; }
.i-bolt { animation: bolt 3.2s steps(1) infinite; }
.i-fog line { animation: drift 5s ease-in-out infinite alternate; }
.i-fog line:nth-child(2) { animation-delay: -2s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(1.6px); } }
@keyframes drop { 0% { transform: translateY(-5px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(7px); opacity: 0; } }
@keyframes flake { 0% { transform: translate(0, -4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(2px, 8px); opacity: 0; } }
@keyframes bolt { 0%, 100% { opacity: 1; } 4% { opacity: .15; } 7% { opacity: 1; } 10% { opacity: .3; } 13% { opacity: 1; } }


/* ===== Time-lapse ===== */
.timelapse {
  display: none;
  position: relative;
  min-width: 0;
  margin-top: 26px;
  padding: 14px 16px 12px;
  border-radius: var(--r-lg);
  background: rgba(10, 14, 24, .3);
  border-color: rgba(255, 255, 255, .1);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5);
}
.is-timelapse .timelapse { display: block; animation: rise .8s var(--ease-out) both; }
.is-timelapse .hourly { display: none; }
.is-timelapse .poem, .is-timelapse .summary, .is-timelapse .pill-row { display: none; }
.is-timelapse .hero { align-self: end; }
.is-timelapse .temp-xl { font-size: clamp(84px, 11vw, 168px); }
.tl-bar { display: flex; align-items: center; gap: 14px; }
.tl-play {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #0b1020;
  background: var(--on-scene);
  box-shadow: 0 8px 26px -8px rgba(0, 0, 0, .6);
  transition: transform .2s var(--ease);
}
.tl-play:hover { transform: scale(1.05); }
.tl-play:active { transform: scale(.95); }
.tl-time { display: flex; flex-direction: column; min-width: 0; }
.tl-clock { font-size: 30px; font-weight: 300; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.tl-date { margin-top: 5px; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-controls { display: flex; gap: 8px; margin-left: auto; }
.tl-seg { flex-wrap: nowrap; background: rgba(255, 255, 255, .1); }
.tl-speed { flex: none; min-width: 46px; padding: 0 12px; border-radius: 12px; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .1); transition: background-color .2s; }
.tl-speed:hover { background: rgba(255, 255, 255, .2); }
.tl-seg button { flex: none; padding: 7px 11px; font-size: 12.5px; white-space: nowrap; }
.tl-seg button[aria-checked="true"] { background: rgba(255, 255, 255, .9); color: #0b1020; }
.tl-close { flex: none; background: transparent; border-color: transparent; color: var(--text-2); }
.tl-chart { position: relative; height: 164px; margin-top: 12px; cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; border-radius: 12px; }
.tl-chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tl-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tl-day-band { fill: rgba(255, 236, 200, .07); }
.tl-past { fill: rgba(6, 10, 22, .32); }
.tl-cloud { fill: #dfe7f3; }
.tl-rain { fill: var(--rain-ink); fill-opacity: .85; }
.tl-snow { fill: #fff; fill-opacity: .9; }
.tl-midnight { stroke: rgba(255, 255, 255, .22); stroke-width: 1; }
.tl-nowline { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 3; }
.tl-hour { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.tl-day { fill: var(--text); font-size: 11.5px; font-weight: 650; }
.tl-nowtext { fill: var(--accent); font-size: 11px; font-weight: 700; }
.tl-tlabel { fill: var(--text); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: rgba(0, 0, 0, .25); stroke-width: 3px; }
.tl-marks { position: absolute; left: 0; right: 0; top: 0; height: 26px; }
.tl-mark {
  position: absolute;
  top: 0;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  transition: transform .25s var(--ease), background-color .25s;
}
.tl-mark .wx-icon { width: 22px; height: 22px; }
.tl-mark:hover, .tl-mark.is-hit { transform: scale(1.18); background: rgba(255, 255, 255, .26); }
.tl-mark-sunrise, .tl-mark-sunset, .tl-mark-warmest { color: var(--warm); }
.tl-mark-coldest, .tl-mark-frost { color: #8fd0ff; }
.tl-mark-aurora { color: #6ef0a8; }
.tl-cursor { position: absolute; top: 26px; bottom: 20px; left: 0; width: 2px; margin-left: -1px; pointer-events: none; background: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, .15)); will-change: transform; }
.tl-dot { position: absolute; left: -6px; top: 0; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .16), 0 0 20px rgba(255, 255, 255, .6); will-change: transform; }
.tl-readouts { display: flex; gap: 8px; margin-top: 6px; overflow-x: auto; scrollbar-width: none; }
.tl-readouts::-webkit-scrollbar { display: none; }
.tl-ro { flex: 1 0 auto; min-width: 118px; padding: 8px 12px; border-radius: 14px; background: rgba(255, 255, 255, .07); display: flex; flex-direction: column; gap: 1px; }
.tl-ro-cond { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; font-weight: 550; min-width: 150px; }
.tl-ro-k { font-size: 10.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.tl-ro-v { display: flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 550; font-variant-numeric: tabular-nums; }
.tl-ro-s { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.tl-arrow { display: inline-block; font-style: normal; font-size: 14px; color: var(--text-2); }
.tl-caption {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  top: 36%;
  max-width: min(480px, 70%);
  text-align: right;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(6px);
  transition: opacity .7s var(--ease), transform .9s var(--ease-out), filter .7s var(--ease);
  text-shadow: 0 2px 26px rgba(0, 0, 0, .5);
}
.tl-caption.is-on { opacity: 1; transform: none; filter: none; }
.tl-cap-time { display: block; font-size: 11.5px; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); }
.tl-cap-title { display: block; margin-top: 4px; font-family: var(--font-serif); font-style: italic; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; }
.tl-cap-detail { display: block; margin-top: 6px; font-size: 14.5px; color: var(--text-2); }
.ribbon-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  transition: background-color .2s;
}
.ribbon-play:hover { background: rgba(255, 255, 255, .22); }
.ribbon-head-end { display: flex; align-items: center; gap: 14px; }
#soundBtn[aria-pressed="true"], #cinemaBtn[aria-pressed="true"] { color: var(--accent); }
.volume-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.volume-row .field-label { margin: 0; flex: none; }
.range-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.range-row[hidden] { display: none; }
.range-row span { flex: none; font-size: 12.5px; color: var(--text-3); }


/* ===== Map ===== */
.is-map { overflow: hidden; }
.is-map main, .is-map .scrim, .is-map .veil { display: none; }
.mapview {
  position: fixed;
  inset: 0;
  z-index: 20;
  color: var(--text);
  background: radial-gradient(ellipse 70% 60% at 50% 45%, #10203d 0%, #070b16 55%, #03050a 100%);
}
[data-theme="light"] .mapview { background: radial-gradient(ellipse 70% 60% at 50% 45%, #ffffff 0%, #e3eaf3 60%, #cdd8e6 100%); }
.mapview[hidden] { display: none; }
.mapview .map-canvas { position: absolute; inset: 0; } /* beats .maplibregl-map, whose CSS loads later */
.mapview .maplibregl-map { font: inherit; }
.map-flow { position: absolute; top: 0; left: 0; pointer-events: none; }
.map-panel, .map-layers, .map-tool, .map-status, .map-timeline, .map-legend {
  background: var(--glass-strong);
  border: 1px solid var(--stroke-2);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .55);
}
.map-layers { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 3px; padding: 6px; border-radius: 18px; }
.map-layer { display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 10px; border-radius: 12px; font-size: 13.5px; font-weight: 550; color: var(--text-2); white-space: nowrap; transition: background-color .2s, color .2s; }
.map-layer:hover { background: var(--track); color: var(--text); }
.map-layer[aria-checked="true"] { background: var(--accent); color: #06111c; }
.map-tools { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.map-tool { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text); transition: color .2s, transform .2s var(--ease); }
.map-tool:active { transform: scale(.94); }
.map-tool[aria-pressed="true"] { color: var(--accent); }
.map-tool[aria-pressed="false"] { color: var(--text-3); }
.map-status { position: absolute; top: calc(max(14px, env(safe-area-inset-top)) + 64px); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); padding: 8px 14px; border-radius: 999px; font-size: 13px; }
.map-status[hidden] { display: none; }
.map-status[data-kind="daily"], .map-status[data-kind="mapError"] { color: var(--warm); }
.map-spin { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--text-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.map-bottom { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(16px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; display: flex; align-items: flex-end; gap: 12px; pointer-events: none; }
.map-bottom > * { pointer-events: auto; }
.map-timeline { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 10px 20px 10px 10px; border-radius: 20px; }
.map-play { flex: none; width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; color: var(--bg); background: var(--text); transition: transform .2s var(--ease); }
.map-play:active { transform: scale(.94); }
.map-time { display: flex; flex-direction: column; min-width: 118px; }
.map-clock { font-size: 15.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.map-rel { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.map-track { position: relative; flex: 1; min-width: 0; height: 44px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.map-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.map-rail { position: absolute; left: 0; right: 0; top: 13px; height: 4px; border-radius: 4px; background: var(--track); }
.map-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); }
.map-thumb { position: absolute; top: 8px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 35%, transparent); pointer-events: none; }
.map-ticks { position: absolute; inset: 0; pointer-events: none; }
.tk { position: absolute; top: 21px; width: 1px; height: 4px; background: var(--text-3); }
.tk-major { height: 7px; }
.tk-day { top: 6px; height: 20px; background: var(--text-2); }
.tk-label { position: absolute; top: 27px; transform: translateX(4px); font-size: 11px; color: var(--text-2); white-space: nowrap; }
.tk-dayname { font-weight: 650; color: var(--text); }
.tk-end { transform: translateX(-100%); }
.is-static .map-track, .is-static .map-play { visibility: hidden; }
.map-legend { flex: none; width: 270px; padding: 10px 14px 10px; border-radius: 16px; }
.lg-title { font-size: 11.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--text-2); }
.lg-title span { margin-left: 4px; text-transform: none; letter-spacing: 0; color: var(--text-3); }
.lg-bar { height: 8px; margin-top: 8px; border-radius: 4px; }
.lg-ticks { position: relative; height: 14px; margin-top: 4px; font-size: 10.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.lg-ticks span { position: absolute; transform: translateX(-50%); }
.lg-ends { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--text-2); }
.lg-note { margin-top: 6px; font-size: 11.5px; line-height: 1.35; color: var(--text-3); }
.mapview .maplibregl-ctrl-bottom-right { bottom: calc(96px + env(safe-area-inset-bottom)); right: calc(var(--gutter) - 10px); }
.mapview .maplibregl-ctrl-attrib { background: var(--glass-strong); color: var(--text-2); }
.mapview .maplibregl-ctrl-attrib a { color: var(--text-2); }
[data-theme="dark"] .mapview .maplibregl-ctrl-attrib-button { filter: invert(1); }
.atmos-pop .maplibregl-popup-content {
  padding: 14px 16px 12px;
  border-radius: 16px;
  color: var(--text);
  background: var(--glass-strong);
  border: 1px solid var(--stroke-2);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 22px 50px -20px rgba(0, 0, 0, .6);
}
.atmos-pop .maplibregl-popup-tip { display: none; }
.atmos-pop .maplibregl-popup-close-button { top: 6px; right: 6px; padding: 2px 7px; border-radius: 8px; font-size: 18px; color: var(--text-2); }
.atmos-pop .maplibregl-popup-close-button:hover { background: var(--track); }
.mp-when { padding-right: 18px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.mp-temp { margin-top: 2px; font-size: 36px; font-weight: 300; letter-spacing: -.02em; line-height: 1.1; }
.mp-grid { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; font-size: 13px; color: var(--text-2); }
.mp-grid span { display: inline-flex; align-items: center; gap: 5px; }
.mp-arrow { display: inline-block; font-style: normal; }
.mp-none { margin-top: 6px; font-size: 13px; color: var(--text-2); }
.mp-open { margin-top: 10px; padding: 0; font-size: 13px; font-weight: 650; color: var(--accent-ink); }
.map-here { width: 18px; height: 18px; }
.map-here i { position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(255, 255, 255, .92), 0 0 18px var(--accent); }
.map-here::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--accent); animation: ping 2.4s var(--ease-out) infinite; }
@keyframes ping { from { transform: scale(.3); opacity: .9; } to { transform: scale(1.3); opacity: 0; } }


/* ===== Mood of the day ===== */
/* Best moments: the next two days' finest, each a button that shows itself on the scene. */
.best-sub { margin-top: 2px; font-size: 13px; color: var(--text-3); }
.best-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; margin-top: 12px; }
.best-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; background: var(--track); text-align: left; transition: background-color .2s; }
.best-item:hover { background: color-mix(in oklab, var(--track), var(--text) 10%); }
.best-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--text); background: color-mix(in oklab, var(--accent) 24%, transparent); }
.best-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.best-kind { font-size: 15px; font-weight: 600; }
.best-when { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.best-why { font-size: 12.5px; color: var(--text-3); }
.best-go { margin-left: auto; flex: none; color: var(--text-3); }
.mood-card {
  color: #fff;
  background: linear-gradient(135deg, var(--m1), var(--m2));
  border-radius: var(--r-lg);
  box-shadow: 0 24px 50px -28px color-mix(in oklab, var(--m1) 70%, #000);
}
.mood-card .card-title { color: rgba(255, 255, 255, .82); }
.mood-card .mood-name { margin-top: 10px; font-family: var(--font-serif); font-style: italic; font-size: 46px; line-height: 1; }
.mood-card .mood-line { margin-top: 8px; max-width: 42ch; font-size: 15px; opacity: .92; }
.mood-card .mood-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 13px; opacity: .9; }
/* Tour of the day, in its tour's colours. */
.tod-card {
  color: #fff;
  border-radius: var(--r-lg);
  background:
    radial-gradient(90% 80% at 90% 0%, color-mix(in oklab, var(--t1) 60%, transparent), transparent 70%),
    radial-gradient(70% 70% at 0% 100%, color-mix(in oklab, var(--t2) 50%, transparent), transparent 70%),
    linear-gradient(160deg, #0d1c33, var(--t3));
  box-shadow: 0 24px 50px -28px color-mix(in oklab, var(--t1) 60%, #000);
}
.tod-card .card-title { color: rgba(255, 255, 255, .82); }
.tod-card .card-title small { margin-left: auto; font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; opacity: .8; }
.tod-card .tod-name { margin-top: 10px; font-family: var(--font-serif); font-style: italic; font-size: 42px; line-height: 1; }
.tod-card .tod-why { margin-top: 8px; max-width: 48ch; font-size: 15px; line-height: 1.45; opacity: .92; }
.tod-btn, .tour-tile-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px 0 14px; border-radius: 999px; font-weight: 650; color: #0b0f18; background: #f6f9fd; }
.tod-btn { align-self: flex-start; margin-top: auto; }
.tod-btn:hover, .tour-tile-btn:hover { background: #fff; }
.mood-more { font-size: 13px; font-weight: 650; color: #fff; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); }
.mood-more:hover { background: rgba(255, 255, 255, .26); }

/* ===== Tours ===== */
.is-tour { overflow: hidden; }
.is-tour main, .is-tour .topbar, .is-tour .scrim, .is-tour .veil { display: none; }
.tour {
  position: fixed;
  inset: 0;
  z-index: 30;
  --text: var(--on-scene);
  --text-2: var(--on-scene-2);
  --text-3: var(--on-scene-3);
  color: var(--text);
  pointer-events: none;
}
.tour[hidden] { display: none; }
/* Shade at the foot and the head of the frame, under the words. */
.tour::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .5), transparent 40%), linear-gradient(to bottom, rgba(0, 0, 0, .3), transparent 18%); }
.tour-top, .tour-bar, .tour-end { pointer-events: auto; }
.tour-top {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity .6s var(--ease);
}
.tour-name { font-size: 12px; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }
.tour-count { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tour-top .icon-btn { margin-left: auto; }
.tour-intro, .tour-card, .tour-tag {
  position: absolute;
  text-shadow: 0 2px 26px rgba(0, 0, 0, .55);
  opacity: 0;
  transition: opacity .9s var(--ease), transform 1.1s var(--ease-out), filter .9s var(--ease);
}
.tour-intro { inset: 0; display: grid; place-content: center; padding: 0 var(--gutter); text-align: center; background: radial-gradient(60% 34% at 50% 50%, rgba(0, 0, 0, .34), transparent); transform: scale(.98); filter: blur(8px); }
.tour-intro.is-on { opacity: 1; transform: none; filter: none; }
.tour-intro-title { font-family: var(--font-serif); font-style: italic; font-size: clamp(54px, 8vw, 120px); line-height: .95; }
.tour-intro-sub { max-width: 46ch; margin: 18px auto 0; font-size: 17px; line-height: 1.5; color: var(--text-2); }
/* Small type gets a tight shadow too, to hold against a bright sky or a pale rock. */
.tour-intro-sub, .tour-kicker, .tour-line, .tour-facts, .tour-tag { text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 2px 22px rgba(0, 0, 0, .5); }
.is-loading .tour-intro-sub { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .5; } }
.tour-card { left: var(--gutter); bottom: 108px; max-width: min(620px, calc(100% - 2 * var(--gutter))); transform: translateY(14px); filter: blur(6px); }
.tour-card.is-on { opacity: 1; transform: none; filter: none; }
.tour-kicker { font-size: 12px; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); }
.tour-place { margin-top: 8px; font-size: clamp(46px, 6.4vw, 92px); font-weight: 300; letter-spacing: -.025em; line-height: .98; }
.is-story .tour-place { font-size: clamp(36px, 4.6vw, 64px); line-height: 1.02; }
.tour-moment { margin-top: 6px; font-family: var(--font-serif); font-style: italic; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.1; }
.tour-line { max-width: 42ch; margin-top: 12px; font-size: 17px; line-height: 1.45; color: var(--text-2); }
.tour-facts { margin-top: 10px; font-size: 13.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tour-tag { left: var(--gutter); bottom: 74px; font-size: 13px; color: var(--text-2); }
.tour-tag.is-on { opacity: 1; }
.tour-bar {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 18px;
  transition: opacity .6s var(--ease);
}
.is-loading .tour-bar { visibility: hidden; }
/* While nothing moves the controls (and the pointer) fade away, and don't catch the tap that brings them back. */
.tour.is-quiet:not(:has(:focus-visible)):not(.is-paused):not(.is-ended) :is(.tour-bar, .tour-top, .tour-side) { opacity: 0; pointer-events: none; }
.is-tour:has(.tour.is-quiet:not(.is-paused):not(.is-ended)) { cursor: none; }
.tour-prog { flex: 1; display: flex; gap: 6px; }
.tour-seg { flex: 1; padding: 10px 0; }
.tour-seg i { display: block; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .24); overflow: hidden; }
.tour-seg i::after { content: ''; display: block; height: 100%; background: var(--on-scene); transform: scaleX(var(--k, 0)); transform-origin: left; }
.tour-seg.is-done i { background: var(--on-scene-2); }
.tour-seg:hover i { background: rgba(255, 255, 255, .42); }
.tour-ctrls { display: flex; align-items: center; gap: 8px; }
.tour-side {
  position: absolute;
  top: 36%; /* above the title card, however tall */
  width: 56px;
  height: 56px;
  margin-top: -28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--text);
  background: rgba(8, 12, 20, .26);
  border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  transition: opacity .6s var(--ease), background-color .2s;
}
.tour-side:hover { background: rgba(8, 12, 20, .46); }
.tour-side-prev { left: max(10px, calc(var(--gutter) - 20px)); }
.tour-side-next { right: max(10px, calc(var(--gutter) - 20px)); }
.tour-side:disabled, .is-loading .tour-side, .is-ended .tour-side { opacity: 0; pointer-events: none; }
.tour-stay {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px 0 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--track);
  border: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.tour-stay:hover { background: rgba(255, 255, 255, .2); }
.tour-end { position: absolute; inset: auto var(--gutter) 108px; display: none; text-align: center; text-shadow: 0 2px 26px rgba(0, 0, 0, .55); }
.is-ended .tour-end { display: block; animation: rise .9s var(--ease-out) both; }
.is-ended .tour-bar { opacity: 0; pointer-events: none; }
.tour-end-line { font-family: var(--font-serif); font-style: italic; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.05; }
.tour-end-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.tour-end .primary-btn { display: inline-flex; align-items: center; gap: 8px; width: auto; margin: 0; padding: 0 20px; height: 40px; border-radius: 999px; background: var(--on-scene); color: #0b0f18; text-shadow: none; }
.tour-end .primary-btn small { font-size: 13px; font-weight: 500; opacity: .6; }
.tour-end .primary-btn small::before { content: '· '; }
.tour-end-note { max-width: 46ch; margin: 14px auto 0; font-size: 15px; color: var(--text-2); }
.tour-end.is-empty .tour-end-line { max-width: 28ch; margin: 0 auto; font-size: clamp(26px, 3vw, 38px); line-height: 1.2; }
.tour-end .tour-stay { padding: 0 18px; }

/* The Tours page: glass over the tours' covers, filmed live behind it. */
.is-tours .veil {
  opacity: 1 !important;
  background: linear-gradient(180deg, rgba(3, 6, 14, .6), rgba(3, 6, 14, .12) 34%, rgba(3, 6, 14, .22) 62%, rgba(3, 6, 14, .62));
}
#toursPage { --text: var(--on-scene); --text-2: var(--on-scene-2); --text-3: var(--on-scene-3); color: var(--text); }
.tours-head { margin-bottom: 22px; text-shadow: 0 2px 24px rgba(0, 0, 0, .45); animation: rise .9s var(--ease-out) both; }
.tours-head h2 { font-size: clamp(44px, 6vw, 76px); }
.tours-head p { max-width: 62ch; }
.tours-stage { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; margin-bottom: clamp(36px, 16vh, 150px); }
.tour-glass {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .14);
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in oklab, var(--t1) 28%, transparent), transparent 65%),
    radial-gradient(90% 80% at 0% 100%, color-mix(in oklab, var(--t2) 18%, transparent), transparent 70%),
    rgba(8, 12, 22, .3);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.tour-feature { position: relative; flex: 0 1 600px; padding: 24px 28px 26px; border-radius: var(--r-xl); box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .8); animation: fadeUp .8s var(--ease-out) both; }
.tour-feature h3 { margin-top: 8px; font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: clamp(40px, 5vw, 62px); line-height: 1; }
.tour-feature p:not(.tour-tile-kicker) { max-width: 52ch; margin-top: 10px; font-size: 15px; line-height: 1.5; opacity: .88; }
.tour-feature .tour-feature-why { font-size: 16px; font-weight: 600; opacity: 1; }
.tour-feature .tour-tile-btn { margin-top: 18px; }
/* The cover behind the page, named like a film's credit. */
.tours-scene { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 4px 0; text-align: right; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }
.tours-scene > span { animation: fadeUp .8s var(--ease-out) both; }
.tours-scene > span + span { animation-delay: 80ms; }
.tours-scene[hidden] { display: none; }
.tours-scene-tour { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.tours-scene-place { font-family: var(--font-serif); font-style: italic; font-size: 28px; line-height: 1.1; }
.tours-scene-region { font-size: 13px; opacity: .78; }
.tours-scene:hover .tours-scene-place { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.tour-group { margin-top: 40px; }
.tour-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-bottom: 14px; text-shadow: 0 1px 16px rgba(0, 0, 0, .5); }
.tour-group-head h3 { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 30px; line-height: 1.1; }
.tour-group-head p { font-size: 14px; color: var(--text-2); }
.tour-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 212px), 1fr)); gap: 12px; } /* a section to a row */
.tour-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 168px;
  padding: 16px 18px 18px;
  border-radius: var(--r-lg);
  text-align: left;
  transition: transform .35s var(--ease-out), border-color .35s, background-color .35s, box-shadow .35s;
  animation: fadeUp .7s var(--ease-out) both;
}
.tour-tile:hover, .tour-tile:focus-visible { transform: translateY(-3px); background-color: rgba(8, 12, 22, .44); border-color: color-mix(in oklab, var(--t1) 50%, rgba(255, 255, 255, .3)); box-shadow: 0 22px 50px -30px color-mix(in oklab, var(--t1) 70%, #000); }
.tour-tile.is-on { border-color: color-mix(in oklab, var(--t1) 65%, #fff); }
.tour-tile-kicker { padding-right: 36px; font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; opacity: .76; }
.tour-tile-name { font-family: var(--font-serif); font-style: italic; font-size: 27px; line-height: 1.05; }
.tour-tile-blurb { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.45; opacity: .84; }
.tour-tile-play { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #0b0f18; background: rgba(255, 255, 255, .9); opacity: 0; transform: scale(.8); transition: opacity .3s, transform .3s var(--ease-out); }
.tour-tile:hover .tour-tile-play, .tour-tile:focus-visible .tour-tile-play, .tour-tile.is-on .tour-tile-play { opacity: 1; transform: none; }
@media (hover: none) { .tour-tile-play { opacity: .9; transform: none; } }
@media (max-width: 640px) {
  .tours-scene { align-items: flex-start; text-align: left; }
  .tour-feature { padding: 20px 20px 22px; }
  .tour-group { margin-top: 30px; }
  .tour-group-head h3 { font-size: 26px; }
  .tour-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tour-tile { min-height: 92px; padding: 14px 14px 16px; }
  .tour-tile-name { font-size: 22px; }
  .tour-tile-blurb { display: none; }
}

@media (max-width: 640px) {
  .tour-card { bottom: 132px; }
  .tour-side { top: 30%; }
  .tour-tag { bottom: 96px; }
  .tour-bar { flex-wrap: wrap; gap: 4px 10px; }
  .tour-prog { flex: 1 0 100%; }
  .tour-ctrls { flex: 1; }
  .tour-stay { margin-left: auto; }
  .tour-line { font-size: 15.5px; }
}

/* ===== Explore ===== */
.is-page .hero-wrap, .is-page .details { display: none; }
.is-page .veil { opacity: .84 !important; }
.explore { max-width: var(--maxw); margin: 0 auto; padding: 96px var(--gutter) 48px; }
.explore[hidden] { display: none; }
.ex-hero { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 20px; animation: rise .9s var(--ease-out) both; }
.ex-mood {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  padding: 30px 32px;
  border-radius: var(--r-xl);
  color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, var(--m2), var(--m1) 70%);
  box-shadow: 0 30px 70px -34px color-mix(in oklab, var(--m1) 80%, #000);
}
.ex-mood::after { content: ''; position: absolute; inset: auto -10% -60% 30%; height: 120%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .18), transparent); pointer-events: none; }
.mood-kicker { font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; opacity: .82; }
.mood-name-xl { margin-top: 12px; font-family: var(--font-serif); font-style: italic; font-size: clamp(56px, 7.5vw, 104px); line-height: .95; }
.mood-line-xl { margin-top: 14px; max-width: 34ch; font-size: 18px; line-height: 1.4; opacity: .94; }
.mood-vs { margin-top: 14px; font-size: 14px; opacity: .85; }
.ex-quiz { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 28px; border-radius: var(--r-xl); }
.ex-quiz-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #06111c; background: var(--accent); }
.ex-quiz h2 { margin-top: 6px; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.ex-quiz p { flex: 1; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.ex-section { margin-top: 64px; }
.ex-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 20px; }
.ex-head h2 { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.05; }
.ex-head p { margin-top: 6px; color: var(--text-2); font-size: 15px; }
.ex-filter { flex-wrap: nowrap; }
.ex-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.ev-card { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 16px; border-radius: var(--r-lg); animation: fadeUp .6s var(--ease-out) both; }
.ev-card[data-kind="heat"] { --kc: #ff8a5b; }
.ev-card[data-kind="cold"] { --kc: #6cb8ff; }
.ev-card[data-kind="wind"] { --kc: #45c9a4; }
.ev-card[data-kind="rain"] { --kc: #4f9bff; }
.ev-card[data-kind="dry"] { --kc: #d4a24c; }
.ev-card[data-kind="hail"] { --kc: #9aa8f0; }
.ev-card[data-kind="lightning"] { --kc: #e6b800; }
.ev-card[data-kind="storm"] { --kc: #a78bfa; }
.ev-card[data-kind="fog"] { --kc: #98a3b4; }
.ev-card[data-kind="climate"] { --kc: #e58bb9; }
.ev-top { display: flex; align-items: center; justify-content: space-between; }
.ev-year { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ev-kind { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in oklab, var(--kc) 75%, var(--text)); background: color-mix(in oklab, var(--kc) 18%, transparent); }
.ev-stat { margin-top: 6px; font-size: 42px; font-weight: 300; letter-spacing: -.025em; line-height: 1.05; color: var(--sc, color-mix(in oklab, var(--kc) 70%, var(--text))); font-variant-numeric: tabular-nums; }
.ev-stat-text { font-size: 29px; font-weight: 400; letter-spacing: -.01em; }
.ev-label { font-size: 13px; color: var(--text-2); }
.ev-card h3 { margin-top: 8px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.ev-place { font-size: 13px; color: var(--text-3); }
.ev-story { margin-top: 2px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.ev-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: auto; padding-top: 12px; }
.ev-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 13px; font-weight: 650; color: var(--accent-ink); }
.ev-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.ev-src { margin-left: auto; font-size: 12px; color: var(--text-3); text-decoration: underline dotted; text-underline-offset: 3px; }
.ex-phen { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.ph-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px 22px 18px; border-radius: var(--r-lg); }
.ph-head { display: flex; align-items: center; gap: 14px; }
.ph-tile { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--p1), var(--p2)); box-shadow: 0 10px 24px -12px var(--p1); }
.ph-card h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.ph-what { font-size: 15px; line-height: 1.5; }
.ph-card dl { display: grid; gap: 2px; margin: 0; }
.ph-card dd { margin: 0; }
.ph-card dt { margin-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ph-card dd { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.ph-live { font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.ph-card .ev-btn { margin-top: auto; }

/* ===== Quiz ===== */
.quiz { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(4, 7, 14, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadeUp .3s var(--ease-out) both; }
.quiz[hidden] { display: none; }
.quiz-card { width: min(580px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 22px 26px 22px; border-radius: var(--r-xl); border: 1px solid var(--stroke-2); box-shadow: var(--shadow); color: var(--text); }
.quiz-top { display: flex; align-items: center; justify-content: space-between; }
.quiz-title { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.quiz-x { background: transparent; border-color: transparent; color: var(--text-2); }
.quiz-progress { display: flex; gap: 6px; margin-top: 14px; }
.quiz-progress i { flex: 1; height: 4px; border-radius: 4px; background: var(--track); }
.quiz-progress i.is-done { background: var(--accent); }
.quiz-progress i.is-current { background: color-mix(in oklab, var(--accent) 50%, var(--track)); }
.quiz-badge { display: inline-block; margin-top: 16px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #06111c; background: var(--accent); }
.quiz-q { margin-top: 16px; font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.quiz-opts { display: grid; gap: 8px; margin-top: 18px; }
.quiz-opt { padding: 13px 16px; border-radius: 14px; text-align: left; font-size: 15px; background: var(--track); border: 1.5px solid transparent; transition: background-color .2s, border-color .2s, transform .2s var(--ease); }
.quiz-opt:hover:not(:disabled) { background: color-mix(in oklab, var(--accent) 16%, var(--track)); }
.quiz-opt:active:not(:disabled) { transform: scale(.99); }
.quiz-opt:disabled { cursor: default; opacity: .75; }
.quiz-opt.is-correct { opacity: 1; border-color: #34c77b; background: color-mix(in oklab, #34c77b 24%, transparent); }
.quiz-opt.is-wrong { opacity: 1; border-color: #f05d5d; background: color-mix(in oklab, #f05d5d 20%, transparent); }
.quiz-feedback { margin-top: 14px; min-height: 8px; }
.quiz-mark { font-weight: 700; }
.quiz-mark.ok { color: #2fb36e; }
.quiz-mark.no { color: #e5534b; }
.quiz-explain { margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.quiz-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 16px; }
.quiz-actions.center { justify-content: center; align-items: center; }
.quiz-score { margin-top: 18px; text-align: center; font-family: var(--font-serif); font-style: italic; font-size: 72px; line-height: 1; }
.quiz-verdict { margin-top: 8px; text-align: center; font-size: 18px; color: var(--text-2); }
.quiz-loading { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; color: var(--text-2); }

/* Finger-sized targets on touch screens. */
@media (pointer: coarse) {
  .icon-btn { min-width: 44px; height: 44px; }
  .map-tool { width: 44px; height: 44px; }
  .save-btn { min-width: 40px; height: 40px; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .details { grid-template-columns: minmax(0, 1fr); }
  .ex-hero { grid-template-columns: minmax(0, 1fr); }
  .daily { position: static; }
}
@media (max-width: 1120px) {
  .lab-btn span { display: none; } /* where the top bar is short of room, the lab is its sparkle alone */
  .lab-btn { padding: 0; }
}
@media (max-width: 960px) {
  #ambientBtn { display: none; } /* the ambient screen is in Settings */
}
@media (min-width: 761px) and (max-width: 900px) {
  .brand-name { display: none; }
  .tab { padding: 7px 10px; }
  .top-actions { gap: 6px; }
}
@media (max-width: 760px) {
  /* The credit sits in the page under the 48-hour strip, where it can't cover it. */
  .credit { display: none; }
  .credit.hero-credit { display: block; position: static; justify-self: end; margin: 10px 4px 0 0; }
  /* Tabs float at the bottom of the screen on phones. */
  .tabs {
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 40;
    padding: 5px;
    background: rgba(12, 16, 26, .66);
    border: 1px solid rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .7);
  }
  .tab { padding: 9px 13px; white-space: nowrap; color: rgba(246, 249, 253, .7); }
  .tab.is-active, [data-theme="light"] .is-scrolled .tab.is-active, [data-theme="light"] .is-map .tab.is-active, [data-theme="light"] .is-page .tab.is-active { background: rgba(255, 255, 255, .2); color: #fff; }
  .hero-wrap { padding-bottom: 80px; }
  .details { padding-bottom: 96px; }
  .explore { padding: 80px var(--gutter) 96px; }
  .ex-mood { min-height: 0; padding: 24px 22px; }
  .ex-section { margin-top: 44px; }
  .ex-events, .ex-phen { grid-template-columns: minmax(0, 1fr); }
  .mood-card .mood-name { font-size: 38px; }
  .quiz-card { padding: 18px 18px; }
  .quiz-q { font-size: 19px; }
  .map-layers { top: calc(max(14px, env(safe-area-inset-top)) + 56px); left: 0; right: 0; transform: none; flex-direction: row; gap: 6px; padding: 4px var(--gutter); overflow-x: auto; scrollbar-width: none; border-radius: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .map-layers::-webkit-scrollbar { display: none; }
  .map-layer { flex: none; padding: 8px 13px 8px 9px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--stroke-2); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .map-status { top: calc(max(14px, env(safe-area-inset-top)) + 106px); }
  .map-tools { top: auto; bottom: calc(232px + env(safe-area-inset-bottom)); transform: none; }
  .map-bottom { flex-direction: column; align-items: stretch; gap: 8px; bottom: calc(74px + env(safe-area-inset-bottom)); }
  .map-legend { width: auto; padding: 8px 12px; }
  .map-timeline { gap: 10px; padding: 8px 14px 8px 8px; }
  .map-time { min-width: 90px; }
  .map-clock { font-size: 14px; }
  .mapview .maplibregl-ctrl-bottom-right { bottom: auto; top: calc(max(14px, env(safe-area-inset-top)) + 102px); }
  .hero-wrap { padding-top: 80px; }
  .hero { align-self: start; margin-top: 4vh; }
  .poem { margin-top: 18px; }
  .ribbon-hint { display: none; }
  .details { padding-top: 32px; gap: 14px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card { min-height: 180px; padding: 16px; }
  .metric { font-size: 38px !important; }
  .wind-wrap { gap: 14px; }
  .compass { width: 116px; }
  .day { grid-template-columns: 74px 30px 34px 34px 1fr 34px; gap: 6px; padding: 8px 6px; }
  .drawer { top: auto; height: 82vh; width: 100%; padding: 8px; transform: translateY(105%); }
  .timelapse { padding: 12px 10px 10px; margin-top: 18px; }
  .tl-bar { flex-wrap: wrap; gap: 10px 12px; }
  .tl-time { flex: 1; }
  .tl-clock { font-size: 26px; }
  .tl-controls { order: 3; width: 100%; margin-left: 0; justify-content: space-between; }
  .tl-caption { top: calc(max(14px, env(safe-area-inset-top)) + 62px); left: var(--gutter); right: var(--gutter); max-width: none; text-align: center; }
  .tl-cap-title { font-size: 28px; }
  .tl-ro-cond { display: none; }
  .is-timelapse .temp-xl { font-size: 76px; }
  .tl-seg button { padding: 7px 9px; }
  .ribbon-play span { display: none; }
  .ribbon-play { padding: 6px; }
  .drawer-panel { border-radius: 24px 24px 18px 18px; }
}
@media (max-width: 440px) {
  .brand-name { display: none; } /* the mark alone, so the six buttons fit */
  .top-actions { gap: 6px; }
}
@media (max-width: 420px) {
  .tab { padding: 9px 9px; font-size: 12.5px; }
  .tl-seg { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .tl-seg button { padding: 7px 7px; font-size: 12px; }
  .cards { grid-template-columns: 1fr; }
  .card-wide { grid-column: auto; }
}

/* Phones in portrait with little height: a more compact hero keeps the 48-hour strip above the tab bar. */
@media (max-width: 760px) and (max-height: 720px) {
  .hero-wrap { padding-top: 72px; }
  .hero { margin-top: 0; }
  .temp-xl { font-size: 92px; }
  .poem { margin-top: 12px; font-size: 21px; }
  .summary { font-size: 14px; }
  .scrim { background:
    linear-gradient(to bottom, rgba(0, 0, 0, calc(var(--scrim, .34) * .9)), rgba(0, 0, 0, calc(var(--scrim, .34) * .5)) 60%, transparent 80%),
    linear-gradient(to bottom, transparent 62%, rgba(0, 0, 0, .34)); }
}

/* Phones in landscape and other short windows. */
@media (max-height: 500px) {
  .hero-wrap { padding-top: 70px; }
  .hero { align-self: start; }
  .temp-xl, .is-timelapse .temp-xl { font-size: 76px; }
  .poem { display: none; }
  .hourly, .timelapse { margin-top: 14px; }
  .map-layers { top: calc(max(10px, env(safe-area-inset-top)) + 58px); left: 0; right: 0; transform: none; flex-direction: row; gap: 6px; padding: 4px var(--gutter); overflow-x: auto; scrollbar-width: none; border-radius: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .map-layer { flex: none; padding: 7px 12px 7px 9px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--stroke-2); }
  .map-tools { top: auto; bottom: 86px; transform: none; flex-direction: row; }
  .map-legend { display: none; }
  .map-bottom { bottom: calc(10px + env(safe-area-inset-bottom)); }
  .map-status { top: calc(max(10px, env(safe-area-inset-top)) + 104px); }
  .mapview .maplibregl-ctrl-bottom-right { bottom: auto; top: calc(max(10px, env(safe-area-inset-top)) + 104px); }
}
