:root {
  --canvas: #fff7ef;
  --surface: #ffffff;
  --surface-2: #fff0e4;
  --ink: #3a302c;
  --ink-2: #7c6f69;
  --ink-3: #afa39d;
  --line: #f0e3d8;
  --accent: #e75f52;
  --accent-press: #d34c40;
  --on-accent: #ffffff;
  --accent-wash: rgba(231, 95, 82, 0.12);
  --brand-orange: #e08a3c;
  --pink: #ffd6de;
  --mint: #cfebdc;
  --sky: #d4e7f6;
  --butter: #ffe7a3;
  --gold: #d9a441;
  --cold: #78aedf;
  --warm: #f0956f;
  --success: #3f9d6c;
  --error: #c13515;
  --ink-wash: rgba(58, 48, 44, 0.06);
  --scrim: rgba(58, 48, 44, 0.45);

  --font: "Apple SD Gothic Neo", "Pretendard Variable", Pretendard, "Noto Sans KR", "Malgun Gothic", system-ui, -apple-system, sans-serif;
  --t-display: 28px;
  --t-h1: 24px;
  --t-h2: 20px;
  --t-lg: 18px;
  --t-body: 16px;
  --t-sm: 14px;
  --t-caption: 12px;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;

  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-full: 999px;

  --shadow-rest: 0 1px 2px rgba(58, 48, 44, 0.04);
  --shadow-lift: 0 1px 2px rgba(58, 48, 44, 0.04), 0 6px 18px rgba(58, 48, 44, 0.08);
  --shadow-float: 0 2px 6px rgba(58, 48, 44, 0.06), 0 16px 40px rgba(58, 48, 44, 0.14);

  --ease-standard: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-emphasis: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-micro: 150ms;
  --dur-standard: 260ms;
  --dur-emphasis: 500ms;

  --col-max: 430px;
  --control-h: 52px;
  --tap-min: 44px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
input {
  font: inherit;
  color: inherit;
}

.t-display {
  font-size: clamp(24px, 7vw, var(--t-display));
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.t-h1 {
  font-size: var(--t-h1);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.t-h2 {
  font-size: var(--t-h2);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.t-lg {
  font-size: var(--t-lg);
  font-weight: 600;
  line-height: 1.5;
}

.t-sm {
  font-size: var(--t-sm);
  line-height: 1.5;
}

.t-caption {
  font-size: var(--t-caption);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.ink-2 {
  color: var(--ink-2);
}

.ink-3 {
  color: var(--ink-3);
}

.center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.snowfall {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.snowfall i {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface);
  opacity: 0.9;
  animation: snow var(--snow-dur, 10s) linear infinite;
  animation-delay: var(--snow-delay, 0s);
  left: var(--snow-x, 50%);
  transform: translateY(-12px);
}

@keyframes snow {
  to {
    transform: translateY(110vh);
  }
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0 var(--s-4) calc(var(--s-8) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: var(--s-2) 0;
}

.topbar__brand {
  font-size: var(--t-sm);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.topbar__tickets {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  min-height: 36px;
  padding: 0 var(--s-3);
  border-radius: var(--r-full);
  background: var(--butter);
  color: var(--ink);
  font-size: var(--t-sm);
  font-weight: 700;
}

.topbar__tickets svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

.topbar__tickets[hidden] {
  display: none;
}

.topbar__right {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}

.topbar__tickets.is-bump {
  animation: badge-bump var(--dur-emphasis) var(--ease-emphasis);
}

@keyframes badge-bump {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.22);
    background: var(--gold);
  }
  100% {
    transform: scale(1);
  }
}

.sound-btn {
  width: 40px;
  height: 40px;
  min-height: 40px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-3);
  box-shadow: var(--shadow-rest);
}

.sound-btn.is-on {
  color: var(--accent);
  background: var(--accent-wash);
}

.sound-btn svg {
  width: 22px;
  height: 22px;
}

.ticket-fly {
  position: fixed;
  z-index: 25;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--butter);
  color: var(--gold);
  box-shadow: var(--shadow-float);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.ticket-fly svg {
  width: 26px;
  height: 26px;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  background: var(--canvas);
  transition: opacity 320ms ease-out;
}

.loader[hidden] {
  display: none;
}

.loader.is-out {
  opacity: 0;
  pointer-events: none;
}

.loader__art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--s-2);
  width: 140px;
  height: 140px;
}

.loader__art .char,
.loader__art .loader__baby {
  width: 140px;
  animation: loader-hop 900ms var(--ease-emphasis) infinite;
  transform-origin: 50% 100%;
}

.loader__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  animation: loader-hop 900ms var(--ease-emphasis) infinite;
}

.loader__dot:nth-child(2) {
  animation-delay: 120ms;
  background: var(--brand-orange);
}

.loader__dot:nth-child(3) {
  animation-delay: 240ms;
  background: var(--gold);
}

@keyframes loader-hop {
  0%,
  100% {
    transform: translateY(0) scale(1, 1);
  }
  30% {
    transform: translateY(-14px) scale(0.96, 1.06);
  }
  60% {
    transform: translateY(0) scale(1.04, 0.94);
  }
}

.loader__brand {
  font-size: var(--t-sm);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.loader__text {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-2);
}

.screen {
  display: flex;
  flex-direction: column;
}

.view {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  animation: screen-in var(--dur-standard) var(--ease-standard);
}

/* 화면 전환: 위에서부터 차례로 등장 */
.view > * {
  animation: screen-in var(--dur-emphasis) var(--ease-emphasis) both;
}

.view > *:nth-child(2) {
  animation-delay: 60ms;
}

.view > *:nth-child(3) {
  animation-delay: 120ms;
}

.view > *:nth-child(n + 4) {
  animation-delay: 180ms;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.stage {
  background: var(--surface-2);
  border-radius: var(--r-lg);
  padding: var(--s-2);
  box-shadow: var(--shadow-lift);
}

.stage__inner {
  position: relative;
  aspect-ratio: var(--stage-ratio, 1 / 0.92);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}

.stage--short .stage__inner {
  --stage-ratio: 1 / 0.72;
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stage__overlay {
  position: absolute;
  inset: 0;
}

.actor {
  position: absolute;
  transition: transform var(--dur-emphasis) var(--ease-emphasis), opacity var(--dur-standard);
}

.actor svg {
  display: block;
  width: 100%;
  height: auto;
}

.actor--baby {
  width: 46%;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
}

.actor--baby.is-left {
  left: 28%;
  width: 42%;
}

.actor--baby.is-small {
  left: 82%;
  bottom: 2%;
  width: 30%;
}

.actor--baby.is-bounce {
  animation: bounce 600ms var(--ease-emphasis);
}

@keyframes bounce {
  0% {
    transform: translateX(-50%) scale(1);
  }
  40% {
    transform: translateX(-50%) scale(1.08) translateY(-6%);
  }
  100% {
    transform: translateX(-50%) scale(1);
  }
}

.actor--prop {
  width: 24%;
}

.bubble {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 88%;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-full);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  font-size: var(--t-lg);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  animation: pop var(--dur-standard) var(--ease-standard);
  z-index: 2;
}

.bubble--em {
  color: var(--accent);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

.item {
  position: absolute;
  width: 22%;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity var(--dur-standard), transform var(--dur-micro) ease-out;
  z-index: 3;
}

.item svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(58, 48, 44, 0.12));
}

.item.is-dragging {
  z-index: 6;
  transition: none;
  cursor: grabbing;
}

.item.is-dragging svg {
  transform: scale(1.1);
}

.item.is-used {
  opacity: 0;
  pointer-events: none;
}

.item:focus-visible {
  outline: none;
}

.item:focus-visible svg {
  filter: drop-shadow(0 0 0 3px var(--accent));
}

.dropzone {
  position: absolute;
  border-radius: var(--r-md);
  transition: background var(--dur-micro);
}

.dropzone.is-over {
  background: var(--accent-wash);
}

.dropzone svg {
  display: block;
  width: 100%;
  height: auto;
}

.packed {
  position: absolute;
  display: flex;
  gap: 2%;
  justify-content: center;
  z-index: 2;
}

.packed svg {
  width: 100%;
  height: auto;
}

.packed > span {
  width: 20%;
  opacity: 0;
  transform: translateY(10px) scale(0.8);
}

.packed > span.is-in {
  opacity: 1;
  transform: none;
  transition: transform var(--dur-emphasis) var(--ease-emphasis), opacity var(--dur-standard);
}

.sheet {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}

.sheet__row {
  display: flex;
  gap: var(--s-3);
}

.sheet__row > .btn {
  flex: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--accent);
  font-size: var(--t-caption);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.benefit {
  display: flex;
  gap: var(--s-2);
  align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: var(--t-sm);
  line-height: 1.5;
}

.benefit b {
  flex: none;
  color: var(--ink);
  font-weight: 700;
}

.steps {
  display: flex;
  gap: var(--s-2);
}

.steps span {
  flex: 1;
  height: 6px;
  border-radius: var(--r-full);
  background: var(--line);
  transition: background var(--dur-standard);
}

.steps span.is-on {
  background: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--control-h);
  padding: 0 var(--s-6);
  border: 0;
  border-radius: var(--r-full);
  font-size: var(--t-body);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur-micro) ease-out, background var(--dur-micro) ease-out, opacity var(--dur-micro);
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-wash), 0 0 0 1.5px var(--accent);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.btn[aria-busy="true"] {
  opacity: 0.7;
  pointer-events: none;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:active {
  background: var(--accent-press);
}

.btn--secondary {
  background: var(--surface-2);
  color: var(--ink);
}

.btn--secondary:hover {
  background: var(--line);
}

.btn--ghost {
  min-height: var(--tap-min);
  background: transparent;
  color: var(--ink-2);
  font-weight: 600;
}

.btn--ghost:hover {
  background: var(--ink-wash);
}

.btn--icon {
  width: var(--tap-min);
  height: var(--tap-min);
  min-height: var(--tap-min);
  padding: 0;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: var(--t-h2);
}

.btn--block {
  width: 100%;
}

.btn svg {
  width: 20px;
  height: 20px;
}

.hero {
  padding-top: var(--s-2);
}

.hero__title {
  margin-top: var(--s-2);
}

.hero__sub {
  margin-top: var(--s-2);
}

.info {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.info li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--s-3);
  align-items: baseline;
  font-size: var(--t-sm);
  color: var(--ink-2);
}

.info li b {
  color: var(--ink);
  font-weight: 700;
}

.rules__brief {
  margin: 0;
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--ink-2);
}

.rules__brief b {
  color: var(--ink);
  font-weight: 700;
}

.rules__toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s-1);
  min-height: var(--tap-min);
  padding: 0 var(--s-4);
  border-radius: var(--r-full);
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.rules__toggle::-webkit-details-marker {
  display: none;
}

.rules__toggle:hover {
  background: var(--ink-wash);
}

.rules__toggle:active,
.check:active .check__box,
.stepper .btn--icon:active {
  transform: scale(0.96);
}

.rules__toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-wash), 0 0 0 1.5px var(--accent);
}

.rules__toggle svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-micro) ease-out;
}

.rules[open] .rules__toggle svg {
  transform: rotate(180deg);
}

.rules__less,
.rules[open] .rules__more {
  display: none;
}

.rules[open] .rules__less {
  display: inline;
}

.rules .info {
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}

.notice {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  background: var(--sky);
  color: var(--ink);
  font-size: var(--t-sm);
  font-weight: 600;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.field__label {
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--ink-2);
}

.input {
  width: 100%;
  min-height: var(--control-h);
  padding: 0 var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-weight: 500;
  transition: border-color var(--dur-micro), box-shadow var(--dur-micro);
}

.input::placeholder {
  color: var(--ink-3);
}

.input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.field.is-error .input {
  border-color: var(--error);
}

.field__error {
  display: none;
  color: var(--error);
  font-size: var(--t-sm);
  font-weight: 600;
}

.field.is-error .field__error {
  display: block;
}

.looks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
}

.look {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-3) var(--s-2);
  border: 0;
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: var(--t-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--dur-micro), transform var(--dur-micro);
}

.look svg {
  width: 64px;
  height: 64px;
}

.look:active {
  transform: scale(0.97);
}

.look:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-wash), 0 0 0 1.5px var(--accent);
}

.look[aria-checked="true"] {
  background: var(--accent-wash);
}

.look__check {
  position: absolute;
  top: var(--s-2);
  right: var(--s-2);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--dur-micro), transform var(--dur-micro);
}

.look__check svg {
  width: 14px;
  height: 14px;
}

.look[aria-checked="true"] .look__check {
  opacity: 1;
  transform: none;
}

.gauge-wrap {
  position: absolute;
  left: 50%;
  top: 19%;
  width: 64%;
  padding: var(--s-2) var(--s-3) 0;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.6);
  transform: translateX(-50%);
  z-index: 4;
}

.gauge {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(58, 48, 44, 0.12));
}

.gauge__needle {
  transform-box: view-box;
}

.meter {
  position: relative;
  height: 12px;
  border-radius: var(--r-full);
  background: var(--line);
  overflow: hidden;
}

.meter__fill {
  position: absolute;
  inset: 0;
  border-radius: var(--r-full);
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 120ms linear;
}

.meter--timer .meter__fill {
  background: var(--success);
}

.meter--timer.is-low .meter__fill {
  background: var(--warm);
}

.meter-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--ink-2);
}

.meter-row .meter {
  flex: 1;
}

.order {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}

.order__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  min-height: 92px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: var(--t-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--dur-micro), transform var(--dur-micro);
}

.order__btn svg {
  width: 44px;
  height: 52px;
}

.order__btn:active {
  transform: scale(0.96);
}

.order__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-wash), 0 0 0 1.5px var(--accent);
}

.order__btn.is-done {
  background: var(--mint);
}

.order__btn.is-wrong {
  animation: shake 300ms ease-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

.ticket {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  padding: 0 var(--s-4);
  border-radius: var(--r-sm);
  background: var(--butter);
  color: var(--ink);
  font-weight: 800;
  animation: ticket-in var(--dur-emphasis) var(--ease-emphasis);
}

.ticket svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
}

@keyframes ticket-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: confetti-fall 1.6s var(--ease-emphasis) both;
  pointer-events: none;
}

@keyframes confetti-fall {
  from {
    opacity: 0;
    transform: translateY(-20%);
  }
  30% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(30%);
  }
}

.bulb {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.tree-glow,
.tree-rays {
  opacity: 0;
}

.tree-star {
  transform-box: fill-box;
  transform-origin: center;
}

.ornament {
  transform-box: fill-box;
  transform-origin: 50% 0;
}

.ornament.is-new {
  animation: hang 900ms var(--ease-emphasis) both;
}

@keyframes hang {
  0% {
    opacity: 0;
    transform: translateY(-40px) scale(0.5);
  }
  55% {
    opacity: 1;
    transform: translateY(0) scale(1.08) rotate(8deg);
  }
  80% {
    transform: rotate(-6deg);
  }
  100% {
    transform: none;
  }
}

.is-lit .bulb {
  animation: bulb-on 420ms ease-out both, twinkle 1.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 70ms), calc(1.5s + var(--i) * 90ms);
}

@keyframes bulb-on {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.is-lit .tree-glow {
  animation: glow-in 1200ms ease-out 1.3s both;
}

.is-lit .tree-rays {
  animation: glow-in 500ms ease-out 1.7s both;
}

@keyframes glow-in {
  to {
    opacity: 1;
  }
}

.is-lit .tree-star {
  animation: star-pop 700ms var(--ease-emphasis) 1.6s both;
}

@keyframes star-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.7);
  }
  100% {
    transform: scale(1.25);
  }
}

.orn-row {
  display: flex;
  justify-content: center;
  gap: var(--s-4);
}

.orn-row span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
}

.orn-row span svg {
  width: 32px;
  height: 32px;
}

.orn-row span.is-off {
  opacity: 0.35;
}

.ticket .ticket__orn {
  width: 28px;
  height: 28px;
}

.card-preview {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
}

.boxes {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.box {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--s-3);
  align-items: center;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-rest);
  transition: background var(--dur-micro);
}

.box.is-selected {
  background: var(--accent-wash);
}

.box--locked {
  background: var(--surface-2);
}

.box {
  position: relative;
}

.box.is-just-open {
  animation: box-open 1100ms var(--ease-emphasis) var(--delay, 0ms) backwards;
}

@keyframes box-open {
  0% {
    background: var(--surface-2);
    transform: scale(0.98);
  }
  30% {
    background: var(--butter);
    transform: scale(1.03);
    box-shadow: var(--shadow-float);
  }
  100% {
    background: var(--surface);
    transform: scale(1);
  }
}

.box__open {
  position: absolute;
  top: -10px;
  right: var(--s-3);
  padding: 2px var(--s-2);
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--t-caption);
  font-weight: 800;
  box-shadow: var(--shadow-lift);
  animation: pop-chip var(--dur-emphasis) var(--ease-emphasis) calc(var(--delay, 0ms) + 250ms) both;
}

@keyframes pop-chip {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.box--locked .box__art,
.box--locked .box__name {
  opacity: 0.55;
}

.box__lock {
  width: var(--tap-min);
  height: var(--tap-min);
  display: grid;
  place-items: center;
  color: var(--ink-3);
}

.box__lock svg {
  width: 24px;
  height: 24px;
}

.btn--live {
  background: var(--ink);
  color: var(--surface);
}

.btn--live:hover {
  background: var(--accent-press);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 var(--s-2);
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--t-caption);
  font-weight: 800;
  letter-spacing: 0.08em;
  animation: live-pulse 1.4s ease-in-out infinite;
}

@keyframes live-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.75;
  }
}

.char {
  position: relative;
  display: block;
  width: 100%;
}

.char img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform var(--dur-standard) var(--ease-standard);
}

.char__hat {
  position: absolute;
  top: -6%;
  left: 50%;
  width: 54%;
  transform: translateX(-50%);
  pointer-events: none;
}

.char__hat svg {
  display: block;
  width: 100%;
  height: auto;
}

.char__mood {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 0;
  height: 0;
}

.char.is-cry .char__mood::before,
.char.is-cry .char__mood::after {
  content: "";
  position: absolute;
  top: 0;
  width: 10px;
  height: 16px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--cold);
}

.char.is-cry .char__mood::before {
  left: -46px;
}

.char.is-cry .char__mood::after {
  left: 36px;
}

.char.is-away img {
  transform: rotate(-12deg) translateX(-6%);
}

.char.is-sleep img {
  transform: rotate(6deg);
  filter: brightness(0.96);
}

.char.is-sleep .char__mood::after {
  content: "z z";
  position: absolute;
  left: 40px;
  top: -70px;
  font-size: var(--t-h2);
  font-weight: 800;
  color: var(--ink-2);
  white-space: nowrap;
}

.char.is-yum img {
  transform: scale(1.04);
}

.char--family {
  width: 100%;
}

.look .char {
  width: 72px;
}

.actor--family {
  width: 50%;
}

.product-photo {
  display: block;
  width: 100%;
  height: auto;
}

.box__art .product-photo,
.box__art svg {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.clear-preview {
  display: flex;
  justify-content: center;
}

.clear-preview svg {
  width: 120px;
  height: auto;
}

.stage__inner--game {
  --stage-ratio: 1 / 1.05;
}

.box__art svg {
  display: block;
  width: 56px;
  height: 56px;
}

.box__name {
  font-size: var(--t-body);
  font-weight: 800;
}

.box__meta {
  font-size: var(--t-caption);
  color: var(--ink-2);
}

.stepper {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.stepper output {
  min-width: 24px;
  text-align: center;
  font-weight: 800;
}

.summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: var(--t-sm);
  font-weight: 700;
}

.summary b {
  font-size: var(--t-h2);
  font-weight: 800;
}

.share-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  min-height: var(--tap-min);
  cursor: pointer;
}

.check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.check__box {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--on-accent);
  transition: background var(--dur-micro), border-color var(--dur-micro);
}

.check__box svg {
  width: 16px;
  height: 16px;
  opacity: 0;
}

.check input:checked + .check__box {
  background: var(--accent);
  border-color: var(--accent);
}

.check input:checked + .check__box svg {
  opacity: 1;
}

.check input:focus-visible + .check__box {
  box-shadow: 0 0 0 3px var(--accent-wash), 0 0 0 1.5px var(--accent);
}

.check__text {
  font-size: var(--t-sm);
  font-weight: 600;
}

.consent {
  padding: var(--s-3);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: var(--t-caption);
  font-weight: 500;
  line-height: 1.5;
}

.consent b {
  color: var(--ink);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--scrim);
  animation: fade var(--dur-standard) ease-out;
}

.modal[hidden] {
  display: none;
}

.modal__panel {
  width: 100%;
  max-width: var(--col-max);
  max-height: 92dvh;
  overflow: auto;
  padding: var(--s-5) var(--s-5) calc(var(--s-5) + env(safe-area-inset-bottom));
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  animation: sheet-in var(--dur-standard) var(--ease-standard);
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes sheet-in {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--s-6) + env(safe-area-inset-bottom));
  z-index: 30;
  max-width: calc(100% - var(--s-8));
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-full);
  background: var(--ink);
  color: var(--surface);
  font-size: var(--t-sm);
  font-weight: 600;
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity var(--dur-standard), transform var(--dur-standard) var(--ease-standard);
  pointer-events: none;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.clock-hands {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.is-ticking .clock-hands {
  animation: clock 1.6s var(--ease-standard) forwards;
}

@keyframes clock {
  to {
    transform: rotate(300deg);
  }
}

.steam {
  animation: steam 2s ease-in-out infinite;
}

@keyframes steam {
  0%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.pour {
  position: absolute;
  width: 3%;
  height: 16%;
  border-radius: var(--r-full);
  background: var(--cold);
  transform-origin: top center;
  animation: pour 700ms ease-out both;
  z-index: 4;
}

@keyframes pour {
  from {
    transform: scaleY(0);
  }
  60% {
    transform: scaleY(1);
  }
  to {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* 수유 장면: 아기·말풍선은 유지하고 소품 층만 교체 */
.fd-props {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 150ms ease-out;
}

.fd-props > * {
  pointer-events: auto;
}

.fd-props.is-leaving {
  opacity: 0;
}

.fd-props > .actor--prop,
.fd-props > .dropzone,
.fd-props > .item,
.fd-props > .gauge-wrap,
.fd-props > .lineup {
  animation: prop-in var(--dur-emphasis) var(--ease-emphasis) backwards;
}

.fd-props > .item.is-used,
.fd-props > .item.is-dragging {
  animation: none;
}

@keyframes prop-in {
  from {
    opacity: 0;
    translate: 0 12px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.dropzone.is-hit {
  animation: hit var(--dur-emphasis) var(--ease-emphasis);
}

@keyframes hit {
  0% {
    scale: 1;
  }
  40% {
    scale: 1.12;
  }
  100% {
    scale: 1;
  }
}

.actor--feed {
  transform: rotate(-35deg);
  animation: feed-tilt 1.2s ease-in-out infinite alternate;
}

@keyframes feed-tilt {
  from {
    transform: rotate(-35deg) translateY(0);
  }
  to {
    transform: rotate(-30deg) translateY(-3%);
  }
}

.puffs {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.puffs i {
  position: absolute;
  left: -8px;
  top: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  opacity: 0;
  animation: puff 2.2s ease-out infinite;
}

.puffs i:nth-child(2) {
  animation-delay: 0.7s;
  left: 2px;
}

.puffs i:nth-child(3) {
  animation-delay: 1.4s;
  left: -16px;
}

@keyframes puff {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  20% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: translateY(-48px) scale(1.8);
  }
}

.bubbles {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.bubbles i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  opacity: 0;
  animation: bubble-up 1s ease-out both;
}

.bubbles i:nth-child(2) {
  left: 12px;
  animation-delay: 0.15s;
}

.bubbles i:nth-child(3) {
  left: -12px;
  animation-delay: 0.3s;
}

.bubbles i:nth-child(4) {
  left: 4px;
  animation-delay: 0.45s;
}

@keyframes bubble-up {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.6);
  }
  30% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateY(-36px) scale(1.2);
  }
}

.hearts {
  position: absolute;
  left: 50%;
  top: 36%;
  width: 0;
  height: 0;
  pointer-events: none;
}

.hearts i {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--accent);
  transform: rotate(45deg);
  opacity: 0;
  animation: heart-up 1.4s var(--ease-emphasis) both;
}

.hearts i::before,
.hearts i::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: inherit;
}

.hearts i::before {
  left: -7px;
}

.hearts i::after {
  top: -7px;
}

.hearts i:nth-child(2) {
  left: -34px;
  animation-delay: 0.25s;
}

.hearts i:nth-child(3) {
  left: 28px;
  animation-delay: 0.5s;
}

@keyframes heart-up {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(45deg) scale(0.4);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-70px) rotate(45deg) scale(1);
  }
}

.is-shiver svg {
  animation: shiver 0.5s ease-in-out infinite;
}

@keyframes shiver {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg);
  }
}

.lineup {
  position: absolute;
  right: 4%;
  top: 22%;
  display: flex;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-lift);
  z-index: 1;
}

.lineup__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  width: 58px;
  font-size: var(--t-caption);
  font-weight: 800;
  color: var(--ink);
  text-align: center;
}

.lineup__item svg {
  width: 46px;
  height: 56px;
  animation: lineup-float 2.6s ease-in-out infinite;
}

.lineup__item:nth-child(2) svg {
  animation-delay: 0.6s;
}

@keyframes lineup-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.closeup {
  position: absolute;
  left: 50%;
  bottom: 8%;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 84%;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-float);
  transform: translateX(-50%);
  animation: closeup-in var(--dur-emphasis) var(--ease-emphasis) both;
  z-index: 5;
}

.closeup.is-out {
  animation: closeup-out 220ms ease-in both;
}

.closeup svg {
  flex: none;
  width: 64px;
  height: 76px;
  filter: drop-shadow(0 4px 8px rgba(58, 48, 44, 0.12));
}

.closeup div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.closeup b {
  font-size: var(--t-lg);
  font-weight: 800;
}

.closeup span {
  font-size: var(--t-sm);
  color: var(--ink-2);
}

@keyframes closeup-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes closeup-out {
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(10px) scale(0.96);
  }
}

.gauge-wrap.is-ok {
  animation: gauge-ok var(--dur-emphasis) var(--ease-emphasis);
}

.gauge-wrap.is-miss {
  animation: shake 300ms ease-out;
}

@keyframes gauge-ok {
  0% {
    box-shadow: 0 0 0 0 rgba(63, 157, 108, 0);
  }
  40% {
    box-shadow: 0 0 0 8px rgba(63, 157, 108, 0.35);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(63, 157, 108, 0);
  }
}

@media (min-width: 640px) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 10%, var(--pink) 0, transparent 40%), radial-gradient(circle at 80% 90%, var(--sky) 0, transparent 40%);
    opacity: 0.6;
    z-index: -1;
  }

  .shell {
    min-height: calc(100dvh - var(--s-12));
    margin: var(--s-6) auto;
    padding: var(--s-2) var(--s-5) var(--s-8);
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: var(--shadow-lift);
  }

  .modal {
    align-items: center;
    padding: var(--s-6);
  }

  .modal__panel {
    border-radius: var(--r-lg);
    padding-bottom: var(--s-5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .snowfall i,
  .steam,
  .confetti,
  .puffs i,
  .bubbles i,
  .hearts i,
  .is-shiver svg,
  .lineup__item svg,
  .actor--feed {
    animation: none;
  }

  .view,
  .view > *,
  .bubble,
  .ticket,
  .modal__panel,
  .actor--baby.is-bounce,
  .box.is-just-open,
  .box__open {
    animation: fade var(--dur-standard) ease-out;
  }

  .loader__dot,
  .loader__art .char,
  .loader__art .loader__baby,
  .topbar__tickets.is-bump {
    animation: none;
  }

  .actor,
  .item,
  .btn,
  .look,
  .order__btn {
    transition: none;
  }

  .ornament.is-new {
    animation: fade var(--dur-standard) ease-out;
  }

  .is-lit .bulb,
  .is-lit .tree-glow,
  .is-lit .tree-rays,
  .is-lit .tree-star {
    animation: fade var(--dur-emphasis) ease-out both;
    opacity: 1;
  }

  .live-badge {
    animation: none;
  }
}
