/* Sunny: core styles. Layout mirrors Apple Weather: sky gradient, hero stack, frosted modules. */
/* Layout mirrors Apple Weather: full-bleed sky gradient, hero stack, frosted modules. */
:root {
  --text: #fff;
  --text2: rgba(255,255,255,.9);
  --text3: rgba(255,255,255,.76);
  /* Cards are a touch darker than the sky (as in Apple Weather) so white text keeps its contrast. */
  --glass: rgba(8,20,48,.16);
  --glass-2: rgba(8,20,48,.2);
  --line: rgba(255,255,255,.2);
  --butter: #FFD66B;
  --plus: #0B0B0C;      /* every Plus element sits on black */
  --ink: #2A1D10;
  --ease: cubic-bezier(.2,.8,.2,1);
  --spring: cubic-bezier(.2,.8,.2,1);
  --sky: linear-gradient(180deg, #2B68C4 0%, #4383D6 55%, #6399DE 100%);
}
@supports (transition-timing-function: linear(0, 1)) {
  :root { --spring: linear(0, .057 2%, .217 4.5%, .424 7.3%, .64 10.6%, .82 14.4%, .945 18.9%, 1.006 23.4%, 1.024 27.6%, 1.022 32.3%, 1.009 40%, .999 50.8%, 1); }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #2B68C4; color: var(--text);
  font: 400 16px/1.45 Fraunces, Georgia, serif; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-shadow: 0 1px 2px rgba(0,0,0,.14), 0 1px 12px rgba(0,0,0,.08);
  overscroll-behavior-y: none;
}
button, input { font-family: inherit; }
.sky { position: fixed; inset: 0; z-index: -1; background: var(--sky); }
#sky2 { opacity: 0; transition: opacity 1.2s ease; }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .2; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
main { max-width: 520px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 18px) 16px calc(100px + env(safe-area-inset-bottom)); }
.hidden { display: none !important; }

/* ── Hero ── */
.hero { text-align: center; padding: 8px 0 22px; }
.city { background: none; border: 0; color: var(--text); font-size: 32px; font-weight: 400; letter-spacing: -.01em; cursor: pointer; padding: 0; line-height: 1.15; }
.city small { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text3); font-weight: 500; margin-bottom: 2px; }
.mascot { width: 104px; height: 104px; margin: 10px auto 0; }
.mascot svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 18px rgba(0,0,0,.14)); }
.mascot.pop svg { animation: pop .7s var(--spring); }
.eyes { transform-box: fill-box; transform-origin: center; }
.blink .eyes { animation: blink .18s ease-in-out; }
@keyframes blink { 50% { transform: scaleY(.1); } }
.glasses-on .glasses { animation: glassesOn .8s var(--spring) both; }
@keyframes glassesOn { from { transform: translateY(-34px); opacity: 0; } 30% { opacity: 1; } }
.od { display: inline-flex; }
.od .d { display: inline-block; height: 1.16em; overflow: hidden; line-height: 1.16em; margin: -.08em 0; }
.od .col { display: block; transition: transform 1.1s var(--spring); transition-delay: calc(var(--k, 0) * 70ms); }
.od .col span { display: block; height: 1.16em; }
.uv-num { font-size: 104px; font-weight: 700; line-height: .95; letter-spacing: -.035em; margin-top: 4px; font-variant-numeric: tabular-nums; }
#uvLabel, #leftLabel { display: none; }   /* folded into the line under the verdict */
.uv-label { font-size: 19px; font-weight: 500; color: var(--text2); margin-top: 2px; }
.verdict { font-size: 30px; font-weight: 700; letter-spacing: -.01em; margin-top: 14px; line-height: 1.15; }
.sub { color: var(--text2); font-size: 18px; margin: 4px 0 0; }
/* Ring shield (hero while covered) */
.shield { position: relative; width: 104px; height: 104px; margin: 10px auto 0; transition: width .6s var(--ease), height .6s var(--ease); }
.shield .mascot { position: absolute; inset: 0; margin: auto; transition: width .6s var(--ease), height .6s var(--ease); }
.shield .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); opacity: 0; transition: opacity .4s; }
.shield .ring circle { fill: none; stroke-width: 6; }
.shield .rt { stroke: rgba(255,255,255,.22); }
.shield .rf { stroke: #fff; stroke-linecap: round; }
.shield .glow { position: absolute; inset: 4%; border-radius: 50%; opacity: 0; transition: opacity .6s;
  background: radial-gradient(circle, rgba(255,255,255,0) 56%, rgba(255,255,255,.3) 70%, rgba(255,255,255,0) 73%); }
.shield.on { width: 216px; height: 216px; }
.shield.on .mascot { width: 118px; height: 118px; }
.shield.on .ring { opacity: 1; }
.shield.on .glow { opacity: 1; animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.035); } }
.left-num { font-size: 60px; font-weight: 700; letter-spacing: -.03em; line-height: 1; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* Dynamic Island-style pill while covered */
.island { position: fixed; top: calc(env(safe-area-inset-top) + 8px); left: 50%; z-index: 6; display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px 0 8px; border: 0; border-radius: 22px; background: #000; color: #fff; font-size: 14px; font-weight: 600; text-shadow: none; cursor: pointer;
  transform: translateX(-50%); transition: transform .4s var(--ease), opacity .3s; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.island svg { width: 24px; height: 24px; display: block; }
.island .it { color: var(--butter); font-weight: 700; font-variant-numeric: tabular-nums; margin-left: 6px; }
.island.off { opacity: 0; transform: translateX(-50%) scale(.6); pointer-events: none; }

/* Today's cover (arc + blocks) */
.seg { margin-left: auto; display: flex; background: rgba(8,20,48,.22); border-radius: 9px; padding: 2px; text-transform: none; letter-spacing: 0; }
.seg button { border: 0; background: none; color: var(--text2); font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 7px; cursor: pointer; transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: rgba(255,255,255,.92); color: var(--ink); text-shadow: none; }
#coverArc svg { width: 100%; height: auto; display: block; overflow: visible; }
#coverArc text { font-family: Fraunces, Georgia, serif; font-size: 12px; fill: var(--text2); }
#coverArc text.hl { fill: #fff; font-weight: 700; }
.blocks { display: flex; gap: 6px; margin: 6px 0 14px; }
.blocks div { flex: 1; height: 14px; border-radius: 8px; background: rgba(255,255,255,.22); overflow: hidden; }
.blocks i { display: block; height: 100%; background: #fff; transition: width 1s linear; }
.cover-big { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cover-big b { font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.cover-note { color: var(--text2); font-size: 15px; margin: 10px 0 0 !important; padding-top: 10px; border-top: 1px solid var(--line); }

.pill { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 8px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pill .track { width: 70px; height: 5px; background: rgba(255,255,255,.28); border-radius: 9px; overflow: hidden; }
.pill .track i { display: block; height: 100%; background: #fff; border-radius: 9px; transition: width 1s linear; }
.share { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; background: none; border: 0; color: var(--text2); font-size: 15px; cursor: pointer; padding: 6px 10px; }
.share svg { width: 16px; height: 16px; }

.hero { transform-origin: 50% 0; will-change: transform, opacity; }
.compact { position: fixed; top: 0; left: 0; right: 0; z-index: 4; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; font-weight: 600; opacity: 0; pointer-events: none; border: 0; color: var(--text); width: 100%;
  background: var(--hdr, rgba(0,0,0,.2)); -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5); }
.compact svg { width: 26px; height: 26px; display: block; }
.compact .cv { color: var(--text2); font-weight: 500; font-variant-numeric: tabular-nums; }
.compact.on { pointer-events: auto; cursor: pointer; }

/* ── 8. First launch: sky fades up, pebble drops in, then the words ── */
body.intro .sky, body.intro .grain { animation: skyIn 1.2s ease both; }
body.intro .hero .shield { animation: drop 1s var(--spring) .35s both; }
body.intro .hero > :not(.shield) { animation: rise .8s var(--spring) both; animation-delay: calc(.55s + var(--i, 0) * 60ms); }
body.intro #tab-now > .mod { animation: rise .8s var(--spring) both; animation-delay: calc(.9s + var(--i, 0) * 60ms); }
body.intro .tabbar { animation: rise .8s var(--spring) 1s both; }
@keyframes skyIn { from { opacity: 0; } }
@keyframes drop { from { transform: translateY(-60px) scale(.8); opacity: 0; } }

/* ── Frosted modules ── */
.mod { background: var(--glass); border: 1px solid var(--line); border-radius: 20px; padding: 12px 16px 16px; margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 8px 30px rgba(0,0,0,.06);
  -webkit-backdrop-filter: blur(34px) saturate(1.5); backdrop-filter: blur(34px) saturate(1.5); }
.mod-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text3);
  padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.mod-h svg { width: 15px; height: 15px; }
.mod p { margin: 0; }
.mod .lead { font-size: 21px; font-weight: 600; line-height: 1.2; }
.mod .muted { color: var(--text2); font-size: 15px; margin-top: 2px; }
.page-title { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 6px 4px 2px; }
.page-sub { color: var(--text2); margin: 0 4px 16px; font-size: 16px; }

/* Buttons */
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.b { appearance: none; border: 0; border-radius: 14px; padding: 13px 10px; font-size: 16px; font-weight: 600; cursor: pointer; color: var(--ink); background: #fff;
  transition: transform .45s var(--spring), background .2s; text-shadow: none; line-height: 1.2; }
.b small { display: block; font-size: 13px; font-weight: 500; opacity: .85; margin-top: 2px; }
.b.glass { background: var(--glass-2); color: var(--text); border: 1px solid var(--line); }
.b.butter { background: var(--butter); }
.b:active { transform: scale(.96); transition-duration: .08s; }
.b.wide { width: 100%; }
.links { display: flex; gap: 10px; margin-top: 10px; }
.links .b { flex: 1; font-size: 15px; padding: 11px 8px; }
.tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 2px 6px; border-radius: 6px; background: var(--plus); color: #fff; vertical-align: 2px; margin-left: 4px; }
.b.plus { background: var(--plus); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.b.plus .tag { background: var(--butter); color: var(--plus); }

/* Hourly scroller */
.hscroll { display: flex; gap: 4px; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hr { flex: none; width: 52px; text-align: center; scroll-snap-align: start; }
.hr span { display: block; font-size: 14px; color: var(--text2); font-weight: 500; }
.hr i { display: block; width: 10px; height: 10px; border-radius: 50%; margin: 10px auto; box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.hr b { display: block; font-size: 20px; font-weight: 600; }
.hr.now span { color: var(--text); font-weight: 700; }
.window { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text2); font-size: 15px; }

/* Burn + scale */
.burn { display: flex; align-items: baseline; gap: 10px; }
.burn b { font-size: 40px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.scale { position: relative; height: 6px; border-radius: 9px; margin: 16px 0 6px;
  background: linear-gradient(90deg, #6EE7A0, #FFE066 27%, #FFB347 50%, #FF6B6B 72%, #D08CFF); }
.scale i { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid rgba(0,0,0,.18); transform: translate(-50%, -50%); transition: left .8s var(--ease); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: 5px 12px 5px 5px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .2s; }
.chip i { width: 22px; height: 22px; border-radius: 50%; display: inline-block; border: 1.5px solid rgba(255,255,255,.7); }
.chip[aria-pressed="true"] { background: #fff; color: var(--ink); text-shadow: none; }

/* Week (Apple's 10-day rows) */
.day { display: grid; grid-template-columns: 88px 30px 26px 1fr; gap: 8px; align-items: center; padding: 9px 0; }
.day + .day { border-top: 1px solid var(--line); }
.day .n { font-size: 17px; font-weight: 500; }
.day svg { width: 28px; height: 28px; display: block; }
.day b { font-size: 17px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.dtrack { position: relative; height: 6px; background: rgba(255,255,255,.2); border-radius: 9px; }
.dtrack i { position: absolute; top: 0; bottom: 0; border-radius: 9px; }
.locked { position: relative; border-top: 1px solid var(--line); }
.locked .blur { filter: blur(6px); opacity: .6; pointer-events: none; user-select: none; }
.unlock { position: absolute; inset: 0; margin: auto; height: 44px; width: max-content; max-width: 92%; border: 0; border-radius: 999px; background: var(--plus); color: #fff;
  padding: 0 18px; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.18); text-shadow: none; }

/* Upsell + forms */
.up { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.up svg { width: 56px; height: 56px; flex: none; }
.row-form { display: flex; gap: 8px; margin-top: 12px; }
.row-form input { flex: 1; min-width: 0; border: 1px solid var(--line); background: rgba(255,255,255,.14); color: var(--text); border-radius: 14px; padding: 12px 14px; font-size: 16px; outline: none; }
.row-form input::placeholder { color: var(--text3); }
.row-form input:focus { background: rgba(255,255,255,.22); }
.note { color: var(--text3); font-size: 13px; margin: 10px 0 0; }

/* Shop */
.cat-h { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.cat-h svg { width: 22px; height: 22px; }
.cat-h b { font-size: 20px; font-weight: 700; }
.badge { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #fff; color: var(--ink); padding: 3px 8px; border-radius: 999px; text-shadow: none; }
.prod { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: inherit; text-decoration: none; border-top: 1px solid var(--line); transition: opacity .2s; }
.prod:first-of-type { border-top: 0; }
.prod:active { opacity: .6; }
.prod .br { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text3); }
.prod .pn { font-size: 17px; font-weight: 600; line-height: 1.25; }
.prod .wy { font-size: 14px; color: var(--text2); }
.prod .go { margin-left: auto; color: var(--text3); flex: none; }
.prod .go svg { width: 18px; height: 18px; display: block; }

/* Locate */
.locate { text-align: center; padding-top: 8vh; }
.locate .mascot { width: 150px; height: 150px; }
.locate h1 { font-size: 48px; font-weight: 700; letter-spacing: -.03em; margin: 12px 0 0; }
.locate p { color: var(--text2); font-size: 19px; margin: 4px 0 28px; }
.locate .b { max-width: 340px; width: 100%; }
.locate .row-form { max-width: 340px; margin: 12px auto 0; }
.locate .note { min-height: 20px; }

/* Tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: center;
  padding: 6px 16px calc(6px + env(safe-area-inset-bottom));
  background: rgba(0,0,0,.14); -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5); border-top: 1px solid var(--line); }
.tabbar button { flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; padding: 6px 0;
  color: var(--text3); font-size: 11px; font-weight: 600; cursor: pointer; transition: color .2s; }
.tabbar button svg { width: 25px; height: 25px; transition: transform .25s var(--ease); }
.tabbar button[aria-current="page"] { color: var(--text); }
.tabbar button:focus { outline: none; }
.tabbar button:focus-visible { outline: 2px solid rgba(255,255,255,.75); outline-offset: 2px; border-radius: 24px; }
.tabbar button[aria-current="page"] svg { transform: scale(1.08); }

/* Tab transitions: page slides in from the side you're heading to, then modules rise in sequence. */
.tab.enter { animation: slide .5s var(--spring) both; }
.tab.enter > * { animation: rise .6s var(--spring) both; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes slide { from { transform: translateX(var(--dx, 0)); } }
@keyframes rise { from { transform: translateY(6px) scale(.985); opacity: 0; filter: blur(8px); } }
@keyframes float { 50% { transform: translateY(-5px); } }
@keyframes pop { 0% { transform: scale(.82); } 60% { transform: scale(1.06); } }

/* Plus sheet (iOS style) */
.sheet-bg { position: fixed; inset: 0; background: rgba(10,14,30,.4); display: flex; align-items: flex-end; justify-content: center; z-index: 10; transition: opacity .25s; }
.sheet { background: #FFFCF6; color: var(--ink); text-shadow: none; width: 100%; max-width: 520px; border-radius: 28px 28px 0 0;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom)); position: relative; max-height: 92vh; overflow-y: auto; transition: transform .35s var(--ease); }
.sheet-bg.out { opacity: 0; }
.sheet-bg.out .sheet { transform: translateY(100%); }
.sheet-bg.in { animation: fadeIn .25s ease both; }
.sheet-bg.in .sheet { animation: sheetUp .6s var(--spring) both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(100%); } }
.grab { width: 38px; height: 5px; border-radius: 9px; background: #E4DACB; margin: 0 auto 14px; }
.sheet h3 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 10px 0 16px; line-height: 1.1; }
.sheet .x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #F1E9DC; color: var(--ink); font-size: 20px; cursor: pointer; line-height: 1; }
.plus-badge { display: inline-block; background: var(--plus); color: #fff; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.plus-badge::before { content: "☀ "; color: var(--butter); }
.feats { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 14px; }
.feats li { display: flex; gap: 12px; align-items: flex-start; }
.feats svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.feats b { display: block; font-size: 17px; }
.feats span { color: #7A6A55; font-size: 15px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.plan { border: 2px solid #EDE3D3; background: #fff; color: var(--ink); border-radius: 18px; padding: 14px 12px 12px; text-align: left; cursor: pointer; position: relative; transition: border-color .2s, transform .15s; }
.plan:active { transform: scale(.97); }
.plan b { display: block; font-size: 13px; color: #7A6A55; font-weight: 600; }
.plan span { display: block; font-size: 26px; font-weight: 700; margin: 2px 0; }
.plan small { color: #7A6A55; font-size: 13px; }
.plan[aria-pressed="true"] { border-color: var(--plus); }
.plan .best { position: absolute; top: -10px; right: 10px; background: var(--plus); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 3px 7px; border-radius: 6px; }
.sheet .b { background: var(--plus); color: #fff; }
.sheet .row-form input { background: #fff; border-color: #EDE3D3; color: var(--ink); }
.sheet .row-form input::placeholder { color: #A89A8A; }
.sheet .note { color: #7A6A55; }

footer { color: var(--text3); font-size: 12.5px; text-align: center; margin-top: 18px; line-height: 1.6; }
footer p { margin: 2px 0; }
footer a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Offline pill (shown when the forecast comes from the saved copy) */
.offline { position: fixed; bottom: calc(env(safe-area-inset-bottom) + 88px); left: 50%; transform: translateX(-50%); z-index: 8; padding: 6px 14px; border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 13px; font-weight: 600; text-shadow: none; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  animation: rise .5s var(--spring) both; white-space: nowrap; }

/* Trip planner results */
.trip-h { display: flex; gap: 8px; align-items: baseline; margin: 16px 0 4px; }
.trip-h b { font-size: 21px; font-weight: 700; }
