/* ===== 결 GYEOL — 화면 =====
   3D가 주인공: UI는 반투명 유리 조각처럼 가장자리에만 */
:root {
  --ink: #2b2622;
  --muted: #7d7269;
  --faint: #a89d92;
  --glass: rgba(250, 247, 242, .72);
  --glass-strong: rgba(252, 250, 246, .9);
  --line: rgba(43, 38, 34, .1);
  --accent: #c26d39;
  --chip: rgba(43, 38, 34, .06);
  --bg: #e7e1d7;
  --shadow: 0 10px 40px -18px rgba(58, 44, 30, .45);
  --radius: 20px;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: clamp(16px, 2.4vw, 32px);
  color-scheme: light;
}
body[data-mood="night"] {
  --ink: #f2ebe1;
  --muted: #b3a89c;
  --faint: #807669;
  --glass: rgba(30, 27, 30, .62);
  --glass-strong: rgba(34, 31, 34, .92);
  --line: rgba(255, 245, 230, .1);
  --chip: rgba(255, 245, 230, .08);
  --bg: #141216;
  --shadow: 0 12px 40px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; background: var(--bg); color: var(--ink);
  font: 500 14px/1.45 var(--sans); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  transition: background-color .8s var(--ease), color .6s var(--ease);
}
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- 3D 무대 & 사진 효과 ---------- */
.stage { position: fixed; inset: 0; height: 100dvh; }
.stage canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; cursor: default; }
.stage canvas.is-grabbing { cursor: grabbing !important; }
.vignette, .grain, .veil, .flash { position: fixed; inset: 0; pointer-events: none; }
.vignette { background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(40, 28, 18, .16) 100%); }
body[data-mood="night"] .vignette { background: radial-gradient(110% 85% at 50% 50%, transparent 45%, rgba(0, 0, 0, .5) 100%); }
.grain {
  opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
body[data-mood="night"] .grain { mix-blend-mode: screen; opacity: .05; }
.veil { background: var(--bg); opacity: 0; transition: opacity .18s ease; }
.veil.is-on { opacity: 1; }
.flash { background: #fff; opacity: 0; }
.flash.is-on { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }

/* ---------- 공통 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: var(--shadow); transition: transform .25s var(--ease), background .25s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-icon { width: 42px; padding: 0; justify-content: center; }
.btn-primary { background: var(--ink); color: var(--bg); border-color: transparent; font-weight: 650; }
.btn-ghost { box-shadow: none; }
#btnMood[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- 상단 ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: flex-start;
  padding: calc(var(--gutter) + env(safe-area-inset-top)) var(--gutter) 0; pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--ink); color: var(--bg); font-weight: 800; font-size: 22px; letter-spacing: -.04em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font: italic 400 26px/1 var(--serif); letter-spacing: .02em; }
.brand-text small { margin-top: 4px; font-size: 12px; color: var(--muted); font-weight: 550; }
.actions { display: flex; gap: 8px; }

/* ---------- 원단 스펙 카드 ---------- */
.spec {
  position: fixed; z-index: 4; left: var(--gutter); top: 50%; translate: 0 -50%; width: 272px;
  padding: 22px 22px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: var(--shadow);
}
.spec.is-swap > * { animation: specIn .55s var(--ease) both; }
.spec.is-swap > *:nth-child(2) { animation-delay: .03s; } .spec.is-swap > *:nth-child(3) { animation-delay: .06s; }
.spec.is-swap > *:nth-child(4) { animation-delay: .09s; } .spec.is-swap > *:nth-child(6) { animation-delay: .12s; }
@keyframes specIn { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } }
.spec-en { margin: 0; font: italic 400 19px/1 var(--serif); color: var(--muted); }
.spec-name { margin: 6px 0 8px; font-size: 27px; line-height: 1.1; font-weight: 750; letter-spacing: -.045em; }
.spec-line { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; word-break: keep-all; }
.spec-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 14px; padding: 12px 0; border-block: 1px solid var(--line); }
.spec-nums div { min-width: 0; }
.spec-nums dt { font-size: 11px; color: var(--muted); white-space: nowrap; }
.spec-nums dd { margin: 2px 0 0; display: flex; align-items: baseline; gap: 2px; }
.spec-nums b { font: 400 25px/1 var(--serif); letter-spacing: -.01em; }
.spec-nums span { font-size: 11px; color: var(--muted); }
.spec-live { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; font-size: 12.5px; }
.spec-live b { font: 400 20px/1 var(--serif); }
.spec-live small { color: var(--muted); font-size: 11px; width: 100%; padding-left: 14px; }
.spec-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 1.6s infinite; align-self: center; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.spec-bars { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 7px; }
.spec-bars li { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.spec-bars i { position: relative; height: 4px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.spec-bars i::after { content: ''; position: absolute; inset: 0; width: calc(var(--v, 3) * 20%); border-radius: inherit; background: var(--ink); transition: width .7s var(--ease); }
.spec-comp { margin: 0; font-size: 11.5px; color: var(--faint); word-break: keep-all; }

/* ---------- 무대 선택 ---------- */
.stages { position: fixed; z-index: 5; left: 50%; translate: -50% 0; top: calc(var(--gutter) + env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; }
.seg {
  display: inline-flex; padding: 4px; gap: 2px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); box-shadow: var(--shadow);
}
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 15px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 600; transition: background .25s, color .25s; white-space: nowrap; }
.seg button svg { width: 18px; height: 18px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg small { font-size: 11px; opacity: .65; font-weight: 500; }

/* ---------- 원단 견본 ---------- */
.swatches {
  position: fixed; z-index: 4; left: 50%; translate: -50% 0; bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
  display: flex; gap: 4px; padding: 6px; max-width: min(640px, calc(100vw - 2 * var(--gutter)));
  border: 1px solid var(--line); border-radius: 26px; background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); box-shadow: var(--shadow);
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.swatches::-webkit-scrollbar { display: none; }
.swatch { flex: none; display: grid; justify-items: center; gap: 3px; width: 80px; padding: 6px 4px 7px; border: 0; border-radius: 20px; background: transparent; scroll-snap-align: center; transition: background .25s; }
.swatch i {
  width: 52px; height: 52px; border-radius: 15px; background-size: cover; background-color: var(--chip);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 6px 14px -8px rgba(0, 0, 0, .5); transition: transform .35s var(--ease), border-radius .35s var(--ease);
}
.swatch span { font-size: 12px; font-weight: 650; white-space: nowrap; letter-spacing: -.03em; }
.swatch small { font: 400 12px/1 var(--serif); color: var(--muted); }
.swatch:hover i { transform: translateY(-2px) rotate(-3deg); }
.swatch[aria-checked="true"] { background: var(--chip); }
.swatch[aria-checked="true"] i { border-radius: 26px; transform: scale(1.04); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink), 0 8px 18px -8px rgba(0, 0, 0, .55); }

/* ---------- 오른쪽 줄 (높이·풍속) ---------- */
.lift { --t: .5; position: fixed; z-index: 4; right: calc(var(--gutter) + 6px); top: 50%; translate: 0 -50%; height: min(46vh, 420px); width: 64px; display: flex; flex-direction: column; align-items: center; gap: 10px; outline: none; }
.lift-caption { padding: 3px 9px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 11.5px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.lift-track { position: relative; flex: 1; width: 100%; }
.lift-rope { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; translate: -50% 0; border-radius: 2px; background: repeating-linear-gradient(to bottom, var(--muted) 0 3px, transparent 3px 6px); opacity: .55; }
.lift-knob {
  position: absolute; left: 50%; top: calc((1 - var(--t)) * 100%); translate: -50% -50%; display: grid; place-items: center;
  width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); touch-action: none; cursor: grab;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--bg) 70%, transparent), 0 6px 16px -4px rgba(0, 0, 0, .45);
  transition: top .35s var(--ease), scale .2s;
}
.lift.is-active .lift-knob { transition: scale .2s; scale: 1.15; cursor: grabbing; }
.lift:focus-visible .lift-knob { outline: 2px solid var(--accent); outline-offset: 6px; }
.lift-value {
  position: absolute; right: calc(100% + 14px); padding: 5px 10px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line);
  font: 400 15px/1 var(--serif); white-space: nowrap; box-shadow: var(--shadow); pointer-events: none;
}
.lift-wheel { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--faint); }
.lift-wheel svg { width: 18px; height: 18px; }
.lift-wheel svg path { animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 50% { transform: translateY(2px); opacity: .3; } }

/* ---------- 바람 버튼 ---------- */
.gust {
  position: fixed; z-index: 4; right: var(--gutter); bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
  display: grid; place-items: center; gap: 2px; width: 76px; height: 76px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--glass); box-shadow: var(--shadow); user-select: none; -webkit-user-select: none; touch-action: none;
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); transition: transform .3s var(--ease), background .3s, color .3s;
  font-size: 12px; font-weight: 650; align-content: center;
}
.gust svg { width: 24px; height: 24px; }
.gust.is-active { background: var(--ink); color: var(--bg); transform: scale(.94); }
.gust.is-active svg path { animation: blow .6s linear infinite; stroke-dasharray: 4 3; }
@keyframes blow { to { stroke-dashoffset: -14; } }

/* ---------- 프린트 패널 ---------- */
.panel, .help {
  border: 1px solid var(--line); border-radius: 24px; background: var(--glass-strong); color: var(--ink);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); box-shadow: 0 30px 80px -30px rgba(40, 28, 18, .55);
}
.panel {
  position: fixed; z-index: 6; right: var(--gutter); top: calc(var(--gutter) + 58px + env(safe-area-inset-top)); width: 348px;
  max-height: calc(100dvh - 2 * var(--gutter) - 70px); overflow-y: auto; padding: 20px 20px 18px; overscroll-behavior: contain;
  animation: panelIn .45s var(--ease);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
body.panel-open .lift, body.panel-open .gust { opacity: 0; pointer-events: none; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.eyebrow { margin: 0 0 2px; font: italic 400 14px/1 var(--serif); letter-spacing: .06em; color: var(--muted); }
.panel h2, .help h2 { margin: 0; font-size: 21px; font-weight: 750; letter-spacing: -.04em; }
.panel h3 { margin: 18px 0 8px; font-size: 12px; font-weight: 650; color: var(--muted); }
.upload {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left;
  border: 1.5px dashed color-mix(in srgb, var(--ink) 28%, transparent); border-radius: 16px; background: var(--chip); transition: background .2s, border-color .2s;
}
.upload:hover { border-color: var(--ink); }
.upload svg { width: 26px; height: 26px; }
.upload span { display: flex; flex-direction: column; gap: 2px; }
.upload small { color: var(--muted); font-size: 11.5px; }
.pattern-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.chip-swatch { display: grid; gap: 6px; padding: 6px 6px 8px; border: 1px solid var(--line); border-radius: 14px; background: transparent; font-size: 12px; font-weight: 600; transition: border-color .2s, background .2s; }
.chip-swatch i { aspect-ratio: 1.4; border-radius: 9px; background-color: #f2ede5; background-repeat: repeat; background-position: center; background-size: cover; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.chip-swatch i.is-none { background: repeating-linear-gradient(135deg, #efe9df 0 6px, #e7e0d4 6px 7px); }
.chip-swatch[aria-pressed="true"] { border-color: var(--ink); background: var(--chip); }
.seg-small { display: flex; width: 100%; box-shadow: none; background: var(--chip); backdrop-filter: none; -webkit-backdrop-filter: none; }
.seg-small button { flex: 1; justify-content: center; height: 34px; padding: 0 8px; font-size: 13px; }
.range { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.range output { font: 400 15px/1 var(--serif); color: var(--ink); min-width: 46px; text-align: right; }
input[type="range"] { width: 100%; accent-color: var(--ink); }
.dyes { display: flex; flex-wrap: wrap; gap: 8px; }
.dye { --c: transparent; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); transition: transform .2s var(--ease); }
.dye[data-dye="default"] { background: conic-gradient(#d9c6a5 0 25%, #5a1e2a 0 50%, #2b3b5e 0 75%, #8f9c90 0); }
.dye:hover { transform: scale(1.08); }
.dye[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink); }
.panel-note { margin: 16px 0 0; font-size: 12px; color: var(--muted); word-break: keep-all; }

/* ---------- 안내 · 알림 · 드롭 ---------- */
.hint {
  position: fixed; z-index: 4; left: 50%; bottom: calc(var(--gutter) + 116px + env(safe-area-inset-bottom)); translate: -50% 12px;
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 2 * var(--gutter)); padding: 10px 18px 10px 12px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .5s var(--ease), translate .5s var(--ease); word-break: keep-all;
}
.hint.is-on { opacity: 1; translate: -50% 0; }
.hint-icon { position: relative; width: 26px; height: 26px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--bg) 18%, transparent); }
.hint-icon::after { content: ''; position: absolute; left: 9px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--bg); animation: tug 1.6s var(--ease) infinite; }
.hint[data-step="1"] .hint-icon::after { animation-name: roll; }
.hint[data-step="2"] .hint-icon::after { animation-name: puff; }
@keyframes tug { 0%, 15% { transform: translate(0, 0) scale(1); } 45% { transform: translate(5px, -5px) scale(.8); } 75%, 100% { transform: translate(0, 0) scale(1); } }
@keyframes roll { 0%, 100% { transform: translateY(-5px); } 50% { transform: translateY(5px); } }
@keyframes puff { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
.toast {
  position: fixed; z-index: 7; left: 50%; top: calc(var(--gutter) + 62px + env(safe-area-inset-top)); translate: -50% -14px;
  max-width: min(460px, calc(100vw - 2 * var(--gutter) - 120px)); padding: 9px 16px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease), translate .35s var(--ease); word-break: keep-all;
}
.toast.is-on { opacity: 1; translate: -50% 0; }
.drop { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; padding: var(--gutter); background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; }
.drop div { display: grid; place-items: center; gap: 4px; width: min(420px, 100%); aspect-ratio: 1.5; border: 2px dashed var(--ink); border-radius: 28px; font-size: 15px; }
.drop b { font: italic 400 34px/1 var(--serif); }

/* ---------- 사용법 ---------- */
.help { width: min(520px, calc(100vw - 2 * var(--gutter))); padding: 22px 24px; }
.help::backdrop { background: rgba(20, 16, 12, .35); backdrop-filter: blur(3px); }
.help-list { margin: 0; display: grid; gap: 0; }
.help-list div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.help-list dt { font-weight: 700; }
.help-list dd { margin: 0; color: var(--muted); word-break: keep-all; }

/* ---------- 로딩: 실을 짜는 베틀 ---------- */
.loader { position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--bg); transition: opacity .9s var(--ease), visibility .9s; }
.loader.is-done { opacity: 0; visibility: hidden; }
.loom { position: relative; width: 84px; height: 84px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.loom i { border-radius: 4px; background: var(--ink); opacity: .85; animation: weave 1.6s var(--ease) infinite; transform-origin: top; }
.loom i:nth-child(odd) { animation-delay: .2s; }
.loom::after { content: ''; position: absolute; left: -8px; right: -8px; top: 0; height: 6px; border-radius: 4px; background: var(--accent); animation: shuttle 1.6s var(--ease) infinite; }
@keyframes weave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.55); } }
@keyframes shuttle { 0% { top: 4%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 92%; opacity: 0; } }
.loader-mark { margin: 6px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.04em; }
.loader-mark em { font: italic 400 26px var(--serif); letter-spacing: .02em; margin-left: 4px; }
.loader-bar { width: 180px; height: 2px; border-radius: 2px; background: var(--chip); overflow: hidden; }
.loader-bar i { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.loader-text { margin: 0; min-height: 1.4em; font-size: 12.5px; color: var(--muted); text-align: center; max-width: 300px; }

/* ---------- 태블릿 ---------- */
@media (max-width: 1100px) {
  .spec { width: 240px; padding: 18px; top: calc(var(--gutter) + 72px); translate: none; }
  .spec-name { font-size: 23px; }
  .spec-bars { display: none; }
}

/* ---------- 휴대폰 ---------- */
@media (max-width: 760px) {
  body { font-size: 13px; }
  .btn { height: 38px; padding: 0 12px; }
  .btn-icon { width: 38px; }
  .btn-primary span { display: none; }
  .btn-primary { width: 38px; padding: 0; justify-content: center; }
  .actions { gap: 6px; }
  .brand-mark { width: 38px; height: 38px; font-size: 18px; border-radius: 12px; }
  .brand-text b { font-size: 21px; }
  .brand-text small { font-size: 11px; }

  .spec {
    top: auto; left: var(--gutter); right: auto; bottom: calc(var(--gutter) + 92px + env(safe-area-inset-bottom)); width: auto; max-width: calc(100vw - 2 * var(--gutter) - 84px);
    padding: 11px 14px; border-radius: 16px;
  }
  .spec-en, .spec-line, .spec-bars, .spec-comp { display: none; }
  .spec-name { margin: 0 0 6px; font-size: 18px; }
  .spec-nums { margin: 0; padding: 6px 0 0; border-bottom: 0; gap: 12px; }
  .spec-nums b { font-size: 19px; }
  .spec-live { margin: 8px 0 0; }
  .spec-live small { display: none; }

  .stages { top: calc(var(--gutter) + 50px + env(safe-area-inset-top)); }
  .stages .seg button { height: 32px; padding: 0 12px; font-size: 13px; }
  #btnReset { width: 34px; height: 34px; }
  .swatches { left: var(--gutter); right: var(--gutter); translate: none; max-width: none; border-radius: 22px; }
  .swatch { width: 66px; padding: 5px 2px 6px; }
  .swatch i { width: 42px; height: 42px; border-radius: 12px; }
  .swatch small { display: none; }

  .lift { right: 10px; top: calc(var(--gutter) + 112px + env(safe-area-inset-top)); translate: none; height: 30vh; width: 52px; }
  .lift-wheel { display: none; }
  .lift-value { font-size: 13px; right: calc(100% + 8px); }
  .gust { width: 62px; height: 62px; right: 12px; bottom: calc(var(--gutter) + 92px + env(safe-area-inset-bottom)); font-size: 11px; }

  .panel { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 64dvh; border-radius: 24px 24px 20px 20px; animation-name: sheetIn; }
  @keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
  .hint { bottom: calc(var(--gutter) + 186px + env(safe-area-inset-bottom)); font-size: 12.5px; }
  .help-list div { grid-template-columns: 1fr; gap: 2px; }
  .toast { max-width: calc(100vw - 2 * var(--gutter)); top: calc(var(--gutter) + 100px + env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
