:root {
  --bg: #FFF8F0;
  --card: #FFFFFF;
  --ink: #3A2E2A;
  --muted: #7A6A64;
  --line: #F0E2D6;
  --brand: #E85A4F;
  --brand-dark: #C8453B;
  --notice-bg: #FFF3C4;
  --notice-line: #E9B92F;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 16px; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--brand-dark); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 480px; margin: 0 auto; padding: 16px 16px 40px; }

h1, h2, h3, h4, .brand, .btn, .tname, .logo, .qtext, .prefix { font-family: "Do Hyeon", sans-serif; font-weight: 400; }
h2 { font-size: 24px; margin: 0 0 10px; }
h3 { font-size: 20px; margin: 14px 0 6px; }
h3:first-child { margin-top: 0; }
h4 { font-size: 17px; margin: 14px 0 4px; color: var(--muted); }

.topbar { max-width: 480px; margin: 0 auto; padding: 12px 16px 0; display: flex; gap: 10px; align-items: baseline; color: var(--muted); font-size: 14px; }
.logo { font-size: 26px; color: var(--brand); text-decoration: none; }

.hero { background: var(--tc, #CFE3FA); border-radius: 28px; padding: 18px; text-align: center; }
.hero img { border-radius: 20px; margin: 0 auto; width: 100%; max-width: 360px; }
.brand { font-size: 56px; text-align: center; margin: 14px 0 0; color: var(--brand); line-height: 1.1; }
.sub { text-align: center; margin: 4px 0 10px; color: var(--muted); font-weight: 700; }
.lead { text-align: center; margin: 0 0 18px; }
.note { text-align: center; color: var(--muted); font-size: 14px; margin: 10px 0; }

.btn {
  display: block; width: 100%; padding: 15px 16px; margin: 10px 0; border-radius: 16px;
  font-size: 20px; text-align: center; text-decoration: none; cursor: pointer; border: 0;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:active { background: var(--brand-dark); }
.btn-sub { background: #fff; color: var(--ink); border: 2px solid var(--line); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 .btn { margin: 0; font-size: 18px; }

.sec { text-align: center; margin: 34px 0 12px; }
.tgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tcell { background: var(--tc); border-radius: 16px; padding: 8px 6px 10px; text-decoration: none; color: var(--ink); text-align: center; font-size: 13px; font-weight: 700; line-height: 1.3; }
.tcell img { border-radius: 12px; margin: 0 auto 6px; }
.tcell.cur { outline: 3px solid var(--brand); }

/* 퀴즈 */
.qtop { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; }
.back { background: none; border: 0; color: var(--muted); font-size: 15px; padding: 8px 0; cursor: pointer; }
.bar { height: 10px; background: #F3E6DA; border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
#progressBar { height: 100%; width: 0; background: var(--brand); border-radius: 99px; transition: width .25s; }
.qtext { font-size: 28px; line-height: 1.35; margin: 18px 0 14px; }
.opt {
  display: block; width: 100%; text-align: left; background: #fff; color: var(--ink);
  border: 2px solid var(--line); border-radius: 16px; padding: 15px 16px; margin: 10px 0;
  font-size: 17px; line-height: 1.45; cursor: pointer; font-family: inherit;
}
.opt:hover { border-color: #F2B8A8; }
.opt.on, .opt:active { border-color: var(--brand); background: #FFF1EE; }

/* 결과 */
.hint { background: #FFE3EA; border-radius: 14px; padding: 10px 14px; text-align: center; font-weight: 700; margin-bottom: 12px; }
.result .prefix { margin: 0; color: var(--muted); font-size: 20px; }
.tname { font-size: 38px; margin: 2px 0 12px; line-height: 1.2; }
.tagline { font-weight: 700; margin: 12px 0 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; margin: 14px 0; }
.card p { margin: 6px 0; }
.card ul { margin: 4px 0 6px; padding-left: 20px; }
.tip { background: #FFFBEF; }

.ad-notice { background: var(--notice-bg); border: 2px solid var(--notice-line); border-radius: 14px; padding: 10px 14px; margin: 6px 0 12px; font-weight: 700; font-size: 15px; }
.ad-notice p { margin: 2px 0; }
.ad-notice .small { font-weight: 400; font-size: 14px; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; margin: 8px 0; background: #fff; }
.buy { flex: none; background: var(--brand); color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 700; }

.match p { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.match a { font-weight: 700; }

/* 공유 영역은 상품 링크와 충분히 떨어뜨린다 (쿠팡 운영정책: 오클릭 유도 금지) */
.share { margin-top: 48px; padding-top: 24px; border-top: 2px dashed var(--line); }

.foot { margin-top: 36px; color: var(--muted); font-size: 13px; text-align: center; }
.foot p { margin: 4px 0; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: rgba(58,46,42,.92); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 15px; z-index: 10; }
[hidden] { display: none !important; }
