/* iPhone 18 Easy Companion — calm, high-legibility design for beginners and seniors.
   Deep blue + light blue + white, warm orange accents, soft green for success. */

:root {
  color-scheme: light;
  --bg: #f3f7fd; --surface: #ffffff; --surface-2: #e8f0fc; --ink: #0e1a36; --muted: #3f4d6b; --line: #c3d2ea;
  --navy: #0b2d72; --navy-2: #133f96; --blue: #1557c0; --blue-soft: #e2ecfd; --on-blue: #ffffff;
  --orange: #e8650a; --orange-btn: #b54700; --on-orange: #ffffff; --orange-soft: #fff0e3;
  --green: #1a7543; --on-green: #ffffff; --green-soft: #e1f3e7; --red: #b42318; --red-soft: #fdeceb;
  --warn-bg: #fff5de; --warn-line: #d08a00; --warn-ink: #4f3300; --focus: #e8650a; --focus-2: #0b2d72;
  --shadow: 0 4px 18px rgba(11, 45, 114, .09); --radius: 18px; --radius-s: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tap: 52px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { color-scheme: dark;
  --bg: #0a1330; --surface: #111e44; --surface-2: #172959; --ink: #eef3ff; --muted: #bccaea; --line: #2d427d;
  --navy: #061029; --navy-2: #1b3f97; --blue: #93bbff; --blue-soft: #1a2d63; --on-blue: #061029;
  --orange: #ff9a4d; --orange-btn: #ff9a4d; --on-orange: #1c0d00; --orange-soft: #3b2412; --green: #74dc9f; --on-green: #04210f; --green-soft: #12351f;
  --red: #ff8a80; --red-soft: #3d1a1d; --warn-bg: #3a2b10; --warn-line: #e3a72f; --warn-ink: #ffe3b0; --focus: #ffb273; --focus-2: #ffffff; --shadow: 0 4px 18px rgba(0,0,0,.35); } }
:root[data-theme="dark"] { color-scheme: dark;
  --bg: #0a1330; --surface: #111e44; --surface-2: #172959; --ink: #eef3ff; --muted: #bccaea; --line: #2d427d;
  --navy: #061029; --navy-2: #1b3f97; --blue: #93bbff; --blue-soft: #1a2d63; --on-blue: #061029;
  --orange: #ff9a4d; --orange-btn: #ff9a4d; --on-orange: #1c0d00; --orange-soft: #3b2412; --green: #74dc9f; --on-green: #04210f; --green-soft: #12351f;
  --red: #ff8a80; --red-soft: #3d1a1d; --warn-bg: #3a2b10; --warn-line: #e3a72f; --warn-ink: #ffe3b0; --focus: #ffb273; --focus-2: #ffffff; --shadow: 0 4px 18px rgba(0,0,0,.35); }
/* High contrast: pure black on white, strong outlines (or white on black in dark appearance) */
:root[data-contrast="high"] {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #ffffff; --ink: #000000; --muted: #000000; --line: #000000;
  --navy: #000000; --navy-2: #000000; --blue: #0030c0; --blue-soft: #ffffff; --on-blue: #ffffff;
  --orange: #8a3400; --orange-btn: #8a3400; --on-orange: #ffffff; --orange-soft: #ffffff; --green: #0a5a2b; --on-green: #ffffff; --green-soft: #ffffff;
  --red: #9a1408; --red-soft: #ffffff; --warn-bg: #ffffff; --warn-line: #000000; --warn-ink: #000000; --focus: #000000; --focus-2: #ffd500; --shadow: none;
}
:root[data-contrast="high"][data-theme="dark"] {
  --bg: #000000; --surface: #000000; --surface-2: #000000; --ink: #ffffff; --muted: #ffffff; --line: #ffffff;
  --navy: #000000; --navy-2: #000000; --blue: #ffe14d; --blue-soft: #000000; --on-blue: #000000;
  --orange: #ffb15c; --orange-btn: #ffb15c; --on-orange: #000000; --orange-soft: #000000; --green: #7dffad; --on-green: #000000; --green-soft: #000000;
  --red: #ff9e94; --red-soft: #000000; --warn-bg: #000000; --warn-line: #ffffff; --warn-ink: #ffffff; --focus: #ffe14d; --focus-2: #ffe14d;
}
@media (prefers-color-scheme: dark) { :root[data-contrast="high"]:not([data-theme]) {
  --bg: #000000; --surface: #000000; --surface-2: #000000; --ink: #ffffff; --muted: #ffffff; --line: #ffffff;
  --navy: #000000; --navy-2: #000000; --blue: #ffe14d; --blue-soft: #000000; --on-blue: #000000;
  --orange: #ffb15c; --orange-btn: #ffb15c; --on-orange: #000000; --orange-soft: #000000; --green: #7dffad; --on-green: #000000; --green-soft: #000000;
  --red: #ff9e94; --red-soft: #000000; --warn-bg: #000000; --warn-line: #ffffff; --warn-ink: #ffffff; --focus: #ffe14d; --focus-2: #ffe14d;
} }

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html[data-size="2"] { font-size: 125%; }
html[data-size="3"] { font-size: 143.75%; }
html[data-size="4"] { font-size: 162.5%; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.55; overflow-wrap: break-word; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.22; margin: 0; color: var(--ink); text-wrap: balance; letter-spacing: -.005em; }
h1 { font-size: 1.85rem; font-weight: 750; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--blue); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
svg { flex: none; }
:where(svg:not([width])) { width: 1.25em; height: 1.25em; vertical-align: -.22em; } /* default icon size; components override */
strong, b { font-weight: 700; }
small { font-size: .88em; }
[tabindex="-1"]:focus { outline: none; box-shadow: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--focus-2) 22%, transparent); border-radius: 6px; }
[data-contrast="high"] :focus-visible { outline-width: 4px; box-shadow: 0 0 0 8px var(--focus-2); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--surface); color: var(--ink); padding: 12px 18px; border-radius: 10px; font-weight: 700; border: 2px solid var(--focus); }
.skip:focus { top: 12px; }
.small { font-size: .9rem; } .muted { color: var(--muted); } .ok { color: var(--green); font-weight: 700; display: flex; gap: 8px; align-items: center; }
.ok svg { width: 1.3em; height: 1.3em; }
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
main { min-height: 60vh; outline: none; }
.page { display: flex; flex-direction: column; gap: 20px; padding-top: 22px; padding-bottom: 48px; }
.page.reading { max-width: 720px; font-size: 1.06rem; line-height: 1.7; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--navy); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.18); padding-top: env(safe-area-inset-top); }
[data-contrast="high"] .topbar { border-bottom: 3px solid #fff; }
.topbar-in { display: flex; align-items: center; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
.brand { flex: 1; min-width: 0; color: #fff; text-decoration: none; text-align: center; line-height: 1.15; padding: 4px; border-radius: 8px; }
.brand-name { display: block; font-family: var(--font-display); font-weight: 750; font-size: 1.02rem; }
.brand small { display: block; font-size: .7rem; opacity: .85; }
.tbtn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: var(--tap); min-height: var(--tap); padding: 4px 8px; border-radius: 12px; border: 0; background: transparent; color: #fff; font: 700 .72rem var(--font); text-decoration: none; cursor: pointer; }
.tbtn svg { width: 24px; height: 24px; }
.tbtn:hover { background: rgba(255,255,255,.12); }
.tbtn:focus-visible { outline-color: #ffb273; }
.tbtn .sz { font: 800 1.05rem/24px var(--font-display); height: 24px; }
.tb-help { background: var(--orange-btn); color: var(--on-orange); padding: 4px 12px; }
.tb-help:hover { background: var(--orange-btn); filter: brightness(1.08); }
@media (max-width: 640px) { .brand small { display: none; } .brand-name { font-size: .92rem; } .bn-1 { display: block; font-size: .78em; font-weight: 600; opacity: .9; } .topbar-in { gap: 2px; } .tbtn { padding: 4px 5px; min-width: 48px; } }
@media (max-width: 380px) { .brand-name { font-size: .8rem; } }
/* Large text on phones: the name gets its own row so nothing is squeezed, and the bar scrolls away with the page */
@media (max-width: 640px) {
  html[data-size="3"] .topbar-in, html[data-size="4"] .topbar-in { flex-wrap: wrap; justify-content: space-between; row-gap: 2px; }
  html[data-size="3"] .brand, html[data-size="4"] .brand { order: -1; flex: 1 0 100%; }
  html[data-size="3"] .bn-1, html[data-size="4"] .bn-1 { display: inline; font-size: 1em; }
  html[data-size="3"] .topbar, html[data-size="4"] .topbar { position: static; }
}
@media (max-width: 380px) {
  html[data-size="2"] .topbar-in { flex-wrap: wrap; justify-content: space-between; row-gap: 2px; }
  html[data-size="2"] .brand { order: -1; flex: 1 0 100%; }
  html[data-size="2"] .bn-1 { display: inline; font-size: 1em; }
}
@media (max-height: 500px) { .topbar { position: static; } }
body.reading-mode .topbar, body.reading-mode .foot { display: none; }

/* ---------- headings & helpers ---------- */
.phead { display: flex; flex-direction: column; gap: 10px; }
.phead h1:focus { outline: none; }
.eyebrow { font-weight: 750; color: var(--orange-btn); letter-spacing: .02em; font-size: .9rem; text-transform: none; }
[data-theme="dark"] .eyebrow { color: var(--orange); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 65ch; }
.back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-weight: 700; text-decoration: none; min-height: 48px; padding: 0 6px 0 0; }
.back svg { width: 22px; height: 22px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-v { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; background: var(--green-soft); color: var(--green); font-weight: 700; padding: 6px 12px; border-radius: 999px; font-size: .9rem; border: 1px solid transparent; }
[data-contrast="high"] .badge-v { border-color: currentColor; }
.badge-v svg { width: 18px; height: 18px; }
.review { margin-top: 8px; }
.loading { display: flex; align-items: center; gap: 12px; font-size: 1.1rem; padding: 40px 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap); padding: 10px 20px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 700 1rem/1.25 var(--font); text-decoration: none; cursor: pointer; text-align: center; }
.btn svg { width: 22px; height: 22px; }
.btn:hover { border-color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.btn.orange { background: var(--orange-btn); border-color: var(--orange-btn); color: var(--on-orange); }
.btn.yes { background: var(--green); border-color: var(--green); color: var(--on-green); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 48px; padding: 8px 14px; font-size: .95rem; border-radius: 12px; }
.btn.big { min-height: 64px; font-size: 1.1rem; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.fav.on { color: var(--red); border-color: var(--red); }
[data-contrast="high"] .btn { border-width: 3px; border-color: var(--ink); }
[data-contrast="high"] .btn.primary, [data-contrast="high"] .btn.orange, [data-contrast="high"] .btn.yes { border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions .btn { flex: 1 1 240px; }
.linkbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 0; background: none; border: 0; color: var(--blue); font: 700 .98rem var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: .15em; }
.linkbtn svg { width: 20px; height: 20px; }

/* ---------- hero, search, chips ---------- */
.hero { display: flex; flex-direction: column; gap: 14px; padding: 8px 0 4px; }
.hero h1 { font-size: 2.2rem; }
.searchbox { display: flex; flex-direction: column; gap: 8px; }
.searchbox label { font-weight: 750; font-size: 1.12rem; }
.searchrow { display: flex; gap: 10px; flex-wrap: wrap; }
.searchrow input { flex: 1 1 260px; min-width: 0; min-height: 60px; padding: 0 18px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 1.05rem var(--font); }
.searchrow input:focus { border-color: var(--blue); outline: 3px solid var(--focus); outline-offset: 2px; }
.searchrow .btn { min-height: 60px; flex: 0 0 auto; }
@media (max-width: 480px) { .searchrow .btn { flex: 1 1 100%; } }
.examples { display: flex; flex-direction: column; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 700 .95rem/1.3 var(--font); text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--blue); }
.chip[aria-pressed="true"] { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
[data-contrast="high"] .chip { border-color: var(--ink); }
.quickhelp { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--orange-soft); border: 2px solid var(--orange); color: var(--ink); text-decoration: none; }
.quickhelp > svg:first-child { width: 36px; height: 36px; color: var(--orange-btn); }
.quickhelp span { flex: 1; display: flex; flex-direction: column; }
.quickhelp b { font-size: 1.15rem; } .quickhelp small { color: var(--muted); }
.quickhelp > svg:last-child { width: 24px; height: 24px; }
.quickhelp.soft { background: var(--surface-2); border-color: var(--line); }
.quickhelp.soft > svg:first-child { color: var(--blue); }

/* ---------- home doors ---------- */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 700px) { .doors { grid-template-columns: 1fr; } }
.door { display: flex; align-items: center; gap: 16px; min-height: 112px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.door:hover { border-color: var(--blue); }
[data-contrast="high"] .door { border: 3px solid var(--ink); }
.door-ic { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; color: #fff; flex: none; }
.door-ic svg { width: 34px; height: 34px; }
.d-ask { background: #1557c0; } .d-learn { background: #0b2d72; } .d-practice { background: #2a6f97; } .d-fix { background: #b54700; } .d-video { background: #a3245a; } .d-progress { background: #1a7543; }
[data-theme="dark"] .door-ic { filter: brightness(1.15); }
.door-t { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.door-t b { font-size: 1.25rem; font-family: var(--font-display); }
.door-t small { color: var(--muted); font-size: .95rem; }
.door > svg { width: 26px; height: 26px; color: var(--muted); }
.home-more { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

/* ---------- cards, rows, notes ---------- */
.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card.soft { background: var(--surface-2); }
[data-contrast="high"] .card { border: 3px solid var(--ink); }
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.row:hover { border-color: var(--blue); }
[data-contrast="high"] .row { border-color: var(--ink); }
.row-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.row-t b { font-size: 1.05rem; } .row-t small { color: var(--muted); }
.row > svg { width: 22px; height: 22px; color: var(--muted); }
.row-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.row-ic svg { width: 24px; height: 24px; }
.row-n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 800; flex: none; }
.row-wrap { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; } .row-wrap .row { flex: 1 1 240px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; padding: 6px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); white-space: nowrap; }
.badge.done { background: var(--green-soft); color: var(--green); } .badge.tried { background: var(--orange-soft); color: var(--orange-btn); }
.badge svg { width: 16px; height: 16px; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 2px solid transparent; }
.note-ic svg { width: 26px; height: 26px; }
.note-t { font-weight: 800; }
.note.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.note.tip { background: var(--blue-soft); color: var(--ink); }
.note.info { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.note.good { background: var(--green-soft); }
[data-contrast="high"] .note { border-color: var(--ink); }
.plain { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; }
.links { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; }
.ext { font-weight: 700; display: inline; }
.ext svg { width: .95em; height: .95em; margin-left: 4px; vertical-align: -1px; }
.hw { display: inline-block; font-weight: 750; padding: 0 .45em; border-radius: 8px; border: 2px solid currentColor; line-height: 1.35; font-size: .95em; white-space: nowrap; }
.filter { display: flex; flex-direction: column; gap: 6px; max-width: 640px; }
.filter label { font-weight: 750; }
.filter input { min-height: 56px; padding: 0 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 1.02rem var(--font); }
.group { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.group h2 { font-size: 1.15rem; color: var(--muted); }

/* ---------- steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; font-size: 1.08rem; }
.steps-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--blue); color: var(--on-blue); font: 800 1.05rem var(--font-display); }
.steps li > div { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
.h-expect { margin-top: 8px; }
.ans-h { margin-top: 6px; }
.basics { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; }

/* ---------- answers ---------- */
.answer { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.answer.ai { border-color: var(--blue); }
.answer-kind { display: inline-flex; align-items: flex-start; gap: 8px; align-self: flex-start; font-weight: 700; font-size: .92rem; padding: 6px 12px; border-radius: 12px; background: var(--surface-2); }
.answer-kind svg { width: 20px; height: 20px; margin-top: 1px; }
.answer-kind.good { background: var(--green-soft); color: var(--green); }
.answer-kind.ai { background: var(--blue-soft); color: var(--ink); }
.ans-intro { font-size: 1.08rem; }
.profile-line { display: block; margin-top: 4px; }
.profile-line svg { width: 20px; height: 20px; vertical-align: -4px; margin-right: 6px; }
.thinking { flex-direction: row; align-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 4px solid var(--blue-soft); border-top-color: var(--blue); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-offer { margin-top: -4px; }
.followup { margin-top: 4px; }
.more-help h2 { font-size: 1.15rem; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.help-opt { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 700 1rem/1.25 var(--font); text-decoration: none; cursor: pointer; text-align: left; }
.help-opt:hover { border-color: var(--blue); }
.help-opt svg { width: 24px; height: 24px; color: var(--blue); }
[data-contrast="high"] .help-opt { border-color: var(--ink); }
.simple-box { background: var(--green-soft); border-radius: 14px; padding: 14px 16px; }
.simple-text { font-size: 1.12rem; font-weight: 600; }
.choice-row, .choices { display: flex; flex-direction: column; gap: 10px; }
.choice { min-height: 56px; padding: 10px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 700 1.02rem/1.3 var(--font); cursor: pointer; text-align: left; }
.choice.big { min-height: 64px; font-size: 1.08rem; }
.choice:hover { border-color: var(--blue); }
.choice.on, .choice[aria-pressed="true"] { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
[data-contrast="high"] .choice { border-color: var(--ink); }
.conf-result { display: flex; flex-direction: column; gap: 10px; }
.video-suggest .vs-link { display: flex; gap: 14px; align-items: center; color: var(--ink); text-decoration: none; }
.video-suggest img { width: 160px; border-radius: 10px; flex: none; background: var(--surface-2); }
.video-suggest .vs-link span { display: flex; flex-direction: column; }
.video-suggest small { color: var(--muted); }
@media (max-width: 480px) { .video-suggest .vs-link { flex-direction: column; align-items: flex-start; } .video-suggest img { width: 100%; } }
.dots { display: flex; gap: 8px; flex-wrap: wrap; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); display: block; }
.dots i.on { background: var(--orange); } .dots i.done { background: var(--blue); }
.guided-step .g-text { font-size: 1.35rem; font-weight: 600; line-height: 1.45; }
.g-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-btns2 { display: flex; gap: 12px; flex-wrap: wrap; }
.g-btns2 .btn { flex: 1 1 160px; }
@media (max-width: 480px) { .g-btns { grid-template-columns: 1fr; } }
.question { font-weight: 750; font-size: 1.15rem; }
.expect { padding: 12px 14px; background: var(--green-soft); border-radius: 12px; }
.erase-flag { display: flex; gap: 8px; align-items: center; color: var(--red); background: var(--red-soft); padding: 10px 12px; border-radius: 12px; font-weight: 600; }
.erase-flag svg { width: 24px; height: 24px; }
.result { align-items: flex-start; }
.big-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; }
.big-ic svg { width: 36px; height: 36px; }
.big-ic.good { background: var(--green-soft); color: var(--green); }
.big-ic.help { background: var(--orange-soft); color: var(--orange-btn); }
.prevnext { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.prevnext .btn { flex: 1 1 260px; justify-content: flex-start; }
.prevnext .btn:last-child { justify-content: flex-end; }
.objective { padding: 10px 14px; border-left: 5px solid var(--orange); background: var(--orange-soft); border-radius: 8px; }
details.explain summary, .faq-item summary { cursor: pointer; font-weight: 750; min-height: 48px; display: flex; align-items: center; }

/* ---------- learn / topics ---------- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tcard { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.tcard:hover { border-color: var(--blue); }
[data-contrast="high"] .tcard { border-color: var(--ink); }
.tcard span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.tcard small { color: var(--muted); }
.tcard-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.tcard-ic svg { width: 28px; height: 28px; }
.tcard > svg { width: 22px; height: 22px; color: var(--muted); }
.pathgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pathcard { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.pathcard b { font-size: 1.15rem; } .pathcard small { color: var(--muted); }
.pathcard:hover { border-color: var(--blue); }
.pathlist, .daily { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pbar { display: flex; align-items: center; gap: 12px; }
.pbar progress { flex: 1; min-width: 0; width: 100%; height: 16px; border-radius: 999px; overflow: hidden; appearance: none; -webkit-appearance: none; border: 0; background: var(--blue-soft); }
.pbar progress::-webkit-progress-bar { background: var(--blue-soft); border-radius: 999px; }
.pbar progress::-webkit-progress-value { background: var(--orange); border-radius: 999px; }
.pbar progress::-moz-progress-bar { background: var(--orange); border-radius: 999px; }
[data-contrast="high"] .pbar progress { border: 2px solid var(--ink); }
.pbar-t { font-weight: 700; white-space: nowrap; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; }
.stat b { font-size: 1.6rem; font-family: var(--font-display); color: var(--blue); }
.lvline { padding: 4px 0; }
.level { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.exgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.excard { display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.excard:hover { border-color: var(--blue); }
[data-contrast="high"] .excard { border-color: var(--ink); }
.excard-n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--blue); font-weight: 800; flex: none; }
.excard-t { flex: 1; display: flex; flex-direction: column; } .excard-t small { color: var(--muted); }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.qitem { display: flex; align-items: center; min-height: 60px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2); color: var(--ink); font-weight: 700; text-decoration: none; }
.qitem:hover { border-color: var(--blue); }
.qitem.warn { background: var(--orange-soft); }

/* ---------- forms (settings) ---------- */
.radios { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.radios legend { font-weight: 800; font-size: 1.1rem; padding: 0; margin-bottom: 4px; }
.radio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.radio { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 60px; padding: 10px 14px 10px 52px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; }
.radio small { font-weight: 500; color: var(--muted); }
.radio input { position: absolute; left: 16px; top: 50%; width: 24px; height: 24px; margin: -12px 0 0; accent-color: var(--blue); }
.radio.on { border-color: var(--blue); background: var(--blue-soft); }
[data-contrast="high"] .radio { border-color: var(--ink); } [data-contrast="high"] .radio.on { border-width: 4px; }
.radio:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.sample { font-size: 1.05rem; padding: 10px 14px; background: var(--surface-2); border-radius: 12px; }

/* ---------- dialog (Show Me Where to Tap) ---------- */
.dlg { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 3px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink); }
.dlg::backdrop { background: rgba(5, 12, 30, .6); }
.dlg-in { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dlg-step { font-size: 1.08rem; font-weight: 600; }
.dlg-phone { display: flex; justify-content: center; }

/* ---------- read-aloud bar ---------- */
.reader { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 18px; background: var(--navy); color: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.3); max-width: calc(100vw - 24px); }
.reader .btn { min-height: 48px; color: var(--ink); }
.reader .btn.ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.rd-state { font-weight: 700; margin-right: 6px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 24px 0 calc(32px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .92rem; }
.foot .wrap { display: flex; flex-direction: column; gap: 10px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot nav a { font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Watch & Learn ---------- */
.vgroup { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.vcard { display: flex; flex-direction: column; border: 2px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
[data-contrast="high"] .vcard { border-color: var(--ink); }
.vthumb { position: relative; display: block; aspect-ratio: 16/9; background: #111; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vplay { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.vplay svg { width: 56px; height: 56px; padding: 14px; border-radius: 50%; background: rgba(0,0,0,.6); }
.vbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.vbody .btn { margin-top: auto; }
.player { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #000; }
.facade img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.facade-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; background: #c4001d; color: #fff; font: 800 1.1rem var(--font); box-shadow: 0 6px 20px rgba(0,0,0,.4); white-space: nowrap; }
.facade-btn svg { width: 26px; height: 26px; }

/* ---------- print sheets ---------- */
.sheet { width: 100%; border-collapse: collapse; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.sheet th, .sheet td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sheet thead th { background: var(--surface-2); }
.sheet tbody th { width: 40%; }
.sheet tbody th span { vertical-align: middle; }
.glyph { width: 28px; height: 28px; vertical-align: middle; margin-right: 8px; }
@media (max-width: 560px) { .sheet tbody th, .sheet td { display: block; width: auto; } .sheet thead { display: none; } .sheet td { padding-top: 0; } }

/* ---------- exercises ---------- */
.exarea { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; }
[data-contrast="high"] .exarea { border-color: var(--ink); }
.ex-instr { display: flex; flex-direction: column; gap: 4px; }
.ex-count { font-weight: 750; color: var(--muted); font-size: .92rem; }
.ex-say { font-size: 1.25rem; font-weight: 600; line-height: 1.4; outline: none; }
.ex-feedback { min-height: 0; display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; }
.ex-feedback:not(:empty) { padding: 12px 14px; }
.ex-feedback.good { background: var(--green-soft); color: var(--ink); }
.ex-feedback.bad { background: var(--orange-soft); color: var(--ink); }
.ex-feedback.tip { background: var(--blue-soft); color: var(--ink); }
.ex-fb-ic svg { width: 24px; height: 24px; }
.ex-feedback.good .ex-fb-ic { color: var(--green); } .ex-feedback.bad .ex-fb-ic { color: var(--orange-btn); } .ex-feedback.tip .ex-fb-ic { color: var(--blue); }
.ex-stage { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.ex-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.ex-tools .btn { flex: 1 1 160px; }
.ex-alt { display: flex; justify-content: center; }
.ex-altnote { text-align: center; font-weight: 600; }
.sim { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sim-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); border: 2px solid var(--warn-line); font-weight: 750; font-size: .9rem; text-align: left; }
.sim-badge svg { width: 22px; height: 22px; }
.quiz-opts { display: grid; gap: 10px; width: 100%; }
.quiz-opts.visual { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quiz-opts.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .quiz-opts.visual { grid-template-columns: 1fr 1fr; } .quiz-opts.two { grid-template-columns: 1fr; } }
.opt { display: flex; align-items: center; gap: 10px; text-align: left; min-height: 60px; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 700 1.02rem/1.3 var(--font); cursor: pointer; }
.quiz-opts.visual .opt { flex-direction: column; text-align: center; }
.opt:hover:not(:disabled) { border-color: var(--blue); }
.opt svg { width: 24px; height: 24px; }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.wrong { border-color: var(--red); background: var(--red-soft); opacity: .85; }
.opt:disabled { cursor: default; }
[data-contrast="high"] .opt { border-color: var(--ink); } [data-contrast="high"] .opt.right { border-width: 4px; }
.opt-phone { display: block; pointer-events: none; width: 100%; max-width: 150px; margin: 0 auto; container-type: inline-size; }
.quiz-opts.visual .opt { min-width: 0; padding: 10px 8px; }
.pad { position: relative; width: 100%; max-width: 520px; height: 300px; border-radius: 20px; border: 3px dashed var(--line); background: var(--surface-2); touch-action: none; user-select: none; -webkit-user-select: none; }
.tap-target { position: absolute; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.tap-target span { width: 64px; height: 64px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 8px color-mix(in srgb, var(--orange) 30%, transparent); }
.swipe-pad { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--blue); }
.swipe-arrow svg { width: 96px; height: 96px; }
.swipe-word { font-weight: 800; font-size: 1.3rem; color: var(--ink); }
.swipe-alt { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sort-msg { width: 100%; max-width: 480px; background: #eef1f6; color: #111; border-radius: 22px; padding: 16px 18px; border: 2px solid #d6dbe6; }
.sort-from { font-weight: 800; font-size: .95rem; color: #3a3f4c; margin-bottom: 6px; }
.sort-text { font-size: 1.12rem; line-height: 1.45; }

/* hardware buttons drawing */
.hw-phone { position: relative; width: 210px; height: 400px; margin: 30px 80px 50px; }
.hw-body { position: absolute; inset: 0; border-radius: 38px; border: 8px solid #1f2430; background: #2b3242; }
.hw-screen { position: absolute; inset: 6px; border-radius: 28px; background: linear-gradient(180deg, #3b6cc9, #183a86); }
.hw-island { position: absolute; z-index: 1; left: 50%; top: 14px; width: 62px; height: 18px; margin-left: -31px; border-radius: 999px; background: #0b0d12; }
.hw-btn { position: absolute; width: 56px; padding: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; }
.hw-btn span { display: block; border-radius: 6px; background: #8b93a5; border: 2px solid #5d6577; }
.hw-btn:hover span { background: #b8c0d2; }
.hw-btn.found span { background: var(--green); border-color: var(--green); }
.hw-btn.sim-glow span { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 6px color-mix(in srgb, var(--orange) 40%, transparent); }
.hw-l1, .hw-l2, .hw-l3 { left: -56px; justify-content: flex-end; }
.hw-r1, .hw-r2 { right: -56px; justify-content: flex-start; }
.hw-l1 { top: 74px; height: 48px; } .hw-l1 span { width: 9px; height: 32px; }
.hw-l2 { top: 130px; height: 56px; } .hw-l2 span { width: 9px; height: 46px; }
.hw-l3 { top: 192px; height: 56px; } .hw-l3 span { width: 9px; height: 46px; }
.hw-r1 { top: 120px; height: 72px; } .hw-r1 span { width: 9px; height: 64px; }
.hw-r2 { top: 250px; height: 52px; } .hw-r2 span { width: 9px; height: 38px; }
.hw-b1 { left: 50%; bottom: -46px; width: 80px; height: 46px; margin-left: -40px; justify-content: center; align-items: flex-start; }
.hw-b1 span { width: 38px; height: 9px; margin-top: 0; }
.hw-lbl { position: absolute; font-weight: 750; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.hw-lbl-l { left: -76px; top: 30px; } .hw-lbl-r { right: -80px; top: 80px; } .hw-lbl-b { left: 50%; bottom: -74px; transform: translateX(-50%); }
@media (max-width: 400px) { .hw-phone { margin: 30px 70px 56px; width: 170px; height: 340px; } .hw-r2 { top: 210px; } .hw-lbl-l { left: -68px; } .hw-lbl-r { right: -68px; } }
@media (max-width: 360px) { .hw-phone { margin: 44px 50px 56px; width: 130px; height: 300px; } .hw-l1, .hw-l2, .hw-l3 { left: -48px; width: 48px; } .hw-r1, .hw-r2 { right: -48px; width: 48px; } .hw-r2 { top: 196px; }
  .hw-lbl-l { left: -46px; top: -34px; } .hw-lbl-r { right: -46px; top: -34px; } }

/* ---------- practice phone (simplified drawings) ---------- */
.sim-phone { --sim-ink: #111318; --sim-muted: #6c707a; --sim-line: #d9dbe1; --sim-bg: #f2f2f7; --sim-card: #ffffff; --sim-blue: #0a66d6; --sim-green: #1f9d4c; --sim-red: #d42e2e;
  position: relative; width: min(100%, 340px); height: 640px; font-size: 15px; line-height: 1.3; color: var(--sim-ink); background: var(--sim-bg); border: .6em solid #1b1e25; border-radius: 3em; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(10, 20, 50, .25); font-family: var(--font); }
html[data-size="2"] .sim-phone { font-size: 16px; height: 680px; } html[data-size="3"] .sim-phone { font-size: 17px; height: 720px; } html[data-size="4"] .sim-phone { font-size: 18px; height: 760px; }
.sim-phone.mini { width: 150px; height: 300px; font-size: 6.6px; border-width: .7em; box-shadow: none; pointer-events: none; }
@supports (width: 1cqw) { .opt-phone .sim-phone.mini { width: 100cqw; height: 200cqw; font-size: 4.4cqw; } }
.sim-phone.diagram { width: min(100%, 320px); height: 560px; }
.sim-phone.context { opacity: .75; }
.sim-island { position: absolute; top: .55em; left: 50%; width: 6.4em; height: 1.75em; margin-left: -3.2em; border-radius: 999px; background: #0a0b0e; z-index: 6; pointer-events: none; }
.sim-status { flex: none; height: 2.8em; display: flex; align-items: center; justify-content: space-between; padding: .4em 1.6em 0; font-weight: 700; font-size: .95em; }
.sim-st-r { display: flex; align-items: center; gap: .35em; }
.sim-sig { display: inline-flex; align-items: flex-end; gap: 1px; height: .8em; } .sim-sig i { width: .2em; background: currentColor; border-radius: 1px; }
.sim-sig i:nth-child(1) { height: 30%; } .sim-sig i:nth-child(2) { height: 55%; } .sim-sig i:nth-child(3) { height: 80%; } .sim-sig i:nth-child(4) { height: 100%; }
.sim-wifi { font-size: .9em; transform: translateY(-.1em); }
.sim-batt { width: 1.7em; height: .85em; border: 1.5px solid currentColor; border-radius: .25em; padding: 1px; display: inline-flex; }
.sim-batt i { width: 80%; background: currentColor; border-radius: 1px; } .sim-batt.low i { background: #e6a800; }
.sim-pct { font-size: .85em; }
.sim-screen { flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; display: flex; flex-direction: column; overscroll-behavior: contain; }
.sim-screen.swiping { touch-action: none; overflow: hidden; }
.sim-dim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 5; transition: opacity .2s; }
.sim-homebar { position: absolute; bottom: .45em; left: 50%; width: 8.5em; height: .32em; margin-left: -4.25em; border-radius: 999px; background: #111; opacity: .8; z-index: 6; pointer-events: none; }
.sim-phone button { font: inherit; color: inherit; cursor: pointer; }
.sim-phone input { font: inherit; }
.sim-hl { outline: .22em solid #ff6a00 !important; outline-offset: .1em; position: relative; z-index: 3; box-shadow: 0 0 0 .5em rgba(255, 106, 0, .3) !important; border-radius: .6em; }
.sim-mark { position: absolute; top: -.7em; right: -.7em; width: 1.9em; height: 1.9em; border-radius: 50%; background: #ff6a00; color: #fff; font: 800 1em/1.9em var(--font); text-align: center; z-index: 4; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.sim-glow { animation: glow 1.4s ease-in-out infinite; outline: .2em solid #ff6a00; outline-offset: .1em; border-radius: .6em; }
@keyframes glow { 50% { box-shadow: 0 0 0 .6em rgba(255, 106, 0, .35); } }
.sim-phone :focus-visible { outline: .2em solid #ff6a00; outline-offset: .1em; }
/* home */
.s-home { flex: 1; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(170deg, #5aa0f0 0%, #3561c9 55%, #23356e 100%); padding: .8em .9em 1.6em; position: relative; }
.s-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1em .5em; padding-top: .4em; }
.s-app { display: flex; flex-direction: column; align-items: center; gap: .3em; background: none; border: 0; padding: .15em; border-radius: .9em; color: #fff; min-width: 0; }
.s-app-ic { width: 3.6em; height: 3.6em; border-radius: .95em; display: grid; place-items: center; box-shadow: 0 .1em .3em rgba(0,0,0,.25); overflow: hidden; }
.s-app-ic svg { width: 2.4em; height: 2.4em; }
.s-app-name { font-size: .72em; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.s-dock { display: flex; justify-content: space-around; padding: .7em .6em; border-radius: 1.6em; background: rgba(255,255,255,.28); }
.s-zone { position: absolute; z-index: 2; background: transparent; border: 0; padding: 0; }
.sim-screen:not(.swiping) .s-zone:not(.sim-hl) { pointer-events: none; visibility: hidden; } /* swipe areas exist only during swipe steps, so they never block taps */
.s-zone.z-tr { top: 0; right: 0; width: 42%; height: 3.2em; }
.s-zone.z-mid { left: 18%; right: 18%; top: 38%; height: 26%; z-index: 0; }
.s-zone.z-bot { left: 0; right: 0; bottom: 0; height: 2.6em; z-index: 4; }
.s-zone.show, .s-zone.sim-glow, .s-zone.sim-hl { background: rgba(255, 106, 0, .28); border: .15em dashed #ff6a00; border-radius: .8em; }
.s-zone.show span::after, .s-zone.sim-hl span::after { content: "⇣"; color: #fff; font-size: 1.6em; font-weight: 800; text-shadow: 0 1px 3px #000; }
.s-zone.z-bot.show span::after, .s-zone.z-bot.sim-hl span::after { content: "⇡"; }
/* lock */
.s-lock { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .5em; padding: 1.2em 1em 3em; background: linear-gradient(180deg, #3e6fd6, #1b2f6e); color: #fff; position: relative; }
.s-lock-date { font-weight: 600; } .s-lock-time { font-size: 4.2em; font-weight: 700; line-height: 1; }
.s-notif { margin-top: 1.4em; width: 100%; text-align: left; display: flex; flex-direction: column; gap: .2em; padding: .8em 1em; border-radius: 1.2em; background: rgba(255,255,255,.88); color: #111; border: 0; }
.s-notif-warn { background: #fff; }
.s-lock-hint { margin-top: auto; font-size: .85em; opacity: .9; }
/* generic iOS-like parts (simplified) */
.s-nav { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .4em; padding: .5em .8em; min-height: 2.9em; }
.s-nav > :last-child { justify-self: end; }
.s-back, .s-navbtn { background: none; border: 0; color: var(--sim-blue) !important; font-weight: 600; padding: .4em .3em; border-radius: .5em; justify-self: start; white-space: nowrap; }
.s-navbtn { font-size: 1.05em; }
.s-compose { font-size: 1.4em; }
.s-nav-title { font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-big { font-size: 2em; font-weight: 800; padding: .4em .8em .3em; color: var(--sim-ink); font-family: var(--font-display); }
.s-group { margin: .5em .8em; background: var(--sim-card); border-radius: .9em; overflow: hidden; }
.s-group-h { margin: .9em 1.6em .1em; font-size: .78em; color: var(--sim-muted); text-transform: uppercase; letter-spacing: .03em; }
.s-row { width: 100%; display: flex; align-items: center; gap: .7em; min-height: 3em; padding: .55em .9em; background: var(--sim-card); border: 0; border-bottom: 1px solid var(--sim-line); text-align: left; color: var(--sim-ink); }
.s-group > :last-child, .s-group > .s-row:last-child { border-bottom: 0; }
.s-row-label { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.s-row-label small { color: var(--sim-muted); font-size: .82em; }
.s-row-val { color: var(--sim-muted); font-size: .92em; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.s-row-ic { width: 1.9em; height: 1.9em; border-radius: .5em; display: grid; place-items: center; flex: none; }
.s-row-ic svg { width: 1.3em; height: 1.3em; }
.s-chev { color: #b7b9c0; font-size: 1.3em; line-height: 1; }
.s-check { color: var(--sim-blue); font-weight: 800; }
.s-info { color: var(--sim-blue); }
.s-row-toggle { gap: .6em; }
.s-switch { width: 3.2em; height: 1.95em; border-radius: 999px; background: #e3e3e8; border: 0; padding: .15em; display: inline-flex; flex: none; transition: background .2s; }
.s-switch span { width: 1.65em; height: 1.65em; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.s-switch.on { background: #34c759; } .s-switch.on span { transform: translateX(1.25em); }
.s-account { width: calc(100% - 1.6em); margin: .3em .8em; display: flex; align-items: center; gap: .7em; padding: .7em .9em; border-radius: .9em; background: var(--sim-card); border: 0; text-align: left; color: var(--sim-ink); }
.s-account span:nth-child(2) { flex: 1; display: flex; flex-direction: column; } .s-account small { color: var(--sim-muted); font-size: .8em; }
.s-avatar { width: 2.4em; height: 2.4em; border-radius: 50%; display: inline-grid; place-items: center; background: #a5adbb; color: #fff; font-weight: 800; flex: none; }
.s-av-s { background: #e87a3c; } .s-av-big { width: 4em; height: 4em; font-size: 1.4em; }
.s-sfield-wrap { padding: 0 .8em; }
.s-field { display: flex; flex-direction: column; gap: .2em; margin: .3em 0; }
.s-field-l { font-size: .78em; color: var(--sim-muted); }
.s-field input { width: 100%; min-height: 2.5em; padding: .4em .7em; border-radius: .6em; border: 1px solid var(--sim-line); background: #e9e9ee; color: var(--sim-ink); }
.s-field input:focus { outline: .15em solid var(--sim-blue); background: #fff; }
.s-pad { padding: .5em .9em; }
.s-muted { color: var(--sim-muted); font-size: .88em; }
.s-center { text-align: center; }
.s-ok { color: var(--sim-green); font-weight: 700; }
.s-spacer { flex: 1; }
.s-slider { display: flex; flex-direction: column; gap: .3em; width: 100%; padding: .4em 0; }
.s-slider-label { font-size: .82em; color: var(--sim-muted); }
.s-slider-row { display: flex; align-items: center; gap: .5em; }
.s-slider input[type=range] { flex: 1; min-width: 0; height: 2.4em; accent-color: var(--sim-blue); }
.s-a-small { font-size: .8em; } .s-a-big { font-size: 1.4em; font-weight: 700; }
.s-textprev { padding: 1em 1.2em; } .s-textprev p { transition: font-size .15s; }
.s-appear { display: flex; justify-content: space-around; padding: .8em; }
.s-appear-opt { display: flex; flex-direction: column; align-items: center; gap: .3em; background: none; border: .15em solid transparent; border-radius: .8em; padding: .4em .8em; color: var(--sim-ink); font-weight: 600; }
.s-appear-opt.on { border-color: var(--sim-blue); }
.s-ap-l, .s-ap-d { width: 3em; height: 5em; border-radius: .6em; border: 1px solid #ccc; } .s-ap-l { background: #fff; } .s-ap-d { background: #1c1c1e; }
.s-bars { display: flex; align-items: flex-end; gap: .5em; height: 4.5em; padding: .3em 0; } .s-bar { flex: 1; background: #34c759; border-radius: .2em .2em 0 0; }
/* control center */
.s-cc { flex: 1; display: flex; flex-direction: column; background: linear-gradient(180deg, #4a5872, #1e2533); color: #fff; padding: .8em; gap: .8em; }
.s-cc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7em; }
.s-cc-box { grid-column: 1; display: grid; grid-template-columns: 1fr 1fr; gap: .45em; background: rgba(255,255,255,.18); border-radius: 1.2em; padding: .5em; }
.s-cc-sliders { grid-column: 2; display: flex; gap: .5em; justify-content: center; }
.s-cc-tile { min-height: 3.6em; border-radius: 1em; border: 0; background: rgba(255,255,255,.2); color: #fff !important; font-size: .72em; font-weight: 700; padding: .4em; display: flex; align-items: center; justify-content: center; text-align: center; }
.s-cc-tile.on { background: #fff; color: #0a3d91 !important; }
.s-cc-tile.wide { grid-column: span 1; min-height: 3.4em; font-size: .78em; }
.s-cc-tile[data-t="tile-silent"].on { background: #ff9f0a; color: #fff !important; }
.s-vert { width: 4.2em; align-items: center; color: #fff; } .s-vert .s-slider-label { color: #fff; font-size: .7em; text-align: center; }
.s-vert .s-slider-row { flex-direction: column-reverse; height: 9em; justify-content: center; }
.s-vert input[type=range] { writing-mode: vertical-lr; direction: rtl; width: 2.6em; height: 8em; flex: none; }
.s-cc-empty { margin-top: auto; min-height: 5em; border: .12em dashed rgba(255,255,255,.35); border-radius: 1em; background: transparent; color: rgba(255,255,255,.8) !important; font-size: .82em; }
/* calculator */
.s-appopen { flex: 1; display: flex; flex-direction: column; background: #000; color: #fff; position: relative; }
.s-appopen .s-nav { color: #fff; } .s-calc { padding: .8em; display: flex; flex-direction: column; gap: .6em; flex: 1; justify-content: flex-end; padding-bottom: 3em; }
.s-calc-disp { font-size: 3.2em; text-align: right; } .s-calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5em; }
.s-calc-keys span { aspect-ratio: 1; border-radius: 50%; background: #333; display: grid; place-items: center; font-size: 1.3em; }
.s-calc-keys span:nth-child(4n) { background: #ff9f0a; }
/* phone */
.s-tabs { flex: none; margin-top: auto; display: flex; justify-content: space-around; border-top: 1px solid var(--sim-line); background: #f9f9fb; padding: .25em .2em 1.4em; }
.s-tab { flex: 1; background: none; border: 0; padding: .55em .1em; font-size: .7em; font-weight: 600; color: #8a8d96 !important; border-radius: .5em; }
.s-tab.on { color: var(--sim-blue) !important; }
.s-keypad { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6em; padding: .4em; }
.s-digits { font-size: 1.9em; min-height: 1.4em; font-weight: 500; }
.s-keys { display: grid; grid-template-columns: repeat(3, 4.4em); gap: .55em .9em; }
.s-key { width: 4.4em; height: 4.4em; border-radius: 50%; border: 0; background: #e5e5ea; font-size: 1em; font-weight: 500; }
.s-key { font-size: 1.15em; width: 3.9em; height: 3.9em; }
.s-keys-bottom { display: grid; grid-template-columns: repeat(3, 4.4em); gap: .9em; align-items: center; justify-items: center; }
.s-call, .s-accept { width: 4.2em; height: 4.2em; border-radius: 50%; border: 0; background: #34c759; display: grid; place-items: center; }
.s-call svg, .s-accept svg, .s-decline svg, .s-endcall svg { width: 2em; height: 2em; }
.s-del { background: none; border: 0; font-size: 1.5em; color: #888 !important; }
.s-callscreen { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3em; padding: 2.2em 1em 2em; background: linear-gradient(180deg, #4d5b78, #22293a); color: #fff; }
.s-call-name { font-size: 1.9em; font-weight: 600; } .s-call-time { opacity: .8; }
.s-call-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1em 1.2em; margin-top: auto; }
.s-cbtn-w { display: flex; flex-direction: column; align-items: center; gap: .25em; font-size: .78em; }
.s-cbtn { width: 4.4em; height: 4.4em; border-radius: 50%; border: 0; background: rgba(255,255,255,.22); color: #fff !important; font-size: 1.15em; font-weight: 800; }
.s-cbtn.on { background: #fff; color: #222 !important; }
.s-endcall { margin-top: 1.4em; width: 4.4em; height: 4.4em; border-radius: 50%; border: 0; background: #ff3b30; display: grid; place-items: center; }
.s-endcall svg, .s-decline svg { transform: rotate(135deg); }
.s-endsmall { margin-top: 0; width: 3.6em; height: 3.6em; }
.s-call-cap { font-size: .8em; opacity: .85; }
.s-incoming .s-inc-btns { display: flex; justify-content: space-around; width: 100%; margin-top: auto; }
.s-inc { display: flex; flex-direction: column; align-items: center; gap: .3em; font-size: .85em; }
.s-decline { width: 4.2em; height: 4.2em; border-radius: 50%; border: 0; background: #ff3b30; display: grid; place-items: center; }
.s-incoming .s-muted { color: #dfe3ec; margin-top: 1em; }
.s-row-call { padding: 0; gap: 0; }
.s-callrow { flex: 1; display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: .55em .9em; min-height: 3.2em; color: var(--sim-ink); }
.s-callrow small { color: var(--sim-muted); font-size: .8em; }
.s-missed b { color: var(--sim-red); }
.s-missed-label { color: var(--sim-red); font-weight: 700; }
.s-infobtn { background: none; border: 0; color: var(--sim-blue) !important; font-size: 1.4em; padding: .3em .6em; min-width: 2.2em; min-height: 2.2em; }
.s-danger, .s-danger .s-row-label { color: var(--sim-red) !important; }
/* messages */
.s-convo { gap: .5em; }
.s-dot { width: .7em; height: .7em; border-radius: 50%; background: var(--sim-blue); flex: none; } .s-dot-off { width: .7em; flex: none; }
.s-to { display: flex; gap: .5em; align-items: center; padding: .6em .9em; border-bottom: 1px solid var(--sim-line); background: var(--sim-card); }
.s-to span { color: var(--sim-muted); }
.s-bubbles { flex: 1; display: flex; flex-direction: column; gap: .5em; padding: .8em; }
.s-bubble { max-width: 78%; padding: .55em .8em; border-radius: 1.1em; font-size: .95em; }
.s-bubble.in { align-self: flex-start; background: #e5e5ea; color: #111; }
.s-bubble.out { align-self: flex-end; background: #0a84ff; color: #fff; }
.s-bubble-pic { padding: .25em; background: #0a84ff; } .s-bpic { width: 7em; height: 7em; border-radius: .8em; display: block; }
.s-composer { flex: none; display: flex; align-items: center; gap: .4em; padding: .5em .6em 1.6em; background: #f9f9fb; border-top: 1px solid var(--sim-line); }
.s-plus { width: 2.3em; height: 2.3em; border-radius: 50%; border: 0; background: #e5e5ea; font-size: 1.2em; font-weight: 700; flex: none; }
.s-msgfield { flex: 1; display: flex; flex-direction: column; gap: .2em; min-width: 0; border: 1px solid var(--sim-line); border-radius: 1.2em; padding: .2em .6em; background: #fff; }
.s-msgfield input { border: 0; outline: 0; min-height: 2em; width: 100%; background: transparent; color: #111; }
.s-attach-pic { width: 4em; height: 4em; border-radius: .6em; display: block; }
.s-send { width: 2.3em; height: 2.3em; border-radius: 50%; border: 0; background: #0a84ff; color: #fff !important; font-weight: 800; flex: none; }
.s-menu { margin: auto .8em 1.6em; background: var(--sim-card); border-radius: 1em; overflow: hidden; box-shadow: 0 .3em 1em rgba(0,0,0,.2); }
.s-menu-item { width: 100%; text-align: left; padding: .8em 1em; border: 0; border-bottom: 1px solid var(--sim-line); background: var(--sim-card); font-weight: 600; min-height: 3em; }
.s-pics { display: grid; grid-template-columns: repeat(2, 1fr); gap: .3em; padding: .3em; }
.s-pics-3 { grid-template-columns: repeat(3, 1fr); }
.s-picbtn { position: relative; padding: 0; border: 0; background: none; aspect-ratio: 1; border-radius: .3em; overflow: hidden; }
.s-pic { width: 100%; height: 100%; display: block; }
.s-sel { outline: .2em solid var(--sim-blue); }
.s-days { position: absolute; left: .3em; bottom: .3em; font-size: .65em; color: #fff; background: rgba(0,0,0,.55); padding: .1em .4em; border-radius: .4em; }
/* facetime */
.s-pill { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 2.6em; padding: .4em 1em; border-radius: 999px; border: 0; background: #e5e5ea; font-weight: 700; }
.s-pill svg { width: 1.4em; height: 1.4em; }
.s-green { background: #34c759; color: #fff !important; } .s-blue { background: #0a84ff; color: #fff !important; }
.s-btnrow { display: flex; gap: .6em; justify-content: center; }
.s-ftcall { flex: 1; position: relative; display: flex; flex-direction: column; background: linear-gradient(180deg, #6a7aa0, #2b3247); color: #fff; }
.s-ft-remote { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5em; }
.s-ft-self { position: absolute; top: 1em; right: 1em; width: 5em; height: 7em; border-radius: .8em; background: #9aa6c0; display: grid; place-items: center; font-size: .8em; }
.s-ft-ctrls { display: flex; justify-content: space-around; align-items: center; padding: .8em .6em 2em; background: rgba(0,0,0,.3); }
/* contacts */
.s-card { display: flex; flex-direction: column; align-items: center; gap: .4em; padding: .8em; }
.s-card h4 { font-size: 1.4em; color: var(--sim-ink); }
/* camera */
.s-cam { flex: 1; display: flex; flex-direction: column; background: #000; color: #fff; }
.s-viewfinder { flex: 1; position: relative; padding: 0; border: 0; background: #000; display: block; overflow: hidden; }
.s-vf-pic { width: 100%; height: 100%; display: block; object-fit: cover; }
.s-focusbox { position: absolute; left: 50%; top: 50%; width: 5em; height: 5em; margin: -2.5em 0 0 -2.5em; border: .15em solid #ffd60a; }
.s-modes { display: flex; justify-content: center; gap: .8em; padding: .5em; }
.s-mode { background: none; border: 0; color: #ddd !important; font-size: .8em; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .4em; }
.s-mode.on { color: #ffd60a !important; }
.s-cam-bar { display: flex; justify-content: space-between; align-items: center; padding: .5em 1.4em 2em; }
.s-thumb { width: 3.2em; height: 3.2em; border-radius: .5em; border: .12em solid #fff; background: #333; padding: 0; overflow: hidden; }
.s-thumb-pic { width: 100%; height: 100%; display: block; }
.s-shutter { width: 4.6em; height: 4.6em; border-radius: 50%; border: .25em solid #fff; background: transparent; padding: .25em; }
.s-shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; }
.s-switchcam { width: 3em; height: 3em; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff !important; font-size: 1.3em; }
/* photos */
.s-photo { flex: 1; display: grid; place-items: center; background: #000; } .s-big-pic { width: 100%; height: auto; display: block; }
.s-dim { opacity: .5; }
.s-phbar { flex: none; display: flex; justify-content: space-around; align-items: center; padding: .5em .5em 1.6em; background: #f9f9fb; border-top: 1px solid var(--sim-line); }
.s-phbtn { background: none; border: 0; color: var(--sim-blue) !important; font-size: 1.15em; font-weight: 600; min-width: 2.6em; min-height: 2.6em; border-radius: .5em; }
.s-actionsheet { margin: auto .8em 1.6em; padding: .8em; background: var(--sim-card); border-radius: 1em; display: flex; flex-direction: column; gap: .5em; text-align: center; }
.s-as-btn { min-height: 2.8em; border-radius: .7em; border: 0; background: #f2f2f7; font-weight: 700; }
.s-as-btn.s-danger { color: var(--sim-red) !important; }
/* clock & reminders */
.s-alarm { font-size: 1.9em; font-weight: 300; } .s-alarm small { font-size: .45em; margin-left: .2em; color: var(--sim-muted); }
.s-picker { display: flex; align-items: center; justify-content: center; gap: .7em; padding: 1em .5em; background: var(--sim-card); margin: .5em .8em; border-radius: .9em; }
.s-step { display: flex; flex-direction: column; align-items: center; gap: .3em; }
.s-stepbtn { width: 2.6em; height: 2.6em; border-radius: 50%; border: 0; background: #e5e5ea; font-size: 1.2em; font-weight: 800; }
.s-stepval { font-size: 2em; font-weight: 600; min-width: 1.6em; text-align: center; }
.s-colon { font-size: 2em; font-weight: 600; }
.s-ampm { display: flex; flex-direction: column; gap: .4em; }
.s-ampmbtn { min-width: 3em; min-height: 2.3em; border-radius: .6em; border: 0; background: #e5e5ea; font-weight: 700; }
.s-ampmbtn.on { background: #0a84ff; color: #fff !important; }
.s-circle { width: 1.3em; height: 1.3em; border-radius: 50%; border: .12em solid #b7b9c0; flex: none; }
/* safari */
.s-safari { flex: 1; display: flex; flex-direction: column; background: #f2f2f7; }
.s-favs { padding: .8em; } .s-favgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5em; }
.s-favgrid span { aspect-ratio: 1; border-radius: .8em; background: #fff; display: grid; place-items: center; font-size: .7em; font-weight: 700; color: #555; }
.s-addr { margin-top: auto; display: flex; align-items: flex-end; gap: .4em; padding: .5em .7em 1.6em; background: #f9f9fb; border-top: 1px solid var(--sim-line); }
.s-addr .s-field { flex: 1; margin: 0; }
.s-addr-q { flex: 1; text-align: center; background: #e9e9ee; border-radius: .6em; padding: .55em; font-size: .9em; }
.s-results { display: flex; flex-direction: column; gap: .5em; padding: .8em; }
.s-result { text-align: left; display: flex; flex-direction: column; gap: .15em; padding: .7em .8em; border-radius: .8em; border: 0; background: #fff; color: #111; }
.s-result b { color: #1a0dab; } .s-result small { color: #2e7d32; font-size: .78em; } .s-result span { font-size: .85em; color: #444; }
.s-ad small { color: #111; font-weight: 800; }
.s-pagebox { padding: 1.4em; background: #fff; margin: .8em; border-radius: 1em; display: flex; flex-direction: column; gap: .4em; }
.s-temp { font-size: 3em; font-weight: 300; }
/* siri */
.s-siri { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 1em; padding-top: 1em; background: #f2f2f7; position: relative; }
.s-siri-glow { position: absolute; inset: 0; border: .45em solid transparent; border-image: linear-gradient(135deg, #ff8a00, #e04eff, #3a7bff, #2fd6c6) 1; pointer-events: none; border-radius: 0; opacity: .9; }
.s-siri .s-bubble { margin: 0 1em; }
/* find my */
.s-map { position: relative; height: 12em; background: repeating-linear-gradient(45deg, #dfe9d7, #dfe9d7 1.2em, #e8efe1 1.2em, #e8efe1 2.4em); display: flex; align-items: flex-start; justify-content: center; }
.s-map-note { margin-top: .6em; font-size: .78em; background: rgba(255,255,255,.9); padding: .2em .6em; border-radius: .5em; color: #333; }
.s-map-pin { position: absolute; left: 50%; top: 55%; width: 1.6em; height: 1.6em; margin-left: -.8em; border-radius: 50%; background: #0a84ff; border: .25em solid #fff; box-shadow: 0 0 0 .5em rgba(10,132,255,.25); }
.s-fm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; padding: .4em .8em; }
.s-fm-btn { min-height: 4em; border-radius: .9em; border: 0; background: var(--sim-card); color: var(--sim-blue) !important; font-weight: 700; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { animation: none !important; transition: none !important; }

/* ---------- small screens ---------- */
@media (max-width: 480px) {
  h1 { font-size: 1.6rem; } .hero h1 { font-size: 1.85rem; }
  .card, .answer, .exarea { padding: 16px; }
  .door { min-height: 0; padding: 14px; gap: 12px; } .door-ic { width: 50px; height: 50px; } .door-ic svg { width: 28px; height: 28px; }
}

/* ---------- print ---------- */
@media print {
  @page { margin: 14mm; }
  :root, :root[data-theme="dark"], :root[data-contrast="high"] { --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --muted: #222; --line: #888; --blue: #000; }
  html { font-size: 13pt; }
  body { background: #fff; color: #000; }
  .topbar, .foot, .tools, .actions, .back, .reader, .noprint, .more-help, .confidence, .video-suggest, .skip, .prevnext { display: none !important; }
  .page { padding: 0; gap: 10px; }
  .card, .sheet { border: 1px solid #888; break-inside: avoid; box-shadow: none; }
  .sheet tr { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  .ext svg { display: none; }
  .sim-phone { box-shadow: none; }
}
