/* ── Poem page ───────────────────────────────────────────── */
.poem-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.poem-page h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #f0f0f0;
  margin: 0 0 2.5rem;
}

/* ── Links (same as article) ─────────────────────────────── */
.poem-page a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(#ff6a00, #ff6a00);
  background-repeat: no-repeat;
  background-size: calc(100% + 4px) 3px;
  background-position: -2px 92%;
  transition: background-color 0.15s ease;
}

.poem-page a:hover {
  color: inherit;
  background-color: rgba(255, 106, 0, 0.15);
}

/* ── Layout ──────────────────────────────────────────────── */
.poem-layout {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.poem-col {
  width: 58%;
  padding-right: 2rem;
  font-size: 1rem;
  line-height: 1.85;
  color: #c0c0c0;
}

/* ── Annotated sections ──────────────────────────────────── */
.poem-section {
  margin-bottom: 0.1rem;
}

.poem-section.has-annotation {
  cursor: pointer;
  margin-bottom: 4px;
}

/* Per-line highlight spans — follow text width exactly */
.line-highlight {
  background:rgb(147 61 0) ;
  border-radius: 2px;
  padding: 0.05em 0.2em;
  transition: background 0.15s ease;
}

.poem-section.has-annotation:hover .line-highlight {
  background: rgb(255, 106, 0);
}

.poem-section.has-annotation.active .line-highlight {
  background: rgb(255, 106, 0);
}

.poem-stanza-gap { height: 1rem; }

/* ── Divider — vertical line + arrow ────────────────────── */
.poem-divider {
  width: 1px;
  background: #2a2a2a;
  position: relative;
  flex-shrink: 0;
  align-self: stretch;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.poem-divider.arrow-visible { opacity: 1; }

.poem-divider::before {
  content: '';
  position: absolute;
  left: -6px;
  top: var(--arrow-top, 50%);
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #0d0d0d;
  border-top: 1px solid #ff6a00;
  border-right: 1px solid #ff6a00;
  transition: top 0.2s ease;
}

/* ── Annotation column (desktop) ─────────────────────────── */
.annotation-col {
  width: 42%;
  padding-left: 2rem;
  position: sticky;
  top: 2rem;
}

.annotation-panel {
  max-height: 70vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.annotation-panel-content {
  font-size: 0.9rem;
  color: #c0c0c0;
  line-height: 1.7;
}

.annotation-panel-content img {
  max-width: 100%;
  border-radius: 4px;
  margin: 0.5rem 0;
}

/* ── Desktop annotation close button ────────────────────── */
.annotation-col-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.annotation-close {
  background: none;
  border: none;
  color: #555;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
}

.annotation-close:hover { color: #aaa; }

/* ── Nav with "more →" link ──────────────────────────────── */
.site-nav-poem {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Mobile poem sheet ───────────────────────────────────── */
@media (max-width: 767px) {
  .poem-layout { display: block; }
  .poem-col { width: 100%; padding-right: 0; padding-bottom: 60vh; }
  .poem-divider { display: none; }
  .annotation-col { display: none; }

  .annotation-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60vh;
    background: #111;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
  }

  .annotation-sheet.open { transform: translateY(0); }

  .annotation-sheet-header {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 1rem 0.5rem;
    flex-shrink: 0;
  }

  .annotation-sheet-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem 1.25rem 2rem;
    font-size: 0.9rem;
    color: #c0c0c0;
    line-height: 1.7;
  }

  .annotation-sheet-body img {
    max-width: 100%;
    border-radius: 4px;
  }
}
