/* Reflective Journal — warm pink, bold and calm.
   One big thing per screen: large type, plenty of space, very little text.
   Type is Apple's own: New York for words, SF Pro Rounded for controls.
   Nothing is downloaded (the CSP stays 'self'). */
:root {
  --bg: #fbeee8;
  --bg-glow: #f8d3d7;
  --surface: #ffffff;
  --ink: #2b1018;
  --ink-2: #5e3a44;
  --muted: #845e69;
  --line: #f0dad6;
  --accent: #b8264f;
  --accent-soft: #fbdde4;
  --primary: #d63a64;
  --primary-hi: #ef6f90;
  --primary-lo: #b8264f;
  --on-primary: #ffffff;
  --ok: #2f8a66;
  --warn: #c06a10;
  --bad: #c42c3f;
  --shadow: 0 1px 2px rgba(91, 24, 44, 0.06), 0 14px 34px -18px rgba(150, 40, 74, 0.32);
  --shadow-big: 0 34px 60px -26px rgba(184, 38, 79, 0.62);
  --orb-hi: #fff4f1;
  --orb-a: #f4a0b2;
  --orb-b: #d34b72;
  --speak-a: #f9c4ae;
  --speak-b: #e2806f;
  --orb-halo: rgba(239, 120, 148, 0.5);
  --orb-shadow: rgba(184, 38, 79, 0.45);
  --r-lg: 28px;
  --r-md: 20px;
  --serif: ui-serif, "New York", "Iowan Old Style", Palatino, Georgia, serif;
  --round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #170b10;
    --bg-glow: rgba(214, 70, 110, 0.16);
    --surface: #24131a;
    --ink: #fff0f2;
    --ink-2: #ecc9d1;
    --muted: #b8919b;
    --line: #3a222b;
    --accent: #ff8aa6;
    --accent-soft: #3a1823;
    --primary: #c93d66;
    --primary-hi: #e0668a;
    --primary-lo: #a82a52;
    --on-primary: #ffffff;
    --ok: #6fd3a8;
    --warn: #f2b05e;
    --bad: #ff8a8a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 16px 34px -18px rgba(0, 0, 0, 0.7);
    --shadow-big: 0 34px 60px -26px rgba(201, 61, 102, 0.5);
    --orb-hi: #ffe3e8;
    --orb-a: #ee93a7;
    --orb-b: #b23c62;
    --speak-a: #f2b39c;
    --speak-b: #c06c60;
    --orb-halo: rgba(240, 120, 150, 0.3);
    --orb-shadow: rgba(240, 110, 140, 0.32);
  }
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 18px/1.5 var(--round);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
/* One soft rose glow in the top corner, fixed while the page scrolls. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(110% 55% at 100% 0%, var(--bg-glow) 0%, transparent 62%), var(--bg);
}
p { margin: 0; }
.hidden { display: none !important; }
.booting { text-align: center; margin-top: 40vh; color: var(--muted); font: 26px var(--serif); }

.screen {
  max-width: 600px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 30px) 22px calc(env(safe-area-inset-bottom) + 130px);
}

/* ---------- type ---------- */
.eyebrow {
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 46px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}
.hero { margin: 0 2px 34px; }
.hero-title { font-size: clamp(52px, 15vw, 68px); line-height: 0.96; letter-spacing: -0.03em; }
.hero-title em { font-style: italic; font-weight: 500; color: var(--accent); }
.top { display: flex; align-items: flex-end; gap: 12px; margin: 0 2px 28px; }
.top.stack { flex-direction: column; align-items: flex-start; gap: 4px; }
.count {
  font: 800 15px/1 var(--round);
  color: var(--on-primary);
  background: var(--primary);
  padding: 7px 12px;
  border-radius: 999px;
  margin-bottom: 7px;
}
.sub { color: var(--muted); font-size: 17px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.empty { font-family: var(--serif); font-size: 26px; line-height: 1.3; color: var(--muted); margin: 4px 2px 30px; }

/* ---------- surfaces ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 22px;
  margin: 0 0 16px;
  box-shadow: var(--shadow);
}
.notice {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  border-radius: 18px;
  padding: 14px 18px;
  margin: -10px 0 24px;
}
.notice.soft { font-weight: 600; font-size: 16px; }

/* ---------- controls ---------- */
.ic {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: var(--accent-soft);
  color: var(--accent);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  border-radius: 999px;
  padding: 14px 22px;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.15s ease, opacity 0.2s ease, background-color 0.2s ease;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn .ic { width: 21px; height: 21px; }
.btn.primary {
  color: var(--on-primary);
  background: linear-gradient(145deg, var(--primary-hi), var(--primary) 45%, var(--primary-lo));
  box-shadow: 0 14px 26px -14px var(--primary-lo);
}
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--bad) 35%, transparent); }
.btn.wide { width: 100%; }
.btn.big { width: 100%; min-height: 66px; font-size: 21px; }
.icon-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  touch-action: manipulation;
}
.icon-btn .ic { width: 22px; height: 22px; }
.icon-btn:active:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.icon-btn:disabled { opacity: 0.25; cursor: default; }
.icon-btn.danger { color: var(--bad); }
.btn:focus-visible, .tab:focus-visible, .entry:focus-visible, .back:focus-visible, .icon-btn:focus-visible, .start-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 50%, transparent);
  outline-offset: 3px;
}
textarea, input[type="password"], input[type="text"], select {
  width: 100%;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background-color: var(--bg);
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 14px 16px;
  margin: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}
textarea { resize: vertical; min-height: 108px; font-family: var(--serif); line-height: 1.45; }
select {
  appearance: none;
  -webkit-appearance: none;
  font-weight: 700;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5l5.5 5.5 5.5-5.5' fill='none' stroke='%23d63a64' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}

/* ---------- home ---------- */
.start { display: flex; flex-direction: column; align-items: center; margin: 4px 0 32px; }
.start-btn {
  position: relative;
  width: min(66vw, 260px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  color: var(--on-primary);
  font: 800 42px/1 var(--round);
  letter-spacing: 0.01em;
  background: radial-gradient(circle at 32% 26%, var(--primary-hi) 0%, var(--primary) 50%, var(--primary-lo) 100%);
  box-shadow: var(--shadow-big), inset 0 -16px 36px -14px rgba(90, 8, 34, 0.38);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.18s ease;
}
.start-btn::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--primary) 40%, transparent);
  animation: ripple 3.4s ease-out infinite;
}
.start-btn:active:not(:disabled) { transform: scale(0.96); }
.start-btn:disabled {
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: none;
  cursor: default;
}
.start-btn:disabled::before { display: none; }
@keyframes ripple {
  0% { transform: scale(0.94); opacity: 0.9; }
  100% { transform: scale(1.14); opacity: 0; }
}
.start-meta { margin-top: 26px; font-size: 17px; font-weight: 700; color: var(--ink-2); text-align: center; }
.start-empty { margin-top: 24px; display: grid; justify-items: center; gap: 14px; }
.start-empty p { font-family: var(--serif); font-size: 24px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 40px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 700;
  padding: 9px 16px 9px 13px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.chip-bad { color: var(--bad); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.chip-ok .dot, .st-ok .dot { background: var(--ok); }
.chip-warn .dot, .st-warn .dot { background: var(--warn); }
.chip-bad .dot, .st-bad .dot { background: var(--bad); }
.say .eyebrow { text-align: center; }
.say-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.say-item {
  display: grid;
  place-items: center;
  min-height: 74px;
  padding: 14px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.25;
  color: var(--ink-2);
  text-align: center;
}

/* ---------- bottom tabs ---------- */
.tabs {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(env(safe-area-inset-bottom) + 12px);
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 6px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-radius: 30px;
  box-shadow: 0 18px 40px -18px rgba(91, 24, 44, 0.45);
  z-index: 5;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 8px 2px 7px;
  min-height: 60px;
  border-radius: 24px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.tab.active { background: var(--primary); color: var(--on-primary); }

/* ---------- questions ---------- */
.qlist { list-style: none; padding: 0; margin: 0 0 24px; }
.q { display: flex; gap: 14px; padding: 18px 2px 12px; border-bottom: 1px solid var(--line); }
.q:first-child { padding-top: 2px; }
.q .num { flex: 0 0 38px; font: 600 36px/1 var(--serif); color: var(--accent); }
.q-body { flex: 1; min-width: 0; }
.q-text { font-family: var(--serif); font-size: 20px; line-height: 1.42; overflow-wrap: anywhere; }
.q-tools { display: flex; justify-content: flex-end; gap: 2px; margin: 4px -10px 0 0; }
.q.editing textarea { margin-bottom: 12px; }
.row-actions { display: flex; gap: 10px; }
.card.add { display: grid; gap: 14px; }

/* ---------- journal ---------- */
.entries { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.entry {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  color: var(--ink);
  border: 0;
  border-radius: var(--r-lg);
  padding: 18px 20px 18px 16px;
  font: inherit;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.entry:active { transform: scale(0.985); }
.entry-day { flex: 0 0 52px; display: grid; justify-items: center; }
.entry-day b { font: 600 42px/0.95 var(--serif); color: var(--accent); }
.entry-day small { margin-top: 5px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.entry-main { display: grid; gap: 6px; min-width: 0; padding-top: 2px; }
.entry-when { font-size: 17px; font-weight: 800; }
.entry-preview {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16.5px;
  line-height: 1.4;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.entry-status { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--muted); }
.back {
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  padding: 6px 0;
  min-height: 44px;
  cursor: pointer;
}
.detail .top { margin-bottom: 24px; }

/* three steps: iPhone → backup → iCloud */
.track {
  list-style: none;
  margin: 0 0 36px;
  padding: 20px 6px 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.step { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center; }
.step + .step::before {
  content: '';
  position: absolute;
  top: 16px;
  right: calc(50% + 22px);
  width: calc(100% - 44px);
  height: 2px;
  border-radius: 2px;
  background: var(--line);
}
.st-ok + .st-ok::before { background: var(--primary); }
.step-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--on-primary);
  box-shadow: inset 0 0 0 2px var(--line);
}
.st-ok .step-dot { background: var(--primary); box-shadow: none; }
.st-warn .step-dot { box-shadow: inset 0 0 0 3px var(--warn); }
.st-bad .step-dot { box-shadow: inset 0 0 0 3px var(--bad); }
.step-dot .ic { width: 18px; height: 18px; stroke-width: 2.8; }
.step-k { margin-top: 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.step-v { padding: 0 4px; font-size: 13.5px; line-height: 1.3; color: var(--muted); text-wrap: balance; }

.qa-list { display: grid; gap: 34px; margin: 0 0 34px; }
.qa { display: flex; gap: 14px; }
.qa-n { flex: 0 0 34px; font: 600 36px/1 var(--serif); color: var(--accent); }
.qa-body { min-width: 0; }
.qa-q { font: 600 21px/1.36 var(--serif); margin: 2px 0 12px; }
.qa-a p { font-family: var(--serif); font-size: 18.5px; line-height: 1.7; color: var(--ink-2); margin: 0 0 10px; overflow-wrap: anywhere; }
.qa-a p.qa-note { font-style: italic; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.more { border-top: 1px solid var(--line); padding-top: 4px; }
.more summary {
  list-style: none;
  cursor: pointer;
  font-weight: 800;
  color: var(--accent);
  padding: 12px 0;
}
.more summary::-webkit-details-marker, .diag summary::-webkit-details-marker { display: none; }
.more summary::after, .diag summary::after { content: '›'; display: inline-block; margin-left: 8px; transition: transform 0.2s ease; }
.more[open] summary::after, .diag[open] summary::after { transform: rotate(90deg); }
.more .rows { margin: 4px 0 18px; }
.more-fu { margin-bottom: 20px; }
.fu-list { margin: 0; padding-left: 20px; font-family: var(--serif); color: var(--ink-2); }
.fu-list li + li { margin-top: 8px; }
.rows .row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.rows .row:last-of-type { border-bottom: 0; }
.rows .k { flex: none; color: var(--muted); }
.rows .v { text-align: right; font-weight: 700; overflow-wrap: anywhere; }

/* ---------- settings ---------- */
.settings .card > .eyebrow { margin-bottom: 18px; }
.field { display: block; margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: block; margin-bottom: 8px; font-size: 16px; font-weight: 800; }
.card > .btn { margin-top: 4px; }
.rows > .btn { margin-top: 14px; }
.big-num { font: 600 44px/1.05 var(--serif); letter-spacing: -0.02em; margin: 0 0 6px; }
.big-num.warn { color: var(--warn); }
.big-num.bad { color: var(--bad); }
.credit-row { display: grid; grid-template-columns: 1fr 96px auto; gap: 8px; margin-top: 18px; }
.credit-row select { padding-right: 30px; background-position: right 12px center; }
.meter { height: 14px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; margin-bottom: 10px; }
.meter-bar { height: 100%; width: 0; border-radius: inherit; background: color-mix(in srgb, var(--muted) 50%, transparent); transition: width 90ms linear; }
.meter-bar.on { background: linear-gradient(90deg, var(--primary-hi), var(--primary)); }
#mic-info { margin-bottom: 12px; }
.diag { margin-top: 10px; }
.diag summary { list-style: none; cursor: pointer; font-weight: 800; color: var(--muted); padding: 12px 0 4px; }
.log { font: 11.5px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); margin: 8px 0 0; max-height: 300px; overflow: auto; }
.setup .card { display: grid; gap: 14px; }
.form-msg { min-height: 1.4em; font-weight: 700; color: var(--accent); }
.form-msg:empty { display: none; }

/* ---------- session: one glanceable screen, an orb that breathes while it listens ---------- */
.session {
  --halo: clamp(160px, 25vh, 232px);
  --orb: clamp(108px, 17vh, 152px);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: calc(env(safe-area-inset-top) + 18px);
  padding-bottom: calc(env(safe-area-inset-bottom) + 22px);
  text-align: center;
}
/* long questions: a smaller orb leaves room for the words */
.session:has(.session-question[data-len="l"]), .session:has(.session-question[data-len="xl"]) {
  --halo: clamp(120px, 18vh, 180px);
  --orb: clamp(84px, 12.5vh, 118px);
}
.session-top { display: grid; justify-items: center; gap: 10px; min-height: 64px; }
.progress { display: flex; align-items: baseline; gap: 6px; }
.progress:empty { visibility: hidden; }
.progress-k { margin-right: 4px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.progress b { font: 600 36px/1 var(--serif); }
.progress-of { font: 500 21px/1 var(--serif); color: var(--muted); }
.fu-tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-primary);
  background: var(--primary);
  padding: 5px 12px;
  border-radius: 999px;
}
.orb-wrap { position: relative; display: grid; place-items: center; height: calc(var(--halo) + 16px); margin: 4px 0 2px; }
.orb-halo, .orb { grid-area: 1 / 1; border-radius: 50%; }
.orb-halo {
  width: var(--halo);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--orb-halo), transparent);
  animation: breathe 7s ease-in-out infinite;
}
.orb {
  --lv: 0;
  width: var(--orb);
  aspect-ratio: 1;
  background: radial-gradient(circle at 34% 28%, var(--orb-hi) 0%, var(--orb-a) 42%, var(--orb-b) 100%);
  box-shadow: 0 24px 46px -18px var(--orb-shadow), inset 0 -12px 28px -10px rgba(140, 30, 66, 0.28);
  transform: scale(calc(0.92 + 0.24 * var(--lv)));
  transition: transform 140ms ease-out, filter 0.6s ease;
  will-change: transform;
}
@keyframes breathe {
  0%, 100% { transform: scale(0.84); opacity: 0.55; }
  50% { transform: scale(1.06); opacity: 0.95; }
}
.session[data-state="speaking"] .orb { --orb-a: var(--speak-a); --orb-b: var(--speak-b); }
.session[data-state="speaking"] .orb-halo { animation-duration: 2.8s; }
.session[data-state="processing"] .orb-halo,
.session[data-state="finishing"] .orb-halo,
.session[data-state="saving"] .orb-halo { animation-duration: 1.8s; }
.session[data-state="paused"] .orb { filter: saturate(0.2) brightness(1.03); }
.session[data-state="paused"] .orb-halo { animation: none; opacity: 0.25; transform: scale(0.9); }
.session[data-state="done"] .orb-halo { animation: none; opacity: 0.8; }
.session.in-speech .orb { filter: saturate(1.15) brightness(1.04); }

.session-state {
  font: 800 40px/1.1 var(--round);
  letter-spacing: -0.01em;
  margin: 2px 0 14px;
  min-height: 1.1em;
  transition: color 0.4s ease;
}
.session-state[data-state="listening"] { color: var(--accent); }
.session-state[data-state="paused"] { color: var(--muted); }
.session-question {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.28;
  max-width: 22ch;
  margin: 0 auto 28px;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.session-question[data-len="m"] { font-size: 26px; max-width: 25ch; }
.session-question[data-len="l"] { font-size: 22.5px; line-height: 1.36; max-width: 30ch; }
.session-question[data-len="xl"] { font-size: 20px; line-height: 1.4; max-width: 34ch; }
.session-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }
.btn.act {
  flex-direction: column;
  gap: 4px;
  min-height: 74px;
  padding: 10px;
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.btn.act .ic { width: 24px; height: 24px; color: var(--accent); }
.btn.act.finish { color: var(--on-primary); background: linear-gradient(145deg, var(--primary-hi), var(--primary) 45%, var(--primary-lo)); }
.btn.act.finish .ic { color: var(--on-primary); }
#resume-btn { margin-top: auto; }
.session-done { margin-top: auto; display: grid; gap: 10px; }

.flash {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 104px);
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: var(--shadow);
  z-index: 10;
  animation: toast 0.25s ease-out both;
}
@keyframes toast {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* a gentle rise when a screen opens (only when the screen changes, not on refresh) */
.screen.enter > :not(.tabs) { animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.screen.enter > :nth-child(2) { animation-delay: 0.05s; }
.screen.enter > :nth-child(3) { animation-delay: 0.1s; }
.screen.enter > :nth-child(4) { animation-delay: 0.15s; }
.screen.enter > :nth-child(5) { animation-delay: 0.2s; }
.screen.enter > :nth-child(n + 6) { animation-delay: 0.25s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
