/* ============================================================
   PROJECT S — mobile only. 길거리 QR 접속 기준으로 만들었습니다.
   웹폰트를 쓰지 않습니다 — 태국어 본문에서 폰트 다운로드 지연이
   그대로 이탈로 이어지므로 OS 내장 태국어 폰트를 씁니다.

   팔레트는 로고에서 파생:
     ink #1F2B20 · 웜 극 #C07856 · 쿨 극 #6E8CA0
   ============================================================ */

:root {
  --ink: #1F2B20;
  --ink-soft: #3B4A3E;
  --ink-mute: #77857A;
  --paper: #F7F5F0;
  --paper-deep: #EFEBE2;
  --line: #E0DACE;
  --white: #FFFFFF;
  --warm: #C07856;
  --cool: #6E8CA0;
  --danger: #B4382B;
  --accent: var(--warm);
  --accent-ink: #9A5637;
  --r: 14px;
  --pad: 20px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* display 를 지정한 규칙이 [hidden] 을 덮어쓰지 않도록 못을 박습니다.
   스캔 오버레이(.scan)와 사진 프리뷰가 여기에 걸립니다. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai",
               "Thonburi", "Leelawadee UI", "Apple SD Gothic Neo", "Noto Sans KR", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.62;
  overflow-x: hidden;
}
body.scanning { overflow: hidden; }

#app { max-width: 520px; margin: 0 auto; min-height: 100vh; }

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
select { font: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.02em; line-height: 1.28; }

/* ---------- 태국어(메인) + 영어(서브) 병기 ---------- */
.bi { display: block; }
.bi > b { display: block; font-weight: 600; }
.bi > i {
  display: block; font-style: normal; font-weight: 400;
  font-size: 0.78em; line-height: 1.45; color: var(--ink-mute); margin-top: 2px;
  letter-spacing: 0.01em;
}

.eyebrow {
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600;
}
.sec-label {
  display: block;
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 700; margin-bottom: 10px;
}
.sec-label .bi > i { letter-spacing: 0.06em; }
.sec-label.light { color: rgba(255,255,255,.55); }
.mt { margin-top: 18px; }

/* ============================================================
   HEADER
   ============================================================ */
.hd {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 10px var(--pad); height: 54px;
  background: rgba(247,245,240,.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.hd-back {
  width: 32px; height: 32px; margin-left: -8px;
  font-size: 26px; line-height: 1; color: var(--ink-soft);
}
.hd-logo { display: block; margin-right: auto; }
.hd-lang { display: flex; gap: 2px; }
.lang {
  padding: 5px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; color: var(--ink-mute);
}
.lang.on { background: var(--ink); color: var(--paper); }

/* 진행 단계 */
.steps { display: flex; gap: 5px; padding: 16px var(--pad) 0; }
.steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--ink); }

.pg-title { padding: 18px var(--pad) 0; font-size: 22px; font-weight: 650; }
.pg-title .bi > i { font-size: 12px; }

/* ============================================================
   STEP 1 — HOME
   ============================================================ */
.home { padding-bottom: 40px; }

.hero { padding: 34px var(--pad) 26px; text-align: center; }
.hero-mark { margin: 0 auto 18px; }
.hero-h1 {
  margin-top: 10px; font-size: 27px; line-height: 1.2;
  letter-spacing: -0.035em;
}
.hero-copy { margin-top: 16px; font-size: 16px; }
.hero-copy .bi > b { font-weight: 550; line-height: 1.5; }
.hero-copy .bi > i { font-size: 0.8em; margin-top: 8px; }

.hero-offer {
  margin-top: 24px; padding: 16px 18px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  text-align: left;
}
.offer-main .bi > b { font-size: 14.5px; }
.offer-limit {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.offer-limit .bi > b { color: var(--danger); font-weight: 700; font-size: 14px; }
.offer-limit .dot {
  flex: none; width: 7px; height: 7px; margin-top: 8px; border-radius: 50%;
  background: var(--danger); animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

/* ---------- STEP 1 : 초기 루트 분기 ---------- */
.routes { padding: 6px var(--pad) 0; }
.route {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 20px 16px; margin-bottom: 12px; text-align: left;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.route:active { transform: scale(.985); }
.route.skincare { border-left: 5px solid var(--warm); }
.route.makeup   { border-left: 5px solid var(--cool); }
.route.skincare:active { border-color: var(--warm); box-shadow: 0 6px 18px rgba(192,120,86,.18); }
.route.makeup:active   { border-color: var(--cool); box-shadow: 0 6px 18px rgba(110,140,160,.18); }
.route-ico { flex: none; font-size: 26px; line-height: 1; }
.route-body { flex: 1; min-width: 0; }
.route-t b { display: block; font-size: 17.5px; font-weight: 650; letter-spacing: -0.01em; }
.route-t i { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; }
.route-s { display: block; margin-top: 8px; }
.route-s b { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-soft); }
.route-s i { display: block; font-style: normal; font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
.route-go { flex: none; font-size: 24px; color: var(--ink-mute); }
.route-note { margin-top: 14px; text-align: center; }
.route-note .bi > b { font-size: 11.5px; color: var(--ink-mute); font-weight: 500; }
.route-note .bi > i { font-size: 10px; }

/* 선택한 루트 배지 (진단 선택 화면 상단) */
.pickpage { padding-bottom: 40px; }
.pickpage .steps { padding-left: var(--pad); padding-right: var(--pad); }
.route-chip {
  display: flex; align-items: center; gap: 10px;
  margin: 16px var(--pad) 0; padding: 12px 14px;
  background: var(--white); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: 10px;
}
.rc-label { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; }
.route-chip b { font-size: 13.5px; font-weight: 650; }
.rc-change {
  margin-left: auto; padding: 5px 10px; border-radius: 999px;
  background: var(--paper-deep); font-size: 11px; font-weight: 600; color: var(--ink-soft);
}

.picks { padding: 6px var(--pad) 0; }
.pick {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 18px 16px; margin-bottom: 10px; text-align: left;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  transition: transform .12s ease, border-color .12s ease;
}
.pick:active { transform: scale(.985); border-color: var(--ink); }
.pick-no {
  flex: none; font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--ink-mute); padding-top: 3px;
}
.pick-body { flex: 1; min-width: 0; }
.pick-t .bi > b { font-size: 17px; font-weight: 650; }
.pick-t .bi > i { font-size: 11.5px; }
.pick-s { display: block; margin-top: 7px; }
.pick-s .bi > b { font-size: 12.5px; font-weight: 400; color: var(--ink-soft); }
.pick-s .bi > i { font-size: 11px; }
.pick-go { flex: none; font-size: 22px; color: var(--ink-mute); }

.tap-hint {
  margin-top: 14px; text-align: center;
  animation: bob 2s ease-in-out infinite;
}
.tap-hint .bi > b { font-size: 12px; color: var(--ink-mute); font-weight: 500; }
.tap-hint .bi > i { font-size: 10px; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

.ft { margin-top: 34px; padding: 24px var(--pad) 0; border-top: 1px solid var(--line); text-align: center; }
.kr-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border: 1px solid var(--ink); border-radius: 999px;
}
.kr-badge .flag { font-size: 15px; }
.kr-badge .bi > b { font-size: 12.5px; font-weight: 700; }
.kr-badge .bi > i { font-size: 10px; }
.ft-note { margin-top: 16px; }
.ft-note .bi > b { font-size: 12px; color: var(--ink-soft); font-weight: 500; }
.ft-note .bi > i { font-size: 10.5px; }
.ft-legal { margin-top: 18px; font-size: 10px; letter-spacing: .1em; color: var(--ink-mute); }

/* ============================================================
   STEP 2 — DIAGNOSIS INPUT
   ============================================================ */
.diag { padding: 0 var(--pad) 60px; }
.diag .pg-title, .diag .steps { padding-left: 0; padding-right: 0; }

.stage {
  position: relative; margin-top: 22px; aspect-ratio: 1;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--paper-deep) repeating-linear-gradient(45deg, rgba(31,43,32,.025) 0 8px, transparent 8px 16px);
  display: grid; place-items: center;
}
.stage img { width: 100%; height: 100%; object-fit: cover; }
.stage-ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--ink-mute); }
.stage-ph p { text-align: center; }
.stage-ph .bi > b { font-size: 13px; }

.rules { list-style: none; margin: 16px 0 0; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.rules li { position: relative; padding-left: 18px; font-size: 12.5px; color: var(--ink-soft); }
.rules li + li { margin-top: 7px; }
.rules li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-mute); }

.hint { margin-top: 14px; text-align: center; }
.hint .bi > b { font-size: 12px; color: var(--ink-soft); font-weight: 500; }
.hint .bi > i { font-size: 10.5px; }
.hint.mute .bi > b { color: var(--ink-mute); font-weight: 400; }

.card {
  margin-top: 16px; padding: 20px 18px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
}
.card.form { margin-top: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
select {
  width: 100%; height: 46px; padding: 0 10px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-mute) 50%), linear-gradient(135deg, var(--ink-mute) 50%, transparent 50%);
  background-position: calc(100% - 16px) 21px, calc(100% - 11px) 21px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
select:focus { outline: none; border-color: var(--ink); }

.err { margin-top: 12px; font-size: 12.5px; color: var(--danger); font-weight: 600; }
.err.big { margin: 18px var(--pad) 0; padding: 12px 14px; background: #FBEDEB; border-radius: 10px; text-align: center; }

/* ---------- 버튼 ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 54px; padding: 12px 16px;
  border-radius: 12px; text-align: center;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.985); }
.btn.primary { margin-top: 18px; background: var(--ink); color: var(--paper); }
.btn.primary .bi > i { color: rgba(247,245,240,.6); }
.btn.primary .bi > b { font-size: 15px; }
.btn.ghost { margin-top: 16px; border: 1px solid var(--ink); }
.btn.ghost .bi > b { font-size: 13.5px; }
.btn[disabled] { opacity: .38; pointer-events: none; }

/* ---------- 스캔 오버레이 ---------- */
.scan {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(247,245,240,.96); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: var(--pad);
}
.scan-inner { width: 100%; max-width: 340px; text-align: center; }
.scan-ring {
  width: 96px; height: 96px; margin: 0 auto; display: grid; place-items: center;
  border: 1.5px solid var(--line); border-top-color: var(--ink); border-radius: 50%;
  animation: spin 1.15s linear infinite;
}
.scan-ring img { animation: spin 1.15s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-label { margin-top: 20px; font-size: 11px; letter-spacing: .22em; color: var(--ink-mute); font-weight: 700; }
.log {
  margin-top: 18px; padding: 14px; min-height: 108px;
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  text-align: left; font-size: 11.5px; line-height: 1.9; color: var(--ink-soft);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.log-line::before { content: "› "; color: var(--ink-mute); }

/* ============================================================
   STEP 3 — RESULT
   ============================================================ */
.result { padding: 0 var(--pad) 0; }
.result .steps { padding-left: 0; padding-right: 0; }
.result .card:first-of-type { margin-top: 22px; }
.result p + p { margin-top: 10px; }

.lead { border-color: var(--ink); }
.lead-h { margin-top: 8px; font-size: 25px; }
.lead-h small { font-size: 15px; font-weight: 400; color: var(--ink-mute); }
.lead-sub { margin-top: 6px; font-size: 12.5px; color: var(--ink-mute); }
.lead-p { margin-top: 14px; font-size: 14.5px; color: var(--ink-soft); }
.lead-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.score { text-align: right; flex: none; }
.score b { display: block; font-size: 34px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.score i { font-size: 10px; font-style: normal; color: var(--ink-mute); }
.pillar { margin-top: 6px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; color: var(--ink-mute); }

.readstat {
  margin: -4px 0 16px; padding: 10px 12px;
  background: var(--paper-deep); border-radius: 9px;
  font-size: 11.5px; line-height: 1.55; color: var(--ink-soft);
}
.readstat.fb { background: #FBEDEB; color: #8A3226; }

.chip {
  display: inline-block; padding: 5px 11px; margin: 0 6px 6px 0;
  border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line);
}
.chip.tone { background: var(--accent); color: #fff; border-color: transparent; }
.chip.best { color: var(--accent-ink); border-color: currentColor; }
.chip.avoid { color: var(--ink-mute); text-decoration: line-through; }
.chips { display: flex; flex-wrap: wrap; }

.measured { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.measured dl { margin: 0; }
.measured dt { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; }
.measured dd { margin: 6px 0 0; font-size: 14px; font-weight: 600; }
.measured dd.hi { color: var(--accent-ink); }

.zones .zone { display: flex; gap: 14px; }
.zones .zone + .zone { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.zone-no { flex: none; width: 38px; }
.zone-no b { display: block; font-size: 12px; letter-spacing: .08em; color: var(--accent-ink); }
.zone-no i { display: block; margin-top: 3px; font-size: 10px; font-style: normal; color: var(--ink-mute); }
.zone-body { flex: 1; min-width: 0; padding-left: 14px; border-left: 1px solid var(--line); }
.zone-t .bi > b { font-size: 14px; }
.zone-t .bi > i { font-size: 10.5px; }
.zone-a { margin-top: 4px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.zone-body > p:last-child { margin-top: 10px; font-size: 13.5px; color: var(--ink-soft); }

.card.invert { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.luck-hd { display: flex; align-items: baseline; gap: 10px; }
.luck-hd .bi > b { font-size: 14px; }
.luck-hd .bi > i { font-size: 10.5px; }
.card.invert .luck-hd .bi > i { color: rgba(247,245,240,.5); }
.luck-v { margin-left: auto; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.luck-v.big { font-size: 30px; color: var(--paper); }
.card.invert .luck-v { color: var(--paper); }
.bar { margin-top: 12px; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bar.light { background: rgba(247,245,240,.22); }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .9s cubic-bezier(.2,.7,.2,1); }
.bar.light i { background: var(--paper); }
.big-copy { margin-top: 18px; font-size: 15.5px; line-height: 1.72; font-weight: 500; }
.guide { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(247,245,240,.16); font-size: 12.5px; color: rgba(247,245,240,.66); }

.lucks .luck + .luck { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.lucks .luck p { margin-top: 12px; font-size: 13px; color: var(--ink-soft); }

.disclaimer { margin: 22px 0 0; }
.disclaimer .bi > b { font-size: 11px; color: var(--ink-mute); font-weight: 400; line-height: 1.6; }
.disclaimer .bi > i { font-size: 10px; }

/* ---------- 플로팅 퀵패스 (이탈 방어) ---------- */
.float-pad { height: 108px; }
.floater {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--paper) 62%, rgba(247,245,240,0));
  pointer-events: none;
}
.floater > * { pointer-events: auto; max-width: 520px; margin: 0 auto; }
.btn.cta {
  background: var(--ink); color: var(--paper);
  box-shadow: 0 10px 26px rgba(31,43,32,.24);
  animation: rise .34s cubic-bezier(.2,.8,.25,1) both;
}
.btn.cta .gift { font-size: 18px; }
.btn.cta .bi > b { font-size: 14.5px; }
.btn.cta .bi > i { color: rgba(247,245,240,.6); font-size: 10.5px; }
@keyframes rise { from { transform: translateY(120%); } to { transform: translateY(0); } }

/* ============================================================
   STEP 4 — PRESCRIPTION (영수증 UI)
   ============================================================ */
.rx { padding: 0 var(--pad) 46px; }
.rx .steps { padding-left: 0; padding-right: 0; }

.receipt { margin-top: 22px; filter: drop-shadow(0 8px 22px rgba(31,43,32,.10)); }
.receipt-body { background: var(--white); padding: 24px 18px 22px; }
/* 약봉투 절취선 — 위아래 지그재그 */
.perf { height: 10px; background: var(--white); }
.perf.top {
  -webkit-mask: radial-gradient(6px at 6px 12px, transparent 98%, #000) repeat-x 0 0 / 12px 12px;
          mask: radial-gradient(6px at 6px 12px, transparent 98%, #000) repeat-x 0 0 / 12px 12px;
}
.perf.bottom {
  -webkit-mask: radial-gradient(6px at 6px -2px, transparent 98%, #000) repeat-x 0 0 / 12px 12px;
          mask: radial-gradient(6px at 6px -2px, transparent 98%, #000) repeat-x 0 0 / 12px 12px;
}

.rc-hd { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.rc-lab { font-size: 9.5px; letter-spacing: .16em; color: var(--ink-mute); font-weight: 700; }
.rc-title { margin-top: 4px; font-size: 17px; letter-spacing: -0.02em; }

.rc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin: 16px 0 0; }
.rc-meta > div:last-child { grid-column: 1 / -1; }
.rc-meta dt { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; }
.rc-meta dd { margin: 4px 0 0; font-size: 12.5px; font-weight: 600; font-family: ui-monospace, "SF Mono", Menlo, monospace; }

.rc-keyword {
  margin-top: 18px; padding: 14px 16px;
  background: var(--paper-deep); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
}
.rc-keyword b { display: block; margin-top: 2px; font-size: 15px; color: var(--accent-ink); }
.rc-guide { margin-top: 20px; font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); }

.rx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.rx-item {
  display: flex; flex-direction: column;
  padding: 14px 12px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
}
.rx-item.out { opacity: .5; }
.rx-thumb { position: relative; display: grid; place-items: center; height: 104px; margin-bottom: 10px; }
.rx-thumb .art { filter: drop-shadow(0 6px 12px rgba(31,43,32,.14)); }
.art { object-fit: contain; }
.left {
  position: absolute; top: 0; right: 0;
  padding: 3px 8px; border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700;
}
.stamp-out {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-12deg);
  padding: 5px 12px; border: 2px solid var(--danger); border-radius: 6px;
  color: var(--danger); font-size: 12px; font-weight: 800; letter-spacing: .06em; white-space: nowrap;
  background: rgba(255,255,255,.86);
}
.rx-code { font-size: 9.5px; letter-spacing: .12em; color: var(--ink-mute); font-weight: 700; }
.rx-name { margin-top: 5px; font-size: 14px; line-height: 1.32; }
.rx-spec { margin-top: 5px; font-size: 11px; color: var(--ink-mute); }
.rx-why { margin-top: 10px; font-size: 11.5px; line-height: 1.58; color: var(--ink-soft); }
.rx-why b {
  display: block; margin-bottom: 3px;
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink);
}
/* margin-top:auto — 두 카드의 설명 길이가 달라도 버튼 상단선이 맞습니다 */
.pickbtn {
  min-height: 54px; margin-top: auto; padding: 12px 10px;
  border-radius: 10px; background: var(--ink); color: var(--paper);
}
.rx-why { padding-bottom: 14px; }
.pickbtn .ico { font-size: 15px; }
.pickbtn .bi > b { font-size: 12.5px; }
.pickbtn .bi > i { font-size: 9.5px; color: rgba(247,245,240,.6); }

/* ---------- STEP 4 : 강제 단일 제품 ---------- */
.rx-single {
  margin-top: 18px; padding: 20px 16px 18px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
  text-align: center;
}
.rx-single.out { opacity: .5; }
.rx-single-art { position: relative; display: grid; place-items: center; margin-bottom: 14px; }
.rx-single-art .art { filter: drop-shadow(0 10px 20px rgba(31,43,32,.16)); }
.rx-single .rx-code { font-size: 10px; letter-spacing: .14em; }
.rx-single .rx-name { margin-top: 6px; font-size: 19px; }
.rx-single .rx-spec { margin-top: 6px; font-size: 12px; }
.rx-single .rx-why {
  margin-top: 14px; padding: 12px 14px 0; text-align: left;
  border-top: 1px dashed var(--line); font-size: 12.5px;
}
.rx-single .rx-why b { text-align: left; }

.rx-bridge {
  margin-top: 16px; padding: 14px 16px;
  background: var(--accent); color: #fff; border-radius: 10px;
  font-size: 13.5px; line-height: 1.6; font-weight: 600; text-align: center;
}

/* ---------- 수령 안내 모달 (구매 링크 대체) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; padding: var(--pad);
  background: rgba(31,43,32,.55); backdrop-filter: blur(3px);
  animation: fade .18s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%; max-width: 360px; padding: 30px 22px 22px;
  background: var(--white); border-radius: 18px; text-align: center;
  animation: popin .26s cubic-bezier(.2,.9,.3,1.15) both;
}
@keyframes popin { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-mark { color: var(--accent); display: grid; place-items: center; }
.modal-t { margin-top: 16px; }
.modal-t .bi > b { font-size: 21px; }
.modal-t .bi > i { font-size: 11.5px; margin-top: 4px; }
.modal-d { margin-top: 14px; }
.modal-d .bi > b { font-size: 13.5px; font-weight: 500; line-height: 1.6; }
.modal-d .bi > i { font-size: 11px; }
.modal-card .btn.primary { margin-top: 22px; }
.modal-close {
  margin-top: 12px; padding: 8px; width: 100%;
  font-size: 12px; color: var(--ink-mute); font-weight: 500;
}

/* 지급 완료 화면의 제품 컷 */
.claimed-art { margin-top: 6px; filter: drop-shadow(0 10px 20px rgba(31,43,32,.16)); }
.claimed-art .art { margin: 0 auto; }

.rc-warn {
  margin-top: 18px; padding: 13px 14px;
  border: 1px solid var(--danger); border-radius: 10px; background: #FCF0EE;
}
.rc-warn .bi > b { font-size: 12px; color: var(--danger); font-weight: 700; line-height: 1.55; }
.rc-warn .bi > i { font-size: 10.5px; color: #A8564A; }

/* ============================================================
   STEP 5 — ISSUED / CLAIM
   ============================================================ */
.issued { min-height: 100vh; padding: 0 var(--pad) calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.issued .steps { padding-left: 0; padding-right: 0; }
.issued-eyebrow { margin-top: 22px; font-size: 10px; letter-spacing: .18em; color: var(--ink-mute); font-weight: 700; text-align: center; }
.issued-h1 { margin-top: 10px; text-align: center; }
.issued-h1 .bi > b { font-size: 24px; font-weight: 650; }
.issued-h1 .bi > i { font-size: 12px; margin-top: 5px; }
.issued-guide {
  margin-top: 14px; padding: 12px 14px; text-align: center;
  background: var(--ink); color: var(--paper); border-radius: 10px;
}
.issued-guide .bi > b { font-size: 13.5px; }
.issued-guide .bi > i { font-size: 10.5px; color: rgba(247,245,240,.6); }

.claim-card {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin-top: 16px; padding: 26px 18px;
  background: var(--white); border: 2px solid var(--accent); border-radius: 18px; text-align: center;
}
.claim-art { filter: drop-shadow(0 12px 24px rgba(31,43,32,.18)); }
.claim-label {
  margin-top: 18px; padding: 9px 18px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 17px; font-weight: 800; letter-spacing: .01em;
}
.claim-name { margin-top: 14px; font-size: 15px; font-weight: 600; }
.claim-sku { margin-top: 6px; font-size: 11px; letter-spacing: .08em; color: var(--ink-mute); font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* ---------- 밀어서 지급 완료 ---------- */
.swipe {
  position: relative; margin-top: 12px; height: 66px;
  background: var(--paper-deep); border: 1px solid var(--line); border-radius: 999px;
  overflow: hidden; touch-action: pan-y;
}
.swipe-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); opacity: .18; }
/* 안내 문구는 레일 바깥(위)에 둡니다 — 레일 안에 넣으면
   태국어가 3줄로 감기면서 66px 안에서 잘립니다. */
.swipe-cap {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 22px; padding: 0 4px;
}
.swipe-cap .tri { flex: none; color: var(--accent-ink); font-size: 11px; line-height: 1.7; }
.swipe-cap .bi > b { font-size: 13px; font-weight: 700; }
.swipe-cap .bi > i { font-size: 10.5px; }

.swipe-label {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; padding-left: 56px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--ink-mute); white-space: nowrap; pointer-events: none;
}
.swipe.armed .swipe-label { color: var(--accent-ink); }
.swipe-knob {
  position: absolute; top: 4px; left: 4px; width: 56px; height: 56px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-size: 26px; line-height: 1;
  box-shadow: 0 4px 12px rgba(31,43,32,.28); touch-action: none;
}
.swipe.spring .swipe-knob, .swipe.spring .swipe-fill { transition: transform .26s ease, width .26s ease; }
.swipe.done { border-color: var(--accent); }
.swipe.pending .swipe-knob { animation: spin 1s linear infinite; }
.issued-note { margin-top: 12px; text-align: center; font-size: 10.5px; line-height: 1.55; color: var(--ink-mute); }

/* ---------- 지급 완료 (최종 · 재진입 불가) ---------- */
.claimed {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 40px var(--pad) calc(40px + env(safe-area-inset-bottom));
}
.claimed-mark { color: var(--accent); animation: pop .42s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes pop { from { transform: scale(.55); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.claimed-h1 { margin-top: 22px; }
.claimed-h1 .bi > b { font-size: 28px; }
.claimed-h1 .bi > i { font-size: 13px; margin-top: 6px; }
.claimed-item {
  margin-top: 18px; padding: 8px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 700;
}
.claimed-desc { margin-top: 20px; font-size: 13.5px; color: var(--ink-soft); }
.claimed-meta { margin-top: 16px; font-size: 10.5px; letter-spacing: .06em; color: var(--ink-mute); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.claimed-logo { margin-top: 44px; opacity: .45; }

/* ---------- 아주 작은 화면 ---------- */
@media (max-width: 340px) {
  :root { --pad: 16px; }
  .hero-h1 { font-size: 23px; }
  .rx-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
