/* 시안 C 「레트로 캔디숍」: 제목 고운바탕, 본문 나눔스퀘어(네이버 한글한글 아름답게 CDN), 손글씨 스티커 나눔펜.
   색은 크림·체리·와인·분홍·라일락·버터 여섯 가지만 쓴다. 시안: 조사/시안/디자인-시안-C-레트로캔디.html */
@font-face { font-family: 'NanumSquare'; font-weight: 400; font-display: swap;
  src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquare/NanumSquareR.woff) format("woff"); }
@font-face { font-family: 'NanumSquare'; font-weight: 700; font-display: swap;
  src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquare/NanumSquareB.woff) format("woff"); }
@font-face { font-family: 'NanumSquare'; font-weight: 800; font-display: swap;
  src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquare/NanumSquareEB.woff) format("woff"); }

:root {
  --cream: #FFF6EC; --paper-line: rgba(200, 30, 60, .07);
  --cherry: #D7263D; --wine: #6B0F1F; --pink: #F7B8C8; --pink-soft: #FDE4EA; --lilac: #CDBBF7; --butter: #FFE08A;
  --ink: #3B0D16; --sub: #8A5560;
  --head: 'Gowun Batang', serif; --body: 'NanumSquare', -apple-system, "Apple SD Gothic Neo", sans-serif; --hand: 'Nanum Pen Script', cursive;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--pink-soft) radial-gradient(#fff 22%, transparent 23%) 0 0 / 28px 28px; color: var(--ink); font-family: var(--body); line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.site { max-width: 480px; margin: 0 auto; background: var(--cream); min-height: 100vh; overflow: hidden; overflow: clip; box-shadow: 0 0 0 1px rgba(107, 15, 31, .08), 0 10px 40px rgba(107, 15, 31, .12); }
h1, h2, .logo, .pill b, .seal b, .wavy .h { font-family: var(--head); font-weight: 700; letter-spacing: -.5px; }
.hand { font-family: var(--hand); }
.paper { background-color: var(--cream);
  background-image: linear-gradient(var(--paper-line) 1px, transparent 1px), linear-gradient(90deg, var(--paper-line) 1px, transparent 1px);
  background-size: 22px 22px; }

/* 맨 위 분홍 띠 + 물결 아래선 */
.nav { position: relative; z-index: 3; background: var(--pink); padding: 6px 16px 4px; display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 800; color: var(--wine); }
.nav a { text-decoration: none; }
.nav::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px;
  background: radial-gradient(circle at 10px 0, var(--pink) 9.5px, transparent 10px) 0 0 / 20px 10px repeat-x; }
.nav .logo { font-size: 21px; color: var(--cherry); }
.nav .logo img { display: block; width: auto; height: 64px; }

/* 띠 장식 */
.dots { height: 22px; background: var(--wine) radial-gradient(circle, var(--cherry) 6.5px, transparent 7px) 0 0 / 22px 22px repeat-x; }
.checker { height: 16px; background: conic-gradient(var(--cherry) 25%, #fff 0 50%, var(--cherry) 0 75%, #fff 0) 0 0 / 16px 16px; }

/* 버튼·스티커 */
.btn { display: inline-block; background: var(--lilac); color: var(--wine); font-weight: 800; font-size: 13px; padding: 8px 14px; border-radius: 8px; border: 1.5px solid var(--wine); text-decoration: none; transition: transform .15s; }
.btn:active, .pill:active, .buy:active { transform: scale(.96); }
/* 홈 "나이별로 보기": 스티커 그림자, 퍼지는 물결, 콩콩 뛰는 화살표 */
.btn.cta { position: relative; font-size: 14px; padding: 10px 18px; box-shadow: 3px 3px 0 var(--wine); transition: transform .15s, box-shadow .15s; }
.btn.cta::after { content: ""; position: absolute; inset: -2px; border-radius: 10px; border: 2px solid var(--cherry); opacity: 0; pointer-events: none; animation: cta-ring 2.4s ease-out 1s infinite; }
.btn.cta .arrow { display: inline-block; animation: cta-arrow 1.2s ease-in-out infinite; }
.btn.cta:hover { transform: translate(-1px, -2px); box-shadow: 4px 5px 0 var(--wine); }
.btn.cta:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--wine); }
@keyframes cta-ring { 0% { opacity: .7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.18, 1.45); } }
@keyframes cta-arrow { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(3px); } }
.sticker { position: absolute; background: #fff; border: 1.5px solid var(--wine); border-radius: 999px; padding: 2px 10px; font-size: 19px; color: var(--cherry); transform: rotate(-8deg); box-shadow: 2px 2px 0 var(--wine); pointer-events: none; }

/* 첫 화면 */
.hero { position: relative; padding: 34px 20px 28px; }
.hero h1 { font-size: 30px; line-height: 1.2; margin: 8px 0 10px; color: var(--wine); }
.lead { font-size: 13.5px; line-height: 1.6; color: var(--sub); margin: 0 0 14px; max-width: 215px; }
.gift { position: absolute; right: 18px; top: 66px; width: 96px; height: 84px; transform: rotate(6deg); }
.gift span { position: absolute; border: 2px solid var(--wine); }
.gift .box { left: 6px; right: 6px; bottom: 0; height: 58px; background: var(--cherry); border-radius: 6px; }
.gift .lid { left: 0; right: 0; top: 14px; height: 18px; background: #ef4a5f; border-radius: 5px; z-index: 1; }
.gift .rib { left: 50%; top: 14px; bottom: 0; width: 12px; margin-left: -6px; background: var(--butter); border-top: 0; border-bottom: 0; z-index: 2; }
.gift .bow { top: 0; width: 26px; height: 18px; background: var(--butter); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; z-index: 2; }
.gift .bow.l { left: 22px; transform: rotate(-25deg); } .gift .bow.r { right: 22px; transform: rotate(25deg); }
/* 선물 상자: 3.2초마다 통통 뛰고 리본이 팔랑이며 반짝이가 튄다 */
.gift { animation: gift-hop 3.2s ease-in-out .6s infinite; transform-origin: 50% 100%; }
.gift .bow.l { animation: bow-l 3.2s ease-in-out .6s infinite; } .gift .bow.r { animation: bow-r 3.2s ease-in-out .6s infinite; }
.gift::before, .gift::after { content: "✦"; position: absolute; color: var(--butter); -webkit-text-stroke: 1px var(--wine); font-size: 20px; line-height: 1; opacity: 0; animation: sparkle 3.2s ease-out .6s infinite; }
.gift::before { left: -16px; top: 6px; } .gift::after { right: -14px; top: -6px; font-size: 15px; animation-delay: .7s; }
@keyframes gift-hop {
  0%, 62%, 100% { transform: rotate(6deg) translateY(0) scale(1, 1); }
  70% { transform: rotate(6deg) translateY(0) scale(1.06, .92); }
  80% { transform: rotate(-3deg) translateY(-14px) scale(.96, 1.05); }
  90% { transform: rotate(8deg) translateY(0) scale(1.05, .94); }
  95% { transform: rotate(5deg) translateY(-2px) scale(1, 1); }
}
@keyframes bow-l { 0%, 70%, 100% { transform: rotate(-25deg); } 80% { transform: rotate(-42deg); } 90% { transform: rotate(-18deg); } }
@keyframes bow-r { 0%, 70%, 100% { transform: rotate(25deg); } 80% { transform: rotate(42deg); } 90% { transform: rotate(18deg); } }
@keyframes sparkle { 0%, 74%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 82% { opacity: 1; transform: scale(1.1) rotate(20deg); } 92% { opacity: 0; transform: scale(.8) rotate(40deg); } }
.doodle { position: absolute; right: 116px; top: 196px; width: 50px; height: 32px; fill: none; stroke: var(--wine); stroke-width: 1.6; stroke-linecap: round; }
.hero .sticker { right: 14px; top: 176px; }

/* 나이 고르기: 입장권 */
.ages-sec { background: var(--cherry); padding: 22px 16px 26px; text-align: center; }
.ages-sec .label, .wavy .label { font-size: 11px; font-weight: 800; letter-spacing: .5px; margin: 0; display: block; }
.ages-sec .label { color: var(--pink-soft); }
.ages-sec h2 { color: #fff; font-size: 23px; margin: 4px 0 16px; }
.age-group { margin-top: 14px; }
.age-group > p { margin: 0 0 7px; font-size: 12px; font-weight: 800; color: var(--pink); letter-spacing: .5px; }
.pills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.pill { display: flex; flex-direction: column; align-items: center; text-decoration: none; background: var(--cream); border: 1.5px solid var(--wine); border-radius: 12px; padding: 6px 0 5px; box-shadow: 2px 2px 0 var(--wine); transition: transform .15s, background .15s; }
.pill:hover { background: var(--butter); }
.pill b { font-size: 18px; color: var(--wine); line-height: 1.25; }
.pill span { font-size: 10px; color: var(--sub); }

/* 크리스마스 */
.xmas { position: relative; background: repeating-linear-gradient(90deg, var(--pink) 0 16px, var(--pink-soft) 16px 32px); padding: 26px 18px; }
.wavy { display: block; text-decoration: none; background: var(--lilac); border: 1.5px solid var(--wine); padding: 20px 18px; text-align: center;
  border-radius: 26px 18px 30px 16px / 18px 28px 16px 26px; }
.wavy .label { color: var(--wine); }
.wavy .h { display: block; font-size: 22px; color: var(--wine); margin: 4px 0 6px; }
.wavy .sub { display: block; font-size: 12.5px; color: #5b3a63; margin-bottom: 12px; }
.wavy .btn { background: var(--cherry); color: #fff; }
.xmas .sticker { right: 6px; top: 8px; font-size: 18px; background: var(--butter); }

/* 본문 페이지 */
.page { padding: 22px 16px 10px; }
.crumb { font-size: 11px; color: var(--sub); }
.crumb a { text-decoration: none; }
.disclosure-top { font-size: 10.5px; color: var(--sub); margin: 6px 0 0; }
.page h1 { font-size: 26px; color: var(--wine); margin: 10px 0 4px; line-height: 1.25; }
.page h2 { font-size: 17px; color: var(--wine); margin: 22px 0 6px; }
.page h2.big { font-size: 21px; margin-top: 18px; }
.meta { font-size: 11.5px; color: var(--sub); margin: 0; }
.born { display: inline-block; background: var(--butter); border: 1.5px solid var(--wine); color: var(--wine); font-weight: 800; font-size: 10.5px; padding: 1px 8px; border-radius: 999px; margin-right: 6px; transform: rotate(-3deg); }
.note { background: #fff; border: 1.5px dashed var(--pink); border-radius: 14px; padding: 12px 14px; margin: 16px 0 0; font-size: 13px; color: var(--ink); }
.note h2 { font-size: 15px; margin: 0 0 4px; }
.note p { margin: 0; }
.note ul { margin: 0; padding-left: 18px; }
.note li { margin: 3px 0; }
.criteria { list-style: disc; padding: 12px 14px 12px 30px; }

/* 성별 탭·가격 버튼 */
.tab-switch { display: flex; margin: 18px 0 8px; border: 1.5px solid var(--wine); border-radius: 999px; overflow: hidden; background: #fff; position: sticky; top: 0; z-index: 2; }
.tab-switch button { flex: 1; border: 0; background: transparent; padding: 9px 0; font: 800 13.5px var(--body); color: var(--wine); cursor: pointer; }
.tab-switch button.on { background: var(--wine); color: var(--pink); }
.tab-switch button span { margin-right: 3px; }
.price-filter { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 4px; }
.price-filter button { font: 700 12px var(--body); padding: 5px 8px; border-radius: 999px; border: 1px solid #e3b9c2; color: var(--sub); background: #fff; cursor: pointer; }
.price-filter button.on { background: var(--pink); border-color: var(--wine); color: var(--wine); }
.tab-panel > h2 { font-size: 15px; margin: 14px 0 0; }

/* 상품 카드 */
.items { list-style: none; margin: 0; padding: 0; }
.item { display: flex; gap: 12px; background: #fff; border: 1.5px solid var(--wine); border-radius: 16px; padding: 11px; margin-top: 14px; }
.pic { position: relative; flex: 0 0 38%; }
.pic img { color: transparent; font-size: 0; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 11px; border: 1.5px solid var(--wine); background: repeating-linear-gradient(90deg, var(--pink-soft) 0 10px, #fff 10px 20px); }
/* 참고 항목(돌반지·현금): 사진 대신 큰 그림 글자, 점선 테두리로 상품 카드와 구분 */
.item.ref { border-style: dashed; background: #fffdf8; }
.ref-icon { display: grid; place-items: center; width: 100%; aspect-ratio: 1; font-size: 46px; border-radius: 11px; border: 1.5px dashed var(--wine); background: var(--butter); }
.item.ref .grp { color: var(--sub); }
.seal { position: absolute; left: -9px; top: -9px; width: 38px; height: 38px; }
.seal svg { width: 100%; height: 100%; display: block; fill: var(--wine); stroke: var(--wine); }
.seal b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #fff; }
.seal.r1 svg { fill: var(--butter); } .seal.r1 b { color: var(--wine); }
.seal.r1 { animation: wiggle .9s ease-in-out .4s 1; }
.seal.r2 svg, .seal.r3 svg { fill: var(--cherry); }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(12deg); } 50% { transform: rotate(-10deg); } 75% { transform: rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .seal.r1, .gift, .gift .bow, .gift::before, .gift::after, .btn.cta::after, .btn.cta .arrow { animation: none; } html { scroll-behavior: auto; } }
.info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.grp { font-size: 11px; color: var(--sub); }
.item h3 { font-size: 13.5px; font-weight: 800; line-height: 1.35; margin: 2px 0 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reason { font-size: 12px; color: var(--sub); line-height: 1.45; margin: 0 0 8px; }
.row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 12.5px; white-space: nowrap; color: var(--wine); }
.buy { display: inline-flex; align-items: center; gap: 5px; background: var(--cherry); color: #fff; font-weight: 800; font-size: 12px; padding: 7px 10px; border-radius: 8px; border: 1.5px solid var(--wine); white-space: nowrap; text-decoration: none; transition: transform .15s; }
.buy i { font-style: normal; display: inline-flex; width: 14px; height: 14px; border-radius: 3px; background: #03C75A; color: #fff; font-size: 10px; font-weight: 900; align-items: center; justify-content: center; }
.alts { margin-top: 9px; padding-top: 8px; border-top: 1.5px dashed #f0cdd5; }
.alts p { margin: 0 0 4px; font-size: 10.5px; font-weight: 800; color: var(--cherry); }
.alts ul { list-style: none; margin: 0; padding: 0; }
.alts li { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 3px 0; }
.alts a { color: var(--wine); font-weight: 700; text-decoration: underline; text-decoration-color: var(--pink); text-underline-offset: 3px; min-width: 0; }
.alts span { color: var(--sub); white-space: nowrap; font-size: 11px; }
.empty { font-size: 13px; color: var(--sub); margin: 12px 0 0; }
/* 크리스마스: 위에 붙는 묶음 버튼(전체 / 나이 묶음 / 예산별) */
.jump { position: sticky; top: 0; z-index: 2; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 14px -16px 4px; padding: 8px 16px; background: var(--cream); border-bottom: 1.5px dashed var(--pink); }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: none; font-size: 13px; font-weight: 800; color: var(--wine); text-decoration: none; padding: 6px 12px; border: 1.5px solid var(--wine); border-radius: 999px; background: #fff; }
.jump a.on { background: var(--wine); color: var(--pink); }
.bucket, #budget { scroll-margin-top: 56px; }
.more { display: inline-block; margin: 12px 0 0; font-size: 13px; font-weight: 800; color: var(--cherry); }

/* 다른 나이·아래쪽 */
.neighbors { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 22px; }
.neighbors h2 { width: 100%; margin: 0 0 2px; }
.neighbors a { font: 700 13px var(--body); padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--wine); background: #fff; color: var(--wine); text-decoration: none; }
.disclosure { margin: 26px 0 0; padding: 12px 0 18px; border-top: 1.5px dashed #e8c3cb; font-size: 11px; color: var(--sub); }
.foot { background: var(--wine); color: var(--pink); text-align: center; font-size: 11px; padding: 18px 16px 24px; }
.foot a { display: block; text-decoration: none; }
.foot .logo { font-size: 19px; margin-bottom: 6px; }
/* 하단 고정 메뉴. 본문 폭(480px)에 맞춰 가운데 붙고, 아이폰 홈 막대만큼 아래 여백을 둔다 */
.site { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
.bottom-nav { position: fixed; left: 50%; bottom: 0; z-index: 5; width: 100%; max-width: 480px; transform: translateX(-50%);
  display: flex; background: var(--cream); border-top: 2px solid var(--wine); padding: 5px 4px calc(5px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 14px rgba(107, 15, 31, .08); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; text-decoration: none; font-size: 10.5px; font-weight: 800; color: var(--sub); padding: 3px 0; letter-spacing: -.3px; }
.bottom-nav i { font-style: normal; font-size: 19px; line-height: 28px; width: 44px; text-align: center; border-radius: 999px; transition: background .2s, transform .2s; }
.bottom-nav a.on { color: var(--cherry); }
.bottom-nav a.on i { background: var(--pink); transform: translateY(-1px); }
.bottom-nav a:active i { transform: scale(.9); }
/* 왼쪽 아래 뒤로가기: 하단 메뉴 바로 위, 본문 폭(480px) 안쪽 왼쪽에 붙는다 */
.back { position: fixed; z-index: 5; left: max(12px, calc(50% - 228px)); bottom: calc(74px + env(safe-area-inset-bottom));
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); border: 1.5px solid var(--wine);
  box-shadow: 2px 2px 0 var(--wine); color: var(--wine); font-size: 22px; font-weight: 800; text-decoration: none; line-height: 1; }
.back:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--wine); }
