/* VOICE: a maker's bench: calm, exact, a little playful. Chinese first, few words.
   IDEA: the page is the 拼豆 workbench itself: a real pegboard, a bead box, a printed 图纸, an iron.
   PICTURE: the WebGL pegboard, every MARD bead lit and shadowed, carrying most of the first screen.
   COLOUR and TYPE: white table by day, the same table under a lamp at night; ink #15161A; one bead-red
   accent (MARD F5 #E10328); the beads bring every other colour. Nunito (round, like beads) + Noto Sans SC.
   LAYOUT: photo and tools | board | bead box and actions; below 1100px the board goes on top. */

:root {
  color-scheme: light dark;
  --bg: light-dark(#ffffff, #111214);
  --ink: light-dark(#15161a, #f1f1f3);
  --muted: light-dark(#6a6e78, #9a9ea8);
  --line: light-dark(#e7e8eb, #26282d);
  --soft: light-dark(#f4f5f7, #1b1c20);
  --accent: #E10328;
  --accent-ink: #ffffff;
  --hole: light-dark(#ffffff, #111214);
  --focus: light-dark(#15161a, #f1f1f3);
  --font: Nunito, "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
[hidden] { display: none !important; }
:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }
* { box-sizing: border-box; min-width: 0; }
html { scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 16px/1.55 var(--font); overflow-x: clip; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h2 { font-size: 17px; font-weight: 800; }
h3 { font-size: 13px; font-weight: 700; color: var(--muted); }
p { margin: 0; }
svg { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; white-space: nowrap; }
button, .btn, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: 18px; padding: 10px max(2vw, 14px); height: 64px; }
.brand { display: flex; color: var(--ink); }
#logo { width: 150px; height: 50px; overflow: visible; }
#logo .b { transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); transform-box: fill-box; transform-origin: center; }
.brand:hover #logo .b { transform: translateY(var(--hop, 0)); }
.lede { font-weight: 700; font-size: 15px; color: var(--muted); }
.topnav { margin-left: auto; display: flex; gap: 6px; }
.ghostbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: none; }
.ghostbtn:hover { color: var(--ink); background: var(--soft); }
.ghostbtn[aria-pressed=false] .wave { opacity: .25; }
.ghostbtn[aria-pressed=true] { color: var(--ink); }

/* ---------- bench ---------- */
.bench { display: grid; grid-template-columns: 272px minmax(0, 1fr) 300px; grid-template-areas: "left stage right"; gap: 0 clamp(12px, 2vw, 28px); padding: 0 max(2vw, 14px); height: calc(100dvh - 64px); min-height: 600px; }
.side { overflow-y: auto; padding: 8px 2px 20px; scrollbar-width: thin; }
.left { grid-area: left; display: flex; flex-direction: column; gap: 22px; }
.block { display: flex; flex-direction: column; gap: 9px; }
.photoRow { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hint { font-size: 13px; color: var(--muted); }
.samples { display: flex; gap: 8px; }
.sample { flex: 1; display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 6px 4px; border: 0; border-radius: 12px; background: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.sample img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; display: block; }
.sample:hover, .sample[aria-current=true] { background: var(--soft); color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; user-select: none; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.wide { width: 100%; }
.btn.small { min-height: 38px; padding: 0 12px; font-size: 14px; }
.btn.quiet { border-color: transparent; background: var(--soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ink { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.big { min-height: 52px; font-size: 17px; border-radius: 14px; }
.btn[disabled], .iconbtn[disabled] { opacity: .4; cursor: default; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--soft); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { min-height: 40px; border: 0; border-radius: 9px; background: none; font-weight: 900; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--muted); }
.seg button[aria-checked=true] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }

.rangeHead { display: flex; align-items: baseline; gap: 8px; }
.rangeHead h3:last-child { margin-left: auto; }
.rangeHead output { margin: 0 auto; font-weight: 900; font-size: 15px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: none; margin: 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--ink) var(--p, 50%), var(--line) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--ink); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: radial-gradient(circle, var(--bg) 0 28%, var(--accent) 30%); box-shadow: 0 1px 4px rgb(0 0 0 / .3); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: radial-gradient(circle, var(--bg) 0 28%, var(--accent) 30%); box-shadow: 0 1px 4px rgb(0 0 0 / .3); }

.tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: var(--soft); border-radius: 12px; padding: 4px; }
.tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 12px; font-weight: 800; }
.tool.on { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.editRow { display: flex; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 6px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); font-weight: 900; margin-right: auto; }
.sw { width: 28px; height: 28px; border-radius: 50%; background: var(--c, #ccc); box-shadow: inset 0 0 0 8px var(--c, #ccc), inset 0 0 0 20px var(--hole); position: relative; }
.iconbtn { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px; border: 0; background: var(--soft); font-weight: 900; font-size: 18px; }
.iconbtn.fit { font-size: 13px; }

/* ---------- stage ---------- */
.stage { grid-area: stage; position: relative; display: flex; flex-direction: column; min-height: 0; }
#board { flex: 1; width: 100%; min-height: 0; display: block; touch-action: none; cursor: grab; }
#board.mode-paint { cursor: crosshair; }
#board.mode-photo { cursor: move; }
#board.mode-iron { cursor: none; }
.stageBar { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 0 10px; flex-wrap: wrap; }
.views { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--soft); border-radius: 999px; padding: 4px; }
.views button { min-height: 40px; min-width: 76px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font-weight: 800; font-size: 15px; color: var(--muted); }
.views button[aria-selected=true] { background: var(--ink); color: var(--bg); }
.zoom { display: flex; gap: 4px; }
.stageHint { text-align: center; font-size: 13px; color: var(--muted); min-height: 20px; margin-top: -4px; padding-bottom: 6px; }
.pill { position: fixed; z-index: 30; pointer-events: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 800; white-space: nowrap; transform: translate(14px, -50%); box-shadow: 0 6px 20px rgb(0 0 0 / .25); }
.pill .sw { width: 22px; height: 22px; box-shadow: inset 0 0 0 6px var(--c), inset 0 0 0 20px var(--ink); }
.banner { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 8px 28px rgb(0 0 0 / .25); z-index: 5; }
.iron { position: fixed; z-index: 25; width: 128px; pointer-events: none; transform: translate(-56px, -60px) rotate(-12deg); filter: drop-shadow(0 10px 14px rgb(0 0 0 / .25)); transition: transform .12s; }
.iron.down { transform: translate(-56px, -54px) rotate(-12deg) scale(.97); }
.iron svg { width: 128px; height: 96px; }
.dropzone { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); }
.dropzone div { padding: 26px 40px; border-radius: 24px; border: 3px dashed var(--accent); font-size: 26px; font-weight: 900; background: var(--bg); }

/* ---------- bead box ---------- */
.right { grid-area: right; display: flex; flex-direction: column; gap: 14px; }
.trayHead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.trayHead p { font-size: 14px; font-weight: 700; }
.tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; padding: 8px; border-radius: 16px; background: var(--soft); align-content: start; }
.cup { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 7px; border: 0; border-radius: 11px; background: var(--bg); box-shadow: inset 0 2px 5px rgb(0 0 0 / .08); transition: transform .2s, box-shadow .2s; }
.cup svg { width: 46px; height: 34px; }
.cup b { font-size: 15px; font-weight: 900; line-height: 1.1; }
.cup span { font-size: 12px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.cup[aria-selected=true] { box-shadow: 0 0 0 2.5px var(--ink); transform: translateY(-2px); }
.cup.done::after { content: ""; position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #1f9d55; }
.selInfo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border-radius: 14px; border: 1.5px solid var(--line); }
.selRow { display: flex; align-items: center; gap: 10px; width: 100%; }
.selRow strong { font-size: 18px; font-weight: 900; margin-right: 8px; }
.bigsw { width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 11px var(--c), inset 0 0 0 30px var(--hole); }
.actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 6px; }

/* ---------- build mode ---------- */
.build { grid-area: right; display: flex; flex-direction: column; gap: 14px; }
.bench.building { grid-template-columns: 0 minmax(0, 1fr) 340px; }
.bench.building .left, .bench.building .right { display: none; }
.bench:not(.building) .build { display: none; }
.buildHead { display: flex; align-items: center; justify-content: space-between; }
.buildNow { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 18px; background: var(--soft); }
.hugesw { width: 64px; height: 64px; border-radius: 50%; box-shadow: inset 0 0 0 19px var(--c), inset 0 0 0 40px var(--soft); flex: none; }
.huge { font-size: 40px; font-weight: 900; line-height: 1; }
.buildNow p { font-weight: 800; font-size: 17px; }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress div { height: 100%; width: 0; background: #1f9d55; transition: width .4s; }
.buildNav { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.buildList { display: flex; flex-wrap: wrap; gap: 6px; }
.buildList button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px 0 4px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); font-weight: 800; font-size: 13px; }
.buildList button .sw { width: 24px; height: 24px; box-shadow: inset 0 0 0 7px var(--c), inset 0 0 0 20px var(--hole); }
.buildList button.done { opacity: .45; text-decoration: line-through; }
.buildList button.now { border-color: var(--ink); }
.buildFinish { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: var(--soft); }

/* ---------- sheets, toast ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / .35); }
.sheetBox { width: min(760px, 100%); max-height: min(86dvh, 820px); overflow: auto; padding: 20px; border-radius: 20px; background: var(--bg); box-shadow: 0 30px 80px rgb(0 0 0 / .35); display: flex; flex-direction: column; gap: 12px; }
.sheetBox.small { width: min(420px, 100%); }
.sheetHead { display: flex; align-items: center; justify-content: space-between; }
.sheet .row { display: flex; justify-content: flex-end; gap: 8px; }
.btnPair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btnPair .btn { padding: 0 10px; }
/* 抠图: the whole photo, tap what to keep */
.sheetBox.cut { width: min(820px, 100%); }
.cutStage { position: relative; display: grid; place-items: center; min-height: 220px; border-radius: 14px; overflow: hidden; background: var(--soft); }
.cutStage canvas { display: block; touch-action: manipulation; cursor: crosshair; }
.cutStage canvas.busy { cursor: progress; }
.cutHint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 800; white-space: nowrap; pointer-events: none; box-shadow: 0 8px 24px rgb(0 0 0 / .25); }
.cutLoad { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 20px; text-align: center; background: light-dark(rgb(255 255 255 / .86), rgb(17 18 20 / .86)); }
.cutBar { width: min(280px, 70vw); height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.cutBar > div { width: 0; height: 100%; background: var(--accent); transition: width .2s; }
.cutRow { display: flex; align-items: center; gap: 8px; }
.seg.two { grid-template-columns: repeat(2, 1fr); flex: 1; max-width: 280px; }
.near { display: flex; flex-wrap: wrap; gap: 6px; }
.chart { display: flex; flex-direction: column; gap: 10px; }
.series { display: grid; grid-template-columns: 26px 1fr; gap: 6px; align-items: start; }
.series > b { font-size: 15px; font-weight: 900; padding-top: 8px; color: var(--muted); }
.series > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; }
.pc { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; border: 0; border-radius: 9px; background: none; font-size: 11px; font-weight: 800; }
.pc:hover { background: var(--soft); }
.pc .sw { width: 30px; height: 30px; box-shadow: inset 0 0 0 9px var(--c), inset 0 0 0 30px var(--hole); }
.pc.used { background: var(--soft); }
.near .pc { flex-direction: row; gap: 8px; padding: 4px 12px 4px 4px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 800; font-size: 15px; box-shadow: 0 10px 30px rgb(0 0 0 / .3); max-width: calc(100vw - 32px); }

/* ---------- tips and the self-playing demo ---------- */
.tip { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--bg); box-shadow: 0 10px 30px rgb(0 0 0 / .18), 0 0 0 1px var(--line); font-weight: 800; font-size: 14px; white-space: nowrap; animation: tipIn .45s cubic-bezier(.2, 1.4, .4, 1); }
.tip svg { width: 18px; height: 18px; }
@keyframes tipIn { from { opacity: 0; transform: translate(-50%, -10px); } }
.demoBar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 85; display: flex; align-items: center; gap: 12px; padding: 6px 6px 9px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 800; font-size: 15px; max-width: calc(100vw - 20px); box-shadow: 0 12px 34px rgb(0 0 0 / .3); overflow: hidden; }
.demoStep { opacity: .55; white-space: nowrap; font-variant-numeric: tabular-nums; }
.demoText { min-width: 0; }
.demoBar .btn { background: var(--bg); color: var(--ink); border-color: transparent; flex: none; }
.demoProg { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.demoProg div { height: 100%; width: 0; background: var(--accent); transition: width .5s; }
.hand { position: fixed; left: 0; top: 0; z-index: 90; width: 40px; height: 48px; pointer-events: none; will-change: transform; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .28)); }
.hand svg { width: 40px; height: 48px; transition: transform .14s; transform-origin: 17px 2px; }
.hand.tap svg, .hand.press svg { transform: scale(.86); }
.hand::after { content: ""; position: absolute; left: 12px; top: -3px; width: 10px; height: 10px; border-radius: 50%; border: 2.5px solid var(--accent); opacity: 0; }
.hand.tap::after { animation: ring .5s ease-out; }
@keyframes ring { from { transform: scale(.4); opacity: .95; } to { transform: scale(4.2); opacity: 0; } }
.demoCard { position: fixed; left: 0; top: 0; z-index: 89; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 12px 28px rgb(0 0 0 / .3); pointer-events: none; transition: opacity .25s, scale .25s; }
.demoCard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.demoCard.drop { opacity: 0; scale: .5; }
.demoFiles { position: fixed; z-index: 86; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--bg); box-shadow: 0 16px 44px rgb(0 0 0 / .25), 0 0 0 1px var(--line); font-weight: 800; font-size: 14px; white-space: nowrap; animation: tipIn .4s cubic-bezier(.2, 1.4, .4, 1); }
.demoFiles div { display: flex; align-items: center; gap: 10px; }
.ft { display: inline-grid; place-items: center; width: 40px; height: 26px; border-radius: 6px; font-size: 11px; font-weight: 900; color: #fff; }
.ft.png { background: #1f9d55; }
.ft.pdf { background: var(--accent); }

/* ---------- guide, footer ---------- */
.guide { padding: clamp(40px, 6vw, 80px) max(5vw, 16px) 32px; max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.guide h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; text-wrap: balance; }
.guide .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.guide h3 { font-size: 17px; color: var(--ink); margin-bottom: 6px; }
.guide p { max-width: 66ch; }
.sizes { border-collapse: collapse; width: 100%; max-width: 760px; }
.sizes th, .sizes td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sizes th { font-size: 13px; color: var(--muted); }
.sizes td.num { text-align: right; }
.sizes th:not(:first-child) { text-align: right; }
.foot { padding: 28px max(5vw, 16px) 48px; max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); }

/* ---------- narrower ---------- */
@media (max-width: 1100px) {
  .bench { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "stage stage" "left right"; height: auto; gap: 18px 24px; }
  .stage { grid-area: stage; height: min(82vw, 760px); }
  .left { grid-area: left; overflow: visible; }
  .right { grid-area: right; overflow: visible; }
  .build { grid-area: right; }
  .bench.building { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "stage stage" "build build"; }
  .bench.building .build { grid-area: build; }
}
@media (max-width: 640px) {
  .top { height: 56px; gap: 10px; }
  #logo { width: 120px; height: 40px; }
  .lede { display: none; }
  .ghostbtn span { display: none; }
  .bench { display: flex; flex-direction: column; gap: 18px; padding: 0 12px; }
  .left, .right { display: contents; }
  .stage { order: 0; }
  .block.photo { order: 1; }
  .block.size { order: 2; }
  .block.simple { order: 3; }
  .trayHead { order: 4; margin-bottom: -8px; }
  .tray { order: 5; }
  .selInfo { order: 6; }
  .block.edit { order: 7; }
  .actions { order: 8; }
  .bench.building .build { order: 1; }
  .stage { height: auto; }
  #board { flex: none; aspect-ratio: 1; height: auto; touch-action: pan-y; }
  #board.mode-paint, #board.mode-photo, #board.mode-iron { touch-action: none; }
  .stageHint { position: static; padding-bottom: 4px; }
  .views button { min-width: 64px; padding: 0 12px; }
  .zoom { display: none; }
  .tray { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 74px; overflow-x: auto; scroll-snap-type: x proximity; }
  .cup { scroll-snap-align: start; }
  .actions { position: sticky; bottom: 0; z-index: 10; flex-direction: row; flex-wrap: wrap; margin: 0 -12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .actions .btn { flex: 1 1 40%; }
  .actions #dlPdf { order: 3; flex-basis: 100%; min-height: 38px; font-size: 14px; border: 0; background: none; text-decoration: underline; }
  .guide .cols { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .sizes { font-size: 14px; }
  .sizes th, .sizes td { padding: 8px 6px; }
  .banner { font-size: 13px; top: 6px; }
  .tip { font-size: 13px; padding-left: 12px; gap: 6px; }
  .demoBar { border-radius: 20px; font-size: 14px; gap: 8px; padding: 8px 6px 11px 14px; width: calc(100vw - 20px); }
  .demoStep { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
