/* Timeline, Astrology, Guide, Past readings, Menu, Mission, Profile, Settings, Export, Import, How-to.
   From the design reference: cards rgba(14,9,26,.9) with a 1px rgba(255,255,255,.1) border, radius 18–20px,
   gradient #F9B776 → #E879B0 → #8B5CF6, peach accents. Layout only uses reserved sizes, so nothing jumps. */

/* ---------- shared ---------- */
.sub-in, .as-in { position: relative; z-index: 1; padding: 0 20px 40px; }
.back-link { display: inline-block; margin: 2px 0 6px; color: #F9B776; font-size: 13px; text-decoration: none; }
.sub-title { margin: 0; font-weight: 400; font-size: 26px; line-height: 1.2; color: #fff; }
.sub-title.center, .center-block { text-align: center; display: block; }
.sub-lede { margin: 6px 0 18px; font-size: 13.5px; color: var(--muted-1); }
.chip-btn { flex: none; height: 38px; padding: 0 16px; border-radius: 20px; border: 0; box-shadow: inset 0 0 0 1.5px rgba(249,183,118,.75); background: transparent; color: #FBE3CF; font: 14px var(--font-body); cursor: pointer; white-space: nowrap; }
.in { display: block; width: 100%; max-width: 100%; min-width: 0; margin: 6px 0 14px; padding: 12px 14px; 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); }
textarea.in { resize: none; }
.ch-form { margin-top: 12px; display: flex; flex-direction: column; min-width: 0; }
/* Date field (chapter Started): same width as the Title box and the button, text centered; the wheel opens under it. */
.in-pick { -webkit-appearance: none; appearance: none; text-align: center; cursor: pointer; min-height: 48px; }
.in-pick.empty span { color: #8F88A3; }
.date-host { margin: 0 auto 10px; } /* the host is the wheel itself: centered, like the time wheels */
.date-host[hidden] { display: none; }
.ch-form .btn-grad, .ch-form .btn-line { margin-top: 8px; }
.btn-line.danger { border-color: rgba(255,120,120,.55); color: #FFB4B4; }
.ov-sheet.tall { max-height: 94dvh; }
.bf .field { margin-bottom: 10px; }

/* ---------- Timeline ---------- */
.tl-head { position: relative; z-index: 1; padding: 0 20px; }
.tl-titlerow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.tl-title { margin: 0; min-width: 0; font-weight: 400; font-size: clamp(19px, 6.2vw, 26px); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-search { position: sticky; top: env(safe-area-inset-top); z-index: 6; padding: 8px 20px 10px; background: linear-gradient(#05030b 78%, rgba(5,3,11,0)); }
/* Covers the status bar once the search bar is stuck under it; takes no room in the page. */
.tl-cap { position: sticky; top: 0; z-index: 7; height: env(safe-area-inset-top); margin-bottom: calc(-1 * env(safe-area-inset-top)); background: #05030b; pointer-events: none; }
.tl-field { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border-radius: 24px; border: 1px solid rgba(255,255,255,.2); background: rgba(14,9,26,.92); color: var(--muted-1); }
.tl-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: #fff; font: 16px var(--font-body); outline: none; -webkit-appearance: none; }
.tl-field input::placeholder { color: #8F88A3; }
.tl-bar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 20px 12px; }
.tl-count { font-size: 13px; color: var(--body); }
.seg { display: flex; padding: 3px; border-radius: 22px; border: 1px solid rgba(255,255,255,.2); background: rgba(14,9,26,.9); }
.seg button { height: 32px; padding: 0 22px; border: 0; border-radius: 18px; background: none; color: var(--body); font: 14px var(--font-body); cursor: pointer; }
.seg button.on { background: var(--grad); background-origin: border-box; color: var(--ink); font-weight: 600; } /* borderless: one clean fill, like .chip.on */
.tl-filter { position: relative; z-index: 1; display: flex; gap: 10px; align-items: center; margin: -4px 20px 10px; font-size: 13px; color: #F9B776; }
.tl-filter[hidden] { display: none; }
.tl-chart { position: relative; z-index: 1; margin: 0 20px 18px; padding: 14px 14px 10px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); }
.tl-chart-head { font-size: 12.5px; color: var(--body); margin-bottom: 10px; }
.tl-cols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; }
.tl-col { display: flex; flex-direction: column; align-items: center; padding: 0; border: 0; background: none; color: var(--muted-1); cursor: pointer; min-width: 0; }
.tl-barbox { position: relative; display: block; width: 100%; height: 70px; }
.tl-bar-in { position: absolute; left: 12%; right: 12%; bottom: 0; border-radius: 3px 3px 1px 1px; background: linear-gradient(0deg, #8B5CF6, #E879B0 55%, #F9B776); opacity: .45; transition: opacity .25s; }
/* Every month has the gradient; the months of the chapter being looked at (or tapped) at full brightness. */
.tl-col.on .tl-bar-in { opacity: 1; }
.tl-col.on .tl-mon { color: #fff; }
.tl-mon { margin-top: 5px; font-size: 8.5px; line-height: 10px; height: 10px; }
.tl-dot { width: 4px; height: 4px; margin-top: 3px; border-radius: 50%; }
.tl-dot.on { background: #F9B776; }
.tl-yr { height: 11px; margin-top: 2px; font-size: 8.5px; line-height: 11px; color: var(--muted-2); align-self: flex-start; white-space: nowrap; }
.tl-none { margin: 10px 20px; color: var(--muted-1); font-size: 14px; text-align: center; }
.tl-groups { position: relative; z-index: 1; padding: 0 20px; }
.tl-empty-all { padding: 20px; text-align: center; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); }
.tl-empty-all p { margin: 0 0 6px; } .tl-empty-all .muted { color: var(--muted-1); font-size: 13px; }
.tl-row[hidden], .tl-groups [data-from][hidden] { display: none; }
/* Cards */
.tl-card { margin-bottom: 14px; padding: 14px 16px 6px; border-radius: 20px; background: var(--card); border: 1px solid var(--card-line); }
/* (No content-visibility here: iPhone Safari could leave the skipped chapters unpainted after Now Playing or a sheet closed.) */
.tl-card.now { border: 1.5px solid transparent; background: linear-gradient(#0e091a, #0e091a) padding-box, var(--grad) border-box; }
.tl-card.empty { padding-bottom: 12px; }
.tl-chead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; padding: 0; border: 0; background: none; color: #fff; text-align: left; cursor: pointer; }
.tl-chead:disabled { cursor: default; }
.tl-ct { min-width: 0; font-size: 18px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-cr { flex: none; font-size: 11px; letter-spacing: .14em; color: #F9B776; font-weight: 500; }
.tl-cnote { margin: 4px 0 6px; font-style: italic; font-size: 13.5px; color: #FBE3CF; }
.tl-cmeta { margin: 6px 0 0; font-size: 13px; color: var(--muted-1); }
.tl-cards { list-style: none; margin: 6px 0 0; padding: 0; }
.tl-cards .tl-row { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--card-line); }
.tl-card.folded .tl-cards .tl-row:nth-child(n+4) { display: none; }
.tl-groups.filtering .tl-card.folded .tl-cards .tl-row:nth-child(n+4):not([hidden]) { display: flex; }
.tl-groups.filtering .tl-more { display: none; }
.tl-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 0; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.tl-thumb { position: relative; flex: none; width: 42px; height: 42px; border-radius: 4px; overflow: hidden; background: linear-gradient(135deg, #2b2140, #43305f); }
.tl-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tl-text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.tl-text b { font-weight: 400; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-text span { font-size: 12px; color: var(--muted-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-meanings { flex: none; font-size: 11.5px; color: #F9B776; }
.tl-meanings[hidden], .tl-n[hidden] { visibility: hidden; display: inline; }
.tl-star { flex: none; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: rgba(237,232,245,.55); cursor: pointer; }
.tl-star.on { color: #F9B776; } .tl-star.on svg { fill: #F9B776; }
.tl-star.big { width: 44px; height: 44px; } .tl-star.big svg { width: 26px; height: 26px; }
/* Unfolded chapter: its header and "Show less" stay stuck under the search bar while scrolling through its songs. */
.tl-stick { position: relative; }
.tl-card:not(.folded) .tl-stick { position: sticky; top: var(--tl-stick, 66px); z-index: 2; margin: -6px -15px 0; padding: 6px 15px 0; background: #0d0818; }
.tl-card.now:not(.folded) .tl-stick { background: #0e091a; }
.tl-less { display: none; align-items: center; justify-content: flex-end; gap: 4px; width: 100%; height: 34px; padding: 0; border: 0; background: none; color: #F9B776; font: 13px var(--font-body); cursor: pointer; }
.tl-card:not(.folded) .tl-less { display: flex; }
.tl-groups.filtering .tl-less { display: none !important; }
.tl-more { display: block; width: 100%; height: 40px; border: 0; border-top: 1px solid var(--card-line); background: none; color: #F9B776; font: 13px var(--font-body); cursor: pointer; }
/* List */
.tl-lgroup { margin-bottom: 18px; }
.tl-lhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 0 0 8px; border: 0; border-bottom: 1px solid var(--card-line); background: none; color: inherit; text-align: left; cursor: pointer; }
.tl-lhead:disabled { cursor: default; }
.tl-lt { min-width: 0; font-size: 12.5px; letter-spacing: .26em; color: #F9B776; font-weight: 500; text-transform: uppercase; }
.tl-lr { flex: none; font-size: 11.5px; color: var(--muted-1); }
.tl-list { list-style: none; margin: 0; padding: 0; }
.tl-list .tl-row { display: flex; align-items: center; gap: 10px; min-height: 47px; border-bottom: 1px solid var(--card-line); }
.tl-date { flex: none; width: 46px; font-size: 12px; color: var(--muted-1); }
.tl-list .tl-open { padding: 0; min-height: 46px; white-space: nowrap; overflow: hidden; display: block; line-height: 46px; text-overflow: ellipsis; }
.tl-list .tl-open b { font-weight: 400; font-size: 14.5px; color: #fff; } .tl-list .tl-open span { font-size: 12.5px; color: var(--muted-1); }
.tl-n { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; font-size: 11px; color: #F9B776; background: rgba(249,183,118,.14); border: 1px solid rgba(249,183,118,.4); }
.tl-n[hidden] { display: inline-grid; visibility: hidden; }
.tl-nosongs { margin: 10px 0 0; font-style: italic; font-size: 13px; color: var(--muted-1); }
/* Song sheet */
.ss-top { display: flex; gap: 14px; align-items: flex-start; }
.ss-art { flex: none; width: 84px; height: 84px; border-radius: 6px; overflow: hidden; background: linear-gradient(135deg, #2b2140, #43305f); }
.ss-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ss-text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.ss-text b { font-weight: 500; font-size: 17px; } .ss-text span { color: #F9B776; font-size: 13px; } .ss-text small { margin-top: 2px; font-size: 11.5px; color: var(--muted-1); }
.ss-add { margin: 18px 0 8px; padding: 12px; border-radius: 16px; background: rgba(14,9,26,.85); border: 1px solid var(--peach-line); }
.ss-addhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ss-addhead input { height: 34px; padding: 0 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: transparent; color: #fff; font: 14px var(--font-body); color-scheme: dark; }
.ss-add textarea, .ss-edit textarea { display: block; width: 100%; margin: 10px 0; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(5,3,11,.6); color: #fff; font: 16px/1.4 var(--font-body); resize: none; }
.ss-label { margin-top: 14px; }
.ss-list { list-style: none; margin: 6px 0 0; padding: 0; }
.ss-list li { padding: 12px 0; border-top: 1px solid var(--card-line); }
.ss-nhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ss-nhead time { font-size: 10.5px; letter-spacing: .2em; color: #F9B776; }
.ss-nhead .link-quiet { display: inline; margin: 0 0 0 12px; }
.ss-list p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: #F1E9EF; white-space: pre-wrap; }
.ss-list p.muted { color: var(--muted-1); }

/* ---------- Astrology ---------- */
.as-big3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.as-big3 > * { display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 58px; padding: 10px 4px; border-radius: 14px; border: 1px solid rgba(255,255,255,.28); background: rgba(14,9,26,.6); color: #fff; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.as-big3 > div { cursor: default; }
.as-big3.pending > * { cursor: default; }
.as-big3 span { font-size: 10px; letter-spacing: .24em; color: var(--muted-1); }
.as-big3 b { margin-top: 2px; font-size: 16px; font-weight: 400; white-space: nowrap; } .as-big3 b a { color: #F9B776; font-size: 14px; } .as-big3 small { color: var(--muted-2); }
.as-chartlabel { margin: 18px 0 0; text-align: center; } .as-chartlabel .eyebrow { letter-spacing: .3em; } .as-chartlabel p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted-1); }
.as-wheelbox { display: flex; justify-content: center; margin: 6px 0 6px; }
.as-wheel { display: block; width: min(80vw, 300px); height: min(80vw, 300px); font-family: var(--font-body); overflow: visible; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.as-wheel.ph { border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(14,9,26,.6); }
.as-wheel text { font-family: var(--font-body); pointer-events: none; }
.w-sign { fill: #A79FB8; font-weight: 400; } .w-sign.on { fill: #F9B776; font-weight: 600; }
.w-hn { fill: rgba(201,194,216,.55); } .w-hn.on { fill: #F9B776; font-weight: 600; }
.w-hit { fill: rgba(0,0,0,0); stroke: none; cursor: pointer; outline: none; }
.w-hit:focus-visible { stroke: #F9B776; stroke-width: 1; }
.as-unlock { display: flex; flex-direction: column; gap: 4px; } .as-unlock .as-p { margin: 0; }
.as-plrow { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; width: 100%; padding: 10px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* ---------- sky events (top of the Astrology page) ---------- */
.sky-evs { margin: 4px 0 6px; }
.sky-evs:empty { display: none; }
.sky-wait { height: 156px; margin: 0 0 14px; border-radius: 20px; border: 1px solid var(--card-line); background: rgba(14,9,26,.6); }
.sky-head { margin: 0 0 8px; } .sky-head .eyebrow { letter-spacing: .26em; }
.sky-ev.fresh { border: 1.5px solid transparent; background: linear-gradient(#0e091a, #0e091a) padding-box, var(--grad) border-box; }
.sky-evhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 20px; margin-bottom: 4px; }
.sky-evhead .eyebrow { min-width: 0; letter-spacing: .2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sky-new { flex: none; height: 20px; padding: 0 9px; border-radius: 10px; background: var(--grad); color: var(--ink); font-size: 11px; font-weight: 600; line-height: 20px; letter-spacing: .04em; }
.sky-new[hidden] { display: none; }
.sky-title { margin: 0 0 6px; font-weight: 400; font-size: 18px; line-height: 1.3; color: #fff; }
.sky-lasts { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 11.5px; color: var(--muted-1); }
.sky-lasts span + span::before { content: "·"; margin-right: 12px; color: var(--muted-2); }
.sky-solar { margin-top: 8px; } .sky-solar a { color: #F9B776; }
.sky-more { display: block; width: 100%; height: 44px; margin: -4px 0 14px; border: 1px solid var(--card-line); border-radius: 22px; background: rgba(14,9,26,.6); color: #F9B776; font: 13px var(--font-body); cursor: pointer; }

/* ---------- planet / house card (slides up from the bottom, one at a time) ---------- */
.ac-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(3,2,8,.35); opacity: 0; transition: opacity .25s; -webkit-tap-highlight-color: transparent; }
.ac-scrim.on { opacity: 1; }
.ac-scrim[hidden], .ac-sheet[hidden] { display: none; }
.ac-sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; width: 100%; max-width: 560px; margin: 0 auto; max-height: 58vh; max-height: max(240px, min(58dvh, 520px, calc(100dvh - 330px))); display: flex; flex-direction: column;
  border-radius: 26px 26px 0 0; background: #0e0919; border-top: 1.5px solid rgba(249,183,118,.55); color: #fff;
  transform: translate3d(0, 105%, 0); transition: transform .28s cubic-bezier(.2,.8,.2,1); will-change: transform; overscroll-behavior: contain; touch-action: pan-y; }
.ac-sheet.on { transform: translate3d(0, 0, 0); }
.ac-grab { flex: none; width: 40px; height: 5px; margin: 12px auto 10px; border-radius: 3px; background: rgba(255,255,255,.3); }
.ac-head { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 0 12px 0 22px; }
.ac-kind { min-width: 0; font-size: 11px; letter-spacing: .24em; color: #F9B776; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-x { flex: none; width: 44px; height: 36px; padding: 0; border: 0; background: transparent; color: #C9C2D8; font-size: 22px; line-height: 1; cursor: pointer; }
.ac-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 22px calc(env(safe-area-inset-bottom) + 22px); }
.ac-title { margin: 4px 0 2px; font-weight: 300; font-size: 26px; line-height: 1.2; }
.ac-meta { font-size: 12.5px; color: #F9B776; }
.ac-p { margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: var(--body); }
.ac-q { margin: 14px 0 0; font-style: italic; font-weight: 300; font-size: 16px; line-height: 1.45; color: var(--warm); }
.ac-note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted-1); } .ac-note a { color: #F9B776; }
.ac-here { margin-top: 12px; font-size: 12.5px; color: var(--muted-1); }
.ac-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ac-chip { height: 34px; padding: 0 14px; font-size: 13px; }
.ac-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: 12.5px; }
.ac-links a { color: #F9B776; }
@media (prefers-reduced-motion: reduce) { .ac-sheet, .ac-scrim { transition: none; } }
.as-born { margin: 0 0 16px; text-align: center; font-size: 11.5px; line-height: 1.45; color: var(--muted-1); }
.as-card { position: relative; margin: 0 0 14px; padding: 14px 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--card-line); }
.as-card.now { border: 1.5px solid transparent; background: linear-gradient(#0e091a, #0e091a) padding-box, var(--grad) border-box; }
.as-card.soft { background: rgba(14,9,26,.6); }
.as-cardhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.as-cardhead .eyebrow { min-width: 0; letter-spacing: .2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-dates { flex: none; font-size: 11.5px; color: var(--muted-1); }
.as-link { flex: none; font-size: 12px; color: #F9B776; } .as-link.sm { font-size: 11px; }
.as-theme { margin: 0 0 6px; font-weight: 400; font-size: 20px; color: #fff; } .as-theme.sm { font-size: 17px; }
.as-p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--body); } .as-p.dim { color: var(--muted-1); font-size: 13.5px; }
.as-p b { font-weight: 600; color: #fff; }
.as-facts { margin: 0 0 8px; padding-left: 18px; font-size: 13.5px; line-height: 1.5; color: var(--body); } .as-facts li { margin-bottom: 4px; }
.as-q { margin: 8px 0 6px; font-style: italic; font-weight: 300; font-size: 17px; line-height: 1.35; color: var(--warm); } .as-q.sm { font-size: 15px; }
.as-small { margin: 0; font-size: 11.5px; color: var(--muted-2); } .as-small.i { font-style: italic; margin-bottom: 12px; }
.as-take { margin: 0 0 10px; font-style: italic; font-size: 14px; color: var(--warm); }
.as-res { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--card-line); }
.as-res > span { font-size: 13px; color: var(--body); }
.as-resbtns { display: flex; gap: 8px; } .as-resbtns .pill-opt { flex: 1; min-width: 0; padding: 0 8px; font-size: 13px; height: 36px; }
.as-pl { list-style: none; margin: 8px 0 0; padding: 0; }
.as-pl li { border-top: 1px solid var(--card-line); }
.as-pl b { display: block; font-weight: 400; font-size: 14px; color: #fff; } .as-pl span { display: block; font-size: 11.5px; line-height: 1.4; color: var(--muted-1); }
.as-el { margin-top: 10px; } .as-elhead { display: flex; justify-content: space-between; font-size: 13.5px; } .as-elhead b { font-weight: 400; }
.as-eltrack { height: 4px; margin: 6px 0 4px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; } .as-eltrack span { display: block; height: 100%; border-radius: 2px; }
.as-el small { font-size: 11px; color: var(--muted-1); }
.as-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; } .as-next p { margin: 4px 0 0; font-size: 14px; }
.as-weeks { list-style: none; margin: 8px 0 0; padding: 0; }
.as-weeks li { padding: 10px 0; border-top: 1px solid var(--card-line); } .as-weeks li.now .as-wk b { color: #F9B776; }
.as-wk { display: flex; justify-content: space-between; gap: 8px; } .as-wk b { font-weight: 500; font-size: 14px; } .as-wk span { font-size: 11.5px; color: var(--muted-1); }
.as-weeks p { margin: 4px 0 0; font-style: italic; font-size: 13.5px; color: var(--warm); }
.pr-stats { display: flex; margin: 10px 0; padding: 10px 0; border-top: 1px solid var(--card-line); border-bottom: 1px solid var(--card-line); }
.pr-stats div { flex: 1; text-align: center; } .pr-stats b { display: block; font-weight: 400; font-size: 18px; } .pr-stats span { font-size: 11px; color: var(--muted-1); }
.pr-more summary { cursor: pointer; color: #F9B776; font-size: 13.5px; list-style: none; } .pr-more summary::-webkit-details-marker { display: none; }
.pr-more[open] summary { margin-bottom: 10px; }
/* Guide */
.gd-list, .gd-houses, .gd-planets { list-style: none; margin: 8px 0 0; padding: 0; }
.gd-list li, .gd-houses li, .gd-planets li { padding: 9px 0; border-top: 1px solid var(--card-line); }
.gd-row { display: flex; justify-content: space-between; gap: 10px; } .gd-list b { font-weight: 400; font-size: 14.5px; } .gd-list b.mine { color: #F9B776; }
.gd-list > li > span { display: block; font-size: 12.5px; color: var(--muted-1); }
.gd-yours { font-size: 11px; color: #E879B0; text-align: right; }
.gd-houses li { display: flex; gap: 14px; } .gd-n { flex: none; width: 20px; color: #F9B776; font-size: 13px; }
.gd-houses span { font-size: 13.5px; color: var(--body); } .gd-houses small { display: block; margin-top: 2px; }
.gd-planets li { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; font-size: 13.5px; } .gd-planets b { font-weight: 400; } .gd-planets span { color: var(--muted-1); }

/* ---------- menu ---------- */
.mn-label { margin-bottom: 6px; }
.mn { display: flex; flex-direction: column; }
.mn-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 13px 4px; border: 0; border-bottom: 1px solid var(--card-line); background: none; color: #fff; text-align: left; text-decoration: none; font: inherit; cursor: pointer; }
.mn-row:last-child { border-bottom: 0; }
.mn-row b { display: block; font-weight: 400; font-size: 16px; } .mn-row small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted-1); }
.mn-row.first b { color: #F9B776; font-weight: 600; }
.mn-row svg { flex: none; color: var(--muted-1); }

/* ---------- Mission ---------- */
.mission .plain-in { min-height: calc(100dvh - 260px); }
.mission-text { text-align: left; }
.float-wrap { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: center; padding: 8px 0 4px; pointer-events: none; }
.float-btn { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 26px; background: var(--grad); color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; box-shadow: 0 8px 30px rgba(232,121,176,.35); }
/* Instructions */
.ins { margin-top: 14px; }
.ins h2 { margin: 22px 0 8px; font-size: 12px; letter-spacing: .3em; color: #F9B776; font-weight: 500; text-transform: uppercase; }
.ins ul, .ins ol { margin: 0; padding-left: 20px; } .ins li { margin-bottom: 6px; font-size: 14.5px; line-height: 1.5; color: var(--body); } .ins li ul { margin-top: 6px; }
.ins-quote { margin: 30px 0 10px; text-align: center; font-style: italic; font-weight: 300; font-size: 17px; line-height: 1.5; color: var(--warm); }

/* ---------- Profile & Settings ---------- */
.st-head { margin: 22px 4px 8px; }
.st-card { border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); overflow: hidden; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 8px 16px; border: 0; border-top: 1px solid var(--card-line); background: none; color: #fff; text-align: left; text-decoration: none; font: inherit; cursor: pointer; }
.st-card > .st-row:first-child { border-top: 0; }
.st-row:disabled { cursor: default; opacity: 1; }
.st-label { min-width: 0; font-size: 15px; } .st-label.danger { color: #FF8A8A; }
.st-val { flex: none; display: flex; align-items: center; gap: 6px; max-width: 60%; font-size: 13.5px; color: var(--muted-1); }
.st-val > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-note { margin: 8px 4px 0; font-size: 12px; line-height: 1.45; color: var(--muted-2); }
.st-device { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 36px; margin: 8px 4px 0; font-size: 12px; color: var(--muted-1); }
.st-device .link-peach { flex: none; font-size: 12.5px; }
.st-version { margin: 22px 0 0; text-align: center; font-size: 11.5px; color: var(--muted-2); }
.sw { position: relative; flex: none; width: 52px; height: 30px; padding: 0; border: 0; border-radius: 15px; background: rgba(255,255,255,.18); cursor: pointer; transition: background .2s; }
.sw span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sw[aria-checked="true"] { background: var(--grad); } .sw[aria-checked="true"] span { transform: translateX(22px); }
.sw:disabled { opacity: .45; cursor: default; }
.choose { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.choose-opt { height: 48px; font-size: 15px; }
.pf-top { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pf-avatar { width: 88px; height: 88px; padding: 2px; border-radius: 50%; background: var(--grad); }
.pf-avatar span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #120a20; font-size: 34px; font-weight: 300; }
.pf-name { margin-top: 10px; font-size: 22px; } .pf-since { font-size: 12.5px; color: var(--muted-1); }
.pf-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.pf-chips span { padding: 4px 10px; border-radius: 14px; border: 1px solid rgba(249,183,118,.55); font-size: 12px; color: #FBE3CF; }
.pf-stats { display: flex; margin: 16px 0 0; padding: 12px 0; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); }
.pf-stats div { flex: 1; text-align: center; } .pf-stats b { display: block; font-weight: 400; font-size: 20px; } .pf-stats span { font-size: 11px; color: var(--muted-1); }
.pf-out { display: block; margin: 22px auto 0; font-size: 15px; }

/* ---------- Export ---------- */
.ex-row { position: relative; cursor: pointer; justify-content: flex-start; }
.ex-row input, .ex-fmt input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ex-box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.4); display: grid; place-items: center; }
.ex-row input:checked + .ex-box { border: 0; background: var(--grad); }
.ex-row input:checked + .ex-box::after { content: ""; width: 10px; height: 5px; margin-top: -3px; border-left: 2px solid #1a0f22; border-bottom: 2px solid #1a0f22; transform: rotate(-45deg); }
.ex-row .st-label { flex: 1; } .ex-row input:focus-visible + .ex-box { outline: 2px solid #F9B776; outline-offset: 2px; }
.ex-formats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-fmt { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); cursor: pointer; }
.ex-fmt:has(input:checked) { border: 1.5px solid transparent; background: linear-gradient(#0e091a, #0e091a) padding-box, var(--grad) border-box; }
.ex-radio { width: 22px; height: 22px; margin-bottom: 6px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.4); }
.ex-fmt input:checked + .ex-radio { border-color: #F9B776; background: radial-gradient(circle, #F9B776 0 5px, transparent 6px); }
.ex-fmt b { font-weight: 400; font-size: 15px; } .ex-fmt small { font-size: 12px; line-height: 1.4; color: var(--muted-1); }
.ex-go { margin-top: 18px; height: 54px; font-size: 16px; }
.ex-after { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--muted-1); }

/* ---------- Import ---------- */
.im-opts { display: flex; flex-direction: column; gap: 10px; }
.im-opt { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); cursor: pointer; }
.im-ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(249,183,118,.12); color: #F9B776; }
.im-opt b { display: block; font-weight: 400; font-size: 15px; } .im-opt b em { margin-left: 6px; font-style: normal; font-size: 9.5px; letter-spacing: .16em; color: #F9B776; }
.im-opt small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--muted-1); }
.im-how { display: inline-block; margin: 12px 4px 0; font-size: 13px; }
.im-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 16px; padding: 30px 16px; border-radius: 18px; border: 1.5px dashed rgba(249,183,118,.55); text-align: center; color: var(--muted-1); font-size: 13px; }
.im-drop b { color: #fff; font-weight: 400; font-size: 15px; } .im-drop.over { background: rgba(249,183,118,.08); border-color: #F9B776; }
.im-ready { margin-top: 20px; } .im-file { margin: 4px 0 10px; font-size: 14px; color: #fff; }
.im-actions { display: flex; gap: 10px; margin-top: 14px; } .im-actions > * { flex: 1; }
.ip { display: flex; flex-direction: column; align-items: center; padding-top: 20px; text-align: center; }
.ip-pct { font-size: 56px; font-weight: 200; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.ip-file { margin: 6px 0 0; text-align: center; font-size: 13px; color: var(--muted-1); }
.ip-years { list-style: none; width: 100%; max-width: 320px; margin: 22px 0 0; padding: 0; }
.ip-years li { display: flex; justify-content: space-between; height: 40px; align-items: center; padding: 0 6px; border-top: 1px solid var(--card-line); color: var(--muted-2); font-size: 14px; }
.ip-years li.done { color: #fff; } .ip-check { width: 16px; color: #F9B776; }
.ip-note { margin: 22px 0 0; font-size: 12.5px; color: var(--muted-1); max-width: 300px; }
.idn { padding-top: 10px; } .idn .pf-stats { margin: 16px 0 14px; }
.idn-top { list-style: none; margin: 8px 0 0; padding: 0; } .idn-top li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--card-line); }
.idn-n { flex: none; width: 14px; color: #F9B776; font-size: 13px; } .idn-plays { flex: none; font-size: 12px; color: var(--muted-1); }
.idn .center-block { margin-top: 16px; }
/* How-to */
.ht-steps { list-style: none; margin: 4px 0 14px; padding: 0; }
.ht-steps li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--card-line); }
.ht-n { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(249,183,118,.7); color: #F9B776; font-size: 13px; }
.ht-steps b { font-weight: 500; font-size: 15px; } .ht-steps p { margin: 3px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted-1); }
.ht-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; } .ht-actions .link-peach { margin-top: 4px; text-align: center; }
.ht-actions .link-peach:disabled { color: var(--muted-1); text-decoration: none; }
.lg-h { margin: 18px 0 4px; font-size: 15px; font-weight: 500; }

/* ---------- Now Playing menu actions ---------- */
.np-acts { display: flex; flex-direction: column; margin: 0 0 6px; border-top: 1px solid var(--card-line); }
.np-act { display: flex; align-items: center; gap: 8px; width: 100%; height: 46px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--card-line); background: none; color: #fff; font: 15px var(--font-body); text-decoration: none; text-align: left; cursor: pointer; }
.np-act:disabled { opacity: .45; }

@media (prefers-reduced-motion: reduce) { .tl-bar-in, .sw, .sw span { transition: none; } }

/* ---------- Timeline search: results from all of the user's music ---------- */
.tl-clear { flex: none; width: 32px; height: 32px; margin-right: -10px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.tl-clear[hidden] { display: none; }
.tl.searching > :not(.top):not(.tl-cap):not(.tl-head):not(.tl-search):not(.tl-results) { display: none; }
.tl-results { position: relative; z-index: 1; min-height: 60dvh; padding: 0 20px 20px; }
.tl-results[hidden] { display: none; }
.sr-head { margin: 10px 0 6px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #F9B776; }
.sr-head span { letter-spacing: .04em; text-transform: none; color: var(--muted-2); }
.sr-list { margin: 0 0 8px; padding: 0 4px; list-style: none; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); }
.sr-row { display: flex; align-items: center; gap: 6px; height: 60px; }
.sr-row + .sr-row { border-top: 1px solid var(--card-line); }
.sr-open { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 12px; padding: 0 8px; border: 0; background: none; color: #fff; text-align: left; font: inherit; cursor: pointer; }
.sr-art, .sr-ava { flex: none; width: 44px; height: 44px; border-radius: 6px; overflow: hidden; background: linear-gradient(135deg, #2b2140, #43305f); }
.sr-art img { display: block; width: 44px; height: 44px; object-fit: contain; }
.sr-ava { display: grid; place-items: center; border-radius: 50%; font-size: 17px; font-weight: 500; color: var(--warm); }
.sr-text { min-width: 0; display: flex; flex-direction: column; }
.sr-text b, .sr-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-text b { font-size: 14.5px; font-weight: 500; line-height: 20px; }
.sr-text span { font-size: 12px; line-height: 17px; color: var(--muted-1); }
.sr-play, .tl-play { flex: none; width: 40px; height: 40px; display: grid; place-items: center; padding: 0 0 0 2px; margin-right: 6px; border-radius: 50%;
  border: 1.5px solid rgba(249,183,118,.7); background: rgba(249,183,118,.08); color: #F9B776; cursor: pointer; }
.tl-play { width: 34px; height: 34px; margin-right: 0; }
.sr-none { margin: 24px 0; text-align: center; color: var(--muted-1); font-size: 14px; }
/* The song found by search: highlighted in place on the timeline. */
.tl-row.hit { border-radius: 12px; background: rgba(249,183,118,.12); box-shadow: inset 0 0 0 1.5px rgba(249,183,118,.75); }
/* The events past the first two: folded away until "Show N more", animated open and closed. */
.sky-extra { overflow: hidden; opacity: 0; transition: height .32s cubic-bezier(.2,.8,.2,1), opacity .24s ease; }
.sky-extra.open { opacity: 1; }
.sky-extra-in { display: flow-root; }
@media (prefers-reduced-motion: reduce) { .sky-extra { transition: none; } }

/* ---------- Mission: four large buttons under the unchanged top; each opens its own page ---------- */
.pager-page .mission-home { min-height: 100%; display: flex; flex-direction: column; }
/* The page's background runs under the tab bar too (no edge where the reserved space starts). */
.pager-page .mission-home { min-height: calc(100% + var(--reserve)); margin-bottom: calc(-1 * var(--reserve)); padding-bottom: var(--reserve); }
.mission-home .mission-top { flex: none; min-height: 0; padding-bottom: 14px; }
.mission-home .plain-quote { margin-top: 0; }
.mission-btns { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 8px 24px 16px; }
/* Same look as "Start Today's Rewind" (.btn-grad.big): gradient fill, dark text, soft glow, pill shape. */
.mission-btn { display: block; width: 100%; max-width: 460px; height: 62px; margin: 0 auto; padding: 0 20px; border: 0; border-radius: 30px;
  background: var(--grad); color: var(--ink); font: 600 18px var(--font-body); box-shadow: 0 8px 30px rgba(232, 121, 176, .35);
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: opacity .15s; }
.mission-btn:active { opacity: .75; }
@media (max-height: 740px) { .mission-btns { gap: 12px; } .mission-btn { height: 54px; } }
/* A section's own page: slides in from the right over the Mission page; the tab bar and mini-player stay above it. */
.mt-page { position: fixed; inset: 0; z-index: 18; height: 100vh; height: 100dvh; display: flex; flex-direction: column; color: #fff; overflow: hidden;
  background: linear-gradient(180deg, #04030a 0, #080512 170px, #120a24 380px, #05030b 1000px) #05030b; box-shadow: -14px 0 40px rgba(0, 0, 0, .55);
  transform: translate3d(100%, 0, 0); transition: transform .32s cubic-bezier(.2, .8, .2, 1); will-change: transform; touch-action: pan-y; overscroll-behavior: none; }
.mt-page.open { transform: none; }
.mt-page.dragging { transition: none; }
.mt-head { flex: none; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 12px) 20px 14px; }
.mt-head .top-word { text-align: center; overflow: hidden; text-overflow: ellipsis; }
.mt-back { color: #fff; }
.mt-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: none; -webkit-overflow-scrolling: touch; touch-action: pan-y;
  padding-bottom: var(--reserve); scrollbar-width: none; }
.mt-scroll::-webkit-scrollbar { display: none; }
.mt-scroll .mt-in { max-width: 560px; margin: 0 auto; }
.mt-care { margin: 18px 0 6px; font-size: 12.5px; line-height: 1.5; color: var(--muted-2); }
@media (prefers-reduced-motion: reduce) { .mt-page, .mission-btn { transition: none; } }
.mt-in { padding: 14px 24px 24px; text-align: left; }
/* Every section: the same 24px on both sides. The Mission text itself is centered within them. */
.mt-scroll .mt-in { box-sizing: border-box; width: 100%; padding-left: 24px; padding-right: 24px; }
.mt-mission .mt-p { text-align: center; text-wrap: pretty; }
/* Body text: weight 500, auto-sized between 17px and 22px to fill the page (fitSection() in screens.js). */
.mt-in { --mt-fs: 17px; }
.mt-p { margin: 0 0 .85em; font-size: var(--mt-fs); font-weight: 500; line-height: 1.6; color: var(--body); }
.mt-p b { font-weight: 600; color: var(--warm); }
.mt-ask { font-style: italic; color: var(--warm); }
.mt-sub { margin: 0 0 12px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: #F9B776; }
.mt-list { margin: 0; padding: 0; list-style: none; }
.mt-list li { position: relative; margin: 0 0 .75em; padding-left: 1.3em; font-size: var(--mt-fs); font-weight: 500; line-height: 1.6; color: var(--body); }
.mt-list li::before { content: "•"; position: absolute; left: .1em; top: 0; color: #F9B776; }
.mt-sign { margin: 22px 0 6px; text-align: right; font-style: italic; font-weight: 400; font-size: var(--mt-fs); line-height: 1.6; color: var(--warm); }
.mt-soon { margin: 30px 0; text-align: center; font-style: italic; font-weight: 300; font-size: 17px; color: var(--muted-1); }
.st-test { margin: 12px 0 0; }
.st-test:disabled { opacity: .6; }
/* Time and length sheets: the wheel sits centered, with the same side margins as the Save button. */
.ch-form .wheel-host { margin-left: auto; margin-right: auto; }

/* ---------- Journal (session reflections) ---------- */
.jr-search { position: sticky; top: env(safe-area-inset-top); z-index: 3; margin: 0 -20px 6px; padding: 8px 20px 10px; background: linear-gradient(#05030b 78%, rgba(5,3,11,0)); }
.jr-none, .jr-empty { margin: 14px 0; color: var(--muted-1); font-size: 14px; text-align: center; }
.jr-none[hidden], .jr-empty[hidden], .jr-item[hidden] { display: none; }
.jr-list { list-style: none; margin: 0; padding: 0; }
.jr-item { margin-bottom: 12px; }
.jr-open { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); color: #fff; text-align: left; font: inherit; cursor: pointer; }
.jr-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.jr-date { font-size: 11px; letter-spacing: .16em; color: #F9B776; font-weight: 500; white-space: nowrap; }
.jr-stats { font-size: 12px; color: var(--muted-1); white-space: nowrap; }
.jr-ans { font-size: 13px; color: var(--muted-1); } .jr-ans b { color: var(--warm); font-weight: 500; }
.jr-note { font-size: 14.5px; line-height: 1.45; color: #F1E9EF; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.jr-note.muted, .jr-text.muted { color: var(--muted-2); font-style: italic; }
.jr-meta { margin: 4px 0 0; font-size: 13px; color: var(--muted-1); }
.jr-q { margin-top: 14px; }
.jr-a { margin: 0; text-align: center; font-size: 18px; color: #fff; }
.jr-a .muted { color: var(--muted-2); font-size: 15px; }
.jr-label { margin-top: 18px; }
.jr-text { margin: 6px 0 0; font-size: 16px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: #F1E9EF; }
.jr-input { margin-top: 6px; }
.jr-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.jr-sheet .answers { margin-top: 4px; }

/* ---------- Encryption sheets (lock.js) ---------- */
.lock-form .opt-help { min-height: 0; margin: 6px 0 4px; }
.lock-alt { display: block; margin: 10px auto 0; text-align: center; }
.rk-in { text-align: center; letter-spacing: .12em; text-transform: uppercase; font-family: ui-monospace, Menlo, monospace; }
.rk-code { margin: 14px 0 6px; padding: 16px 12px; border-radius: 16px; text-align: center; font: 500 18px/1.5 ui-monospace, Menlo, monospace; letter-spacing: .08em; color: #fff; overflow-wrap: anywhere;
  background: linear-gradient(#0e091a, #0e091a) padding-box, var(--grad) border-box; border: 1.5px solid transparent; user-select: all; -webkit-user-select: all; }
.rk-actions { display: flex; gap: 10px; margin-top: 14px; } .rk-actions > * { flex: 1; }
.btn-grad.danger-fill { background: #F08A8A; color: #1a0f22; box-shadow: none; margin-bottom: 10px; }
