:root {
  --ink: #1b211e;          /* logo black */
  --ink-2: #4a524d;
  --ink-3: #8a918c;
  --sun: #faae2c;          /* logo yellow */
  --sun-deep: #e8930c;
  --sky-hi: #4fa6e0;
  --sky-lo: #cfe9f8;
  --paper: #ffffff;
  --mist: #f2f6f8;         /* chip fill: a hint of sky, not cream */
  --line: rgba(27, 33, 30, 0.12);
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --ui: "Figtree", system-ui, sans-serif;
  --sheet-r: 28px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font: 16px/1.45 var(--ui); color: var(--ink);
  background: var(--sky-lo);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ── the sky: its colours and the sun follow the chosen time (home.js) ── */
.sky {
  position: relative; height: 38vh; min-height: 230px; max-height: 360px; overflow: hidden;
  background: linear-gradient(180deg, var(--g1, #4fa6e0) 0%, var(--g2, #9fd3f2) 70%, var(--g3, #cfe9f8) 100%);
  transition: --g1 .6s, --g2 .6s, --g3 .6s;
}
.arc { position: absolute; inset: 8% 0 0 0; width: 100%; height: 92%; }
.sun {
  position: absolute; width: 92px; height: 92px; left: 50%; top: 40%;
  transform: translate(-50%, -50%); transition: left .5s cubic-bezier(.3,.7,.3,1), top .5s cubic-bezier(.3,.7,.3,1), opacity .4s;
  filter: drop-shadow(0 0 18px rgba(255, 250, 225, .9)) drop-shadow(0 0 4px rgba(255, 214, 120, .6));
}
.sun img { width: 100%; height: 100%; display: block; }
.cloud {
  position: absolute; width: 118%; left: 18%; top: 34%; opacity: 0;
  transform: translateX(26px); transition: opacity .5s, transform .6s;
  filter: drop-shadow(0 6px 10px rgba(40, 70, 100, .18));
}
.sky.cloudy .cloud { opacity: .96; transform: none; }
.sky.cloudy .sun { filter: none; }
.horizon {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  background: var(--sky-lo);
  -webkit-mask: radial-gradient(120% 60px at 50% 100%, #000 99%, transparent 100%);
          mask: radial-gradient(120% 60px at 50% 100%, #000 99%, transparent 100%);
}
@property --g1 { syntax: '<color>'; inherits: false; initial-value: #4fa6e0; }
@property --g2 { syntax: '<color>'; inherits: false; initial-value: #9fd3f2; }
@property --g3 { syntax: '<color>'; inherits: false; initial-value: #cfe9f8; }

/* ── the sheet ── */
.sheet {
  position: relative; margin-top: -34px; background: var(--paper);
  border-radius: var(--sheet-r) var(--sheet-r) 0 0; padding: 22px 18px 0;
  box-shadow: 0 -12px 30px rgba(30, 80, 120, .12);
  max-width: 640px; margin-left: auto; margin-right: auto;
}
.intro { padding: 0 2px 6px; }
.wordmark { height: 30px; width: auto; display: block; margin-bottom: 14px; }
h1 {
  font: 800 clamp(40px, 11vw, 56px)/0.95 var(--display); letter-spacing: -0.035em;
  margin: 0 0 10px; font-variation-settings: "opsz" 96;
}
.intro p { margin: 0; color: var(--ink-2); max-width: 34ch; }
.intro p strong { color: var(--ink); font-weight: 700; }

fieldset { border: 0; padding: 0; margin: 26px 0 0; min-width: 0; }
legend { font: 600 19px/1.2 var(--display); letter-spacing: -0.01em; padding: 0; margin-bottom: 12px; }

/* cities: the open one is a big card, the rest are quiet "soon" rows */
.cities { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.city {
  position: relative; border: 2px solid var(--line); background: var(--paper); border-radius: 18px;
  min-height: 64px; padding: 12px 14px; text-align: left; display: flex; flex-direction: column; justify-content: center;
}
.city b { font: 700 17px/1.1 var(--display); }
.city small { color: var(--ink-3); font-size: 13px; margin-top: 3px; }
.city[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.city[aria-pressed="true"] small { color: rgba(255, 255, 255, .7); }
.city:disabled { cursor: not-allowed; background: var(--mist); border-color: transparent; color: var(--ink-3); }
.city:disabled b { font-weight: 600; }

/* chips */
.chips { display: flex; gap: 8px; }
.chips.wrap { flex-wrap: wrap; gap: 7px; }
.chips.wrap .chip { min-height: 42px; padding: 0 14px; font-size: 14.5px; }
.chips.scroll {
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 18px; margin: 0 -18px; padding: 2px 18px 6px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 28px), transparent);
          mask: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 28px), transparent);
}
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start; min-height: 44px; padding: 0 16px; border-radius: 22px;
  border: 0; background: var(--mist); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 7px;
  transition: background .15s, color .15s;
}
.chip i { font-style: normal; font-weight: 500; color: var(--ink-3); font-size: 13px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip[aria-pressed="true"] i { color: rgba(255, 255, 255, .65); }
.chip:active { transform: scale(.97); }

/* day + time range */
.days { display: inline-flex; background: var(--mist); border-radius: 16px; padding: 4px; margin-bottom: 18px; }
.days button { border: 0; background: transparent; min-height: 40px; padding: 0 18px; border-radius: 12px; font-weight: 600; }
.days button[aria-checked="true"] { background: var(--paper); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

.range { position: relative; height: 48px; margin: 0 12px; }
.track {
  position: absolute; left: 0; right: 0; top: 20px; height: 8px; border-radius: 4px; overflow: hidden;
  background: #2b3548; /* night; daylight hours painted over by home.js */
}
.track i { position: absolute; top: 0; bottom: 0; }
.fill { position: absolute; top: 14px; height: 20px; border-radius: 10px; border: 3px solid var(--ink); background: rgba(250, 174, 44, .18); pointer-events: none; }
.range input {
  position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none;
  -webkit-appearance: none; appearance: none;
}
.range input::-webkit-slider-runnable-track { background: none; height: 48px; }
.range input::-moz-range-track { background: none; }
.range input::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 34px; height: 34px; margin-top: 7px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--ink); box-shadow: 0 3px 10px rgba(0, 0, 0, .22); cursor: grab;
}
.range input::-moz-range-thumb {
  pointer-events: auto; width: 28px; height: 28px; border-radius: 50%; background: var(--paper);
  border: 3px solid var(--ink); box-shadow: 0 3px 10px rgba(0, 0, 0, .22); cursor: grab;
}
.times { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.times output { font: 800 34px/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.times .dash { width: 22px; height: 3px; border-radius: 2px; background: var(--ink); }
.hint { margin: 8px 0 0; color: var(--ink-2); font-size: 14.5px; min-height: 1.4em; }

.toggle { display: flex; align-items: center; gap: 12px; margin: 26px 0 0; min-height: 44px; font-weight: 500; cursor: pointer; }
.toggle input { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 16px; background: #cfd6d2; position: relative; margin: 0; flex: none; transition: background .2s; cursor: pointer; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.toggle input:checked { background: var(--ink); }
.toggle input:checked::after { transform: translateX(20px); }

/* sticky call to action, always under the thumb */
.cta {
  position: sticky; bottom: 0; margin: 26px -18px 0; padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 28%);
}
#go {
  width: 100%; min-height: 60px; border: 0; border-radius: 20px; background: var(--sun); color: var(--ink);
  font: 800 19px/1.1 var(--display); letter-spacing: -0.01em; box-shadow: 0 8px 22px rgba(232, 147, 12, .35);
  transition: transform .12s, background .2s;
}
#go:active { transform: scale(.985); }
.cta .all {
  display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 4px;
  color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px;
}
#go[disabled] { background: #e7ebe9; color: var(--ink-3); box-shadow: none; cursor: default; }

.small { color: var(--ink-3); font-size: 12.5px; padding: 10px 2px 28px; max-width: 60ch; }

@media (min-width: 700px) {
  .sky { height: 42vh; max-height: 420px; }
  .sun { width: 118px; height: 118px; }
  .sheet { padding: 34px 40px 0; margin-top: -60px; border-radius: 36px 36px 0 0; }
  .cta { margin: 30px -40px 0; padding-left: 40px; padding-right: 40px; }
  .cities { grid-template-columns: repeat(4, 1fr); }
  .chips.scroll { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; -webkit-mask: none; mask: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
