/* Bead — paper and ink, one accent, liquid beads. Shared tokens and components.
   Exercise styles live in css/ex/<id>.css; the rippling hero bead in css/liquid.css. */

@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-latin-400-normal.woff2') format('woff2');
  font-display: swap;
}

:root {
  --paper: #F4F2ED;
  --paper-2: #FBFAF7;
  --paper-3: #E9E6DF;
  --ink: #1C1B1A;
  --ink-2: #6B675F;
  --ink-3: #B3AEA5;
  --line: #DDD8CF;
  --slot: #CFC9BF;
  --accent: #C2402C;
  --stage: #111110;
  --stage-2: #171615;
  --stage-ink: #EEEBE5;
  --stage-dim: #8C877F;
  --stage-faint: #57544F;
  --stage-line: #2E2C29;
  --ok: #4FD18B;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'SF Pro Text', Roboto, 'Segoe UI', 'PingFang SC', 'Noto Sans CJK SC', sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bead-edge: transparent;     /* a faint rim on the small beads, only on dark paper */

  /* The progress look (merged mockup): one accent, vermilion. It marks only the step you are on and the seals
     you earned. --seal is the seal ink; --st-accent the accent on the dark stage. */
  --seal: #B5382A;
  --st-accent: #E05A44;
  --halo-tint: rgba(194, 64, 44, 0.08);
  --ghost: rgba(28, 27, 26, 0.035);            /* a blank seal's face */
  --emboss: rgba(255, 255, 255, 0.85);         /* the light edge of a blind impression */
  --seal-blend: multiply;
  --card: rgba(251, 250, 247, 0.74);
  --card-edge: rgba(28, 27, 26, 0.07);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 1px 2px rgba(28, 27, 26, 0.05), 0 18px 36px -24px rgba(28, 27, 26, 0.35);
  --glass: rgba(255, 255, 255, 0.46);          /* the frosted pane over the next material */
  --glass-2: rgba(255, 255, 255, 0.1);
  --glass-edge: rgba(255, 255, 255, 0.9);
  --glass-shadow: rgba(28, 27, 26, 0.18);
  --bead-drop: rgba(28, 27, 26, 0.28);         /* the small shadow under a material bead */
  /* paper: a soft sheen at the top, long fibres, fine grain */
  --sheen: rgba(255, 255, 255, 0.55);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .11 0 0 0 0 .1 0 0 0 0 .09 0 0 0 .4 -.165'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  --fiber: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .011' numOctaves='4' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .31 0 0 0 0 .25 0 0 0 .3 -.135'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23f)'/%3E%3C/svg%3E");
  --grain-stage: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .3 -.12'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

/* Dark paper: the phone's setting (no data-theme), or Settings → Dark (data-theme='dark'). Keep the two blocks equal. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #171615; --paper-2: #1F1E1C; --paper-3: #262421;
    --ink: #ECE8E1; --ink-2: #A19C93; --ink-3: #5F5B55; --line: #2E2C29; --slot: #4A4641;
    --accent: #E05A44;
    --bead-edge: rgba(236, 232, 225, 0.2);
    --seal: #C9472F; --halo-tint: rgba(224, 90, 68, 0.1);
    --ghost: rgba(236, 232, 225, 0.025); --emboss: rgba(255, 255, 255, 0.05); --seal-blend: normal;
    --card: rgba(31, 30, 28, 0.78); --card-edge: rgba(236, 232, 225, 0.06);
    --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 18px 36px -22px rgba(0, 0, 0, 0.9);
    --glass: rgba(255, 255, 255, 0.1); --glass-2: rgba(255, 255, 255, 0.03); --glass-edge: rgba(255, 255, 255, 0.26); --glass-shadow: rgba(0, 0, 0, 0.5);
    --bead-drop: rgba(0, 0, 0, 0.55);
    --sheen: rgba(255, 255, 255, 0.025);
    --grain: var(--grain-stage);
    --fiber: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .011' numOctaves='4' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .9 0 0 0 0 .88 0 0 0 0 .84 0 0 0 .2 -.09'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23f)'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #171615; --paper-2: #1F1E1C; --paper-3: #262421;
  --ink: #ECE8E1; --ink-2: #A19C93; --ink-3: #5F5B55; --line: #2E2C29; --slot: #4A4641;
  --accent: #E05A44;
  --bead-edge: rgba(236, 232, 225, 0.2);
  --seal: #C9472F; --halo-tint: rgba(224, 90, 68, 0.1);
  --ghost: rgba(236, 232, 225, 0.025); --emboss: rgba(255, 255, 255, 0.05); --seal-blend: normal;
  --card: rgba(31, 30, 28, 0.78); --card-edge: rgba(236, 232, 225, 0.06);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 18px 36px -22px rgba(0, 0, 0, 0.9);
  --glass: rgba(255, 255, 255, 0.1); --glass-2: rgba(255, 255, 255, 0.03); --glass-edge: rgba(255, 255, 255, 0.26); --glass-shadow: rgba(0, 0, 0, 0.5);
  --bead-drop: rgba(0, 0, 0, 0.55);
  --sheen: rgba(255, 255, 255, 0.025);
  --grain: var(--grain-stage);
  --fiber: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .011' numOctaves='4' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .9 0 0 0 0 .88 0 0 0 0 .84 0 0 0 .2 -.09'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23f)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* The paper lives on <html> (the canvas), so its fibre and grain run the whole length of a long page. */
html {
  margin: 0; height: 100%; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  background-image: radial-gradient(120% 60% at 50% -6%, var(--sheen), transparent 62%), var(--fiber), var(--grain);
  background-repeat: no-repeat, repeat, repeat;
}
body { margin: 0; height: 100%; background: transparent; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { overscroll-behavior: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; }
.num { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); font-weight: 400; }
.muted { color: var(--ink-2); }
.fine { color: var(--ink-2); font-size: 12px; line-height: 1.55; margin: 0; }

/* ---------- pages (paper) ---------- */
.screen { min-height: 100dvh; display: flex; flex-direction: column; }
.page { flex: 1; display: flex; flex-direction: column; padding: calc(var(--safe-top) + 52px) 24px calc(var(--safe-bottom) + 32px); gap: 20px; }
.page-top { display: flex; justify-content: space-between; align-items: center; margin: 0 -12px; min-height: 44px; }
.icon-btn { width: 44px; height: 44px; border: none; background: transparent; display: inline-flex; align-items: center; justify-content: center; border-radius: 22px; }
.icon-btn svg { display: block; }
.title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1; letter-spacing: -0.3px; }
.title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sub { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.spacer { flex: 1; }

.btn { height: 54px; border-radius: 27px; border: 1px solid var(--ink); background: transparent; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 22px; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.block { width: 100%; }
.btn:active { transform: scale(0.98); }
.btn-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.link { border: none; background: transparent; color: var(--ink-2); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; padding: 10px 8px; }

.rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); font-size: 15px; }
.row .dim { color: var(--ink-2); font-size: 13px; }

.chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip { height: 44px; min-width: 56px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line); background: transparent; font-size: 15px; }
.chip[aria-pressed='true'] { border-color: var(--ink); background: var(--paper-2); }

.seg { display: inline-flex; padding: 3px; border-radius: 18px; background: var(--paper-3); }
.seg button { height: 30px; padding: 0 14px; border-radius: 15px; border: none; background: transparent; font-size: 13px; color: var(--ink-2); }
/* The pressed segment sits lighter than its track; in dark paper-2 is darker than paper-3, so it has its own token. */
:root { --seg-on: var(--paper-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { --seg-on: #35322E; } }
:root[data-theme='dark'] { --seg-on: #35322E; }
.seg button[aria-pressed='true'] { background: var(--seg-on); color: var(--ink); }

.card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--paper-2); }

/* the progress kit's shared pieces (merged mockup): a soft paper card, an eyebrow, the "same test" tag */
.card2 { background: var(--card); border: 1px solid var(--card-edge); border-radius: 22px; box-shadow: var(--card-shadow); }
.eb { margin: 0; font-size: 11px; line-height: 1.3; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
.same-tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 5px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); font-size: 11.5px; color: var(--ink-2); white-space: nowrap; flex: none; }
.same-tag svg { display: block; }

.scrim { position: fixed; inset: 0; background: rgba(28, 27, 26, 0.28); z-index: 20; }
:root[data-theme='dark'] .scrim { background: rgba(0, 0, 0, 0.5); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .scrim { background: rgba(0, 0, 0, 0.5); } }
.drawer { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; max-height: 80dvh; overflow: auto; background: var(--paper-2); border-radius: 24px 24px 0 0; padding: 12px 24px calc(var(--safe-bottom) + 28px); z-index: 21; box-shadow: 0 -8px 30px rgba(28, 27, 26, 0.12); display: flex; flex-direction: column; gap: 14px; }
.drawer .grip { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line); }

.big-num { font-size: 76px; font-weight: 200; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- the strand ring ---------- */
.slot-today { animation: slot-breathe 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes slot-breathe { 50% { opacity: 0.45; } }

/* ---------- stage (dark, exercises) ---------- */
.stage-screen { min-height: 100dvh; background: var(--stage); color: var(--stage-ink); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.stage-line { height: 1px; background: var(--stage-line); position: relative; margin-top: var(--safe-top); }
.stage-line i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--stage-ink); transition: width 0.2s linear; }
.stage-top { display: flex; justify-content: space-between; align-items: center; padding: 48px 20px 0; }
.stage-title { display: flex; flex-direction: column; gap: 2px; }
.stage-title small { font-size: 13px; color: var(--stage-dim); }
.stage-title span { font-size: 15px; }
.stage-pause { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #3A3835; background: transparent; display: flex; align-items: center; justify-content: center; }
.stage-hint { min-height: 1.4em; margin: 18px 20px 0; text-align: center; font-size: 17px; font-weight: 300; color: var(--stage-ink); }
.stage-body { flex: 1; display: flex; flex-direction: column; padding: 0 20px calc(var(--safe-bottom) + 28px); position: relative; }

/* the parts an exercise usually builds */
.stage-play { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; }
.stage-stim { flex: 1; display: flex; align-items: center; justify-content: center; }
.stage-controls { min-height: 45%; display: flex; flex-direction: column; justify-content: flex-end; }
.ctl-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; height: min(340px, 42vh); height: clamp(200px, 42dvh, 340px); }
.ctl-btn { border-radius: 22px; border: 1px solid var(--stage-line); background: var(--stage-2); color: var(--stage-dim); font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; touch-action: manipulation; }
.ctl-btn:active { background: #1E1D1B; }
.shake { animation: shake 0.15s ease-out; }
@keyframes shake { 25% { transform: translateX(-2px); opacity: 0.6; } 75% { transform: translateX(2px); } }
.pop { animation: pop 0.12s ease-out; }
@keyframes pop { 50% { transform: scale(1.06); } }

/* title card, interval card, pause */
.stage-card { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 0 28px; }
.stage-card small { font-size: 13px; color: var(--stage-dim); }
.stage-card .rule { font-size: 20px; font-weight: 300; line-height: 1.45; max-width: 320px; margin: 0; }
.stage-card .second { font-size: 15px; color: #B8B3AA; }
.stage-card .direction { font-size: 15px; margin-top: 22px; }
.stage-card .levelup { font-size: 20px; color: #E05A44; }
.stage-card .holds { font-size: 13px; color: var(--stage-dim); letter-spacing: 1px; }
.stage-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-bottom: calc(var(--safe-bottom) + 24px); }
.stage-foot .next { font-size: 15px; }
.stage-foot .bar { width: 120px; height: 2px; background: #2A2826; border-radius: 1px; overflow: hidden; }
.stage-foot .bar i { display: block; height: 100%; width: 0; background: var(--stage-dim); }
.stage-link { border: none; background: transparent; color: var(--stage-dim); font-size: 13px; padding: 10px; }
.stage-btn { height: 54px; min-width: 220px; border-radius: 27px; border: 1px solid var(--stage-ink); background: transparent; color: var(--stage-ink); font-size: 17px; }
.stage-btn.primary { background: var(--stage-ink); color: var(--stage); }

.overlay { position: absolute; inset: 0; background: rgba(17, 17, 16, 0.97); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; z-index: 5; }

.dot-breathe { width: 10px; height: 10px; border-radius: 50%; background: var(--stage-ink); animation: breathe 0.8s ease-in-out; }
@keyframes breathe { 50% { transform: scale(2.2); opacity: 0.5; } }

/* ---------- welcome / home / result / strand / reminder ---------- */
.center { text-align: center; }
.center-col { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.welcome { align-items: center; padding-top: calc(var(--safe-top) + 110px); }
.welcome-head { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.welcome-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1.08; letter-spacing: -0.5px; text-align: center; }
.welcome-bead { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 220px; }
.welcome-arc { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.welcome-foot { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.welcome .fine { font-size: 13px; }

.home { align-items: center; gap: 0; padding-top: calc(var(--safe-top) + 12px); padding-bottom: 0; }
.home-top { width: 100%; display: flex; justify-content: space-between; align-items: flex-start; font-size: 16px; }
.home-when { display: flex; flex-direction: column; gap: 3px; padding-top: 8px; min-width: 0; }
.home-when small { font-size: 13px; }
.home-gear { margin: 0 -12px 0 0; color: var(--ink); flex: none; }
.home-ring { --ring: min(300px, calc(100vw - 64px)); position: relative; width: var(--ring); height: var(--ring); margin-top: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.home-ring > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.home-label { display: flex; flex-direction: column; align-items: center; gap: 5px; margin-top: 12px; text-align: center; max-width: 320px; }
.home-label p { margin: 0; }
.home-n { font-size: 34px; line-height: 1; }
.home-cta { font-size: 15px; line-height: 1.4; color: var(--ink); }
.home-status { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.home-tomorrow { font-size: 15px; line-height: 1.45; color: var(--ink); }
.home-intro { font-size: 13px; line-height: 1.5; color: var(--ink-2); max-width: 280px; margin-top: 6px !important; }
.home-extra { font-size: 13px; line-height: 1.5; color: var(--ink-2); margin-top: 4px !important; }
.home-alt { display: flex; gap: 12px; justify-content: center; margin: -6px 0 -10px; }
.link.small { font-size: 13px; color: var(--ink-2); text-decoration-color: var(--ink-3); min-height: 44px; padding: 0 10px; }
/* The nav stays in reach at the bottom of a page that may scroll on short phones. */
.home-nav { position: sticky; bottom: 0; z-index: 3; width: calc(100% + 48px); margin: 0 -24px; padding: 8px 16px calc(var(--safe-bottom) + 10px); display: flex; justify-content: space-between; align-items: center; transition: background-color 0.2s, box-shadow 0.2s; }
.home-nav.is-floating { background-color: var(--paper); background-image: var(--grain); box-shadow: 0 -1px 0 var(--line), 0 -12px 24px -18px rgba(28, 27, 26, 0.35); }
.home-end { height: 1px; width: 100%; flex: none; }
.nav-link { border: none; background: transparent; font-size: 17px; min-height: 44px; padding: 10px 8px; color: var(--ink); display: inline-flex; align-items: center; gap: 7px; }

.result { align-items: stretch; gap: 14px; padding-top: calc(var(--safe-top) + 44px); padding-bottom: 0; }
.result > svg { align-self: center; flex: none; }
.result .fine { font-size: 13px; }
.result-actions { position: sticky; bottom: 0; z-index: 2; margin: 0 -24px; padding: 14px 24px calc(var(--safe-bottom) + 24px); background: linear-gradient(to bottom, transparent, var(--paper) 14px); }
.reminder { padding-bottom: 0; }
.result .status { margin: 0; font-size: 17px; }
.acc-btn { border: none; background: transparent; font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; min-height: 44px; }
.result .link { min-height: 44px; }
.qmark { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--ink-3); font-size: 11px; line-height: 15px; text-align: center; }
.row .right { text-align: right; min-width: 56px; }
.row4 { grid-template-columns: minmax(0, 1fr) 68px 68px 68px; }
.row3 { grid-template-columns: minmax(0, 1fr) 84px 84px; }
.row4 > span:not(:first-child), .row3 > span:not(:first-child) { text-align: right; }
.ci-two { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.ci-two small { font-size: 12px; color: var(--ink-2); }
.ci-lines { display: flex; flex-direction: column; gap: 6px; }
.ci-lines p { margin: 0; font-size: 15px; line-height: 1.45; }
.first-row .num.right, .first-row .right { text-align: right; }
.highlights { display: flex; flex-direction: column; gap: 4px; }
.highlight { margin: 0; font-size: 15px; }
.chips-label { font-size: 13px; margin-right: 4px; }
.highlight.accent { color: var(--accent); }
.note-input { width: 100%; height: 44px; border: none; border-bottom: 1px solid var(--line); background: transparent; font-size: 15px; outline: none; }
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-n { font-size: 32px; font-weight: 200; }
.stat-later { font-size: 17px; font-weight: 300; line-height: 38px; color: var(--ink-2); }
.moves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; border-top: 1px solid var(--line); }
.move { display: flex; justify-content: space-between; align-items: center; height: 44px; border-bottom: 1px solid var(--line); font-size: 15px; }
.board-line { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.board-line .muted { font-size: 13px; }
.btn-row.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.choices { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; }
.choice.on { border: 1.5px solid var(--ink); background: var(--paper-2); }
.choice-text { display: flex; flex-direction: column; gap: 2px; font-size: 17px; }
.choice-text small { font-size: 13px; }
.choice input { width: 20px; height: 20px; accent-color: var(--ink); }
.choice-group { border: 1.5px solid var(--ink); border-radius: 14px; background: var(--paper-2); }
.choice-group .choice { border: none; background: transparent; }
.choice-time { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px 12px; font-size: 15px; }
.time-input { height: 44px; min-width: 132px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 17px; font-variant-numeric: tabular-nums; }
.reminder-title { font-size: 36px; line-height: 1.1; margin-top: 44px; }

/* short phones (iPhone SE, small Android): smaller ring, less air, Done stays reachable */
@media (max-height: 700px) {
  .home { padding-top: calc(var(--safe-top) + 6px); }
  .home-ring { --ring: min(256px, calc(100vw - 64px)); margin-top: 6px; }
  .home-label { margin-top: 12px; gap: 5px; }
  .home-n { font-size: 30px; }
  .result { padding-top: calc(var(--safe-top) + 24px); gap: 12px; }
  .result-ring { width: 150px; height: 150px; }
  .reminder-title { font-size: 32px; margin-top: 12px; }
  .choice { min-height: 52px; }
}
@media (max-height: 600px) {
  .home-ring { --ring: min(224px, calc(100vw - 64px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
