@font-face { font-family: 'Frank Ruhl Libre'; font-weight: 300 900; font-display: swap; src: url('/fonts/frl-he.woff2') format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Frank Ruhl Libre'; font-weight: 300 900; font-display: swap; src: url('/fonts/frl-la.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Heebo'; font-weight: 100 900; font-display: swap; src: url('/fonts/heebo-he.woff2') format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-weight: 100 900; font-display: swap; src: url('/fonts/heebo-la.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --ink: #fff;
  --ink-2: rgba(255,255,255,.86);
  --ink-3: rgba(255,255,255,.72);
  --glass: rgba(6,14,34,.36);
  --glass-2: rgba(255,255,255,.12);
  --line: rgba(255,255,255,.16);
  --accent: #ffd27a;
  --serif: 'Frank Ruhl Libre', 'Times New Roman', serif;
  --sans: 'Heebo', -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: #0b2f66; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; color: var(--ink);
  font: 400 17px/1.55 var(--sans); background: transparent;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
.scrim { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(4,10,28,.18), rgba(4,10,28,.32)); }

.wrap { width: min(100%, 780px); margin-inline: auto;
  padding: max(20px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom)); }

/* ---------- Home ---------- */
#home { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
.kicker { font-weight: 500; font-size: .95rem; letter-spacing: .01em; color: var(--ink-2); margin: 0 0 .6rem; }
h1.title { font: 900 clamp(3.1rem, 13vw, 6.4rem)/.98 var(--serif); margin: 0 0 1rem; letter-spacing: -.01em;
  text-shadow: 0 2px 30px rgba(4,12,34,.35); }
.lede { font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: var(--ink-2); margin: 0 0 2rem; max-width: 30em; font-weight: 300; }

.search { position: relative; }
.search input {
  width: 100%; height: 62px; padding: 0 22px; font-size: 1.2rem; border-radius: 18px;
  background: rgba(255,255,255,.95); color: #10203c; border: 0;
  box-shadow: 0 12px 40px rgba(4,12,34,.28); caret-color: #0b5fc0; -webkit-text-fill-color: #10203c;
}
.search input::placeholder { color: #5a6a82; -webkit-text-fill-color: #5a6a82; opacity: 1; }
.search input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 18px; }
.suggest {
  position: absolute; inset-inline: 0; top: calc(100% + 8px); z-index: 5; margin: 0; padding: 6px; list-style: none;
  background: #fff; color: #10203c; border-radius: 16px; box-shadow: 0 18px 50px rgba(4,12,34,.4); max-height: 320px; overflow: auto;
}
.suggest li { padding: 11px 14px; border-radius: 11px; cursor: pointer; display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.suggest li[aria-selected="true"], .suggest li:hover { background: #e7f0fc; }
.suggest b { font-weight: 500; }
.suggest small { color: #55637a; font-size: .86rem; text-align: left; }
.suggest .none { cursor: default; color: #55637a; }
.suggest .none:hover { background: none; }

.home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: .98rem; transition: background .15s;
}
.chip:hover { background: rgba(6,14,34,.52); }
.chip svg.i { font-size: 1.1rem; }
.status { min-height: 1.6em; margin: 14px 2px 0; color: var(--ink); font-size: .98rem; }

/* ---------- Result ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: clamp(20px, 5vh, 44px); }
.topbar .right, .topbar .left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--glass); border: 1px solid var(--line); font-size: 1.2rem; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); flex: none; }
.iconbtn:hover { background: rgba(6,14,34,.52); }
.place { font-weight: 500; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; line-height: 1.2; background: none; }
.place small { display: block; font-weight: 300; font-size: .84rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.seg button { min-height: 38px; padding: 4px 16px; border-radius: 999px; font-size: .95rem; color: var(--ink-2); transition: background .15s, color .15s; }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: #fff; color: #10203c; font-weight: 500; }

.verdict { font: 900 clamp(2.5rem, 9.5vw, 4.9rem)/1.04 var(--serif); margin: 18px 0 14px; letter-spacing: -.005em; text-wrap: balance;
  text-shadow: 0 2px 28px rgba(4,12,34,.38); }
.why { font-size: clamp(1.04rem, 2.4vw, 1.22rem); font-weight: 300; line-height: 1.5; color: var(--ink); margin: 0 0 26px; max-width: 36em; text-shadow: 0 1px 12px rgba(4,12,34,.4); text-wrap: pretty; }
.why b { font-weight: 500; }

.gear { display: grid; gap: 22px; margin-bottom: 26px; }
.gear h2 { font: 500 .92rem var(--sans); color: var(--ink-2); margin: 0 0 10px; text-shadow: 0 1px 8px rgba(4,12,34,.5); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 108px; padding: 14px 8px;
  text-align: center; border-radius: 18px; background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); font-size: .93rem; line-height: 1.25; }
.tile svg.i { font-size: 2rem; stroke-width: 1.3; }
.tile.take { background: linear-gradient(rgba(255,210,122,.15), rgba(255,210,122,.15)), var(--glass); border-color: rgba(255,210,122,.42); }
.tile.take svg.i { color: var(--accent); }

.feel { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 34px; font-size: .95rem; color: var(--ink); text-shadow: 0 1px 8px rgba(4,12,34,.5); }

.panel { background: var(--glass); border: 1px solid var(--line); border-radius: 22px; padding: 18px;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); margin-bottom: 14px; }
.panel h2 { font: 500 .92rem var(--sans); color: var(--ink-2); margin: 0 0 12px; }

.now { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.now-main { display: flex; align-items: center; gap: 14px; }
.temp { font: 200 clamp(3.8rem, 13vw, 5.4rem)/1 var(--sans); letter-spacing: -.03em; direction: ltr; }
.now-cond { font-size: 1.1rem; line-height: 1.35; }
.now-cond small { display: block; color: var(--ink-2); font-size: .92rem; }
.unit { min-width: 44px; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); font-size: .95rem; direction: ltr; }
.unit:hover { background: var(--glass-2); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.fact { display: flex; gap: 9px; align-items: flex-start; font-size: .98rem; line-height: 1.3; }
.fact svg.i { font-size: 1.2rem; margin-top: 2px; color: var(--ink-2); }
.fact small { display: block; color: var(--ink-2); font-size: .82rem; }

.hours { display: flex; gap: 4px; overflow-x: auto; margin-inline: -18px; padding: 2px 18px 6px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; -webkit-overflow-scrolling: touch; }
.hour { flex: 0 0 62px; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 8px 2px; border-radius: 14px; font-size: .92rem; }
.hour.nowh { background: var(--glass-2); }
.hour svg.i { font-size: 1.45rem; }
.hour .t { font-weight: 500; direction: ltr; }
.hour .p { font-size: .78rem; color: #bfe0ff; min-height: 1.2em; }
.hour time { color: var(--ink-2); font-size: .84rem; }
.note { margin: 8px 0 0; font-size: .82rem; color: var(--ink-2); }
.now-cond .src { font-size: .78rem; margin-top: 2px; }

.day { display: grid; grid-template-columns: 3.9em 1.7em minmax(34px,1fr) 3em; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .98rem; }
.day:first-of-type { border-top: 0; }
.day svg.i { font-size: 1.4rem; }
.day .range { display: grid; grid-template-columns: 2.6em 1fr 2.6em; gap: 6px; align-items: center; grid-column: 3 / 5; direction: ltr; }
.day .lo { color: var(--ink-2); text-align: left; }
.day .hi { text-align: right; font-weight: 500; }
.bar { height: 5px; border-radius: 9px; background: rgba(255,255,255,.14); position: relative; }
.bar i { position: absolute; top: 0; bottom: 0; border-radius: 9px; background: linear-gradient(90deg, #7fc4ff, #ffe08a, #ff9d5c); }

.foot { margin-top: 26px; font-size: .84rem; color: var(--ink-2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; text-shadow: 0 1px 6px rgba(4,12,34,.6); }
.foot a { color: inherit; }
.loading { text-align: center; font: 500 clamp(1.5rem, 5vw, 2.2rem)/1.2 var(--serif); padding-block: 30vh; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }
.toast { position: fixed; inset-inline: 16px; bottom: max(18px, env(safe-area-inset-bottom)); margin-inline: auto; width: fit-content; max-width: calc(100% - 32px);
  padding: 10px 18px; border-radius: 12px; background: #fff; color: #10203c; font-size: .95rem; box-shadow: 0 10px 30px rgba(0,0,0,.35); z-index: 9; }
.rise { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (min-width: 620px) {
  .wrap { padding-inline: 32px; }
  .panel { padding: 22px; }
  .hours { margin-inline: -22px; padding-inline: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Rain timeline ---------- */
.rainline { display: flex; gap: 2px; height: 20px; margin-top: 4px; }
.rainline i { flex: 1; border-radius: 3px; background: rgba(255,255,255,.14); }
.rainline i.l1 { background: rgba(127,196,255,.5); }
.rainline i.l2 { background: #7fc4ff; }
.rainticks span { flex: 1; }
.rainticks { display: flex; margin-top: 6px; font-size: .8rem; color: var(--ink-2); }
.rainlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: .8rem; color: var(--ink-2); }
.rainlegend span { display: inline-flex; align-items: center; gap: 6px; }
.rainlegend i { width: 12px; height: 12px; border-radius: 3px; background: rgba(255,255,255,.14); }
.rainlegend i.l1 { background: rgba(127,196,255,.5); }
.rainlegend i.l2 { background: #7fc4ff; }
.rain-text { margin: 0 0 12px; font-size: 1.02rem; }
.rain-text b { font-weight: 500; }

/* ---------- Home and work ---------- */
.saveas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; font-size: .95rem; text-shadow: 0 1px 8px rgba(4,12,34,.5); }
.chip.main { background: #fff; color: #10203c; border-color: #fff; font-weight: 500; }
.chip.main:hover { background: #e7f0fc; }
.detail-seg { margin-bottom: 14px; }
.why.stop { margin-bottom: 8px; }
.why-end { margin-bottom: 26px; }

/* ---------- Animation control ---------- */
#motion { position: fixed; inset-inline-end: 14px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 8; }
.wrap { padding-bottom: max(76px, env(safe-area-inset-bottom)); }
.foot { padding-inline-end: 54px; }
#home .links { margin-top: 18px; font-size: .9rem; }
#home .links a, .foot a { color: inherit; }
.recents { display: contents; }

/* ---------- Text pages ---------- */
body.page { background: #0b2f66; }
.prose { padding-block: 32px 60px; max-width: 700px; }
.prose h1 { font: 900 clamp(2.2rem, 7vw, 3.2rem)/1.1 var(--serif); margin: 12px 0 18px; }
.prose h2 { font: 700 1.35rem/1.3 var(--serif); margin: 30px 0 8px; }
.prose li { margin-bottom: 8px; }
.prose a { color: #ffe3a8; }
