/* 포토부스 꾸미기 데모 — 레이아웃·컴포넌트.
   색·반경·그림자·글꼴은 전부 프리셋 시맨틱 변수(var(--aq-…))에서 온다. 리터럴 색 없음.
   모션: 트랙 안 인디케이터는 glide(감쇠비≈1, 오버슈트 없음), 모달·스티커 붙이기는 spring. */

:root {
  --glide: 320ms cubic-bezier(0.22, 1, 0.36, 1);
  --press: 120ms var(--aq-ease-out);
  --gap: 12px;
  --pad: 16px;
  --tile: 88px;
  --font-display: var(--aq-font-display, var(--aq-font-sans));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--aq-font-sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--aq-fg);
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
button, input, select, a { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--aq-ring-strong); outline-offset: 3px; }
.ico { flex: none; }

/* ── App column ── */
.app {
  width: 100%;
  max-width: 1080px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(var(--pad) + var(--safe-top)) calc(var(--pad) + var(--safe-right)) calc(var(--pad) + var(--safe-bottom)) calc(var(--pad) + var(--safe-left));
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ── Top bar: 단계 + 남은 시간 (왼쪽 맥락, 오른쪽 상태) ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 72px;
}
.steps {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.step { display: flex; align-items: center; gap: 8px; color: var(--aq-fg-secondary); font-weight: 600; white-space: nowrap; }
.step-dot {
  width: 36px; height: 36px; border-radius: var(--aq-radius-full);
  display: inline-grid; place-items: center;
  background: var(--aq-surface-sunken); color: var(--aq-fg-secondary);
  font-size: 16px; font-weight: 700;
}
.step-dot .ico { display: none; }
.step.is-done .step-dot { background: var(--aq-surface); color: var(--aq-accent); box-shadow: inset 0 0 0 2px var(--aq-accent); }
.step.is-done .step-dot .ico { display: block; }
.step.is-done .step-num { display: none; }
.step.is-current { color: var(--aq-fg); }
.step.is-current .step-dot { background: var(--aq-fg); color: var(--aq-fg-inverse); }
.step-line { width: 28px; height: 2px; background: var(--aq-border-strong); border-radius: 2px; }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.timer {
  display: inline-flex; align-items: baseline; gap: 10px;
  min-height: 64px; padding: 0 20px;
  border-radius: var(--aq-radius-full);
  background: var(--aq-surface);
  box-shadow: inset 0 0 0 2px var(--aq-border);
  white-space: nowrap;
  align-items: center;
}
.timer-label { font-size: 16px; font-weight: 600; color: var(--aq-fg-secondary); }
.timer-digits { font-family: var(--font-display); font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; min-width: 3.2ch; text-align: right; }
.timer[data-warn="true"] { background: var(--aq-warning); box-shadow: none; }
.timer[data-warn="true"] .timer-label, .timer[data-warn="true"] .timer-digits { color: var(--aq-fg); }
.timer.is-pulse { animation: timer-pulse 420ms var(--aq-ease-out); }
@keyframes timer-pulse { 0% { transform: scale(1); } 35% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* ── Buttons (Aquila Button: primary / secondary / ghost / danger) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 64px; min-width: 64px; padding: 0 22px;
  border-radius: var(--aq-radius-el);
  font-size: 19px; font-weight: 700; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: transform var(--press), background-color var(--press), color var(--press), box-shadow var(--press);
  user-select: none; -webkit-user-select: none;
}
.btn:not(:disabled):active { transform: scale(var(--aq-press-scale)); }
.btn-primary { background: var(--aq-accent); color: var(--aq-accent-fg); }
.btn-primary:not(:disabled):hover { background: var(--aq-accent-strong); }
.btn-secondary { background: var(--aq-accent-subtle); color: var(--aq-fg); }
.btn-ghost { background: transparent; color: var(--aq-fg); box-shadow: inset 0 0 0 2px var(--aq-border); }
.btn-ghost:not(:disabled):hover { background: var(--aq-surface); }
.btn-danger { background: var(--aq-error); color: var(--aq-fg); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--aq-surface-sunken); color: var(--aq-fg-secondary); box-shadow: none; cursor: not-allowed; }
.btn-lg { min-height: 72px; padding: 0 30px; font-size: 21px; border-radius: var(--aq-radius-el); }
.btn-compact { padding: 0 16px; font-size: 17px; }
.icon-btn {
  width: 64px; height: 64px; border-radius: var(--aq-radius-full);
  display: inline-grid; place-items: center; color: var(--aq-fg-secondary);
}
.icon-btn:hover { background: var(--aq-surface-sunken); color: var(--aq-fg); }

/* ── Decorate view ── */
.view { display: flex; flex-direction: column; gap: var(--gap); flex: 1 1 auto; row-gap: var(--gap); }
.stage { flex: 1 1 auto; display: flex; justify-content: center; align-items: center; min-height: 0; }
.sheet-wrap { position: relative; width: 300px; height: 450px; flex: none; }
#sheet { display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; }
#sheet[data-tool="pen"] { cursor: crosshair; }
.cut-overlays { position: absolute; inset: 0; pointer-events: none; }
.cut-overlay {
  position: absolute;
  border-radius: 5.49% / 3.91%;
  transition: box-shadow 160ms var(--aq-ease-out);
}
.cut-overlay.is-selected { box-shadow: 0 0 0 4px var(--aq-accent); }
.cut-tag {
  position: absolute; top: 8px; left: 8px;
  min-width: 32px; height: 32px; padding: 0 8px;
  display: none; place-items: center;
  border-radius: var(--aq-radius-full);
  background: var(--aq-accent); color: var(--aq-accent-fg);
  font-size: 16px; font-weight: 800;
}
.cut-overlay.is-selected .cut-tag { display: grid; }
.cut-skel { position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity 200ms var(--aq-ease-out); }
.cut-overlay.is-loading .cut-skel { opacity: 0.55; }

.sheet-empty {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: min(86%, 420px); padding: 20px 16px;
  text-align: center;
  background: var(--aq-surface);
  border-radius: var(--aq-radius-card);
  box-shadow: var(--aq-shadow-lg);
}
.sheet-empty-text { color: var(--aq-fg-secondary); font-size: 16px; }

/* 스티커 선택 상자 + 손잡이 (보이는 원 44px, 누르는 영역 64px) */
.sticker-box {
  position: absolute; left: 0; top: 0;
  border: 3px dashed var(--aq-accent);
  border-radius: var(--aq-radius-sm);
  pointer-events: none;
  transform-origin: 0 0;
}
.handle {
  position: absolute; width: 64px; height: 64px;
  display: grid; place-items: center;
  pointer-events: auto; touch-action: none;
}
.handle-del { left: -34px; top: -34px; }
.handle-xform { right: -34px; bottom: -34px; cursor: nwse-resize; }
.handle-face {
  width: 44px; height: 44px; border-radius: var(--aq-radius-full);
  display: grid; place-items: center;
  background: var(--aq-surface); color: var(--aq-accent);
  box-shadow: inset 0 0 0 3px var(--aq-accent), var(--aq-shadow-md);
}
.handle-del .handle-face { color: var(--aq-fg); box-shadow: inset 0 0 0 3px var(--aq-fg), var(--aq-shadow-md); }

/* ── Action row ── */
.actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.actions-left { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Tray (BottomSheet, 항상 붙어 있음) ── */
.tray {
  background: var(--aq-surface);
  border-radius: var(--aq-radius-card) var(--aq-radius-card) var(--aq-radius-el) var(--aq-radius-el);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--aq-shadow-lg);
}
.tray-head { display: flex; gap: 10px; align-items: center; }
.tray-head .seg-tools { flex: 1 1 auto; }
/* 세 패널을 같은 칸에 겹쳐 둔다: 도구를 바꿔도 트레이 높이(=시트 크기)가 그대로 */
.panels { display: grid; }
.panel { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel:not([data-active="true"]) { visibility: hidden; }
.tray[data-expanded="false"] .collapsible { display: none; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.controls { align-items: flex-end; }
.field-inline { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-mini { font-size: 15px; font-weight: 700; color: var(--aq-fg-secondary); display: flex; gap: 6px; }
.field-mini output { font-variant-numeric: tabular-nums; color: var(--aq-fg); }
.controls .slider-field { flex: 1 1 240px; }
.hint { color: var(--aq-fg-secondary); font-size: 16px; }
.row .hint { flex: 1 1 220px; }
.hint-warn { color: var(--aq-fg); }
.tray-empty { color: var(--aq-fg-secondary); padding: 12px 4px; }

/* SegmentedControl — 인디케이터는 transform 만, glide */
.seg {
  position: relative;
  display: grid; grid-template-columns: repeat(var(--seg-n, 3), minmax(0, 1fr));
  padding: 4px; min-height: 72px;
  border-radius: var(--aq-radius-el);
  background: var(--aq-surface-sunken);
  isolation: isolate;
}
.seg-ind {
  position: absolute; z-index: -1;
  top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / var(--seg-n, 3));
  border-radius: calc(var(--aq-radius-el) - 4px);
  background: var(--aq-surface);
  box-shadow: var(--aq-shadow-sm);
  transform: translateX(calc(var(--seg-i, 0) * 100%));
  transition: transform var(--glide);
}
.seg > button {
  min-height: 64px; min-width: 64px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: calc(var(--aq-radius-el) - 4px);
  font-size: 18px; font-weight: 700; color: var(--aq-fg-secondary);
  white-space: nowrap;
  transition: color 160ms var(--aq-ease-out);
}
.seg > button[aria-checked="true"] { color: var(--aq-fg); }
.seg > button:disabled { color: var(--aq-fg-secondary); opacity: 0.6; cursor: not-allowed; text-decoration: line-through; }
.seg-tools > button { font-size: 20px; }
.seg-cuts-field { flex: 1 1 300px; }
.seg-width { flex: 1 1 280px; }
.w-dot { width: var(--d); height: var(--d); border-radius: var(--aq-radius-full); background: currentColor; }

/* Chip (soft: 옅은 면 + 색 점 + 진한 글자, 카테고리 색 cat-1..5) */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 64px; padding: 0 20px;
  border-radius: var(--aq-radius-full);
  background: var(--aq-surface);
  box-shadow: inset 0 0 0 2px var(--aq-border);
  font-size: 17px; font-weight: 700; color: var(--aq-fg);
  white-space: nowrap;
  --chip-c: var(--aq-accent); --chip-l: var(--aq-accent-subtle);
}
.chip[data-slot="1"] { --chip-c: var(--aq-cat-1); --chip-l: var(--aq-cat-1-light); }
.chip[data-slot="2"] { --chip-c: var(--aq-cat-2); --chip-l: var(--aq-cat-2-light); }
.chip[data-slot="3"] { --chip-c: var(--aq-cat-3); --chip-l: var(--aq-cat-3-light); }
.chip[data-slot="4"] { --chip-c: var(--aq-cat-4); --chip-l: var(--aq-cat-4-light); }
.chip[data-slot="5"] { --chip-c: var(--aq-cat-5); --chip-l: var(--aq-cat-5-light); }
.chip-dot { width: 14px; height: 14px; border-radius: var(--aq-radius-full); background: var(--chip-c); }
.chip[aria-pressed="true"] { background: var(--chip-l); box-shadow: inset 0 0 0 3px var(--chip-c); }

/* Tiles: 가로 한 줄, 넘치면 옆으로 밀어 보기 */
.tiles {
  display: flex; gap: 10px; overflow-x: auto; padding: 6px 4px 8px;
  scroll-snap-type: x proximity;
}
.tile {
  position: relative; flex: none; scroll-snap-align: start;
  width: var(--tile); height: var(--tile); min-width: 64px; min-height: 64px;
  border-radius: var(--aq-radius-sm);
  background: var(--aq-surface-sunken);
  overflow: hidden;
  transition: transform var(--press);
}
.tile:active { transform: scale(var(--aq-press-scale)); }
.tile img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tile-sticker img { object-fit: contain; padding: 10%; }
.tile[aria-pressed="true"] { outline: 4px solid var(--aq-accent); outline-offset: -4px; }
.tile-check { display: none; }
.tile[aria-pressed="true"] .tile-check {
  display: block; position: absolute; right: 6px; top: 6px;
  width: 26px; height: 26px; border-radius: var(--aq-radius-full);
  background: var(--aq-accent);
}
.tile[aria-pressed="true"] .tile-check::after {
  content: ""; position: absolute; left: 9px; top: 5px; width: 7px; height: 12px;
  border: 0 solid var(--aq-accent-fg); border-right-width: 3px; border-bottom-width: 3px;
  transform: rotate(45deg);
}

/* Model status + StrokeLoader */
.model-status { display: flex; align-items: center; gap: 10px; color: var(--aq-fg-secondary); font-size: 16px; min-height: 28px; }
.stroke-loader { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--aq-solid); stroke-width: 2.5; stroke-dasharray: 20px; animation: stroke-dash-anim 15s infinite linear; }
@keyframes stroke-dash-anim { 0% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 200px; } }
.model-status[data-state="ready"] .stroke-loader { animation: none; stroke-dasharray: none; stroke: var(--aq-success); }
.model-status[data-state="failed"] { color: var(--aq-fg); }
.model-status[data-state="failed"] .stroke-loader { animation: none; stroke-dasharray: none; stroke: var(--aq-error); }

/* Slider */
.slider-field { display: flex; flex-direction: column; gap: 4px; }
.slider-label { font-weight: 700; display: flex; gap: 8px; align-items: baseline; }
.slider-label output { color: var(--aq-fg-secondary); font-variant-numeric: tabular-nums; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 64px; background: transparent; margin: 0; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 10px; background: var(--aq-surface-sunken); }
input[type="range"]::-moz-range-track { height: 10px; border-radius: 10px; background: var(--aq-surface-sunken); }
input[type="range"]::-moz-range-progress { height: 10px; border-radius: 10px; background: var(--aq-accent); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 40px; height: 40px; margin-top: -15px;
  border-radius: var(--aq-radius-full); background: var(--aq-surface);
  box-shadow: inset 0 0 0 4px var(--aq-accent), var(--aq-shadow-md);
}
input[type="range"]::-moz-range-thumb {
  width: 40px; height: 40px; border: 0; border-radius: var(--aq-radius-full); background: var(--aq-surface);
  box-shadow: inset 0 0 0 4px var(--aq-accent), var(--aq-shadow-md);
}

/* Pen swatches (RadioGroup) */
.pen-colors { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 64px; height: 64px; border-radius: var(--aq-radius-full);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 2px var(--aq-border);
  transition: transform var(--press), box-shadow var(--press);
}
.swatch:active { transform: scale(var(--aq-press-scale)); }
.swatch-dot { width: 44px; height: 44px; border-radius: var(--aq-radius-full); background: var(--sw); box-shadow: inset 0 0 0 2px var(--aq-border-strong); }
.swatch[aria-checked="true"] { box-shadow: inset 0 0 0 4px var(--aq-fg); }

/* Toggle (switch) */
.toggle { display: inline-flex; align-items: center; gap: 12px; min-height: 64px; padding: 0 16px 0 8px; border-radius: var(--aq-radius-el); }
.toggle:hover { background: var(--aq-surface-sunken); }
.toggle-track { width: 56px; height: 32px; border-radius: var(--aq-radius-full); background: var(--aq-border-strong); position: relative; transition: background-color 160ms var(--aq-ease-out); }
.toggle-knob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: var(--aq-radius-full); background: var(--aq-surface); box-shadow: var(--aq-shadow-sm); transition: transform var(--glide); }
.toggle[aria-checked="true"] .toggle-track { background: var(--aq-fg); }
.toggle[aria-checked="true"] .toggle-knob { transform: translateX(24px); }
.toggle-label { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }

/* ── Print view ── */
.print { align-items: center; justify-content: flex-start; }
.print-card {
  width: 100%; max-width: 760px;
  background: var(--aq-surface);
  border-radius: var(--aq-radius-card);
  padding: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
  box-shadow: var(--aq-shadow-lg);
}
.print-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 4vw, 44px); line-height: 1.2; }
.print-title:focus { outline: none; }
.print-note { color: var(--aq-fg-secondary); }
.nowrap { white-space: nowrap; }
.print-preview { width: min(100%, calc((100dvh - 420px) * 2 / 3), 560px); min-width: 220px; aspect-ratio: 2 / 3; }
.print-preview img { width: 100%; height: 100%; object-fit: contain; border-radius: var(--aq-radius-sm); }
.print-meta { color: var(--aq-fg-secondary); font-size: 15px; }
.print-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ── Modal (native dialog, snappy) ── */
.modal {
  border: 0; padding: 0;
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  border-radius: var(--aq-radius-card);
  background: var(--aq-surface-overlay); color: var(--aq-fg);
  box-shadow: var(--aq-shadow-xl);
}
.modal[open] { animation: modal-in 260ms var(--aq-ease-spring); }
.modal::backdrop { background: color-mix(in srgb, var(--aq-fg) 45%, transparent); }
@keyframes modal-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -8px -8px 0 0; }
.modal-title { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.25; }
.modal-text { color: var(--aq-fg-secondary); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.source-list { display: grid; gap: 10px; }
.source {
  display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 14px;
  align-items: center; text-align: left;
  min-height: 88px; padding: 12px 16px;
  border-radius: var(--aq-radius-el);
  background: var(--aq-surface-sunken);
  transition: transform var(--press);
}
.source:active { transform: scale(var(--aq-press-scale)); }
.source:hover { box-shadow: inset 0 0 0 2px var(--aq-border-strong); }
.source-ico { grid-row: 1 / span 2; width: 64px; height: 64px; border-radius: var(--aq-radius-sm); display: grid; place-items: center; background: var(--aq-surface); color: var(--aq-accent); }
.source-name { font-size: 20px; font-weight: 700; }
.source-desc { color: var(--aq-fg-secondary); font-size: 15px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; text-align: center; border-radius: var(--aq-radius-el); background: var(--aq-accent-subtle); }
.empty-ico { color: var(--aq-fg-secondary); }
.empty-title { font-weight: 700; }
.empty-text { color: var(--aq-fg-secondary); }
.camera-frame { position: relative; aspect-ratio: 4 / 3; border-radius: var(--aq-radius-el); overflow: hidden; background: var(--aq-fg); }
.camera-frame video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camera-frame.is-flash::after { content: ""; position: absolute; inset: 0; background: var(--aq-surface); animation: flash 400ms var(--aq-ease-out) forwards; }
@keyframes flash { from { opacity: 0.9; } to { opacity: 0; } }
.cam-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 120px; color: var(--aq-fg-inverse); pointer-events: none; }
.cam-shots { position: absolute; right: 12px; bottom: 12px; padding: 6px 14px; border-radius: var(--aq-radius-full); background: var(--aq-surface); color: var(--aq-fg); font-weight: 700; }

/* ── Toast (단색 면 + 의미 색 아이콘) ── */
.toast-region {
  position: fixed; left: 50%; top: calc(16px + var(--safe-top)); transform: translateX(-50%);
  z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center;
  width: min(560px, calc(100vw - 24px)); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 64px; padding: 12px 18px;
  border-radius: var(--aq-radius-el);
  background: var(--aq-fg); color: var(--aq-fg-inverse);
  box-shadow: var(--aq-shadow-xl);
  font-weight: 600;
  animation: toast-in 280ms var(--aq-ease-enter);
}
.toast.is-leaving { opacity: 0; transform: translateY(-8px); transition: opacity 240ms var(--aq-ease-out), transform 240ms var(--aq-ease-out); }
.toast-icon { flex: none; width: 36px; height: 36px; border-radius: var(--aq-radius-full); display: grid; place-items: center; background: var(--aq-info); color: var(--aq-fg); }
.toast[data-tone="success"] .toast-icon { background: var(--aq-success); }
.toast[data-tone="error"] .toast-icon { background: var(--aq-error); }
.toast[data-tone="warning"] .toast-icon { background: var(--aq-warning); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

/* ── 키오스크 1080×1920 ── */
@media (min-width: 1000px) and (min-height: 1500px) {
  :root { --pad: 28px; --gap: 18px; --tile: 120px; }
  body { font-size: 19px; }
  .topbar { min-height: 96px; }
  .step-label { font-size: 22px; }
  .step-dot { width: 44px; height: 44px; }
  .timer-digits { font-size: 38px; }
  .timer-label { font-size: 19px; }
  .btn { font-size: 21px; }
  .btn-lg { min-height: 84px; font-size: 24px; padding: 0 38px; }
  .tray { padding: 22px; gap: 16px; }
  .seg-tools > button { min-height: 72px; font-size: 22px; }
  .hint { font-size: 18px; }
}

/* ── 가로로 넓고 낮은 데스크톱 (예: 1280×800): 시트 왼쪽, 도구 오른쪽 ── */
@media (min-width: 1000px) and (max-height: 1199px) and (min-aspect-ratio: 6/5) {
  .app { max-width: 1320px; }
  .decorate {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 20px;
    align-items: start;
  }
  .decorate .stage { grid-column: 1; grid-row: 1 / span 2; align-items: flex-start; }
  .decorate .actions { grid-column: 2; grid-row: 1; }
  .decorate .tray { grid-column: 2; grid-row: 2; border-radius: var(--aq-radius-card); }
}

/* ── 좁은 화면 (390 등) ── */
@media (max-width: 560px) {
  :root { --pad: 12px; --gap: 10px; --tile: 76px; }
  .topbar { gap: 8px; }
  .steps { width: 100%; justify-content: space-between; }
  .step-line { flex: 1 1 auto; width: auto; min-width: 12px; }
  .topbar-right { width: 100%; justify-content: space-between; margin-left: 0; }
  .btn { padding: 0 16px; font-size: 17px; }
  .btn-lg { width: 100%; }
  .actions-left { width: 100%; }
  .actions-left .btn { flex: 1 1 0; padding: 0 8px; gap: 6px; }
  .actions-left .btn .ico { width: 22px; height: 22px; }
  .seg > button { font-size: 16px; padding: 0 4px; gap: 4px; min-width: 0; }
  .seg-tools > button .ico { width: 22px; height: 22px; }
  .controls > .btn { flex: 1 1 0; }
  .panel:not([data-active="true"]) { display: none; }
  .seg-tools > button { font-size: 18px; }
  .tray { padding: 12px; }
  .modal-body { padding: 18px; }
  .print-card { padding: 18px 14px; }
}
