/* Main app screens, from the design reference (phone/). Theme: background #05030b, cards rgba(14,9,26,.9),
   gradient #F9B776 → #E879B0 → #8B5CF6, Montserrat. Every full-screen layout uses dvh; animations use
   transform/opacity only; decorations are static. */
:root {
  --ink: #1a0f22;
  --warm: #FBE3CF;
  --body: #EDE8F5;
  --muted-1: #C9C2D8;
  --muted-2: #8F88A3;
  --card: rgba(14, 9, 26, .9);
  --card-line: rgba(255, 255, 255, .1);
  --peach-line: rgba(249, 183, 118, .35);
  --grad: linear-gradient(90deg, #F9B776 0%, #E879B0 55%, #8B5CF6 100%);
  /* Tab bar: one bar (#nav) for every page, fixed at the bottom, 8px above the bottom safe area. Everything that
     sits above it (mini-player, notices, the space pages keep free) is worked out from these values. */
  --bar-bottom: calc(env(safe-area-inset-bottom) + 8px);
  --bar-h: 72px;
  --mini-h: 62px;
  --mini-gap: 8px;
  /* Space kept free at the bottom of every page: tab bar (+ mini-player when it shows). Nothing sits under them. */
  --bar-top: calc(var(--bar-bottom) + var(--bar-h));
  --reserve: calc(var(--bar-top) + 20px);
}
html.mini-on { --reserve: calc(var(--bar-top) + var(--mini-gap) + var(--mini-h) + 20px); }

html.tabs-on body { padding-bottom: var(--reserve); }
html.np-open body { overflow: hidden; }

/* ---------- shared pieces ---------- */
.screen { position: relative; max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; overflow-x: clip; color: #fff;
  background: linear-gradient(180deg, #04030a 0, #080512 170px, #120a24 380px, #05030b 1000px) #05030b; }
.top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 12px) 20px 14px; }
.sq-btn, .round-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; background: transparent; color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 12px; cursor: pointer; }
.round-btn { border-radius: 50%; }
.top-word { min-width: 0; white-space: nowrap; font-weight: 300; font-size: 15px; letter-spacing: .42em; padding-left: .42em; color: #fff; }
.top-word.big { font-size: clamp(18px, 6.2vw, 24px); }
.rule { width: 180px; height: 1px; margin: 14px auto 12px; background: linear-gradient(90deg, rgba(249,183,118,0), #F9B776, rgba(249,183,118,0)); }
.rule.soft { width: auto; margin: 40px 60px 0; background: linear-gradient(90deg, rgba(249,183,118,0), rgba(249,183,118,.6), rgba(249,183,118,0)); }
.eyebrow { font-size: 11px; letter-spacing: .3em; color: #F9B776; font-weight: 500; text-transform: uppercase; margin: 0; }
.eyebrow.muted { color: var(--muted-1); letter-spacing: .22em; font-weight: 400; margin-bottom: 4px; }
.eyebrow.center { text-align: center; }
.center { text-align: center; }

.btn-grad { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 48px; padding: 0 18px; border: 0; border-radius: 30px;
  background: var(--grad); color: var(--ink); font: 600 15px var(--font-body); text-decoration: none; cursor: pointer; }
.btn-grad.big { height: 64px; font-size: 18px; box-shadow: 0 8px 30px rgba(232, 121, 176, .35); }
.btn-grad.mid { height: 42px; font-size: 14px; }
.btn-grad.small { width: auto; display: inline-flex; height: 38px; font-size: 13px; padding: 0 16px; }
.btn-grad:disabled { opacity: .7; }
.btn-grad svg { flex: none; }
.btn-line { display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; padding: 0 16px; border-radius: 30px;
  border: 1.5px solid rgba(255, 255, 255, .5); background: transparent; color: #fff; font: 14px var(--font-body); text-decoration: none; cursor: pointer; }
.btn-line.small { width: auto; display: inline-flex; height: 38px; font-size: 13px; }
.link-peach { background: none; border: 0; padding: 0; color: #F9B776; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-quiet { display: block; margin: 2px auto 0; min-height: 22px; background: none; border: 0; padding: 0; color: var(--muted-2); font: 12.5px var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
span.link-quiet { text-decoration: none; }

/* Static sky: glow, horizon and sun (placeholder art until the real images arrive). */
.sky { position: absolute; inset: 0; pointer-events: none; }
.sky-glow { position: absolute; left: -120px; right: -120px; height: 300px;
  background: radial-gradient(ellipse at 50% 55%, rgba(255,190,120,.55) 0%, rgba(232,121,176,.28) 25%, rgba(139,92,246,.14) 45%, rgba(0,0,0,0) 68%); }
.sky-hill { position: absolute; left: -160px; right: -160px; height: 520px; border-radius: 50% 50% 0 0 / 120px 120px 0 0;
  background: linear-gradient(180deg, #1a1230 0%, #0a0716 30%, #05030b 70%); box-shadow: 0 -2px 18px rgba(249,183,118,.75), 0 -1px 0 rgba(255,214,170,.95);
  clip-path: inset(-60px -60px 0 -60px); }
.sky-sun { position: absolute; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff3e0; box-shadow: 0 0 22px 10px rgba(255,200,140,.8); }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: var(--bar-bottom); width: min(calc(100% - 28px), 532px); height: var(--bar-h); margin: 0 auto;
  padding: 1.5px; border-radius: 26px; background: var(--grad); }
.tabbar[hidden], .tab-floor[hidden] { display: none; }
/* Under the tab bar: the page never shows through (no content peeking out below the bar). */
.tab-floor { position: fixed; z-index: 28; left: 0; right: 0; bottom: 0; height: calc(var(--bar-top) + 10px); pointer-events: none;
  background: linear-gradient(to bottom, rgba(5, 3, 11, 0) 0, #05030b 20px); }
html.mini-on .tab-floor { height: calc(var(--bar-top) + var(--mini-gap) + 18px); } /* also fills the slit between the mini-player and the bar */
html:not(.tabs-on) .tab-floor { display: none; }
.tabbar-in { height: 100%; display: flex; align-items: center; padding: 0 4px; border-radius: 25px; background: #0a0714; }
.tabbar a { flex: 1; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--body); font-size: 11px; font-weight: 400; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.tabbar a.on { color: #F9B776; font-weight: 600; }
.tabbar svg { display: block; }
/* Red dot on the Astrology tab: a new sky event hasn't been seen yet. */
.tab-dot { position: absolute; top: 9px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%; background: #FF4D5E; box-shadow: 0 0 0 2px #0a0714; pointer-events: none; }
.tab-dot[hidden] { display: none; }

/* ---------- mini-player ---------- */
.mini { position: fixed; z-index: 29; left: 0; right: 0; bottom: calc(var(--bar-top) + var(--mini-gap)); width: min(calc(100% - 28px), 532px); height: var(--mini-h); margin: 0 auto;
  display: flex; align-items: center; border-radius: 16px; background: #1c1026; border: 1px solid var(--peach-line); box-shadow: 0 6px 24px rgba(0,0,0,.5); overflow: hidden; }
.mini[hidden] { display: none; }
.mini-open { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 12px; padding: 0 0 0 9px; background: none; border: 0; color: #fff; text-align: left; font: inherit; cursor: pointer; }
.mini-art { position: relative; width: 44px; height: 44px; flex: none; border-radius: 6px; overflow: hidden; background: linear-gradient(135deg, #2b2140, #43305f); }
.mini-art img, .np-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .3s; }
.mini-art img.on, .np-art img.on { opacity: 1; }
.mini-text { flex: 1; min-width: 0; display: block; }
.mini-title, .mini-artist { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-title { font-size: 14px; font-weight: 500; line-height: 20px; }
.mini-artist { font-size: 12px; color: #F9B776; margin-top: 2px; line-height: 16px; }
.mini-play { width: 44px; height: 44px; margin-right: 8px; flex: none; display: grid; place-items: center; background: none; border: 0; color: #fff; cursor: pointer; padding: 0; }
.mini-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none; }
.mini-bar span { display: block; height: 100%; background: var(--grad); transform-origin: left center; transform: scaleX(0); }
.glide { transition: transform 1s linear; }

/* ---------- floating notice, overlays ---------- */
.notice-host { position: fixed; z-index: 70; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 16px); width: min(calc(100% - 28px), 532px); margin: 0 auto; }
html.tabs-on .notice-host { bottom: calc(var(--bar-top) + 12px); }
html.tabs-on.mini-on .notice-host { bottom: calc(var(--bar-top) + var(--mini-gap) + var(--mini-h) + 12px); }
html.tabs-on.mini-on.np-open .notice-host { bottom: calc(var(--bar-top) + 12px); } /* the mini-player is hidden under Now Playing */
.notice-host[hidden] { display: none; }
.notice-card { position: relative; padding: 14px 48px 14px 16px; border-radius: 16px; background: #1c1026; border: 1px solid var(--peach-line);
  box-shadow: 0 10px 30px rgba(0,0,0,.55); animation: rise-in .25s ease-out both; }
.notice-card p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; color: var(--body); }
.notice-card > p:nth-last-child(2) { margin-bottom: 0; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.notice-x { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--muted-1); cursor: pointer; }

.overlay-host { position: fixed; inset: 0; z-index: 65; }
.overlay-host[hidden] { display: none; }
.overlay-scrim { position: absolute; inset: 0; background: rgba(3, 2, 8, .75); opacity: 0; transition: opacity .22s; }
.overlay-host.open .overlay-scrim { opacity: 1; }
.ov-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; max-height: 88dvh; margin: 0 auto; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  padding: 10px 22px calc(22px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: #120b20; border-top: 1px solid var(--peach-line);
  transform: translateY(100%); transition: transform .26s ease-out; }
.overlay-host.open .ov-sheet { transform: none; }
.ov-dlg { position: absolute; left: 26px; right: 26px; top: 50%; overflow-x: hidden; max-width: 400px; margin: 0 auto; padding: 1.5px; border-radius: 26px; background: var(--grad);
  box-shadow: 0 20px 60px rgba(232,121,176,.35); transform: translateY(-46%) scale(.96); opacity: 0; transition: transform .22s ease-out, opacity .22s; }
.overlay-host.open .ov-dlg { transform: translateY(-50%); opacity: 1; }
.sheet-grab { width: 40px; height: 4px; margin: 0 auto 16px; border-radius: 2px; background: rgba(255,255,255,.25); }
.sheet-title { margin: 0 0 6px; text-align: center; font-weight: 300; font-size: 15px; letter-spacing: .42em; padding-left: .42em; }
.opt-label { margin: 18px 0 8px; font-size: 11px; letter-spacing: .22em; color: var(--muted-1); }
.opt-row { display: flex; gap: 8px; }
.opt-row.wrap { flex-wrap: wrap; }
.opt-row:not(.wrap) .pill-opt { flex: 1; }
/* ---------- one shared chip / pill (session sheet, end of session, journal, settings pickers, readings) ----------
   No border at all: the outline is an inset shadow, so the selected state is one gradient fill from edge to edge,
   with nothing at the sides to show a seam. Selected and unselected chips are the same size. */
.chip { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(249,183,118,.55); color: var(--warm); font: 14px var(--font-body); cursor: pointer; -webkit-tap-highlight-color: transparent;
  background-clip: border-box; background-origin: border-box; }
.chip.on { background-image: var(--grad); box-shadow: none; color: var(--ink); font-weight: 600; }
.pill-opt { height: 40px; }
.opt-help { min-height: 2.9em; margin: 12px 0 16px; font-size: 12.5px; line-height: 1.45; color: var(--muted-2); }
.menu-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.menu-list a, .menu-list button { display: block; width: 100%; padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line);
  color: #fff; text-align: left; text-decoration: none; font: inherit; cursor: pointer; }
.menu-list b { display: block; font-size: 15px; font-weight: 500; }
.menu-list span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted-1); }

/* ---------- Home ---------- */
.hero { position: relative; z-index: 1; padding-top: 46px; text-align: center; }
.greet { margin: 0; padding: 0 24px; font-weight: 400; font-size: 32px; line-height: 1.2; letter-spacing: .01em; }
.welcome-back { margin: 0; font-style: italic; font-weight: 300; font-size: 19px; line-height: 1.3; color: var(--body); }
.hero-gap { position: relative; z-index: -1; height: clamp(150px, calc(100svh - 614px), 230px); }
/* Home's first screen ends above the tab bar and the mini-player (when it shows): the sky between the
   greeting and the buttons takes whatever room is left, so "Resume Session", "Session in progress" and
   "End session" always sit fully above the mini-player. 70px = the header under the status bar. */
.home .hero { display: flex; flex-direction: column; min-height: calc(100vh - env(safe-area-inset-top) - 70px - var(--reserve));
  min-height: calc(100dvh - env(safe-area-inset-top) - 70px - var(--reserve)); }
.home .hero > * { flex: none; }
.home .hero > .hero-gap { flex: 1 0 auto; height: auto; min-height: 120px; max-height: 230px; }
html.mini-on .home .hero > .hero-gap { min-height: 64px; }
.home .cta .link-quiet { margin-top: 0; }
.hero-gap .sky-glow { top: calc(100% - 210px); }
.hero-gap .sky-hill { top: calc(100% - 60px); }
.hero-gap .sky-sun { top: calc(100% - 66px); }
.unfold { display: flex; justify-content: center; align-items: center; gap: 3px; height: 24px; margin-bottom: 46px; color: #E879B0; }
.unfold span { font-style: italic; font-weight: 300; font-size: 17px; letter-spacing: .22em; color: var(--body); }
/* The native rose emoji, as tall as the text's capitals; the title's trailing letter-spacing plus 3px is the gap before it. */
.unfold .unfold-rose { flex: none; font: normal 400 12.5px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; letter-spacing: 0; text-shadow: none; color: initial; }
.cta { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 28px; }
.cta-sub { min-height: 20px; font-size: 13px; line-height: 20px; color: var(--muted-1); }
.moon { position: relative; z-index: 1; padding: 40px 22px 10px; }
.phase-strip { display: block; width: 100%; max-width: 346px; height: auto; margin: 12px 0 0; }
.moon-head { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.big-moon { width: 72px; height: 72px; flex: none; }
.moon-title { margin: 0; font-weight: 300; font-size: 28px; line-height: 1.2; }
.moon-sub { margin: 3px 0 0; font-size: 12.5px; color: var(--muted-1); }
.weeks { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.week-now { padding: 1.5px; border-radius: 18px; background: var(--grad); }
.week-now-in { padding: 14px 16px; border-radius: 17px; background: #0e0919; }
.week-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.week-title { font-size: 16px; font-weight: 500; }
.week-tag { flex: none; font-size: 11px; letter-spacing: .14em; color: #F9B776; }
.week-q { margin: 8px 0 4px; font-style: italic; font-weight: 300; font-size: 15.5px; line-height: 1.4; }
.week-q.dim { margin: 0 0 12px; color: var(--muted-1); }
.week-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 20px; background: var(--card);
  border: 1px solid var(--card-line); opacity: .75; font-size: 15px; }
.week-card.past { opacity: .5; }
.week-date { flex: none; font-size: 11px; letter-spacing: .14em; color: var(--muted-2); }

/* ---------- Session tab ---------- */
.session-tab { display: flex; flex-direction: column; background: linear-gradient(180deg, #04030a 0%, #080512 45%, #120a24 85%, #05030b 100%) #05030b; }
.session-tab .sky-glow { top: calc(100% - 194px); }
.session-tab .sky-hill { top: calc(100% - 44px); }
.session-tab .sky-sun { top: calc(100% - 50px); }
.session-tab .top, .s-intro, .themes, .session-tab .cta { position: relative; z-index: 1; }
.s-intro { margin-top: 14px; padding: 0 26px; text-align: center; }
.s-title { margin: 4px 0 0; font-weight: 300; font-size: 25px; line-height: 1.3; }
.s-tag { margin: 10px 0 0; font-style: italic; font-weight: 300; font-size: 16px; color: var(--warm); }
.s-intro .rule { width: 160px; margin: 18px auto; }
.s-lede { margin: 0; font-size: 15px; line-height: 1.5; color: var(--body); }
.themes { margin-top: 30px; padding: 0 22px; }
.themes-sub { margin: 0 0 12px; font-size: 12.5px; color: var(--muted-2); }
.theme-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px; border-radius: 16px; background: rgba(14, 9, 26, .88); border: 1px solid var(--c); }
.theme-row.peach { --c: #F9B77666; --t: #F9B776; }
.theme-row.lilac { --c: #C98BF566; --t: #C98BF5; }
.theme-row .dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--t); box-shadow: 0 0 10px var(--t); }
.theme-name { font-size: 14.5px; font-weight: 500; color: var(--t); }
.theme-meta { margin-top: 2px; font-size: 12px; color: var(--muted-1); }
.session-tab .cta { margin: 28px 0 90px; padding: 0 26px; }

/* ---------- Now Playing ---------- */
.np { position: fixed; inset: 0; z-index: 60; height: 100vh; height: 100dvh; overflow: hidden; color: #fff; background: #12081c;
  transform: translate3d(0, 100%, 0); transition: transform .34s cubic-bezier(.2, .8, .2, 1); visibility: hidden; }
.np.open { transform: none; visibility: visible; }
.np:not(.open) { transition: transform .3s ease-in, visibility 0s .3s; }
.np.instant { transition: none; }
.np.dragging { transition: none; will-change: transform; }
.np, .np-body { overscroll-behavior: none; }
.np-body { touch-action: none; } /* drags here move only the view (nowplaying.js); the notes list still scrolls */
html.np-drag, html.np-drag body { overflow: hidden; overscroll-behavior: none; }
.np-bg { position: absolute; inset: 0; background: linear-gradient(180deg, #12081c 0%, #24102a 38%, #3a1530 62%, #1a0a16 100%); pointer-events: none; }
.np-glow { position: absolute; left: -140px; right: -140px; bottom: -66px; height: 300px; background: radial-gradient(closest-side, rgba(255,170,110,.55) 0%, rgba(232,121,176,.25) 46%, rgba(0,0,0,0) 100%); }
.np-hill { position: absolute; left: -60px; right: -60px; bottom: -116px; height: 200px; border-radius: 50% 50% 0 0 / 60px 60px 0 0; background: #0d0610; box-shadow: 0 -2px 16px rgba(249,183,118,.7); }
.np-body { position: relative; height: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 7px) 0 max(10px, calc(env(safe-area-inset-bottom) - 8px)); touch-action: none; } /* runs down to just above the home indicator */
.np-top { display: flex; align-items: center; justify-content: space-between; padding: 0 18px; flex: none; }
.np-close { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1.5px solid rgba(249,183,118,.7); background: transparent; color: #F9B776; cursor: pointer; }
.np-more { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #fff; cursor: pointer; }
/* Between the two buttons and the cover: the question, centered in whatever room the cover leaves. It is never
   clipped: it wraps (max 4 lines, the font shrinks to fit, see fitQuestion()); if it needs more than the usual
   room, the cover gives back that extra height (--qx) so nothing runs off the screen. */
.np-mid { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; container-type: size; }
.np-q { flex: 1 0 auto; min-height: 112px; padding: 4px 24px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.np-qbox { flex: none; display: flex; flex-direction: column; justify-content: center; }
.np-question { margin: 0; font-style: italic; font-weight: 300; font-size: 21px; line-height: 1.35; color: var(--warm); overflow-wrap: break-word; }
.np-takeslot { flex: none; height: 30px; margin-top: 6px; display: flex; align-items: center; justify-content: center; }
.np-take { margin: 0; font-size: 12.5px; color: #D9CBD6; }
.np-take[hidden], .np-make[hidden] { display: none; }
.np-make { height: 30px; padding: 0 14px; border-radius: 16px; border: 1px solid rgba(249,183,118,.75); background: rgba(249,183,118,.1); color: #F9B776;
  font: 600 12px var(--font-body); letter-spacing: .04em; cursor: pointer; }
.np-make:disabled { opacity: .6; }
.np-cover { flex: none; display: flex; justify-content: center; margin-top: 4px; touch-action: none; user-select: none; -webkit-user-select: none; }
.np-frame { will-change: transform; }
.np-frame.swipe-anim { transition: transform .2s cubic-bezier(.22, .61, .36, 1), opacity .2s ease-out; }
.np-art img { -webkit-user-drag: none; pointer-events: none; }
.np-art { --s: clamp(120px, min(68vw, calc(100dvh - 584px - var(--qx, 0px))), 260px); position: relative; width: var(--s); height: var(--s); border-radius: 6px; overflow: hidden;
  background: linear-gradient(135deg, #2b2140 0%, #43305f 45%, #1d2a44 100%); }
/* The cover takes the room left between the question and the song's title (up to a comfortable size). */
@supports (container-type: size) { .np-art { --s: clamp(120px, min(calc(100vw - 80px), calc(100cqh - 112px - 4px - 8px - var(--qx, 0px))), 340px); } }
.np-frame { padding: 4px; border-radius: 10px; background: linear-gradient(135deg, #F9B776, #E879B0); box-shadow: 0 0 34px rgba(249,183,118,.45); }
.np-art-empty { position: absolute; left: 14px; bottom: 14px; font-size: 10px; letter-spacing: .18em; color: rgba(255,255,255,.75); }
.np-art-empty[hidden] { display: none; }
.np-meta { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; padding: 0 28px; }
.np-text { min-width: 0; flex: 1; }
.np-title, .np-artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-title { font-size: 18px; font-weight: 500; line-height: 24px; }
.np-artist { margin-top: 2px; font-size: 13px; line-height: 18px; color: #F9B776; }
.np-open { display: inline-flex; align-items: center; gap: 6px; height: 22px; margin-top: 4px; font-size: 11.5px; color: var(--body); text-decoration: none; }
.np-open[hidden] { visibility: hidden; display: inline-flex; }
.np-heart { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #E879B0; cursor: pointer; }
.np-heart.on svg { fill: #E879B0; }
.np-heart:disabled { opacity: .4; }
.np-prog { flex: none; margin-top: 14px; padding: 0 28px; }
.np-track { position: relative; height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); }
.np-fill { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #F9B776, #E879B0); transform-origin: left center; transform: scaleX(0); }
.np-knobwrap { position: absolute; inset: 0; transform: translateX(0); pointer-events: none; }
.np-knobwrap span { position: absolute; left: 0; top: -4px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; }
.np-times { display: flex; justify-content: space-between; margin-top: 7px; font-size: 11px; line-height: 14px; color: var(--muted-1); font-variant-numeric: tabular-nums; }
.np-controls { flex: none; display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 0 22px; }
.np-btn { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #fff; cursor: pointer; }
.np-btn.accent { color: rgba(237,232,245,.55); }
.np-btn.accent.on { color: #F9B776; }
.np-play { width: 64px; height: 64px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 2px solid #F9B776; background: rgba(249,183,118,.08);
  box-shadow: 0 0 22px rgba(249,183,118,.4); color: #fff; cursor: pointer; }
.np-note { flex: none; margin: 12px 18px 0; padding: 11px 14px; border-radius: 16px; background: rgba(13,6,16,.82); border: 1px solid var(--peach-line); }
.np-note-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.np-note-head span { font-size: 10.5px; letter-spacing: .2em; color: #F9B776; white-space: nowrap; }
.np-add { flex: none; height: 26px; padding: 0 10px; border-radius: 14px; border: 1px solid rgba(249,183,118,.6); background: transparent; color: var(--warm); font: 11.5px var(--font-body); cursor: pointer; }
.np-note p { margin: 6px 0 0; height: 2.8em; font-size: 13px; line-height: 1.4; color: #F1E9EF; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.np-note p.muted { color: var(--muted-1); }
.np-swipe { flex: none; display: flex; justify-content: center; align-items: center; gap: 6px; height: 30px; margin-top: 6px; padding: 0; border: 0; background: none;
  font: 11.5px var(--font-body); letter-spacing: .12em; color: var(--body); cursor: pointer; }
.np-swipe:disabled, .np-add:disabled { opacity: .45; }

.np-sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 84%; max-width: 560px; margin: 0 auto; z-index: 2; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  padding: 18px 22px calc(24px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: #140a1c; border-top: 1px solid var(--peach-line);
  box-shadow: 0 -20px 50px rgba(0,0,0,.5); transform: translate3d(0, 100%, 0); transition: transform .28s ease-out; visibility: hidden; }
.np-sheet.open { transform: none; visibility: visible; }
.np-sheet:not(.open) { transition: transform .24s ease-in, visibility 0s .24s; }
.np-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.np-sheet-label { display: block; font-size: 11px; letter-spacing: .2em; color: #F9B776; }
.np-sheet-song { margin-top: 4px; font-size: 15px; color: #fff; }
.np-compose { margin: 16px 0 6px; }
.np-compose textarea { display: block; width: 100%; margin: 6px 0 10px; height: 84px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(14,9,26,.85); color: #fff; font: 16px/1.4 var(--font-body); resize: none; }
.np-list { list-style: none; margin: 16px 0 0; padding: 0; }
.np-list li { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.08); }
.np-list time { font-size: 10.5px; letter-spacing: .2em; color: #F9B776; }
.np-list p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: #F1E9EF; white-space: pre-wrap; }
.np-list p.muted, .np-list-empty { color: var(--muted-1); }
.np-list-empty { font-size: 14px; }
.np-menu { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 26px; background: rgba(3,2,8,.75); }
.np-menu[hidden] { display: none; }
.np-menu-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 24px; background: #120b20; border: 1px solid var(--peach-line); }
.np-menu-title { margin: 0; text-align: center; font-weight: 300; font-size: 20px; }
.np-menu-via { margin: 0 0 6px; min-height: 1.4em; text-align: center; font-size: 12.5px; color: var(--body); }

/* Short phones: shrink the question and controls so everything fits without scrolling. */
@media (max-height: 720px) {
  .np-q { min-height: 96px; }
  .np-question { font-size: 18px; }
  .np-meta { margin-top: 14px; }
  .np-prog { margin-top: 8px; }
  .np-play { width: 56px; height: 56px; }
  .np-note { margin-top: 10px; }
  .np-art { --s: clamp(110px, min(60vw, calc(100dvh - 540px - var(--qx, 0px))), 260px); }
  @supports (container-type: size) { .np-art { --s: clamp(110px, min(calc(100vw - 80px), calc(100cqh - 96px - 4px - 8px - var(--qx, 0px))), 340px); } }
}

/* ---------- End of session ---------- */
.end { background: linear-gradient(180deg, #04030a 0%, #080512 45%, #120a24 100%) #05030b; }
.end-in { padding: 0 22px calc(28px + env(safe-area-inset-bottom)); }
.end-title { margin: 8px 0 0; font-weight: 300; font-size: 27px; line-height: 1.25; }
.end-stats { display: flex; margin: 18px 0 0; padding: 14px 0; border-top: 1px solid var(--card-line); border-bottom: 1px solid var(--card-line); }
.end-stats div { flex: 1; text-align: center; }
.end-stats b { display: block; font-size: 24px; font-weight: 400; }
.end-stats span { display: block; margin-top: 2px; font-size: 11px; color: var(--muted-1); }
.end-q { margin: 18px 0 10px; text-align: center; font-style: italic; font-weight: 300; font-size: 19px; color: var(--warm); }
.answers { display: flex; gap: 8px; }
.answer { flex: 1; min-width: 0; height: 44px; padding: 0 8px; }
.end-label { display: block; margin: 14px 0 0; font-size: 11px; letter-spacing: .2em; color: var(--muted-1); }
.end textarea { display: block; width: 100%; height: 64px; margin-top: 6px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(14,9,26,.85); color: #fff; font: 16px/1.4 var(--font-body); resize: none; }
.held-card { margin-top: 12px; padding: 12px 14px 4px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); }
.held-card .eyebrow { letter-spacing: .2em; font-weight: 400; margin-bottom: 4px; }
.held-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.07); }
.held-art { position: relative; width: 38px; height: 38px; flex: none; border-radius: 4px; overflow: hidden; background: linear-gradient(135deg, #2b2140, #43305f); }
.held-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.held-text { flex: 1; min-width: 0; }
.held-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.held-artist { font-size: 11.5px; color: var(--muted-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.held-heart { color: #E879B0; display: grid; }
.held-none { margin: 4px 0 10px; font-size: 13px; color: var(--muted-1); }
.end-actions { display: flex; gap: 10px; margin-top: 14px; }
.end-actions > * { flex: 1; }

/* Streak pop-up */
.streak { padding: 26px 22px 22px; border-radius: 25px; background: #120b20; text-align: center; }
.streak > svg { display: block; margin: 0 auto 10px; }
.streak-n { margin-top: 4px; font-size: 34px; font-weight: 300; }
.streak-sub { margin-top: 2px; font-size: 13px; color: var(--muted-1); }
.streak-dots { display: flex; justify-content: space-between; margin: 18px 4px 0; }
.sdot { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.sdot span { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.25); }
.sdot span.on { background: var(--grad); border: 0; }
.sdot.now span.on { box-shadow: 0 0 14px rgba(249,183,118,.8); }
.sdot small { font-size: 9.5px; color: var(--muted-2); }
.sdot.now small { color: #F9B776; }
.streak-cycles { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--card-line); color: #B9A2F7; }
.streak-cycles span { font-size: 14px; color: #fff; }
.streak-see { margin: 14px 0 16px; font-style: italic; font-weight: 300; font-size: 14px; color: var(--warm); }

/* ---------- placeholder tabs ---------- */
.plain-in { padding: 20px 26px 40px; text-align: center; }
.plain-title { margin: 0; font-weight: 300; font-size: 25px; line-height: 1.3; }
.plain-in .rule { width: 160px; margin: 18px auto; }
.plain-text { margin: 0 0 12px; font-size: 15px; line-height: 1.6; color: var(--body); }
.plain-text.muted { color: var(--muted-1); font-size: 13.5px; }
.plain-quote { margin: 26px 0 0; font-style: italic; font-weight: 300; font-size: 17px; line-height: 1.5; color: var(--warm); }
.plain-in .end-stats { margin-top: 26px; }
.plain-in .btn-line { margin-top: 18px; }
.profile { padding-bottom: 30px; }

@media (prefers-reduced-motion: reduce) {
  .np, .np-sheet, .ov-sheet, .ov-dlg, .overlay-scrim, .glide, .np-frame.swipe-anim { transition: none !important; }
}
.notice-actions { align-items: center; }
.notice-actions .link-quiet { display: inline-block; margin: 0 0 0 6px; }

/* ---------- tab pager: five pages side by side, native horizontal scroll-snap ---------- */
/* The phone does the dragging (1:1), momentum, snapping and direction lock. Pages keep their own vertical scroll.
   The track and every page share the app background, so nothing flashes during a swipe. */
html.pager-on, html.pager-on body { height: 100%; overflow: hidden; }
html.pager-on body { padding-bottom: 0; }
.pager { position: fixed; inset: 0; z-index: 1; height: 100vh; height: 100dvh; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior: none; -webkit-overflow-scrolling: touch; scrollbar-width: none; background: #05030b; }
.pager[hidden] { display: none; }
.pager::-webkit-scrollbar { display: none; }
.pager-page { flex: 0 0 100%; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: none; overscroll-behavior-x: auto; /* sideways drags pass to the track */ -webkit-overflow-scrolling: touch;
  scroll-snap-align: start; scroll-snap-stop: always; background: #05030b; contain: layout paint;
  padding-bottom: var(--reserve); }
.pager-page .screen { min-height: 100%; }
.pager-page::-webkit-scrollbar { display: none; }

/* Tab bar highlight: one pill that slides with the track (transform only). */
.tabbar-in { position: relative; }
.tabbar a { position: relative; z-index: 1; transition: color .2s; }
.tab-ind { position: absolute; z-index: 0; top: 8px; bottom: 8px; left: 4px; width: calc((100% - 8px) / 5); pointer-events: none; will-change: transform; }
/* Tapping a tab: the pill glides there. Dragging across the bar: it follows the finger (no transition). */
.tab-ind.glide-tab { transition: transform .25s cubic-bezier(.25, .8, .35, 1); }
.tabbar { touch-action: none; user-select: none; -webkit-user-select: none; }
.tabbar a { -webkit-touch-callout: none; -webkit-user-drag: none; }
@media (prefers-reduced-motion: reduce) { .tab-ind.glide-tab { transition: none; } }
.tab-ind::before { content: ""; position: absolute; inset: 0 6px; border-radius: 18px; background: rgba(249, 183, 118, .1); border: 1px solid rgba(249, 183, 118, .28); }
html:not(.pager-on) .tab-ind { display: none; }
@media (prefers-reduced-motion: reduce) { .tabbar a { transition: none; } }

/* ---------- swipe to change songs (mini-player, Now Playing cover, Session view) ---------- */
.mini { touch-action: none; will-change: transform; user-select: none; -webkit-user-select: none; }
.mini.swipe-anim, .sv-card.swipe-anim { transition: transform .2s cubic-bezier(.22, .61, .36, 1), opacity .2s ease-out; }
.sv-card { will-change: transform; }
.mini.faded { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .mini.swipe-anim, .sv-card.swipe-anim { transition: none !important; } }

/* ---------- Session page: the mini-player grows into the full now-playing view as the page scrolls ---------- */
/* A sticky layer at the top of the page holds the view (so it travels with the page between tabs).
   Everything is laid out at full size; scroll progress only sets transform and opacity. */
.sv-stick { position: sticky; top: 0; z-index: 6; height: 0; }
.sv { position: absolute; left: 0; top: 0; width: 100%; height: 100vh; height: 100dvh; pointer-events: none; color: #fff; }
.sv[hidden] { display: none; }
.sv.live { pointer-events: auto; }
.sv.live .sv-art { touch-action: none; } /* full size: sideways drags on the cover change songs (swipe.js) */
.sv-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; opacity: 0; overflow: hidden; border-radius: 16px;
  background: linear-gradient(180deg, #12081c 0%, #24102a 38%, #3a1530 62%, #1a0a16 100%); border: 1px solid var(--peach-line); will-change: transform, opacity; }
.sv-body { position: absolute; inset: 0; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 18px) 26px calc(var(--bar-bottom) + var(--bar-h) + 18px); }
.sv-rest { opacity: 0; will-change: transform, opacity; }
.sv-label { flex: none; height: 16px; font-size: 10.5px; line-height: 16px; letter-spacing: .34em; padding-left: .34em; color: #F9B776; font-weight: 500; white-space: nowrap; }
.sv-art { --s: clamp(150px, min(calc(100vw - 72px), calc(100dvh - 430px)), 340px); flex: none; position: relative; width: var(--s); height: var(--s); margin-top: 18px;
  transform-origin: 0 0; opacity: 0; will-change: transform; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.sv-card { position: absolute; inset: 0; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #2b2140 0%, #43305f 45%, #1d2a44 100%);
  box-shadow: 0 0 34px rgba(249,183,118,.35); cursor: pointer; will-change: transform; }
.sv-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .3s; -webkit-user-drag: none; pointer-events: none; }
.sv-card img.on { opacity: 1; }
.sv-card .np-art-empty { font-size: 9px; }
.sv-text { flex: none; width: 100%; margin-top: 20px; text-align: center; }
.sv-title, .sv-artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-title { height: 26px; font-size: 19px; font-weight: 500; line-height: 26px; }
.sv-artist { height: 18px; margin-top: 2px; font-size: 13px; line-height: 18px; color: #F9B776; }
.sv-prog { flex: none; width: 100%; margin-top: 16px; }
.sv-controls { flex: none; display: flex; align-items: center; justify-content: center; gap: 34px; margin-top: 12px; }
.sv-acts { flex: none; display: flex; gap: 10px; margin-top: 14px; }
.sv-acts .np-add { height: 32px; padding: 0 14px; border-radius: 16px; font-size: 12.5px; }
.pager-page.sv-on { scroll-snap-type: y proximity; }
/* During a session the page's content ends above the tab bar and mini-player; its end is a resting point
   ("Resume Session" and "End session" in view), and scrolling past it grows the view. */
.pager-page.sv-on > .s-host { scroll-snap-align: end; }
.pager-page.sv-on .session-tab { padding-bottom: var(--reserve); }
.pager-page.sv-on .session-tab .cta { margin-bottom: 0; }
.sv-space { scroll-snap-align: end; }
@media (prefers-reduced-motion: reduce) { .sv-card img { transition: none; } }
html .pager-page.sv-on, html.mini-on .pager-page.sv-on { padding-bottom: 0; } /* the space under the content takes over (sized in nowplaying.js) */
.sv-space { height: 0; }

/* Mission tab: the app logo as a flat glyph. White when active, grey when not. */
.tabbar .tab-logo { color: var(--muted-2); transition: color .2s; }
.tabbar a.on .tab-logo { color: #fff; }
.pager-page.sv-on > .s-host { overflow: clip; } /* the sky's hill hangs below the content; keep the scroll range exact */

/* ---------- scroll-wheel pickers (wheel.js): session length and every time setting ---------- */
.wheel { position: relative; display: flex; justify-content: center; gap: 6px; width: 100%; max-width: 300px; height: calc(var(--wh-row) * 5); margin: 10px auto 18px;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.wheel-band { position: absolute; left: 0; right: 0; top: calc(var(--wh-row) * 2); height: var(--wh-row); border-radius: 14px; border: 1px solid transparent; pointer-events: none;
  background: linear-gradient(90deg, rgba(249,183,118,.2), rgba(232,121,176,.18) 55%, rgba(139,92,246,.24)) padding-box, linear-gradient(#1b1128, #1b1128) padding-box, var(--grad) border-box;
  box-shadow: 0 0 18px rgba(232,121,176,.18); }
.wh-col { position: relative; z-index: 1; flex: none; max-width: 100%; height: 100%; overflow-x: hidden; overflow-y: scroll; scroll-snap-type: y mandatory;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-width: none; outline: none; border-radius: 14px; }
.wh-col::-webkit-scrollbar { display: none; }
.wh-col:focus-visible { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.wh-pad { height: calc(var(--wh-row) * 2); }
.wh-item { height: var(--wh-row); display: flex; align-items: center; justify-content: center; scroll-snap-align: center; opacity: 0; will-change: transform, opacity;
  font: 400 20px/1 var(--font-body); color: var(--muted-1); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; transition: color .15s; }
.wh-item.on { color: #fff; }
.wh-item[hidden] { display: none; } /* days a month doesn't have */
.wheel-time .wh-col:last-child .wh-item { font-size: 17px; letter-spacing: .06em; }
.btn-line[hidden], .btn-grad[hidden] { display: none; }

/* ---------- Home: scroll hint ---------- */
/* Sits just above the tab bar at the bottom of the first screen; white at ~20%, fading in and out every 2.5s. */
.scroll-hint { position: absolute; z-index: 3; left: 50%; bottom: calc(var(--bar-top) + 2px); width: 24px; height: 18px; margin-left: -12px;
  display: grid; place-items: center; color: #fff; pointer-events: none; transition: opacity .3s ease-out; }
.scroll-hint svg { display: block; width: 22px; height: 22px; opacity: .2; animation: hint-breathe 2.5s ease-in-out infinite; will-change: opacity; }
@keyframes hint-breathe { 0%, 100% { opacity: .04; } 50% { opacity: .2; } }
.pager-page[data-page="home"] { position: relative; }
.pager-page.hint-off .scroll-hint, html.mini-on .scroll-hint, html:not(.pager-on) .scroll-hint { opacity: 0; }
.pager-page.hint-off .scroll-hint svg, html.mini-on .scroll-hint svg { animation: none; }
@media (prefers-reduced-motion: reduce) { .scroll-hint svg { animation: none; } }
