/* claypia.kr — 따뜻한 종이 바탕, 강조색 하나(열매 빨강). 움직임은 html.fx 아래에서만. */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --bg: #f6f1e8;
  --bg-deep: #ece4d6;
  --card: #fffdf8;
  --ink: #1c1a16;
  --muted: #655f55;
  --line: rgba(28, 26, 22, 0.09);
  --shell: rgba(28, 26, 22, 0.045);
  --accent: #c1352c;
  --accent-ink: #fffaf5;
  --accent-soft: rgba(193, 53, 44, 0.1);
  --shadow-soft: 0 1px 1px rgba(0, 0, 0, 0.04), 0 12px 32px -12px rgba(0, 0, 0, 0.16), 0 40px 80px -40px rgba(0, 0, 0, 0.18);
  --shadow-lift: 0 2px 2px rgba(0, 0, 0, 0.05), 0 24px 48px -16px rgba(0, 0, 0, 0.26), 0 60px 120px -50px rgba(0, 0, 0, 0.3);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --r-xl: 2rem;
  --r-lg: 1.375rem;
  --pad: 0.4375rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1240px, 100% - 2rem); margin-inline: auto; }

/* 바탕의 빛 번짐과 종이 결 (고정, 눌리지 않음) */
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow::before, .glow::after { content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.glow::before { width: 46vmax; height: 46vmax; left: -14vmax; top: -18vmax; background: radial-gradient(circle, #ffd9b0 0%, rgba(255, 217, 176, 0) 70%); }
.glow::after { width: 40vmax; height: 40vmax; right: -12vmax; top: 18vmax; background: radial-gradient(circle, #f3c4bb 0%, rgba(243, 196, 187, 0) 70%); opacity: 0.4; }
.grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
main, header, footer { position: relative; z-index: 2; }

/* 떠 있는 알약 메뉴 */
.nav { position: sticky; top: 0.875rem; z-index: 30; display: flex; justify-content: center; padding-top: 0.875rem; pointer-events: none; }
.nav-pill {
  pointer-events: auto; display: flex; align-items: center; gap: 0.25rem; padding: 0.375rem;
  background: rgba(255, 253, 248, 0.78); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-radius: 999px; box-shadow: 0 0 0 1px var(--line), var(--shadow-soft);
}
.nav-pill a { text-decoration: none; padding: 0.5rem 1rem; border-radius: 999px; font-size: 16px; font-weight: 600; transition: background-color 0.4s var(--ease), transform 0.4s var(--ease); }
.nav-pill a:hover { background: var(--shell); }
.nav-pill a:active { transform: scale(0.97); }
.nav-pill .brand { font-weight: 800; letter-spacing: -0.01em; }
.nav-pill .brand i { display: inline-block; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--accent); margin-right: 0.45em; vertical-align: 0.08em; }
.nav-pill .go { background: var(--ink); color: var(--card); }
.nav-pill .go:hover { background: #000; }

/* 작은 꼬리표 */
.tag { display: inline-flex; align-items: center; gap: 0.5em; padding: 0.3rem 0.85rem; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--line); font-size: 16px; font-weight: 600; color: var(--muted); }
.tag b { color: var(--accent); font-weight: 700; }

/* 두 겹 테두리 카드: 바깥 받침 + 안쪽 판 */
.shell { background: var(--shell); border-radius: var(--r-xl); padding: var(--pad); box-shadow: 0 0 0 1px var(--line); }
.core { background: var(--card); border-radius: calc(var(--r-xl) - var(--pad)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--shadow-soft); }

/* 단추 */
.btn {
  display: inline-flex; align-items: center; gap: 0.75rem; border: 0; cursor: pointer; text-decoration: none;
  padding: 0.6rem 0.6rem 0.6rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: 17px;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 24px -12px rgba(0, 0, 0, 0.4);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background-color 0.5s var(--ease);
}
.btn .ico { width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(255, 255, 255, 0.18); display: grid; place-items: center; transition: transform 0.5s var(--ease); }
.btn .ico svg { width: 1rem; height: 1rem; }
.btn:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 16px 32px -12px rgba(0, 0, 0, 0.45); }
.btn:hover .ico { transform: translate(3px, -1px) scale(1.06); }
.btn:active { transform: scale(0.97); }
.btn.dark { background: var(--ink); color: var(--card); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 24px -12px rgba(0, 0, 0, 0.6); }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); padding: 0.7rem 1.3rem; }
.btn.ghost:hover { background: #fff; box-shadow: 0 0 0 1px rgba(28, 26, 22, 0.2); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 0.5rem; }

/* 사업자 정보 */
.biz { margin-top: 6rem; padding: 2.5rem 1rem 7rem; text-align: center; color: var(--muted); font-size: 16px; border-top: 1px solid var(--line); }
.biz p + p { margin-top: 0.35rem; }

/* ── 나타나기: 움직임이 켜진 경우에만 숨겼다 나타낸다 ── */
.fx .rv { opacity: 0; transform: translateY(2.5rem); filter: blur(8px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); transition-delay: var(--d, 0ms); }
.fx .rv.in { opacity: 1; transform: none; filter: none; }

/* ════════ 첫 화면 ════════ */
.home-hero { padding: 5rem 0 2rem; }
.home-hero h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: 1.05; letter-spacing: -0.045em; font-weight: 800; margin-top: 1.25rem; max-width: 12em; }
.home-hero h1 em { font-style: normal; color: var(--accent); }
.home-hero .lead { margin-top: 1.5rem; font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--muted); max-width: 30em; }
.doors { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.25rem; padding: 3rem 0 2rem; }
.door { grid-column: span 4; text-decoration: none; display: block; transition: transform 0.7s var(--ease); }
.door.big { grid-column: span 12; }
.door .core { padding: 1.75rem; height: 100%; display: flex; flex-direction: column; gap: 0.6rem; transition: box-shadow 0.7s var(--ease); overflow: hidden; position: relative; }
.door:hover { transform: translateY(-6px); }
.door:hover .core { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--shadow-lift); }
.door h2 { font-size: 1.6rem; letter-spacing: -0.03em; line-height: 1.2; }
.door p { color: var(--muted); }
.door .where { margin-top: auto; padding-top: 1.25rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.door .where::after { content: "→"; transition: transform 0.5s var(--ease); }
.door:hover .where::after { transform: translateX(6px); }
.door.big .core { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; padding: 2.75rem; min-height: 30rem; align-items: center; }
.door.big h2 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -0.04em; line-height: 1.1; }
.door.big .txt { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.door.big .txt p { font-size: 1.15rem; max-width: 24em; }

/* 연출 화면: 겹쳐 기울인 꾸러미 */
.stage { position: relative; height: 26rem; perspective: 1400px; }
.stage .sheet { position: absolute; background: #fff; border-radius: 1.25rem; box-shadow: var(--shadow-lift), 0 0 0 1px var(--line); padding: 1.1rem; transform-style: preserve-3d; transition: transform 0.9s var(--ease); }
.stage .s1 { width: 62%; left: 2%; top: 6%; transform: rotateY(14deg) rotateX(6deg) rotateZ(-4deg); }
.stage .s2 { width: 58%; right: 0; top: 30%; transform: rotateY(-10deg) rotateX(4deg) rotateZ(3deg) translateZ(40px); }
.stage .s3 { width: 44%; left: 14%; bottom: 0; transform: rotateZ(-2deg) translateZ(80px); background: var(--ink); color: var(--card); box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.45); }
.door.big:hover .s1 { transform: rotateY(9deg) rotateX(3deg) rotateZ(-2deg) translateY(-6px); }
.door.big:hover .s2 { transform: rotateY(-6deg) rotateX(2deg) rotateZ(2deg) translateZ(60px) translateY(-10px); }
.door.big:hover .s3 { transform: rotateZ(0deg) translateZ(100px) translateY(-8px); }
.stage .row { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0; font-size: 16px; font-weight: 600; }
.stage .row + .row { border-top: 1px solid var(--line); }
.stage .row img { width: 2.6rem; height: 2.6rem; border-radius: 0.6rem; object-fit: cover; background: var(--bg-deep); flex: none; }
.stage .row span:last-child { margin-left: auto; font-variant-numeric: tabular-nums; }
.stage .field { font-size: 16px; color: var(--muted); }
.stage .field b { display: block; font-size: 2rem; color: var(--ink); letter-spacing: -0.03em; line-height: 1.1; }
.stage .s3 .field { color: rgba(255, 253, 248, 0.7); }
.stage .s3 .field b { color: var(--card); }
.stage .note { position: absolute; right: 0.5rem; bottom: -1.9rem; font-size: 16px; color: var(--muted); }
.fx .stage .sheet { animation: sheet-in 1.2s var(--ease) both; }
.fx .stage .s2 { animation-delay: 0.12s; }
.fx .stage .s3 { animation-delay: 0.24s; }
@keyframes sheet-in { from { opacity: 0; translate: 0 3rem; } to { opacity: 1; translate: 0 0; } }

/* ════════ 꾸러미 화면 ════════ */
.x-hero { padding: 4.5rem 0 1.5rem; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.x-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); line-height: 1.06; letter-spacing: -0.045em; font-weight: 800; margin-top: 1.1rem; }
.x-hero h1 em { font-style: normal; color: var(--accent); }
.x-hero .lead { margin-top: 1.25rem; color: var(--muted); font-size: 1.15rem; max-width: 26em; }

.ask .core { padding: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ask label { display: block; font-weight: 700; font-size: 16px; color: var(--muted); }
.ask .box { margin-top: 0.4rem; display: flex; align-items: baseline; gap: 0.4rem; background: var(--bg); border-radius: 1rem; padding: 0.5rem 1rem; box-shadow: inset 0 1px 2px rgba(28, 26, 22, 0.08), 0 0 0 1px var(--line); transition: box-shadow 0.4s var(--ease); }
.ask .box:focus-within { box-shadow: inset 0 1px 2px rgba(28, 26, 22, 0.08), 0 0 0 2px var(--accent); }
.ask input { width: 100%; min-width: 0; border: 0; background: transparent; outline: 0; font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; padding: 0; }
.ask input::placeholder { color: rgba(28, 26, 22, 0.25); }
.ask .unit { font-weight: 700; font-size: 1.15rem; flex: none; }
.ask .hint { grid-column: 1 / -1; color: var(--muted); font-size: 16px; }

/* 첫 화면 오른쪽: 실제 상품 그림을 겹쳐 쌓은 더미 */
.pile { position: relative; height: 24rem; perspective: 1200px; }
.pile figure { position: absolute; margin: 0; width: 46%; aspect-ratio: 1; border-radius: 1.5rem; overflow: hidden; background: var(--card); box-shadow: var(--shadow-lift), 0 0 0 1px var(--line); transition: transform 0.9s var(--ease); }
.pile figure img { width: 100%; height: 100%; object-fit: cover; }
.pile .p1 { left: 4%; top: 8%; transform: rotate(-7deg); }
.pile .p2 { right: 4%; top: 0; transform: rotate(5deg) translateZ(30px); }
.pile .p3 { left: 27%; bottom: 0; transform: rotate(-1deg) translateZ(70px); }
.pile:hover .p1 { transform: rotate(-10deg) translate(-10px, -6px); }
.pile:hover .p2 { transform: rotate(8deg) translate(10px, -8px) translateZ(30px); }
.pile:hover .p3 { transform: rotate(1deg) translateY(-12px) translateZ(70px); }
.fx .pile figure { animation: sheet-in 1.1s var(--ease) both; }
.fx .pile .p2 { animation-delay: 0.1s; }
.fx .pile .p3 { animation-delay: 0.2s; }

.work { display: grid; grid-template-columns: minmax(0, 1fr) 24rem; gap: 2rem; align-items: start; padding-top: 2.5rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1.25rem; }
.chip { border: 0; cursor: pointer; padding: 0.55rem 1.1rem; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--line); font-weight: 600; font-size: 16px; transition: background-color 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease); }
.chip:hover { transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--card); }
.filters .count { margin-left: auto; color: var(--muted); font-size: 16px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1rem; }
.card { position: relative; background: var(--shell); border-radius: var(--r-lg); padding: 0.3125rem; box-shadow: 0 0 0 1px var(--line); transition: transform 0.6s var(--ease), opacity 0.6s var(--ease); }
.card .in { background: var(--card); border-radius: calc(var(--r-lg) - 0.3125rem); overflow: hidden; height: 100%; display: flex; flex-direction: column; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 20px -14px rgba(0, 0, 0, 0.3); transition: box-shadow 0.6s var(--ease); }
.card:hover { transform: translateY(-5px); }
.card:hover .in { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--shadow-lift); }
.card .pic { aspect-ratio: 1; background: var(--bg-deep); overflow: hidden; display: block; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.card:hover .pic img { transform: scale(1.06); }
.card .body { padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.card .name { font-weight: 700; font-size: 16px; line-height: 1.4; }
.card .note { color: var(--muted); font-size: 16px; }
.card .foot { margin-top: auto; padding-top: 0.6rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.card .price { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.card .add { border: 0; cursor: pointer; border-radius: 999px; padding: 0.5rem 1rem; font-weight: 700; font-size: 16px; background: var(--ink); color: var(--card); transition: transform 0.4s var(--spring), background-color 0.4s var(--ease); }
.card .add:hover { transform: scale(1.06); }
.card .add:active { transform: scale(0.94); }
.card.picked .add { background: var(--accent); color: var(--accent-ink); }
.card.dim > .in { opacity: 0.38; transition: opacity 0.5s var(--ease), box-shadow 0.6s var(--ease); }
.card.dim:hover > .in { opacity: 0.9; }
.card.off > .in { opacity: 0.45; }
.card.off .add { background: var(--bg-deep); color: var(--muted); cursor: not-allowed; }
.card.off:hover { transform: none; }
.card .badge { position: absolute; left: 0.9rem; top: 0.9rem; z-index: 1; padding: 0.2rem 0.7rem; border-radius: 999px; background: rgba(28, 26, 22, 0.82); color: #fff; font-size: 16px; font-weight: 700; }
.more { margin: 1.5rem auto 0; display: flex; }

/* 내 수업 꾸러미 */
.bundle { position: sticky; top: 5.5rem; }
.bundle .core { padding: 1.35rem; }
.bundle h2 { font-size: 1.35rem; letter-spacing: -0.03em; }
.bundle .empty { color: var(--muted); padding: 1.25rem 0 0.5rem; }
.lines { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.line { display: grid; grid-template-columns: 3.25rem 1fr auto; gap: 0.75rem; align-items: start; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line); }
.fx .line { animation: line-in 0.6s var(--spring) both; }
@keyframes line-in { from { opacity: 0; transform: translateY(0.75rem) scale(0.97); } to { opacity: 1; transform: none; } }
.line img { width: 3.25rem; height: 3.25rem; border-radius: 0.8rem; object-fit: cover; background: var(--bg-deep); }
.line .nm { font-weight: 700; font-size: 16px; line-height: 1.35; }
.line .sub { color: var(--muted); font-size: 16px; }
.line .warn { color: var(--accent); font-size: 16px; font-weight: 600; }
.line .amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.line .rm { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 16px; text-decoration: underline; padding: 0; margin-top: 0.2rem; }
.line details { grid-column: 2 / -1; }
.line summary { cursor: pointer; font-size: 16px; font-weight: 600; color: var(--muted); }
.qty { display: grid; grid-template-columns: 1fr auto; gap: 0.4rem 0.75rem; align-items: center; margin-top: 0.6rem; font-size: 16px; }
.qty input { width: 5rem; text-align: right; padding: 0.35rem 0.6rem; border-radius: 0.6rem; border: 0; background: var(--bg); box-shadow: inset 0 1px 2px rgba(28, 26, 22, 0.08), 0 0 0 1px var(--line); font-variant-numeric: tabular-nums; font-weight: 700; }
.line.gone { opacity: 0.55; }

.sum { margin-top: 1.1rem; background: var(--ink); color: var(--card); border-radius: 1.25rem; padding: 1.15rem 1.25rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.sum .per { font-size: 16px; color: rgba(255, 253, 248, 0.7); }
.sum .total { font-size: 2.3rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sum .total.bump { animation: bump 0.5s var(--spring); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1); } }
.sum ul { list-style: none; margin: 0.7rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sum li { padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 16px; font-weight: 600; background: rgba(255, 253, 248, 0.1); color: rgba(255, 253, 248, 0.6); }
.sum li.on { background: var(--card); color: var(--ink); }
.acts { display: grid; gap: 0.6rem; margin-top: 1rem; }
.acts .btn { justify-content: space-between; }
.acts .btn.ghost { justify-content: center; }
.fine { margin-top: 1rem; color: var(--muted); font-size: 16px; display: grid; gap: 0.3rem; }

/* 자사몰로 넘기는 창 */
dialog.hand { border: 0; padding: 0; background: transparent; width: min(46rem, 100% - 1.5rem); max-height: 90dvh; }
dialog.hand::backdrop { background: rgba(28, 26, 22, 0.5); backdrop-filter: blur(6px); }
.fx dialog.hand[open] { animation: line-in 0.5s var(--ease) both; }
.hand .core { padding: 1.75rem; max-height: calc(90dvh - 1rem); overflow: auto; }
.hand h2 { font-size: 1.6rem; letter-spacing: -0.03em; }
.hand p { color: var(--muted); margin-top: 0.5rem; }
.hand .state { margin-top: 1rem; font-weight: 700; color: var(--ink); min-height: 1.6em; }
.hand table { width: 100%; border-collapse: collapse; margin-top: 1.25rem; font-size: 16px; }
.hand th, .hand td { text-align: left; padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.hand th { color: var(--muted); font-weight: 600; }
.hand td.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.hand td a { font-weight: 700; color: var(--accent); white-space: nowrap; }
.hand tr.done td { opacity: 0.5; }
.hand .row-acts { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }

/* 폰: 바닥에 붙는 합계 띠 */
.bar { display: none; }

@media (max-width: 1024px) {
  .nav { position: static; }
  .bundle { scroll-margin-top: 1rem; }
  .x-hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 3rem; }
  .pile { height: 17rem; max-width: 30rem; }
  .work { grid-template-columns: 1fr; }
  .bundle { position: static; }
  .door.big .core { grid-template-columns: 1fr; padding: 1.75rem; }
  .door { grid-column: span 12; }
  .stage { height: 22rem; }
  .bar {
    display: flex; position: fixed; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; z-index: 40; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.6rem 0.6rem 0.6rem 1.1rem; border-radius: 999px; background: rgba(28, 26, 22, 0.94); color: var(--card);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55); text-decoration: none; transition: transform 0.6s var(--ease), opacity 0.6s var(--ease);
  }
  .bar.hide { transform: translateY(160%); opacity: 0; pointer-events: none; }
  .bar b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
  .bar span { font-size: 16px; color: rgba(255, 253, 248, 0.7); display: block; line-height: 1.2; }
  .bar .pill { background: var(--accent); color: var(--accent-ink); padding: 0.55rem 1rem; border-radius: 999px; font-weight: 700; font-size: 16px; white-space: nowrap; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 2rem); }
  .nav-pill a { padding: 0.5rem 0.75rem; }
  .ask .core { grid-template-columns: 1fr 1fr; padding: 1rem; gap: 0.75rem; }
  .ask input { font-size: 1.8rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
  .card .foot { flex-direction: column; align-items: stretch; }
  .card .add { width: 100%; }
  .pile { height: 14rem; }
  .stage { height: 19rem; }
  .stage .field b { font-size: 1.5rem; }
  .hand .core { padding: 1.1rem; }
  .hand th:nth-child(2), .hand td:nth-child(2) { display: none; }
}

/* ════════ 견적 미리보기 ════════ */
.q-head { padding: 4rem 0 1.5rem; }
.q-head h1 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.08; letter-spacing: -0.045em; font-weight: 800; margin-top: 1.1rem; }
.q-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 2rem; align-items: start; padding-top: 1.5rem; }
.sheetwrap { transform: rotate(-0.6deg); transition: transform 0.9s var(--ease); }
.sheetwrap:hover { transform: rotate(0deg) translateY(-4px); }
.fx .sheetwrap.rv:not(.in) { transform: translateY(2.5rem) rotate(-2deg); }
.q-sheet { padding: 2rem; }
.q-top { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-end; flex-wrap: wrap; padding-bottom: 1.25rem; border-bottom: 2px solid var(--ink); }
.q-kicker { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; }
.q-meta { color: var(--muted); margin-top: 0.2rem; }
.q-org { display: grid; gap: 0.25rem; font-weight: 700; font-size: 16px; color: var(--muted); min-width: 14rem; flex: 1; max-width: 20rem; }
.q-org input { border: 0; border-bottom: 1.5px solid var(--line); background: transparent; outline: 0; padding: 0.3rem 0.1rem; font-size: 1.1rem; font-weight: 700; color: var(--ink); transition: border-color 0.4s var(--ease); }
.q-org input:focus { border-color: var(--accent); }
.q-rows { list-style: none; margin: 0; padding: 0; }
.q-row { display: grid; grid-template-columns: 3.5rem 1fr auto; gap: 0.9rem; align-items: center; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.q-row img { width: 3.5rem; height: 3.5rem; border-radius: 0.85rem; object-fit: cover; background: var(--bg-deep); }
.q-nm { font-weight: 700; line-height: 1.35; }
.q-sub { color: var(--muted); font-size: 16px; font-variant-numeric: tabular-nums; }
.q-amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-empty { padding: 2rem 0; color: var(--muted); }
.q-sum { margin: 1.25rem 0 0; display: grid; gap: 0.35rem; }
.q-sum div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.q-sum dt { color: var(--muted); }
.q-sum dt small { font-size: 16px; margin-left: 0.3rem; }
.q-fine a { color: var(--accent); font-weight: 700; }
.q-sum dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; }
.q-sum .big { margin-top: 0.6rem; padding: 1.1rem 1.25rem; border-radius: 1.1rem; background: var(--ink); color: var(--card); }
.q-sum .big dt { color: var(--card); font-weight: 700; }
.q-sum .big small { font-size: 16px; font-weight: 500; opacity: 0.85; margin-left: 0.4rem; }
.q-sum .big dd { font-size: 2rem; font-weight: 800; letter-spacing: -0.04em; }
.q-note { margin-top: 1rem; color: var(--muted); font-size: 16px; }
.q-side { position: sticky; top: 5.5rem; }
.q-act { padding: 1.75rem; display: grid; gap: 1rem; }
.q-act h2 { font-size: 1.6rem; letter-spacing: -0.03em; }
.q-act p { color: var(--muted); }
.q-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.q-steps li { display: flex; gap: 0.75rem; align-items: baseline; font-weight: 600; }
.q-steps b { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; font-size: 16px; }
.q-act .btn { justify-content: space-between; }
.q-state { min-height: 1.6em; font-weight: 700; color: var(--ink) !important; }
.q-fine { font-size: 16px; }
.q-more { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
.q-more .btn { justify-content: center; padding: 0.7rem 0.8rem; }
@media (max-width: 1024px) {
  .q-grid { grid-template-columns: 1fr; }
  .q-side { position: static; }
  .sheetwrap, .sheetwrap:hover { transform: none; }
  .q-head { padding-top: 2.5rem; }
}
@media (max-width: 640px) {
  .q-sheet { padding: 1.15rem; }
  .q-act { padding: 1.15rem; }
  .q-row { grid-template-columns: 2.75rem 1fr; }
  .q-row img { width: 2.75rem; height: 2.75rem; }
  .q-amt { grid-column: 2; }
  .q-sum .big dd { font-size: 1.6rem; }
  .q-more { grid-template-columns: 1fr; }
}
@media print {
  body { background: #fff; font-size: 12pt; }
  .glow, .grain, .nav, .q-head, .q-side { display: none !important; }
  .q-grid { display: block; padding: 0; }
  .wrap { width: 100%; }
  .shell, .core { background: #fff; box-shadow: none; padding: 0; border-radius: 0; }
  .sheetwrap { transform: none !important; opacity: 1 !important; filter: none !important; }
  .q-sheet { padding: 0; }
  .q-org input::placeholder { color: transparent; }
  .q-sum .big { background: #fff; color: #000; border-top: 2px solid #000; border-radius: 0; padding: 0.6rem 0 0; }
  .q-sum .big dt { color: #000; }
  .q-kicker::after { content: " (제출용 아님 · 공식 견적서는 공식몰 양식)"; font-size: 11pt; font-weight: 500; }
  .biz { margin-top: 2rem; padding: 1rem 0 0; font-size: 10pt; }
  .biz a { text-decoration: none; }
  @page { size: A4; margin: 18mm; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 앱 안 브라우저에서 바깥 브라우저로 내보내는 창(escape.mjs) */
.esc { position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; padding: 16px; background: rgba(28, 26, 22, 0.62); }
.esc-card { width: min(100%, 460px); max-height: calc(100dvh - 32px); overflow: auto; padding: 28px 22px calc(22px + env(safe-area-inset-bottom)); border-radius: 28px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); display: grid; gap: 14px; }
.esc-card h2 { margin: 0; font-size: 1.45rem; line-height: 1.3; letter-spacing: -0.02em; }
.esc-card p { margin: 0; font-size: 1rem; line-height: 1.6; }
.esc-card .btn { width: 100%; justify-content: center; }
.esc-how { font-weight: 700; }
.esc-steps { margin: 0; padding-left: 1.3em; font-size: 1rem; line-height: 1.7; }
.esc-link { width: 100%; padding: 12px 14px; font-size: 1rem; border: 1px solid rgba(28, 26, 22, 0.2); border-radius: 12px; background: #fff; color: var(--ink); }
.esc-stay { padding: 10px; border: 0; background: none; color: inherit; font-size: 1rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
html.fx .esc-card { animation: esc-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes esc-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.esc [hidden] { display: none; }

/* 공식몰로 넘기는 화면(/christmas/go) */
.go-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; position: relative; z-index: 1; }
.go-shell { width: min(100%, 480px); }
.go-core { padding: clamp(28px, 6vw, 44px); display: grid; gap: 16px; justify-items: start; }
.go-core h1 { margin: 0; font-size: clamp(1.6rem, 6vw, 2.1rem); line-height: 1.25; letter-spacing: -0.03em; }
.go-core p { margin: 0; font-size: 1.05rem; line-height: 1.6; }
.go-fine { color: var(--muted); font-size: 1rem !important; }
.go-bar { width: 100%; height: 10px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.go-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform: scaleX(0.04); transform-origin: left; transition: transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.go-box { display: flex; gap: 8px; height: 44px; align-items: flex-end; }
.go-box i { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); box-shadow: var(--shadow-soft); }
.go-box i:nth-child(2) { background: var(--accent); }
.go-box i:nth-child(3) { background: var(--bg-deep); box-shadow: 0 0 0 1px var(--line), var(--shadow-soft); }
html.fx .go-box i { animation: go-hop 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; }
html.fx .go-box i:nth-child(2) { animation-delay: 0.15s; }
html.fx .go-box i:nth-child(3) { animation-delay: 0.3s; }
html.fx .stopped .go-box i { animation: none; }
@keyframes go-hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-12px); } }
.go-core [hidden] { display: none; }
