:root {
  --bg: #f5f4f0; --panel: #fff; --ink: #1d1d1f; --muted: #6b6b70; --line: #dddbd4;
  --accent: #2456c7; --accent-ink: #fff; --accent-soft: #e6edfb;
  --ok: #1f7a3a; --ok-soft: #e3f3e7; --warn: #8a5a00; --warn-soft: #fff3d1; --warn-line: #ecc75a; --err: #b3261e;
  --hl: #fff09a; --radius: 12px;
  font: 100%/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1a1a1c; --panel: #242427; --ink: #ececef; --muted: #9a9aa2; --line: #3a3a3f;
    --accent: #7ea2ff; --accent-ink: #0d1020; --accent-soft: #23304f;
    --ok: #7fd49a; --ok-soft: #1f3526; --warn: #f0c56a; --warn-soft: #3a3218; --warn-line: #7a6424; --err: #ff8a80; --hl: #5c5220; }
}
/* On iPhone and iPad, text follows the user's text-size setting (Dynamic Type); sizes are in rem. */
@supports (font: -apple-system-body) {
  @media (hover: none) and (pointer: coarse) {
    :root { font: -apple-system-body; font-family: -apple-system, BlinkMacSystemFont, sans-serif; line-height: 1.45; }   /* :root, to win over the default above */
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a.button { touch-action: manipulation; cursor: pointer; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 10px 16px; min-height: 44px; color: inherit; }
button.primary, a.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.link { border: 0; background: none; color: var(--accent); padding: 8px 4px; min-height: 0; }
button.danger { color: var(--err); }
button.wide { width: 100%; }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; font-size: max(16px, 1.0625rem); width: 100%; }
textarea { resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
label.field { display: block; margin: 0 0 14px; }
label.field > span { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 4px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
h2 { font-size: 1.25rem; margin: 20px 0 10px; }
h3 { font-size: 1rem; margin: 16px 0 8px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 4px;
  padding: calc(6px + env(safe-area-inset-top)) 8px 6px; background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar h1 { flex: 1; font-size: min(1.125rem, 28px); margin: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the bar stops growing at the larger text sizes, like iOS's own navigation bars, so it can't take the screen */
.topbar button.icon { font-size: min(1.5rem, 34px); }
button.icon { border: 0; background: none; font-size: 1.5rem; min-width: 44px; padding: 4px 8px; color: var(--accent); }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
main.wide { max-width: none; padding: 0; }

/* cards and lists */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.list .item { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 56px; }
.list .item:last-child { border-bottom: 0; }
.list .item:active { background: var(--bg); }
.item .grow { flex: 1; min-width: 0; }
.item .name { font-weight: 600; }
.item .sub { font-size: 0.875rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .chev { color: var(--muted); font-size: 1.375rem; }
.badge { display: inline-block; font-size: 0.8125rem; padding: 3px 9px; border-radius: 999px; white-space: nowrap; font-weight: 500; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.busy { background: var(--accent-soft); color: var(--accent); }
.badge.plain { background: var(--bg); color: var(--muted); }
.empty-state { text-align: center; color: var(--muted); padding: 30px 10px; }

/* new translation */
.photo-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.photo-buttons label, .photo-buttons button.scan { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 84px;
  border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; background: var(--panel); font-weight: 500; }
.photo-buttons button.scan { color: inherit; font: inherit; font-weight: 500; }
.photo-buttons label .big, .photo-buttons button.scan .big { font-size: 1.625rem; }
.drop-hint { text-align: center; padding: 14px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); margin-bottom: 10px; }
.drop-hint.over { border-color: var(--accent); color: var(--accent); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 10px; }
.thumb { position: relative; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x { position: absolute; top: 4px; right: 4px; min-height: 0; width: 30px; height: 30px; padding: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: 0; font-size: 1rem; }
.thumb .label { position: absolute; left: 0; right: 0; bottom: 0; font-size: 0.6875rem; padding: 2px 4px; background: rgba(0,0,0,.5); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb.pick { padding: 0; min-height: 0; cursor: pointer; }
.thumb.pick .tick { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff;
  background: rgba(0,0,0,.25); color: transparent; display: flex; align-items: center; justify-content: center; font-size: 0.9375rem; }
.thumb.pick.on { outline: 3px solid var(--accent); }
.thumb.pick.on .tick { background: var(--accent); color: #fff; }
details summary { cursor: pointer; color: var(--accent); padding: 8px 0; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.check-row:last-child { border-bottom: 0; }
.check-row input[type=checkbox] { width: 24px; height: 24px; min-height: 0; flex: none; }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; min-height: 38px; padding: 6px 10px; border-radius: 8px; color: var(--muted); }
.seg button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.error { color: var(--err); font-size: 0.9375rem; margin: 6px 0; }

/* review screen */
.review { display: grid; grid-template-columns: minmax(300px, 42%) 1fr; grid-template-rows: minmax(0, 1fr) auto; height: calc(100dvh - 57px); }
.review .photo-pane { display: flex; flex-direction: column; background: #111; min-height: 0; grid-row: 1 / 3; }
.review .photo-pane .stage { flex: 1; overflow: auto; }
.review .photo-pane img { display: block; transform-origin: center; margin: 0 auto; }
.review .photo-pane .tools { display: flex; gap: 6px; padding: 8px; background: var(--panel); border-top: 1px solid var(--line); align-items: center; overflow-x: auto; }
.review .photo-pane .tools button { min-height: 36px; padding: 4px 12px; }
.review .photo-pane .tools .pic { width: 44px; height: 44px; padding: 0; overflow: hidden; }
.review .photo-pane .tools .pic.on { outline: 2px solid var(--accent); }
.review .photo-pane .tools .pic img { width: 100%; height: 100%; object-fit: cover; }
.review .page-pane { overflow-y: auto; padding: 16px; min-height: 0; }
.review .seg-bar { display: none; }
.finish-bar { grid-column: 2; display: flex; gap: 10px; align-items: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
.finish-bar .status { flex: 1; font-size: 0.875rem; color: var(--muted); }
.finish-bar button.primary { min-width: 140px; }
.file-kind { flex: none; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; color: #fff; background: #2b579a; }
.page-img { display: block; width: 100%; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.25); background: #fff; }
.file-kind.pdf { background: #b3261e; }
.checklist .row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--warn-line); }
.checklist .row:first-of-type { border-top: 0; }
.checklist .row .text { flex: 1; font-size: 0.9375rem; }
.checklist .row .acts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.checklist .row .acts button { min-height: 36px; padding: 4px 12px; font-size: 0.875rem; }
.checklist.card { background: var(--warn-soft); border-color: var(--warn-line); }
.checklist h3 { margin: 0 0 6px; color: var(--warn); }
.all-good { background: var(--ok-soft); color: var(--ok); border-color: transparent; font-weight: 500; }
.progress { text-align: center; padding: 40px 16px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 14px; }
.mini-spin { display: inline-block; vertical-align: -3px; width: 14px; height: 14px; margin-right: 8px; border: 2px solid var(--warn-line); border-top-color: var(--warn); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.banner { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 12px; }
.banner.err { background: #fde2e1; color: #6b1a15; }
@media (prefers-color-scheme: dark) { .banner.err { background: #4a1f1c; color: #ffd9d6; } }

/* bottom sheet (phone) / dialog (Mac) */
.overlay { position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; justify-content: center; }
/* the page behind an open sheet stays put (the sheet itself scrolls) */
html.sheet-open, html.sheet-open body { overflow: hidden; overscroll-behavior: none; }
.sheet { overscroll-behavior: contain; }
.overlay[hidden] { display: none; }
.sheet { background: var(--panel); width: 100%; max-width: 620px; max-height: 88dvh; overflow-y: auto; border-radius: 16px 16px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 30px rgba(0,0,0,.2); }
.sheet .grab { width: 40px; height: 5px; background: var(--line); border-radius: 3px; margin: 2px auto 12px; }
.sheet h2 { margin: 4px 0 14px; font-size: 1.1875rem; }
.sheet .buttons { display: flex; gap: 10px; margin-top: 16px; }
.sheet .buttons button { flex: 1; }
.sheet .printed { font-size: 0.9375rem; color: var(--muted); margin: 10px 0 4px; }
.sheet details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.sheet details summary { color: var(--accent); cursor: pointer; padding: 6px 0; }
.sheet .menu button, .sheet .menu a.button { display: block; width: 100%; text-align: left; margin-bottom: 8px; }
@media (min-width: 821px) {
  .overlay { align-items: center; }
  .sheet { border-radius: 16px; }
  .sheet .grab { display: none; }
}
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 20;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 0.9375rem; }
.toast[hidden] { display: none; }

/* names / settings tables */
.pairs .pair { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.pairs .rule { grid-column: 1 / -1; font-size: 0.875rem; margin: -4px 0 8px; }
.pairs .rule.ok { color: var(--ok); }
.pairs .rule.diff { color: var(--warn); }
.code { font-size: 1.375rem; letter-spacing: .12em; font-weight: 600; user-select: all; }
.addr { font-family: ui-monospace, Menlo, monospace; font-size: 0.9375rem; word-break: break-all; user-select: all; }

/* all-lines editor (advanced) */
.lines .line { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; background: var(--panel); }
.lines .line.unsure { background: var(--hl); }
.lines .line .kind { font-size: 0.8125rem; color: var(--muted); margin-bottom: 4px; }

/* phone layout */
@media (max-width: 820px) {
  .review { display: block; height: auto; }
  .review .seg-bar { display: block; position: sticky; top: calc(57px + env(safe-area-inset-top)); z-index: 3; padding: 8px 12px; background: var(--bg); }
  .review.show-photo .page-pane { display: none; }
  .review:not(.show-photo) .photo-pane { display: none; }
  .review .photo-pane { height: calc(100dvh - 125px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .review .page-pane { padding: 4px 10px 110px; }
  .review .finish-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; }
  .review.show-photo .finish-bar { display: none; }
  .hide-phone { display: none !important; }
}
@media (min-width: 821px) { .hide-mac { display: none !important; } }

/* ---------- the translation page preview: US Letter in points (1pt = 1/612 of the page width) ---------- */
.preview { container-type: inline-size; max-width: 860px; margin: 0 auto; }
.pv-sheet { --pt: calc(100cqw / 612); background: #fff; color: #000; min-height: calc(var(--pt) * 792);
  padding: calc(var(--pt) * 72); margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.25);
  font-family: "Times New Roman", Times, serif; font-size: calc(var(--pt) * 12); line-height: 1.15; }
.pv-note { font-size: calc(var(--pt) * 11); margin-bottom: calc(var(--pt) * 6); }
.pv-head1, .pv-head2 { text-align: center; font-weight: bold; }
.pv-head1 { margin-bottom: calc(var(--pt) * 6); }
.pv-head2 { margin-bottom: calc(var(--pt) * 18); }
.pv-cols { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--pt) * 20); }
.pv-b { border-radius: 2px; cursor: pointer; outline: 1px solid transparent; }
.pv-b:hover { outline-color: #9db4f0; background: #f2f6ff; }
.pv-b.pv-unsure { background: #fff09a; }
.pv-b.pv-flash { animation: flash 1.2s ease 2; }
@keyframes flash { 50% { background: #9db4f0; } }
.pv-title { text-align: center; font-weight: bold; white-space: pre-line; font-size: calc(var(--pt) * 18); margin: calc(var(--pt) * 12) 0; }
.pv-booklet .pv-title { font-size: calc(var(--pt) * 20); }
.pv-center { text-align: center; white-space: pre-line; font-size: calc(var(--pt) * 11); margin-bottom: calc(var(--pt) * 6); }
.pv-gap { height: calc(var(--pt) * 6); }
.pv-break { border-top: 1px dashed #999; color: #999; font: 10px sans-serif; text-align: center; margin: 6px 0; }
.pv-small { font-size: calc(var(--pt) * 10); margin-bottom: calc(var(--pt) * 4); }
.pv-text { text-align: justify; margin-bottom: calc(var(--pt) * 6); line-height: 1.3; }
.pv-v { font-style: italic; }
.pv-u { text-decoration: underline; }
.pv-bold { font-weight: bold; }
.pv-i { font-style: italic; }
.pv-right { text-align: right; }
.pv-booklet .pv-text .pv-v { font-size: calc(var(--pt) * 14); }
.pv-field { margin-top: calc(var(--pt) * 3); }
.pv-fline { display: flex; gap: calc(var(--pt) * 8); align-items: baseline; }
.pv-fline.pv-nolabel { justify-content: center; }
.pv-label { flex: none; min-width: calc(var(--pt) * 55); }
.pv-single .pv-label { min-width: calc(var(--pt) * 110); font-size: calc(var(--pt) * 11); }
.pv-booklet .pv-val { font-style: italic; font-size: calc(var(--pt) * 14); text-decoration: underline; }
.pv-single .pv-val { font-weight: bold; }
.pv-single .pv-fline { border-bottom: 1px solid #000; padding-bottom: 1px; }
.pv-plain .pv-fline { border-bottom: 0; }
.pv-single .pv-nolabel .pv-val { text-align: center; }
.pv-cap { text-align: center; font-size: calc(var(--pt) * 9); margin-bottom: calc(var(--pt) * 3); }
.pv-single .pv-cap { font-size: calc(var(--pt) * 7); font-weight: bold; }
.pv-row { display: grid; grid-template-columns: 62% 1fr; margin: calc(var(--pt) * 2) 0; }
.pv-row.pv-head { font-weight: bold; }
.pv-item { display: grid; grid-template-columns: calc(var(--pt) * 27) 1fr; margin: calc(var(--pt) * 1) 0; }
.pv-item.pv-sub { padding-left: calc(var(--pt) * 27); grid-template-columns: calc(var(--pt) * 14) 1fr; }
.pv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--pt) * 12); text-align: center; }
.pv-line { border-bottom: 1px solid #000; }
.pv-end { text-align: center; margin-top: calc(var(--pt) * 24); }
.pv-cert p { white-space: pre-line; text-align: left; margin: 0 0 calc(var(--pt) * 10); line-height: 1.3; }
.pv-cert p.pv-h { text-align: center; font-weight: bold; margin-top: calc(var(--pt) * 12); }
.pv-pagetools { display: flex; gap: 6px; align-items: center; justify-content: flex-end; font-size: 0.8125rem; color: var(--muted); margin: 0 0 4px; }
.pv-pagetools button { min-height: 32px; padding: 2px 10px; }
.pv-add { margin-top: 6px; font-family: -apple-system, sans-serif; }

/* login page */
body.login-page { display: flex; align-items: center; justify-content: center; }
.login { width: min(360px, 90vw); display: grid; gap: 12px; background: var(--panel); padding: 24px; border-radius: 16px; border: 1px solid var(--line); }
.login h1 { margin: 0; font-size: 1.375rem; }
.login input { font-size: 1.375rem; letter-spacing: .12em; text-transform: uppercase; }
.login button { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
/* Sign in with Apple, drawn the way Apple's guidelines ask: black, white logo and text, at least 44pt tall. */
.login .apple-signin-slot { height: 50px; }   /* Apple's own button is drawn here by the app */
.login form { display: grid; gap: 12px; }
.login .error { overflow-wrap: anywhere; }   /* a long unbroken word can't stretch the card */
.login { box-sizing: border-box; max-width: calc(100vw - 32px); }
.login .fine { font-size: .8125rem; color: var(--muted); margin: 0; }
.login .error { color: var(--err); min-height: 1em; margin: 0; }
.hint { color: var(--muted); font-size: 0.9375rem; margin: 0; }

.send-list { margin: 0 0 12px; padding-left: 20px; }
.send-list li { margin: 2px 0; }
a.button { display: block; text-align: center; text-decoration: none; box-sizing: border-box; line-height: 22px; }
.archived .name { color: var(--muted); }
.archived-banner { background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.closing-text { width: 100%; font-size: 0.9375rem; line-height: 1.4; }
.offline { position: sticky; top: 0; z-index: 30; background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--warn-line); padding: calc(8px + env(safe-area-inset-top)) 16px 8px; font-size: 0.9375rem; text-align: center; }

/* terms of use / privacy policy pages */
.legal { max-width: 760px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px 48px; line-height: 1.55; }
.legal h1 { font-size: 1.5rem; } .legal h2 { margin-top: 28px; }
.legal blockquote { margin: 16px 0; padding: 4px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.9375rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); }
.legal code { font-size: 0.9em; }
.legal a { color: var(--accent); overflow-wrap: anywhere; }
.key-points { padding-left: 20px; margin: 0 0 8px; } .key-points li { margin-bottom: 8px; }
label.agree { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
input.tick { width: 24px; height: 24px; min-height: 0; flex: none; margin: 0; accent-color: var(--accent); }
button.wide + button.wide { margin-top: 10px; }
.ai-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 0.9375rem; }
.steps { list-style: none; padding: 0; margin: 0 0 12px; }
.steps .step { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 0.875rem; }
.tips { margin: 0 0 10px; } .tips ul { margin: 6px 0 0; padding-left: 20px; } .tips li { margin-bottom: 4px; }
fieldset.choice { border: 0; padding: 0; margin: 0 0 14px; }
fieldset.choice legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
fieldset.choice label { display: flex; gap: 10px; align-items: center; min-height: 40px; cursor: pointer; }
fieldset.choice input { width: 20px; height: 20px; min-height: 0; flex: none; margin: 0; accent-color: var(--accent); }

/* online edition */
.credits { margin: 8px 2px 0; }
button.danger-fill { background: var(--err); border-color: var(--err); }
.menu button.buy { display: flex; justify-content: space-between; align-items: center; }
.cost { text-align: center; margin: 8px 0 0; }
/* Account: Buy, then Sign out. Delete account is its own section at the very bottom of Settings. */
.account-actions { display: grid; gap: 10px; margin-top: 12px; }
h2.danger-zone { margin-top: 40px; }

/* the first-run guide: one card per step, swiped sideways */
.guide .guide-track { touch-action: pan-x pan-y; overscroll-behavior-x: contain; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; }
.guide .guide-track::-webkit-scrollbar { display: none; }
.guide .guide-card { flex: 0 0 100%; scroll-snap-align: center; box-sizing: border-box; padding: 4px 16px 0; text-align: center; }
.guide .guide-pic { display: block; width: auto; max-width: 100%; height: min(46vh, 420px); aspect-ratio: 660 / 750; object-fit: cover; object-position: top;
  margin: 0 auto 18px; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 6px 24px rgba(0, 0, 0, .12); background: var(--panel); }
@media (min-width: 700px) { .guide .guide-pic { height: min(52vh, 620px); } }   /* iPad: more of the screen */
.guide .guide-card h2 { margin: 0 0 8px; }
.guide .guide-card p { margin: 0 auto; max-width: 30em; color: var(--muted); line-height: 1.45; }
.guide .guide-dots { display: flex; justify-content: center; gap: 8px; margin: 18px 0; }
.guide .guide-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.guide .guide-dots span.on { background: var(--accent); }
.guide button.link.wide { display: block; margin: 6px auto 0; }
