/* 리플중독자 — 전자책 신청 페이지 */
:root {
  --bg: #0a0f1c;
  --bg2: #0e1526;
  --card: #131c31;
  --line: #22304d;
  --text: #e9eef8;
  --muted: #92a0b9;
  --blue: #2f8cff;
  --blue2: #5aa7ff;
  --yellow: #ffd34d;
  --red: #ff5a5f;
  --green: #35d07f;
  --r: 16px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--blue2); }
.wrap { width: min(1080px, 100% - 40px); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* 알약 로고 (중독 = 캡슐) */
.pill { display: inline-block; width: 30px; height: 14px; border-radius: 99px; transform: rotate(-35deg);
  background: linear-gradient(90deg, var(--blue) 0 50%, #f4f7fd 50% 100%); position: relative; flex: none;
  box-shadow: 0 2px 8px rgba(47,140,255,.35); }
.pill i { position: absolute; left: 50%; top: 2px; bottom: 2px; width: 1px; background: rgba(0,0,0,.15); }
.pill-lg { width: 64px; height: 28px; }

/* 머리 */
.top { position: sticky; top: 0; z-index: 20; background: rgba(10,15,28,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(34,48,77,.6); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-t { display: flex; flex-direction: column; line-height: 1.1; }
.brand-t b { font-size: 17px; letter-spacing: -.02em; }
.brand-t small { font-size: 10px; letter-spacing: .18em; color: var(--muted); }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav a:hover { color: var(--text); }

/* 첫 화면 */
.hero { padding: 48px 0 40px; background:
  radial-gradient(700px 380px at 85% 10%, rgba(47,140,255,.20), transparent 60%),
  radial-gradient(500px 300px at 0% 100%, rgba(255,211,77,.08), transparent 60%); }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .14em; font-weight: 700;
  color: var(--blue2); background: rgba(47,140,255,.1); border: 1px solid rgba(47,140,255,.3); padding: 6px 12px; border-radius: 99px; margin: 0 0 18px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(53,208,127,.18); }
h1 { font-size: clamp(36px, 7vw, 60px); line-height: 1.12; letter-spacing: -.035em; margin: 0 0 18px; font-weight: 900; }
h1 em { font-style: normal; color: var(--yellow); }
.lead { font-size: 17px; color: #c8d2e6; margin: 0 0 26px; }
.lead b { color: var(--yellow); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.ticks li::before { content: "✓ "; color: var(--green); font-weight: 800; }

/* 책 표지 */
.hero-book { display: flex; justify-content: center; perspective: 1200px; }
.book { width: min(300px, 78vw); aspect-ratio: 3 / 4.2; border-radius: 6px 14px 14px 6px; position: relative;
  transform: rotateY(-14deg) rotateX(3deg); box-shadow: -18px 24px 50px rgba(0,0,0,.55), inset 4px 0 0 rgba(255,255,255,.08);
  background: linear-gradient(160deg, #16264a 0%, #0c1426 55%, #081020 100%); overflow: hidden; }
.book::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: linear-gradient(90deg, rgba(0,0,0,.45), transparent); z-index: 2; }
.book img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-cover { position: absolute; inset: 0; padding: 28px 24px 24px 30px; display: flex; flex-direction: column;
  background: radial-gradient(260px 200px at 80% 0%, rgba(47,140,255,.35), transparent 70%); }
.bc-kicker { font-size: 10px; letter-spacing: .22em; color: var(--blue2); margin: 22px 0 8px; font-weight: 700; }
.bc-title { font-size: 28px; line-height: 1.2; font-weight: 900; letter-spacing: -.03em; margin: 0 0 10px; }
.bc-sub { font-size: 13px; color: #b6c2d9; margin: 0; }
.bc-by { margin-top: auto; font-size: 12px; color: var(--yellow); font-weight: 700; letter-spacing: .04em; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 14px 20px;
  font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer; border: 0; font-family: inherit; transition: transform .08s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn-main { background: linear-gradient(180deg, var(--blue2), var(--blue)); color: #fff; box-shadow: 0 8px 24px rgba(47,140,255,.35); }
.btn-main:hover { filter: brightness(1.08); }
.btn-main[disabled] { opacity: .6; cursor: wait; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); }
.btn-xl { width: 100%; padding: 18px 20px; font-size: 18px; border-radius: 14px; }
.btn-next { width: 100%; margin-top: 18px; background: #1b2742; color: var(--text); border: 1px solid var(--line); }
.linkish { background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; margin-top: 12px; width: 100%; }

/* 구역 공통 */
section { padding: 56px 0; }
.sec-k { font-size: 12px; letter-spacing: .2em; color: var(--blue2); font-weight: 800; margin: 0 0 6px; }
h2 { font-size: clamp(26px, 4.4vw, 36px); letter-spacing: -.03em; margin: 0 0 22px; line-height: 1.25; }
h3 { font-size: 21px; margin: 0 0 8px; letter-spacing: -.02em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }

/* 세 단계 */
.how { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps3 { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps3 li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.steps3 span { display: inline-block; font-weight: 900; color: var(--yellow); font-size: 14px; letter-spacing: .1em; margin-bottom: 8px; }
.steps3 b { display: block; font-size: 18px; margin-bottom: 6px; }
.steps3 p { margin: 0; color: var(--muted); font-size: 15px; }

/* 책 고르기 */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 18px; }
.books.single { display: none; }
.bk { display: flex; gap: 12px; align-items: center; background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; }
.bk input { position: absolute; opacity: 0; pointer-events: none; }
.bk.on { border-color: var(--blue); background: #15223f; }
.bk-th { width: 44px; height: 60px; border-radius: 4px; background: linear-gradient(160deg, #1d3463, #0b1428); flex: none; overflow: hidden; }
.bk-th img { width: 100%; height: 100%; object-fit: cover; }
.bk b { display: block; font-size: 15px; line-height: 1.3; }
.bk small { color: var(--muted); font-size: 12px; }

/* 신청 흐름 */
.flow { max-width: 620px; margin: 0 auto; }
.flow-steps { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.flow-steps li { font-size: 13px; color: var(--muted); font-weight: 700; border-top: 3px solid var(--line); padding-top: 8px; }
.flow-steps li span { display: block; font-size: 11px; letter-spacing: .1em; }
.flow[data-step="1"] [data-s="1"], .flow[data-step="2"] [data-s="1"], .flow[data-step="2"] [data-s="2"],
.flow[data-step="3"] li { color: var(--text); border-top-color: var(--blue); }
.panel { display: none; }
.flow[data-step="1"] [data-panel="1"], .flow[data-step="2"] [data-panel="2"], .flow[data-step="3"] [data-panel="3"] { display: block; }
body.is-pc .mobile-only, body.is-mobile .pc-only { display: none; }
.panel .btn-xl { margin-top: 10px; }
.sms-manual { margin-top: 18px; background: var(--bg2); border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; }
.sms-manual p { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.sms-manual dl { margin: 0; display: grid; gap: 6px; }
.sms-manual dl div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sms-manual dt { color: var(--muted); font-size: 14px; }
.sms-manual dd { margin: 0; display: flex; align-items: center; gap: 8px; }
.sms-manual dd b { font-size: 17px; letter-spacing: .02em; }
.copy { background: #1b2742; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; font-family: inherit; }

/* 입력칸 */
.field { display: block; margin: 14px 0; }
.field span { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select { width: 100%; background: #0b1222; color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 14px; font-size: 17px; font-family: inherit; outline: none; }
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,140,255,.2); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 14px; color: #c8d2e6; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.err { color: #ffb3b5; background: rgba(255,90,95,.1); border: 1px solid rgba(255,90,95,.35); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.msg { border-radius: 10px; padding: 12px 14px; font-size: 15px; background: #0b1222; border: 1px solid var(--line); }
.msg.ok { border-color: rgba(53,208,127,.5); color: #b6f0cf; }
.msg.warn { border-color: rgba(255,211,77,.5); color: #ffe7a1; }
.msg.bad { border-color: rgba(255,90,95,.5); color: #ffb3b5; }

/* 완료 */
.done { text-align: center; padding: 10px 0; }
.done-ic { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; font-size: 30px; font-weight: 900;
  background: rgba(53,208,127,.15); color: var(--green); border: 2px solid rgba(53,208,127,.5); }
.appid { font-size: 15px; background: var(--bg2); border-radius: 10px; padding: 10px; margin: 16px 0; }
.appid b { color: var(--yellow); letter-spacing: .06em; }

/* 받기 */
.get { background: var(--bg2); border-top: 1px solid var(--line); }
.get-form { max-width: 620px; margin: 0 auto; }
.get .wrap > .muted { text-align: center; margin-top: -10px; margin-bottom: 22px; }
.get-form .btn-xl { margin-top: 8px; }
.get-form .small { margin: 14px 0 0; }
.get h2, .get .sec-k, .apply h2, .apply .sec-k { text-align: center; }

/* 질문 */
.faq .wrap { max-width: 760px; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; }
summary { cursor: pointer; padding: 16px 18px; font-weight: 700; list-style: none; position: relative; padding-right: 44px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 22px; color: var(--muted); }
details[open] summary::after { content: "−"; }
details p { margin: 0; padding: 0 18px 16px; color: #c8d2e6; font-size: 15px; }
.privacy { padding-top: 0; }
.privacy .wrap { max-width: 760px; }
.pv p { font-size: 14px; }

/* 바닥 */
.foot { border-top: 1px solid var(--line); padding: 34px 0 60px; color: var(--muted); font-size: 13px; }
.foot p { margin: 10px 0; }
.brand-sm .pill { width: 24px; height: 11px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1f2c4b; color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; font-size: 14px; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.4); }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .nav { gap: 12px; }
  .nav a { font-size: 13px; }
  .hero { padding: 30px 0 34px; }
  .hero-in { grid-template-columns: 1fr; gap: 28px; }
  .hero-book { order: -1; }
  .book { width: 190px; }
  .bc-title { font-size: 19px; }
  .book-cover { padding: 18px 16px 16px 22px; }
  .pill-lg { width: 44px; height: 19px; }
  .bc-kicker { margin-top: 12px; }
  .hero-cta .btn { flex: 1 1 100%; }
  section { padding: 44px 0; }
  .steps3 { grid-template-columns: 1fr; }
  .card { padding: 20px; }
}
