:root {
  --top: #0d1729; --bottom: #172e42; --accent: #85d6c9;
  --card: rgba(255,255,255,.06); --card-selected: rgba(133,214,201,.14);
  --secondary: rgba(255,255,255,.6); --line: rgba(255,255,255,.12);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--top); }
body {
  margin: 0; min-height: 100vh; color: #fff;
  background: linear-gradient(var(--top), var(--bottom)) fixed;
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.fill { fill: currentColor; stroke: none; }
.loading { color: var(--secondary); text-align: center; padding-top: 30vh; }

/* Screens */
.screen { max-width: 640px; margin: 0 auto; padding: 24px 20px 150px; }
.screen h1 { font-size: 34px; margin: 28px 0 18px; letter-spacing: -.01em; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.section { display: flex; flex-direction: column; gap: 12px; margin-top: 30px; }
.section:first-of-type { margin-top: 0; }
.label { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--secondary); }
.note { font-size: 15px; color: var(--secondary); margin: 0; }
.small { font-size: 13px; }

.card { background: var(--card); border-radius: 18px; padding: 16px; }
.card.selected { background: var(--card-selected); }
.row-card { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; background: var(--card); border-radius: 18px; padding: 16px; transition: background .15s; }
.row-card:hover:not(:disabled) { background: rgba(255,255,255,.09); }
.row-card:disabled { opacity: .5; cursor: default; }
.row-card .icon { width: 52px; height: 52px; border-radius: 50%; background: var(--card-selected); color: var(--accent); display: grid; place-items: center; font-size: 20px; }
.row-card h3 { margin: 0; font-size: 17px; font-weight: 600; }
.row-card p { margin: 3px 0 0; font-size: 15px; color: var(--secondary); }
.row-card .meta { font-size: 13px; color: var(--secondary); margin-top: 4px; font-variant-numeric: tabular-nums; }
.row-card .meta.accent { color: var(--accent); }

/* Controls */
.segmented { display: flex; background: rgba(255,255,255,.08); border-radius: 10px; padding: 2px; }
.segmented button { flex: 1; padding: 7px 8px; border-radius: 8px; font-size: 15px; font-weight: 500; }
.segmented button[aria-pressed="true"] { background: rgba(255,255,255,.24); }
.chips { display: flex; gap: 8px; }
.chips button { flex: 1; background: var(--card); border-radius: 14px; padding: 9px 0; border: 1.5px solid transparent; display: flex; flex-direction: column; align-items: center; }
.chips button b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chips button span { font-size: 11px; color: var(--secondary); }
.chips button[aria-pressed="true"] { background: var(--card-selected); border-color: var(--accent); }
.stepper { display: flex; border-radius: 10px; background: rgba(255,255,255,.08); }
.stepper button { width: 46px; height: 32px; display: grid; place-items: center; font-size: 18px; }
.stepper button + button { border-left: 1px solid var(--line); }
.stepper button:disabled { opacity: .35; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.big-value { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--fill, 50%), rgba(255,255,255,.18) var(--fill, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; }
.slider-row { display: flex; align-items: center; gap: 10px; }
.slider-row .end { font-size: 12px; color: var(--secondary); }
.volume { display: grid; grid-template-columns: 22px 56px 1fr; align-items: center; gap: 12px; }
.volume svg { color: var(--accent); }

.toggles { background: var(--card); border-radius: 16px; }
.toggle { display: flex; align-items: center; gap: 14px; padding: 14px; width: 100%; text-align: left; }
.toggle + .toggle { border-top: 1px solid var(--line); }
.toggle div { flex: 1; }
.toggle small { display: block; font-size: 13px; color: var(--secondary); margin-top: 2px; }
.switch { width: 51px; height: 31px; border-radius: 16px; background: rgba(255,255,255,.18); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
[aria-checked="true"] .switch { background: var(--accent); }
[aria-checked="true"] .switch::after { transform: translateX(20px); }

.option { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 12px 14px; }
.option.selected { background: var(--card-selected); }
.option .pick { display: flex; align-items: center; gap: 12px; flex: 1; text-align: left; }
.option .pick svg { font-size: 22px; color: var(--secondary); }
.option.selected .pick svg { color: var(--accent); }
.option b { display: block; font-weight: 500; }
.option small { display: block; font-size: 13px; color: var(--secondary); }
.option .preview { font-size: 28px; color: var(--accent); display: grid; place-items: center; }

.speed { display: flex; align-items: center; gap: 18px; }
.mini-circle { width: 64px; height: 64px; flex: none; }
.link { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--secondary); margin: 28px auto 0; }

.primary { display: block; width: 100%; padding: 16px; border-radius: 999px; background: var(--accent); color: var(--top); font-weight: 600; font-size: 17px; text-align: center; transition: opacity .15s; }
.primary:disabled { opacity: .35; cursor: default; }
.secondary { display: block; width: 100%; padding: 15px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.3); color: #fff; font-weight: 600; font-size: 17px; text-align: center; margin-top: 10px; }
.begin-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 20px calc(88px + env(safe-area-inset-bottom)); background: var(--bottom); z-index: 5; }
.begin-bar::before { content: ""; position: absolute; left: 0; right: 0; top: -24px; height: 24px; background: linear-gradient(rgba(23,46,66,0), var(--bottom)); pointer-events: none; }
.begin-bar > div { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.begin-bar .total { text-align: center; font-size: 13px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.begin-bar .total b { color: #fff; font-weight: 400; }

/* Tabs */
.tabs { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(23,46,66,.92); border: 1px solid rgba(133,214,201,.25); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); z-index: 10; }
.tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 88px; padding: 7px 0 6px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.tabs button svg { font-size: 22px; }
.tabs button[aria-current="page"] { background: rgba(255,255,255,.12); color: var(--accent); }

/* The breathing circle */
.circle { position: relative; aspect-ratio: 1; width: 100%; }
.circle > * { position: absolute; inset: 0; border-radius: 50%; }
.circle .ring { border: 1.5px solid rgba(133,214,201,.18); }
.circle .glow { background: rgba(133,214,201,.18); filter: blur(calc(var(--size, 300px) * .08)); }
.circle .core { background: radial-gradient(circle, rgba(133,214,201,.95), rgba(133,214,201,.45) 70%); }
.circle .big { display: grid; place-items: center; color: var(--top); font: 300 56px/1 ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif; font-variant-numeric: tabular-nums; }

/* Full-screen players (session, journey) */
.overlay { position: fixed; inset: 0; z-index: 50; background: linear-gradient(var(--top), var(--bottom)); display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); user-select: none; -webkit-user-select: none; }
.overlay .bar { display: flex; align-items: center; gap: 12px; }
.overlay .bar .grow { flex: 1; }
.round-button { width: 44px; height: 44px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 18px; }
.overlay .center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.overlay .title { font-size: 30px; font-weight: 500; text-align: center; min-height: 1.3em; }
.overlay .circle { width: min(70vmin, 440px); }
.overlay .footer { text-align: center; font-size: 15px; color: var(--secondary); min-height: 1.4em; font-variant-numeric: tabular-nums; }
.overlay .footer.accent { color: var(--accent); }
.overlay .play { width: 72px; height: 72px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 26px; margin: 16px auto 8px; }
.remaining { font-weight: 600; color: var(--secondary); font-variant-numeric: tabular-nums; }
.progress-text { color: var(--secondary); font-size: 15px; }

/* Projector: in full screen everything grows with the room */
.overlay:fullscreen .circle { width: min(62vmin, 900px); }
.overlay:fullscreen .title { font-size: clamp(30px, 5vmin, 64px); }
.overlay:fullscreen .circle .big { font-size: clamp(56px, 11vmin, 150px); }
.overlay:fullscreen .footer { font-size: clamp(15px, 2.4vmin, 28px); }

.overlay > * { transition: opacity 2.5s ease; }
.overlay.resting > .bar, .overlay.resting > .footer, .overlay.resting > .play, .overlay.resting > .hint { opacity: 0; pointer-events: none; }
/* Paused from the lock screen during the rest: the way back in. */
.overlay.resting.paused > .play { opacity: 1; pointer-events: auto; }
.overlay .title { transition: opacity 1.2s ease; }
.overlay .title.changing { opacity: 0; }
.rest-finish { position: absolute; left: 50%; bottom: max(44px, calc(env(safe-area-inset-bottom) + 24px)); transform: translateX(-50%); min-height: 44px; padding: 0 24px; border-radius: 999px; background: var(--card); font-size: 15px; color: var(--secondary); opacity: 0; }
.rest-finish.on { opacity: 1; }
.from-rest { animation: from-rest 2.5s ease; }
@keyframes from-rest { from { opacity: 0; } }
.done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.done h2 { font-size: 34px; margin: 0; }
.holds { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.holds div { background: var(--card); border-radius: 12px; padding: 8px 12px; }
.holds b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.holds span { font-size: 11px; color: var(--secondary); }

.scrub { width: min(560px, 100%); margin: 0 auto; }
.scrub .times { display: flex; justify-content: space-between; font-size: 13px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.transport { display: flex; align-items: center; justify-content: center; gap: 44px; margin: 18px 0 24px; font-size: 30px; }
.transport .play { margin: 0; width: 80px; height: 80px; }

/* Sheets and dialogs */
.backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: min(640px, 100%); max-height: 92vh; overflow: auto; background: var(--top); border-radius: 22px 22px 0 0; padding: 18px 20px 32px; }
@media (min-width: 700px) { .backdrop { align-items: center; } .sheet { border-radius: 22px; max-height: 86vh; } }
.sheet .sheet-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pill-button { padding: 8px 16px; border-radius: 999px; background: var(--card); }
.safety h2 { font-size: 28px; margin: 8px 0 10px; }
.safety ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.safety li { position: relative; padding-left: 16px; }
.safety li::before { content: ""; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: rgba(133,214,201,.7); }
.safety .block { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.agree { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--card); border-radius: 16px; padding: 14px; margin-top: 28px; font-size: 15px; width: 100%; }
.agree.on { background: var(--card-selected); }
.agree svg { font-size: 22px; color: var(--secondary); margin-top: 1px; }
.agree.on svg { color: var(--accent); }
.dialog { background: var(--bottom); border-radius: 18px; padding: 20px; width: min(340px, 92vw); margin: auto; text-align: center; }
.dialog h3 { margin: 0 0 16px; }
.dialog .stack button { padding: 13px; border-radius: 12px; background: var(--card); font-weight: 600; }
.dialog .danger { color: #ff8a80; }
.popover { position: absolute; top: 70px; left: 20px; right: 20px; max-width: 420px; background: var(--bottom); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 16px; z-index: 60; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.hint { position: fixed; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 12px; color: rgba(255,255,255,.35); pointer-events: none; }
@media (hover: none) { .hint { display: none; } }
@media (max-width: 420px) { .tabs button { width: 78px; } }
@media (max-width: 340px) { .tabs button { width: 70px; } }

/* The free taster page */
.free .chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.free .chip { padding: 8px 14px; border-radius: 999px; background: var(--card-selected); font-size: 15px; }
.free a.primary { text-decoration: none; }

/* A gift year ending soon */
.access-note { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: -6px 0 22px; padding: 12px 16px; border-radius: 14px; background: var(--card-selected); color: #fff; text-decoration: none; font-size: 15px; }
.access-note b { color: var(--accent); font-weight: 600; }

/* Links at the bottom of each screen */
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; margin-top: 28px; }
.links .link { margin: 0; }

/* First-use tour */
.tour { align-items: center; }
.tour .bar { width: 100%; min-height: 44px; }
.tour-card { flex: 1; width: min(520px, 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 0 12px; }
.tour-card h2 { font-size: 28px; margin: 10px 0 0; }
.tour-card p { color: var(--secondary); margin: 0; font-size: 18px; }
.tour-card p.tour-kicker { color: var(--accent); font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.tour-visual { width: 120px; height: 120px; border-radius: 50%; background: var(--card-selected); color: var(--accent); display: grid; place-items: center; font-size: 46px; }
.tour-visual:has(.tour-breath) { background: none; width: 170px; height: 170px; }
.tour-card .stack, .tour-card .steps { width: 100%; text-align: left; margin-top: 6px; }
.tour-dots { display: flex; gap: 8px; margin: 20px 0; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.25); }
.tour-dots i.on { background: var(--accent); }
.tour-actions { width: min(520px, 100%); display: flex; flex-direction: column; align-items: center; }
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 14px; padding: 12px 14px; font-size: 16px; }
.steps .step-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--card-selected); color: var(--accent); display: grid; place-items: center; font-size: 22px; flex: none; }

/* My sessions */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 18px; }
.title-row h1 { margin: 0; }
.adjusting { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; padding: 10px 16px; border-radius: 14px; background: var(--card-selected); font-size: 15px; color: var(--secondary); }
.adjusting button { color: var(--accent); font-weight: 500; }
.empty { text-align: center; padding-top: 18vh; }
.empty p { color: var(--secondary); font-size: 20px; margin: 0 0 20px; }
.empty .primary { width: auto; display: inline-block; padding: 12px 24px; }
.details { display: flex; flex-direction: column; gap: 12px; }
.details div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.details span { color: var(--secondary); }
.details b { font-weight: 400; text-align: right; }
.saved-actions { display: flex; justify-content: center; gap: 28px; margin-top: 18px; font-size: 15px; font-weight: 500; color: var(--accent); }
.saved-actions .danger { color: #ff8a80; }
.dialog form, form.dialog .stack { margin-top: 0; }
.name-input { display: block; width: 100%; margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: #fff; font: inherit; font-size: 17px; user-select: text; -webkit-user-select: text; }
.dialog .stack button[type=submit] { background: var(--accent); color: var(--top); }
.toast { position: fixed; top: max(16px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 90; padding: 10px 18px; border-radius: 999px; background: var(--bottom); font-size: 15px; font-weight: 500; white-space: nowrap; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.save-session { display: block; margin: 0 auto 14px; padding: 10px 18px; font-weight: 600; color: var(--accent); }
.save-session:disabled { color: var(--secondary); cursor: default; }

/* Only in the private test copy */
.test-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: calc(env(safe-area-inset-top) + 2px) 8px 2px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: #fff; background: #d8344c; pointer-events: none; }
/* Only the test copy has the banner: everything at the top moves down to clear it. */
.diary { width: 100%; max-height: 32vh; overflow: auto; margin: 0; padding: 10px; border-radius: 10px; background: var(--card); color: var(--secondary); font-size: 11px; text-align: left; white-space: pre-wrap; }
body:has(.test-banner) { padding-top: 22px; }
body:has(.test-banner) .overlay { padding-top: calc(max(16px, env(safe-area-inset-top)) + 22px); }
body:has(.test-banner) .toast { top: calc(max(16px, env(safe-area-inset-top)) + 22px); }
