/* The member app: the brand's night variant (design.md: --night #0f1b2d, same type and teal) for bedtime use.
   Tonight's audio is the hero of Today; the tab bar sits above the home indicator. */
body.member { background: var(--night); color: var(--night-ink); }
body.member h1, body.member h2, body.member h3 { color: #fff; }
body.member a:not(.btn) { color: #cfe3f0; }
.member-bar { background: var(--night); justify-content: space-between; display: flex; }
.member-bar .logo img { height: 24px; width: auto; filter: brightness(0) invert(1); opacity: .92; }
.daypill { padding: 6px 12px; border-radius: 99px; background: var(--night-2); color: #fff; font-weight: 600; font-size: 16px; }
.member .x { color: #fff; }
.app { padding-bottom: 120px; }
.tab h1 { font-size: clamp(28px, 2vw + 20px, 36px); margin: 6px 0 16px; }
.wk { margin: 14px 0 0; color: var(--apricot); font-weight: 600; font-size: 17px; }
body.member .card { background: var(--night-2); color: var(--night-ink); box-shadow: none; border-radius: var(--r-card); padding: 20px; margin: 0 0 14px; }
body.member .hero-audio { background: linear-gradient(180deg, var(--night-3), var(--night-2)); text-align: center; padding: 28px 20px 24px; }
.hero-audio .bigplay { width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 99px; border: 0; background: var(--teal); color: #fff; font-size: 34px; cursor: pointer; display: grid; place-items: center; box-shadow: 0 10px 30px rgb(0 0 0 / .35); }
.hero-audio .bigplay:active { transform: scale(.96); }
.hero-audio b { display: block; font-size: 22px; color: #fff; }
.hero-audio span { color: var(--night-soft); font-size: 17px; }
.hero-audio .win { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid rgb(255 255 255 / .1); font-size: 18px; color: var(--night-ink); }
.hero-audio .win b { display: inline; font-size: 18px; }
.lesson h2 { font-size: 24px; margin-bottom: 8px; }
.lesson .meta { margin: 0 0 6px; font-size: 16px; color: var(--night-soft); font-weight: 600; }
.lesson p { color: var(--night-ink); }
.lesson .task { margin: 16px 0 14px; padding: 14px 16px; border-radius: 16px; background: var(--night-3); color: #fff; font-weight: 600; }
.lesson .btn[aria-pressed="true"] { background: var(--ok); }
.tracks .play { flex: none; width: 52px; height: 52px; border-radius: 99px; border: 0; background: var(--teal); color: #fff; font-size: 20px; cursor: pointer; display: grid; place-items: center; }
.tracks b { display: block; font-size: 18px; color: #fff; }
.tracks span.for { font-size: 16px; color: var(--night-soft); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats p { margin: 0; font-size: 16px; color: var(--night-soft); }
.stats b { display: block; font-size: 28px; color: #fff; font-weight: 600; letter-spacing: -0.02em; }
.stats .up { color: var(--apricot); font-size: 16px; font-weight: 600; }
.earlier { margin: 18px 0; }
.earlier summary { cursor: pointer; font-weight: 600; color: #cfe3f0; min-height: 44px; display: flex; align-items: center; }
.earlier ol { list-style: none; padding: 0; margin: 0; }
.earlier li { padding: 12px 0; border-bottom: 1px solid rgb(255 255 255 / .08); }
.earlier li b { color: #fff; }
.earlier li p { margin: 4px 0 0; font-size: 17px; color: var(--night-soft); }
.field { margin: 0 0 18px; }
.flabel { display: block; font-weight: 600; color: #fff; margin-bottom: 8px; }
.stepper { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; background: var(--night); border-radius: 18px; padding: 4px; }
.stepper button { height: 52px; border: 0; border-radius: 14px; background: var(--night-3); color: #fff; font-size: 26px; font-weight: 600; cursor: pointer; }
.stepper button:active { transform: scale(.96); }
.stepper output { text-align: center; font-size: 26px; font-weight: 600; color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-width: 60px; min-height: 48px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--night-3); color: #fff; font: 500 17px var(--font); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--teal); box-shadow: inset 0 0 0 2px #7fc3c9; }
.nightpick { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; }
.nightpick button { flex: none; min-height: 44px; padding: 0 14px; border: 0; border-radius: 99px; background: var(--night-3); color: #fff; font: 500 16px var(--font); cursor: pointer; }
.nightpick button[aria-pressed="true"] { background: #fff; color: var(--night); }
.calc { margin: 4px 0 14px; padding: 14px 16px; border-radius: 16px; background: var(--night-3); color: #fff; font-weight: 600; }
.chart h2 { font-size: 22px; margin-bottom: 4px; }
.chart .bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 160px; margin-top: 14px; }
.chart .bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; font-size: 14px; color: var(--night-soft); }
.chart .bar i { display: block; width: 100%; border-radius: 10px 10px 4px 4px; background: var(--night-3); }
.chart .bar.good i { background: var(--apricot); }
.chart .empty, .lead2 { color: var(--night-soft); }
.tracks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.tracks li { display: flex; align-items: center; gap: 14px; background: var(--night-2); border-radius: 20px; padding: 14px 16px; }
.tracks li.now { box-shadow: inset 0 0 0 2px var(--apricot); }
.tracks li.locked { opacity: .6; }
.tracks li.locked .play { background: var(--night-3); }
.tracks .min { margin-left: auto; color: var(--night-soft); font-size: 16px; white-space: nowrap; }
.packh { font-size: 24px; margin-top: 26px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; display: grid; grid-template-columns: repeat(3, 1fr); background: rgb(15 27 45 / .96); box-shadow: 0 -1px 0 rgb(255 255 255 / .08); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.tabs button { min-height: 52px; border: 0; background: none; font: 600 16px var(--font); color: var(--night-soft); border-radius: 14px; cursor: pointer; }
.tabs button[aria-current="page"] { color: #fff; background: var(--night-2); }
.manage-row { padding: 14px 0; border-bottom: 1px solid rgb(255 255 255 / .08); }
.manage-row:last-child { border-bottom: 0; }
.manage-row p { margin: 0 0 10px; color: var(--night-ink); }
.member .btn--secondary { background: var(--night-3); color: #fff; box-shadow: none; }
.member .btn--ghost { color: #cfe3f0; }
.member form input[type=email] { width: 100%; min-height: 56px; font-size: 18px; border-radius: var(--r-field); border: 0; padding: 0 16px; margin: 6px 0 14px; }
.member label { color: #fff; font-weight: 600; }
/* Light pages that reuse these parts (thanks, cancel, access, review) */
body.flow .card { background: var(--surface); box-shadow: var(--shadow-2); color: var(--ink); }
body.flow .upsell { margin-top: 26px; padding: 22px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-2), inset 0 0 0 2px var(--teal); }
body.flow .upsell .label { color: var(--teal); font-weight: 600; margin: 0 0 6px; font-size: 16px; }
body.flow .upsell h2 { font-size: 26px; }
body.flow .upsell .fine { font-size: 16px; color: var(--ink-2); margin: 10px 0 0; }
body.flow form input[type=email], body.flow textarea, body.flow input[name=name] { width: 100%; min-height: 56px; font-size: 18px; border-radius: var(--r-field); border: 0; box-shadow: inset 0 0 0 1.5px var(--ring); padding: 0 16px; margin: 6px 0 14px; background: var(--surface); }
body.flow textarea { padding: 12px 16px; min-height: 120px; }
@media (min-width: 1024px) {
  .app { max-width: 1040px; }
  #tab-today:not([hidden]) { display: grid; grid-template-columns: 1.2fr .8fr; gap: 0 28px; align-items: start; }
  #tab-today > .wk, #tab-today > h1 { grid-column: 1 / -1; }
  #tab-today > .lesson { grid-column: 1; grid-row: 3 / span 2; }
  #tab-today > .hero-audio, #tab-today > .stats { grid-column: 2; }
  #tab-today > .earlier { grid-column: 1 / -1; }
  #tab-diary:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: start; }
  #tab-diary > h1 { grid-column: 1 / -1; }
  .tabs { top: 0; bottom: auto; left: auto; right: 24px; width: 380px; background: none; box-shadow: none; padding-top: 8px; }
  .member-bar { padding-right: 430px; max-width: none; }
}
/* The diary's Save stays on screen above the tab bar while the form scrolls. */
.diary #save { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 3; box-shadow: 0 8px 24px rgb(0 0 0 / .35); }
@media (min-width: 1024px) { .diary #save { bottom: 16px; } }
@media (max-width: 1023px) {
  #tab-today:not([hidden]) { display: flex; flex-direction: column; }
  #tab-today.is-night > .hero-audio { order: -1; }
  #tab-today.is-night > .wk, #tab-today.is-night > h1 { order: -2; }
}
.daypill { white-space: nowrap; }
.lesson .task { margin: 10px 0 12px; font-size: 19px; }
.lesson .read { margin: 0 0 14px; }
.lesson .read summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: #cfe3f0; list-style: none; }
.lesson .read summary::-webkit-details-marker { display: none; }
.lesson .read p { margin: 0 0 6px; color: var(--night-soft); font-size: 17px; }
