/* Rise: warm dawn on a night sky. Phone-first, big targets, plain words. No red anywhere. */
:root {
  --night: #0c1222;
  --night-2: #141d33;
  --card: rgba(26, 36, 62, 0.78);
  --card-2: rgba(36, 48, 80, 0.85);
  --line: rgba(255, 214, 150, 0.14);
  --line-2: rgba(255, 214, 150, 0.32);
  --gold: #f2b35b;
  --gold-hi: #ffd79a;
  --gold-soft: rgba(242, 179, 91, 0.16);
  --ink: #f6f1e8;
  --ink-2: #d2cbbd;
  --muted: #9a9fae;
  --green: #8fcba3;
  --green-soft: rgba(143, 203, 163, 0.15);
  --sky: #a9c4ff;
  --serif: 'Iowan Old Style', 'Palatino', 'Georgia', serif;
  --body: -apple-system, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  --r: 18px;
  --tabs-h: 66px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--night); color: var(--ink);
  font: 17px/1.45 var(--body); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
  padding-bottom: calc(var(--tabs-h) + var(--sab) + 16px);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
a { color: var(--gold-hi); }

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(180deg, #0a1020 0%, var(--night-2) 55%, #2a2433 100%); }
.sun { position: absolute; left: 50%; bottom: -260px; width: 620px; height: 520px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(242,179,91,.30), rgba(242,140,91,.10) 55%, transparent 75%); filter: blur(10px); }

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--sat) + 10px) 16px 10px; background: rgba(12,18,34,.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.wordmark { display: flex; align-items: center; gap: 10px; }
.wordmark h1 { margin: 0; font: 600 21px/1 var(--serif); letter-spacing: .24em; }
.mark { width: 16px; height: 8px; border-radius: 16px 16px 0 0; background: var(--gold); box-shadow: 0 0 14px rgba(242,179,91,.7); }
.topdate { color: var(--ink-2); font-size: 14px; text-align: right; }

main { max-width: 640px; margin: 0 auto; padding: 14px 16px 24px; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 6px 12px calc(var(--sab) + 6px); background: rgba(12,18,34,.94); border-top: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.tabs button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-height: 54px; padding: 4px 0; color: var(--muted); font-size: 12px; border-radius: 14px; }
.tabs svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-current="page"] { color: var(--ink); background: var(--gold-soft); }
.tabs button[aria-current="page"] svg { stroke: var(--gold-hi); }

.hello { font: 600 28px/1.15 var(--serif); margin: 8px 0 14px; }
h2.screen-title { font: 600 30px/1.1 var(--serif); margin: 8px 0 6px; }
.sub { color: var(--ink-2); margin: 0 0 16px; }
h3.slot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 26px 0 10px;
  font: 600 15px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); }
h3.slot small { font: 400 14px var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); text-align: right; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

section, article { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0 0 12px; }
.verse { background: linear-gradient(160deg, rgba(242,179,91,.14), rgba(26,36,62,.8)); border-color: var(--line-2); }
.verse-text { font: 400 21px/1.45 var(--serif); margin: 0 0 10px; }
.verse-ref { margin: 0; color: var(--gold-hi); font-size: 14px; letter-spacing: .04em; }
.coach { border-left: 4px solid var(--gold); }
.coach p { margin: 0; font-size: 18px; }
.coach-done { border-left-color: var(--green); background: var(--green-soft); }
.coach-welcome, .coach-first { border-left-color: var(--sky); }
.offer { border-color: var(--line-2); background: var(--gold-soft); }
.offer p { margin: 0 0 6px; }

.move-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.move h3 { margin: 0; font: 600 20px/1.2 var(--body); }
.lvl { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.range { font: 600 18px/1 var(--body); color: var(--gold-hi); white-space: nowrap; padding-top: 3px; }
.how { margin: 10px 0 0; color: var(--ink-2); }
.note { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.log-row { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.stepper { display: flex; align-items: center; background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; }
.stepper output { min-width: 64px; text-align: center; font: 600 22px/1 var(--body); }
.step { width: 52px; height: 52px; border: 0; background: none; font-size: 26px; color: var(--gold-hi); border-radius: 14px; }
.go { flex: 1; min-height: 52px; border: 0; border-radius: 14px; background: var(--gold); color: #24180a; font-weight: 700; font-size: 18px; padding: 0 18px; }
.go:active { transform: scale(.98); }
.ghost { min-height: 48px; border: 1px solid var(--line-2); border-radius: 14px; background: transparent; color: var(--ink); padding: 0 16px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.sm { min-height: 40px; padding: 0 14px; font-size: 15px; flex: 0 0 auto; }
.link { background: none; border: 0; color: var(--gold-hi); text-decoration: underline; padding: 8px; margin-left: auto; }
.btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.btns .go { flex: 1 1 140px; }
.move.done { background: var(--green-soft); border-color: rgba(143,203,163,.3); }
.done-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 18px; }
.check { width: 26px; height: 26px; border-radius: 50%; background: var(--green); flex: 0 0 auto; position: relative; }
.check::after { content: ''; position: absolute; left: 9px; top: 5px; width: 6px; height: 12px; border: solid #0c1a12; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.focus-step { margin: 0; font-size: 19px; }
.focus.is-done { background: var(--green-soft); }
.tally { text-align: center; color: var(--ink-2); margin: 22px 0 6px; }
.foot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 26px 0 8px; font-size: 14px; }
.foot a { color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; }

.ladder h3 { margin: 0 0 8px; font: 600 19px/1.2 var(--body); }
.ladder ol { list-style: none; margin: 0; padding: 0; }
.ladder li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ladder li:first-child { border-top: 0; }
.ladder li p { margin: 4px 0 0; color: var(--ink-2); }
.ladder li.cur strong { color: var(--gold-hi); }
.ladder li.past { opacity: .75; }
.pill { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-hi); border: 1px solid var(--line-2); white-space: nowrap; }
.why p { margin: 0; color: var(--ink-2); }

.area { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 10px; padding: 0 16px; }
.area summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 56px; font: 600 19px/1 var(--body); cursor: pointer; }
.area summary::-webkit-details-marker { display: none; }
.area[open] { padding-bottom: 14px; }
.ask { margin: 0 0 10px; color: var(--ink-2); font-family: var(--serif); font-size: 18px; }
textarea { width: 100%; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 17px; resize: vertical; }
.weekly label { display: block; margin: 0 0 14px; color: var(--ink-2); }
.weekly label textarea { margin-top: 6px; }
.filebtn { cursor: pointer; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--sab) + 14px); transform: translateX(-50%); z-index: 40;
  background: #2a3555; color: var(--ink); border: 1px solid var(--line-2); padding: 12px 18px; border-radius: 14px; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.cheer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; pointer-events: none; }
.cheer p { position: absolute; font: 600 30px/1 var(--serif); color: var(--gold-hi); opacity: 0; }
.cheer-ring { width: 120px; height: 120px; border-radius: 50%; border: 6px solid var(--gold); opacity: 0; }
.cheer.go .cheer-ring { animation: ring 1.6s ease-out forwards; }
.cheer.go p { animation: word 2.2s ease-out forwards; }
@keyframes ring { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(6); opacity: 0; } }
@keyframes word { 0% { opacity: 0; transform: translateY(10px); } 20%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cheer.go .cheer-ring { animation: none; } .cheer.go p { animation: word 2.2s linear forwards; } }

.plan { margin: -4px 0 12px; color: var(--ink-2); font-family: var(--serif); font-size: 17px; }
.tip { margin: 4px 2px 12px; color: var(--muted); font-size: 14px; }
.checkin { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.wide { width: 100%; }
.link.quiet { color: var(--muted); margin: 0; font-size: 14px; }
.past-week { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.past-week p { margin: 4px 0; color: var(--ink-2); }
