.head-actions { gap: clamp(8px, 1.05vw, 18px); }
.contact-letter {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; color: var(--red);
  background: color-mix(in srgb, var(--red) 5%, transparent);
  transition: background .18s, color .18s;
}
.contact-letter svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.contact-letter:is(:hover, :focus-visible) { background: var(--red); color: var(--card); }
.mastrow .search-open { min-width: 42px; min-height: 44px; justify-content: center; }

button.reading-top {
  position: fixed; right: max(clamp(14px, 2vw, 34px), env(safe-area-inset-right));
  bottom: calc(clamp(16px, 2vw, 32px) + env(safe-area-inset-bottom)); z-index: 9;
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid #ffffff70; border-radius: 50%;
  background: var(--deep); color: #fff8e8; box-shadow: 0 3px 14px #30131938;
  transition: background .2s, transform .2s;
}
.reading-top svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
button.reading-top:hover { background: var(--red); transform: translateY(-2px); }
button.reading-top[hidden], body:has(dialog[open], #navigation.open) button.reading-top { display: none; }

main#contenu { position: relative; }
.manuscript-column {
  --gutter: max(var(--side), calc((100% - 1440px) / 2));
  --rail-width: min(158px, calc(var(--gutter) - 18px));
  position: absolute; z-index: 4; inset-block: 0; left: calc((var(--gutter) - var(--rail-width)) / 2);
  width: var(--rail-width); pointer-events: none; user-select: none; overflow: clip;
  color: var(--book-accent, var(--red));
}
.manuscript-sheet {
  position: sticky; top: max(38px, 6vh); display: block; width: 100%;
  height: min(calc(100% - 22px), 85vh); margin-top: 14px; overflow: visible;
}
.manuscript-guide, .manuscript-rule, .manuscript-ink { fill: none; stroke: currentColor; stroke-linecap: round; }
.manuscript-guide { opacity: .24; stroke-width: 1.05; }
.manuscript-glint { fill: none; stroke: #f5dfbc; opacity: .44; stroke-width: 1px; }
.manuscript-rule { opacity: .17; stroke-width: .8; }
.manuscript-ink { opacity: .83; stroke-width: 1.45; }
.manuscript-word {
  font: italic 27px/1 var(--serif); letter-spacing: -.35px; fill: currentColor;
  paint-order: stroke; stroke: #fff7e9; stroke-width: 2px; stroke-opacity: .88;
}
.manuscript-pencil { opacity: .48; }
.manuscript-plume { filter: drop-shadow(0 0 1.8px #fff3df); }
body:has(dialog[open]) .manuscript-column { visibility: hidden; }
@media (max-width: 750px) {
  .head-actions { gap: 5px; }
  button.reading-top { width: 44px; height: 44px; }
}
@media (max-width: 1399px), (max-height: 559px), (prefers-reduced-motion: reduce), print {
  .manuscript-column { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-letter, button.reading-top { transition: none; }
  button.reading-top:hover { transform: none; }
}
@media print { button.reading-top { display: none; } }
