/* ============================================================
   Anne Clarke — design tokens
   Warm off-white "paper" + warm near-black "ink".
   Avoid pure white/black. One restrained accent. Tone over lines.
   ============================================================ */
:root {
  /* layout */
  --sidebar-w: 200px;
  --content-max: 640px;
  --radius: 4px;
  --transition: 200ms ease;

  /* type */
  --font-serif: "Times New Roman", "Iowan Old Style", "Charter", "Georgia", serif;
  --font-serif-ko: "Apple Myungjo", "Nanum Myeongjo", "Noto Serif KR",
    "AppleMyungjo", "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  /* seal (낙관) — vermilion stamp; recolor per theme */
  --seal-bg: #9B2D20;
  --seal-fg: #FBF9F4;

  /* light palette — warm paper + ink */
  --bg: #FBF9F4;
  --bg-elev: #F4F1E9;
  --text: #2A2622;
  --text-muted: #79736B;
  --rule: #E5E0D6;
  --accent: #8B6F47;
  --sidebar-bg: #F4F1E9;
}

[data-theme="dark"] {
  /* dark palette — warm ink */
  --bg: #1B1815;
  --bg-elev: #221F1B;
  --text: #ECE6D9;
  --text-muted: #908A7C;
  --rule: rgba(236, 230, 217, 0.10);
  --accent: #C9A876;
  --sidebar-bg: #16130F;
  --seal-bg: #B83227;
  --seal-fg: #FBF1E0;
}

[data-theme="splatter"] {
  /* splatter palette — picks up cool slate-blue base + cream splatter highlights */
  --bg: transparent;
  --bg-elev: rgba(22, 30, 42, 0.70);
  --text: #ECE9E0;
  --text-muted: #B6BFCB;
  --rule: rgba(236, 233, 224, 0.18);
  --accent: #B8C7DA;
  --sidebar-bg: rgba(20, 28, 40, 0.78);
  --seal-bg: #B83227;
  --seal-fg: #F0E6D2;
}

/* ============================================================
   Reset + base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color var(--transition), color var(--transition);
}

[data-theme="splatter"] body {
  background-color: #2A3340;
  background-image: url("assets/provided-by-anne/splatter.jpg");
  background-size: cover;
  background-position: left bottom;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition), color var(--transition);
}
a:hover {
  text-decoration-color: var(--accent);
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ============================================================
   Sidebars
   Width preserved on collapse — only the body fades.
   No borders; tone difference separates regions.
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 2;
  transition: background-color var(--transition);
}

[data-theme="splatter"] .sidebar {
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}

.sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin: -4px 0 12px -8px;
  transition: color var(--transition), background-color var(--transition);
}
.sidebar-right .sidebar-toggle {
  align-self: flex-end;
  margin: -4px -8px 12px 0;
}
.sidebar-toggle:hover {
  color: var(--text);
}
.sidebar-toggle:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.sidebar-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: opacity var(--transition);
}
.sidebar.collapsed .sidebar-body {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.sidebar-brand {
  font-style: italic;
  font-size: 18px;
  line-height: 1.2;
  color: var(--text);
  margin: 4px 0 32px;
}
.sidebar-right .sidebar-brand {
  font-style: normal;
  font-size: 11px;
  font-variant: all-small-caps;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  position: relative;
  background: transparent;
  border: none;
  color: var(--text-muted);
  text-align: left;
  text-decoration: none;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  padding: 6px 0 6px 14px;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  transition: color var(--transition);
}
.nav-item:hover {
  color: var(--text);
}
.nav-item:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.nav-item[aria-current="page"] {
  color: var(--text);
  font-style: italic;
}
.nav-item[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 14px;
  background: var(--accent);
}

.nav-icon {
  display: none; /* lean editorial — text only */
}

/* ============================================================
   Main
   ============================================================ */
.main {
  flex: 1;
  min-width: 0;
  padding: 64px 56px 96px;
  position: relative;
  z-index: 1;
}

/* Theme toggle — fixed pill in the bottom-right corner of the viewport,
   persists across pages and themes. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 2px;
  background: var(--bg-elev);
}
.theme-toggle--fixed {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  box-shadow: 0 4px 16px -6px rgba(0, 0, 0, 0.18),
    0 1px 3px rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .theme-toggle--fixed {
  box-shadow: 0 4px 16px -6px rgba(0, 0, 0, 0.6),
    0 1px 3px rgba(0, 0, 0, 0.35);
}
[data-theme="splatter"] .theme-toggle--fixed {
  background: rgba(18, 26, 38, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.theme-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: color var(--transition), background-color var(--transition);
}
.theme-btn:hover {
  color: var(--text);
}
.theme-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}
.theme-btn[aria-pressed="true"] {
  background: var(--bg-elev);
  color: var(--text);
}

/* ============================================================
   Sections
   One H1 per section. Generous space. No card boxes.
   ============================================================ */
.section {
  max-width: var(--content-max);
  margin: 0 auto;
}

[data-theme="splatter"] .section {
  padding: 36px 40px;
  background: rgba(18, 26, 38, 0.62);
  border: 1px solid rgba(236, 233, 224, 0.07);
  border-radius: 4px;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.section-title {
  font-size: 40px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 40px;
  color: var(--text);
}

.section p {
  margin: 0 0 1.2em;
  color: var(--text);
}

.epigraph {
  margin: 0 0 44px;
  padding: 0 0 0 24px;
  border-left: 1px solid var(--accent);
}
.epigraph p {
  margin: 0;
  font-size: 24px;
  line-height: 1.4;
  font-style: italic;
  color: var(--text);
}
.epigraph cite {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.4;
  font-style: normal;
  color: var(--text-muted);
}

/* Projects — borderless list with typographic hierarchy */
.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.card {
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.card:first-child {
  border-top: none;
  padding-top: 0;
}
.card h3 {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--text);
}
.card p {
  color: var(--text-muted);
  margin: 0;
}
.card .card-kicker {
  margin-bottom: 6px;
  font-size: 14px;
}
.project-experiments {
  margin: 10px 0 0;
  padding-left: 1.4em;
  color: var(--text-muted);
}
.project-experiments li + li {
  margin-top: 8px;
}

/* Writing — same editorial list treatment */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.post {
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.post:first-child {
  border-top: none;
  padding-top: 0;
}
.post h3 {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 4px;
  color: var(--text);
}
.post time {
  display: block;
  font-style: italic;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.post p {
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   Mobile — sidebars become top/bottom rails
   ============================================================ */
@media (max-width: 800px) {
  body {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
  }
  .sidebar-toggle {
    display: none;
  }
  .sidebar-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    width: 100%;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar.collapsed .sidebar-body {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar-brand {
    margin: 0;
    flex-shrink: 0;
  }
  .sidebar-nav {
    flex-direction: row;
    gap: 18px;
    flex-wrap: wrap;
  }
  .nav-item {
    width: auto;
    padding: 4px 0 4px 10px;
  }
  .nav-item[aria-current="page"]::before {
    height: 12px;
  }
  .main {
    padding: 40px 24px 80px;
  }
  .section-title {
    font-size: 32px;
    margin-bottom: 32px;
  }
  .theme-toggle--fixed {
    right: 12px;
    bottom: 12px;
  }
}

/* ============================================================
   Read Me — June Huh edition
   Pléiade/Norton sensibility: the poem is the figure, all chrome
   recedes. Wider measure than the rest of the site to hold a
   bilingual spread. Warm restraint; the only saturated color
   is the 낙관 (red seal).
   ============================================================ */

.section--vault {
  max-width: 880px;
}

.reading {
  position: relative;
  margin-top: -8px;
}

.reading-header {
  text-align: center;
  margin-bottom: 64px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}

.reading-byline {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 6px;
  font-style: italic;
  color: var(--text);
}
.reading-byline-ko {
  font-style: normal;
  font-family: var(--font-serif-ko);
  margin-left: 6px;
  color: var(--text-muted);
}
.reading-source {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 18px;
  font-style: italic;
}
.reading-source em {
  font-style: italic;
}
.reading-source-detail {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  margin-top: 2px;
}

/* Language toggle — small, quiet, segmented */
.reading-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 2px;
  margin-top: 4px;
}
.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition);
}
.lang-btn:hover {
  color: var(--text);
}
.lang-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}
.lang-btn[aria-pressed="true"] {
  background: var(--bg-elev);
  color: var(--text);
}

[data-theme="splatter"] .reading-toggle {
  background: rgba(18, 26, 38, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Vault index — list of clickable entry cards (just title + subtitle) */
.reading-index {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.reading-entry-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  transition: color var(--transition);
}
.reading-index > .reading-entry-card:first-child {
  border-top: none;
  padding-top: 0;
}
.reading-entry-card:hover .reading-entry-title {
  color: var(--accent);
}
.reading-entry-title {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 10px;
  color: var(--text);
  transition: color var(--transition);
}
.reading-entry-subtitle {
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
  max-width: 56ch;
}
.reading-entry-subtitle em {
  font-style: italic;
}

/* Poem toggle — switches the poem in place on the poem page */
.poem-toggle {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0;
  margin: 0 auto 40px;
  padding: 8px 0 0;
  border-top: 1px solid var(--rule);
}
.poem-toggle-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  padding: 10px 16px;
  transition: color var(--transition);
}
.poem-toggle-btn + .poem-toggle-btn {
  border-left: 1px solid var(--rule);
}
.poem-toggle-btn:hover {
  color: var(--text);
}
.poem-toggle-btn[aria-current="page"] {
  color: var(--text);
}
.poem-toggle-btn[aria-current="page"] .poem-toggle-en {
  font-style: italic;
}
.poem-toggle-ko {
  font-family: var(--font-serif-ko);
}
.poem-toggle-sep {
  color: var(--rule);
}
.poem-toggle-en {
  font-family: var(--font-serif);
}

/* Tighten the poem view — the poem itself should sit near the top.
   Hide the "Vault" section title and trim the section padding. */
.section--vault.vault-poem-view > .section-title {
  display: none;
}
.section--vault.vault-poem-view {
  padding-top: 24px;
}
.vault-poem-view .poem-page-chrome {
  margin: 0 0 16px;
}
.vault-poem-view .poem-header {
  margin-top: 8px;
}

/* Back link from entry detail to index */
.reading-back {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 28px;
  padding: 4px 0;
}
.reading-back:hover {
  color: var(--text);
}

.poem-index {
  list-style: none;
  margin: 0;
  padding: 0;
}
.poem-index li {
  border-top: 1px solid var(--rule);
}
.poem-index li:first-child {
  border-top: none;
}
.poem-index-entry {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  text-decoration: none;
  color: var(--text);
  transition: color var(--transition);
}
.poem-index-entry:hover .poem-index-title,
.poem-index-entry:hover .poem-index-page {
  color: var(--accent);
}
.poem-index-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text);
  transition: color var(--transition);
  flex-wrap: wrap;
}
.poem-index-ko {
  font-family: var(--font-serif-ko);
}
.poem-index-sep {
  color: var(--rule);
  font-size: 16px;
  position: relative;
  top: -1px;
}
.poem-index-en em {
  font-style: italic;
}
.poem-index-page {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--transition);
}

/* Level 3 — individual poem page chrome */
.poem-page-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -8px 0 64px;
  flex-wrap: wrap;
  gap: 16px;
}
.poem-page-chrome .reading-back {
  margin-bottom: 0;
}

/* Single-poem stage */
.poem-stage {
  position: relative;
}
.poem {
  position: relative;
}

/* Manuscript-note (no image; just an editorial line about why no transcription) */
.manuscript-note {
  margin: 36px auto 0;
  max-width: 32em;
  text-align: center;
  font-style: italic;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Poem header: seal + bilingual title centered */
.poem-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
  text-align: center;
}

.poem-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.poem-title {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.title-ko {
  font-family: var(--font-serif-ko);
}
.title-en em {
  font-style: italic;
}
.title-sep {
  color: var(--rule);
  font-size: 16px;
  position: relative;
  top: -3px;
}
.poem-page {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-style: normal;
}

/* 낙관 — vermilion seal stamp, slightly tilted */
.seal {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--seal-bg);
  color: var(--seal-fg);
  font-family: var(--font-serif-ko);
  font-weight: 600;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0;
  padding: 4px 4px 5px;
  border-radius: 2px;
  transform: rotate(-2.5deg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.18);
  user-select: none;
}
.seal-char {
  display: block;
  margin: 0.5px 0;
}

/* Poem body — bilingual two-column, centered as a block within the section */
.poem-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  max-width: 720px;
  margin: 0 auto;
}

.poem-col {
  font-size: 17px;
  line-height: 1.95;
  color: var(--text);
}
.poem-col--ko {
  font-family: var(--font-serif-ko);
  text-align: left;
}
.poem-col--en {
  font-family: var(--font-serif);
  font-style: italic;
  text-align: left;
}
.poem-col .line {
  margin: 0 0 0.2em;
}
/* Empty Korean/English line preserves vertical rhythm */
.poem-col .line:empty::before,
.poem-col .line:has(> :only-child:empty)::before {
  content: "\00a0";
}

/* Manuscript variant (poem 1) */
.poem-body--manuscript {
  display: block;
  text-align: center;
}
.manuscript {
  margin: 0 auto;
  max-width: 480px;
}
.manuscript img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 6px 24px -8px rgba(0, 0, 0, 0.18),
    0 1px 3px rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .manuscript img,
[data-theme="splatter"] .manuscript img {
  box-shadow: 0 6px 24px -8px rgba(0, 0, 0, 0.6),
    0 1px 3px rgba(0, 0, 0, 0.4);
}
.manuscript figcaption {
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.55;
  max-width: 38em;
  margin-left: auto;
  margin-right: auto;
}

/* Word spans — clickable, with quiet states */
.w {
  cursor: pointer;
  transition: color 100ms ease, background-color 100ms ease;
  border-radius: 2px;
  padding: 0 1px;
}
.w[data-note]::after {
  content: "·";
  color: var(--accent);
  margin-left: 1px;
  font-weight: 700;
  position: relative;
  top: -0.4em;
  font-size: 0.7em;
}
.w:hover {
  color: var(--accent);
}
.w.is-active {
  color: var(--seal-bg);
  background: rgba(155, 45, 32, 0.08);
}
[data-theme="dark"] .w.is-active,
[data-theme="splatter"] .w.is-active {
  color: var(--seal-fg);
  background: rgba(184, 50, 39, 0.30);
}
.w.is-linked {
  color: var(--seal-bg);
  text-decoration: underline;
  text-decoration-color: var(--seal-bg);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
[data-theme="dark"] .w.is-linked,
[data-theme="splatter"] .w.is-linked {
  color: var(--seal-fg);
  text-decoration-color: var(--seal-fg);
}

/* Word popover — translation + connotation */
.word-popover {
  position: absolute;
  z-index: 6;
  max-width: 320px;
  min-width: 200px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 12px 14px;
  box-shadow: 0 8px 28px -10px rgba(0, 0, 0, 0.25),
    0 1px 4px rgba(0, 0, 0, 0.06);
  font-size: 14px;
  line-height: 1.5;
}
[data-theme="dark"] .word-popover {
  background: var(--bg-elev);
}
[data-theme="splatter"] .word-popover {
  background: rgba(18, 26, 38, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.word-popover-headword {
  font-family: var(--font-serif-ko);
  font-size: 17px;
  color: var(--text);
  margin-bottom: 4px;
}
.word-popover-gloss {
  color: var(--text-muted);
  font-style: italic;
}
.word-popover-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
  color: var(--text);
  font-style: normal;
  font-size: 13.5px;
}
.word-popover-note:empty {
  display: none;
}

/* Notes section — Norton-style apparatus */
.poem-notes {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}
.poem-notes-title {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.poem-notes ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.poem-notes li {
  padding-left: 14px;
  border-left: 1px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}
.poem-notes li.is-active {
  border-left-color: var(--seal-bg);
  color: var(--text);
}
.poem-note-head {
  font-family: var(--font-serif-ko);
  font-weight: 600;
  color: var(--text);
}

/* Language-toggle visibility */
.reading.lang-ko .poem-col--en { display: none; }
.reading.lang-ko .title-en,
.reading.lang-ko .title-sep { display: none; }
.reading.lang-en .poem-col--ko { display: none; }
.reading.lang-en .title-ko,
.reading.lang-en .title-sep { display: none; }
.reading.lang-ko .poem-body,
.reading.lang-en .poem-body {
  grid-template-columns: 1fr;
  max-width: 560px;
  margin: 0 auto;
}

/* Mobile collapse: stack columns */
@media (max-width: 800px) {
  .section--read-me {
    max-width: 100%;
  }
  .poem-list {
    gap: 64px;
  }
  .poem-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .poem-title {
    font-size: 22px;
  }
  .poem-col {
    font-size: 16px;
    line-height: 1.85;
  }
  .reading-byline {
    font-size: 19px;
  }
  .word-popover {
    max-width: calc(100vw - 48px);
  }
}
