/* 구매 페이지(/buy/) — apple.com/kr/shop/buy-iphone/iphone-duo 를 Aside 로 1440 · 390 폭에서 잰 짜임 · 수치(2026-11-20).
   색은 프로젝트 토큰으로 옮긴다(홈 duo.css 와 같은 규칙): 흰 바탕 → --paper-hi · 회색 판 #f5f5f7 → --paper · 회색 글 · 칸 테두리 #86868b → --faint
   · 막대 선 #e8e8ed → --rule · 파란 단추 #0071e3 → --action · 눈썹 주황 #b64400 → --learning-accent-text. 애플 600 굵기 제목은 Paperlogy 400(홈과 같다).
   buy.js 가 붙잡는 id · 클래스(buy-form · pay-book · pay-detail · buy-price …)는 그대로 두고 모양만 바꾼다. 휴대폰이 기본, 1069px 부터 두 단 */
.ab-page { --ab-gray: var(--faint); --ab-card: var(--paper); --ab-line: var(--faint); --ab-hair: var(--rule); --ab-move: cubic-bezier(.25, .1, .3, 1); background: var(--paper-hi); }
.ab-page .top { position: absolute; background: none; } /* 사이트 머리줄은 위로 흘러가고, 내려가면 .ab-bar 가 붙는다(애플과 같다) */
.ab-in { box-sizing: border-box; width: 87.5%; max-width: 1260px; margin-inline: auto; }
.ab svg, .ab-bar svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ── 머리: 눈썹 · 제목 · 값 · 한 줄, 오른쪽(휴대폰은 아래) 알약 링크 ── */
.ab-head { display: flex; flex-direction: column; gap: 42px; padding-top: calc(var(--header) + 30px); }
.ab-eyebrow { color: var(--learning-accent-text); font: 400 12px/17px var(--sans); }
.ab-head h1 { margin-top: 2px; color: var(--ink); font: 400 32px/39px var(--sans); letter-spacing: 0; word-break: keep-all; }
.ab-from { color: var(--ink); font: 400 17px/27px var(--sans); }
.ab-note { margin-top: 22px; font: 400 14px/20px var(--sans); }
.ab-note a { color: var(--accent); }
.ab-pills { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.ab-pill { display: inline-flex; align-items: center; gap: 4px; padding: 12px 16px; border-radius: 18px; background: var(--ab-card); color: var(--ink); font: 400 12px/17px var(--sans); }
@media (hover: hover) { .ab-pill:hover { background: var(--paper-deep); } }

/* ── 두 단: 왼쪽 그림판(넓은 화면에서 떠 있다) · 오른쪽 단계 ── */
.ab-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 43px; margin-top: 43px; }
.ab-gallery-card { display: grid; place-items: center; aspect-ratio: 341 / 246; overflow: hidden; border-radius: 20px; background: var(--ab-card); }
.ab-gallery-card img { width: 78%; height: 86%; object-fit: contain; mix-blend-mode: multiply; }
.ab-step + .ab-step { margin-top: 76px; }
.ab-step-title { margin-bottom: 27px; color: var(--ink); font: 400 24px/31px var(--sans); letter-spacing: .009em; word-break: keep-all; }
.ab-step-title span { color: var(--ab-gray); }
.ab-inside, .buy-one .ab-choose { display: none; }
.buy-one .ab-inside { display: inline; }

/* 고르는 칸(애플 form-selector): 둥글기 12 · 테두리 1px · 안쪽 15 · 높이 83 이상 · 사이 14, 고르면 2px 먹선 */
.ab .pay-books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ab .pay-book {
  display: flex; align-items: center; gap: 0; min-width: 0; min-height: 83px; box-sizing: border-box; padding: 15px; border-radius: 12px;
  background: var(--paper-hi); box-shadow: inset 0 0 0 1px var(--ab-line); transition: box-shadow .2s var(--ab-move);
}
.ab .pay-book img { display: none; } /* 고른 책 그림은 왼쪽 그림판이 크게 보여 준다 */
.ab .pay-book span { display: flex; flex-direction: column; gap: 2px; width: 100%; min-width: 0; }
.ab .pay-book b { color: var(--ink); font: 400 17px/23px var(--sans); word-break: keep-all; }
.ab .pay-book small { color: var(--ink); font: 400 12px/17px var(--sans); white-space: nowrap; }
/* 올인원 북 · 여행 완전판 · AI 학습 프리패스는 한 줄 칸(이름 왼쪽 · 값 오른쪽), 포켓북 모음 + 낱권 다섯은 두 칸씩 */
.ab .pay-book:has(input:is([value="book"], [value="travelfull"], [value="teacher"], [value="bookpass"])) { grid-column: 1 / -1; }
.ab .pay-book:has(input:is([value="book"], [value="travelfull"], [value="teacher"], [value="bookpass"])) span { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; }
.ab .pay-book:has(input[value="book"]) { order: -3; }
.ab .pay-book:has(input[value="travelfull"]) { order: -2; }
.ab .pay-book:has(input[value="pocket"]) { order: -1; }
.ab .pay-book:has(:checked) { box-shadow: inset 0 0 0 2px var(--ink); }
@media (hover: hover) { .ab .pay-book:not(:has(:checked)):hover { box-shadow: inset 0 0 0 1px var(--ink); } }

/* 들어 있는 것: 회색 안내 상자(둥글기 12 · 제목 14/20 굵게 · 본문 14/20) */
.ab .pay-detail { margin-top: 14px; padding: 16px; border-radius: 12px; background: var(--ab-card); }
.ab .pay-detail-title { color: var(--ink); font: 700 14px/20px "Paperlogy Bold", var(--sans); }
.ab .pay-list { gap: 6px; margin-top: 8px; }
.ab .pay-list li { font-size: 14px; line-height: 20px; }
.ab .pay-package { font-size: 14px; line-height: 20px; }
/* 학습 이용권 기간 선택 */
.ab .pay-plans { margin-top: 20px; }
.ab .pay-plans legend { margin-bottom: 8px; padding: 0; font-weight: 700; }
.ab .pay-plan-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ab .pay-plan {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 83px; box-sizing: border-box; padding: 15px 12px; border-radius: 12px;
  background: var(--paper-hi); box-shadow: inset 0 0 0 1px var(--ab-line);
}
.ab .pay-plan:has(:checked) { box-shadow: inset 0 0 0 2px var(--ink); }
.ab .pay-plan b { color: var(--ink); font: 400 17px/23px var(--sans); white-space: nowrap; }
.ab .pay-plan strong { justify-self: start; color: var(--ink); font: 400 17px/23px var(--sans); letter-spacing: 0; }
.ab .pay-plan small { justify-self: start; color: var(--ab-gray); font: 400 12px/17px var(--sans); }
.ab .pay-plan-note { margin-top: 10px; padding: 0; background: none; color: var(--ab-gray); font-size: 13px; text-align: left; }
.ab .has-video-pass-plans .pay-plan-options { display: block; }
.buy-youtube-pass .ab .pay-detail[data-pay="youtube"] { margin-top: 1.25rem; padding: 1rem; border: 1px solid var(--rule); border-radius: 1rem; background: var(--ab-card); }
.video-pass-benefits-title { margin: 0; font-size: .9375rem; }
.video-pass-benefits { display: grid; gap: .5rem; margin: .625rem 0 0; padding: 0; list-style: none; }
.video-pass-benefits li { display: flex; align-items: center; gap: .625rem; font-size: .9375rem; }
.video-pass-benefits .paper-sticker { flex: none; width: 1.25rem; height: 1.25rem; object-fit: contain; }

/* 이메일 칸 */
.ab .field-label { display: block; margin-bottom: 8px; color: var(--ab-gray); font: 400 14px/20px var(--sans); }
.ab .email {
  display: block; width: 100%; min-height: 56px; box-sizing: border-box; padding: 0 16px; border: 0; border-radius: 12px;
  background: var(--paper-hi); box-shadow: inset 0 0 0 1px var(--ab-line); color: var(--ink); font: 400 17px/23px var(--sans);
}
.ab .email:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.ab .email + .field-label, .ab .ab-revision + .field-label { margin-top: 14px; }
/* 칸 안 라벨(애플 구입 화면 입력칸): 비었을 땐 칸 가운데 17px, 누르거나 채우면 위로 작게. 예시(placeholder)는 누른 뒤에만 보인다 */
.ab .field-float { position: relative; }
.ab .field-float .email { padding: 22px 16px 6px; }
.ab .field-float .field-label {
  position: absolute; top: 18px; left: 17px; margin: 0; color: var(--ab-gray); font: 400 17px/20px var(--sans);
  pointer-events: none; transform-origin: 0 0; transition: transform .2s var(--ab-move), color .2s;
}
.ab .field-float:has(.email:focus, .email:not(:placeholder-shown)) .field-label { transform: translateY(-10px) scale(.7); }
.ab .field-float .email::placeholder { color: transparent; }
.ab .field-float .email:focus::placeholder { color: var(--faint); }
.ab .field-float:has([aria-invalid="true"]) .field-label { color: var(--accent); }
.ab .email[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.field-hint { margin: 8px 0 0; color: var(--ab-gray); font: 400 13px/19px var(--sans); word-break: keep-all; }
.field-hint[data-kind="error"] { color: var(--accent); }
.field-hint button { margin-left: 6px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }

/* 결제 수단: 한 줄 칸(보이는 수단 수만큼 똑같이 나눈다), 고르면 2px 먹선 — 책 고르기 칸과 같은 말투 */
.ab .pay-methods { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ab .pay-method {
  display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 48px; padding: 4px 6px; border-radius: 12px; background: var(--paper-hi); box-shadow: inset 0 0 0 1px var(--ab-line);
  color: var(--ink); font: 400 15px/20px var(--sans); text-align: center; word-break: keep-all; cursor: pointer; transition: box-shadow .2s var(--ab-move);
}
.ab .pay-method:has(:checked) { box-shadow: inset 0 0 0 2px var(--ink); }
.ab .pay-method:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .ab .pay-method:not(:has(:checked)):hover { box-shadow: inset 0 0 0 1px var(--ink); } }
.ab-summary-act .field-hint { margin-top: -2px; } /* 휴대폰 칸 바로 아래(단추 줄 간격 10 안에서) */

/* 개정판 안내(이메일 칸 바로 아래 · 결제 금액 줄 · 올인원 북 · 1+1 만): 결제 단추보다 약한 회색 판 + 붉은 벽돌빛 배지 한 개 */
.ab-revision, .ab-meta .ab-revision-meta { display: none; } /* .ab-meta li 의 flex 보다 세게 */
.ab-page:not(.buy-simple):has(input[name="book"]:is([value="book"], [value="bookpass"]):checked) .ab-revision { display: grid; } /* 간단 결제는 '들어 있는 것' 목록이 개정판 무료를 이미 말한다 */
.ab-page:not(.buy-simple):has(input[name="book"]:is([value="book"], [value="bookpass"]):checked) .ab-meta .ab-revision-meta { display: flex; }
.ab-revision { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 12px; padding: 16px; border-radius: 12px; background: var(--ab-card); }
.ab .ab-revision svg { width: 36px; height: 36px; padding: 8px; box-sizing: border-box; border-radius: 50%; background: var(--paper-hi); color: var(--learning-accent-text); }
.ab-revision-badge { display: inline-block; margin-bottom: 6px; padding: 2px 8px; border-radius: 999px; background: var(--paper-hi); box-shadow: inset 0 0 0 1px currentColor; color: var(--learning-accent-text); font: 400 12px/17px var(--sans); }
.ab-revision-title { color: var(--ink); font: 700 15px/21px "Paperlogy Bold", var(--sans); word-break: keep-all; }
.ab-revision-text { margin-top: 4px; color: var(--ink); font: 400 13px/19px var(--sans); word-break: keep-all; }

/* ── 맨 아래 회색 띠: 제목 · 값과 약관 · 결제 단추 (넓은 화면 세 칸) ── */
.ab-summary { margin-top: 76px; padding: 32px 0 48px; background: var(--ab-card); }
.ab-summary-in { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "price" "act" "terms"; gap: 24px; }
.ab-summary-title { grid-area: title; color: var(--ink); font: 400 clamp(28px, 7.8vw, 38px)/1.22 var(--sans); letter-spacing: .004em; word-break: keep-all; } /* 애플 38/46 — 우리 한 줄(그림 한 장에 문장 하나.)이 390 폭에 들어가게 휴대폰만 줄인다 */
.ab-summary-price { grid-area: price; }
.ab-summary-act { grid-area: act; display: flex; flex-direction: column; gap: 10px; }
.ab-summary-terms { grid-area: terms; display: grid; gap: 12px; padding-top: 24px; border-top: 1px solid var(--ab-hair); }
.ab .pay-price.price { margin: 0; padding: 0; border: 0; gap: 4px 10px; }
.ab .pay-price.price strong { color: var(--ink); font: 400 17px/27px var(--sans); letter-spacing: 0; }
.ab .pay-price.price del { color: var(--ab-gray); font-size: 14px; }
.ab-meta { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; order: 2; }
.ab-meta li, .ab-bar .ab-meta span { display: flex; align-items: center; gap: 8px; color: var(--ink); font: 400 12px/17px var(--sans); }
.ab .ab-summary .big-btn { width: 100%; min-height: 44px; padding: 8px 15px; border-radius: 8px; font: 400 14px/18px var(--sans); }
.ab .ab-summary #buy-pay[data-method="kakaopay"] { background: #fee500; color: #191600; } /* 카카오페이 표시 규정 색 */
.ab .ab-summary #buy-pay[data-method="kakaopay"]:hover:not(:disabled) { background: #f5dc00; }
.ab .pay-consent, .ab .privacy, .ab .assure { margin: 0; padding: 0; color: var(--ab-gray); font-size: 12px; line-height: 17px; }
.ab .privacy summary { display: block; border: 0; color: var(--ab-gray); line-height: 17px; }
.ab .privacy summary u { color: var(--ink); text-underline-offset: 2px; }
.ab .assure a { color: var(--accent); }

/* 결제 완료 · 판매 전 화면: 결제 칸이 숨으면 가운데 카드 하나 */
.ab-boxes { padding: 40px 0 112px; }
.ab-boxes:not(:has(> .done:not([hidden]))) { display: none; }
.ab .done { max-width: 560px; margin: 0 auto; padding: 32px; border-radius: 18px; background: var(--ab-card); box-shadow: none; }
#buy-note:not(:empty) { margin-top: 24px; }

/* buy.js 가 붙이는 모드 — ?book=<코드>: 그 상품만(책 고르기 칸을 감추고 '들어 있는 것'), AI 학습 프리패스: 책 단계 대신 기간 */
.buy-one:not(.buy-pass-checkout) .ab-step--pass, .buy-pass-checkout .ab-step--books { display: none; }
.buy-one .ab .pay-books { display: none; } /* styles.css .buy-one .pay-books 를 위 .ab .pay-books 가 덮지 않게 */
/* 상품 하나만 연 화면: '부터' 값 · 떠 있는 막대 값은 전체 목록용이라 감추고, '포켓북 5권 증정'은 올인원 북일 때만 */
.buy-one :is(.ab-from, .ab-bar-price), .buy-one .ab-eyebrow { display: none; }
.buy-one:not(.buy-simple):has(input[name="book"][value="book"]:checked) .ab-eyebrow { display: block; }
.ab-page .signup { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; } /* styles.css .buy-pass-checkout .signup 카드를 끈다 */
.ab-page #buy-form { display: block; margin: 0; }

/* ── 떠 있는 막대(애플 stickybar): 위 줄 이름 · 값, 아래 줄 받기 안내. 휴대폰 69 + 50, 넓은 화면 51 + 50 ── */
.ab-bar {
  position: fixed; inset: 0 0 auto; z-index: 5; background: var(--paper-hi);
  transform: translateY(-100%); visibility: hidden; transition: transform .3s var(--ab-move), visibility 0s .3s;
}
.ab-bar.is-on { transform: none; visibility: visible; transition: transform .3s var(--ab-move); }
.ab-bar-row { border-bottom: 1px solid var(--ab-hair); }
.ab-bar-main { display: flex; flex-direction: column; justify-content: center; height: 68px; }
.ab-bar-name { color: var(--ink); font: 400 19px/27px var(--sans); }
.ab-bar-price { color: var(--ink); font: 400 12px/19px var(--sans); }
.ab-bar .ab-meta { flex-direction: row; justify-content: flex-end; align-items: center; gap: 16px; height: 49px; margin-inline: auto; } /* .ab-meta 의 margin: 0 이 .ab-in 가운데 맞춤을 덮지 않게 */
.ab-bar .ab-meta span + span { padding-left: 16px; border-left: 1px solid var(--ab-hair); }

@media (min-width: 735px) {
  .ab-step + .ab-step, .ab-summary { margin-top: clamp(76px, 13.5vw, 195px); }
}

@media (min-width: 1069px) {
  .ab-head { flex-direction: row; justify-content: space-between; gap: 24px; padding-top: calc(var(--header) + 35px); }
  .ab-eyebrow { font-size: 17px; line-height: 20px; }
  .ab-head h1 { margin-top: 4px; font-size: 48px; line-height: 57px; }
  .ab-pills { align-items: flex-end; }
  .ab-grid { grid-template-columns: minmax(0, 1fr) 328px; column-gap: 60px; align-items: start; margin-top: 86px; }
  .ab-gallery { position: sticky; top: 111px; } /* 떠 있는 막대(101) 아래 10 */
  .ab-gallery-card { aspect-ratio: 859 / 711; border-radius: 18px; }
  .ab-summary { padding: 39px 0 64px; }
  .ab-summary-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 328px; grid-template-areas: "title price act" "title terms act"; column-gap: 60px; row-gap: 16px; align-items: start; }
  .ab-meta { order: 0; margin-bottom: 14px; }
  .ab-meta li, .ab-bar .ab-meta span { font-size: 14px; line-height: 22px; }
  .ab-bar-main { flex-direction: row; justify-content: space-between; align-items: center; height: 50px; }
  .ab-bar-name { font-size: 21px; line-height: 29px; }
  .ab-bar-price { font-size: 17px; line-height: 27px; }
}

@media (prefers-reduced-motion: reduce) { .ab-bar, .ab-bar.is-on { transition: none; } }

/* ── 간단 결제(/buy/ 기본 = 올인원 북 · 필수 100 책, buy.js .buy-simple — 인스타 제품 링크): 토스 짜임, 두 모양 ──
   ① /buy/ 를 바로 열면 상세 페이지(한 단 480): 이름 · 값 · 구성 숫자 → 그림 → 띠 · 들어 있는 것 → 띠 · 이메일 → 띠 · 결제 수단(신용카드면 휴대폰) → 화면 아래 붙은 결제 단추
   ② 홈 · 전자책 상세의 구입하기 = 결제 팝업(.buy-embed — app.js 가 /buy/?…&embed=1 을 투명 iframe 으로 띄운다): buy.js 가 이름 · 값 · 들어 있는 것 · 이메일을
      결제 칸(.ab-summary) 안으로 옮기고 그 칸이 가운데 팝업이 된다. ② 는 ① 위에 .buy-embed 로 덮어쓴다.
   받기 안내 줄 · 동의 문구 · 결제 금액 줄은 뺐다. 미디어 쿼리 뒤에 두어 넓은 화면 두 단 · 세 칸 짜임을 덮는다 */
.ab-total, .ab-stats, .pay-dim, .pay-sheet-head, .pay-total { display: none; }
.pay-bar { display: contents; } /* 간단 결제에서만 화면(팝업) 아래에 붙는다 */
.buy-simple :is(.ab-bar, .ab-note, .ab-pills, .ab-step-title, .ab-summary-title, .ab-summary-price, .ab-summary .ab-meta, .ab-summary-terms) { display: none; }
.buy-simple .ab-step { margin-top: 0; }

/* 이름 · 값 · 구성 숫자 */
.buy-simple .ab-head h1 { margin: 0; font: 700 24px/32px "Paperlogy Bold", var(--sans); letter-spacing: -.01em; word-break: keep-all; }
.ab-head h1 .nw { white-space: nowrap; } /* 'E-Book' 이 하이픈에서 갈라지지 않게 */
/* 구성 · 특징: 이름 아래 세 줄(줄마다 선 아이콘 하나) — 올인원 북일 때만. 이때 아래 '들어 있는 것' 목록은 같은 말이라 숨긴다 */
.buy-simple:has(input[name="book"][value="book"]:checked) .ab-stats { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.buy-simple:has(input[name="book"][value="book"]:checked) .ab-step--books { display: none; }
.ab-stats li { display: flex; align-items: center; gap: 8px; color: var(--ink); font: 400 14px/20px var(--sans); word-break: keep-all; }
.ab .ab-stats svg { width: 16px; height: 16px; stroke-width: 1.7; color: var(--ab-gray); }
/* 그림을 위로(올인원 북): 그림 칸이 제목 바로 아래에서 시작하고, 구성 세 줄이 칸 왼쪽 위에 겹쳐 얹힌다. 그림은 칸 배경처럼 가로 가운데 아래.
   -88px = 구성 세 줄 높이(20 × 3 + 6 × 2 = 72) + 칸 안쪽 16 — 줄 수를 바꾸면 같이 고친다 */
.buy-simple:has(input[name="book"][value="book"]:checked) .ab-head { position: relative; z-index: 1; }
.buy-simple:has(input[name="book"][value="book"]:checked) .ab-stats { margin-top: 28px; padding-left: 16px; }
.buy-simple:has(input[name="book"][value="book"]:checked) .ab-stats li { text-shadow: 0 0 3px var(--ab-card), 0 0 6px var(--ab-card); } /* 그림 위에 겹친 글이 읽히게 칸 색 테두리 */
.buy-simple:has(input[name="book"][value="book"]:checked) .ab-grid,
.buy-embed .buy-simple:has(input[name="book"][value="book"]:checked) .ab-summary .ab-gallery { margin-top: -88px; }
.buy-simple:has(input[name="book"][value="book"]:checked) .ab-gallery-card { place-items: end center; aspect-ratio: 16 / 10; }
.buy-simple:has(input[name="book"][value="book"]:checked) .ab-gallery-card img { width: 94%; height: calc(100% - 96px); object-position: center bottom; } /* 칸 배경처럼 가로 가운데 · 아래에 붙인다. 높이는 구성 세 줄(88) 아래부터 — 글이 그림에 겹치지 않게 */
@media (max-width: 734px) { .buy-simple:has(input[name="book"][value="book"]:checked) .ab-gallery-card { aspect-ratio: 4 / 3; } } /* 휴대폰은 칸을 높여 글 아래 그림이 너무 작아지지 않게 */

/* 들어 있는 것: 굵은 제목 + 목록 */
.buy-simple .ab .pay-detail { margin: 0; padding: 0; background: none; }
.buy-simple .ab .pay-detail-title { display: none; } /* '…에 들어 있는 것' 제목 없이 목록만 */
.buy-simple .ab .pay-list { margin-top: 0; gap: 14px; }
.buy-simple .ab .pay-list li { font-size: 15px; line-height: 22px; }
.buy-simple .ab .pay-list li::before { top: 8px; }
/* 이모지로 시작하는 한 줄(buy.js .has-ico): 선 아이콘(구성 숫자 줄과 같은 굵기) · 굵은 이름 · 회색 덧말을 짧게 한 줄로(넘치면 덧말만 다음 줄) */
.ab .pay-list li.has-ico { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; padding-left: 0; }
.ab .pay-list li.has-ico::before { display: none; }
.pay-ico { display: grid; place-items: center; width: 22px; height: 22px; color: var(--ink); font-size: 18px; line-height: 1; }
.ab .pay-ico svg { width: 22px; height: 22px; stroke-width: 1.6; }
.ab .pay-list li.has-ico b { color: var(--ink); font: 700 15px/22px "Paperlogy Bold", var(--sans); word-break: keep-all; }
.ab .pay-list li.has-ico small { color: var(--ab-gray); font: 400 13px/22px var(--sans); word-break: keep-all; }

/* 입력칸 · 결제 수단: 회색으로 채우고 테두리 없음. 누르거나 고르면 흰 바탕 + 2px 먹선 */
.buy-simple .ab .email { border-radius: 14px; background: var(--paper-hi); box-shadow: inset 0 0 0 1px var(--faint); transition: box-shadow .2s; } /* 흰 칸 + 회색 테두리 — 눈에 잘 띄게 */
.buy-simple .ab .email:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.buy-simple .ab .email[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.buy-simple .ab .pay-method { min-height: 52px; border-radius: 14px; background: var(--ab-card); box-shadow: none; }
.ab .pay-method svg { flex: none; width: 20px; height: 20px; stroke-width: 1.6; } /* 카드 = 선 아이콘 */
.ab .pay-method .pay-method-logo { stroke: none; border-radius: 5px; } /* 카카오페이 · PayPal = 서비스 표시(채운 그림) */
.buy-simple .ab .pay-method:has(:checked) { background: var(--paper-hi); box-shadow: inset 0 0 0 2px var(--ink); font-family: "Paperlogy Bold", var(--sans); font-weight: 700; }
.buy-simple .ab .big-btn#buy-pay { min-height: 56px; border-radius: 16px; font: 700 17px/24px "Paperlogy Bold", var(--sans); }
.buy-simple .pay-bar { order: 1; display: flex; align-items: center; gap: 16px; } /* 왼쪽 할인 · 오른쪽 결제 단추로 가로로 나눈다. 오류 글은 이 줄 위 */
.buy-simple .pay-bar .big-btn { flex: 1; width: auto; min-width: 0; }
.buy-account-pass .account-pass-action :is(.pay-methods, [data-phone], #buy-phone-hint, .pay-bar) { display: none; }
.ebook-pass-lead, .ebook-pass-hero-art, .ebook-pass-close { display: none; }
.ebook-pass-catalog { margin-bottom: 1rem; }
.ebook-pass-catalog h2 {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .125rem .75rem;
  margin: 0 0 .5rem; font: 700 .9375rem/1.4 "Paperlogy Bold", var(--sans);
}
.ebook-pass-catalog h2 strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.ebook-pass-books {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: .75rem;
  margin: 0; padding: 0; list-style: none;
}
.ebook-pass-books li {
  padding: .25rem 0; border-top: 1px solid var(--rule); font-size: .8125rem; line-height: 1.4;
  word-break: keep-all; overflow-wrap: anywhere;
}
.ebook-pass-total { display: grid; gap: .125rem; margin: 0; }
.ebook-pass-total strong { font: 700 1.375rem/1.25 "Paperlogy Bold", var(--sans); }
.ebook-pass-total del { color: var(--soft); font-size: .8125rem; white-space: nowrap; }
/* 할인(결제 단추 왼쪽, 두 줄): 위 지운 정가(작은 회색) · 아래 할인율(붉고 굵게). 실제 값은 결제 단추 글에 있다. 할인이 없으면 비어 단추가 가로를 다 쓴다 */
.buy-simple .pay-total { display: flex; flex: none; flex-direction: column; align-items: flex-start; margin: 0; white-space: nowrap; }
.buy-simple .pay-total:empty { display: none; }
.pay-total del { color: var(--ab-gray); font: 400 13px/18px var(--sans); }
.pay-total em { color: var(--accent); font: 700 18px/24px "Paperlogy Bold", var(--sans); font-style: normal; }
.pay-total .follow-tag { margin-top: 2px; }
.pay-low { margin-bottom: 3px; padding: 2px 8px; border-radius: 999px; background: var(--learning-accent-text); color: var(--paper-hi); font: 700 12px/16px "Paperlogy Bold", var(--sans); } /* 결제 팝업에서만(buy.js) */

/* ① 상세 페이지(/buy/ 바로 열기) */
.buy-simple .ab-in { max-width: 480px; }
.buy-simple .ab-head { flex-direction: column; gap: 0; padding-top: calc(var(--header) + 24px); }
.buy-simple .ab-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 24px; }
.buy-simple .ab-gallery { position: static; }
.buy-simple .ab-gallery-card { aspect-ratio: 3 / 2; border-radius: 20px; }
.buy-simple .ab-steps { display: grid; gap: 32px; }
.buy-simple .ab-summary { margin-top: 20px; padding: 0 0 32px; background: none; }
.buy-simple .ab-summary-in { grid-template-columns: minmax(0, 1fr); grid-template-areas: "act"; gap: 0; }
/* 구역 띠: 들어 있는 것 · 이메일 · 결제 수단 위에 10px 회색 띠를 화면 끝까지 — box-shadow 로 늘려 가로 스크롤이 생기지 않는다 */
.buy-simple :is(.ab-step--books, .ab-step--email, .ab-summary-in) { position: relative; padding-top: 42px; }
.buy-simple .ab-step--email { padding-top: 28px; } /* 이메일 칸 위는 띠 아래 18 만 */
.buy-simple .ab-summary-in { padding-top: 30px; } /* 결제 수단 위는 띠 아래 20 만 */
.buy-simple :is(.ab-step--books, .ab-step--email, .ab-summary-in)::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 10px; background: var(--ab-card); box-shadow: 0 0 0 100vmax var(--ab-card); clip-path: inset(0 -100vmax);
}
.buy-simple .pay-bar { margin-top: 8px; } /* 결제 단추: 결제 수단 바로 아래(내용이 한 화면이라 화면 아래에 띄우지 않는다 — 띄우면 바닥글이 결제 수단과 단추 사이에 끼었다) */

/* ② 결제 팝업(홈 · 전자책 상세의 구입하기 → 투명 iframe 안 /buy/?…&embed=1): 머리줄 · 바닥글 · 그림 같은 페이지 껍데기는 숨기고 결제 칸만 가운데 카드로.
   딤은 바깥 페이지가 깔고, 이 안 딤(.pay-dim)은 투명한 닫기 자리. 열 때 살짝 커지며 나타나고, 안이 길면 팝업 안에서 굴린다 */
html.buy-embed, .buy-embed body { background: transparent; }
.buy-embed body.buy-simple { padding: 0; }
.buy-embed :is(.top, .foot, .ab-grid, .ab > .ab-head) { display: none; } /* .ab > .ab-head = 팝업으로 옮기기 전 제자리(잠깐 보이지 않게) */
.buy-embed .buy-simple .pay-dim { display: block; position: fixed; inset: 0; z-index: 20; }
html.sheet-open { overflow: hidden; }
.buy-embed .buy-simple .ab-summary {
  position: fixed; left: 50%; top: 50%; z-index: 21; width: min(calc(100% - 32px), 440px); max-height: 88vh; max-height: calc(100dvh - 48px); box-sizing: border-box;
  display: flex; flex-direction: column; margin: 0; padding: 0; overflow: hidden; border-radius: 24px; background: var(--paper-hi); box-shadow: 0 20px 60px rgb(0 0 0 / .2);
  opacity: 0; transform: translate(-50%, -50%) scale(.96); visibility: hidden; transition: opacity .2s, transform .25s cubic-bezier(.2, .8, .2, 1), visibility 0s .25s;
}
.buy-embed.sheet-open .buy-simple .ab-summary { opacity: 1; transform: translate(-50%, -50%); visibility: visible; transition: opacity .2s, transform .25s cubic-bezier(.2, .8, .2, 1); }
.buy-embed .buy-simple .ab-summary:focus { outline: none; }
/* 닫기 버튼은 스크롤 영역의 형제 요소로 두어 카드 모서리에서 터치를 받는다. */
.buy-embed .buy-simple .ab-summary-in { display: block; position: static; width: auto; max-width: none; padding: 20px 20px 0; overflow-y: auto; overscroll-behavior: contain; }
.buy-embed .buy-simple .ab-summary-in::before { content: none; }
.buy-embed .buy-simple .pay-sheet-head { display: block; position: absolute; top: 14px; right: 14px; z-index: 4; }
.buy-embed .buy-simple .pay-sheet-close { display: grid; flex: none; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--rule); border-radius: 50%; background: var(--paper-hi); color: var(--ink); cursor: pointer; touch-action: manipulation; }
.buy-embed .buy-simple .pay-sheet-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
@media (hover: hover) { .buy-embed .buy-simple .pay-sheet-close:hover { background: var(--ab-card); } }
.buy-embed .buy-simple .pay-sheet-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.buy-embed .buy-simple .ab-summary .ab-head { display: block; width: auto; max-width: none; margin: 0; padding: 0; }
.buy-embed .buy-simple .ab-head h1 { padding: 3px 50px 3px 0; font-size: 22px; line-height: 30px; }
.buy-embed .buy-simple:has(input[name="book"][value="book"]:checked) .ab-stats { margin-top: 32px; } /* 제목 아래 16 + 그림 칸 안쪽 16 */
.buy-embed .buy-simple .ab-summary .ab-gallery { margin-top: 16px; }
.buy-embed .buy-simple .ab-summary .ab-gallery-card { aspect-ratio: 16 / 9; border-radius: 16px; }
.buy-embed .buy-simple:has(input[name="book"][value="book"]:checked) .ab-summary .ab-gallery-card { aspect-ratio: 16 / 11; } /* 팝업 그림 칸은 상세 페이지(16 / 10)보다 조금 높게 */
/* 팝업 안 구역 띠: 들어 있는 것 · 결제 입력(이메일부터) 위. 팝업 끝까지 늘리고 팝업이 자른다 */
.buy-embed .buy-simple :is(.ab-step--books, .ab-summary-act) { position: relative; margin-top: 14px; padding-top: 24px; }
.buy-embed .buy-simple :is(.ab-step--books, .ab-summary-act)::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 10px; background: var(--ab-card); box-shadow: 0 0 0 100vmax var(--ab-card); clip-path: inset(0 -100vmax);
}
/* 그림 바로 아래 띠는 없앤다(그림 밑에 베이지 가로줄로 보였다) — 올인원 북은 결제 입력 위 띠, 다른 책은 들어 있는 것 위 띠가 그 자리다 */
.buy-embed .buy-simple .ab-step--books,
.buy-embed .buy-simple:has(input[name="book"][value="book"]:checked) .ab-summary-act { margin-top: 20px; padding-top: 0; }
.buy-embed .buy-simple .ab-step--books::before,
.buy-embed .buy-simple:has(input[name="book"][value="book"]:checked) .ab-summary-act::before { content: none; }
.buy-embed .buy-simple .ab-step--email { padding-top: 0; }
.buy-embed .buy-simple .ab-step--email::before { content: none; }
.buy-embed .buy-simple .pay-methods { margin-top: 8px; }
.buy-embed .buy-simple .pay-bar { position: sticky; inset: auto 0 0; z-index: auto; margin-top: 6px; padding: 12px 0 20px; background: linear-gradient(to bottom, transparent, var(--paper-hi) 12px); } /* 팝업 아래에 붙는다 */

.buy-embed :is(.buy-study-sheet, .buy-year-sheet) .ab-summary { max-height: calc(100dvh - 24px); } /* 최소 높이를 두면 내용 가운데가 비었다(12-04) */
.buy-embed :is(.buy-study-sheet, .buy-year-sheet) .ab-summary-in {
  display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 0 20px 20px;
}
.buy-embed :is(.buy-study-sheet, .buy-year-sheet) .ab-summary-in > * { flex-shrink: 0; }
.buy-embed :is(.buy-study-sheet, .buy-year-sheet) .pay-sheet-head {
  position: relative; inset: auto; display: flex; flex: none; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 14px 8px 20px;
}
.buy-embed :is(.buy-study-sheet, .buy-year-sheet) .ab-head h1 { padding: 0; font: 700 clamp(20px, 6vw, 24px)/1.25 "Paperlogy Bold", var(--sans); letter-spacing: -.045em; text-wrap: balance; }
.buy-study-sheet .ab .pay-plans { margin-top: 0; }
.buy-year-sheet .study-plan-summary { margin-bottom: 0; }
.buy-embed :is(.buy-study-sheet, .buy-year-sheet) .ab-summary-act { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rule); }
.buy-embed :is(.buy-study-sheet, .buy-year-sheet) .pay-methods { margin-top: 0; }
.buy-embed :is(.buy-study-sheet, .buy-year-sheet) .ab-summary-act::before { content: none; }
.buy-embed :is(.buy-study-sheet, .buy-year-sheet) .pay-bar { margin-top: 0; padding: 6px 0 0; } /* 결제 단추 위 16 */
.buy-embed :is(.buy-study-sheet, .buy-year-sheet) #buy-msg:empty { display: none; }
:is(.buy-study-sheet, .buy-year-sheet) .ab .pay-plan-note { /* 카드 아래 작은 한 줄 — 눈에 띄는 띠로 두지 않는다(12-03 팝업 정리) */
  align-self: center; margin: 10px 0 0; color: var(--soft); font: 600 12px/1.4 var(--sans);
}
:is(.buy-study-sheet, .buy-year-sheet) :is(#buy-pay, [data-pass-login]) {
  font: 700 clamp(17px, 5.1vw, 21px)/1.3 "Paperlogy Bold", var(--sans);
}
/* 카톡 · 유튜브 결제 팝업의 기간 카드(12-03 정리): 기간 · 값 · 할인 세 줄, 고르기 동그라미는 오른쪽 위 */
.buy-study-sheet .video-pass-cards {
  grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px;
}
.buy-study-sheet .video-pass-card {
  position: relative; grid-template-columns: minmax(0, 1fr); justify-items: start; align-content: start; min-height: 0; gap: 4px;
  padding: 12px 10px 11px; border: 1px solid #e3dfec; border-radius: 14px; background: #fff;
  transition: border-color .15s, background-color .15s;
}
@media (hover: hover) { .buy-study-sheet .video-pass-card:hover { border-color: #b7abdc; } }
.buy-study-sheet .video-pass-card:has(:checked) { border-color: #6452aa; box-shadow: inset 0 0 0 1px #6452aa; background: #f4f1fd; }
.buy-study-sheet .video-pass-card input { position: absolute; grid-area: auto; top: 10px; right: 10px; width: 14px; height: 14px; margin: 0; accent-color: #6452aa; }
.buy-study-sheet .video-pass-period {
  grid-area: auto; padding-right: 18px; font: 700 clamp(13px, 3.8vw, 15px)/1.2 "Paperlogy Bold", var(--sans);
  word-break: keep-all; overflow-wrap: anywhere;
}
.buy-study-sheet .video-pass-price {
  grid-area: auto; margin: 0; color: var(--ink); font: 700 clamp(14px, 4.2vw, 17px)/1.2 var(--sans);
  letter-spacing: -.02em; white-space: nowrap;
}
.buy-study-sheet .video-pass-discount {
  grid-area: auto; margin: 0; padding: 2px 6px; border-radius: 6px; color: #4b377f; background: #eeebfa;
  font-size: 11px; font-weight: 800; line-height: 1.3; white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) { .buy-study-sheet .video-pass-card { transition: none; } }

.study-plan-summary {
  --plan-edge: clamp(10px, 4vw, 20px);
  overflow: hidden; margin-bottom: 10px; border: 1px solid #dfdbee; border-radius: 16px;
  color: #27213d; background: #f8f7fc;
}
.study-plan-summary.is-premium { background: #f8f6fc; }
.study-plan-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px 8px; padding-block: 14px;
  padding-inline: var(--plan-edge);
}
.study-plan-copy { display: contents; }
.study-plan-service-icons { display: flex; grid-area: 1 / 2; gap: 4px; }
.is-all-pass .study-plan-intro {
  position: relative; grid-template-columns: minmax(0, 1fr) 32%; align-content: center;
  min-height: 108px; background: #fffdf6;
}
.is-all-pass .study-plan-feature { grid-column: 1; }
.is-all-pass .study-plan-service-icons { position: absolute; grid-area: auto; inset: 0 1% 0 auto; width: 34%; display: grid; place-items: center; }
.study-plan-service-icons .allpass-bundle-art { width: min(100%, 104px); height: auto; }
.study-plan-title {
  grid-area: 1 / 1; align-self: center;
  font: 700 clamp(16px, 5.2vw, 24px)/1.2 "Paperlogy Bold", var(--sans);
  letter-spacing: -.04em; text-wrap: balance; word-break: keep-all;
}
.study-plan-title b { display: inline-block; padding: 2px 5px; border-radius: 6px; color: #473582; background: #eee9fa; font-size: .67em; white-space: nowrap; }
.buy-year-sheet .study-plan-title > span { display: none; }
.buy-year-sheet .study-plan-title b { font-size: .875rem; }
.study-plan-feature { grid-area: 2 / 1 / 3 / -1; color: #514860; font-size: clamp(13px, 3.6vw, 14px); font-weight: 650; line-height: 1.35; word-break: keep-all; text-wrap: balance; }
.study-plan-pricing { padding: 0 var(--plan-edge) 14px; }
.study-plan-summary.is-premium .study-plan-pricing { padding-block: 12px 14px; border-top: 1px solid #e8e2f1; }
.study-year-daily { font-size: 13px; font-weight: 700; text-wrap: balance; }
.study-year-daily strong {
  font: 700 clamp(17px, 5vw, 20px)/1.2 "Paperlogy Bold", var(--sans); letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.study-year-comparison { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; margin-top: 4px; }
.study-year-basis { margin-top: 4px; color: #615970; font-size: .75rem; }
.study-year-reference {
  color: #615970; font-size: .8125rem; font-weight: 700; line-height: 1.15; white-space: nowrap;
}
.study-year-off {
  padding: 2px 6px; border-radius: 6px; color: #4b377f; background: #eeebfa;
  font-size: 12px; font-weight: 800; line-height: 1.25; white-space: nowrap;
}
.study-year-price {
  font: 700 clamp(13px, 3.8vw, 16px)/1.2 "Paperlogy Bold", var(--sans);
  letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.year-checkout-pricing {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px;
  margin-bottom: 14px; padding: 12px 15px; border: 1px solid #dfdbfc; border-radius: 14px; color: #2c215f; background: #f1efff;
}
.year-checkout-total { font-size: .9375rem; font-weight: 700; }

/* 전자책 이용권 상세: 표지, 본문 미리보기, 도서 목록과 고정 결제 영역. */
.buy-simple.buy-ebook-pass {
  --pass-width: 64rem;
  --pass-dock-width: 43rem;
  --pass-blue: #402bd7;
  --pass-blue-hover: #3220ae;
  --pass-ink: #221941;
  --pass-muted: #524965;
  --pass-line: #e1dcf3;
  --pass-pale: #efebff;
  --pass-canvas: #f8f6ff;
  --pass-lime: #e7f978;
  --pass-radius: clamp(1.125rem, 3vw, 1.875rem);
  color: var(--pass-ink);
  background: var(--pass-canvas);
  padding-bottom: var(--pass-dock-height, calc(9rem + env(safe-area-inset-bottom)));
  & .foot { display: none; }
  & .ab-in { width: min(calc(100% - 2rem), var(--pass-width)); max-width: none; }
  & .ab-summary-in { max-width: var(--pass-dock-width); }
  & .top {
    position: fixed; z-index: 9;
    padding-inline: max(1rem, calc((100% - var(--pass-width)) / 2));
    border-bottom: 1px solid var(--pass-line); background: white;
  }
  & .top :is(nav, .dev-palette-trigger) { display: none; }
  & .ebook-pass-close {
    display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--pass-line);
    border-radius: 50%; background: white; color: var(--pass-ink); font: 400 1.625rem/1 var(--sans);
  }
  & .ebook-pass-close:hover { background: var(--pass-pale); color: var(--pass-blue); }
  & .ab-head {
    display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: clamp(.5rem, 2vw, 1.125rem);
    margin-top: calc(var(--header) + .875rem);
    padding: clamp(1.75rem, 5.75vw, 4rem) .75rem clamp(.875rem, 2.8vw, 1.625rem);
    overflow: hidden; border-radius: var(--pass-radius); text-align: center;
    color: #fff;
    background: var(--pass-blue);
  }
  & .ab-head h1 {
    color: inherit; font-size: clamp(2rem, 6.8vw, 4.75rem); line-height: 1.04; letter-spacing: -.065em; text-wrap: balance;
  }
  & .ebook-pass-lead { display: block; margin-top: .8rem; color: #eef0ff; font-size: clamp(.9rem, 2.4vw, 1.25rem); }
  & .ebook-pass-pricing {
    display: grid; justify-items: center; gap: .375rem; margin-top: clamp(1rem, 2.5vw, 1.5rem);
    font-variant-numeric: tabular-nums;
  }
  & :is(.ebook-pass-hero-list, .ebook-pass-hero-sale) { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .25rem .5rem; }
  & .ebook-pass-hero-list { color: #eef0ff; font-size: .875rem; }
  & .ebook-pass-hero-list del { font-size: 1rem; font-weight: 700; }
  & .ebook-pass-hero-sale { color: white; font-size: .875rem; }
  & #ebook-pass-hero-sale { font: 700 clamp(1.625rem, 5.1vw, 2.5rem)/1.05 "Paperlogy Bold", var(--sans); letter-spacing: -.04em; }
  & .ebook-pass-discount {
    align-self: center; padding: .3rem .5rem; border-radius: .45rem;
    background: var(--pass-lime); color: var(--pass-ink); font-size: .75rem; white-space: nowrap;
  }
  & .ab-head .ab-gallery { width: 100%; }
  & .ab-grid { gap: 0; margin-top: clamp(1.5rem, 5vw, 3.25rem); }
  & .ab-steps { grid-template-columns: minmax(0, 1fr); }
  & .ab-gallery-card { aspect-ratio: auto; overflow: visible; background: radial-gradient(ellipse at 55% 55%, #9683ff80, transparent 68%); }
  & #pay-art { display: none; }
  & .ab-gallery-card .ebook-pass-hero-art {
    display: block; width: min(100%, 39rem); height: auto; object-fit: contain; mix-blend-mode: normal;
    filter: drop-shadow(0 .875rem 1.125rem rgb(16 23 95 / .28));
  }
  & :is(.ab-step--books, .ab-summary-in) { padding-top: 0; }
  & :is(.ab-step--books, .ab-summary-in)::before { content: none; }
  & .ebook-pass-intro {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1rem, 2.8vw, 1.75rem);
    margin-bottom: clamp(2rem, 6vw, 4rem);
  }
  & :is(.ebook-pass-intro-head, .ebook-pass-word-head, .ebook-pass-catalog-head) {
    display: flex; justify-content: space-between; align-items: center; gap: .625rem;
  }
  & .ebook-pass-intro-head {
    grid-column: 1 / -1; padding: .25rem clamp(.875rem, 4.5vw, 3rem);
    border-radius: var(--pass-radius); background: linear-gradient(122deg, #ded7ff, #f4f0ff);
  }
  & .ebook-pass-intro h2 {
    margin: 0; font: 700 clamp(1.625rem, 4.25vw, 2.875rem)/1.12 "Paperlogy Bold", var(--sans); letter-spacing: -.045em;
    text-wrap: balance;
  }
  & .ebook-pass-section-art {
    display: block; flex: none; width: var(--section-art-width, clamp(5.5rem, 15vw, 10rem)); height: auto;
    filter: drop-shadow(0 .5rem .6rem rgb(34 25 65 / .18));
  }
  & .ebook-pass-edition {
    --edition-stage: #ebefff;
    --edition-light: #fbfcff;
    --edition-muted: var(--pass-muted);
    --edition-accent: var(--pass-blue);
    display: grid; grid-template-columns: minmax(0, 1fr); align-content: start;
    gap: clamp(.75rem, 2vw, 1.25rem); padding: clamp(.875rem, 2.6vw, 1.625rem);
    border: 1px solid var(--pass-line); border-radius: var(--pass-radius);
    background: white; box-shadow: 0 .375rem 1rem rgb(33 47 111 / .05);
  }
  & .ebook-pass-edition--lead, & .ebook-pass-edition--ielts { grid-column: 1 / -1; }
  & .ebook-pass-edition--lead {
    --edition-stage: #d4c8ff; --edition-light: #f5f0ff;
  }
  & .ebook-pass-edition--pattern { --edition-stage: #f5dac7; --edition-light: #fff7ef; }
  & .ebook-pass-edition--pocket { --edition-stage: #cfe9dc; --edition-light: #f3faf4; }
  & .ebook-pass-edition--travel { --edition-stage: #d7e7fa; --edition-light: #f5faff; }
  & .ebook-pass-edition--expressions { --edition-stage: #e8ddf6; --edition-light: #fcf6ff; }
  & .ebook-pass-edition--ielts {
    --edition-stage: #4739a4; --edition-light: #ae9dff;
    --edition-muted: #e6defc; --edition-accent: #d9cbff;
    border-color: #392976; color: white;
    background: #261c58;
  }
  & .ebook-pass-edition header { display: grid; align-content: start; gap: .4375rem; min-width: 0; }
  & .ebook-pass-edition h3 {
    margin: 0; color: inherit;
    font: 700 clamp(1.375rem, 3.5vw, 2rem)/1.14 "Paperlogy Bold", var(--sans); letter-spacing: -.045em;
    text-wrap: balance;
  }
  & .ebook-pass-edition-spec { color: var(--edition-accent); font-size: .875rem; font-weight: 700; font-variant-numeric: tabular-nums; }
  & .ebook-pass-edition-copy { color: var(--edition-muted); font-size: .9375rem; line-height: 1.55; text-wrap: pretty; }
  & .ebook-pass-edition header .ebook-pass-edition-copy { margin-top: .375rem; }
  & .ebook-pass-spread {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center;
    gap: .5rem; align-content: center; padding: .625rem .5rem .875rem;
    border-radius: clamp(.875rem, 2.5vw, 1.25rem);
    background: radial-gradient(ellipse at 40% 24%, var(--edition-light), transparent 72%), var(--edition-stage);
  }
  & .ebook-pass-spread a { display: grid; justify-items: center; border-radius: .375rem; cursor: zoom-in; }
  & .ebook-pass-spread img {
    display: block; width: auto; height: auto; max-width: 100%; max-height: 30rem;
    border-radius: .3125rem; box-shadow: 0 .75rem 1.875rem rgb(25 32 60 / .23);
  }
  & .ebook-pass-spread:has(> .ebook-pass-stage) { grid-auto-flow: row; }
  & .ebook-pass-stage {
    position: relative; isolation: isolate; display: grid; justify-items: center; min-width: 0;
    padding: .875rem clamp(.625rem, 3vw, 2.125rem) .75rem;
  }
  & .ebook-pass-stage .ebook-pass-backpage {
    position: absolute; z-index: -1; left: 50%; top: 49%; height: 82%; max-width: 74%;
    object-fit: contain; opacity: .8; transform: translate(-37%, -50%) rotate(9deg);
    pointer-events: none; transition: transform .35s ease;
  }
  & .ebook-pass-stage:hover .ebook-pass-backpage { transform: translate(-33%, -50%) rotate(12deg); }
  & .ebook-pass-page { max-width: 100%; }
  & .ebook-pass-page img { max-height: 38rem; }
  & .ebook-pass-thumbnails { display: flex; justify-content: center; align-items: start; gap: .5rem; }
  & .ebook-pass-thumbnails button {
    width: clamp(2.75rem, 8vw, 3.375rem); padding: .1875rem; border: 1px solid rgb(255 255 255 / .8);
    border-radius: .5rem; background: rgb(255 255 255 / .68); cursor: pointer;
  }
  & .ebook-pass-thumbnails button[aria-pressed="true"] {
    border-color: var(--edition-accent); box-shadow: 0 0 0 2px var(--edition-accent);
  }
  & .ebook-pass-thumbnails img { width: 100%; border-radius: .3125rem; box-shadow: none; }
  & .ebook-pass-word-sheet {
    grid-column: 1 / -1; min-width: 0; margin-top: .5rem;
    padding: clamp(.75rem, 2.5vw, 1.375rem);
    border-radius: 1rem; background: white; color: var(--pass-ink);
  }
  & .ebook-pass-word-head {
    --section-art-width: clamp(3.5rem, 8vw, 5.25rem);
    padding-inline: .125rem; margin-bottom: .625rem;
  }
  & .ebook-pass-word-sheet h4 {
    margin: 0; font: 700 clamp(1.125rem, 3vw, 1.5rem)/1.3 "Paperlogy Bold", var(--sans);
  }
  & .ebook-pass-word-scroll {
    max-height: min(21rem, 55vh); overflow: auto; border: 1px solid var(--pass-line);
    border-radius: .625rem; background: white; scrollbar-width: thin;
  }
  & .ebook-pass-word-scroll table {
    width: 100%; min-width: 36rem; border-collapse: separate; border-spacing: 0;
    font-size: .8125rem; line-height: 1.4;
  }
  & .ebook-pass-word-scroll :is(th, td) {
    padding: .5rem .625rem; border-right: 1px solid var(--pass-line); border-bottom: 1px solid var(--pass-line);
    text-align: left; white-space: nowrap;
  }
  & .ebook-pass-word-scroll tr > :last-child { border-right: 0; }
  & .ebook-pass-word-scroll thead th {
    position: sticky; top: 0; z-index: 2; background: var(--pass-blue); color: white;
  }
  & .ebook-pass-word-scroll tr > th:first-child { inset-inline-start: 0; width: 2.5rem; text-align: center; }
  & .ebook-pass-word-scroll thead th:first-child { z-index: 3; }
  & .ebook-pass-word-scroll tbody th {
    position: sticky; z-index: 1; background: var(--pass-pale); color: var(--pass-muted); font-variant-numeric: tabular-nums;
  }
  & .ebook-pass-word-scroll tbody tr:nth-child(even) td { background: var(--pass-canvas); }
  & .ebook-pass-catalog {
    padding: clamp(1rem, 3.8vw, 2rem);
    border: 1px solid var(--pass-line); border-radius: var(--pass-radius);
    background: white; box-shadow: 0 .375rem 1rem rgb(33 47 111 / .05);
  }
  & .ebook-pass-catalog-head {
    --section-art-width: clamp(4.75rem, 12vw, 7.5rem);
    margin-bottom: .875rem; padding: .375rem clamp(.875rem, 3vw, 1.625rem);
    border-radius: 1rem; background: var(--pass-pale);
  }
  & .ebook-pass-catalog h2 {
    justify-content: start; margin: 0;
    font: 700 clamp(1.5rem, 3.8vw, 2.125rem)/1.2 "Paperlogy Bold", var(--sans); letter-spacing: -.035em;
  }
  & .ebook-pass-catalog h2 strong {
    padding: .375rem .625rem; border-radius: 999px; background: var(--pass-lime); color: var(--pass-ink);
    font-size: .875rem; line-height: 1.15; letter-spacing: normal;
  }
  & .ebook-pass-books {
    gap: 1px; padding: 1px; border-radius: .875rem; overflow: hidden; background: var(--pass-line);
  }
  & .ebook-pass-books li {
    display: flex; align-items: center; min-height: 2.875rem;
    padding: .5rem clamp(.625rem, 2vw, 1rem); border: 0; background: var(--pass-canvas); font-size: .875rem;
  }
  & .ebook-pass-dock {
    position: fixed; inset: auto 0 0; z-index: 15;
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .5rem clamp(.875rem, 3vw, 1.5rem);
    padding: .75rem max(1rem, calc((100% - var(--pass-dock-width)) / 2)) calc(.75rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--pass-line); background: rgb(255 255 255 / .96);
    box-shadow: 0 -.625rem 1.75rem rgb(33 47 111 / .1); backdrop-filter: blur(14px);
  }
  & .ebook-pass-dock[hidden], & .ebook-pass-dock .pay-total { display: none; }
  & .ebook-pass-dock :is(.pay-methods, #buy-msg) { grid-column: 1 / -1; }
  & .ebook-pass-dock .pay-method {
    min-height: 2.75rem; border-radius: .625rem; background: white; box-shadow: inset 0 0 0 1px var(--pass-line);
    font-size: .8125rem; line-height: 1.25;
  }
  & .ebook-pass-dock .pay-method:has(:checked) {
    background: var(--pass-pale);
    box-shadow: inset 0 0 0 2px var(--pass-blue);
  }
  & .ebook-pass-total strong { font-size: clamp(1.375rem, 4vw, 1.75rem); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
  & .ebook-pass-total del { color: var(--pass-muted); }
  & .ebook-pass-dock .pay-bar { margin: 0; }
  & .ebook-pass-dock .big-btn {
    min-height: 3.25rem; border-radius: .875rem; background: var(--pass-blue); color: white;
    font: 700 1rem/1.25 "Paperlogy Bold", var(--sans);
  }
  & .ebook-pass-dock .big-btn:hover:not(:disabled) { background: var(--pass-blue-hover); }
  & :is(.ebook-pass-close, .ebook-pass-page, .ebook-pass-thumbnails button, .ebook-pass-word-scroll):focus-visible {
    outline: 2px solid var(--edition-accent, var(--pass-blue)); outline-offset: 3px;
  }
}
@media (min-width: 45rem) {
  .buy-simple.buy-ebook-pass {
    & .ab-head {
      grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center;
      padding: clamp(1.625rem, 5vw, 4rem); text-align: left;
    }
    & .ab-head-copy { justify-self: start; }
    & .ebook-pass-pricing { justify-items: start; }
    & :is(.ebook-pass-hero-list, .ebook-pass-hero-sale) { justify-content: start; }
    & .ab-head h1 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); }
    & .ebook-pass-intro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    & :is(.ebook-pass-edition--lead, .ebook-pass-edition--ielts) {
      grid-template-columns: minmax(0, .72fr) minmax(0, 1fr); align-items: center;
    }
    & :is(.ebook-pass-edition--lead, .ebook-pass-edition--ielts) h3 {
      font-size: clamp(2rem, 4.05vw, 3.375rem);
    }
    & .ebook-pass-edition:not(.ebook-pass-edition--lead, .ebook-pass-edition--ielts) {
      grid-template-rows: auto 1fr minmax(3rem, auto);
    }
    & .ebook-pass-edition:not(.ebook-pass-edition--lead, .ebook-pass-edition--ielts) .ebook-pass-page img {
      max-height: 28rem;
    }
    & .ebook-pass-edition--ielts header { order: 1; }
    & .ebook-pass-edition--ielts { grid-template-columns: minmax(0, 1fr) minmax(0, .72fr); }
    & .ebook-pass-edition--ielts .ebook-pass-word-sheet { order: 2; }
    & .ebook-pass-books { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
}
@media (prefers-reduced-motion: reduce) { .buy-ebook-pass .ebook-pass-stage .ebook-pass-backpage { transition: none; } }
@media (prefers-reduced-motion: reduce) { .buy-embed .buy-simple .ab-summary, .buy-embed.sheet-open .buy-simple .ab-summary { transition: none; } }
/* 입력 안내 글(이메일 · 휴대폰 칸 아래): 위 여백 조금 + 왼쪽 안내(i) 선 아이콘 — 아이콘은 글 색을 따라 오류면 붉어진다 */
.buy-simple .ab .field-float + .field-hint { display: flex; align-items: flex-start; gap: 6px; margin-top: -4px; } /* 칸 아래 6(줄 간격 10 안에서) */
.buy-simple .ab .field-float + .field-hint::before {
  content: ""; flex: none; width: 15px; height: 15px; margin-top: 2px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* 이메일 안내는 칸 안 라벨 옆에 작은 회색 글로(.field-sub). 누르거나 쓰면 라벨이 올라가며 사라진다. 칸 아래 줄(#buy-email-hint)은 오류 · 오타 고치기 때만 보인다 */
.ab .field-sub { margin-left: 8px; color: var(--faint); font-size: 14px; transition: opacity .15s; }
.ab .field-float:has(.email:focus, .email:not(:placeholder-shown)) .field-sub { opacity: 0; }
.ab .field-hint:empty, .buy-simple .ab .field-float + .field-hint:empty { display: none; }
/* 이메일 칸은 뺀다(선택이라 받지 않는다) — 다시 받기는 결제한 브라우저가 기억한 받기 목록(buy.js voca-refs)으로. 얼리버드 링크 이메일은 숨은 칸에 그대로 실린다 */
.ab-step--email { display: none; } /* 이메일은 받지 않는다(모든 결제 화면). 얼리버드 링크로 오면 그 메일만 숨은 칸에 채워 보낸다(buy.js offer.email) */
.buy-simple:has(input[name="book"][value="book"]:checked) .ab-grid { gap: 0; } /* 올인원 북은 그림 아래 목록 · 이메일 칸이 없어 빈 칸 간격을 없앤다 */

/* IELTS 결제 팝업에는 낱권 표지를 한 줄에 담는다. 낱권을 고르면 그 표지만 밝게. 간격은 8px 단위로 넉넉히(12-04 '너무 오밀조밀') */
.ab-ielts-covers { display: none; }
.ab-ielts-covers img.is-off { opacity: .3; }
/* IELTS 개별 구매 고르기(scripts/ielts_page.py purchase_choice): 목표 점수 4칸 → 표지 여섯 권(누르면 한 권만). 고른 책 표지만 밝다(buy.js). 값은 buy.js 가 서버 값으로 채운다. 6권 구매로 오면 이 칸은 숨는다 */
.ab .ielts-pick { display: grid; gap: 24px; min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.ab .ielts-pick[hidden] { display: none; }
.ab .ielts-pick-group { display: grid; gap: 10px; min-width: 0; }
.ab .ielts-pick-label { display: flex; justify-content: space-between; align-items: baseline; margin: 0; color: var(--ab-gray); font-size: 14px; line-height: 20px; }
.ab .ielts-pick-label span { color: var(--ink); font-weight: 700; }
.ab .ielts-pick-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.ab .ielts-pick .pay-plan { gap: 0; min-height: 50px; padding: 4px 2px; align-items: center; justify-content: center; border-radius: 12px; cursor: pointer; }
.ab .ielts-pick .pay-plan:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ab .ielts-pick .pay-plan b { font-size: 15px; line-height: 20px; }
.ab .ielts-pick .ielts-cover { padding: 0; min-height: 0; border-radius: 4px; background: none; box-shadow: none; }
.ab .ielts-pick .ielts-cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; border-radius: 4px; box-shadow: 0 2px 4px rgb(34 27 17 / .16); transition: opacity .2s; }
.ab .ielts-pick .ielts-cover img.is-off { opacity: .32; }
.ab .ielts-pick .ielts-cover:has(:checked) { box-shadow: none; }
.ab .ielts-pick .ielts-cover:has(:checked) img { outline: 2px solid var(--ink); outline-offset: 2px; }
.ab .ielts-pick-group:has(.ielts-cover) .ielts-pick-row { gap: 10px; }
.buy-embed .buy-simple:has(.ielts-pick:not([hidden])) .ab-summary .ab-gallery { display: none; } /* 개별 구매: 고르기 칸의 표지가 위 표지 줄을 대신한다 */
.buy-embed .buy-simple:has(input[data-ielts]:checked) {
  & .ab-summary-in { padding: 24px 20px 0; }
  & .pay-sheet-head { top: 12px; right: 12px; }
  & .ab-head h1 { font-size: 22px; line-height: 30px; }
  & .ab-summary .ab-gallery { margin-top: 16px; }
  & .ab-summary .ab-gallery-card {
    aspect-ratio: auto; padding: 14px; border: 1px solid #e8e2d9; border-radius: 12px; background: #f6f2ea;
  }
  & #pay-art { display: none; }
  & .ab-ielts-covers {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(4px, 1.4vw, 8px);
    width: 100%; max-width: 366px; align-items: start;
  }
  & .ab-ielts-covers img {
    display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: contain;
    mix-blend-mode: normal; border-radius: 2px; box-shadow: 0 2px 4px rgb(34 27 17 / .16);
  }
  & .ab-step--books { margin-top: 24px; }
  & .ab .pay-list { gap: 8px; }
  & .ab .pay-list li { font-size: 14px; line-height: 22px; }
  & .ab-summary-act { margin-top: 24px; padding-top: 20px; gap: 12px; border-top: 1px solid #e8e2d9; }
  & .ab-summary-act::before { content: none; }
  & .pay-methods { margin-top: 0; }
  & .ab .pay-method { min-height: 50px; }
  & .pay-bar { gap: 12px; padding: 14px 0 22px; }
  & .ab .big-btn#buy-pay { min-height: 54px; padding-inline: 8px; font-size: 16px; white-space: nowrap; }
}

/* 12-03 전자책 이용권 화면 줄이기(/buy/?book=ebooklifetime): 머리줄(로고 띠)을 없애고 닫기(×)만 오른쪽 위에 떠 있게 · 첫 파란 칸 높이를 줄인다 ·
   '책 속 미리보기' 띠는 글을 숨기고 3D 아이콘만(제목은 읽기 도구에 남는다) · 기존 구매액 차감은 작은 한 줄(누르면 흰 칸으로 펼침) */
.buy-simple.buy-ebook-pass {
  & .top { display: contents; }
  & .top .logo { display: none; }
  & .ebook-pass-close {
    position: fixed; z-index: 30; top: max(.5rem, env(safe-area-inset-top)); right: max(.5rem, calc((100% - var(--pass-width)) / 2 - 3.5rem));
    border-color: rgb(255 255 255 / .6); background: rgb(255 255 255 / .92); box-shadow: 0 .25rem .875rem rgb(25 18 80 / .18);
    backdrop-filter: blur(10px);
  }
  & .ab-head { margin-top: .75rem; padding: clamp(1.25rem, 4vw, 2.25rem) .75rem clamp(.5rem, 2vw, 1rem); gap: clamp(.375rem, 1.5vw, .75rem); }
  & .ab-head h1 { font-size: clamp(1.875rem, 6.4vw, 3.5rem); }
  & .ebook-pass-lead { margin-top: .5rem; }
  & .ebook-pass-pricing { margin-top: clamp(.75rem, 2vw, 1rem); }
  & .ab-gallery-card .ebook-pass-hero-art { width: min(64%, 17rem); }
  & .ebook-pass-intro-head { justify-content: center; padding: 0; background: none; }
  & .ebook-pass-intro-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  & .ebook-pass-intro-head .ebook-pass-section-art { --section-art-width: clamp(4rem, 11vw, 6rem); }
}
@media (min-width: 45rem) {
  .buy-simple.buy-ebook-pass {
    & .ab-head { padding: clamp(1.25rem, 3.5vw, 2.5rem) clamp(1.5rem, 4vw, 3rem); }
    & .ab-head h1 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); }
    & .ab-gallery-card .ebook-pass-hero-art { width: min(100%, 26rem); }
  }
}

/* 12-03 홈 · 북리스트에서 누른 전자책 평생 무제한(?pop= — app.js 가 화면 가득 투명 iframe 으로 띄운다): 이용권 화면 전체 대신 가운데 작은 팝업(결제 팝업과 같은 폭 · 둥글기 · 그림자).
   파란 머리(제목 · 값 · 그림) → 기존 구매액 차감 한 줄 → 결제만. 책 속 미리보기 · 현재 도서 목록은 싣지 않는다(12-03 사용자 지정: 심플하게) */
html.buy-pop { background: transparent; }
.buy-pop body.buy-ebook-pass {
  display: grid; place-items: center; min-height: 100dvh; padding: 24px 16px; background: transparent;
  & main.ab {
    width: min(100%, 440px); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
    padding: 8px 8px 0; border-radius: 24px; background: white; box-shadow: 0 20px 60px rgb(0 0 0 / .2);
    animation: buy-pop-in .25s cubic-bezier(.2, .8, .2, 1);
  }
  & .ab-in { width: 100%; }
  & .ebook-pass-close { position: sticky; top: 8px; right: auto; z-index: 5; margin: 8px 8px -52px auto; }
  & .ab-head {
    grid-template-columns: minmax(0, 1fr) 6rem; align-items: end; justify-items: start; gap: .5rem;
    margin: 0; padding: 1.25rem 1rem 1.125rem 1.25rem; border-radius: 18px; text-align: left;
  }
  & .ab-head-copy { justify-self: start; min-width: 0; }
  & .ab-head h1 { font-size: 1.75rem; line-height: 1.12; letter-spacing: -.05em; }
  & .ebook-pass-lead { margin-top: .25rem; font-size: .875rem; }
  & .ebook-pass-pricing { justify-items: start; gap: .125rem; margin-top: .75rem; }
  & :is(.ebook-pass-hero-list, .ebook-pass-hero-sale) { justify-content: start; }
  & #ebook-pass-hero-sale { font-size: 1.75rem; }
  & .ab-head .ab-gallery { width: 6rem; }
  & .ab-gallery-card .ebook-pass-hero-art { width: 100%; }
  & .ab-grid { display: none; } /* 책 속 미리보기 · 현재 도서 — 결제 칸(form 안 radio)은 숨겨도 그대로 실린다 */
  & .ab-summary { margin: 0; padding: 0; }
  & .ab-summary-in { padding: 0; }
  & [data-phone] { margin-top: 12px; } /* 카드 결제 휴대폰 칸: 파란 머리와 붙지 않게 */
  & .ebook-pass-dock {
    position: static; margin: 4px -8px 0; padding: 12px 16px 16px;
    border-top: 1px solid var(--pass-line); background: white; box-shadow: none; backdrop-filter: none;
  }
}
@keyframes buy-pop-in { from { opacity: 0; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { .buy-pop body.buy-ebook-pass main.ab { animation: none; } }

/* 프리미엄 · All Pass 결제: 30일 안에 낸 값 빼기 한 줄(buy.js #buy-credit) · 결제 완료의 바꾸기 안내(#done-upgrade) */
.pay-credit { margin: 0; color: #4b377f; font: 700 13px/1.45 var(--sans); }
.pay-credit a, .done-upgrade a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.done-upgrade { margin-top: 14px; padding: 10px 12px; border-radius: 10px; color: #3b2d72; background: #f1efff; font-size: 14px; line-height: 1.6; text-align: left; text-wrap: pretty; } /* .assure 를 쓰지 않는다 — buy.js 가 이용권 결제 뒤 첫 .assure(도서 앱 안내)를 숨긴다 */
