:root {
  --fg: #e5eaf2;
  --muted: #8d96a5;
  --bg: #11141b;
  --paper: #1c222d;
  --accent-base: #9fb3cc; 
  --accent-crimson: #993333; /* BRIGHTER CRIMSON */
  --accent-crimson-hover: #b54747; /* BRIGHTER HOVER STATE */
  --border: #323a48;

  /* Admin Status Colors */
  --status-synced: #438f4d; /* Green */
  --status-needs-pass: #b08d4b; /* Yellow/Brown */
  --status-outline: #5c6778; /* Grey */
}
/* Import the professional display font */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&display=swap');

html, body {
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--fg);
  font-family:"Noto Serif JP","Iowan Old Style","Palatino","Hiragino Mincho ProN","Yu Mincho","Times New Roman",serif;
  font-size:17px;
  line-height:1.75;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
/* --- Hero Section & General Layout (index.html) --- */
.hero {
  display: flex;
  justify-content: center;
  padding: clamp(2rem, 6vw, 4rem) 1rem;
  background-image: linear-gradient(180deg, rgba(17, 20, 27, 0.9) 0%, var(--bg) 85%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero__frame {
  width: min(100%, clamp(18rem, 50vw, 55rem));
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__image {
  display: block;
  width: 100%;
  height: auto;
}

.content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem) 1rem;
}

.nav-pane {
  position: relative;
  width: min(100%, 56rem);
  padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 6vw, 3.5rem);
  /* Lowered opacity for see-through effect */
  background: rgba(18, 18, 18, 0.4); 
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.nav-pane__heading {
  font-family: 'Cinzel', serif; /* Used Cinzel */
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: clamp(1.4rem, 2.8vw, 1.8rem); /* Slightly larger */
  margin-bottom: 1rem;
  color: var(--fg);
}

.nav-pane__intro {
  max-width: 50ch;
  margin: 0 auto 2rem;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: var(--muted);
  letter-spacing: 0.05em;
}

.acts-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
}

.act-card {
  position: relative;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--accent-crimson); /* Unified accent color */
  background: rgba(10, 10, 10, 0.6);
  color: var(--accent-crimson);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-family: 'Cinzel', serif; /* Used Cinzel */
  font-size: clamp(1.1rem, 2vw, 1.3rem); 
  letter-spacing: 0.25em;
  transition: all 0.35s ease;
}

.act-card:not(.act-card--disabled):hover,
.act-card:not(.act-card--disabled):focus-visible {
  color: var(--accent-crimson-hover);
  border-color: var(--accent-crimson-hover);
  box-shadow: 0 0 25px rgba(179, 66, 66, 0.5); /* Crimson glow on hover */
  transform: translateY(-4px);
  background: rgba(18, 10, 10, 0.7);
}

.act-card--disabled {
  cursor: not-allowed;
  opacity: 0.45; /* Less aggressive than filter/blur */
  pointer-events: none;
  user-select: none;
  border-color: var(--border);
  color: var(--muted);
  background: rgba(10, 10, 10, 0.8);
  box-shadow: none;
}

.site-footer {
  /* Positioned to be visible below the hero/content area */
  padding: 1.5rem 1rem;
  background: #040404;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: clamp(0.7rem, 1.7vw, 0.8rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- End index.html specific styles --- */

header {
  position:sticky;
  top:0;
  background:rgba(13,16,22,.88);
  border-bottom:1px solid rgba(79,88,104,.7);
  padding:0.85rem 1.5rem 0.9rem;
  backdrop-filter:saturate(110%) blur(4px);
}
.toc-hero {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.45rem;
  text-align:center;
  padding:2rem clamp(1rem,5vw,3rem) 2.15rem;
  margin-bottom:2.1rem;
  /* Updated Gradient for Dark/Ash look */
  background:linear-gradient(130deg, #0f1115 0%, #171a1f 45%, #21252b 78%, var(--accent-crimson) 100%);
  color:#f7f8fb;
  border-bottom:1px solid rgba(255,255,255,.12);
  box-shadow:0 24px 60px rgba(16,21,28,.35);
  position:relative;
  overflow:hidden;
}
.toc-hero::after {
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(120% 120% at 80% 20%, rgba(255,255,255,.2) 0%, rgba(255,255,255,0) 55%);
  pointer-events:none;
}
.toc-hero::before {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(17,20,27,.65) 0%, rgba(17,20,27,0) 65%);
  pointer-events:none;
}
.hero-title {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.3rem;
  position:relative;
  z-index:1;
  transition: transform 0.1s ease-out; /* Added for Parallax JS hook */
}
.hero-kanji {
  margin:0;
  font-size:clamp(3.2rem,6.2vw,4.1rem);
  font-family: 'Cinzel', serif; 
  text-shadow:0 0 12px rgba(0,0,0,.65);
  display:flex;
  align-items:center;
  gap:1.25rem;
}
.hero-name {
  margin:0;
  font-size:clamp(1.35rem,3.2vw,1.8rem);
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
  font-family: 'Cinzel', serif; 
  text-shadow:0 0 8px rgba(0,0,0,.5);
}
.hero-tagline {
  margin:.3rem 0 0;
  font-size:1rem;
  color:rgba(236,240,247,.92);
  letter-spacing:.22em;
  position:relative;
  z-index:1;
  text-shadow:0 0 5px rgba(0,0,0,.4);
}
.hero-badge {
  font-size:.65rem;
  letter-spacing:.42em;
  text-transform:uppercase;
  color:#f5f7ff;
  background:rgba(23,27,36,.9);
  border:1px solid rgba(110,122,146,.6);
  padding:.35rem .95rem .32rem;
  border-radius:999px;
  text-shadow:none;
  box-shadow:0 12px 28px rgba(10,14,20,.4);
}
.hero-badge--left {
  order:-1;
}
.hero-badge--right {
  order:1;
}
h1, h2, h3 { margin:0 0 .5rem 0; line-height:1.25; }
h1 { font-size:1.5rem; }
p { margin:0 0 1.35rem; }
main {
  max-width:1100px;
  margin:1.75rem auto 4rem;
  padding:2.1rem clamp(1rem,4vw,2.5rem) 3.1rem;
  background:linear-gradient(180deg, rgba(18,20,27,.9) 0%, rgba(18,21,28,.75) 100%);
  border:1px solid rgba(52,59,70,.9);
  border-radius:22px;
  box-shadow:0 28px 60px rgba(4,6,10,.6);
}
.plot-bar {
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
  justify-content:center;
  margin:0 auto 1.85rem;
  width:100%;
}
.plot-tab {
  appearance:none;
  border:1px solid rgba(88,102,122,.6);
  background:rgba(40,46,58,.72);
  color:#dbe3ee;
  font-size:.85rem;
  font-weight:600;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:.45rem .85rem;
  border-radius:999px;
  cursor:pointer;
  transition:background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.plot-tab:hover {
  background:rgba(66,75,92,.85);
  transform:translateY(-1px);
  border-color:rgba(102,115,134,.85);
  color:#f1f5fb;
}
.plot-tab.is-active {
  background:var(--accent-crimson);
  color:#f9f0f2;
  border-color:var(--accent-crimson-hover);
  box-shadow:0 14px 28px rgba(46,14,24,.35);
}
.plot-tab--clear {
  border:1px solid rgba(102,111,125,.55);
  background:rgba(24,28,36,.85);
  color:#d8deea;
}
.plot-tab--clear:hover {
  background:rgba(43,50,61,.92);
  border-color:rgba(132,142,158,.75);
  color:#f1f5fb;
}
.plot-tab--clear.is-active {
  background:var(--accent-crimson);
  color:#f9f0f2;
  border-color:var(--accent-crimson-hover);
  box-shadow:0 14px 28px rgba(46,14,24,.35);
}
.plot-panel {
  display:none;
  flex-direction:column;
  gap:1.1rem;
  margin-bottom:2.3rem;
  padding:1.35rem 1.5rem 1.6rem;
  border-radius:18px;
  background:linear-gradient(150deg, rgba(22,26,34,.92), rgba(30,35,45,.88));
  box-shadow:0 24px 48px rgba(6,8,12,.55);
  border:1px solid rgba(65,74,90,.75);
  color:#e5ecf7;
}
.plot-panel.is-visible {
  display:flex;
}
.plot-panel__header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:.75rem;
  color:#f2f5fc;
}
.plot-panel__title {
  margin:0;
  font-size:1.05rem;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#f6f8ff;
}
.plot-panel__close {
  appearance:none;
  border:none;
  background:transparent;
  font-size:1.35rem;
  line-height:1;
  padding:.15rem;
  cursor:pointer;
  color:#97a1b4;
  transition:color .2s ease, transform .2s ease;
}
.plot-panel__close:hover {
  color:#f6f8ff;
  transform:scale(1.05);
}
.plot-panel__grid {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px,1fr));
  gap:1rem 2rem;
  margin:0;
}
.plot-panel__grid dt {
  font-size:.78rem;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:#8fa1ba;
  margin:0 0 .35rem;
}
.plot-panel__grid dd {
  margin:0;
  font-size:.92rem;
  color:#e8eef9;
}
.plot-panel__actions {
  display:flex;
  justify-content:flex-start;
}
.plot-filter {
  appearance:none;
  border:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  background:var(--accent);
  color:#fff;
  font-size:.8rem;
  font-weight:600;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:.45rem .95rem;
  border-radius:999px;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.plot-filter:hover {
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(24,28,36,.35);
  background:var(--accent-crimson);
}
.plot-filter.is-active {
  background:var(--accent-crimson);
  box-shadow:0 12px 26px rgba(46,14,24,.32);
}
.plot-filter:disabled {
  cursor:not-allowed;
  opacity:.35;
  box-shadow:none;
  transform:none;
  background:rgba(92,103,122,.55);
  color:rgba(235,240,248,.55);
}
.plot-filter.is-active {
  background:var(--accent-crimson);
  box-shadow:0 12px 26px rgba(46,14,24,.32);
}
.chapter.toc-entry {
  transition:transform .25s ease, box-shadow .25s ease, opacity .25s ease;
  position: relative; /* Needed for status flag positioning */
}
/* New Status Flag Styling */
.chapter.toc-entry::before {
    content: attr(data-status);
    position: absolute;
    top: 0;
    right: 0;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .3rem .75rem;
    border-top-right-radius: 18px;
    border-bottom-left-radius: 12px;
    background: var(--status-synced); /* Default/Fallback */
    color: #f7f8ff;
    z-index: 10;
    box-shadow: -2px 2px 4px rgba(0,0,0,0.3);
}

.chapter.toc-entry[data-status="needs pass"]::before {
    background: var(--status-needs-pass);
}

.chapter.toc-entry[data-status="outline only"]::before {
    background: var(--status-outline);
}

/* New Admin-specific fields */
.admin-summary {
    margin-top: .75rem;
    padding: .65rem .85rem;
    border-radius: 10px;
    background: rgba(86, 100, 122, .2);
    border: 1px solid rgba(86, 100, 122, .4);
    font-size: .85rem;
    color: #c7d2e3;
    line-height: 1.4;
}
.admin-summary strong {
    color: #e5eaf2;
    font-weight: 600;
    letter-spacing: .02em;
    display: block;
    margin-bottom: .2em;
}

.chapter.toc-entry.chapter--highlight {
  box-shadow:0 0 0 2px rgba(61,58,52,.18), 0 16px 30px rgba(44,38,27,.12);
  transform:translateY(-2px);
}
.chapter.toc-entry.chapter--dimmed {
  opacity:.35;
  filter:saturate(.65);
}
.chapter.toc-entry.chapter--dimmed:hover {
  transform:none;
  box-shadow:none;
}
/* Centered header for public TOC */
.toc-section-head {
  text-align:center;
  max-width:720px;
  margin:0 auto 2rem;
  padding-bottom:1.65rem;
  border-bottom:1px solid rgba(79,88,104,.7);
}
.toc-section-head h2 {
  margin:0;
  font-size:clamp(1.65rem,4vw,2.3rem);
  letter-spacing:.06em;
  font-weight:600;
}
/* New Reading Progress Bar Positioning (Fixed to Top) */
.reading-progress {
  position: fixed;
  top: 0; 
  left: 0;
  right: auto;
  width: 100%;
  z-index: 999;
  padding: 0;
  height: 4px;
  border: none;
  border-radius: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5); 
  background: none;
  pointer-events: none;
  font-size: 0; /* Hides the percentage text */
}

.reading-progress__track {
  width: 100%; 
  height: 4px;
  border-radius: 0;
  background: rgba(108,122,148,.2);
}

.reading-progress__bar {
  display:block;
  width:100%;
  height:100%;
  background: linear-gradient(90deg, var(--accent-crimson), var(--accent-crimson-hover));
  transform-origin:left center;
  transform:scaleX(0);
  transition:transform .15s ease-out;
}
.reading-progress__percent {
  min-width:2.5ch;
  text-align:right;
  color:#f3f6ff;
}
.release-tabs {
  display:flex;
  flex-wrap:wrap;
  gap:.75rem;
  margin-top:1.75rem;
}
.release-tab {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  min-width:10.5rem;
  padding:.65rem 1rem;
  border-radius:14px;
  border:1px solid rgba(102,111,125,.55);
  background:linear-gradient(150deg, rgba(28,32,41,.95), rgba(22,26,34,.88));
  color:#f1f5fb;
  font-size:.68rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  box-shadow:0 18px 32px rgba(4,6,12,.45);
  transition:transform .2s ease, box-shadow .2s ease;
}
.release-tab:hover {
  transform:translateY(-1px);
  box-shadow:0 22px 40px rgba(8,10,16,.5);
}
.release-tab__chapter {
  font-family:'Cinzel', serif;
  font-size:.75rem;
  letter-spacing:.18em;
  margin-bottom:.25rem;
}
.release-tab__status {
  font-size:.62rem;
  letter-spacing:.12em;
  color:var(--muted);
}
.release-tab--available {
  border-color:var(--accent-crimson);
  background:linear-gradient(135deg, rgba(54,22,28,.92), rgba(32,20,26,.88));
  color:#f7f1f3;
}
.release-tab--available .release-tab__status {
  color:#ffd9dc;
}
.release-tab--upcoming {
  opacity:.85;
}
/* Legacy TOC link (kept for no-JS): hide visually but keep accessible */
.toc-return {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.toc-petal {
  position:fixed;
  left:50%;
  transform:translate(-50%, 0);
  width:3rem;
  height:3rem;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.35rem;
  color:#ecf5ff;
  background:radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(156,175,214,0.92) 45%, rgba(53,78,115,0.88));
  border:1px solid rgba(171,190,223,0.85);
  box-shadow:0 18px 38px rgba(8,10,22,0.45);
  text-decoration:none;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease, transform .25s ease, box-shadow .25s ease;
  z-index:120;
}
.toc-petal--top { top:1.5rem; }
.toc-petal--bottom { bottom:1.5rem; }
.toc-petal.is-visible {
  opacity:1;
  pointer-events:auto;
}
.toc-petal:hover,
.toc-petal:focus-visible {
  transform:translate(-50%, -2px);
  box-shadow:0 24px 44px rgba(16,10,18,0.55);
}
.toc-petal--bottom:hover,
.toc-petal--bottom:focus-visible {
  transform:translate(-50%, 2px);
}
.toc-petal::after {
  content:attr(data-label);
  position:absolute;
  left:50%;
  transform:translate(-50%, 0);
  min-width:8rem;
  text-align:center;
  background:rgba(15,18,26,0.95);
  color:#f3f6ff;
  padding:.35rem .9rem;
  border-radius:999px;
  font-size:.65rem;
  letter-spacing:.16em;
  text-transform:uppercase;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
  white-space:nowrap;
  border:1px solid rgba(255,255,255,0.2);
}
.toc-petal--top::after {
  top:calc(100% + .4rem);
  bottom:auto;
}
.toc-petal--bottom::after {
  bottom:calc(100% + .4rem);
  top:auto;
}
.toc-petal:hover::after,
.toc-petal:focus-visible::after {
  opacity:1;
  transform:translate(-50%, 0);
}
.toc-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:1.75rem clamp(1.75rem,3vw,2.5rem);
  margin-top:2.25rem;
}
.toc { font-size:.95rem; color:#97a1b4; display:flex; flex-wrap:wrap; gap:.5rem 1rem; }
.toc a { color:inherit; text-decoration:none; border-bottom:1px dashed var(--border); }
article.chapter {
  background:linear-gradient(170deg, rgba(30,37,48,.92) 0%, rgba(21,26,35,.9) 100%);
  border:1px solid rgba(86,100,122,.55);
  border-radius:18px;
  padding:1.35rem 1.7rem 1.3rem;
  box-shadow:0 24px 48px rgba(3,5,9,.55);
  margin:1.35rem 0 1.9rem;
  transition:box-shadow .2s ease;
}
.reader-chapter-card {
    /* Frosted Glass Effect */
    background: rgba(28, 34, 46, 0.7); 
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);

    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center; 
    text-align: center; /* Centering */
    text-decoration: none;
    color: var(--fg);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2); 
    position: relative;
}
.reader-chapter-card:hover {
    transform: translateY(-3px);
    /* Subtle Crimson Glow on Hover */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 12px var(--accent-crimson);
    border-color: var(--accent-crimson-hover);
}
.reader-chapter-info {
    flex-grow: 1;
    width: 100%;
}
.reader-chapter-info .ch-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--accent-crimson); 
    letter-spacing: .12em;
    text-transform: uppercase;
    display: block;
    margin-bottom: .2rem;
}
.reader-chapter-info h2 {
    font-size: 1.15rem;
    margin: 0;
    color: #f7f8ff;
    line-height: 1.3;
}
.reader-chapter-card--upcoming {
    opacity: 0.45;
    filter: saturate(0.5);
    cursor: default;
    position: relative;
    background: linear-gradient(160deg, rgba(54,18,24,0.85), rgba(32,12,14,0.78));
    border-color: rgba(150,42,52,0.7);
}
.reader-chapter-card--upcoming:hover {
    transform: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    border-color: rgba(150,42,52,0.7);
}
.reader-chapter-card--upcoming .reader-chapter-info h2 {
    opacity: 0.27;
    filter: blur(3px);
}
.reader-chapter-card--upcoming.reader-chapter-card--next {
    opacity: 1;
    filter: none;
    cursor: pointer;
    background: linear-gradient(160deg, rgba(102,24,29,0.95), rgba(56,11,13,0.85));
    border-color: rgba(209,72,82,0.9);
}
.reader-chapter-card--upcoming.reader-chapter-card--next .reader-chapter-info h2 {
    opacity: 1;
    filter: none;
}
.reader-chapter-card--upcoming.reader-chapter-card--next:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 12px var(--accent-crimson);
    border-color: var(--accent-crimson-hover);
}
.reader-chapter-flag {
    position: absolute;
    top: 0;
    right: 0;
    padding: .35rem .9rem;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    border-top-right-radius: 12px;
    border-bottom-left-radius: 12px;
    color: #f8fbff;
    background: linear-gradient(135deg, rgba(38,44,58,.92), rgba(24,28,36,.9));
    border: 1px solid rgba(84,96,118,.75);
    box-shadow: -2px 2px 8px rgba(0,0,0,0.35);
}
.reader-chapter-flag--available {
    background: #F5F5DC;
    color: #1C1F26;
    border-color: rgba(92,86,72,.85);
    box-shadow: -2px 2px 10px rgba(28,30,24,0.35);
}
.reader-chapter-flag--upcoming {
    background: linear-gradient(140deg, rgba(128,32,36,.95), rgba(84,18,22,.9));
    border-color: rgba(194,68,72,.85);
}
.reader-chapter-card--hidden {
    display: none !important;
}
/* End Public TOC Styles */


.chapter.toc-entry {
  margin:0;
  display:grid;
  grid-template-rows:auto auto 1fr auto;
  gap:.65rem;
  color:#e6ecf8;
  transition:box-shadow .2s ease, transform .2s ease;
}
.chapter.toc-entry:hover {
  box-shadow:0 28px 60px rgba(3,5,9,.7);
  transform:translateY(-4px);
}
.meta { font-size:.88rem; color:#9facbe; display:flex; gap:1rem; flex-wrap:wrap; align-self:start; }
.title {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:.25rem;
  margin-bottom:.55rem;
}
.title .ch-label {
  font-variant-numeric:tabular-nums;
  color:var(--accent-base);
  font-size:.85rem;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.chapter.toc-entry .title h2 {
  font-size:1.15rem;
  line-height:1.35;
  margin:0;
  color:#f2f5fc;
}
.chapter.toc-entry .ch-label {
  opacity:.82;
}
/* New Scene Break Style */
.scene-break {
  border: 0;
  height: 1px;
  margin: 2rem auto;
  width: 8rem; 
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, var(--accent-crimson) 50%, rgba(255,255,255,0) 100%);
  opacity: 0.8;
}
.note {
  background:rgba(60,80,96,.18);
  border:1px solid rgba(88,108,126,.45);
  color:#f3f6ff;
  font-size:.9rem;
  line-height:1.5;
  padding:.55rem .8rem;
  border-radius:12px;
  margin:.4rem 0 .65rem;
}
.act-break { text-align:center; color:#97a1b4; margin:2rem 0; font-weight:600; letter-spacing:.08em; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Shared chapter navigation styles */
body.chapter-page {
  background: var(--bg);
}
.chapter-top-nav {
  position:fixed;
  top:50%;
  left:0;
  right:0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 2.75rem;
  pointer-events:none;
  z-index:60;
  opacity:0;
  transition:opacity .35s ease, transform .35s ease;
}
.chapter-top-nav.is-visible {
  opacity:1;
  pointer-events:auto;
}
.chapter-top-nav a {
  position:relative;
  pointer-events:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  padding:.65rem 1.15rem;
  background:rgba(18,20,28,0.35);
  border:1px solid rgba(129,142,165,0.55);
  border-radius:12px;
  font-size:.72rem;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:#e7edf8;
  text-decoration:none;
  transition:color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease;
  white-space:nowrap;
  overflow:hidden;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  box-shadow:0 12px 26px rgba(6,8,12,0.35);
}
.chapter-top-nav a:hover,
.chapter-top-nav a:focus-visible {
  color:#f5f8ff;
  border-color:var(--accent-crimson);
  background:rgba(34,38,51,0.6);
  transform:translateY(-2px);
}
.chapter-top-nav a:first-child {
  display:none;
}
.chapter-top-nav__inactive {
  pointer-events:none;
  opacity:.45;
  cursor:default;
}
.chapter-top-nav__inactive::before,
.chapter-top-nav__inactive::after {
  content:none !important;
}
.chapter-top-nav__upcoming {
  display:inline-flex;
  align-items:center;
  gap:.65rem;
  padding:.75rem 1.35rem;
  background:linear-gradient(160deg, rgba(36,39,48,.82), rgba(22,24,30,.78));
  border:1px dashed rgba(120,124,138,.6);
  border-radius:999px;
  color:rgba(203,207,219,.78);
  letter-spacing:.15em;
  text-transform:uppercase;
  font-size:.7rem;
  pointer-events:none;
  position:relative;
  box-shadow:0 14px 28px rgba(6,8,12,.45);
}
.chapter-top-nav__upcoming-title {
  display:block;
  font-weight:600;
  letter-spacing:.18em;
}
.chapter-top-nav__upcoming-date {
  display:inline-flex;
  align-items:center;
  padding:.2rem .6rem;
  border-radius:999px;
  background:linear-gradient(150deg, rgba(98,34,40,.88), rgba(70,20,26,.88));
  border:1px solid rgba(164,66,72,.75);
  font-size:.62rem;
  letter-spacing:.16em;
  color:#f8e9e7;
  text-transform:uppercase;
  box-shadow:0 10px 20px rgba(30,10,12,.45);
}
.chapter-top-nav__inactive {
  pointer-events:none;
  opacity:.45;
  cursor:default;
}
.chapter-top-nav__inactive::before,
.chapter-top-nav__inactive::after {
  content:none !important;
}
.chapter-top-nav--start {
  justify-content:center;
}
.chapter-top-nav--start a:first-child {
  display:inline-flex;
  order:-1;
}
.chapter-top-nav--start a:last-child::after {
  content:"\2192";
  font-size:1.1rem;
}
.chapter-top-nav--start a:first-child {
  opacity:.75;
}
.chapter-nav a {
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  padding:.65rem 1.15rem;
  background:rgba(18,20,28,0.35);
  border:1px solid rgba(129,142,165,0.55);
  border-radius:12px;
  font-size:.74rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#e7edf8;
  text-decoration:none;
  transition:color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  box-shadow:0 12px 24px rgba(4,6,12,0.35);
}
.chapter-nav a:hover {
  transform:translateY(-2px);
  color:#fff;
  border-color:var(--accent-crimson);
  background:rgba(34,38,51,0.6);
}
.chapter-nav a::after {
  content:'';
  position:absolute;
  inset:0.35rem;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.08);
  pointer-events:none;
}
.chapter-top-nav span,
.chapter-nav span {
  color:#9dacbe;
}
main.chapter-main {
  max-width:700px;
  margin:2.25rem auto 3.75rem;
  padding:2.3rem clamp(1rem,5vw,2.75rem);
  background:linear-gradient(165deg, rgba(26,32,44,.94), rgba(18,23,33,.9));
  border:1px solid rgba(76,88,108,.6);
  border-radius:22px;
  box-shadow:0 28px 60px rgba(4,6,10,.58);
}
.chapter-actions {
  margin-top:auto;
}
.chapter.toc-entry .note {
  margin:0;
  align-self:stretch;
}
.chapter.toc-entry .chapter-actions {
  padding-top:.2rem;
  display:flex;
  justify-content:center;
  align-self:end;
}
.chapter-link {
  display:inline-flex;
  align-items:center;
  gap:0;
  color:#f7f0f4;
  text-decoration:none;
  font-weight:600;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:.78rem;
  background:var(--accent-crimson);
  padding:.55rem 1.2rem;
  border-radius:999px;
  border:1px solid var(--accent-crimson-hover);
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.chapter-link:hover {
  transform:translateY(-1px);
  box-shadow:0 14px 26px rgba(46,14,24,.38);
  background:var(--accent-crimson-hover);
  border-color:var(--accent-crimson);
}
.part-summary {
  background:linear-gradient(170deg, rgba(28,34,46,.9), rgba(22,28,38,.88));
  border:1px solid rgba(82,94,112,.6);
  border-radius:16px;
  padding:1.25rem 1.5rem;
  margin-bottom:2rem;
  box-shadow:0 20px 40px rgba(3,5,9,.45);
}
.part-summary h2 {
  margin-top:0;
  margin-bottom:.5rem;
  font-size:1.1rem;
  color:#f2f6ff;
}
.part-summary ul {
  margin:0;
  padding-left:1.1rem;
  color:#aab6c9;
}
.part-summary li {
  margin:.25rem 0;
}
.part-summary a {
  color:#f3f6ff;
  text-decoration:none;
  border-bottom:1px solid transparent;
}
.part-summary a:hover {
  border-color:var(--accent-crimson-hover);
}

@media (max-width: 1024px) {
  .plot-bar {
    gap:.45rem;
  }
  .plot-panel {
    padding:1.15rem 1.25rem 1.35rem;
  }
  .plot-panel__grid {
    gap:.85rem 1.35rem;
  }
  .plot-panel__title {
    font-size:1rem;
  }
}

@media (max-width: 768px) {
  .plot-panel__grid {
    grid-template-columns:1fr;
  }
  .plot-panel__actions {
    justify-content:flex-start;
  }
}

@media (max-width: 900px) {
  .chapter-top-nav {
    position:static;
    padding:1.1rem 1.25rem;
    margin:0 auto 1.75rem;
    justify-content:center;
    gap:.75rem;
    pointer-events:auto;
    flex-wrap:wrap;
  }
  .chapter-top-nav a {
    font-size:.68rem;
    padding:.6rem 1rem;
  }
  .chapter-top-nav a:first-child {
    display:inline-flex;
  }
  .chapter-top-nav__upcoming {
    font-size:.62rem;
    padding:.6rem 1rem;
    flex-direction:column;
    gap:.4rem;
    text-align:center;
  }
  .chapter-top-nav__upcoming-date {
    font-size:.58rem;
  }
}

@media (max-width: 640px) {
  header { padding: 0.75rem 1rem; }
  .hero-kanji {
    flex-direction:column;
    gap:.45rem;
  }
  .hero-badge {
    font-size:.6rem;
    letter-spacing:.32em;
    padding:.3rem .85rem .28rem;
  }
  h1 { font-size: 1.3rem; }
  main,
  main.chapter-main {
    margin:1rem;
    padding:1.5rem 1.25rem 2.5rem;
    border-radius:18px;
  }
  article.chapter {
    padding:1.25rem 1.3rem 1.5rem;
  }
  .chapter-top-nav {
    flex-direction:column;
    align-items:center;
    gap:.55rem;
  }
  .chapter-nav {
    flex-direction:column;
    align-items:flex-start;
    gap:.55rem;
  }
  .reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    bottom: auto; 
    width: 100%;
    z-index: 999;
    padding: 0;
    height: 4px;
    border: none;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    background: none;
    pointer-events: none;
    font-size: 0;
    justify-content: center;
  }
  .reading-progress__track {
    flex:1;
    width:auto;
  }
}

.reader-warning-overlay{
  position:fixed;
  inset:0;
  background:rgba(8,9,13,0.86);
  backdrop-filter:blur(9px);
  -webkit-backdrop-filter:blur(9px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:clamp(1.5rem,4vw,3rem);
  z-index:60;
  opacity:0;
  visibility:hidden;
  transition:opacity .45s ease, visibility .45s ease;
}
.reader-warning-overlay.is-active{opacity:1;visibility:visible;}
.reader-warning{
  max-width:60ch;
  padding:clamp(1.8rem,3vw,2.6rem);
  background:rgba(46,12,12,0.42);
  border:1px solid rgba(240,128,128,0.32);
  border-radius:18px;
  text-align:center;
  box-shadow:0 30px 60px rgba(0,0,0,0.55);
  transition:opacity .45s ease, transform .45s ease;
}
.reader-warning--dismissed{opacity:0;transform:translateY(-16px);}
.reader-warning__title{
  font-family:"Cinzel",serif;
  letter-spacing:.35em;
  text-transform:uppercase;
  margin:0 0 1rem;
  font-size:clamp(1.05rem,2.4vw,1.35rem);
}
.reader-warning__body{
  margin:0 auto clamp(1.2rem,2.6vw,1.9rem);
  color:var(--muted);
  line-height:1.85;
}
.reader-warning__button{
  font-family:"Cinzel",serif;
  letter-spacing:.3em;
  text-transform:uppercase;
  border:1px solid rgba(240,128,128,0.38);
  background:linear-gradient(180deg,rgba(161,51,51,0.55),rgba(114,24,24,0.62));
  color:var(--fg);
  padding:.75rem 1.85rem;
  border-radius:999px;
  cursor:pointer;
  transition:transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.reader-warning__button:hover,
.reader-warning__button:focus-visible{
  transform:translateY(-2px);
  box-shadow:0 14px 26px rgba(0,0,0,0.48);
  border-color:rgba(212,75,63,0.68);
}
.chapters-list{transition:opacity .55s ease, filter .55s ease, transform .55s ease;}
.chapters-list.is-obscured{opacity:0;filter:blur(16px);transform:translateY(26px);pointer-events:none;}

.chapter-return {
  text-align:center;
  margin:2rem 0 0;
}
.chapter-return__button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0.9rem 2.4rem;
  border-radius:999px;
  border:1px solid rgba(143,75,75,0.85);
  font-size:0.85rem;
  letter-spacing:0.22em;
  text-transform:uppercase;
  color:#f8f0ed;
  text-decoration:none;
  background:linear-gradient(150deg, rgba(78,18,18,0.9), rgba(120,32,32,0.92));
  box-shadow:0 18px 48px rgba(0,0,0,0.45);
}
.chapter-return__button:hover {
  transform:translateY(-2px);
  border-color:rgba(196,118,118,0.95);
  box-shadow:0 22px 54px rgba(0,0,0,0.55);
}
.chapter-coming-soon {
  font-size:1.3rem;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:#f8e4da;
  text-align:center;
  margin:0 0 1.5rem;
}
