:root {
  --bg: #f7f3ea;
  --paper: #fffdf8;
  --ink: #2b2623;
  --sub: #6a6058;
  --line: rgba(43, 38, 35, 0.14);
  --line-strong: rgba(43, 38, 35, 0.28);
  --shu: #d6452d;
  --shu-deep: #b5361f;
  --stage: #f1e9da;
  --focus: #1f5fae;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 8px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

/* ---- 枠組み（スマホ縦が基準） ---- */
.app { display: flex; flex-direction: column; min-height: 100svh; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: max(8px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 8px max(var(--gutter), env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; }
.brand-sub { color: var(--sub); font-size: 13px; white-space: nowrap; }
/* Phones: the one-line description sits small under the name (the header keeps the button's height) */
@media (max-width: 639px) {
  .brand { display: grid; grid-template-columns: 28px auto; column-gap: 8px; align-items: center; }
  .brand svg { grid-row: 1 / span 2; }
  .brand-name { line-height: 1.15; }
  .brand-sub { grid-column: 2; font-size: 11px; line-height: 1.35; letter-spacing: 0.02em; }
}

/* 作品を選ぶボタン: 小さな見出し＋今の作品名 */
.pick-open {
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; flex: none;
  min-height: 48px; min-width: 116px; padding: 3px 12px 4px; line-height: 1.2; text-align: left;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.pick-open:hover { border-color: var(--ink); }
.pick-kicker { font-size: 11.5px; color: var(--sub); letter-spacing: 0.06em; }
.pick-current { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 16px; white-space: nowrap; }
.pick-caret { width: 8px; height: 8px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }

/* 作品の一覧。既定（スマホ縦）は下から出るシート */
.picker {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; height: min(77svh, 680px); max-height: none;
  margin: 0; padding: 0; border: 0; border-radius: 16px 16px 0 0; background: var(--bg); color: var(--ink);
  box-shadow: 0 -10px 40px rgba(60, 44, 30, 0.22); overflow: hidden;
}
.picker[open] { display: block; animation: sheet-in 0.24s cubic-bezier(0.2, 0.8, 0.2, 1); }
.picker::backdrop { background: rgba(43, 38, 35, 0.32); }
@keyframes sheet-in { from { transform: translateY(40%); opacity: 0.4; } to { transform: none; opacity: 1; } }
.picker-inner { display: flex; flex-direction: column; height: 100%; }
.picker-head {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 6px max(8px, env(safe-area-inset-right)) 6px max(var(--gutter), env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
}
.picker-title { margin: 0; font-family: var(--serif); font-size: 19px; }
.picker-note { margin: 0; font-size: 13px; color: var(--sub); }
.picker-close {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; touch-action: manipulation;
}
.picker-close:hover { background: rgba(43, 38, 35, 0.06); }
.ico-close { --icon: url("assets/close.svg"); width: 22px; height: 22px; }
.picker-list {
  list-style: none; margin: 0; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 8px;
  padding: 12px max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.pick-card {
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; min-height: 44px; height: 100%;
  padding: 6px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
  cursor: pointer; line-height: 1.3; text-align: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.pick-card:hover { border-color: var(--line-strong); }
.pick-card img { width: 100%; max-width: 80px; height: auto; aspect-ratio: 1; margin-bottom: 2px; border-radius: 8px; background: var(--stage); }
.pick-card-name { font-weight: 700; font-size: 15px; }
.pick-card-meta { font-size: 12.5px; color: var(--sub); white-space: nowrap; }
.pick-stars { color: var(--shu); letter-spacing: 0.04em; }
.pick-card[aria-current="true"] { border: 2px solid var(--shu); padding: 5px 3px; box-shadow: 0 0 0 3px rgba(214, 69, 45, 0.12); }
.pick-card { position: relative; }
/* The current card also says so in words, not only by the red frame */
.pick-badge {
  display: none; position: absolute; top: 4px; left: 4px; z-index: 1;
  padding: 0 6px; border-radius: 999px; background: var(--shu); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1.6; letter-spacing: 0.04em;
}
.pick-card[aria-current="true"] .pick-badge { display: block; }

/* ---- 3D ---- */
.stage { position: relative; height: 55svh; min-height: 280px; background: var(--stage); overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.stage canvas:active { cursor: grabbing; }

/* Shown while a heavy model (the crane) is built for the first time. */
.loading {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); margin: 0; z-index: 3;
  padding: 10px 20px; border-radius: 999px; pointer-events: none;
  font-size: 15px; font-weight: 600; color: var(--ink, #2b2622);
  background: rgba(255, 253, 248, 0.95); box-shadow: 0 2px 10px rgba(43, 38, 34, 0.18);
}
.loading[hidden] { display: none; }
.hint {
  position: absolute; left: 12px; top: 10px; margin: 0; pointer-events: none;
  font-size: 13px; color: var(--sub); background: rgba(255, 253, 248, 0.72);
  padding: 2px 10px; border-radius: 999px;
}

.stage-tools {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; pointer-events: none;
}
.stage-tools > * { pointer-events: auto; }
.seg.views { display: flex; background: rgba(255, 253, 248, 0.9); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 44px; min-width: 44px; padding: 0 10px;
  border: 0; background: transparent; cursor: pointer; font-size: 14px; white-space: nowrap;
}
.seg.views .tool + .tool { border-left: 1px solid var(--line); }
.tool:hover { background: rgba(43, 38, 35, 0.06); }
.tool.explode { background: rgba(255, 253, 248, 0.9); border: 1px solid var(--line); border-radius: 10px; }
.tool.explode[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.ico {
  display: inline-block; width: 20px; height: 20px; flex: none; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.ico-top { --icon: url("assets/view-top.svg"); }
.ico-iso { --icon: url("assets/view-iso.svg"); }
.ico-reset { --icon: url("assets/reset.svg"); }
.ico-layers { --icon: url("assets/layers.svg"); }
.ico-play { --icon: url("assets/play.svg"); }
.is-playing .ico-play { --icon: url("assets/pause.svg"); }
.ico-prev { --icon: url("assets/prev.svg"); }
.ico-next { --icon: url("assets/next.svg"); }
.ico-replay { --icon: url("assets/replay.svg"); }
.ico-share { --icon: url("assets/share.svg"); }
.ico-go { --icon: url("assets/arrow-right.svg"); }

/* 完成の表示: 紙を隠さないよう下に寄せる */
.done { position: absolute; inset: auto 10px 66px 10px; display: flex; justify-content: center; pointer-events: none; }
.done-card {
  pointer-events: auto; width: min(100%, 460px);
  background: rgba(255, 253, 248, 0.96); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 12px 14px 14px; box-shadow: 0 10px 30px rgba(60, 44, 30, 0.14);
}
.done-card { container-type: inline-size; }
.done-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.btn.ghost { min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 600; background: transparent; }
.done-kicker { margin: 0; font-size: 12px; letter-spacing: 0.2em; color: var(--shu); font-weight: 700; }
.done-card h2 { margin: 0 0 10px; font-family: var(--serif); font-size: 22px; line-height: 1.35; }
.done-actions { display: flex; gap: 8px; }
.done-actions .btn { flex: 1 1 auto; min-height: 46px; }
.panel > .done { position: static; display: block; order: -2; margin: 0 0 12px; pointer-events: auto; }
.panel > .done .done-card { width: 100%; box-shadow: none; }
@container (max-width: 380px) {
  .done-actions { gap: 6px; }
  .done-actions .btn { padding: 0 8px; font-size: 15px; gap: 4px; }
  .done-actions .ico { width: 17px; height: 17px; }
  .done-card h2 { font-size: 20px; margin-bottom: 8px; }
}

.nogl { position: absolute; inset: 0; overflow-y: auto; padding: 18px var(--gutter); background: var(--bg); }
.nogl-why { margin: 0 0 12px; padding: 10px 12px; border-left: 4px solid var(--shu); background: var(--paper); }
.nogl-list { margin: 0; padding-left: 1.6em; }
.nogl-list li { margin: 0 0 8px; }

/* ---- 手順と操作 ---- */
.panel { padding: 12px max(var(--gutter), env(safe-area-inset-right)) 20px max(var(--gutter), env(safe-area-inset-left)); outline: none; container-type: inline-size; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; min-width: 44px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper);
  cursor: pointer; font-weight: 600; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:hover:not(:disabled) { border-color: var(--ink); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.primary, .btn.play { background: var(--shu); border-color: var(--shu); color: #fff; }
.btn.primary:hover, .btn.play:hover:not(:disabled) { background: var(--shu-deep); border-color: var(--shu-deep); }
/* 完成後の「もう一度」は控えめに。朱の塗りは完成の札の「次の作品へ」だけにする */
.btn.play.is-done { background: var(--paper); border-color: var(--line-strong); color: var(--ink); }
.btn.play.is-done:hover:not(:disabled) { background: var(--paper); border-color: var(--ink); }
.btn.play.is-done .ico-play { --icon: url("assets/replay.svg"); }
[data-webgl="false"] .transport { grid-template-columns: 1fr 1fr; }

.transport { display: grid; grid-template-columns: auto minmax(max-content, 1fr) auto; gap: 8px; }
.btn.play { min-height: 52px; font-size: 17px; }
.btn.play .ico { width: 22px; height: 22px; }
.btn.nav { min-width: 88px; }
/* 細い列では余白を詰めて、アイコンも再生の文字も切らさない */
@container (max-width: 330px) {
  .transport { gap: 6px; }
  .btn.nav { min-width: 0; padding: 0 9px; gap: 4px; }
  .btn.play { padding: 0 10px; font-size: 16px; gap: 4px; }
}

.scrub { position: relative; margin: 6px 0 2px; }
.scrub input {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer;
  touch-action: pan-y;
}
.scrub input::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--shu) var(--fill, 0%), rgba(43, 38, 35, 0.16) var(--fill, 0%));
}
.scrub input::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(43, 38, 35, 0.16); }
.scrub input::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--shu); }
.scrub input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: -9px;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--shu); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.scrub input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: 2px solid var(--shu); }
.ticks { position: absolute; left: 12px; right: 12px; top: 50%; height: 0; pointer-events: none; }
.ticks span { position: absolute; top: 5px; width: 2px; height: 8px; margin-left: -1px; background: var(--line-strong); border-radius: 1px; }

.step { margin-top: 4px; }
.step-no { margin: 0; color: var(--shu); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; }
.step-count { color: var(--sub); font-weight: 500; margin-left: 4px; }
.step-title { margin: 0 0 4px; font-family: var(--serif); font-size: 22px; line-height: 1.4; text-wrap: pretty; }
.step-text, .step-tip { text-wrap: pretty; }
/* Break Japanese between phrases where the browser can (ignored elsewhere; the nowrap spans still hold) */
.panel, .done-card, .nogl, .foot { word-break: auto-phrase; }
/* The footer notes are static text (not run through the word list), so ask the browser to avoid a lone last character */
.foot-note, .foot .share__note { text-wrap: pretty; }
.nowrap { white-space: nowrap; }
.step-text { margin: 0; font-size: 16.5px; }
.step-tip { margin: 8px 0 0; padding: 8px 12px; background: var(--paper); border-left: 3px solid var(--shu); border-radius: 0 6px 6px 0; font-size: 15px; color: #4a413b; }

.legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--sub); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend svg { width: 40px; height: 8px; }
.legend b { color: var(--ink); }

/* Speed and stop-at-each-step sit right under the transport, where the person folding looks */
.settings { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.settings .chip { min-width: 46px; padding: 0 9px; }
/* 360px phones: keep speed and stop on one row (the speed chips explain themselves without the label) */
@container (max-width: 352px) {
  .settings .seg-label { display: none; }
  .settings .chip { font-size: 14px; }
}
.chip.stop-each { min-width: 0; }

/* 手順の一覧: スマホは閉じた折りたたみ、広い画面は右欄に開いたまま */
.steps { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 6px; }
.steps summary {
  display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 700; font-size: 15px;
}
.steps summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--sub); border-bottom: 2px solid var(--sub); transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.steps[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.steps.is-pinned summary { display: none; }
.steps.is-pinned::before { content: "手順の一覧"; display: block; margin: 4px 0 4px; font-weight: 700; font-size: 14px; color: var(--sub); }
.step-list { list-style: none; margin: 0; padding: 0; }
.step-link {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 10px;
  border: 0; border-left: 3px solid transparent; background: transparent; cursor: pointer; text-align: left;
  font-size: 15px; line-height: 1.4; touch-action: manipulation;
}
.step-link:hover { background: rgba(43, 38, 35, 0.05); }
.step-num { flex: none; width: 1.6em; color: var(--sub); font-variant-numeric: tabular-nums; text-align: right; }
.step-link[aria-current="step"] { border-left-color: var(--shu); background: var(--paper); font-weight: 700; }
.step-link[aria-current="step"] .step-num { color: var(--shu); }
.nogl-list li[aria-current="step"] { background: var(--paper); border-left: 3px solid var(--shu); padding: 4px 8px; margin-left: -11px; }
.seg.speed { display: flex; align-items: center; gap: 6px; }
.seg-label { font-size: 14px; color: var(--sub); margin-right: 4px; }
.chip {
  min-height: 44px; min-width: 56px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; cursor: pointer; font-size: 15px; touch-action: manipulation;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }

.paper-info { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 0; font-size: 14px; color: var(--sub); }
/* Line 1 the paper, line 2 the two sides. A swatch is a round dot so it does not read as a check box */
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; }
.swatch { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.swatch i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-block; flex: none; }
.keys { display: none; margin: 10px 0 0; font-size: 13px; color: var(--sub); }

.foot {
  padding: 20px max(var(--gutter), env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  border-top: 1px solid var(--line); font-size: 14px; color: var(--sub);
}
.foot-note { margin: 0 0 12px; }
/* 共有ボタンは、ほかのボタンと同じ白地＋枠線（枠は地に対して3:1以上） */
.foot .share__button { background: var(--paper); border: 1px solid rgba(43, 38, 35, 0.72); color: var(--ink); }
.foot .share__button:hover { background: #fff; border-color: var(--ink); }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; color: var(--ink); font-weight: 600; }

/* ---- 幅に応じて ---- */
@media (max-width: 359px) {
  .brand-name { font-size: 17px; }
  .pick-open { padding: 3px 10px 4px; }
  .btn.nav { min-width: 72px; padding: 0 10px; }
  .tool { padding: 0 8px; }
}
@media (hover: hover) and (pointer: fine) {
  .keys { display: block; }
}

/* 横向き・広い画面: 左に3D、右に手順と操作 */
@media (min-width: 720px) and (orientation: landscape), (min-width: 1024px) {
  .app {
    display: grid; height: 100svh; min-height: 0;
    grid-template-columns: minmax(0, 1fr) clamp(336px, 36vw, 440px);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .top { grid-column: 1 / -1; }
  .stage { height: auto; min-height: 0; }
  .panel { overflow-y: auto; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
  .panel .step { order: -1; margin: 0 0 12px; }
  .panel .transport { order: 0; }
  .panel .scrub { order: 0; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .top { padding-top: max(4px, env(safe-area-inset-top)); padding-bottom: 4px; }
  .pick-open { min-height: 44px; }
  .brand-sub { display: none; }
  .step-title { font-size: 19px; }
  .panel { padding-top: 10px; }
  .done { bottom: 62px; }
  .done-card { padding: 8px 12px 10px; }
  .done-card h2 { font-size: 18px; margin-bottom: 6px; }
  .hint { display: none; }
}

/* 横向き・広い画面: 一覧は3Dの上に重なる枠。背景は薄く暗くするだけで、動きは見えたまま */
@media (min-width: 720px) and (orientation: landscape), (min-width: 1024px) {
  .picker {
    inset: 0; margin: auto; width: min(calc(100vw - 32px), 760px); height: fit-content; max-height: calc(100svh - 32px);
    border-radius: 16px; box-shadow: 0 20px 60px rgba(60, 44, 30, 0.28);
  }
  .picker[open] { display: flex; animation-name: pop-in; }
  .picker-inner { height: auto; min-height: 0; flex: 1 1 auto; }
  .picker::backdrop { background: rgba(43, 38, 35, 0.22); }
  .picker-list { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; padding: 14px 16px 18px; }
  .pick-card img { max-width: 96px; }
}
/* PC: 作品ボタンの下、右に寄せる。3Dの紙は左に見えたまま動き続ける */
@media (min-width: 1024px) and (min-height: 600px) {
  .picker { inset: 68px 16px auto auto; margin: 0; width: min(calc(100vw - 32px), 640px); max-height: calc(100svh - 84px); }
  .picker::backdrop { background: rgba(43, 38, 34, 0.16); }
}
/* 背の低い横向き（スマホ横）: 5列にして10個を2段で見渡す */
@media (max-height: 480px) and (orientation: landscape) {
  .picker {
    inset: var(--picker-top, 56px) 0 auto 0; margin: 0 auto; width: min(calc(100vw - 24px), 820px);
    max-height: calc(100svh - var(--picker-top, 56px) - 6px); border-radius: 0 0 16px 16px;
  }
  .picker-head { padding-top: 2px; padding-bottom: 2px; }
  .picker-list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 8px 12px 10px; }
  .pick-card { padding: 5px 4px; }
  .pick-card[aria-current="true"] { padding: 4px 3px; }
  .pick-card img { max-width: 64px; }
}
/* A narrow phone on its side (one column): the completion is a one-line band low in the 3D, so the paper
   keeps the space above it */
@media (max-height: 480px) and (orientation: landscape) and (max-width: 719px) {
  .stage > .done .done-card { display: flex; align-items: center; gap: 8px; width: min(100%, 600px); padding: 6px 8px 6px 14px; }
  .stage > .done .done-head { flex: 1 1 auto; align-items: center; min-width: 0; }
  .stage > .done .done-kicker { display: none; }
  .stage > .done .done-card h2 { margin: 0; font-size: 17px; white-space: nowrap; }
  .stage > .done .done-actions { flex: none; gap: 6px; }
  .stage > .done .done-actions .btn { min-height: 44px; padding: 0 12px; }
}
@keyframes pop-in { from { transform: translateY(12px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .picker[open] { animation: none; }
}
