/* 내친소 브랜드: preview.naechinso.com 과 같은 글꼴·색 */
:root {
  --bg: #f7f9fc;
  --surface: #fff;
  --line: #e9edf2;
  --text: #212529;
  --text-sub: #495158;
  --text-muted: #8d97a1;
  --brand: #ff7900;
  --brand-soft: #ffecdb;
  --danger: #f04452;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  height: 52px; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  font-weight: 700; font-size: 17px;
}
main { max-width: 480px; margin: 0 auto; padding: 24px 20px 120px; }

.hero { padding: 8px 4px 24px; }
.hero h1 { font-size: 24px; line-height: 1.35; margin: 0 0 8px; letter-spacing: -0.02em; }
.hero p { margin: 0; color: var(--text-muted); font-size: 15px; }
.chip {
  display: inline-block; margin-bottom: 12px; padding: 5px 12px; border-radius: 100px;
  background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 700;
}

.section-title { font-size: 17px; font-weight: 700; margin: 0 4px 12px; }
.card { background: var(--surface); border-radius: 20px; padding: 20px; margin-bottom: 16px; }

/* 상품 타일 */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 28px; padding: 0; list-style: none; }
.products .muted { grid-column: 1 / -1; }
.product input { position: absolute; opacity: 0; pointer-events: none; }
.product label {
  position: relative; display: block; height: 100%; padding: 18px 16px 16px; cursor: pointer;
  background: var(--surface); border: 2px solid transparent; border-radius: 16px;
  transition: border-color 0.15s, background 0.15s;
}
.product input:checked + label { border-color: var(--brand); background: #fffaf5; }
.product input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.product .amount { display: flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 700; }
.product .coin {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 35%, #ffd36b, var(--brand));
}
.product .price { margin-top: 10px; font-size: 16px; font-weight: 700; }
.product .unit { margin-top: 2px; font-size: 12px; color: var(--text-muted); }
.product .badge {
  position: absolute; top: -8px; right: 10px; padding: 2px 8px; border-radius: 100px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
}

/* 결제 위젯 영역: 토스 위젯이 자체 여백을 가지므로 카드 패딩을 줄인다 */
.card.pay { padding: 8px 0; }

/* 하단 고정 결제 버튼 */
.paybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, rgba(247, 249, 252, 0));
}
.paybar-inner { max-width: 440px; margin: 0 auto; }
button {
  width: 100%; height: 56px; border: 0; border-radius: 100px;
  background: var(--brand); color: #fff; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer;
}
button:disabled { background: #c9d3de; cursor: not-allowed; }

.btn-link {
  display: flex; align-items: center; justify-content: center; height: 56px; border-radius: 100px;
  background: var(--brand-soft); color: var(--brand); text-decoration: none; font-weight: 700;
}

/* 안내 아코디언 */
details { background: var(--surface); border-radius: 16px; margin-bottom: 10px; }
summary {
  list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 700; font-size: 15px;
  display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(-135deg); }
details .body { padding: 0 20px 18px; color: var(--text-sub); font-size: 14px; }
details ul { margin: 0; padding-left: 18px; }
details li + li { margin-top: 6px; }
details a { color: var(--brand); font-weight: 600; }

/* 결과 페이지 */
.result-head { text-align: center; padding: 32px 0 24px; }
.result-head .icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700;
  background: var(--brand-soft); color: var(--brand);
}
.result-head .icon.fail { background: #fde8ea; color: var(--danger); }
.result-head h1 { font-size: 22px; margin: 0; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; margin: 0; font-size: 15px; }
dt { color: var(--text-muted); }
dd { margin: 0; text-align: right; word-break: break-all; font-weight: 600; }

.muted { color: var(--text-muted); font-size: 14px; }
.error { color: var(--danger); font-size: 14px; margin: 12px 4px 0; }
.paybar .error { margin: 0 0 8px; padding: 10px 14px; border-radius: 12px; background: #fde8ea; text-align: center; }

footer { max-width: 480px; margin: 0 auto; padding: 8px 24px 140px; font-size: 12px; color: var(--text-muted); line-height: 1.7; }
footer .links { margin-bottom: 8px; font-size: 13px; color: var(--text-sub); }
footer .links a { text-decoration: none; }
footer p { margin: 0; }
