/* BydScope website. The apps' own palette (warm near-black / cream, amber for attention, green
   for all-good) and their faces, Archivo and IBM Plex Mono, served from here: the page fetches
   nothing from anywhere else. Archivo has no Cyrillic, so Russian and Ukrainian text falls back
   to the system sans, as it does in the apps. */
@font-face { font-family: "Archivo"; font-weight: 400; font-display: swap; src: url(fonts/archivo-regular.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 500; font-display: swap; src: url(fonts/archivo-medium.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 600; font-display: swap; src: url(fonts/archivo-semibold.woff2) format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 700 800; font-display: swap; src: url(fonts/archivo-bold.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/plex-mono-regular.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500 600; font-display: swap; src: url(fonts/plex-mono-medium.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --bg: #F3EEE5; --panel: #FBF8F2; --panel-2: #EEE8DD; --fg: #1C1915; --muted: #5E564B; --faint: #81776A;
  --rule: rgba(58,42,20,.16); --amber: #985506; --amber-fill: #E9A13C; --amber-wash: rgba(152,85,6,.09);
  --green: #4E7A53; --green-wash: rgba(78,122,83,.10); --shot-frame: #1C1915; --scrim: rgba(20,18,16,.86);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --rail: 280px; --head: 60px; --wide: 1180px;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #141210; --panel: #1D1A17; --panel-2: #24201C; --fg: #F4EFE6; --muted: #B9B0A2; --faint: #8C8376;
  --rule: rgba(255,238,214,.11); --amber: #E9A13C; --amber-wash: rgba(233,161,60,.10);
  --green: #8FB092; --green-wash: rgba(111,143,114,.14); --shot-frame: #2A2622; --scrim: rgba(8,7,6,.9); color-scheme: dark; } }

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + 20px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--display); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overflow-x: clip;
  padding-bottom: env(safe-area-inset-bottom, 0px); }
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--fg); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 2px; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
img { max-width: 100%; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 4px; }
.skip:focus { left: 8px; }

/* ---------- site header ---------- */
header.site { position: sticky; top: 0; z-index: 25; height: var(--head); display: flex; align-items: center; gap: 24px;
  padding: env(safe-area-inset-top, 0px) max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo img { border-radius: 7px; display: block; }
.logo b { font: 800 19px/1 var(--display); letter-spacing: -.01em; }
nav.pages { display: flex; gap: 4px; flex: 1; }
nav.pages a { text-decoration: none; color: var(--muted); font-size: 15px; padding: 8px 12px; border-radius: 4px; white-space: nowrap; }
nav.pages a:hover { color: var(--fg); background: var(--panel-2); }
nav.pages a[aria-current="page"] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--amber); border-radius: 0; }
.tools { display: flex; gap: 10px; align-items: center; flex: none; }
.signin { font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; padding: 11px 14px; border-radius: 4px; background: var(--fg); color: var(--bg); }
.signin:hover { opacity: .88; }
.switch { display: inline-flex; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; background: var(--panel); }
.switch button { border: 0; background: transparent; cursor: pointer; font: 500 12px/1 var(--mono); letter-spacing: .08em; padding: 10px 11px; min-height: 36px; color: var(--muted); }
.switch button + button { border-left: 1px solid var(--rule); }
.switch button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.navToggle { display: none; font: 500 12px/1 var(--mono); letter-spacing: .06em; background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; padding: 11px 12px; cursor: pointer; }

/* ---------- shared type ---------- */
.eyebrow { font: 500 12px/1 var(--mono); color: var(--faint); display: block; margin-bottom: 12px; letter-spacing: .04em; }
h1 { font: 800 clamp(34px, 5vw, 50px)/1.05 var(--display); letter-spacing: -.02em; margin: 0 0 18px; text-wrap: balance; }
h2 { font: 700 32px/1.12 var(--display); letter-spacing: -.012em; margin: 0 0 14px; text-wrap: balance; }
h3 { font: 700 20px/1.3 var(--display); margin: 36px 0 8px; text-wrap: balance; }
p { margin: 0 0 14px; }
.lede { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 680px; }
ul { padding-left: 1.2em; margin: 0 0 16px; }
li { margin-bottom: 6px; }
li::marker { color: var(--faint); }
strong { font-weight: 600; }
.ui { font: 500 .86em/1.3 var(--mono); background: var(--panel-2); border: 1px solid var(--rule); border-radius: 3px; padding: 1px 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.path { font: 500 .88em var(--mono); color: var(--muted); }
.tag { font: 500 11px/1 var(--mono); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); border-radius: 3px; padding: 3px 6px; white-space: nowrap; }

.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 600 15px/1 var(--display); padding: 14px 18px; border-radius: 6px; border: 1px solid var(--rule); background: var(--panel); cursor: pointer; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--amber-fill); border-color: var(--amber-fill); color: #1C1915; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.store { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.store.soon { background: transparent; color: var(--faint); border-style: dashed; border-color: var(--rule); cursor: default; }

/* ---------- screenshots ---------- */
figure.shot { margin: 22px 0 26px; }
figure.shot .zoom { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; }
figure.shot img { display: block; width: 100%; height: auto; background: var(--shot-frame); }
figure.car img { border-radius: 8px; box-shadow: 0 0 0 1px var(--rule); aspect-ratio: 16 / 9; }
figure.phones .row { display: grid; gap: 16px; justify-content: start; }
figure.phones.n1 .row { grid-template-columns: minmax(0, 240px); }
figure.phones.n2 .row { grid-template-columns: repeat(2, minmax(0, 240px)); }
figure.phones.n3 .row { grid-template-columns: repeat(3, minmax(0, 240px)); }
figure.phones.n4 .row { grid-template-columns: repeat(4, minmax(0, 240px)); }
figure.phones img { border-radius: 20px; box-shadow: 0 0 0 1px var(--rule), 0 0 0 6px var(--shot-frame); aspect-ratio: 600 / 1300; margin: 6px; width: calc(100% - 12px); }
figcaption { font: 400 13.5px/1.5 var(--display); color: var(--muted); margin-top: 10px; max-width: 660px; }
.split { display: grid; grid-template-columns: minmax(0,1fr) 220px; gap: 28px; align-items: start; }
.split figure.shot { margin-top: 4px; }
.split figure.phones.n1 .row { grid-template-columns: minmax(0, 220px); }

/* ---------- manual ---------- */
.frame { display: grid; grid-template-columns: var(--rail) minmax(0,1fr); }
nav.rail { position: sticky; top: var(--head); align-self: start; height: calc(100vh - var(--head)); overflow-y: auto; padding: 24px 20px 48px max(20px, env(safe-area-inset-left, 0px)); border-right: 1px solid var(--rule); }
.rail .sub { font: 400 12.5px/1.4 var(--mono); color: var(--faint); margin: 0 0 12px; }
.search { margin: 0 0 4px; }
.search input { width: 100%; font-size: 16px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 4px; background: var(--panel); }
.search input::placeholder { color: var(--faint); }
.nomatch { font: 400 13px var(--mono); color: var(--faint); margin: 10px 2px 0; }
.rail h4 { font: 500 11px/1 var(--mono); color: var(--faint); margin: 22px 0 8px; }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.rail a { display: block; text-decoration: none; color: var(--muted); font-size: 14.5px; line-height: 1.35; padding: 6px 8px; border-radius: 4px; }
.rail a:hover { background: var(--panel-2); color: var(--fg); }
.rail a.on { color: var(--fg); background: var(--panel); box-shadow: inset 0 0 0 1px var(--rule); }
.frame main { padding: 40px max(44px, env(safe-area-inset-right, 0px)) 100px 44px; }
.col { max-width: 780px; }
.demo-note { font: 400 13px/1.55 var(--mono); color: var(--faint); margin: 0 0 30px; max-width: 640px; }
section.chapter { padding-top: 64px; margin-top: 64px; border-top: 1px solid var(--rule); }
section.chapter:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }

.parts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 26px 0 10px; }
.part { background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 16px 16px 14px; }
.part .tag { color: var(--faint); border: 0; padding: 0; }
.part b { display: block; font: 700 17px/1.25 var(--display); margin: 8px 0 6px; }
.part p { font-size: 14.5px; line-height: 1.5; color: var(--muted); margin: 0; }
.glance { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 18px 0 8px; }
.glance a { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 14px 16px; }
.glance a:hover { border-color: var(--faint); }
.glance b { display: block; font: 700 16px/1.3 var(--display); margin-bottom: 4px; }
.glance span { font-size: 14px; line-height: 1.45; color: var(--muted); display: block; }

ol.setup { counter-reset: s; list-style: none; padding: 0; margin: 12px 0 20px; }
ol.setup > li { counter-increment: s; position: relative; padding: 13px 0 13px 46px; border-top: 1px solid var(--rule); margin: 0; }
ol.setup > li:last-child { border-bottom: 1px solid var(--rule); }
ol.setup > li::before { content: counter(s); position: absolute; left: 0; top: 13px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 500 13px/1 var(--mono); color: var(--muted); border: 1px solid var(--rule); background: var(--panel); }
ol.setup > li b { display: block; font-weight: 600; margin-bottom: 2px; }

.note { border-radius: 6px; padding: 13px 15px; margin: 18px 0; font-size: 15px; line-height: 1.55; background: var(--panel); border: 1px solid var(--rule); }
.note .k { font: 500 11px/1 var(--mono); display: block; margin-bottom: 7px; color: var(--faint); }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.note.attn { background: var(--amber-wash); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.note.attn .k { color: var(--amber); }
.note.good { background: var(--green-wash); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.note.good .k { color: var(--green); }

.tablewrap { overflow-x: auto; margin: 14px 0 20px; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
tr:last-child td { border-bottom: 0; }
th { font: 500 11px/1.2 var(--mono); color: var(--faint); background: var(--panel-2); }
td.n { font-family: var(--mono); font-size: 13.5px; white-space: nowrap; }
td:first-child { font-weight: 600; }

.states { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 14px 0 20px; }
.state { border: 1px solid var(--rule); border-radius: 6px; padding: 12px 14px; background: var(--panel); }
.state code { font: 500 12.5px/1 var(--mono); }
.state p { margin: 6px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

.phrases { columns: 2; column-gap: 28px; padding: 0; list-style: none; margin: 10px 0 18px; }
.phrases li { break-inside: avoid; font-size: 14.5px; padding: 6px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.phrases li i { font-style: normal; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }

details { border-top: 1px solid var(--rule); padding: 13px 0; }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; gap: 10px; align-items: baseline; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; font-family: var(--mono); color: var(--faint); width: 12px; flex: none; }
details[open] summary::before { content: "−"; }
details > div { padding: 8px 0 0 22px; }
details > div p:last-child { margin: 0; }

dl.gloss { display: grid; grid-template-columns: minmax(120px, 210px) minmax(0,1fr); margin: 10px 0; }
dl.gloss dt, dl.gloss dd { padding: 10px 0; border-top: 1px solid var(--rule); margin: 0; }
dl.gloss dt { font-weight: 600; padding-right: 16px; }
dl.gloss dd { color: var(--muted); }

nav.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.pn { display: block; text-decoration: none; border: 1px solid var(--rule); border-radius: 6px; padding: 12px 14px; font-weight: 600; font-size: 15px; line-height: 1.35; background: var(--panel); }
.pn:hover { border-color: var(--faint); }
.pn span { display: block; font: 500 11px/1 var(--mono); color: var(--faint); margin-bottom: 6px; }
.pn.next { text-align: right; grid-column: 2; }

/* ---------- home ---------- */
main.home > section { max-width: var(--wide); margin: 0 auto; padding: 88px max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px)); }
main.home > section > .head { max-width: 720px; margin-bottom: 30px; }
main.home > section > .head p { color: var(--muted); font-size: 17px; }
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; padding-top: 64px !important; }
.hero h1 { font-size: clamp(38px, 5.2vw, 62px); }
.hero .lede { font-size: 19px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 18px; }
.hero .ver { font: 400 13px/1.5 var(--mono); color: var(--faint); }
.hero .ver a { color: var(--muted); }
.stage { position: relative; padding: 0 9% 64px 0; }
.stage .car { height: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--rule), 0 24px 60px -24px rgba(20,14,6,.45); display: block; width: 100%; aspect-ratio: 16/9; background: var(--shot-frame); }
.stage .phone { height: auto; position: absolute; right: -8px; bottom: 0; width: 21%; border-radius: 22px; box-shadow: 0 0 0 1px var(--rule), 0 0 0 6px var(--shot-frame), 0 24px 48px -16px rgba(20,14,6,.55); aspect-ratio: 600/1300; background: var(--shot-frame); }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.trio > div { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 22px 22px 20px; }
.trio .k { font: 500 11px/1 var(--mono); color: var(--faint); letter-spacing: .04em; }
.trio h3 { margin: 10px 0 8px; font-size: 21px; }
.trio p { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0; }

.features h3.group { font: 500 12px/1 var(--mono); color: var(--faint); letter-spacing: .04em; margin: 34px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.grid a { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 18px 18px 16px; transition: border-color .15s; }
.grid a:hover { border-color: var(--faint); }
.grid b { display: block; font: 700 17px/1.3 var(--display); margin-bottom: 6px; }
.grid span { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.grid a::after { content: "→"; display: block; margin-top: 10px; font: 500 13px/1 var(--mono); color: var(--faint); }
.grid a:hover::after { color: var(--amber); }

.gallery .cars { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.gallery .cars figure.shot, .gallery .phones figure.shot { margin: 0; }
.gallery .phones { margin-top: 26px; }
.gallery figure.phones.n4 .row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; max-width: 920px; }

.privacy ul.points { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.privacy ul.points li { margin: 0; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 16px 18px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.privacy ul.points li b { display: block; color: var(--fg); font-size: 16px; margin-bottom: 4px; }

.downloads { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.dlcard { background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; }
.dlcard.main { grid-row: span 2; border-color: color-mix(in srgb, var(--amber) 40%, var(--rule)); }
.dlcard .k { font: 500 11px/1 var(--mono); color: var(--faint); letter-spacing: .04em; }
.dlcard h3 { margin: 10px 0 8px; font-size: 22px; }
.dlcard p, .dlcard li { color: var(--muted); font-size: 15px; line-height: 1.55; }
.dlcard ul { margin: 4px 0 18px; }
.dlcard .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; padding-top: 8px; }
.dlcard .req { font: 400 12.5px/1.5 var(--mono); color: var(--faint); margin: 0 0 14px; }

.help .tiles { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.help .tiles a { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 18px; }
.help .tiles a:hover { border-color: var(--faint); }
.help .tiles b { display: block; font: 700 17px/1.3 var(--display); margin-bottom: 4px; }
.help .tiles span { color: var(--muted); font-size: 14.5px; }

/* ---------- changelog ---------- */
main.page { max-width: 860px; margin: 0 auto; padding: 56px max(24px, env(safe-area-inset-right, 0px)) 40px max(24px, env(safe-area-inset-left, 0px)); }
section.release { border-top: 1px solid var(--rule); padding-top: 34px; margin-top: 40px; }
section.release > header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
section.release h2 { margin: 0; font-size: 34px; }
section.release h2 a { text-decoration: none; }
section.release time { font: 400 13px/1 var(--mono); color: var(--faint); margin-left: auto; }
section.release h3 { font-size: 17px; margin: 26px 0 8px; }
section.release .summary { font-size: 17px; color: var(--muted); }

/* ---------- footer ---------- */
footer.site { margin-top: 96px; border-top: 1px solid var(--rule); padding: 30px max(24px, env(safe-area-inset-right, 0px)) 40px max(24px, env(safe-area-inset-left, 0px));
  display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: baseline; font: 400 13px/1.6 var(--mono); color: var(--faint); }
.page-manual footer.site { margin-top: 0; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer.site a { color: var(--muted); }
.foot-brand { display: flex; gap: 10px; align-items: baseline; }
.foot-brand b { font: 800 16px/1 var(--display); color: var(--fg); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox button { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; font: 500 12px/1 var(--mono); color: #F4EFE6; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.25); border-radius: 4px; padding: 12px 14px; cursor: pointer; }

/* ---------- narrower screens ---------- */
@media (max-width: 1040px) {
  .hero { grid-template-columns: minmax(0,1fr); gap: 36px; }
  .grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 960px) { .split { grid-template-columns: minmax(0,1fr); gap: 0; } }
@media (max-width: 900px) {
  :root { --head: 104px; }
  header.site { flex-wrap: wrap; height: auto; min-height: var(--head); gap: 0 12px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .logo { height: 42px; }
  .tools { margin-left: auto; height: 42px; }
  nav.pages { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; margin: 4px -8px 0; padding-bottom: 2px; }
  nav.pages::-webkit-scrollbar { display: none; }
  nav.pages a { padding: 10px 10px; }
  .signin { display: none; }
  .navToggle { display: inline-block; }
  .frame { grid-template-columns: minmax(0,1fr); }
  nav.rail { position: fixed; inset: 0 auto 0 0; top: 0; width: min(86vw, 330px); height: 100%; z-index: 30; background: var(--bg); transform: translateX(-102%); transition: transform .2s ease;
    padding-top: calc(24px + env(safe-area-inset-top, 0px)); padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
  body.navopen nav.rail { transform: none; box-shadow: 0 0 0 100vmax rgba(10,8,6,.45); }
  .frame main { padding: 24px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, env(safe-area-inset-left, 0px)); }
  .parts, .states, .glance, .trio, .downloads, .privacy ul.points, .help .tiles, .gallery .cars { grid-template-columns: minmax(0,1fr); }
  .dlcard.main { grid-row: auto; }
  .phrases { columns: 1; }
  dl.gloss { grid-template-columns: minmax(0,1fr); }
  dl.gloss dt { padding-bottom: 0; } dl.gloss dd { border-top: 0; padding-top: 2px; }
  section.chapter { padding-top: 44px; margin-top: 44px; }
  h2 { font-size: 28px; }
  main.home > section { padding-top: 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .hero { padding-top: 32px !important; }
  figure.phones .row { gap: 8px; }
  figure.phones.n2 .row, figure.phones.n3 .row, figure.phones.n4 .row, .gallery figure.phones.n4 .row { grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 8px; }
  figure.phones.n3 { --n: 3; }
  figure.phones img { border-radius: 12px; box-shadow: 0 0 0 1px var(--rule), 0 0 0 3px var(--shot-frame); margin: 3px; width: calc(100% - 6px); }
  .stage .phone { border-radius: 14px; box-shadow: 0 0 0 1px var(--rule), 0 0 0 4px var(--shot-frame); right: 0; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: minmax(0,1fr); }
  nav.prevnext { grid-template-columns: minmax(0,1fr); } .pn.next { grid-column: 1; }
  table { font-size: 13.5px; }
  .switch button { padding: 10px 8px; }
  section.release time { margin-left: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { nav.rail { transition: none; } }
@media print {
  header.site, nav.rail, nav.prevnext, .demo-note, footer.site { display: none !important; }
  .frame { display: block; } .frame main { padding: 0; } section.chapter { break-before: page; }
}
