/* Layout: one narrow column sized for a phone held in one hand; during play the
   answers sit in the thumb zone and the clue card takes whatever height is left.
   Colour: liturgical green with gilt-edge gold, on a pale sage page. */
:root {
  --bg: #edf1ea;
  --surface: #f8faf5;
  --surface-2: #e2e8df;
  --ink: #17221c;
  --muted: #55645b;
  --line: #c6d1c5;
  --accent: #1f5a44;
  --accent-ink: #f4f8f3;
  --gold: #976b0f;
  --gold-soft: #ecdcb0;
  --good: #23764a;
  --good-soft: #d3eadb;
  --bad: #a3322b;
  --bad-soft: #f4dad6;
  --shadow: 0 1px 2px rgb(23 34 28 / 0.06), 0 8px 24px rgb(23 34 28 / 0.07);
  /* Clusters group colours, straightforward to tricky: linen, clay, sea, wine */
  --lv-1: #e2d6bd; --lv-2: #e6b89c; --lv-3: #a9c8c3; --lv-4: #d6a5ad;

  --font-display: "IM Fell English", "Iowan Old Style", Palatino, Georgia, serif;
  --font-read: "Literata", "Iowan Old Style", Georgia, serif;
  --font-ui: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.0625rem;
  --step-2: 1.25rem;
  --step-3: 1.625rem;
  --step-4: 2.25rem;
  --step-5: 3.25rem;
  --radius: 14px;

  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1511; --surface: #15201a; --surface-2: #1d2b23; --ink: #e5ece6; --muted: #9caba1;
    --line: #2c3c33; --accent: #86c9a6; --accent-ink: #0d1511; --gold: #dab562; --gold-soft: #3b3321;
    --good: #72d09b; --good-soft: #163626; --bad: #f08b81; --bad-soft: #3e1e1b;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    --lv-1: #5c5240; --lv-2: #7a4632; --lv-3: #2e5853; --lv-4: #6d3842;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1511; --surface: #15201a; --surface-2: #1d2b23; --ink: #e5ece6; --muted: #9caba1;
  --line: #2c3c33; --accent: #86c9a6; --accent-ink: #0d1511; --gold: #dab562; --gold-soft: #3b3321;
  --good: #72d09b; --good-soft: #163626; --bad: #f08b81; --bad-soft: #3e1e1b;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  --lv-1: #5c5240; --lv-2: #7a4632; --lv-3: #2e5853; --lv-4: #6d3842;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-1)/1.45 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; touch-action: manipulation; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 400; }
p { margin: 0; }
[hidden] { display: none !important; }

.app {
  max-width: 560px;
  min-height: 100%;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.app.is-play { height: 100%; min-height: 0; gap: 12px; padding-block: 8px 12px; }

/* ── Shared bits ── */
.eyebrow {
  font: 600 var(--step--1)/1.2 var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.btn {
  min-height: 56px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--surface);
  padding: 10px 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.08s ease, background-color 0.15s ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 44px; padding: 8px 14px; font-size: var(--step-0); }
.icon-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
.icon-btn svg { width: 22px; height: 22px; }
.tabular { font-variant-numeric: tabular-nums; }

/* ── Home ── */
.masthead { display: grid; gap: 6px; padding-top: 18px; }
.masthead h1 {
  font: 400 var(--step-5)/0.95 var(--font-display);
  letter-spacing: -0.01em;
}
.masthead h1 .amp { color: var(--gold); font-style: italic; }
.masthead .lede { font: 400 var(--step-1)/1.45 var(--font-read); color: var(--muted); max-width: 30ch; }

.play-buttons { display: grid; gap: 10px; }
/* Grouped modes: a strip down the left marks each group, gold for play, green for learning. */
.play-buttons.mode-groups { gap: 22px; }
.mode-group { display: grid; gap: 10px; padding-left: 14px; border-left: 3px solid var(--gold); }
.mode-group .eyebrow { color: var(--gold); }
.mode-group.is-learn { border-left-color: var(--accent); }
.mode-group.is-learn .eyebrow { color: var(--accent); }
.save-warning { background: var(--bad-soft); color: var(--ink); border-radius: var(--radius); padding: 12px 14px; font-size: var(--step-0); line-height: 1.45; }
.save-warning b { color: var(--bad); }
.mode-btn {
  justify-content: space-between;
  text-align: left;
  min-height: 68px;
  padding: 12px 18px;
}
.mode-btn .mode-text { display: grid; gap: 2px; min-width: 0; }
.mode-btn .mode-name { font: 600 var(--step-2)/1.15 var(--font-ui); }
.mode-btn .mode-desc { font-size: var(--step--1); font-weight: 500; opacity: 0.8; }
.mode-btn svg { width: 22px; height: 22px; flex: none; }
.bests { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: var(--step-0); }
.bests b { color: var(--ink); font-weight: 600; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head h2 { font: 400 var(--step-3)/1.1 var(--font-display); }
.section-head .note { color: var(--muted); font-size: var(--step--1); }

/* The chapter map: one tile per chapter, filled from the bottom as you master it. */
.map { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.tile {
  position: relative;
  aspect-ratio: 1 / 1.05;
  max-width: 100%;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 0;
}
.tile .fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--p, 0) * 100%);
  background: var(--gold-soft);
  transition: height 0.4s ease;
}
.tile.is-done { border-color: var(--gold); }
.tile .n { position: relative; font: 400 var(--step-3)/1 var(--font-display); }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: var(--step--1); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--gold-soft); border: 1px solid var(--gold); }

.options { display: grid; gap: 18px; padding-top: 4px; }
.option { display: grid; gap: 8px; }
.option-label { font-weight: 600; font-size: var(--step-0); }
.option-help { color: var(--muted); font-size: var(--step--1); }
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-2);
}
.segmented button {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: var(--step-0);
  font-weight: 500;
  color: var(--muted);
  padding: 6px 4px;
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.book-toggle {
  min-height: 52px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px;
  text-align: left;
}
.book-toggle .name { font: 400 var(--step-2)/1 var(--font-display); }
.book-toggle .state { font-size: var(--step--1); color: var(--muted); }
.book-toggle[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.book-toggle[aria-pressed="true"] .state { color: var(--accent); font-weight: 600; }
.book-toggle:disabled { opacity: 0.55; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.switch {
  width: 52px; height: 32px; flex: none;
  border-radius: 16px; border: 0;
  background: var(--line);
  position: relative;
  transition: background-color 0.2s ease;
}
.switch::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
  transition: transform 0.2s ease;
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.footer-note { color: var(--muted); font-size: var(--step--1); line-height: 1.5; }
.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }

/* ── Play ── */
.topbar { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; min-height: 44px; }
.pips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.pip { height: 6px; border-radius: 3px; background: var(--surface-2); }
.pip.is-right { background: var(--good); }
.pip.is-wrong { background: var(--bad); }
.pip.is-now { background: var(--gold); }
.lamps { display: flex; align-items: center; gap: 2px; }
.lamp { width: 22px; height: 22px; color: var(--gold); transition: color 0.3s ease, opacity 0.3s ease; }
.lamp.is-out { color: var(--line); }
.run { margin-left: 10px; color: var(--muted); font-size: var(--step-0); }
.run b { color: var(--ink); }
.score { font: 600 var(--step-2)/1 var(--font-ui); min-width: 3ch; text-align: right; }
/* Training: the chapters being learned, filling like map tiles. */
.train-set { display: flex; gap: 6px; min-width: 0; overflow: hidden; }
.chip {
  position: relative;
  overflow: hidden;
  flex: none;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 4px 9px 3px;
  font: 400 var(--step-1)/1.1 var(--font-display);
  white-space: nowrap;
}
.chip .fill { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--p, 0) * 100%); background: var(--gold-soft); transition: height 0.4s ease; }
.chip .l { position: relative; }

.card {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card.is-asking { justify-content: center; }
.card.is-asking .card-top { margin-bottom: 4px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kind {
  font: 600 var(--step--1)/1 var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.event-title { font: 400 var(--step-4)/1.05 var(--font-display); }
.chapter-ask { font: 400 var(--step-5)/1 var(--font-display); }
.clue { font: 400 var(--step-1)/1.6 var(--font-read); max-width: 62ch; }
.verse {
  position: relative;
  font: italic 400 var(--step-2)/1.55 var(--font-read);
  padding-left: 30px;
}
.verse::before {
  content: "\201C";
  position: absolute; left: -4px; top: -14px;
  font: 400 64px/1 var(--font-display);
  color: var(--gold);
}
.timer { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; flex: none; }
.timer i { display: block; height: 100%; background: var(--gold); transform-origin: left center; animation: drain var(--t, 20s) linear forwards; }
.timer.is-stopped i { animation-play-state: paused; }
@keyframes drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; flex: none; }
.choice {
  position: relative;
  min-height: 78px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 8px;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.08s ease, opacity 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.choice:active:not(:disabled) { transform: scale(0.97); }
.choice .book { font: 600 11px/1 var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.choice .num { font: 400 2.5rem/1 var(--font-display); }
.choice .key { position: absolute; top: 6px; left: 8px; font-size: 11px; color: var(--muted); opacity: 0.6; }
@media (hover: none) { .choice .key { display: none; } }
.choice.is-removed { opacity: 0.2; }
.choice.is-right { background: var(--good-soft); border-color: var(--good); }
.choice.is-right .num, .choice.is-right .book { color: var(--good); }
.choice.is-wrong { background: var(--bad-soft); border-color: var(--bad); }
.choice.is-wrong .num, .choice.is-wrong .book { color: var(--bad); }
.choice.is-faded { opacity: 0.45; }
.choices.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* "What happens in this chapter?" answers are events, one per row. */
.choices.is-events { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.choice.choice-event { min-height: 54px; flex-direction: row; justify-content: flex-start; text-align: left; padding: 10px 16px; }
.choice-event .title { font: 500 var(--step-1)/1.3 var(--font-read); }
.choice-event .key { top: 50%; transform: translateY(-50%); }
@media (hover: hover) { .choice.choice-event { padding-left: 30px; } }
.choice.is-right .title { color: var(--good); }
.choice.is-wrong .title { color: var(--bad); }
.choice.pop { animation: pop 0.35s ease; }
.choice.shake { animation: shake 0.4s ease; }
@keyframes pop { 40% { transform: scale(1.06); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.actions { display: grid; grid-template-columns: 1fr; gap: 10px; flex: none; }
.actions.two { grid-template-columns: auto 1fr; }
.hint-btn { color: var(--muted); }

.points {
  position: fixed;
  left: 50%; top: 40%;
  transform: translate(-50%, 0);
  font: 400 var(--step-5)/1 var(--font-display);
  color: var(--gold);
  pointer-events: none;
  animation: rise 0.9s ease-out forwards;
  z-index: 20;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px) scale(0.8); } 25% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -50px) scale(1.05); } }

.reveal { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.verdict { font: 600 var(--step-1)/1.2 var(--font-ui); }
.verdict.ok { color: var(--good); }
.verdict.miss { color: var(--bad); }
.learned { background: var(--gold-soft); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.lapsed { background: var(--bad-soft); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.review-tag {
  font: 600 var(--step--1)/1 var(--font-ui);
  color: var(--accent);
  border: 1.5px solid currentColor;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}
.intro-lede { font: 400 var(--step-0)/1.6 var(--font-read); color: var(--muted); }
.intro-ch { display: grid; gap: 4px; }
.intro-ch + .intro-ch { padding-top: 14px; border-top: 1px solid var(--line); }
.intro-ch .ref { font-size: var(--step-3); }
.intro-evs { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.intro-ev {
  width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
  min-height: 44px;
  padding: 10px 0;
  border: 0; border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
}
.intro-evs li:last-child .intro-ev { border-bottom: 0; }
.intro-ev .t { font: 500 var(--step-1)/1.3 var(--font-read); }
.intro-ev .r { color: var(--muted); font-size: var(--step--1); white-space: nowrap; }
.ref { font: 400 var(--step-4)/1 var(--font-display); }
.ref-title { font: 500 var(--step-1)/1.3 var(--font-read); }
.meta { color: var(--muted); font-size: var(--step-0); line-height: 1.45; }
.meta b { color: var(--ink); font-weight: 600; }
.meta.note { font-size: var(--step--1); font-style: italic; }
.key-verse { font: italic 400 var(--step-0)/1.55 var(--font-read); color: var(--muted); border-left: 2px solid var(--gold); padding-left: 12px; }
.link-btn {
  justify-self: start;
  border: 0; background: none; padding: 6px 0;
  color: var(--accent); font-weight: 600; font-size: var(--step-0);
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px;
}
.link-btn svg { width: 18px; height: 18px; }

/* ── Results ── */
.results-head { display: grid; gap: 8px; padding-top: 20px; text-align: center; justify-items: center; }
.results-head .rank { font: 400 var(--step-4)/1.05 var(--font-display); }
.results-head .rank-note { font: italic 400 var(--step-0)/1.5 var(--font-read); color: var(--muted); max-width: 34ch; }
.big-score { font: 400 4.5rem/1 var(--font-display); color: var(--gold); }
.result-line { color: var(--muted); }
.result-line b { color: var(--ink); }
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.review { display: grid; }
.review-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
}
.review-item:last-child { border-bottom: 0; }
.mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.mark.ok { background: var(--good-soft); color: var(--good); }
.mark.miss { background: var(--bad-soft); color: var(--bad); }
.mark.none { background: var(--surface-2); color: var(--muted); }
.review-item .t { font-weight: 500; line-height: 1.3; }
.review-item .sub { display: block; font-size: var(--step--1); color: var(--muted); font-weight: 400; }
.review-item .r { font: 400 var(--step-1)/1 var(--font-display); color: var(--muted); white-space: nowrap; }
.button-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ── Study ── */
.page-head { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px; }
.page-head h1 { font: 400 var(--step-3)/1.1 var(--font-display); }
.study-intro { font: 400 var(--step-0)/1.6 var(--font-read); color: var(--muted); }
.sections { display: grid; gap: 18px; }
.sec { display: grid; gap: 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sec-name { font-weight: 600; display: grid; gap: 2px; }
.sec-range { color: var(--muted); font-size: var(--step--1); white-space: nowrap; }
.tag { color: var(--accent); font-size: var(--step--1); font-weight: 600; }
.sec .map { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }

/* ── Training setup ── */
.train-books { display: grid; gap: 10px; }
.train-book {
  display: grid; gap: 10px;
  padding: 10px 14px 12px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--surface);
}
.train-book.is-on { border-color: var(--accent); }
.train-book-name { font: 400 var(--step-2)/1.2 var(--font-display); }
.pick-map { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.tile.pick { aspect-ratio: 1; }
.tile.pick .n { font-size: var(--step-2); color: var(--muted); }
.tile.pick[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); }
.tile.pick[aria-pressed="true"] .n { color: var(--accent-ink); }
.pick-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chapter-head { display: grid; gap: 4px; }
.chapter-head .big { font: 400 var(--step-5)/1 var(--font-display); }
.chapter-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.events { display: grid; gap: 10px; }
.ev {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1.5px solid var(--line);
}
.ev > button {
  width: 100%;
  border: 0; background: none;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center;
  text-align: left;
  padding: 14px 16px;
  min-height: 60px;
}
.ev .t { font-weight: 600; line-height: 1.3; }
.ev .r { display: block; color: var(--muted); font-size: var(--step--1); font-weight: 400; margin-top: 2px; }
.ev-body { padding: 0 16px 14px; display: grid; gap: 8px; }
.mastery { font-size: var(--step--1); font-weight: 600; white-space: nowrap; }
.mastery.done { color: var(--gold); }
.mastery.seen { color: var(--muted); }

/* ── Passage sheet ── */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: slide-up 0.25s ease;
}
@keyframes slide-up { from { transform: translateY(24px); opacity: 0; } }
.sheet-head, .sheet-body {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.sheet-head { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 8px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.sheet-head .ref { font-size: var(--step-3); }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-block: 18px 32px; }
.passage { font: 400 var(--step-1)/1.75 var(--font-read); max-width: 62ch; }
.passage sup { font: 600 0.65em/1 var(--font-ui); color: var(--gold); margin-right: 3px; vertical-align: 0.5em; }
.passage .is-key { background: var(--gold-soft); border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 2px; }
.attribution { margin-top: 20px; color: var(--muted); font-size: var(--step--1); }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; }

/* ── Shell: choosing a part of the Bible, then a game ── */
.crumb a {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; margin-left: -6px; padding-right: 8px;
  color: var(--muted); text-decoration: none;
  font-size: var(--step-0); font-weight: 500;
}
.crumb svg { width: 20px; height: 20px; }
.crumb + .masthead { padding-top: 0; }
[tabindex="-1"]:focus { outline: none; }
.masthead h1.ask { font-size: var(--step-4); line-height: 1.05; max-width: 14ch; }

.parts, .games { display: grid; gap: 12px; }
.part-card, .game-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit; text-decoration: none;
  transition: transform 0.08s ease;
}
.part-card { border-color: var(--accent); }
.part-card:active, .game-card:active { transform: scale(0.98); }
.part-card > svg, .game-card > svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.part-text, .game-text { display: grid; gap: 4px; min-width: 0; flex: 1; }
.part-name { font: 400 var(--step-4)/1 var(--font-display); }
.part-books { color: var(--muted); font-size: var(--step-0); }
.game-name { font: 400 var(--step-3)/1.05 var(--font-display); }
.game-blurb { font: 400 var(--step-0)/1.45 var(--font-read); color: var(--muted); }
.game-progress { font-size: var(--step--1); font-weight: 600; color: var(--gold); }
/* Game badges use the app icon's fixed green and gilt in both themes. */
.game-art {
  width: 64px; height: 64px; flex: none;
  border-radius: 14px;
  background: #1f5a44;
  display: grid; place-items: center;
  align-self: start;
}
.art-amp { font: italic 400 48px/1 var(--font-display); color: #dab562; transform: translateY(-2px); }
.art-picks { display: grid; grid-template-columns: repeat(2, 22px); gap: 4px; }
.art-picks i {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  border: 1px solid rgb(218 181 98 / 0.55);
  font: 600 9px/1 var(--font-ui); font-style: normal; letter-spacing: 0.02em;
  color: #dab562;
}
.art-picks i.on { background: #dab562; color: #1f5a44; border-color: #dab562; }
.art-grid { display: grid; grid-template-columns: repeat(2, 20px); gap: 4px; }
.art-grid i { width: 20px; height: 20px; border-radius: 5px; }
.art-grid .lv-1 { background: #e2d6bd; }
.art-grid .lv-2 { background: #e6b89c; }
.art-grid .lv-3 { background: #a9c8c3; }
.art-grid .lv-4 { background: #d6a5ad; }

/* ── Which Gospel? ── */
.picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; flex: none; }
.pick {
  position: relative;
  min-height: 72px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 10px;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.08s ease, opacity 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.pick:disabled { color: var(--ink); }
.pick:active:not(:disabled) { transform: scale(0.97); }
.pick .name { font: 400 var(--step-3)/1 var(--font-display); }
.pick .sub { min-height: 1.2em; font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.pick .key { position: absolute; top: 6px; left: 8px; font-size: 11px; color: var(--muted); opacity: 0.6; }
@media (hover: none) { .pick .key { display: none; } }
.pick .tick {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid; place-items: center;
  color: transparent;
}
.pick .tick svg { width: 14px; height: 14px; }
.pick[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.pick[aria-pressed="true"] .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pick.is-locked .sub { color: var(--gold); font-weight: 600; }
.pick.is-locked[aria-pressed="false"] { opacity: 0.6; }
.pick.is-right { background: var(--good-soft); border-color: var(--good); }
.pick.is-right .name, .pick.is-right .sub { color: var(--good); }
.pick.is-right .tick { background: var(--good); border-color: var(--good); color: var(--surface); }
.pick.is-wrong { background: var(--bad-soft); border-color: var(--bad); }
.pick.is-wrong .name, .pick.is-wrong .sub { color: var(--bad); }
.pick.is-wrong .tick { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.pick.is-missed { border: 2px dashed var(--good); }
.pick.is-missed .name, .pick.is-missed .sub { color: var(--good); }
.pick.is-missed .tick { border-style: dashed; border-color: var(--good); }
.pick.is-faded { opacity: 0.45; }
.pick.pop { animation: pop 0.35s ease; }
.pick.shake { animation: shake 0.4s ease; }
.reveal .answer { font-size: var(--step-3); line-height: 1.1; }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 3.5em; align-items: center; gap: 12px; font-size: var(--step-0); }
.bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--gold); border-radius: 5px; transition: width 0.4s ease; }
.bar-count { color: var(--muted); font-size: var(--step--1); text-align: right; }
h2.sec-name { font: 600 var(--step-1)/1.3 var(--font-ui); }

.passage-ref {
  margin: 24px 0 6px;
  font: 600 var(--step--1)/1.2 var(--font-ui);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold);
}
.sheet-body > .passage-ref:first-child { margin-top: 0; }
.sheet-intro {
  margin-bottom: 20px;
  font: italic 400 var(--step-0)/1.55 var(--font-read);
  color: var(--muted);
  border-left: 2px solid var(--gold);
  padding-left: 12px;
}

/* ── Clusters ── */
.lv-1 { --lv: var(--lv-1); }
.lv-2 { --lv: var(--lv-2); }
.lv-3 { --lv: var(--lv-3); }
.lv-4 { --lv: var(--lv-4); }
.cl-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--lv); vertical-align: -1px; margin-right: 6px; flex: none; }
.bar-label { display: inline-flex; align-items: center; }
.cl-bar i { background: var(--lv); }
.cl-found { font: 600 var(--step-1)/1 var(--font-ui); color: var(--muted); min-width: 3ch; text-align: right; }
.topbar .lamps { justify-content: center; }

/* Four rows of four: found groups fill whole rows above the tiles left. */
.cl-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(64px, 1fr);
  gap: 8px;
}
.is-play .cl-board { flex: 1 1 auto; min-height: 0; max-height: 440px; }
.cl-tile {
  min-width: 0;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  padding: 4px;
  display: grid; grid-template-columns: minmax(0, 1fr); place-items: center;
  font: 600 var(--step-0)/1.15 var(--font-ui);
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.08s ease, background-color 0.15s ease;
}
.cl-tile > span { display: block; width: 100%; }
.cl-tile > span.is-tight { overflow-wrap: anywhere; }
.cl-tile.is-long { font-size: 0.8125rem; }
.cl-tile.is-xlong { font-size: 0.6875rem; letter-spacing: -0.01em; }
.cl-tile:active { transform: scale(0.95); }
.cl-tile[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.cl-tile.shake { animation: shake 0.4s ease; }
.cl-group {
  grid-column: 1 / -1;
  border: 0;
  border-radius: 12px;
  background: var(--lv);
  color: var(--ink);
  padding: 8px 12px;
  display: grid; align-content: center; justify-items: center; gap: 2px;
  text-align: center;
  position: relative;
}
.cl-group.pop { animation: pop 0.35s ease; }
.cl-group-title { font: 700 var(--step-0)/1.2 var(--font-ui); letter-spacing: 0.02em; }
.cl-group-words { font: 400 var(--step-0)/1.3 var(--font-read); }
.cl-group-tag { position: absolute; top: 6px; right: 8px; font-size: 11px; font-weight: 600; opacity: 0.7; }
.cl-msg { min-height: 1.4em; text-align: center; font-weight: 600; color: var(--muted); flex: none; }
.cl-actions { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 10px; flex: none; }
.cl-result { display: grid; gap: 10px; justify-items: center; text-align: center; padding-top: 4px; }
.cl-result .rank { font: 400 var(--step-4)/1.05 var(--font-display); }
.cl-result .rank-note { font: italic 400 var(--step-0)/1.5 var(--font-read); color: var(--muted); max-width: 34ch; }
.cl-result .button-row { width: 100%; }
.cl-result .link-btn { justify-self: center; }
.cl-also {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-weight: 600;
  color: var(--muted);
}
.passage mark.is-key { color: inherit; }

/* ── Number Crunch ── */
.art-num { font: 400 76px/1 var(--font-display); color: #dab562; transform: translateY(-9px); }
.nc-question { font: 400 var(--step-3)/1.15 var(--font-display); }
.nc-dial { display: grid; gap: 8px; flex: none; }
.nc-readout { text-align: center; line-height: 1; }
.nc-num { font: 400 var(--step-5)/1 var(--font-display); color: var(--gold); }
.nc-unit { font: 500 var(--step-1)/1 var(--font-ui); color: var(--muted); }
.nc-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 44px; margin: 0;
  background: transparent;
  touch-action: pan-y;
}
.nc-slider::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: var(--surface-2); }
.nc-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 32px; height: 32px; margin-top: -11px;
  border-radius: 50%; border: 3px solid var(--surface);
  background: var(--accent); box-shadow: var(--shadow);
}
.nc-slider::-moz-range-track { height: 10px; border-radius: 5px; background: var(--surface-2); }
.nc-slider::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--surface); background: var(--accent); box-shadow: var(--shadow); }
.nc-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: var(--step--1); }
.nc-actions { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; gap: 10px; }
.nc-nudge { padding: 0; font: 500 var(--step-3)/1 var(--font-ui); }
/* After locking in: the guess and the answer as pins on the track, the gap between them shaded. */
.nc-track { position: relative; height: 64px; margin-inline: 9px; }
.nc-track::before, .nc-gap {
  content: "";
  position: absolute; top: 50%; height: 10px; margin-top: -5px;
  border-radius: 5px;
}
.nc-track::before { left: -9px; right: -9px; background: var(--surface-2); }
.nc-gap { left: calc(var(--from) * 100%); width: calc((var(--to) - var(--from)) * 100%); background: var(--gold-soft); }
.nc-pin {
  position: absolute; top: 50%; left: calc(var(--p) * 100%);
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border-radius: 50%; border: 3px solid var(--surface);
  box-shadow: var(--shadow);
}
/* Labels sit right of a pin at the left end and left of it at the right end, so they never overflow. */
.nc-pin b {
  position: absolute; left: 50%;
  transform: translateX(calc(var(--p) * -100%));
  white-space: nowrap;
  font: 600 var(--step-0)/1 var(--font-ui);
}
.nc-pin.is-answer { background: var(--gold); z-index: 1; animation: pin-drop 0.45s ease; }
.nc-pin.is-answer b { bottom: 20px; color: var(--gold); }
.nc-pin.is-guess { background: var(--bad); }
.nc-pin.is-guess.is-ok { background: var(--good); }
.nc-pin.is-guess b { top: 20px; color: var(--muted); }
@keyframes pin-drop { from { transform: translateY(-16px); opacity: 0; } }

/* ── Before or After? ── */
.art-order { width: 40px; height: 40px; }
.ba-than { font: italic 400 var(--step-1)/1.3 var(--font-read); color: var(--muted); }
.ba-anchor {
  display: grid; gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1.5px dashed var(--line);
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
}
.ba-era { font: 600 var(--step--1)/1.2 var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.ba-title { font: 500 var(--step-1)/1.3 var(--font-read); }
.ba-ref { font-size: var(--step--1); color: var(--muted); }
/* After answering: both events on a short timeline, earlier at the top. */
.ba-end { font: 600 var(--step--1)/1 var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-left: 28px; }
.ba-line { list-style: none; margin: 0; padding: 0 0 0 28px; display: grid; gap: 14px; position: relative; }
.ba-line::before { content: ""; position: absolute; left: 9px; top: -6px; bottom: -6px; width: 2px; border-radius: 1px; background: var(--line); }
.ba-node {
  position: relative;
  width: 100%;
  display: grid; gap: 3px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--surface);
  text-align: left;
}
.ba-node::before {
  content: "";
  position: absolute; left: -25px; top: 50%;
  width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%; border: 2px solid var(--surface);
  background: var(--muted);
}
.ba-node.is-ok { border-color: var(--good); background: var(--good-soft); }
.ba-node.is-ok::before { background: var(--good); }
.ba-node.is-miss { border-color: var(--bad); background: var(--bad-soft); }
.ba-node.is-miss::before { background: var(--bad); }
.ba-node.pop { animation: pop 0.35s ease; }
.ba-node.shake { animation: shake 0.4s ease; }
.ba-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; flex: none; }
.ba-pick { min-height: 64px; font: 600 var(--step-2)/1 var(--font-ui); }
.ba-pick svg { width: 22px; height: 22px; }

/* ── Finish the Proverb ── */
.art-halves { display: grid; gap: 6px; width: 40px; }
.art-halves i { height: 10px; border-radius: 3px; }
.art-halves i:first-child { width: 30px; background: #dab562; }
.art-halves i:last-child { width: 30px; justify-self: end; border: 1.5px solid #dab562; }
.pv-whole { font: 400 var(--step-1)/1.6 var(--font-read); }
.pv-whole mark { color: inherit; background: var(--gold-soft); border-radius: 3px; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ── Odd One Out ── */
.art-odd i { background: #e2d6bd; }
.art-odd i.is-odd { background: none; border: 2px solid #dab562; }
.oo-level { display: inline-flex; align-items: center; font: 600 var(--step--1)/1 var(--font-ui); color: var(--muted); }
.oo-ask { font: 400 var(--step-4)/1.05 var(--font-display); }
.oo-clue { font: 400 var(--step-1)/1.45 var(--font-read); color: var(--muted); }
.oo-clue b { color: var(--ink); font-weight: 500; }
.oo-choices .choice { min-height: 96px; }
.oo-word { font: 400 var(--step-3)/1.1 var(--font-display); text-align: center; overflow-wrap: anywhere; }
.oo-tile.is-long .oo-word { font-size: var(--step-2); }
.oo-tile.is-xlong .oo-word { font-size: var(--step-1); }
.choice.is-right .oo-word { color: var(--good); }
.choice.is-wrong .oo-word { color: var(--bad); }
/* After answering, the three that belong together take their group's colour. */
.choice.is-three { background: var(--lv); border-color: transparent; }
.oo-group { width: 100%; }
.oo-note { font: 400 var(--step-0)/1.55 var(--font-read); color: var(--muted); }
.oo-home {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 400 var(--step-0)/1.4 var(--font-read);
  text-align: left;
}
.oo-home::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--lv); flex: none; }
.oo-home b { font-weight: 600; }

@media (min-height: 760px) {
  .choice { min-height: 88px; }
  .oo-choices .choice { min-height: 120px; }
  .choice.choice-event { min-height: 60px; }
  .pick { min-height: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .timer i { animation-duration: var(--t, 20s) !important; }
}

/* ── Add to Home Screen ── */
.install-banner {
  position: relative;
  display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 16px 44px 16px 16px;
  border-radius: 18px;
  border: 1.5px solid var(--gold);
  background: color-mix(in srgb, var(--gold-soft) 45%, var(--surface));
}
.install-icon { width: 52px; height: 52px; border-radius: 12px; }
.install-text { display: grid; gap: 4px; }
.install-title { font: 400 var(--step-2)/1.15 var(--font-display); }
.install-sub { color: var(--muted); font-size: var(--step-0); }
.install-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.install-actions .btn { min-height: 40px; }
.install-close { position: absolute; top: 4px; right: 4px; }
.app > .link-btn { justify-self: start; }

.install-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.install-step { display: grid; gap: 12px; }
.install-step h3 { display: flex; align-items: center; gap: 10px; font: 600 var(--step-1)/1.25 var(--font-ui); }
.install-step p { margin-top: 6px; font: 400 var(--step-0)/1.6 var(--font-read); color: var(--muted); }
.install-step p b { color: var(--ink); font-family: var(--font-ui); font-weight: 600; }
.step-n {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font-size: var(--step--1); font-weight: 700;
}
.inline-ic svg { width: 1.15em; height: 1.15em; vertical-align: -0.2em; color: #0a84ff; }
.install-note { margin-top: 28px; font-size: var(--step-0); line-height: 1.55; color: var(--muted); }
.install-note b { color: var(--ink); }
.install-done { display: grid; gap: 8px; margin-top: 20px; }

/* Drawings of Safari's screens, in iOS's light appearance whatever the theme. */
.ios-art { justify-self: center; width: min(100%, 300px); }
.ios-screen {
  --ios-bg: #f2f2f7; --ios-card: #fff; --ios-ink: #1c1c1e; --ios-muted: #8e8e93; --ios-line: #d1d1d6; --ios-blue: #0a84ff;
  position: relative;
  border-radius: 26px;
  border: 6px solid #1c1c1e;
  background: var(--ios-bg);
  color: var(--ios-ink);
  font: 400 14px/1.25 -apple-system, BlinkMacSystemFont, "Instrument Sans", system-ui, sans-serif;
  padding: 14px 12px;
  overflow: hidden;
  display: grid; gap: 10px;
}
.ios-screen svg { width: 18px; height: 18px; flex: none; }
.ios-bottom { min-height: 210px; align-content: end; background: #fff; }
.ios-page { display: grid; gap: 8px; padding: 6px 4px 16px; }
.ios-line { height: 8px; border-radius: 4px; background: #e5e5ea; }
.ios-line.w50 { width: 50%; } .ios-line.w70 { width: 70%; } .ios-line.w90 { width: 90%; }
.ios-bar { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 6px; align-items: center; }
.ios-round {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgb(242 242 247 / 0.95); box-shadow: 0 1px 6px rgb(0 0 0 / 0.12);
}
.ios-address {
  height: 40px; border-radius: 20px;
  display: flex; align-items: center; gap: 6px;
  background: #5c5f5b; color: #fff; box-shadow: 0 1px 6px rgb(0 0 0 / 0.12);
  font-size: 13px; padding: 0 10px 0 4px; min-width: 0;
}
.ios-host { flex: 1; min-width: 0; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ios-pm { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ios-menu {
  justify-self: center; width: 80%;
  border-radius: 22px; background: #7b7f7a; color: #fff;
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.25);
  display: grid; padding: 6px 0;
}
.ios-menu .ios-row { justify-content: flex-start; gap: 12px; border-bottom: 0; min-height: 38px; padding: 8px 16px; }
.ios-menu .ios-row svg { color: #fff; }
.ios-list { display: grid; border-radius: 12px; background: var(--ios-card); overflow: hidden; }
.ios-row {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; min-height: 42px;
  border-bottom: 0.5px solid var(--ios-line);
}
.ios-row:last-child { border-bottom: 0; }
.ios-row svg { color: var(--ios-ink); }
.ios-share { background: #fff; gap: 12px; }
.ios-share-head { display: flex; align-items: flex-start; gap: 12px; padding: 4px 4px 10px; font-size: 12px; color: var(--ios-muted); line-height: 1.35; border-bottom: 0.5px solid var(--ios-line); }
.ios-share-head b { color: var(--ios-ink); font-size: 14px; }
.ios-share-head .ios-mini { width: 44px; height: 44px; border-radius: 10px; box-shadow: 0 0 0 6px #fff, 0 1px 8px 6px rgb(0 0 0 / 0.08); margin: 6px; }
.ios-pill { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 12px; background: var(--ios-bg); color: var(--ios-ink); }
.ios-apps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); justify-items: center; padding-bottom: 12px; border-bottom: 0.5px solid var(--ios-line); }
.ios-app-dot { width: 42px; height: 42px; border-radius: 11px; background: #e5e5ea; }
.ios-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.ios-action { display: grid; justify-items: center; align-content: start; gap: 6px; font-size: 10.5px; line-height: 1.2; text-align: center; }
.ios-circle { width: 46px; height: 46px; border-radius: 50%; background: #ececee; display: grid; place-items: center; }
.ios-circle svg { width: 22px; height: 22px; }
.ios-share .ios-list { background: #ececee; border-radius: 16px; }
.ios-row.ios-left { justify-content: flex-start; gap: 12px; }
.ios-screen .ios-mini { width: 36px; height: 36px; border-radius: 8px; }
.ios-nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 2px 2px 4px; font-size: 13px; }
.ios-nav b { text-align: center; }
.ios-link { color: var(--ios-blue); padding: 4px 6px; border-radius: 8px; }
.ios-link.ring { font-weight: 600; }
.ios-name { justify-content: flex-start; }
.ios-name small { color: var(--ios-muted); }
.ios-toggle { width: 42px; height: 26px; border-radius: 13px; background: #34c759; position: relative; flex: none; }
.ios-toggle::after { content: ""; position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); }
.ios-home {
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 10px;
  padding: 22px 14px 26px;
  background: linear-gradient(160deg, #7fa7c9, #c9b6d6 60%, #e8c9b1);
}
.ios-app { display: grid; justify-items: center; gap: 9px; position: relative; }
.ios-screen .ios-app-icon { width: 100%; height: auto; max-width: 54px; aspect-ratio: 1; border-radius: 13px; background: rgb(255 255 255 / 0.55); display: block; }
.ios-app-name { font-size: 9px; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / 0.4); white-space: nowrap; }
/* The thing to tap: a gold ring. */
.ios-screen .ring { box-shadow: 0 0 0 3px #e0a100; }
.ios-screen .ios-row.ring { box-shadow: inset 0 0 0 3px #e0a100; border-radius: 10px; }
.ios-screen .ios-link.ring { box-shadow: inset 0 0 0 2px #e0a100; }
.ios-screen .ios-app-icon.ring { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #e0a100; }
/* Android (Chrome) */
.and-screen { --and-blue: #0b57d0; background: #fff; font-family: Roboto, "Instrument Sans", system-ui, sans-serif; }
.and-top { min-height: 210px; align-content: start; }
.and-bar { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px 32px; gap: 4px; align-items: center; }
.and-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.and-address {
  height: 38px; border-radius: 19px; background: #eef1f6;
  display: flex; align-items: center; padding: 0 14px;
  font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.and-tabs {
  justify-self: center; width: 20px; height: 20px; border: 2px solid currentColor; border-radius: 5px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.and-menu {
  justify-self: end; width: 84%; margin-top: -6px; white-space: nowrap;
  border-radius: 14px; background: #f3f5f9; box-shadow: 0 6px 20px rgb(0 0 0 / 0.18);
  display: grid; padding: 6px 0;
}
.and-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; min-height: 40px; }
.and-dim { min-height: 210px; place-content: center; background: #7d7f84; }
.and-dialog {
  width: 240px; border-radius: 26px; background: #f3f5f9;
  padding: 20px 20px 14px; display: grid; gap: 14px;
}
.and-title { font-size: 18px; font-weight: 500; }
.and-app { display: flex; align-items: center; gap: 12px; }
.and-app small { color: #5f6368; }
.and-buttons { display: flex; justify-content: flex-end; gap: 4px; }
.and-btn { color: var(--and-blue); font-weight: 600; padding: 8px 12px; border-radius: 18px; }
.ios-screen .and-row.ring { box-shadow: inset 0 0 0 3px #e0a100; border-radius: 10px; margin: 0 4px; }
.ios-screen .and-btn.ring { box-shadow: inset 0 0 0 2px #e0a100; }
.install-tabs { margin-bottom: 22px; }
.install-quick { display: grid; gap: 10px; margin-bottom: 26px; }
.install-quick p { font-size: var(--step-0); color: var(--muted); }
.install-quick .install-or { margin-top: 8px; }
.install-note + .install-note { margin-top: 12px; }
