/* Navigation for the full sixteen-chapter edition. */
.rail-inner {
  top: calc(var(--head) + 10px);
  max-height: calc(100dvh - var(--head) - 20px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #34526a transparent;
  padding: 17px 7px 24px 5px;
}
.rail-label { margin-bottom: 18px; }
.rail .chapter-nav { gap: 16px; }
.rail .group-name { margin-bottom: 5px; }
.rail .chapter-link { min-height: 37px; }
.chapter-nav .index-stop { position: relative; }
.index-stop:has(.index-branches) > .chapter-link { padding-right: 25px; }
.index-stop .is-parent { color: #d3e9fc; }
.index-stop .is-parent .waymark { border-color: #7599b4; }
.index-branches > summary {
  position: absolute;
  top: 5px;
  right: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 28px;
  list-style: none;
  color: #8baabe;
  border-radius: 50%;
}
.index-branches > summary::-webkit-details-marker, .field-notes > summary::-webkit-details-marker { display:none; }
.index-branches > summary:hover { color: #eff9ff; background: #1b3449; }
.index-branches > summary .icon { width: 13px; height: 13px; }
.index-branches[open] > summary .icon, .field-notes[open] > summary > .icon:last-child { transform: rotate(180deg); }
.chapter-nav .index-branches ul { padding: 1px 0 5px 40px; gap: 0; }
.chapter-nav .index-branches ul::before { display: none; }
.chapter-nav .index-branches a { min-height: 26px; padding: 4px 4px 4px 9px; line-height: 1.2; font-size: 14px; border-left: 1px solid #34485c; }
.chapter-nav .index-branches a[aria-current=location] { color: #c5eafe; border-color: #b1dbf3; }
.chapter-nav .index-branches a[aria-current=location]::after { display:none; }
.drawer-chapters .index-branches > summary { width: 40px; height: 40px; top: 2px; }
.drawer-chapters .chapter-link { padding-right: 42px; }
.drawer-chapters .index-branches a { min-height: 39px; }

/* Links here jump down the continuous page; panels inside a game window are local previews. */
.entry-index {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin: -7px auto 18px;
}
.entry-index a { display: inline-flex; align-items: center; gap: 8px; color: #c8dff0; padding: 5px 0; font-size: 15px; }
.entry-index a:hover { color: #f4d6a6; }
.entry-index i { width: 5px; height: 5px; transform: rotate(45deg); border: 1px solid #9cb9cb; }
.system-entry { scroll-margin-top: 5px; position: relative; isolation: isolate; padding: clamp(34px,5.7vw,82px) 0 24px; }
.system-entry + .system-entry { margin-top: 28px; }
.system-landscape {
  position: absolute;
  inset: 3% 0 auto;
  width: 100%;
  height: min(82%,680px);
  object-fit: cover;
  object-position: 62% center;
  pointer-events: none;
  z-index: -2;
  opacity: .35;
  filter: saturate(.72);
  mask-image: linear-gradient(90deg,transparent,#000 16%,#000 87%,transparent), linear-gradient(0deg,transparent,#000 29%,#000 63%,transparent);
  mask-composite: intersect;
}
.system-title, .field-notes { text-shadow: 0 1px 12px #07111b; }
.system-title { text-align: center; width: min(92%,760px); margin: 0 auto clamp(20px,3vw,44px); }
.system-title kbd {
  display: inline-block;
  min-width: 31px;
  font: 600 12px/1.2 Myriad, sans-serif;
  padding: 4px 8px 3px;
  border: 1px solid #547288;
  border-bottom-width: 2px;
  border-radius: 5px;
  color: #c0deed;
}
.system-title h3, .bonus-type > header h3 {
  margin: 11px 0 12px;
  font: 400 clamp(32px,3.6vw,57px)/1.06 var(--serif);
  letter-spacing: -.05em;
  color: #f4f0e8;
  text-wrap: balance;
}
.system-intro { color: var(--soft); font-size: 18px; text-wrap: balance; }
.field-notes {
  max-width: 790px;
  margin: 18px auto 0;
}
.field-notes > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: fit-content;
  margin: 0 auto;
  padding: 9px 10px;
  font-size: 15px;
  list-style:none;
  color:#c9e8f9;
}
.field-notes > summary .icon { width: 16px; height: 16px; }
.field-notes > dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px 32px; margin: 15px 0 0; }
.field-notes dt { font-weight: 600; color: var(--moon-gold); }
.field-notes dd { margin: 3px 0 0; color: #b9cbdc; line-height: 1.4; }
.bonus-filter { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 25px auto 16px; }
.bonus-filter label { display: inline-flex; align-items: center; gap: 8px; color: #bed7e6; }
.bonus-filter select { font: inherit; background: #122336; color: #edf5fc; border: 1px solid #48657c; border-radius: 6px; padding: 8px 12px; max-width: 100%; }
.bonus-filter select:focus-visible { outline: 2px solid #a5d9f7; outline-offset: 3px; }
.bonus-type { padding: clamp(22px,3.5vw,48px) clamp(2px,2.5vw,38px) 0; }
.bonus-type > header { display: flex; align-items: center; justify-content: center; max-width: 730px; gap: 18px; margin: auto; }
.bonus-type > header img { width: clamp(68px,7vw,102px); height: auto; filter: drop-shadow(0 0 14px #4c91ba30); }
.bonus-type > header p { color: var(--soft); max-width: 64ch; }
.effect-columns { columns: 2; column-gap: clamp(20px,4vw,70px); margin: 27px 0 20px; }
.effect-group { break-inside: avoid; padding-bottom: 20px; }
.effect-group h4 { font: italic 24px/1.12 var(--serif); color: var(--moon-gold); }
.effect-group dl { margin: 10px 0 0; }
.effect-group dl > div { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; color: #c9d7e3; }
.effect-group dt { order: 0; }
.effect-group dl > div::before { content: ""; flex: 1; align-self: baseline; border-bottom: 1px dotted #375065; order: 1; }
.effect-group dd { order: 2; color: #dceefa; font: 600 16px/1.15 Myriad, sans-serif; margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media(min-width:871px) and (max-width:1150px) {
  .reading { grid-template-columns: 170px minmax(0,1fr); gap: 19px; }
  .chapter-nav .chapter-link { font-size: 14px; gap: 9px; }
}
@media(max-width:680px) {
  .chapter h2, .chapter h3, .chapter h4 { overflow-wrap: anywhere; hyphens: auto; }
  .chapter h2 { font-size: clamp(31px,9.7vw,42px); }
  .entry-index { gap: 4px 14px; }
  .system-entry { padding-top: 30px; }
  .system-title { width: 100%; }
  .system-intro { font-size: 17px; }
  .field-notes > dl { grid-template-columns: 1fr; padding: 0 9px; }
  .effect-columns { columns: 1; margin-top: 20px; }
  .bonus-type > header { align-items: start; gap: 9px; }
  .bonus-type > header img { width: 57px; margin-top: 6px; }
  .bonus-type > header h3 { margin: 4px 0 8px; font-size: 29px; }
}
@media(max-width:370px) {
  .hero h1 { font-size: clamp(48px,15.6vw,56px); }
}
