/* Brimwise styles. Layout: one phone-width column, with the round fitted-cap size sticker as the signature element. */
:root {
  --bg: #e6ebf3; --surface: #ffffff; --stage: #d3deee; --fg: #16213a; --muted: #55617a;
  --line: #c4cede; --accent: #1f49c7; --on-accent: #ffffff; --sticker: #e9b52c; --on-sticker: #16213a; --soft: #edf1f8;
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0e1422; --surface: #182136; --stage: #2c3a58; --fg: #eef2fa; --muted: #a8b3ca;
  --line: #34415e; --accent: #8fa9ff; --on-accent: #0e1422; --sticker: #efc04a; --on-sticker: #16213a; --soft: #222d46; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0e1422; --surface: #182136; --stage: #2c3a58; --fg: #eef2fa; --muted: #a8b3ca;
  --line: #34415e; --accent: #8fa9ff; --on-accent: #0e1422; --sticker: #efc04a; --on-sticker: #16213a; --soft: #222d46; color-scheme: dark }
* { box-sizing: border-box }
body { background: var(--bg); color: var(--fg); font: 400 16px/1.5 var(--body);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 24px 40px }
.wrap { max-width: 440px; margin-inline: auto; display: grid; gap: 18px }
.phone { background: var(--surface); border: 1px solid var(--line); border-radius: 30px; overflow: hidden; min-width: 0 }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 12px }
.logo { font: 800 20px/1 var(--display); letter-spacing: -.02em }
.steps { font: 500 12px/1 var(--mono); color: var(--muted) }
.screen { padding: 0 20px 24px; display: grid; gap: 18px; min-width: 0 }
h1, h2 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -.02em }
h1 { font-size: 32px; line-height: 1.05; font-weight: 800 }
h1:focus { outline: none }
h2 { font-size: 19px; line-height: 1.2; font-weight: 600 }
p { margin: 0 }
.muted { color: var(--muted); font-size: 15px }
.group { display: grid; gap: 9px; min-width: 0 }
.label { font-size: 13px; font-weight: 700 }
.stage { position: relative; background: var(--stage); border-radius: 18px; overflow: hidden; line-height: 0 }
.stage svg { width: 100%; height: auto; display: block; max-height: 290px }
.sticker { position: absolute; top: 12px; right: 12px; width: 78px; height: 78px; border-radius: 50%; background: var(--sticker); color: var(--on-sticker);
  display: grid; place-content: center; text-align: center; line-height: 1; box-shadow: inset 0 0 0 3px var(--sticker), inset 0 0 0 4px var(--on-sticker) }
.sticker small { display: block; font: 500 9px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px }
.sticker b { font: 800 19px/1 var(--display); white-space: nowrap }
.chips { display: flex; flex-wrap: wrap; gap: 8px }
button { font: inherit; color: inherit; cursor: pointer }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px }
.chip { padding: 9px 13px; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 600 }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--surface); border-color: var(--fg) }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.split .chip { padding: 14px 8px; font-size: 16px; border-radius: 14px }
.dot { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); padding: 0 }
.dot[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent) }
.primary { width: 100%; min-height: 52px; border: 0; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 16px }
.ghost { background: none; border: 0; padding: 8px; color: var(--accent); font-weight: 600; font-size: 15px; justify-self: center }
.readout { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap }
.readout b { font: 800 44px/1 var(--display); font-variant-numeric: tabular-nums }
.tape { background: var(--sticker); color: var(--on-sticker); border-radius: 8px; padding: 12px 12px 6px }
.tape input { width: 100%; margin: 0; accent-color: var(--on-sticker); height: 26px; display: block }
.ticks { display: flex; justify-content: space-between; font: 500 11px/1.4 var(--mono) }
.howto { background: var(--soft); border-radius: 12px; padding: 12px 14px; font-size: 14px }
.fit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line) }
.fit div { padding: 11px 8px 11px 0; min-width: 0 }
.fit div + div { padding-left: 10px; border-left: 1px solid var(--line) }
.fit span { display: block; font-size: 12px; color: var(--muted) }
.fit b { font: 600 18px/1.2 var(--display) }
.caps { display: grid; gap: 8px }
.cap { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px }
.cap[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent) }
.cap svg { width: 74px; height: auto; display: block; background: var(--stage); border-radius: 9px }
.cap strong { display: block; font-size: 15px; line-height: 1.25 }
.cap span { display: block; font-size: 13px; line-height: 1.35; color: var(--muted); margin-top: 2px }
.cap em { font: 500 10px/1 var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); display: block; margin-bottom: 4px }
.notice { background: var(--soft); border-radius: 12px; padding: 12px 14px; font-size: 14px }
a { color: var(--accent) }
.hint { font-size: 14px; color: var(--muted) }
.buy { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px }
.buy strong { font-size: 15px; line-height: 1.25 }
.buy span { font-size: 13px; color: var(--muted) }
.buy a { font-weight: 700; font-size: 15px }
.paid { font: 500 11px/1 var(--mono); color: var(--muted); margin-left: 6px; white-space: nowrap }
.foot { font-size: 13px; color: var(--muted); display: grid; gap: 6px; padding-inline: 8px }
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px 20px; display: grid; gap: 14px }
.doc h2 { margin-top: 8px }
.doc ul { margin: 0; padding-left: 20px; display: grid; gap: 6px }
.testbar { background: var(--sticker); color: var(--on-sticker); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600 }
.cam { position: relative; background: var(--stage); border-radius: 18px; overflow: hidden; aspect-ratio: 3 / 4; max-width: 100% }
.cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block }
.guide { position: absolute; left: 50%; top: 50%; width: 62%; height: 68%; transform: translate(-50%, -50%); border: 3px dashed var(--on-accent); border-radius: 50%; box-shadow: 0 0 0 999px rgba(14, 20, 34, .35) }
.status { min-height: 48px; font-weight: 600 }
.check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 15px }
.check input { width: 22px; height: 22px; margin: 1px 0 0 }
.primary:disabled { opacity: .5; cursor: not-allowed }
.bigshape { font: 800 44px/1 var(--display) }
.tally { font-variant-numeric: tabular-nums; font-size: 14px; display: grid; gap: 4px }
details { font-size: 14px; color: var(--muted) }
.split.three { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.split.three .chip { font-size: 14px; padding: 11px 4px }
.fit.two { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.sticker b.word { font-size: 14px }
.cap img { width: 74px; height: 74px; object-fit: cover; display: block; border-radius: 9px; background: var(--stage) }
.buy img { width: 100%; max-height: 240px; object-fit: contain; border-radius: 10px; background: var(--soft); margin-bottom: 6px }
