/* 우리 반 크리스마스 사진관
   팔레트: 솔밤(pine) · 열매(berry) · 눈종이(cream) · 전구(gold) · 서리(mint) · 코코아(cocoa) */
:root {
  --pine: #0e2b25;
  --pine-deep: #0a211d;
  --pine-2: #15392f;
  --pine-3: #1f4b3e;
  --berry: #c4352b;
  --berry-deep: #8f211c;
  --cream: #fbf4e4;
  --paper: #fffbf1;
  --gold: #f3c567;
  --mint: #bfe0d2;
  --cocoa: #2e211b;
  --cocoa-2: #6b584c;
  --line: rgba(46, 33, 27, 0.14);
  --display: "Paperlogy", "Pretendard Variable", Pretendard, sans-serif;
  --body: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --hand: "Gaegu", "Pretendard Variable", Pretendard, sans-serif;
  --ease: cubic-bezier(0.2, 0.9, 0.3, 1.25);
}

/* 제목 글꼴: 페이퍼로지 ExtraBold (OFL). 굵기를 어떻게 불러도 이 한 벌을 쓴다 */
@font-face { font-family: "Paperlogy"; src: url("../fonts/Paperlogy-8ExtraBold.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--cream);
  background: var(--pine);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img, canvas, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ghost { position: absolute; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ───────── 버튼 ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 46px; padding: 0.6em 1.25em;
  border-radius: 999px; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; user-select: none; white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease, filter 0.15s ease;
}
.btn--primary { background: var(--berry); color: var(--paper); box-shadow: 0 5px 0 var(--berry-deep), 0 14px 24px -10px rgba(0, 0, 0, 0.55); }
.btn--primary:hover { filter: brightness(1.07); }
.btn--primary:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--berry-deep); }
.btn--ghost { color: var(--cream); box-shadow: inset 0 0 0 2px rgba(251, 244, 228, 0.55); background: rgba(14, 43, 37, 0.35); backdrop-filter: blur(4px); }
.btn--ghost:hover { background: rgba(251, 244, 228, 0.14); box-shadow: inset 0 0 0 2px var(--cream); }
.btn--line { color: var(--cocoa); box-shadow: inset 0 0 0 2px var(--line); background: transparent; }
.btn--line:hover { box-shadow: inset 0 0 0 2px var(--cocoa-2); }
.btn--xl { min-height: 60px; padding: 0.7em 1.7em; font-size: 1.15rem; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

.iconbtn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--cocoa-2); background: rgba(46, 33, 27, 0.07); transition: background-color 0.15s; flex: none; }
.iconbtn:hover { background: rgba(46, 33, 27, 0.15); }
.iconbtn--dark { color: var(--cream); background: rgba(251, 244, 228, 0.13); }
.iconbtn--dark:hover { background: rgba(251, 244, 228, 0.26); }

.chip {
  display: inline-flex; align-items: center; gap: 0.4em; min-height: 38px; padding: 0 0.95em;
  border-radius: 999px; font-size: 0.875rem; font-weight: 600; color: var(--mint);
  box-shadow: inset 0 0 0 1.5px rgba(191, 224, 210, 0.3);
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.chip:hover { background: rgba(191, 224, 210, 0.12); color: var(--cream); }
.chip--solid { background: var(--cream); color: var(--pine); box-shadow: none; }
.chip--solid:hover { background: #fff; color: var(--pine); }
.chip--danger { color: #f0a59c; box-shadow: inset 0 0 0 1.5px rgba(240, 165, 156, 0.35); }
.chip--danger:hover { background: rgba(196, 53, 43, 0.25); color: #ffd9d3; }
.chip:disabled { opacity: 0.35; pointer-events: none; }

/* ───────── 히어로 ───────── */
.hero {
  position: relative; isolation: isolate; min-height: min(100svh, 980px);
  display: grid; align-items: center;
  padding: clamp(24px, 5vw, 72px) clamp(20px, 6vw, 96px);
  background:
    radial-gradient(60vmax 46vmax at 72% 38%, rgba(243, 197, 103, 0.13), transparent 62%),
    radial-gradient(90vmax 60vmax at 20% 0%, #12343c 0%, transparent 65%),
    linear-gradient(#081c1f 0%, #0b2420 55%, var(--pine) 100%);
  overflow: hidden;
}
.hero__tree { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; touch-action: pan-y; cursor: grab; }
.hero__tree.is-drag { cursor: grabbing; }
.hero__tree.is-point { cursor: pointer; }
.hero__copy { max-width: 34rem; pointer-events: none; }
.hero__copy > * { pointer-events: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.7em; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em; color: var(--gold); }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow--ink { color: var(--berry); }
.title { margin-top: 0.7rem; font-family: var(--display); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; }
.title__sm { display: block; font-size: clamp(1.5rem, 3vw, 2.4rem); color: var(--mint); letter-spacing: -0.02em; }
.title__lg { display: block; margin-top: 0.12em; font-size: clamp(3.1rem, 8.4vw, 6.7rem); color: var(--cream); text-shadow: 0 0.04em 0 rgba(0, 0, 0, 0.25); }
.lead { margin-top: 1.4rem; max-width: 29rem; font-size: clamp(1rem, 1.25vw, 1.13rem); color: rgba(251, 244, 228, 0.82); }
.lead strong { color: var(--cream); font-weight: 700; box-shadow: inset 0 -0.42em 0 rgba(196, 53, 43, 0.55); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }
.tally { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.4em 1.2em; font-size: 0.92rem; color: rgba(191, 224, 210, 0.85); }
.tally b { color: var(--gold); font-weight: 700; }
.hero__hint { margin-top: 0.5rem; font-size: 0.8rem; color: rgba(191, 224, 210, 0.62); }

/* 첫 화면 등장 */
.hero__copy > * { opacity: 0; transform: translateY(18px); animation: rise 0.8s var(--ease) forwards; }
.hero__copy > :nth-child(1) { animation-delay: 0.15s; }
.hero__copy > :nth-child(2) { animation-delay: 0.28s; }
.hero__copy > :nth-child(3) { animation-delay: 0.46s; }
.hero__copy > :nth-child(4) { animation-delay: 0.6s; }
.hero__copy > :nth-child(5) { animation-delay: 0.74s; }
.hero__copy > :nth-child(6) { animation-delay: 0.84s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .hero { display: block; padding: 0 20px 44px; min-height: 0; }
  .hero__tree { position: relative; inset: auto; height: 50svh; min-height: 330px; width: calc(100% + 40px); max-width: none; margin: 0 -20px; z-index: 0; }
  .hero__tree { -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
  .hero__copy { margin-top: 6px; max-width: none; position: relative; }
  .btn--xl { padding: 0.7em 1em; font-size: 1.08rem; }
  .hero__cta .btn { flex: 1 1 150px; }
}

/* ───────── 전시 벽 ───────── */
.wall { position: relative; padding: 70px clamp(16px, 4vw, 56px) 60px; max-width: 1500px; margin: 0 auto; }
.garland { position: absolute; left: 0; right: 0; top: 0; height: 64px; pointer-events: none; }
.garland svg { display: block; width: 100%; height: 100%; overflow: visible; }
.garland path { fill: none; stroke: rgba(191, 224, 210, 0.35); stroke-width: 1.5; }
.garland .bulb { animation: twinkle 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.38; } }

.wall__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; margin-bottom: 30px; }
.wall__title { font-family: var(--display); letter-spacing: -0.03em; font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--cream); line-height: 1.2; }
.wall__count { font-family: var(--body); font-size: 0.95rem; font-weight: 700; color: var(--pine); background: var(--gold); border-radius: 999px; padding: 0.2em 0.75em; margin-left: 0.5em; vertical-align: 0.3em; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }

.grid { columns: 4 250px; column-gap: 26px; }
.card {
  --tilt: 0deg;
  position: relative; break-inside: avoid; margin: 0 0 16px; padding: 12px 12px 12px;
  background: var(--paper); color: var(--cocoa); border-radius: 5px;
  /* 집게가 카드 상자 안에 들어오도록 투명한 위쪽 테두리를 둔다 (단 나눔에서 잘리지 않게) */
  border-top: 16px solid transparent; background-clip: padding-box;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.28)) drop-shadow(0 14px 16px rgba(0, 0, 0, 0.38));
  transform: rotate(var(--tilt)); transform-origin: 50% 4px;
  transition: transform 0.35s var(--ease), filter 0.3s ease;
}
.card:nth-child(4n + 1) { --tilt: -1.3deg; }
.card:nth-child(4n + 2) { --tilt: 0.9deg; }
.card:nth-child(4n + 3) { --tilt: -0.5deg; }
.card:nth-child(4n + 4) { --tilt: 1.5deg; }
.card:hover, .card:focus-within { transform: rotate(0deg) translateY(-5px); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.28)) drop-shadow(0 24px 22px rgba(0, 0, 0, 0.5)); }
/* 집게 */
.card::before {
  content: ""; position: absolute; left: 50%; top: -15px; width: 15px; height: 32px; translate: -50% 0; border-radius: 3px;
  background: linear-gradient(90deg, #b98a57, #dcb382 45%, #a87a48); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35), inset 0 -12px 0 -9px rgba(0, 0, 0, 0.25);
}
.card.is-new { animation: hang 0.9s var(--ease) both; }
.card.is-new::after { content: "NEW"; position: absolute; right: -8px; top: -10px; padding: 3px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; background: var(--gold); color: var(--pine); rotate: 8deg; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3); }
@keyframes hang { 0% { opacity: 0; transform: rotate(-14deg) translateY(-30px) scale(0.9); } 55% { opacity: 1; transform: rotate(5deg); } 78% { transform: rotate(-2.5deg); } 100% { transform: rotate(var(--tilt)); } }

.card__photo { display: block; width: 100%; padding: 0; border-radius: 2px; overflow: hidden; background: #e9e0cd; cursor: zoom-in; }
.card__photo img { width: 100%; height: auto; }
.card--strip { display: grid; grid-template-columns: 46% 1fr; gap: 12px; }
.card--strip .card__body { display: flex; flex-direction: column; padding-top: 2px; min-width: 0; }
.card--strip .card__actions { margin-top: auto; padding-top: 8px; display: grid; grid-template-columns: 1fr 1fr; justify-items: start; }
.card--strip .act--end { margin-left: 0; }
.card__body { padding: 10px 2px 0; }
.card__msg { font-family: var(--hand); font-weight: 700; font-size: 1.32rem; line-height: 1.3; color: var(--cocoa); }
.card__meta { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 0.8rem; color: var(--cocoa-2); }
.card__meta b { font-weight: 700; color: var(--cocoa); font-size: 0.88rem; }
.card__actions { display: flex; align-items: center; gap: 2px; margin-top: 8px; padding-top: 8px; border-top: 1.5px dashed var(--line); }
.act { display: inline-flex; align-items: center; gap: 4px; min-width: 36px; min-height: 36px; padding: 0 8px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; color: var(--cocoa-2); transition: background-color 0.15s, color 0.15s, transform 0.15s; }
.act:hover { background: rgba(46, 33, 27, 0.08); color: var(--cocoa); }
.act:active { transform: scale(0.9); }
.act[aria-pressed="true"] { color: var(--berry); }
.act[aria-pressed="true"] .ico { fill: currentColor; animation: pop 0.4s var(--ease); }
.act--end { margin-left: auto; }
.act--del:hover { color: var(--berry); background: rgba(196, 53, 43, 0.1); }
@keyframes pop { 0% { scale: 0.5; } 60% { scale: 1.35; } 100% { scale: 1; } }

/* 크리스마스 씰: 우표처럼 톱니 난 가장자리 */
.seal {
  --r: 3px; --c: var(--berry);
  display: inline-block; padding: 5px 11px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.01em; white-space: nowrap;
  color: #fff; background: var(--c);
  -webkit-mask: linear-gradient(#000 0 0) center / calc(100% - 2 * var(--r)) calc(100% - 2 * var(--r)) no-repeat,
    radial-gradient(circle at center, #0000 calc(var(--r) * 0.62), #000 calc(var(--r) * 0.62 + 0.5px)) calc(var(--r) * -1) calc(var(--r) * -1) / calc(var(--r) * 2) calc(var(--r) * 2);
  mask: linear-gradient(#000 0 0) center / calc(100% - 2 * var(--r)) calc(100% - 2 * var(--r)) no-repeat,
    radial-gradient(circle at center, #0000 calc(var(--r) * 0.62), #000 calc(var(--r) * 0.62 + 0.5px)) calc(var(--r) * -1) calc(var(--r) * -1) / calc(var(--r) * 2) calc(var(--r) * 2);
}
.seal[data-seal="0"] { --c: #c4352b; }
.seal[data-seal="1"] { --c: #1f6b56; }
.seal[data-seal="2"] { --c: #24467e; }
.seal[data-seal="3"] { --c: #a9731a; }
.seal[data-seal="4"] { --c: #b5466f; }
.seal[data-seal="5"] { --c: #5a4a8a; }

.empty { max-width: 30rem; margin: 30px auto 0; padding: 44px 28px; text-align: center; border-radius: 22px; border: 2px dashed rgba(191, 224, 210, 0.3); }
.empty__title { font-family: var(--display); letter-spacing: -0.03em; font-size: 1.5rem; color: var(--cream); }
.empty__body { margin-top: 8px; color: rgba(191, 224, 210, 0.85); }
.empty__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
.empty .btn--line { color: var(--cream); box-shadow: inset 0 0 0 2px rgba(251, 244, 228, 0.35); }

.foot { max-width: 46rem; margin: 0 auto; padding: 10px 24px 70px; text-align: center; font-size: 0.92rem; color: rgba(191, 224, 210, 0.75); }
.foot__small { margin-top: 12px; font-size: 0.8rem; color: rgba(191, 224, 210, 0.5); }

/* ───────── 대화상자 공통 ───────── */
.dlg {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 22px; overflow: hidden;
  background: var(--paper); color: var(--cocoa); box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.8);
}
.dlg[open] { display: flex; flex-direction: column; animation: dlg-in 0.38s var(--ease); }
.dlg::backdrop { background: rgba(5, 18, 16, 0.78); backdrop-filter: blur(4px); animation: fade 0.3s ease; }
/* 차양 줄무늬 */
.dlg::before { content: ""; flex: none; height: 10px; background: repeating-linear-gradient(-45deg, var(--berry) 0 14px, var(--cream) 14px 28px); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(26px) scale(0.96); } }
@keyframes fade { from { opacity: 0; } }
.dlg--sm { width: min(400px, calc(100vw - 24px)); }
.dlg__in { padding: 22px 24px 24px; overflow-y: auto; }
.dlg__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dlg h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; font-size: 1.45rem; line-height: 1.25; color: var(--cocoa); }
.dlg__sub { margin-top: 6px; font-size: 0.9rem; color: var(--cocoa-2); }
.dlg__row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 0.9rem; font-weight: 700; color: var(--cocoa); margin-bottom: 8px; }
.label__sub { font-weight: 500; font-size: 0.8rem; color: var(--cocoa-2); text-align: right; }
.hint { margin-top: 7px; font-size: 0.8rem; line-height: 1.45; color: var(--cocoa-2); }
.error { margin-top: 10px; padding: 10px 14px; border-radius: 12px; font-size: 0.88rem; font-weight: 600; color: var(--berry-deep); background: #fbe3df; }
.input { width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: 12px; background: #f1e8d5; color: var(--cocoa); outline: none; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 0.15s; }
.input::placeholder { color: #a39683; }
.input:focus { box-shadow: inset 0 0 0 2px var(--berry); }

.seg { display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: #f1e8d5; }
.seg--wrap { flex-wrap: wrap; }
.seg button { flex: 1 1 auto; min-height: 38px; padding: 0 12px; border-radius: 10px; font-size: 0.88rem; font-weight: 700; color: var(--cocoa-2); white-space: nowrap; transition: background-color 0.15s, color 0.15s; }
.seg button:hover { color: var(--cocoa); }
.seg button[aria-pressed="true"] { background: var(--pine-2); color: var(--cream); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }
.seg button:disabled { opacity: 0.4; pointer-events: none; }

.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.quick button { min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; color: var(--cocoa-2); background: #f1e8d5; transition: background-color 0.15s, color 0.15s; }
.quick button:hover { background: #e8dcc2; color: var(--cocoa); }
.quick button[aria-pressed="true"] { background: var(--cocoa); color: var(--paper); }
.think { margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: #f1e8d5; font-size: 0.85rem; color: var(--cocoa-2); }
.think summary { cursor: pointer; font-weight: 700; color: var(--cocoa); }
.think ul { margin-top: 8px; display: grid; gap: 4px; padding-left: 1.1em; list-style: disc; }

/* ───────── 촬영 부스 ───────── */
.dlg--booth { width: min(1160px, calc(100vw - 24px)); height: min(820px, calc(100dvh - 24px)); }
.booth { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.booth__bar { display: flex; align-items: center; gap: 18px; padding: 14px 18px 12px 24px; border-bottom: 1.5px solid var(--line); }
.booth__bar h2 { font-size: 1.35rem; }
.steps { display: flex; gap: 6px; margin-left: auto; counter-reset: s; font-size: 0.82rem; font-weight: 700; color: #a39683; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e8dcc2; color: var(--cocoa-2); font-size: 0.75rem; }
.steps li.is-on { background: var(--pine-2); color: var(--cream); }
.steps li.is-on::before { background: var(--gold); color: var(--pine); }
.steps li.is-done { color: var(--cocoa-2); }
.steps li.is-done::before { content: "✓"; background: var(--pine-3); color: var(--cream); }
.booth__body { display: grid; grid-template-columns: minmax(0, 1fr) 372px; min-height: 0; flex: 1; }
.stage { display: flex; flex-direction: column; gap: 12px; padding: 18px; min-height: 0; background: #1b1512; }
.finder { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; border-radius: 14px; overflow: hidden; background: #0d0a08; }
.finder canvas, .finder img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.finder canvas { width: 100%; height: 100%; }
.finder img { position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); max-width: none; max-height: none; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.75)); animation: print 0.8s var(--ease) both; }
.finder.is-result { padding: 18px; background: radial-gradient(circle at 50% 30%, #3a2c24, #17110e 75%); }
@keyframes print { from { opacity: 0; transform: translateY(-40px) rotate(-3deg) scale(0.94); } }
.finder__count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: clamp(7rem, 22vw, 15rem); color: #fff; text-shadow: 0 8px 0 rgba(0, 0, 0, 0.25), 0 0 60px rgba(0, 0, 0, 0.5); pointer-events: none; }
.finder__count.tick { animation: tick 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes tick { 0% { transform: scale(1.7); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(0.9); opacity: 0.85; } }
.finder__flash { position: absolute; inset: 0; background: #fff; animation: flash 0.35s ease-out both; pointer-events: none; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.finder__pill { position: absolute; left: 14px; top: 14px; padding: 5px 13px; border-radius: 999px; font-size: 0.8rem; font-weight: 800; color: #fff; background: var(--berry); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
.finder__pill::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #fff; animation: twinkle 1s infinite; }
.finder__flip { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; color: #fff; background: rgba(13, 10, 8, 0.6); backdrop-filter: blur(6px); }
.finder__flip:hover { background: rgba(13, 10, 8, 0.82); }
.finder__msg { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; padding: 28px; text-align: center; color: var(--cream); background: rgba(13, 10, 8, 0.86); font-size: 0.95rem; }
.finder__msg b { font-family: var(--display); font-weight: 400; font-size: 1.35rem; }
.slots { display: flex; gap: 8px; justify-content: center; flex: none; }
.slot { position: relative; width: 84px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #2e2520; display: grid; place-items: center; color: #7a6a5e; font-weight: 800; font-size: 0.9rem; }
.slot canvas { width: 100%; height: 100%; object-fit: cover; }
.slot.is-next { box-shadow: 0 0 0 2px var(--gold); color: var(--gold); }

.panel { display: flex; flex-direction: column; min-height: 0; border-left: 1.5px solid var(--line); }
.pane { display: flex; flex-direction: column; gap: 18px; padding: 18px 20px 20px; overflow-y: auto; flex: 1; min-height: 0; }
.field { min-width: 0; }
.pane__actions { display: grid; gap: 10px; margin-top: auto; padding-top: 6px; position: sticky; bottom: -20px; background: linear-gradient(transparent, var(--paper) 22%); padding-bottom: 2px; }
.bglist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.bglist button { position: relative; aspect-ratio: 4 / 3; border-radius: 9px; overflow: hidden; background: #e8dcc2; font-size: 0.75rem; font-weight: 700; color: var(--cocoa-2); box-shadow: 0 0 0 0 var(--berry); transition: box-shadow 0.15s, transform 0.15s; }
.bglist button img { width: 100%; height: 100%; object-fit: cover; }
.bglist button:hover { transform: scale(1.04); }
.bglist button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--berry); z-index: 1; }
.sliders { display: grid; gap: 8px; margin-top: 10px; font-size: 0.82rem; font-weight: 600; color: var(--cocoa-2); }
.sliders label { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.sliders input { grid-column: 1 / -1; width: 100%; accent-color: var(--berry); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 42px; height: 42px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(46, 33, 27, 0.18); transition: transform 0.15s, box-shadow 0.15s; background-size: cover; }
.swatches button:hover { transform: scale(1.08); }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--cocoa); }

@media (max-width: 880px) {
  .dlg--booth { height: calc(100dvh - 16px); width: calc(100vw - 16px); }
  .booth__body { display: block; overflow-y: auto; }
  .stage { padding: 12px; min-height: auto; }
  .finder { flex: none; aspect-ratio: 4 / 3; }
  .finder.is-result { aspect-ratio: auto; height: 46dvh; }
  .panel { border-left: 0; min-height: auto; }
  .pane { overflow: visible; }
  .slot { width: 62px; }
  .bglist { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .steps li { padding-right: 8px; }
  .steps li:not(.is-on) { font-size: 0; gap: 0; padding: 5px; }
  .booth__bar { padding-left: 16px; gap: 10px; }
}

/* ───────── 슬라이드쇼 ───────── */
.dlg--slides { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; background: radial-gradient(circle at 50% 35%, #173e37, #081a17 75%); color: var(--cream); }
.dlg--slides::before { display: none; }
.slides { position: relative; flex: 1; display: grid; grid-template-rows: 1fr auto auto; min-height: 0; overflow: hidden; }
.slides__fig { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 18px; padding: clamp(18px, 4vh, 44px) 24px 8px; }
.slides__fig img { min-height: 0; max-height: 100%; max-width: min(100%, 1100px); width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9); }
.slides__fig.swap img, .slides__fig.swap figcaption { animation: slide-in 0.7s var(--ease) both; }
@keyframes slide-in { from { opacity: 0; transform: translateY(24px) rotate(-1.5deg) scale(0.97); } }
.slides figcaption { text-align: center; }
.slides__msg { font-family: var(--hand); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.7rem); line-height: 1.2; color: var(--cream); }
.slides__by { margin-top: 6px; font-size: 1rem; color: var(--gold); font-weight: 700; }
.slides__bar { height: 4px; background: rgba(251, 244, 228, 0.12); }
.slides__bar span { display: block; height: 100%; width: 0; background: var(--gold); }
.slides__bar span.run { animation: bar linear forwards; }
@keyframes bar { to { width: 100%; } }
.slides__ctl { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px 16px; }
.slides__pos { min-width: 5em; text-align: center; font-size: 0.9rem; font-weight: 700; color: var(--mint); font-variant-numeric: tabular-nums; }
.slides__snow { position: absolute; inset: -40% 0 0; pointer-events: none; opacity: 0.6;
  background-image: radial-gradient(2.5px 2.5px at 20px 30px, #fff 50%, transparent 51%), radial-gradient(2px 2px at 130px 90px, #fff 50%, transparent 51%), radial-gradient(3px 3px at 70px 170px, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 180px 210px, #fff 50%, transparent 51%);
  background-size: 240px 260px; animation: snowfall 14s linear infinite; }
@keyframes snowfall { to { transform: translate3d(-60px, 260px, 0); } }

/* ───────── 댓글 · 배경 관리 · 소개 ───────── */
.cmts { display: grid; gap: 8px; max-height: 38dvh; overflow-y: auto; margin-bottom: 16px; }
.cmts li { padding: 10px 14px; border-radius: 14px; background: #f1e8d5; font-size: 0.93rem; }
.cmts li b { display: block; font-size: 0.78rem; color: var(--berry); margin-bottom: 1px; }
.cmts .none { background: none; text-align: center; color: var(--cocoa-2); padding: 20px 0; }
.cmtform { display: grid; gap: 8px; }
.cmtform__row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.bgform { display: grid; gap: 10px; margin-bottom: 22px; }
.bgform .label { margin-bottom: -2px; }
.bgmgr { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.bgmgr li { position: relative; border-radius: 12px; overflow: hidden; background: #f1e8d5; }
.bgmgr img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bgmgr p { padding: 6px 10px 8px; font-size: 0.8rem; font-weight: 700; }
.bgmgr button { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; background: rgba(255, 251, 241, 0.92); color: var(--berry); }
.bgmgr .none { grid-column: 1 / -1; background: none; padding: 14px 0; text-align: center; font-size: 0.88rem; color: var(--cocoa-2); }
.prose { display: grid; gap: 12px; font-size: 0.95rem; color: #4a3a31; }
.prose h3 { margin-top: 8px; font-size: 1rem; color: var(--cocoa); }
.prose ul { display: grid; gap: 5px; padding-left: 1.15em; list-style: disc; }
.prose strong { color: var(--cocoa); }

/* ───────── 토스트 ───────── */
.toast { position: fixed; inset: auto auto 26px 50%; margin: 0; border: 0; z-index: 2147483647; translate: -50% 0; max-width: calc(100vw - 32px); padding: 13px 20px; border-radius: 16px; background: var(--cream); color: var(--cocoa); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7); font-size: 0.93rem; animation: toast-in 0.45s var(--ease); }
.toast b { display: block; font-weight: 800; }
@keyframes toast-in { from { opacity: 0; transform: translateY(24px) scale(0.94); } }

/* 손가락으로 누르는 기기(태블릿·휴대폰)는 누르는 곳을 넉넉하게 */
@media (pointer: coarse) {
  .seg button { min-height: 46px; }
  .quick button { min-height: 42px; padding: 0 14px; font-size: 0.88rem; }
  .act { min-width: 44px; min-height: 44px; }
  .chip { min-height: 44px; }
  .swatches button { width: 50px; height: 50px; }
  .iconbtn { width: 46px; height: 46px; }
  .btn { min-height: 52px; }
  .input { min-height: 50px; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  /* 움직임을 줄인 기기에서는 첫 화면 글이 처음부터 보이게 */
  .hero__copy > * { opacity: 1; transform: none; animation: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
