/* Vinterlys. Three type styles: highlight (Doto), body (Inter 15), note (Inter 12 caps). */

:root {
  --glass-edge: rgba(255, 255, 255, .55);
  --dim: rgba(255, 255, 255, .55);
  --accent: #FF8A3D;
  --accent-ink: #8A4B14;
  /* Motion: everything starts softly and lands softly. --glide for scene changes, --ease for settling after a finger lets go. */
  --glide: cubic-bezier(.45, 0, .2, 1);
  --ease: cubic-bezier(.3, .75, .25, 1);
}

body[data-sky="clear"] {
  --sky: linear-gradient(180deg, #A9CBEA 0%, #D3E5F3 42%, #F3E9DC 74%, #FCD7AE 100%); --sky-end: #FCD7AE;
  --halo: rgba(255, 226, 160, .85); --disc: radial-gradient(circle, #FFF2C4 0%, #FFCB70 38%, #FF9F5C 62%, rgba(255,159,92,0) 74%); --core: #FFF6D8;
  --paper: #F7F5F2; --ink: #1F2430; --muted: #5A6070; --soft: rgba(255, 255, 255, .5); --line: rgba(31, 36, 48, .09);
  --glass: rgba(247, 245, 242, .62);
  --day: linear-gradient(90deg, #FFE1A6, #FFC98A, #FFE1A6); --past: #FFAE62; --future: #B9BDC6;
}
body[data-sky="cloudy"], body[data-sky="rainy"] {
  --sky: linear-gradient(180deg, #C6CDD8 0%, #DADEE5 44%, #ECE6E1 76%, #F3DCCB 100%); --sky-end: #F3DCCB;
  --halo: rgba(255, 240, 220, .9); --disc: radial-gradient(circle, #FFF7EA 0%, #FFDDB0 42%, rgba(255,205,160,0) 72%); --core: #FFF8EC;
  --paper: #F5F4F2; --ink: #1F2430; --muted: #5A6070; --soft: rgba(255, 255, 255, .5); --line: rgba(31, 36, 48, .09);
  --glass: rgba(245, 244, 242, .62);
  --day: linear-gradient(90deg, #F3E3CC, #EFCFAE, #F3E3CC); --past: #E8B98A; --future: #B9BDC6;
}
body[data-sky="snowy"] {
  --sky: linear-gradient(180deg, #CFDFEE 0%, #E6EEF6 46%, #F7F9FC 78%, #FFFFFF 100%); --sky-end: #FFFFFF;
  --halo: rgba(255, 255, 255, 1); --disc: radial-gradient(circle, #FFFDF4 0%, #FFF0CC 45%, rgba(255,232,190,0) 72%); --core: #FFFFFF;
  --paper: #F8F9FB; --ink: #1F2430; --muted: #5A6070; --soft: rgba(255, 255, 255, .55); --line: rgba(31, 36, 48, .08);
  --glass: rgba(248, 249, 251, .6);
  --day: linear-gradient(90deg, #FFF3D9, #FFE2B0, #FFF3D9); --past: #F5C98F; --future: #B9BDC6;
}
body[data-sky="polar"], body[data-sky="night"] {
  --sky: linear-gradient(180deg, #0A0F1F 0%, #18213D 46%, #2F3763 76%, #4A4A7A 100%); --sky-end: #4A4A7A;
  --halo: rgba(150, 140, 210, .7); --disc: radial-gradient(closest-side, rgba(240,170,160,.75), rgba(240,170,160,0)); --core: transparent;
  --paper: #131A2C; --ink: #E9ECF5; --muted: #A9B0C6; --soft: rgba(255, 255, 255, .07); --line: rgba(255, 255, 255, .1);
  --glass: rgba(12, 17, 32, .5); --glass-edge: rgba(255, 255, 255, .1); --dim: rgba(8, 12, 24, .45);
  --day: linear-gradient(90deg, #6E74B8, #8E7CC3, #6E74B8); --past: #F0AE96; --future: #4A5270;
  --accent-ink: #F2C9B8;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--paper); }
body {
  font: 400 15px/1.45 Inter, system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h2, p, ul { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }

.note { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hero { font-family: Doto, monospace; font-weight: 700; font-size: 56px; line-height: 1; display: flex; align-items: baseline; gap: 4px; }
.hero .unit { font: 500 12px/1 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; margin-right: 10px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.app { position: relative; max-width: 480px; min-height: 100dvh; margin: 0 auto; overflow-x: hidden; background: var(--sky-end, var(--paper)); }

/* Sky and sun */
.sky { position: fixed; top: 0; left: 0; right: 0; max-width: 480px; margin: 0 auto; height: 100dvh; overflow: hidden; background: var(--sky-end); }
.sky-day { position: absolute; inset: 0 0 auto 0; height: 100%; background: var(--sky); transition: height 1.8s var(--glide); }
.sky-night { position: absolute; inset: 0; background: linear-gradient(180deg, #0E1428 0%, #1B2443 50%, #3A3D6E 82%, #5A4E7A 100%); opacity: 0; transition: opacity 2s var(--glide); }
.sun { position: absolute; left: 50%; top: 58%; width: 0; height: 0; transition: transform 2.2s var(--glide), top 1.8s var(--glide); }
.sun > div { position: absolute; border-radius: 50%; will-change: transform;
  transform: translate(-50%, -50%) translate(var(--x, 0px), var(--y, 0px)) rotate(var(--a, 0rad)) scale(var(--sx, 1), var(--sy, 1)) rotate(calc(var(--a, 0rad) * -1)); }
body.sky-open .sky { touch-action: none; cursor: grab; }
body.sky-open .sky:active { cursor: grabbing; }
.sun-halo { width: 620px; height: 420px; background: radial-gradient(closest-side, var(--halo), transparent); filter: blur(32px); }
.sun-disc { width: 320px; height: 320px; background: var(--disc); filter: blur(14px); }
.sun-core { width: 140px; height: 90px; background: var(--core); filter: blur(18px); }

body[data-phase="rising"] .sun { transform: translateY(60vh) scale(.6); }
body[data-phase="rising"] .sky-night { opacity: 1; }
body[data-phase="ready"] .sky-day { height: 520px; }
body[data-phase="ready"] .sun { top: 210px; transform: scale(.75); }

/* Top bar */
.top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: calc(28px + env(safe-area-inset-top)) 24px 0; min-height: calc(72px + env(safe-area-inset-top)); }
body[data-phase="rising"] .top { color: #E9ECF5; }
.pill { height: 36px; padding: 0 12px 0 14px; border: 0; border-radius: 18px; display: flex; align-items: center; gap: 6px; cursor: pointer; background: var(--glass); -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%); box-shadow: inset 0 1px 0 var(--glass-edge); }
.pill svg { opacity: .75; flex-shrink: 0; }
body[data-phase="rising"] .brand { color: #E9ECF5; }

.pill { white-space: nowrap; }
#city-label { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

/* Loading */
.loading { position: relative; z-index: 1; height: calc(100dvh - 72px); }
.loading-text { position: absolute; left: 0; right: 0; top: 42%; text-align: center; color: #E9ECF5; transition: opacity .8s; }
.loading-hero { position: absolute; left: 0; right: 0; bottom: 14%; display: flex; flex-direction: column; align-items: center; gap: 6px; opacity: 0; transform: translateY(10px); transition: opacity .8s .6s, transform .8s .6s; }
body:not([data-phase="rising"]) .loading-text { opacity: 0; }
body[data-phase="risen"] .loading-hero { opacity: 1; transform: none; }
body[data-phase="ready"] .loading { display: none; }
/* During the hand-off the sky and sun settle at the same slow pace as the drawer. */
body.handing .sky-day { transition: height 1.6s cubic-bezier(.45, 0, .2, 1); }
body.handing .sun { transition: transform 1.8s cubic-bezier(.45, 0, .2, 1), top 1.6s cubic-bezier(.45, 0, .2, 1); }

/* Panel */
.panel { position: relative; z-index: 1; margin-top: 178px; background: var(--glass); -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%); box-shadow: inset 0 1px 0 var(--glass-edge); border-radius: 28px 28px 0 0; padding: 22px 24px 32px; transition: transform .6s var(--ease); }
.block + .block { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
#hero { margin-top: 6px; }
.handle { display: block; width: 100%; height: 32px; margin: -16px 0 2px; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; }
.handle::before { content: ''; display: block; width: 40px; height: 5px; margin: 0 auto; border-radius: 3px; background: var(--muted); opacity: .45; }
body.sky-open { overflow: hidden; }
body.sky-open .sky-day { height: 100%; }
body.sky-open .sun { top: 46%; transform: scale(1); }
body.sky-open .panel { touch-action: none; transform: translateY(calc(100dvh - 250px - 150px)); }

.strip { position: relative; height: 62px; margin-top: 14px; }
.strip-track { position: absolute; left: 0; right: 0; top: 22px; height: 20px; border-radius: 10px; background: var(--line); }
.strip-day { position: absolute; top: 22px; height: 20px; border-radius: 10px; background: var(--day); }
.strip-window { position: absolute; top: 22px; height: 20px; border-radius: 10px; background: var(--accent); }
.strip-spent { position: absolute; top: 22px; height: 20px; border-radius: 10px; background: var(--dim); }
.strip-now { position: absolute; top: 16px; width: 2px; height: 32px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.strip-best { position: absolute; top: 0; color: var(--accent-ink); white-space: nowrap; transform: translateX(-50%); }
.strip-time { position: absolute; top: 46px; color: var(--muted); text-transform: none; transform: translateX(-50%); }
#today-message { margin-top: 12px; }

#tomorrow-message { margin-top: 6px; }
/* Small action cards in Tomorrow: something to fill the minutes with, then when to go out. */
.card { margin-top: 10px; display: flex; align-items: center; gap: 12px; padding: 6px 16px 6px 6px; border-radius: 28px; background: var(--soft); text-decoration: none; }
.card-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.card-icon.play { background: var(--ink); color: var(--paper); }
.card-title { flex: 1; text-align: left; }
button.card { width: 100%; border: 0; font: inherit; color: inherit; cursor: pointer; }
.card .chev { color: var(--muted); margin-left: -4px; }

/* The mark is the check-in: a grey dotted sun that lights up once you have been outside today. */
.brand.log { display: flex; align-items: center; gap: 10px; height: 36px; margin: 0; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; }
.brand.log:disabled { cursor: default; }
.logo { display: block; overflow: visible; }
.logo-sun { fill: currentColor; opacity: .38; transform-origin: 18px 21px; transition: opacity .8s, fill .8s, filter .8s; }
/* The logo's sun follows the real sun: up in daylight, resting on the horizon at dawn and dusk, below it at night. */
.logo-disc { transform: translateY(var(--logo-sun-y, 0px)); transition: transform 2.4s var(--glide); }
.logo-line { fill: currentColor; opacity: .55; }
.log.done .logo-sun { fill: var(--accent); opacity: 1; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 70%, transparent)); }
.dots i.lit { border: 0; background: var(--accent); box-shadow: 0 0 6px 1px color-mix(in srgb, var(--accent) 60%, transparent); }

/* Tomorrow: weather as one calm row of icon + word, inside What to wear */
.wx { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 12px 16px; border-radius: 20px; background: var(--soft); }
.wx-item { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.wx-item > span:first-child { display: flex; color: var(--accent-ink); }
.wx-item > span:first-child:empty, .wx-item > span:last-child:empty { display: none; }
.remind { margin-top: 12px; }
#t-wear { margin-top: 10px; }

/* Facts with one icon family and a short word */
.facts.iconfacts { text-align: center; padding: 16px 8px 14px; }
.fact-icon { display: flex; justify-content: center; color: var(--accent-ink); }
.iconfacts .fact-icon + p { margin-top: 6px; }
.iconfacts .note { margin-top: 2px; }

/* Ideas as small cards */
.ideas { list-style: none; padding: 0; margin-top: 8px; }
.idea { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.idea p { flex: 1; }
.idea-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }

/* The science, folded away until you want it */
.why { margin-top: 18px; border-radius: 20px; background: var(--soft); padding: 0 16px; }
.why summary { list-style: none; display: flex; justify-content: space-between; align-items: center; height: 52px; cursor: pointer; }
.why summary::-webkit-details-marker { display: none; }
.why summary::after { content: ''; width: 7px; height: 7px; margin-left: 10px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .4s var(--ease); }
.why[open] summary::after { transform: rotate(-135deg); }
.why summary span:first-child { flex: 1; }
.why .science { margin-top: -4px; padding-bottom: 6px; }
.why .t-care { margin: 14px 0 16px; }

/* Tomorrow drawer */
#t-hero { margin-top: 6px; }
#t-words { margin-top: 8px; }
.hours { display: flex; gap: 4px; height: 120px; margin-top: 22px; }
.hour { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.hour i { display: block; width: 100%; max-width: 28px; border-radius: 8px; background: var(--line); }
.hour.best i { background: var(--accent); }
.hour-temp { font-size: 12px; color: var(--muted); }
.hour.best .hour-temp { color: var(--ink); }
.hour .note { order: 3; }
#t-facts { margin-top: 22px; }
.t-para { margin-top: 6px; }
.science { list-style: none; padding: 0; margin-top: 4px; }
.science li { padding-top: 12px; }
.science a { display: inline-block; margin-top: 4px; }
.t-care { margin-top: 26px; }
#tomorrow-message + .card { margin-top: 14px; }

.season-day { display: flex; align-items: center; gap: 8px; }
.season-open { cursor: pointer; border-radius: 12px; outline-offset: 6px; }
.season-open:focus-visible { outline: 2px solid var(--accent); }

/* Season chart sheet */
body.sheet-open { overflow: hidden; }
body.sheet-open .panel, body.sheet-open .top { opacity: 0; transition: opacity .3s; }
.panel, .top { transition: opacity .6s var(--glide), transform .8s var(--ease); }
.sheet { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; top: calc(64px + env(safe-area-inset-top)); max-width: 480px; margin: 0 auto; border-radius: 28px 28px 0 0; padding: 22px 24px calc(28px + env(safe-area-inset-bottom)); overflow-y: auto; transition: transform .7s var(--ease); background: var(--glass); -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%); box-shadow: inset 0 1px 0 var(--glass-edge); }
#sheet-hero { margin-top: 6px; min-height: 56px; }
#sheet-words { margin-top: 8px; height: 66px; }
.curve { position: relative; height: 170px; margin-top: 22px; touch-action: pan-y; cursor: pointer; }
.curve svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.curve-lived { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.curve-ahead { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1 7; opacity: .7; vector-effect: non-scaling-stroke; }
.curve-glow { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .9; transition: opacity .6s var(--glide); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 60%, transparent)); }
.burst { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); pointer-events: none; box-shadow: 0 0 6px 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.curve-mark { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--muted); transform: translate(-50%, -50%); pointer-events: none; }
/* The little sun: the same soft glow as the big one in the sky. */
.curve-sun { position: absolute; width: 20px; height: 20px; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 1;
  background: radial-gradient(circle, #FFF6D8 0%, #FFCB70 45%, var(--accent) 100%);
  box-shadow: 0 0 18px 8px rgba(255, 170, 110, .45), 0 0 48px 22px rgba(255, 170, 110, .18); }
.curve-ends { display: flex; justify-content: space-between; margin-top: 12px; }
.chapters { display: flex; gap: 6px; margin-top: 22px; }
.chapter { flex: 1 1 auto; height: 36px; padding: 0 6px; white-space: nowrap; border: 0; border-radius: 18px; background: none; color: var(--muted); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: background .6s, color .6s; }
.story-more { margin-top: 24px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 16px; border-radius: 20px; background: var(--soft); }
.facts p + p { margin-top: 4px; white-space: nowrap; }
/* Season facts as bars, in the same style as today's strip */
.facts.meters { display: block; padding: 8px 16px; }
.meter { display: grid; grid-template-columns: 86px 1fr 84px; align-items: center; gap: 12px; height: 38px; }
.meter-val { text-align: right; white-space: nowrap; }
.meter-track { position: relative; height: 10px; border-radius: 5px; background: var(--line); }
.meter-fill { position: absolute; top: 0; height: 10px; border-radius: 5px; background: var(--accent); transition: left 1.4s cubic-bezier(.45, 0, .2, 1), width 1.4s cubic-bezier(.45, 0, .2, 1); }
.meter-fill.day { background: var(--day); }
.meter-fill.cold { background: #8FB4E8; }
.meter-zero { position: absolute; left: 50%; top: -3px; width: 1px; height: 16px; background: var(--muted); opacity: .5; }
.meter-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--soft); transition: left 1.4s cubic-bezier(.45, 0, .2, 1), opacity .4s; }
.meter-dot.cold { background: #8FB4E8; }
.tips-title { margin: 22px 0 0; font-weight: 500; }
.tips { list-style: none; padding: 0; margin-top: 4px; }
.tips li { position: relative; padding: 10px 0 0 18px; }
.tips li::before { content: ''; position: absolute; left: 2px; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.chapter.on { background: var(--soft); color: var(--ink); box-shadow: none; }

.marks { position: relative; height: 18px; margin-top: 12px; }
.marks .note { position: absolute; top: 0; color: var(--accent-ink); transform: translateX(-50%); white-space: nowrap; }
.dots { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 11px); margin-top: 4px; }
.dots span { display: flex; align-items: center; justify-content: center; }
.dots i { display: block; border-radius: 50%; border: 1px solid var(--future); }
.dots i.past { border: 0; background: var(--past); }
.dots i.now { border: 0; background: var(--accent); box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--accent) 35%, transparent); }
.dots i.ring { border: 2px solid var(--accent); }
.dots i.turn { outline: 1px dashed var(--muted); outline-offset: 2px; }
.countdown { position: relative; height: 40px; }
.countdown .tick { position: absolute; top: 4px; width: 1px; height: 8px; background: var(--muted); }
.countdown p { position: absolute; top: 12px; white-space: nowrap; transform: translateX(-50%); }
.foot { margin-top: 32px; padding-bottom: 8px; text-align: center; }
.credit { opacity: .45; }
.credit a { text-decoration: none; }
.foot-why { color: var(--muted); }
.foot .credit { margin-top: 14px; }
.link-quiet { padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
/* The science drawer hugs its content */
#wsheet { top: auto; max-height: calc(100dvh - 64px - env(safe-area-inset-top)); }
#wsheet .science { margin-top: 4px; }
#wsheet .t-care { margin-top: 22px; }

/* Picker */
.picker { position: relative; z-index: 1; margin-top: 128px; background: var(--glass); -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%); box-shadow: inset 0 1px 0 var(--glass-edge); border-radius: 28px 28px 0 0; padding: 22px 24px 32px; min-height: calc(100dvh - 200px); transition: transform .8s var(--ease); }
.picker-top { touch-action: none; }
body:has(.picker:not([hidden])) .loading, body:has(.picker:not([hidden])) .panel { display: none; }
body:has(.picker:not([hidden])) .sky-day { height: 260px; }
body:has(.picker:not([hidden])) .sun { top: 210px; transform: scale(.55); }
body:has(.picker:not([hidden])) .sky-night { opacity: 0; }
.search { position: relative; margin-top: 10px; color: var(--muted); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; }
#city-search { width: 100%; height: 48px; padding: 0 18px 0 42px; border: 0; border-radius: 24px; background: var(--soft); color: var(--ink); box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--line); -webkit-appearance: none; appearance: none; }
#city-search::placeholder { color: var(--muted); }
#city-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.soft { width: 100%; margin-top: 10px; height: 48px; border: 0; border-radius: 24px; background: var(--soft); box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--line); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
#locate-note { margin-top: 10px; }
#locate-note:empty { display: none; }
.list-head { margin-top: 36px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cities { list-style: none; padding: 0; }
.cities button { width: 100%; height: 48px; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; border-bottom: 1px solid var(--soft); padding: 0; cursor: pointer; text-align: left; }
.cities .group { padding: 26px 0 8px; border-bottom: 1px solid var(--line); }
.cities .empty { padding: 14px 0; color: var(--muted); }



button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

/* Tomorrow drawer rhythm: 28 between sections, 8 from a heading to its content, 12 inside a section. */
#tsheet #t-hero { margin-top: 6px; }
#tsheet .tips-title { margin-top: 28px; }
#tsheet .tips-title + * { margin-top: 8px; }
#tsheet .remind { margin-top: 12px; }
#tsheet .hours { margin-top: 16px; height: 104px; }
#tsheet .wx + .t-para { margin-top: 12px; }
#tsheet .ideas { margin-top: 2px; }
#tsheet .idea { padding: 6px 0; }


/* ------------------------------------------------------------------
   Cosmic softness (Dec 2026). Lines that glow and dissolve, a sun you can see through, fine grain over everything.
   ------------------------------------------------------------------ */
:root { --orb-glow: rgba(255, 176, 112, .5); --orb-core: rgba(255, 250, 238, .62); --orb-edge: rgba(255, 255, 255, .85); --dotline: rgba(31, 36, 48, .28); }
body[data-sky="polar"], body[data-sky="night"] { --orb-glow: rgba(240, 174, 150, .45); --orb-core: rgba(255, 236, 228, .35); --orb-edge: rgba(255, 255, 255, .55); --dotline: rgba(233, 236, 245, .3); }

/* Fine grain on top of everything: soft, visible up close, never noisy. */
body::after {
  /* Fine grain: a soft, mid-grey noise that only nudges brightness. Felt more than seen. */
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .4; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
body[data-sky="polar"]::after, body[data-sky="night"]::after { opacity: .32; }

/* The translucent sun: a clear core, a fine bright rim, a wide soft glow. The line behind it stays visible. */
.orb {
  border-radius: 50%;
  background: radial-gradient(circle, var(--orb-core) 0 30%, rgba(255, 220, 170, .22) 58%, rgba(255, 190, 130, .06) 70%, transparent 71%);
  box-shadow: inset 0 0 0 1px var(--orb-edge), 0 0 14px 4px var(--orb-glow), 0 0 46px 18px color-mix(in srgb, var(--orb-glow) 40%, transparent);
  -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px);
}

/* Today strip: a dotted night, the day as a clear band of sunlight, the best hours brightest, the light already used fainter. */
.strip-track { top: 31px; height: 2px; border-radius: 0; background: radial-gradient(circle, var(--dotline) .9px, transparent 1.3px) 0 50% / 6px 2px repeat-x; }
.strip-day { --sunband: color-mix(in srgb, var(--accent) 55%, var(--past)); top: 28px; height: 8px; border-radius: 4px; filter: none; background: linear-gradient(90deg, color-mix(in srgb, var(--sunband) 55%, transparent), var(--sunband) 50%, color-mix(in srgb, var(--sunband) 55%, transparent)); box-shadow: 0 0 16px 4px color-mix(in srgb, var(--sunband) 50%, transparent); }
.strip-window { top: 25px; height: 14px; border-radius: 7px; filter: none; opacity: 1; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent) 50%, color-mix(in srgb, var(--accent) 70%, #fff)); box-shadow: 0 0 18px 5px color-mix(in srgb, var(--accent) 50%, transparent); }
.strip-spent { top: 25px; height: 14px; border-radius: 7px; filter: none; background: color-mix(in srgb, var(--paper) 62%, transparent); }
.strip-now { top: 21px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; transition: width 1.2s var(--glide), height 1.2s var(--glide), top 1.2s var(--glide), margin-left 1.2s var(--glide), opacity 1.2s var(--glide); background: radial-gradient(circle, var(--orb-core) 0 30%, rgba(255, 220, 170, .22) 60%, transparent 72%); box-shadow: inset 0 0 0 1px var(--orb-edge), 0 0 14px 4px var(--orb-glow); -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); }

/* Season curve: the lived part glows and fades in from the start, the days ahead dissolve into dots. */
.curve-lived { stroke: url(#lived); stroke-width: 2; }
.curve-halo { fill: none; stroke: url(#lived); stroke-width: 10; stroke-linecap: round; opacity: .35; filter: blur(6px); vector-effect: non-scaling-stroke; }
.curve-ahead { stroke: url(#ahead); stroke-width: 2.2; stroke-dasharray: .1 7; opacity: 1; }
.curve-mark { width: 7px; height: 7px; border: 0; background: var(--orb-core); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent), 0 0 8px 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.curve-sun { width: 26px; height: 26px; background: radial-gradient(circle, var(--orb-core) 0 30%, rgba(255, 220, 170, .22) 58%, rgba(255, 190, 130, .06) 70%, transparent 71%); box-shadow: inset 0 0 0 1px var(--orb-edge), 0 0 16px 5px var(--orb-glow), 0 0 56px 22px color-mix(in srgb, var(--orb-glow) 40%, transparent); -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); }

/* Hours: one sun per hour. Bigger and brighter when more of the sky is clear. The best hours sit in a soft glow. */
.hours-key { margin-top: 18px; }
#tsheet .hours, .hours { height: auto; margin-top: 10px; gap: 0; align-items: stretch; }
.hour { justify-content: flex-start; gap: 8px; padding: 6px 0 8px; border-radius: 16px; }
.hour.best { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 0; }
.hour.best:not(.best + .best) { border-radius: 16px 0 0 16px; }
.hour.best:has(+ .hour:not(.best)), .hour.best:last-child { border-top-right-radius: 16px; border-bottom-right-radius: 16px; }
.hour-sun { height: 40px; display: grid; place-items: center; }
.hour .hour-sun i { display: block; max-width: none; border-radius: 50%; background: radial-gradient(circle, var(--orb-core) 0 30%, rgba(255, 220, 170, .3) 60%, transparent 72%); box-shadow: inset 0 0 0 1px var(--orb-edge), 0 0 10px 3px var(--orb-glow); }
.hour.best .hour-sun i { box-shadow: inset 0 0 0 1px var(--orb-edge), 0 0 16px 6px color-mix(in srgb, var(--accent) 60%, transparent); }
.hour .note { order: 0; }

/* Season meters, in the season chart's language: a dotted line, a thin glowing line for the value, a see-through sun on it. */
.meter-track { height: 2px; border-radius: 0; background: radial-gradient(circle, var(--dotline) .9px, transparent 1.3px) 0 50% / 6px 2px repeat-x; }
.meter-fill { top: -1px; height: 4px; border-radius: 2px; filter: none; opacity: 1; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 0%, transparent), var(--accent)); box-shadow: 0 0 10px 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.meter-fill.day { --sunband: color-mix(in srgb, var(--accent) 55%, var(--past)); background: linear-gradient(90deg, color-mix(in srgb, var(--sunband) 60%, transparent), var(--sunband) 50%, color-mix(in srgb, var(--sunband) 60%, transparent)); box-shadow: 0 0 12px 3px color-mix(in srgb, var(--sunband) 50%, transparent); }
.meter-fill.cold { background: linear-gradient(90deg, #8FB4E8, rgba(143, 180, 232, .2)); box-shadow: 0 0 10px 2px rgba(143, 180, 232, .4); }
.meter-zero { top: -6px; height: 14px; opacity: .3; }
.meter-dot { width: 18px; height: 18px; margin: -9px 0 0 -9px; background: radial-gradient(circle, var(--orb-core) 0 30%, rgba(255, 220, 170, .25) 60%, transparent 72%); box-shadow: inset 0 0 0 1px var(--orb-edge), 0 0 12px 4px var(--orb-glow); -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); }
.meter-dot.cold { box-shadow: inset 0 0 0 1px var(--orb-edge), 0 0 12px 4px rgba(143, 180, 232, .55); }

.hero .unit.pre { margin-right: 12px; }

/* Tomorrow, in the season sheet's rhythm: one line under the hero, then clear sections with room between them. */
#tsheet .t-words { margin-top: 8px; }
#tsheet .tips-title { margin-top: 40px; }
#tsheet .tips-title + * { margin-top: 14px; }
#tsheet .hours-key { margin-top: 10px; text-align: center; }
#tsheet .remind { margin-top: 20px; }
.wear-card { padding: 16px 18px; border-radius: 20px; background: var(--soft); }
.wear-card .wx { margin: 0; padding: 0; background: none; }
#tsheet .wear-card .t-para { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }
#tsheet .ideas { margin-top: 6px; }
#tsheet .idea { padding: 8px 0; }

/* ------------------------------------------------------------------
   One scroll: the page stays still, only the drawer and sheets scroll. */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.app { height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.top, .loading { flex: none; }
.panel, .picker { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.panel { padding-bottom: calc(32px + env(safe-area-inset-bottom)); scrollbar-width: none; }
.panel::-webkit-scrollbar { display: none; }
.sheet { overscroll-behavior: contain; }
/* While a sheet is swiped away from the left edge, today shows through behind it. */
body.sheet-open .panel, body.sheet-open .top { opacity: var(--peek, 0); }

/* Season: the expand icon is a real button now. */
.season-day { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 0 6px 10px; margin: -6px 0; cursor: pointer; }
.countdown { cursor: pointer; }

/* Evening hero: the sunrise time. */
.hero .colon { margin: 0 -7px; }

/* Today strip: good light around the clearest hours, a softer glow. */
.strip { touch-action: pan-y; cursor: ew-resize; -webkit-user-select: none; user-select: none; }
.strip-good { position: absolute; top: 27px; height: 10px; border-radius: 5px; pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 45%, transparent) 30%, color-mix(in srgb, var(--accent) 45%, transparent) 70%, transparent);
  box-shadow: 0 0 14px 3px color-mix(in srgb, var(--accent) 22%, transparent); }
/* Peeking: one quiet line follows the finger, the best label steps aside. */
.strip-peek { position: absolute; top: -2px; transform: translateX(-50%); pointer-events: none; opacity: 0; transition: opacity .5s var(--glide); white-space: nowrap; }
.strip-peek .note { color: var(--ink); }
.strip.peeking .strip-peek { opacity: 1; }
.strip-best { transition: opacity .5s var(--glide); }
.strip.peeking .strip-best { opacity: 0; }
.strip.peeking .strip-now { transition: width .5s var(--glide), height .5s var(--glide), top .5s var(--glide), margin-left .5s var(--glide), opacity .5s var(--glide); }

/* Best time out: each daylight hour is a soft glow, like light rising off the horizon.
   Clearest hours glow fully, the good hours around them softly, the rest faintly. */
.glowhours { display: flex; align-items: flex-end; gap: 6px; height: 112px; margin-top: 16px; position: relative; filter: blur(1.5px); }
.glowhours::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent); }
.glow { flex: 1; display: block; margin: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; opacity: .2;
  background: radial-gradient(ellipse 60% 100% at 50% 100%, #FFF4E2 0%, color-mix(in srgb, var(--accent) 55%, #FFE9CF) 22%, var(--accent) 48%, color-mix(in srgb, var(--accent) 35%, transparent) 78%, transparent 100%);
  transition: opacity .8s var(--glide); }
.glow.good { opacity: .5; }
.glow.best { opacity: 1; box-shadow: 0 10px 22px -6px color-mix(in srgb, var(--accent) 55%, transparent); }
.glow-ticks { position: relative; height: 34px; margin-top: 8px; }
.glow-ticks .note { position: absolute; top: 12px; transform: translateX(-50%); color: var(--muted); }
.glow-ticks .note:first-of-type { transform: none; }
.glow-ticks .note:last-of-type { transform: translateX(-100%); }
.glow-ticks .note.on { color: var(--ink); }
/* The clearest window as one thin glowing line from its start to its end, right above the hours. */
.glow-ticks b { position: absolute; top: 0; height: 3px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px 2px color-mix(in srgb, var(--accent) 45%, transparent); }

/* Peeking at another hour: a daylight sky that washes in over the night, quick enough to follow a finger. */
.sky-peek { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 1.2s var(--glide);
  background: radial-gradient(ellipse 80% 40% at 50% 34%, rgba(255, 226, 170, .55), transparent 70%), linear-gradient(180deg, #A9CBEA 0%, #D3E5F3 42%, #F3E9DC 74%, #FCD7AE 100%); }
.sky.peeking .sky-peek, .sky.peeking .sky-night { transition: opacity .3s linear; }

/* Evening hero: "Sunrise tomorrow" stacked beside the time, so it is clear which sunrise. */
.hero .unit.pre.stack { line-height: 1.3; align-self: center; }

/* Reminders inside the iPhone app. */
.remind.on .card-icon { color: var(--accent-ink); }
.remind-more { margin-top: 10px; text-align: center; }
.remind-more .link-quiet { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
