/* training.css — 훈련자료집 판매 쪽
   디자인: claude.ai/design 「훈련자료집 홍보 페이지」
   색·여백·속도는 모두 토큰으로 둔다. 값을 본문에 되풀이해 박지 않는다. */

:root {
  --tr-bg:        oklch(97.5% 0.008 90);
  --tr-surface:   #fdfcf8;
  --tr-card:      oklch(98.5% 0.006 90);
  --tr-ink:       oklch(30% 0.10 264);
  --tr-link:      oklch(40% 0.15 264);
  --tr-gold:      oklch(86% 0.14 88);
  --tr-text:      #23252b;
  --tr-text-2:    #3a3d47;
  --tr-muted:     #5d6070;
  --tr-line:      oklch(90% 0.01 264);
  --tr-line-2:    oklch(85% 0.01 264);
  --tr-danger:    oklch(50% 0.18 25);
  --tr-on-ink:    #fbfaf5;
  --tr-shadow:    0 1px 2px rgba(0,0,0,.08), 0 18px 40px rgba(30,30,60,.16);

  --tr-pad-x:     clamp(20px, 5vw, 64px);
  --tr-pad-y:     clamp(56px, 8vw, 96px);
  --tr-max:       1200px;
  --tr-radius:    6px;

  --tr-fast:      150ms;
  --tr-ease:      cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tr-bg:      oklch(21% 0.012 264);
    --tr-surface: oklch(25% 0.014 264);
    --tr-card:    oklch(27% 0.016 264);
    --tr-ink:     oklch(90% 0.03 264);
    --tr-link:    oklch(78% 0.11 264);
    --tr-text:    oklch(93% 0.006 264);
    --tr-text-2:  oklch(84% 0.008 264);
    --tr-muted:   oklch(70% 0.012 264);
    --tr-line:    oklch(34% 0.014 264);
    --tr-line-2:  oklch(40% 0.016 264);
    --tr-danger:  oklch(72% 0.15 25);
    --tr-on-ink:  oklch(18% 0.01 264);
    --tr-shadow:  0 1px 2px rgba(0,0,0,.4), 0 18px 40px rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"] {
  --tr-bg:      oklch(21% 0.012 264);
  --tr-surface: oklch(25% 0.014 264);
  --tr-card:    oklch(27% 0.016 264);
  --tr-ink:     oklch(90% 0.03 264);
  --tr-link:    oklch(78% 0.11 264);
  --tr-text:    oklch(93% 0.006 264);
  --tr-text-2:  oklch(84% 0.008 264);
  --tr-muted:   oklch(70% 0.012 264);
  --tr-line:    oklch(34% 0.014 264);
  --tr-line-2:  oklch(40% 0.016 264);
  --tr-danger:  oklch(72% 0.15 25);
  --tr-on-ink:  oklch(18% 0.01 264);
  --tr-shadow:  0 1px 2px rgba(0,0,0,.4), 0 18px 40px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--tr-bg);
  color: var(--tr-text);
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}
a { color: var(--tr-link); text-decoration: none; }
a:hover { text-decoration: underline; }
input, button, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

.tr-page { min-height: 100vh; display: flex; flex-direction: column; }
.tr-wrap { max-width: var(--tr-max); width: 100%; margin: 0 auto; padding-left: var(--tr-pad-x); padding-right: var(--tr-pad-x); }
.tr-skip { position: absolute; left: -9999px; }
.tr-skip:focus { left: 8px; top: 8px; z-index: 50; background: var(--tr-ink); color: var(--tr-on-ink); padding: 10px 14px; border-radius: 4px; }

/* ── 머리 ── */
.tr-head { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--tr-pad-x); border-bottom: 1px solid var(--tr-line); }
.tr-brand { display: flex; align-items: center; gap: 10px; }
.tr-mark { width: 6px; height: 22px; background: var(--tr-link); box-shadow: 3px 0 0 var(--tr-gold); }
.tr-brand b { font-size: 16px; font-weight: 900; letter-spacing: -.01em; color: var(--tr-ink); }
.tr-nav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 28px); font-size: 14px; font-weight: 500; }
.tr-nav a { color: var(--tr-text-2); }
.tr-nav .tr-nav-cta { padding: 8px 14px; border: 1px solid var(--tr-link); border-radius: 4px; color: var(--tr-link); font-weight: 700; }
.tr-nav .tr-nav-cta:hover { background: color-mix(in oklab, var(--tr-link) 10%, transparent); text-decoration: none; }
/* 좁은 쪽에서도 쪽 안내를 숨기지 않는다 — 숨기면 갈 길이 없어진다. 아래에서 접어 둔다 */

/* ── 첫 화면 ── */
.tr-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(40px, 6vw, 80px); align-items: center;
  padding-top: clamp(48px, 8vw, 104px); padding-bottom: var(--tr-pad-y); }
.tr-eyebrow { font-size: 14px; font-weight: 500; letter-spacing: .14em; color: color-mix(in oklab, var(--tr-ink) 75%, var(--tr-muted)); }
.tr-hero h1 { margin: 0; font-size: clamp(36px, 6vw, 64px); font-weight: 900; line-height: 1.1; letter-spacing: -.025em; color: var(--tr-ink); }
.tr-lede { margin: 0; max-width: 34em; font-family: 'Noto Serif KR', serif; font-size: 17px; line-height: 1.8; color: var(--tr-text-2); }
.tr-hero-col { display: flex; flex-direction: column; gap: 24px; }
.tr-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--tr-muted); }

.tr-btn { display: inline-block; padding: 14px 22px; border-radius: 4px; font-size: 15px; font-weight: 700;
  border: 1px solid transparent; cursor: pointer; transition: background var(--tr-fast) var(--tr-ease), transform var(--tr-fast) var(--tr-ease); }
.tr-btn:hover { text-decoration: none; }
.tr-btn:active { transform: translateY(1px); }
.tr-btn-1 { background: var(--tr-link); color: var(--tr-on-ink); }
.tr-btn-1:hover { background: color-mix(in oklab, var(--tr-link) 85%, black); }
.tr-btn-2 { border-color: var(--tr-line-2); color: var(--tr-ink); background: transparent; }
.tr-btn-2:hover { background: color-mix(in oklab, var(--tr-link) 8%, transparent); }
.tr-btn:focus-visible, .tr-nav a:focus-visible, .tr-f input:focus-visible { outline: 2px solid var(--tr-link); outline-offset: 2px; }
.tr-cta-row { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }

/* ── 표지 두 권 ── */
.tr-covers { display: flex; justify-content: center; align-items: flex-end; gap: clamp(16px, 3vw, 32px); }
.tr-cover { container-type: inline-size; position: relative; width: min(44%, 240px); aspect-ratio: 148/210;
  background: var(--tr-card); box-shadow: var(--tr-shadow); overflow: hidden; }
.tr-cover-1 { transform: translateY(-18px); }
.tr-cover i, .tr-cover u { position: absolute; left: 0; top: 0; bottom: 0; }
.tr-cover i { width: 4.7cqw; background: var(--tr-link); }
.tr-cover u { left: 4.7cqw; width: .8cqw; background: var(--tr-gold); }
.tr-cover-top { position: absolute; left: 14.9cqw; right: 10.8cqw; top: 14.3%; display: flex; flex-direction: column; gap: 2.4cqw; }
.tr-cover-top span { font-size: 3.4cqw; font-weight: 500; letter-spacing: .12em; color: color-mix(in oklab, var(--tr-ink) 78%, var(--tr-muted)); }
.tr-cover-top b { font-size: 11cqw; font-weight: 900; line-height: 1.1; letter-spacing: -.02em; color: var(--tr-ink); }
.tr-cover-num { position: absolute; right: 10.8cqw; top: 43.8%; font-family: 'Noto Serif KR', serif; font-size: 33cqw; line-height: 1; color: var(--tr-link); }
.tr-cover-foot { position: absolute; left: 14.9cqw; right: 10.8cqw; bottom: 8.6%; display: flex; flex-direction: column; gap: 2cqw; }
.tr-cover-foot hr { margin: 0; border: 0; height: 1px; background: var(--tr-ink); opacity: .5; }
.tr-cover-foot div { display: flex; justify-content: space-between; font-size: 3cqw; font-weight: 500; letter-spacing: .06em; color: color-mix(in oklab, var(--tr-ink) 85%, var(--tr-muted)); }

/* ── 자료집 소개 ── */
.tr-band { background: var(--tr-surface); border-top: 1px solid var(--tr-line); border-bottom: 1px solid var(--tr-line); }
.tr-sec { padding-top: var(--tr-pad-y); padding-bottom: var(--tr-pad-y); display: flex; flex-direction: column; gap: 40px; }
.tr-h2 { margin: 0; font-size: clamp(24px, 3.4vw, 34px); font-weight: 900; letter-spacing: -.015em; color: var(--tr-ink); }
.tr-books { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.tr-book { display: flex; flex-direction: column; gap: 20px; padding: 32px; background: var(--tr-card); border-radius: var(--tr-radius); }
.tr-book-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tr-book-head .tr-vol { display: flex; align-items: baseline; gap: 12px; }
.tr-roman { font-family: 'Noto Serif KR', serif; font-size: 36px; line-height: 1; color: var(--tr-link); }
.tr-book-head h3 { margin: 0; font-size: 20px; font-weight: 700; }
.tr-price { font-size: 18px; font-weight: 700; }
.tr-toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tr-toc li { display: flex; gap: 14px; padding: 11px 0; border-top: 1px solid var(--tr-line); font-size: 15px; line-height: 1.5; }
.tr-toc b { flex: none; min-width: 52px; white-space: nowrap; font-weight: 700; color: var(--tr-link); }
.tr-note { font-size: 13px; color: var(--tr-muted); }

/* ── 인쇄본 ── */
.tr-print { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(32px, 5vw, 64px); align-items: center; padding: clamp(28px, 4vw, 48px);
  background: var(--tr-surface); border: 1px solid var(--tr-line); border-radius: 8px; }
.tr-print-img { display: flex; justify-content: center; }
.tr-print-img img { width: min(100%, 280px); height: auto; display: block; border-radius: 2px;
  box-shadow: var(--tr-shadow); transform: rotate(-1.5deg); }
.tr-tagrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tr-tag { padding: 5px 10px; background: var(--tr-gold); color: oklch(30% .10 264); border-radius: 3px; font-size: 13px; font-weight: 700; }
.tr-stock { font-size: 14px; font-weight: 700; color: var(--tr-danger); }
.tr-stock.is-out { color: var(--tr-muted); }
.tr-pricebox { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--tr-line); }
.tr-pricerow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tr-was { text-decoration: line-through; }
.tr-big { font-size: 30px; font-weight: 900; color: var(--tr-ink); }

/* ── 값 카드 ── */
.tr-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tr-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius); background: var(--tr-surface); }
.tr-card.is-set { border-color: var(--tr-link); background: color-mix(in oklab, var(--tr-link) 8%, var(--tr-surface)); }
.tr-card.is-print { border-color: color-mix(in oklab, var(--tr-gold) 70%, var(--tr-line)); background: color-mix(in oklab, var(--tr-gold) 14%, var(--tr-surface)); }
.tr-card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  flex-wrap: wrap; }
/* 값은 절대로 가운데서 끊기지 않는다 — 「30,」 / 「000원」 으로 갈라지면 읽히지 않는다.
   그래서 **줄은 바뀌게 둬야 한다.** 둘 다 안 끊기는데 줄도 안 바뀌면 칸 밖으로
   삐져나온다 — 760px 부터 카드를 넷으로 세우는데 768px 에서 카드가 112px 이라
   「25,000원」 이 3px 넘쳐 쪽 전체에 가로 스크롤이 생기고 있었다. */
.tr-card-row > span, .tr-card-row b { white-space: nowrap; }
.tr-card-row b { font-size: 22px; font-weight: 700; }

/* ── 절차 ── */
.tr-buy { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(24px, 4vw, 48px); align-items: start; }
.tr-steps { display: flex; flex-direction: column; gap: 28px; }
.tr-step { display: flex; gap: 18px; }
.tr-num { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--tr-link); color: var(--tr-on-ink);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.tr-num.is-alt { background: transparent; border: 1px solid var(--tr-link); color: var(--tr-link); font-size: 13px; }
.tr-step-body { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.tr-step-t { font-size: 18px; font-weight: 700; line-height: 1.6; }
.tr-step-d { font-size: 15px; line-height: 1.7; color: var(--tr-text-2); }
.tr-acct { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 20px 22px; background: var(--tr-surface); border: 1px solid var(--tr-line); border-radius: var(--tr-radius); }
.tr-acct-no { font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.tr-copy { padding: 10px 16px; border: 1px solid var(--tr-line-2); background: var(--tr-card); border-radius: 4px;
  font-size: 14px; color: var(--tr-ink); cursor: pointer; }
.tr-copy:hover { background: color-mix(in oklab, var(--tr-link) 8%, var(--tr-card)); }

/* ── 신청 양식 ── */
.tr-form { display: flex; flex-direction: column; gap: 20px; padding: clamp(24px, 3vw, 32px);
  background: var(--tr-surface); border: 1px solid var(--tr-line); border-radius: 8px; }
.tr-form h2 { margin: 0; font-size: 18px; font-weight: 700; }
.tr-f { display: flex; flex-direction: column; gap: 8px; }
.tr-f > span { font-size: 13px; font-weight: 500; color: var(--tr-muted); }
.tr-f input { padding: 12px 14px; border: 1px solid var(--tr-line-2); border-radius: 4px; font-size: 15px;
  background: var(--tr-card); outline: none; width: 100%; }
.tr-f input:focus { border-color: var(--tr-link); }
.tr-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tr-pick { padding: 12px 8px; border-radius: 4px; border: 1px solid var(--tr-line-2); background: var(--tr-card);
  color: var(--tr-ink); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background var(--tr-fast) var(--tr-ease), border-color var(--tr-fast) var(--tr-ease); }
.tr-pick:hover:not(:disabled) { border-color: var(--tr-link); }
.tr-pick[aria-pressed="true"] { background: var(--tr-link); border-color: var(--tr-link); color: var(--tr-on-ink); }
.tr-pick:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.tr-err { font-size: 13px; color: var(--tr-danger); }
.tr-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--tr-line); }
.tr-total b { font-size: 24px; font-weight: 900; color: var(--tr-ink); }
.tr-submit { padding: 15px; border: none; border-radius: 4px; background: var(--tr-link); color: var(--tr-on-ink);
  font-size: 16px; font-weight: 700; cursor: pointer; width: 100%; }
.tr-submit:hover { background: color-mix(in oklab, var(--tr-link) 85%, black); }
.tr-submit:disabled { opacity: .6; cursor: progress; }
.tr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tr-done { display: flex; flex-direction: column; gap: 14px; padding: 8px 0; }
.tr-done .tr-rule { width: 40px; height: 4px; background: var(--tr-gold); }
.tr-done h2 { font-size: 20px; }
[hidden] { display: none !important; }

/* ── 꼬리 ── */
.tr-foot { margin-top: auto; border-top: 1px solid var(--tr-line); padding: 28px var(--tr-pad-x);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--tr-muted); }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .tr-cover-1, .tr-print-img img { transform: none; }
}

/* ── 인쇄본 사진 (두 권을 갈라 나란히) ── */
.tr-photo { display: flex; gap: clamp(8px, 2vw, 16px); justify-content: center; align-items: flex-start; width: 100%; }
.tr-photo picture { display: block; flex: 1 1 0; max-width: 220px; }
.tr-photo img { display: block; width: 100%; height: auto; border-radius: 2px; box-shadow: var(--tr-shadow); }
.tr-photo picture:first-child img { transform: rotate(-1.2deg); }
.tr-photo picture:last-child img  { transform: rotate(1deg); }

/* ── 미리보기 ── */
.tr-prevs { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2vw, 22px); }
.tr-prevs a { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--tr-muted); }
.tr-prevs img { display: block; width: 100%; height: auto; border: 1px solid var(--tr-line); border-radius: 3px;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 24px rgba(30,30,60,.10);
  transition: transform var(--tr-fast) var(--tr-ease), box-shadow var(--tr-fast) var(--tr-ease); }
.tr-prevs a:hover img, .tr-prevs a:focus-visible img {
  transform: translateY(-4px); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 18px 36px rgba(30,30,60,.20); }
.tr-prevs a:focus-visible { outline: 2px solid var(--tr-link); outline-offset: 4px; border-radius: 4px; }
.tr-prevs span { font-size: 13px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .tr-photo img { transform: none !important; }
  .tr-prevs a:hover img { transform: none; }
}


/* ── 칸 수는 품목 수(넷)에 맞춰 멈춘다. auto-fit 은 넓은 화면에서 빈 칸을 만든다 ── */
@media (min-width: 760px) {
  .tr-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tr-prevs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── 손에 쥔 화면 ──────────────────────────────────────────────
   누르는 것은 44px 이상, 입력 글씨는 16px 이상(그 아래면 iOS 가 쪽을 확대한다). */
html { -webkit-text-size-adjust: 100%; }

.tr-f input { font-size: 16px; }
.tr-pick    { min-height: 46px; }
.tr-copy    { min-height: 44px; }
.tr-submit  { min-height: 52px; }
.tr-btn     { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 719px) {
  :root { --tr-pad-y: clamp(40px, 9vw, 64px); }

  /* 머리의 쪽 안내는 숨기지 않고 접어 둔다 — 숨기면 갈 길이 없어진다.
     줄은 바꾸되 **낱말 가운데서는 안 끊는다.** 「자료집 / 소개」 처럼 갈라지면
     글자는 다 있는데 메뉴가 몇 개인지 알 수 없다. 두 줄이 되어도 다 보이는 쪽이 낫다. */
  .tr-head { flex-wrap: wrap; gap: 12px 14px; padding: 12px var(--tr-pad-x) 14px; }
  .tr-nav {
    width: 100%; order: 2;
    flex-wrap: wrap; gap: 10px 16px; font-size: 14px;
  }
  .tr-nav > * { white-space: nowrap; }
  /* 밀어내지 않는다. 줄 끝으로 밀면 공유가 제 줄을 차지해 세 줄이 된다 —
     그냥 흐르게 두면 글 메뉴 한 줄, 공유·이름 한 줄로 떨어진다 */
  .tr-nav .tr-share { margin-left: 0; min-height: 32px; padding: 4px 11px; font-size: 13px; }
  .tr-nav .tr-nav-cta { margin-left: 0; padding: 6px 12px; font-size: 13px; }

  .tr-hero { padding-top: clamp(32px, 9vw, 56px); gap: 32px; }
  .tr-hero h1 { font-size: clamp(32px, 9vw, 44px); }
  .tr-lede { font-size: 16px; }
  .tr-cta-row .tr-btn { flex: 1 1 auto; text-align: center; }

  .tr-covers { gap: 12px; }
  .tr-cover  { width: min(46%, 190px); }
  .tr-cover-1 { transform: translateY(-10px); }

  .tr-book { padding: 22px 18px; }
  .tr-toc li { font-size: 14px; padding: 9px 0; }

  .tr-print { padding: 20px 16px; gap: 24px; }
  .tr-photo picture { max-width: 150px; }
  .tr-big { font-size: 26px; }

  /* 좁은 쪽에서는 글자를 줄여 라벨과 값이 한 줄에 들어가게 한다 */
  .tr-card { padding: 14px 12px; }
  .tr-card-row { gap: 6px; }
  .tr-card-row > span { font-size: 13px; }
  .tr-card-row b { font-size: 17px; letter-spacing: -0.02em; }
  .tr-card .tr-note { font-size: 11.5px; line-height: 1.5; }

  .tr-step { gap: 12px; }
  .tr-num { width: 28px; height: 28px; font-size: 13px; }
  .tr-step-t { font-size: 16px; }
  .tr-acct { padding: 16px; gap: 10px; }
  .tr-acct-no { font-size: 20px; }
  .tr-copy { width: 100%; }

  .tr-form { padding: 20px 16px; gap: 16px; }
  .tr-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .tr-foot { padding: 22px var(--tr-pad-x); }
}

/* 아주 좁은 쪽 — 미리보기를 한 장씩 크게 */
@media (max-width: 359px) {
  .tr-prevs { grid-template-columns: 1fr; }
  .tr-cards { grid-template-columns: 1fr; }
  .tr-picks { grid-template-columns: 1fr; }
}

/* ── 맨 위·맨 아래 (본체 chch_v4 와 같은 꼴) ── */
.tr-scroll { position: fixed; right: 16px; bottom: 18px; z-index: 40;
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--tr-fast) var(--tr-ease), transform var(--tr-fast) var(--tr-ease), visibility var(--tr-fast); }
.tr-scroll.is-on { opacity: 1; visibility: visible; transform: none; }
.tr-scroll-btn { width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--tr-line-2); background: var(--tr-card); color: var(--tr-ink);
  font-size: 17px; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.10), 0 10px 22px rgba(30,30,60,.14); }
.tr-scroll-btn:hover { border-color: var(--tr-link); color: var(--tr-link); }
.tr-scroll-btn:focus-visible { outline: 2px solid var(--tr-link); outline-offset: 3px; }
.tr-scroll-btn[disabled] { opacity: .35; cursor: default; }
@media (max-width: 719px) { .tr-scroll { right: 12px; bottom: 12px; } }

/* ── 인쇄본에 딸려 가는 PDF 안내 ── */
.tr-gift { margin: 0; padding: 12px 15px; border-radius: var(--tr-radius); font-size: 14px; line-height: 1.7;
  background: color-mix(in oklab, var(--tr-gold) 24%, var(--tr-surface));
  border: 1px solid color-mix(in oklab, var(--tr-gold) 55%, var(--tr-line)); color: var(--tr-text-2); }
.tr-gift b { color: var(--tr-ink); }
.tr-note-gift { font-weight: 700; color: var(--tr-ink); }

/* ── 미리보기 팝업 ──────────────────────────────────────────────
   자바스크립트가 없으면 그냥 새 창으로 열린다. 아래는 그 위에 덧입히는 것이다. */
.tr-lb { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  padding: clamp(12px, 3vw, 40px); background: rgba(16, 18, 28, .82);
  opacity: 0; visibility: hidden; transition: opacity var(--tr-fast) var(--tr-ease), visibility var(--tr-fast);
  cursor: zoom-out; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.tr-lb.is-on { opacity: 1; visibility: visible; }
.tr-lb figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-height: 100%; }
.tr-lb img { display: block; max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto;
  background: #fff; border-radius: 3px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.tr-lb figcaption { color: #f2f3f7; font-size: 13px; }
.tr-lb-close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.35); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tr-lb-close:hover { background: rgba(0,0,0,.6); }
.tr-lb-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tr-lb-nav { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; }
.tr-lb-nav button { min-width: 40px; height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.35); color: #fff; font-size: 13px; cursor: pointer; }
.tr-lb-nav button[aria-current="true"] { background: #fff; color: #1e2028; border-color: #fff; font-weight: 700; }
body.tr-lb-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .tr-lb { transition: none; } }

/* ── 받으실 주소 (다음 우편번호) ── */
.tr-addr-row { display: flex; gap: 8px; }
.tr-addr-row input { flex: 0 1 140px; }
.tr-addr-row .tr-btn { flex: none; padding: 0 16px; font-size: 14px; white-space: nowrap; }
#tr-zip, #tr-addr1 { background: color-mix(in oklab, var(--tr-line) 25%, var(--tr-card)); }
.tr-post { position: relative; border: 1px solid var(--tr-line-2); border-radius: var(--tr-radius);
  overflow: hidden; background: var(--tr-card); }
.tr-post-layer { width: 100%; height: 420px; }
.tr-post-close { position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--tr-line-2); background: var(--tr-card); color: var(--tr-ink); font-size: 15px; }
.tr-post-close:hover { border-color: var(--tr-link); color: var(--tr-link); }
@media (max-width: 719px) {
  .tr-addr-row input { flex: 1 1 auto; }
  .tr-post-layer { height: 380px; }
}
/* 우편번호 칸이 제 크기를 알려 주기 전에도 쓸 만하게 */
.tr-post-layer { min-height: 360px; }

/* ── 구입 신청: PDF 와 인쇄본을 묶어 보인다 ── */
.tr-group { display: flex; flex-direction: column; gap: 8px; }
.tr-group + .tr-group { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--tr-line); }
.tr-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tr-group-head b { font-size: 14px; font-weight: 700; color: var(--tr-ink); }
.tr-group-head span { font-size: 12px; color: var(--tr-muted); }
.tr-pick { display: flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center;
  line-height: 1.35; padding: 11px 8px; }
.tr-pick-name { font-size: 13.5px; font-weight: 700; }
.tr-pick-won  { font-size: 12px; font-weight: 500; opacity: .78; }
.tr-pick[aria-pressed="true"] .tr-pick-won { opacity: .9; }

/* ── 내 자료 내려받기 (로그인했을 때만) ── */
.tr-mine { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.tr-mine-item { padding: 20px 22px; background: var(--tr-surface);
  border: 1px solid var(--tr-line); border-radius: var(--tr-radius);
  display: flex; flex-direction: column; gap: 12px; }
.tr-mine-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.tr-mine-head b { font-size: 17px; font-weight: 700; color: var(--tr-ink); }
.tr-mine-files { display: flex; flex-wrap: wrap; gap: 10px; }
.tr-mine-files .tr-btn { font-size: 14px; padding: 11px 16px; }
.tr-mine-item .tr-note { margin: 0; }

/* ── 꼭 알려야 하는 것 (환불 범위) ── */
.tr-caution { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--tr-muted);
  padding: 9px 12px; border-radius: 5px;
  background: color-mix(in oklab, var(--tr-danger) 7%, transparent);
  border-left: 3px solid color-mix(in oklab, var(--tr-danger) 55%, transparent); }
.tr-caution b { color: var(--tr-danger); }

/* ── 공유 단추 ── */
.tr-share { display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  padding: 7px 12px; border: 1px solid var(--tr-line-2); border-radius: 999px;
  background: var(--tr-card); color: var(--tr-ink); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: border-color var(--tr-fast) var(--tr-ease), color var(--tr-fast) var(--tr-ease); }
.tr-share svg { width: 15px; height: 15px; flex: none; }
.tr-share:hover { border-color: var(--tr-link); color: var(--tr-link); }
.tr-share:focus-visible { outline: 2px solid var(--tr-link); outline-offset: 2px; }
.tr-share.is-done { border-color: var(--tr-link); color: var(--tr-link); }
@media (max-width: 719px) { .tr-share { margin-left: auto; } }

/* ── 듣기로 가는 길 ── */
.tr-listen{display:flex;flex-direction:column;gap:6px;padding:20px 22px;margin:0 0 18px;
  background:var(--tr-surface);border:1px solid var(--tr-line);border-left:5px solid var(--tr-ink);
  border-radius:10px;text-decoration:none;color:var(--tr-text);
  transition:border-color var(--tr-fast) var(--tr-ease),transform var(--tr-fast) var(--tr-ease)}
.tr-listen:hover{border-color:var(--tr-ink);transform:translateY(-1px);text-decoration:none}
.tr-listen .k{font-size:12px;letter-spacing:.1em;color:var(--tr-muted)}
.tr-listen b{font-size:20px;font-weight:700;color:var(--tr-ink)}
.tr-listen .d{font-family:'Noto Serif KR',serif;font-size:15px;color:var(--tr-text-2)}
.tr-listen .go{margin-top:4px;font-size:14px;font-weight:700;color:var(--tr-ink)}

/* ── 듣기 — 준비 중 ──────────────────────────────────────────
   미리보기가 책을 눈으로 보여 준 뒤, 같은 책을 귀로도 듣는다는 자리다.
   그래서 생김새를 미리보기와 **일부러 다르게** 했다 — 거기는 종이 넉 장이
   나란히 서고, 여기는 글과 손안의 화면이 마주 선다. 같은 격자를 또 쓰면
   둘이 한 덩어리로 읽혀 「또 미리보기」 가 된다. */

.tr-hear { display: grid; gap: clamp(24px, 4vw, 44px); align-items: start; }

.tr-hear-pts { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.tr-hear-pts li { display: flex; flex-direction: column; gap: 4px;
  padding-left: 16px; border-left: 2px solid var(--tr-line-2); }
.tr-hear-pts b { font-size: 16px; font-weight: 700; color: var(--tr-text); }
.tr-hear-pts span { font-size: 14px; line-height: 1.65; color: var(--tr-muted); }
/* 첫 둘이 이 물건의 까닭이다 — 금빛 선으로 먼저 눈에 들어오게 한다 */
.tr-hear-pts li:nth-child(-n+2) { border-left-color: var(--tr-gold); }

/* 손안의 화면 둘. 살짝 기울이고 겹쳐 둔다 — 반듯하게 두 장을 세우면
   그림이 아니라 표처럼 보인다 */
.tr-hear-shots { display: flex; justify-content: center; gap: clamp(10px, 2vw, 18px); }
.tr-hear-shots a { display: block; width: min(46%, 230px); }
.tr-hear-shots img { display: block; width: 100%; height: auto; border-radius: 14px;
  border: 1px solid var(--tr-line); background: var(--tr-surface);
  box-shadow: 0 2px 6px rgba(0,0,0,.08), 0 18px 40px rgba(30,30,60,.16);
  transition: transform var(--tr-fast) var(--tr-ease), box-shadow var(--tr-fast) var(--tr-ease); }
.tr-hear-shots a:first-child img { transform: rotate(-2deg); }
.tr-hear-shots a:last-child  img { transform: rotate(2deg); }
.tr-hear-shots a:hover img, .tr-hear-shots a:focus-visible img {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 0 3px 8px rgba(0,0,0,.10), 0 26px 52px rgba(30,30,60,.26); }
.tr-hear-shots a:focus-visible { outline: 2px solid var(--tr-link); outline-offset: 6px; border-radius: 16px; }

.tr-hear-bar { margin-top: 26px; display: flex; flex-direction: column; gap: 8px; }
.tr-hear-bar .t { height: 6px; border-radius: 3px; background: var(--tr-line); overflow: hidden; }
.tr-hear-bar .t i { display: block; height: 100%; background: var(--tr-ink); border-radius: 3px; }

/* 두 열로 가르는 자리를 **늦게** 잡는다. 860 에서 갈랐더니 화면이 156px 로
   줄어 한 열일 때(247px)보다 작아졌다 — 가르는 것이 손해인 구간이 생긴다.
   재어 보고 980 으로 옮겼다. */
@media (min-width: 980px) {
  /* 글이 왼쪽, 화면이 오른쪽. 글 쪽을 넓게 준다 — 읽을 것이 거기 있다 */
  .tr-hear { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .tr-hear-shots a { width: min(48%, 250px); }
}

@media (prefers-reduced-motion: reduce) {
  .tr-hear-shots img { transform: none !important; transition: none; }
}

/* ── 남은 세트 — 고르는 자리에 ──────────────────────────────
   머리칸 딱지(.tr-stock)와 구입 방법 카드에도 적혀 있지만 그 둘은 **읽는
   자리**다. 여기가 **정하는 자리**라 한 번 더 적는다. 셋이 늘 같은 숫자를
   말해야 하므로 모두 서버가 그릴 때 한 값에서 나온다. */

/* `.tr-group-head span` 이 이미 작은 회색 글씨를 걸어 두었고 셈이 더 세다.
   같은 자리에 맞춰 적어야 빛깔을 빼앗기지 않는다 — 한 번 빼앗겼다. */
.tr-group-head .tr-left,
.tr-left { font-size: 13px; font-weight: 700; color: var(--tr-danger); white-space: nowrap;
  margin-left: auto; }
/* 몇 개 안 남았을 때 — 숫자만으로는 급한 줄을 모른다 */
.tr-group-head .tr-left.is-few,
.tr-left.is-few { padding: 2px 8px; border-radius: 999px;
  background: var(--tr-danger); color: #fff; }

.tr-pick-left { font-size: 11px; font-weight: 700; color: var(--tr-danger); }
/* 고른 단추는 바탕이 파랑이라 빨강이 안 읽힌다 — 흰 글씨로 뒤집는다 */
.tr-pick[aria-pressed="true"] .tr-pick-left { color: #fff; opacity: .95; }
.tr-pick-left.is-few { text-decoration: underline; text-underline-offset: 2px; }

/* ── 크게 보기 ────────────────────────────────────────────
   미리보기를 쪽 위에 겹쳐 띄운다. 전에는 큰 그림 파일로 그냥 튀었다 —
   날그림 한 장만 뜨고 뒤로 가야 돌아왔다. */

html.tr-zoomed { overflow: hidden; }   /* 뒤가 따라 굴러가지 않게 */

.tr-zoom { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center;
  justify-content: center; gap: clamp(4px, 2vw, 20px);
  padding: clamp(12px, 3vw, 40px);
  background: color-mix(in oklab, #0d1020 88%, transparent);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.tr-zoom[hidden] { display: none !important; }

.tr-zoom-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px;
  max-width: 100%; max-height: 100%; }
.tr-zoom-fig img { display: block; max-width: 100%;
  /* 이름표 자리를 빼고 남은 높이까지만 — 세로로 긴 손안의 화면이 잘리지 않게 */
  max-height: calc(100vh - clamp(96px, 16vw, 150px));
  width: auto; height: auto; border-radius: 6px; background: #fff;
  box-shadow: 0 10px 50px rgba(0,0,0,.5); }
.tr-zoom-fig figcaption { font-size: 14px; color: #e8e6df; text-align: center; }
.tr-zoom-fig figcaption .n { color: #a9a7a0; margin-left: 6px; font-variant-numeric: tabular-nums; }

.tr-zoom button { flex: none; border: 0; cursor: pointer; color: #fff; line-height: 1;
  background: rgba(255,255,255,.12); border-radius: 50%;
  transition: background var(--tr-fast) var(--tr-ease); }
.tr-zoom button:hover { background: rgba(255,255,255,.24); }
.tr-zoom button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.tr-zoom-p, .tr-zoom-n { width: 48px; height: 48px; font-size: 28px; }
.tr-zoom-x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; font-size: 18px; }
.tr-zoom button[hidden] { display: none !important; }

/* 좁은 화면에서는 넘기기 단추를 그림 아래로 내린다 — 옆에 두면 그림이 좁아진다 */
@media (max-width: 560px) {
  .tr-zoom { flex-wrap: wrap; align-content: center; }
  .tr-zoom-fig { order: 1; width: 100%; }
  .tr-zoom-p { order: 2; } .tr-zoom-n { order: 3; }
  .tr-zoom-fig img { max-height: calc(100vh - 210px); }
}

/* 손안의 화면에도 책자처럼 이름표를 단다 */
.tr-hear-shots a { text-decoration: none; color: var(--tr-muted); }
.tr-hear-shots a span { display: block; margin-top: 10px; font-size: 13px; text-align: center; }

@media (prefers-reduced-motion: reduce) { .tr-zoom button { transition: none; } }

/* 듣기로 가는 단추. 그림과 글이 한 줄에 서야 「소리」 로 읽힌다 —
   그림만 두면 무슨 단추인지 모르고, 글만 두면 다른 링크와 섞인다 */
.tr-hear-go { display: inline-flex; align-items: center; gap: 9px; }
.tr-hear-go svg { flex: none; }
