/* ==========================================================================
   PAGE/OUT — WEB MAGAZINE NEXT (REV.01)
   Dedicated Novel Reading System (Horizontal + Vertical-RL + Quiet Mode)
   ========================================================================== */

/* Work-Specific Authentic Hero Palettes */
body.work-reunier {
  --hero-bg: #182124;
  --hero-bg-2: #0f1619;
  --hero-ink: #f5f2eb;
  --hero-muted: rgba(245, 242, 235, 0.8);
  --hero-accent: #c89b4b;
  --hero-secondary: #3a5a53;
  --hero-rule: rgba(200, 155, 75, 0.34);
  --hero-panel-bg: rgba(12, 18, 20, 0.72);
  --hero-btn-bg: #c89b4b;
  --hero-btn-ink: #12181a;
  --hero-btn-hover: #ddb467;
  --hero-ghost-border: rgba(245, 242, 235, 0.42);
  --hero-ghost-hover-bg: rgba(245, 242, 235, 0.12);
  --hero-glow: radial-gradient(ellipse 56% 48% at 74% 38%, rgba(200, 155, 75, 0.18), transparent 72%),
               radial-gradient(ellipse 40% 44% at 18% 72%, rgba(58, 90, 83, 0.24), transparent 74%);
}

body.work-flow {
  --hero-bg: #0c2a35;
  --hero-bg-2: #071b23;
  --hero-ink: #f5f2eb;
  --hero-muted: rgba(245, 242, 235, 0.82);
  --hero-accent: #d6af66;
  --hero-secondary: #6a8a94;
  --hero-rule: rgba(214, 175, 102, 0.34);
  --hero-panel-bg: rgba(6, 24, 31, 0.76);
  --hero-btn-bg: #d6af66;
  --hero-btn-ink: #081c24;
  --hero-btn-hover: #e5c37f;
  --hero-ghost-border: rgba(245, 242, 235, 0.44);
  --hero-ghost-hover-bg: rgba(245, 242, 235, 0.12);
  --hero-glow: radial-gradient(ellipse 58% 46% at 72% 36%, rgba(214, 175, 102, 0.16), transparent 72%),
               radial-gradient(ellipse 46% 42% at 20% 78%, rgba(106, 138, 148, 0.22), transparent 72%);
}

body.work-book {
  --hero-bg: #ebe1cc;
  --hero-bg-2: #f4eee0;
  --hero-ink: #1a1a1a;
  --hero-muted: #4b473e;
  --hero-accent: #b84a39;
  --hero-secondary: #4e6648;
  --hero-rule: rgba(78, 102, 72, 0.32);
  --hero-panel-bg: rgba(250, 248, 245, 0.82);
  --hero-btn-bg: #123028;
  --hero-btn-ink: #faf8f5;
  --hero-btn-hover: #1d4a3f;
  --hero-ghost-border: rgba(26, 26, 26, 0.38);
  --hero-ghost-hover-bg: rgba(18, 48, 40, 0.08);
  --hero-glow: radial-gradient(ellipse 50% 42% at 16% 18%, rgba(255, 241, 206, 0.75), transparent 70%),
               radial-gradient(ellipse 44% 38% at 84% 72%, rgba(78, 102, 72, 0.12), transparent 72%);
}

/* Reading Surface Theme Defaults (Washi / Warm / Night) */
.reading-stage,
body.is-quiet {
  --sheet-bg: #faf8f5;
  --sheet-outer: #f1ede4;
  --sheet-ink: #1a1a1a;
  --sheet-muted: #565d58;
  --sheet-rule: rgba(26, 26, 26, 0.14);
  --sheet-bar-bg: rgba(250, 248, 245, 0.96);
  --sheet-btn-bg: transparent;
  --sheet-btn-border: rgba(26, 26, 26, 0.22);
  --sheet-btn-active-bg: #123028;
  --sheet-btn-active-ink: #faf8f5;
  --sheet-accent: #b58b42;
}

.reading-stage[data-theme="warm"],
body.is-quiet[data-theme="warm"] {
  --sheet-bg: #f2eae0;
  --sheet-outer: #e8ded0;
  --sheet-ink: #241f1a;
  --sheet-muted: #655a4e;
  --sheet-rule: rgba(36, 31, 26, 0.16);
  --sheet-bar-bg: rgba(242, 234, 224, 0.96);
  --sheet-btn-border: rgba(36, 31, 26, 0.24);
  --sheet-btn-active-bg: #4b3523;
  --sheet-btn-active-ink: #fbf7f1;
  --sheet-accent: #a67832;
}

.reading-stage[data-theme="night"],
body.is-quiet[data-theme="night"] {
  --sheet-bg: #181d1c;
  --sheet-outer: #111615;
  --sheet-ink: #e7e2d6;
  --sheet-muted: #a4aba5;
  --sheet-rule: rgba(231, 226, 214, 0.18);
  --sheet-bar-bg: rgba(24, 29, 28, 0.96);
  --sheet-btn-border: rgba(231, 226, 214, 0.26);
  --sheet-btn-active-bg: #c9a45c;
  --sheet-btn-active-ink: #141918;
  --sheet-accent: #d4b06a;
}

/* ==========================================================================
   Work-Specific Doorway Hero Band
   ========================================================================== */

.work-hero-band {
  position: relative;
  background: linear-gradient(155deg, var(--hero-bg) 0%, var(--hero-bg-2) 100%);
  color: var(--hero-ink);
  border-bottom: 1px solid var(--hero-rule);
  overflow: hidden;
}

.work-hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-glow);
  pointer-events: none;
}

.work-hero-band > .wrap {
  position: relative;
  z-index: 1;
}

.work-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: clamp(16px, 2.4vw, 24px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hero-rule);
  font-size: 13px;
}

.work-context a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-weight: 600;
  color: var(--hero-ink);
  transition: color 0.2s var(--ease-editorial);
}

.work-context a:hover {
  color: var(--hero-accent);
}

.issue-line {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--hero-muted);
}

.issue-line i {
  font-style: normal;
  color: var(--hero-accent);
  padding-inline: 4px;
}

.work-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 4.5vw, 68px);
  align-items: center;
  padding-block: clamp(28px, 4.4vw, 56px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.work-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hero-accent);
  font-variant-numeric: tabular-nums;
}

.work-meta i {
  width: 18px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

.work-hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  line-height: 1.24;
  letter-spacing: -0.01em;
  color: var(--hero-ink);
}

.work-hero h1 span {
  display: inline-block;
}

.hero-author {
  font-size: 14px;
  color: var(--hero-muted);
}

.hero-author a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  font-weight: 600;
  color: var(--hero-ink);
  border-bottom: 1px solid var(--hero-accent);
  transition: color 0.2s, border-color 0.2s;
}

.hero-author a:hover {
  color: var(--hero-accent);
}

.hero-lead {
  max-width: 36em;
  font-family: var(--font-serif);
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.9;
  color: var(--hero-muted);
}

.entry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.hero-btn-primary,
.hero-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius-xs);
  transition: transform 0.22s var(--ease-editorial), background-color 0.22s, border-color 0.22s;
}

.hero-btn-primary {
  background: var(--hero-btn-bg);
  color: var(--hero-btn-ink);
  border: 1px solid var(--hero-btn-bg);
}

.hero-btn-primary:hover {
  background: var(--hero-btn-hover);
  border-color: var(--hero-btn-hover);
  transform: translateY(-1px);
}

.hero-btn-ghost {
  background: transparent;
  color: var(--hero-ink);
  border: 1px solid var(--hero-ghost-border);
}

.hero-btn-ghost:hover {
  background: var(--hero-ghost-hover-bg);
  border-color: var(--hero-accent);
  transform: translateY(-1px);
}

/* Bookmark Resume Panel in Hero */
.bookmark-panel {
  width: 100%;
  margin-top: 8px;
  padding: 16px 18px;
  background: var(--hero-panel-bg);
  border: 1px solid var(--hero-rule);
  border-left: 3px solid var(--hero-accent);
  border-radius: var(--radius-xs);
  display: grid;
  gap: 12px;
}

.bookmark-panel[hidden] {
  display: none;
}

.bookmark-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--hero-accent);
}

.bookmark-location {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 700;
  color: var(--hero-ink);
}

.bookmark-excerpt {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.65;
  color: var(--hero-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bookmark-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.bookmark-actions [data-resume] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  background: var(--hero-btn-bg);
  color: var(--hero-btn-ink);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-xs);
}

.bookmark-actions [data-clear-bookmark] {
  min-height: 40px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--hero-ghost-border);
  color: var(--hero-muted);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-xs);
}

.bookmark-actions [data-clear-bookmark]:hover {
  color: var(--hero-ink);
  border-color: var(--hero-accent);
}

/* Doorway Framed Official Artwork */
.doorway-frame {
  position: relative;
  padding: 12px;
  border: 1px solid var(--hero-rule);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.08));
  box-shadow: var(--shadow-door);
}

.doorway-frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--hero-rule);
  border-radius: 4px 4px 1px 1px;
  pointer-events: none;
}

.doorway-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: cover;
  border-radius: 2px;
}

.doorway-frame figcaption {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--hero-muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* Coverage Band */
.work-coverage-band {
  background: var(--paper-warm);
  border-bottom: 1px solid var(--rule);
}

.coverage-inner {
  width: var(--container);
  margin-inline: auto;
  padding-block: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
}

.coverage-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
}

.coverage-label span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--terracotta);
}

.coverage-label p {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-deep);
}

.coverage-folio {
  font-size: 12px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Reading Stage & Sticky Typesetting Control Bar
   ========================================================================== */

.reading-stage {
  background: var(--sheet-outer);
  color: var(--sheet-ink);
  scroll-margin-top: calc(var(--mast-h) + 8px);
  transition: background-color 0.25s var(--ease-editorial), color 0.25s var(--ease-editorial);
}

/* Brass Reading Progress Hairline */
.reading-progress {
  position: fixed;
  top: var(--mast-h);
  left: 0;
  right: 0;
  height: 2.5px;
  z-index: 88;
  background: transparent;
  pointer-events: none;
}

.reading-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brass), var(--brass-bright), var(--terracotta));
  transition: width 0.12s linear;
}

body.is-quiet .reading-progress {
  top: 0;
  z-index: 120;
}

/* Quiet Mode Minimal Exit Bar */
.quiet-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 110;
  background: var(--sheet-bar-bg);
  color: var(--sheet-ink);
  border-bottom: 1px solid var(--sheet-rule);
  backdrop-filter: blur(10px);
}

body.is-quiet .quiet-bar {
  display: block;
}

.quiet-bar__inner {
  width: min(1100px, calc(100% - 28px));
  margin-inline: auto;
  min-height: 52px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding-block: 6px;
}

.quiet-bar__left,
.quiet-bar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiet-bar__title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--sheet-ink);
}

.quiet-bar__pct {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--sheet-muted);
}

/* Primary Reader Toolbar */
.reader-bar {
  position: sticky;
  top: var(--mast-h);
  z-index: 80;
  background: var(--sheet-bar-bg);
  border-bottom: 1px solid var(--sheet-rule);
  backdrop-filter: blur(10px);
  transition: background-color 0.25s, border-color 0.25s;
}

.reader-bar__inner {
  width: var(--container);
  margin-inline: auto;
  padding-block: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
}

.reader-controls-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

.control-cluster {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.control-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sheet-muted);
  white-space: nowrap;
}

.seg-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--sheet-btn-border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.seg-btn {
  min-height: 36px;
  padding: 4px 11px;
  border: 0;
  border-right: 1px solid var(--sheet-btn-border);
  background: var(--sheet-btn-bg);
  color: var(--sheet-ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.18s, color 0.18s;
}

.seg-btn:last-child {
  border-right: 0;
}

.seg-btn:hover {
  background: rgba(181, 139, 66, 0.14);
}

.seg-btn[aria-pressed="true"] {
  background: var(--sheet-btn-active-bg);
  color: var(--sheet-btn-active-ink);
}

.theme-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: -1px;
  border: 1px solid rgba(128, 128, 128, 0.45);
}

.theme-swatch--washi { background: #faf8f5; }
.theme-swatch--warm { background: #e9dcc9; }
.theme-swatch--night { background: #181d1c; }

.quiet-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 5px 13px;
  border: 1px solid var(--sheet-accent);
  background: transparent;
  color: var(--sheet-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  transition: background-color 0.18s, color 0.18s;
}

.quiet-toggle-btn:hover,
.quiet-toggle-btn[aria-pressed="true"] {
  background: var(--sheet-btn-active-bg);
  color: var(--sheet-btn-active-ink);
  border-color: var(--sheet-btn-active-bg);
}

/* Chapter Jump Sub-Bar */
.chapter-strip {
  border-top: 1px solid var(--sheet-rule);
}

.chapter-strip__inner {
  width: var(--container);
  margin-inline: auto;
  padding-block: 7px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 12px;
}

.chapter-index {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.chapter-index__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--sheet-muted);
  margin-right: 4px;
}

.chapter-index a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 2px 10px;
  border: 1px solid var(--sheet-btn-border);
  border-radius: var(--radius-xs);
  color: var(--sheet-ink);
  font-family: var(--font-serif);
  font-size: 13px;
  transition: border-color 0.18s, background-color 0.18s, color 0.18s;
}

.chapter-index a:hover,
.chapter-index a[aria-current="location"] {
  border-color: var(--sheet-accent);
  background: rgba(181, 139, 66, 0.14);
}

.chapter-strip__meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--sheet-muted);
  font-variant-numeric: tabular-nums;
}

.chapter-strip__meta a {
  font-weight: 600;
  color: var(--sheet-ink);
  border-bottom: 1px solid var(--sheet-accent);
}

/* ==========================================================================
   Story Sheet — Horizontal & Vertical-RL Typesetting
   ========================================================================== */

.story-shell {
  padding-block: clamp(24px, 4vw, 52px);
}

.story-viewport {
  width: min(940px, calc(100% - clamp(20px, 4vw, 64px)));
  margin-inline: auto;
  background: var(--sheet-bg);
  border: 1px solid var(--sheet-rule);
  border-radius: var(--radius-xs);
  box-shadow: 0 20px 52px -34px rgba(15, 22, 20, 0.28);
  transition: background-color 0.25s, border-color 0.25s;
}

/* Font Sizes (4 steps) */
.prose {
  --prose-size: 17px;
  --prose-leading: 2.02;
  font-family: var(--font-serif);
  font-size: var(--prose-size);
  line-height: var(--prose-leading);
  color: var(--sheet-ink);
  line-break: strict;
  overflow-wrap: anywhere;
  hanging-punctuation: allow-end;
  font-feature-settings: "pkna" 1;
}

.reading-stage[data-size="0"] .prose { --prose-size: 15px; }
.reading-stage[data-size="1"] .prose { --prose-size: 17px; }
.reading-stage[data-size="2"] .prose { --prose-size: 19px; }
.reading-stage[data-size="3"] .prose { --prose-size: 21.5px; }

/* Line Heights (3 steps) */
.reading-stage[data-leading="tight"] .prose { --prose-leading: 1.78; }
.reading-stage[data-leading="normal"] .prose { --prose-leading: 2.02; }
.reading-stage[data-leading="wide"] .prose { --prose-leading: 2.3; }

/* Horizontal Mode Layout */
.reading-stage[data-writing="horizontal"] .prose {
  max-width: 40em;
  margin-inline: auto;
  padding: clamp(32px, 5vw, 68px) clamp(20px, 5vw, 64px);
}

.reading-stage[data-writing="horizontal"] .story-section + .story-section {
  margin-top: clamp(44px, 6vw, 76px);
  padding-top: clamp(36px, 5vw, 60px);
  border-top: 1px solid var(--sheet-rule);
}

.reading-stage[data-writing="horizontal"] .story-section h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.38em;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: var(--sheet-ink);
  margin-bottom: 1.55em;
  padding-bottom: 0.55em;
  border-bottom: 1px solid var(--sheet-rule);
}

.reading-stage[data-writing="horizontal"] .story-section > p {
  margin: 0 0 0.78em;
  scroll-margin-top: 165px;
}

.reading-stage[data-writing="horizontal"] .story-section > p.indent-first {
  text-indent: 1em;
}

/* Vertical-RL Japanese Book Mode */
.reading-stage[data-writing="vertical"] .story-viewport {
  width: min(1180px, calc(100% - clamp(16px, 4vw, 64px)));
  height: min(74vh, 660px);
  min-height: 400px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--sheet-accent) transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  outline-offset: -3px;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 16px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 16px), transparent 100%);
}

.reading-stage[data-writing="vertical"] .prose {
  writing-mode: vertical-rl;
  -webkit-writing-mode: vertical-rl;
  text-orientation: mixed;
  height: 100%;
  width: max-content;
  max-width: none;
  padding: clamp(28px, 4vh, 46px) clamp(44px, 5.5vw, 72px);
  letter-spacing: 0.03em;
}

.reading-stage[data-writing="vertical"] .story-section {
  height: 100%;
  display: block;
}

.reading-stage[data-writing="vertical"] .story-section + .story-section {
  margin-right: 3.4em;
  padding-right: 2.2em;
  border-right: 1px solid var(--sheet-rule);
}

.reading-stage[data-writing="vertical"] .story-section h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.32em;
  line-height: 1.6;
  letter-spacing: 0.08em;
  margin: 0 0.4em 0 2.1em;
  padding-left: 0.65em;
  border-left: 1px solid var(--sheet-rule);
}

.reading-stage[data-writing="vertical"] .story-section > p {
  margin: 0;
  scroll-margin-inline: 48px;
}

.reading-stage[data-writing="vertical"] .story-section > p.indent-first {
  text-indent: 1em;
}

.prose ruby rt {
  font-size: 0.52em;
  line-height: 1;
}

.prose p.is-bookmarked-target {
  background: rgba(181, 139, 66, 0.14);
  border-radius: 2px;
  transition: background-color 1.4s ease;
}

/* Vertical Mode Accessible Pager Controls */
.vertical-nav {
  display: none;
  width: min(1180px, calc(100% - clamp(16px, 4vw, 64px)));
  margin: 14px auto 0;
  padding: 10px 16px;
  background: var(--sheet-bg);
  border: 1px solid var(--sheet-rule);
  border-radius: var(--radius-xs);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reading-stage[data-writing="vertical"] .vertical-nav {
  display: flex;
}

.vertical-nav button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--sheet-btn-border);
  background: transparent;
  color: var(--sheet-ink);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  transition: background-color 0.18s, border-color 0.18s;
}

.vertical-nav button:hover:enabled {
  border-color: var(--sheet-accent);
  background: rgba(181, 139, 66, 0.14);
}

.vertical-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}

.vertical-nav__hint {
  font-size: 12px;
  color: var(--sheet-muted);
  text-align: center;
}

/* ==========================================================================
   Quiet Reading Mode Overrides
   ========================================================================== */

body.is-quiet {
  background: var(--sheet-bg);
  color: var(--sheet-ink);
}

body.is-quiet .site-mast,
body.is-quiet .work-hero-band,
body.is-quiet .work-coverage-band,
body.is-quiet .reader-bar,
body.is-quiet .read-on,
body.is-quiet .other-works,
body.is-quiet .site-footer {
  display: none;
}

body.is-quiet .reading-stage {
  background: var(--sheet-bg);
  min-height: calc(100dvh - 54px);
}

body.is-quiet .story-shell {
  padding-block: clamp(16px, 2.6vw, 32px);
}

body.is-quiet .story-viewport {
  border-color: transparent;
  box-shadow: none;
}

body.is-quiet .reading-stage[data-writing="vertical"] .story-viewport {
  height: calc(100dvh - 148px);
  min-height: 340px;
  border-color: var(--sheet-rule);
}

/* ==========================================================================
   End-of-Work Section: 読書をつなぐ問い & Prev/Next Work Navigation
   ========================================================================== */

.read-on {
  width: var(--container);
  margin: clamp(44px, 6vw, 80px) auto 0;
  padding: clamp(28px, 4vw, 48px);
  background: var(--paper-bright);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--brass);
  border-radius: var(--radius-xs);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(20px, 3.5vw, 44px);
  align-items: center;
}

.read-on__kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--terracotta);
  margin-bottom: 10px;
}

.read-on h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.5;
  color: var(--ink-deep);
}

.read-on-links {
  display: grid;
  gap: 8px;
}

.read-on-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 16px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-deep);
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease-editorial);
}

.read-on-links a:hover {
  border-color: var(--brass);
  background: var(--paper-warm);
  transform: translateX(2px);
}

.read-on-links small {
  font-weight: 500;
  color: var(--ink-soft);
  margin-left: 6px;
}

.other-works {
  width: var(--container);
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}

.other-works a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 68px;
  padding: 14px 18px;
  background: var(--paper-bright);
  border: 1px solid var(--rule);
  border-radius: var(--radius-xs);
  transition: border-color 0.2s, background-color 0.2s;
}

.other-works a:hover {
  border-color: var(--forest);
  background: var(--paper-warm);
}

.other-works a small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--terracotta);
}

.other-works a span {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-deep);
}

.other-works a:last-child {
  text-align: right;
}

.other-works .back-contents {
  text-align: center;
  align-items: center;
  padding-inline: 22px;
  font-size: 13px;
  font-weight: 700;
  color: var(--forest);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 960px) {
  .work-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .doorway-frame img {
    max-height: 360px;
  }

  .read-on {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  /* Keep site header non-sticky on mobile novel pages so controls & reading area are never occluded */
  .site-mast {
    position: relative;
  }

  .reading-progress {
    top: 0;
  }

  .reader-bar {
    position: static;
  }

  .reading-stage[data-size="1"] .prose {
    --prose-size: 16.5px;
  }

  .reader-bar__inner {
    padding-block: 10px;
    gap: 8px;
  }

  .reader-controls-group {
    width: 100%;
    gap: 8px 10px;
  }

  .control-cluster {
    flex-wrap: wrap;
    gap: 5px;
  }

  .seg-btn {
    min-height: 38px;
    padding: 4px 9px;
  }

  .quiet-toggle-btn {
    min-height: 40px;
  }

  .reading-stage[data-writing="vertical"] .story-viewport {
    height: min(68dvh, 540px);
    min-height: 340px;
  }

  .vertical-nav {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 12px;
  }

  .vertical-nav__hint {
    order: 3;
    width: 100%;
    font-size: 11px;
  }

  .other-works {
    grid-template-columns: 1fr;
  }

  .other-works a:last-child {
    text-align: left;
  }
}
