/* ============================================================
   FULLTEXT READING STYLES
   Extends series-website/styles.css for Korean full-text reading
   ============================================================ */

/* ---- Fulltext chapter page overrides ---- */
.fulltext-page {
  background: var(--bg-deep);
  color: var(--text-primary);
}

/* Email gate overlay */
.email-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 15, 0.95) 30%, var(--bg-deep) 50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  pointer-events: auto;
}

.email-gate-overlay.hidden {
  display: none;
}

.email-gate-box {
  max-width: 480px;
  width: 100%;
  text-align: center;
  padding: 48px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.email-gate-box h2 {
  font-family: var(--serif-kr);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.email-gate-box p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.email-gate-form {
  display: flex;
  gap: 8px;
}

.email-gate-form input[type="email"] {
  flex: 1;
  padding: 14px 16px;
  font-family: var(--sans-kr);
  font-size: 15px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.3s;
}

.email-gate-form input[type="email"]:focus {
  border-color: var(--accent-gold-dim);
}

.email-gate-form input[type="email"]::placeholder {
  color: var(--text-muted);
}

.email-gate-form button {
  padding: 14px 28px;
  font-family: var(--sans-kr);
  font-size: 15px;
  font-weight: 600;
  background: var(--accent-gold);
  color: var(--bg-deep);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
  white-space: nowrap;
}

.email-gate-form button:hover {
  background: var(--accent-gold-dim);
}

.email-gate-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.email-gate-error {
  color: var(--accent-red);
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

.email-gate-privacy {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.6;
}

/* Content blur when gated */
.chapter-body.gated {
  max-height: 600px;
  overflow: hidden;
  position: relative;
}

.chapter-body.gated::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: linear-gradient(transparent, var(--bg-deep));
  pointer-events: none;
}

/* ---- Fulltext chapter header ---- */
.fulltext-header {
  position: fixed;
  top: 3px;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.fulltext-back {
  font-family: var(--sans-kr);
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fulltext-back:hover {
  color: var(--accent-gold);
}

.fulltext-book-title {
  font-family: var(--sans-kr);
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.fulltext-progress-text {
  font-family: var(--sans-en);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ---- TOC Sidebar ---- */
.toc-sidebar {
  position: fixed;
  top: 52px;
  left: 0;
  bottom: 0;
  width: 280px;
  background: rgba(10, 10, 15, 0.98);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 900;
  padding: 24px 0;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.toc-sidebar.open {
  transform: translateX(0);
}

.toc-sidebar-toggle {
  position: fixed;
  top: 60px;
  left: 12px;
  z-index: 901;
  width: 36px;
  height: 36px;
  background: rgba(18, 18, 26, 0.9);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.toc-sidebar-toggle:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold-dim);
}

.toc-sidebar .toc-part {
  padding: 16px 20px 8px;
  font-family: var(--sans-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.toc-sidebar .toc-link {
  display: block;
  padding: 8px 20px 8px 28px;
  font-family: var(--sans-kr);
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.5;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.toc-sidebar .toc-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.toc-sidebar .toc-link.active {
  color: var(--accent-gold);
  border-left-color: var(--accent-gold);
  background: rgba(212, 178, 85, 0.05);
}

.toc-sidebar .toc-link .toc-progress {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--border);
  vertical-align: middle;
}

.toc-sidebar .toc-link .toc-progress.done {
  background: #2ecc71;
}

.toc-sidebar .toc-link .toc-progress.partial {
  background: var(--accent-gold);
}

/* ---- Chapter nav (prev/next) at bottom ---- */
.fulltext-nav {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 16px;
  border-top: 1px solid var(--border);
}

.fulltext-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--sans-kr);
  color: var(--text-muted);
  text-decoration: none;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.3s;
}

.fulltext-nav a:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold-dim);
}

.fulltext-nav a .nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.fulltext-nav a .nav-title {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.fulltext-nav a:hover .nav-title {
  color: var(--text-primary);
}

.fulltext-nav a.nav-next {
  text-align: right;
}

.fulltext-nav a.nav-next-book {
  border-color: var(--accent-gold-dim);
  background: rgba(212, 178, 85, 0.03);
}

/* ---- Continue reading floating button ---- */
.continue-reading-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 800;
  padding: 12px 20px;
  font-family: var(--sans-kr);
  font-size: 13px;
  font-weight: 500;
  background: var(--accent-gold);
  color: var(--bg-deep);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
  display: none;
}

.continue-reading-btn:hover {
  background: var(--accent-gold-dim);
  transform: translateY(-2px);
}

.continue-reading-btn.visible {
  display: block;
}

/* ============================================================
   SERIES HUB — editorial hero + axis-char hub cards
   ============================================================ */
.series-hero {
  position: relative;
  text-align: center;
  padding: 40px 0 16px;
}

.series-hero-eyebrow {
  display: inline-block;
  font-family: var(--sans-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-gold);
  padding: 7px 18px;
  border: 1px solid var(--accent-gold-dim);
  border-radius: 2px;
  margin-bottom: 36px;
  background: rgba(212, 178, 85, 0.02);
}

.series-hero-roman {
  font-family: var(--serif-en);
  font-size: clamp(64px, 8vw, 92px);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-gold);
  line-height: 1;
  letter-spacing: 4px;
  margin: 0 0 28px;
  opacity: 0.92;
}

.series-hero-title {
  font-family: var(--serif-kr);
  font-size: clamp(36px, 5.4vw, 56px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.series-hero-subtitle {
  font-family: var(--serif-en);
  font-size: clamp(14px, 1.4vw, 17px);
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  margin-bottom: 32px;
}

.series-hero-epigraph {
  max-width: 580px;
  margin: 0 auto;
  font-family: var(--serif-kr);
  font-size: 15px;
  font-style: italic;
  line-height: 1.9;
  color: var(--text-secondary);
  padding: 0 16px;
}

.series-hero-divider {
  position: relative;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold-dim), transparent);
  margin: 40px auto 0;
}

.series-hero-divider::before {
  content: '◆';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-deep);
  padding: 0 10px;
  color: var(--accent-gold-dim);
  font-size: 9px;
}

/* ---- Hub grid ---- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 56px;
}

.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 34px 28px 30px;
  background: linear-gradient(180deg, rgba(22, 22, 34, 0.7) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  border-radius: 3px;
  text-decoration: none;
  color: var(--text-primary);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.45s ease, border-color 0.45s ease,
              box-shadow 0.45s ease, background 0.45s ease;
}

/* Axis character watermark */
.hub-card::before {
  content: attr(data-axis-char);
  position: absolute;
  right: -22px;
  bottom: -58px;
  font-family: var(--serif-kr);
  font-size: 240px;
  font-weight: 700;
  line-height: 1;
  color: rgba(212, 178, 85, 0.055);
  pointer-events: none;
  z-index: 0;
  transition: color 0.55s ease, transform 0.55s ease;
}

/* Bottom-right radial glow on hover */
.hub-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 80% 100%,
                              rgba(212, 178, 85, 0.1), transparent 65%);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.45s ease;
}

.hub-card > * {
  position: relative;
  z-index: 1;
}

.hub-card:hover {
  border-color: var(--accent-gold-dim);
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.7),
              0 0 0 1px rgba(212, 178, 85, 0.08);
}

.hub-card:hover::before {
  color: rgba(212, 178, 85, 0.11);
  transform: translate(-4px, -4px);
}

.hub-card:hover::after {
  opacity: 1;
}

.hub-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.hub-card-roman {
  font-family: var(--serif-en);
  font-size: 30px;
  font-style: italic;
  font-weight: 400;
  color: var(--accent-gold);
  line-height: 1;
  letter-spacing: 1.5px;
}

.hub-card-axis {
  font-family: var(--sans-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hub-card-title {
  font-family: var(--serif-kr);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--text-primary);
  margin-bottom: 8px;
  min-height: 2.76em;
  letter-spacing: -0.005em;
}

.hub-card-subtitle {
  font-family: var(--serif-en);
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 22px;
}

.hub-card-meta {
  margin-top: auto;
  font-family: var(--sans-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-gold-dim);
}

.hub-card-progress {
  margin-top: 14px;
  height: 2px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0;
  overflow: hidden;
}

.hub-card-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold-dim), var(--accent-gold));
  border-radius: 0;
  width: 0%;
  transition: width 0.8s ease;
}

@media (max-width: 960px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .hub-card::before { font-size: 210px; }
}

@media (max-width: 560px) {
  .hub-grid { grid-template-columns: 1fr; gap: 12px; }
  .hub-card { padding: 28px 22px 24px; }
  .hub-card::before { font-size: 180px; right: -14px; bottom: -36px; }
  .hub-card-title { font-size: 20px; min-height: 0; }
  .series-hero { padding: 24px 0 8px; }
}

/* ============================================================
   BOOK INDEX — editorial hero + refined TOC
   ============================================================ */
.book-hero {
  position: relative;
  padding: 52px 0 44px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.book-hero::before {
  content: attr(data-axis-char);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif-kr);
  font-size: 440px;
  font-weight: 700;
  line-height: 1;
  color: rgba(212, 178, 85, 0.038);
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
}

.book-hero > * {
  position: relative;
  z-index: 1;
}

.book-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3.2px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 22px;
}

.book-hero-eyebrow .bar {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent-gold-dim);
}

.book-hero-roman {
  font-family: var(--serif-en);
  font-size: clamp(54px, 7vw, 72px);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-gold);
  line-height: 1;
  letter-spacing: 2px;
  margin-bottom: 20px;
  opacity: 0.9;
}

.book-hero-title {
  font-family: var(--serif-kr);
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 700;
  line-height: 1.24;
  color: var(--text-primary);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.book-hero-subtitle {
  font-family: var(--serif-en);
  font-size: clamp(15px, 1.5vw, 18px);
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0.6px;
  margin-bottom: 30px;
}

.book-hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 12px 24px;
  background: rgba(18, 18, 26, 0.55);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: var(--sans-en);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  backdrop-filter: blur(4px);
}

.book-hero-stats .stat-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-gold-dim);
}

.book-hero-stats strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---- Book TOC (list) ---- */
.book-toc {
  margin-top: 8px;
}

.book-toc-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--sans-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent-gold);
  padding-bottom: 14px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--accent-gold-dim);
}

.book-toc-heading .count {
  font-family: var(--serif-en);
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: none;
}

.book-toc-list {
  display: flex;
  flex-direction: column;
}

.book-toc-item {
  display: grid;
  grid-template-columns: 58px 1fr 20px;
  align-items: baseline;
  gap: 18px;
  padding: 18px 10px;
  border-bottom: 1px solid rgba(42, 42, 54, 0.45);
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--serif-kr);
  font-size: 16px;
  transition: background 0.3s ease, padding 0.3s ease, color 0.3s ease;
  position: relative;
}

.book-toc-item:hover {
  background: linear-gradient(90deg, rgba(212, 178, 85, 0.055), transparent 85%);
  padding-left: 18px;
  color: var(--text-primary);
}

.book-toc-item .toc-num {
  font-family: var(--serif-en);
  font-size: 14px;
  font-style: italic;
  color: var(--accent-gold);
  letter-spacing: 1px;
  text-align: left;
}

.book-toc-item .toc-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  line-height: 1.5;
  color: inherit;
}

.book-toc-item .toc-progress {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transform: translateY(-2px);
}

.book-toc-item .toc-progress.done { background: #2ecc71; }
.book-toc-item .toc-progress.partial { background: var(--accent-gold); }

.book-toc-item .toc-arrow {
  font-family: var(--serif-en);
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s, transform 0.25s, color 0.25s;
}

.book-toc-item:hover .toc-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent-gold);
}

.book-bib-card {
  margin-top: 40px;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-gold-dim);
  border-radius: 2px;
  background: rgba(201, 162, 77, 0.035);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.book-bib-card-eyebrow {
  font-family: var(--sans-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.book-bib-card-link {
  font-family: var(--serif-kr);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.book-bib-card-link:hover {
  color: var(--accent-gold);
}

.book-bib-card-link .arrow {
  color: var(--accent-gold);
  transition: transform 0.3s;
}

.book-bib-card-link:hover .arrow {
  transform: translateX(4px);
}

.book-bib-card-note {
  font-family: var(--sans-kr);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 720px) {
  .book-hero { padding: 36px 0 32px; }
  .book-hero::before { font-size: 320px; }
  .book-toc-item {
    grid-template-columns: 40px 1fr 14px;
    gap: 14px;
    padding: 16px 6px;
    font-size: 15px;
  }
  .book-toc-item .toc-num { font-size: 12px; }
}

/* ============================================================
   BEHIND THE SCENES CTA (shared)
   ============================================================ */
.bts-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans-kr);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: var(--accent-gold);
  text-decoration: none;
  padding: 14px 32px;
  border: 1px solid var(--accent-gold-dim);
  border-radius: 2px;
  background: rgba(212, 178, 85, 0.025);
  transition: background 0.3s, transform 0.3s;
}

.bts-cta:hover {
  background: rgba(212, 178, 85, 0.08);
  transform: translateY(-1px);
}

.bts-cta .arrow {
  transition: transform 0.3s;
}

.bts-cta:hover .arrow {
  transform: translateX(4px);
}

/* ============================================================
   CHAPTER BODY TYPOGRAPHY POLISH (fulltext only)
   ============================================================ */
.fulltext-page .chapter-body > p:first-of-type::first-letter {
  font-family: var(--serif-en);
  float: left;
  font-size: 4.6em;
  line-height: 0.86;
  font-weight: 700;
  color: var(--accent-gold);
  padding: 6px 10px 0 0;
  margin-top: 6px;
}

.fulltext-page .chapter-body > p:first-of-type {
  text-indent: 0;
}

.fulltext-page .chapter-body .section-divider,
.fulltext-page .chapter-body hr {
  position: relative;
  border: none;
  height: auto;
  background: transparent;
  width: 100%;
  margin: 64px auto;
  text-align: center;
  overflow: visible;
}

.fulltext-page .chapter-body .section-divider::before,
.fulltext-page .chapter-body hr::before {
  content: '◆ ◆ ◆';
  display: inline-block;
  font-size: 9px;
  letter-spacing: 16px;
  color: var(--accent-gold-dim);
  padding: 0 16px;
}

.fulltext-page .chapter-body blockquote {
  position: relative;
  border-left: 2px solid var(--accent-gold-dim);
  padding: 26px 28px 24px 40px;
  margin: 44px 0;
  font-style: italic;
  font-family: var(--serif-kr);
  background: rgba(212, 178, 85, 0.035);
  border-radius: 0 4px 4px 0;
}

.fulltext-page .chapter-body blockquote::before {
  content: '“';
  position: absolute;
  top: -4px;
  left: 10px;
  font-family: var(--serif-en);
  font-size: 58px;
  line-height: 1;
  color: var(--accent-gold-dim);
  opacity: 0.55;
  pointer-events: none;
}

/* ---- Mobile TOC drawer ---- */
@media (max-width: 960px) {
  .toc-sidebar {
    width: 100%;
    top: 0;
    padding-top: 60px;
  }

  .toc-sidebar-toggle {
    display: flex;
  }
}

@media (min-width: 961px) {
  .toc-sidebar-toggle {
    display: none;
  }

  .toc-sidebar {
    transform: translateX(0);
  }

  .fulltext-page .chapter-content {
    margin-left: 280px;
  }
}

/* ---- Mobile header ---- */
@media (max-width: 560px) {
  .fulltext-header {
    padding: 8px 12px;
    gap: 8px;
  }

  .fulltext-back {
    font-size: 12px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Hide secondary signals on narrow screens to prevent header overflow.
     Book title is redundant with the chapter heading below, and progress
     text reappears naturally at the bottom of each page. */
  .fulltext-book-title,
  .fulltext-progress-text {
    display: none;
  }

  /* Tame the chapter body so reading stays comfortable on phones */
  .fulltext-page .chapter-content {
    padding-left: 20px;
    padding-right: 20px;
  }
  .fulltext-page .chapter-body > p:first-of-type::first-letter {
    font-size: 3.6em;
    padding: 4px 8px 0 0;
  }
  .fulltext-page .chapter-body blockquote {
    padding: 20px 20px 18px 24px;
    margin: 32px 0;
  }
  .fulltext-page .chapter-body blockquote::before {
    font-size: 42px;
    left: 6px;
  }
  .fulltext-page .chapter-body .section-divider,
  .fulltext-page .chapter-body hr {
    margin: 44px auto;
  }
  .fulltext-page .chapter-body .section-divider::before,
  .fulltext-page .chapter-body hr::before {
    letter-spacing: 10px;
  }
}

/* ---- Mobile nav adjustments ---- */
@media (max-width: 560px) {
  .fulltext-nav {
    flex-direction: column;
  }

  .fulltext-nav a {
    width: 100%;
  }

  .fulltext-nav a.nav-next {
    text-align: left;
  }

  .email-gate-form {
    flex-direction: column;
  }

  .email-gate-box {
    padding: 32px 20px;
  }
}

/* ---- Behind the scenes page ---- */
.bts-timeline {
  position: relative;
  padding-left: 32px;
  margin-top: 48px;
}

.bts-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.bts-entry {
  position: relative;
  margin-bottom: 48px;
  padding-left: 24px;
}

.bts-entry::before {
  content: '';
  position: absolute;
  left: -37px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: 2px solid var(--bg-deep);
}

.bts-date {
  font-family: var(--sans-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.bts-title {
  font-family: var(--serif-kr);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.bts-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.bts-tool-tag {
  display: inline-block;
  font-family: var(--sans-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 3px;
  margin-right: 6px;
  margin-bottom: 6px;
}

.bts-tool-tag.claude { background: rgba(212, 178, 85, 0.15); color: var(--accent-gold); }
.bts-tool-tag.codex { background: rgba(52, 152, 219, 0.15); color: #3498db; }
.bts-tool-tag.gemini { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.bts-tool-tag.manual { background: rgba(155, 89, 182, 0.15); color: #9b59b6; }

/* Twitter / X follow button (footer) ------------------------------------ */
.footer-social {
  display: flex;
  justify-content: center;
  margin: 18px 0 12px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid rgba(212, 178, 85, 0.35);
  border-radius: 999px;
  color: #d4b255;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: transparent;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
  background: rgba(212, 178, 85, 0.08);
  border-color: rgba(212, 178, 85, 0.7);
  color: #f0d88a;
  transform: translateY(-1px);
  outline: none;
}

.footer-social-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

.footer-social-handle { opacity: 0.95; }

.footer-social-cta {
  opacity: 0.7;
  border-left: 1px solid rgba(212, 178, 85, 0.25);
  margin-left: 4px;
  padding-left: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .footer-social-link { transition: none; }
  .footer-social-link:hover { transform: none; }
}
