/* Illustrated opening and thumb-reachable chapter dialogue. */
.intro-screen.chapter-title {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: max(46px,12dvh); text-align: center;
}
.modal-box:has(.chapter-title)::before { background: none; }
.chapter-title-art {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: center 53%; border-radius: inherit; pointer-events: none;
}
.chapter-title .intro-heading,.chapter-title .chapter-start { position: relative; }
.modal-box .chapter-title .intro-heading h2 { background: none; min-height: 0; }
.chapter-title .intro-heading h2 img { display: block; width: 100%; height: auto; }
.chapter-title .chapter-start { width: 100%; min-height: 54px; margin-bottom: 14px; }
.intro-screen.chapter-starter { justify-content: space-between; }
.chapter-starter .intro-choice-heading { margin-top: auto; }
.modal-root:has(.story-sheet) {
  align-items: end; padding: 0 10px max(10px,var(--safe)); backdrop-filter: none;
  background: linear-gradient(0deg,#10091fbd,transparent 62%);
}
.modal-root .story-sheet {
  max-height: 39dvh; width: min(100%,470px); overflow: auto; padding: 13px 14px;
  border: 1px solid #d9ad7c; border-radius: 16px;
  background: linear-gradient(150deg,#342146,#1b112b 74%);
  color: #fff0d6; box-shadow: 0 8px 28px #0b051ccc;
}
.story-scene-label { color: #e2bd86; font-size: 10px; font-weight: 700; margin-bottom: 9px; }
.story-line { display: flex; gap: 10px; align-items: center; min-height: 75px; margin-bottom: 10px; }
.story-portrait { flex: 0 0 54px; width: 54px; height: 62px; display: grid; place-items: center; }
.story-portrait > img,.story-portrait > .creature-art { width: 100%; height: 100%; object-fit: contain; }
.story-line strong { color: #ffdc9a; font-size: 13px; }
.story-sheet .story-line p { margin: 3px 0 0; font-size: 16px; line-height: 1.48; word-break: keep-all; overflow-wrap: anywhere; }
.story-buttons,.story-choices { display: grid; gap: 7px; }
.story-buttons { grid-template-columns: minmax(88px,1fr) minmax(0,2fr); }
.story-choices { grid-template-columns: 1fr 1fr; }
.story-sheet button { min-height: 44px; padding: 7px 10px; line-height: 1.3; word-break: keep-all; }
.story-choices button { min-height: 52px; }
.story-lore-entry { min-height: 44px; width: 100%; margin-top: 9px; }
html:has(.story-lore-fragment) { overflow: hidden; }
.story-lore-fragment { padding: 10px 0; border-bottom: 1px solid #b38bb34d; }
.story-lore-fragment p { margin-bottom: 0; }
.story-lore-fragment.locked { color: #d7c3de; }
.story-lore-voice[hidden] { display: none; }
.river-title { display: inline-block; font-size: 11px; color: #b1f7e7; margin-inline-start: 6px; }
.map-world .chapter-light-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.map-view .chapter-light-preview {
  position: absolute;
  z-index: 8;
  inset: calc(var(--safe-top, 0px) + 95px) 12px auto;
  width: max-content;
  max-width: calc(100% - 24px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid #f8d790;
  border-radius: 11px;
  background: #2b173bf2;
  color: #ffe6a9;
  font-size: 13px;
  line-height: 1.3;
  pointer-events: none;
}
.chapter-light-preview img { width: 19px; height: 27px; object-fit: contain; }
.post-battle-map .map-ambient-layer { visibility: hidden; }
#app .map-world > .post-battle-art {
  filter: none;
  top: calc(-1 * var(--story-bleed));
  bottom: auto;
  height: calc(100% + var(--story-bleed));
}
.map-view.river-light-returned .map-wrap::after {
  content: ''; position: absolute; inset: 25% 0 20%; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse at 50% 65%,#8decf34f,transparent 72%);
}
.gumiho-tails { color: #d5b7e9; font-size: 10px; letter-spacing: .11em; }
.gumiho-tails .lit { color: #fff1aa; text-shadow: 0 0 5px #fa9eea; }
.actor .gumiho-frame { display: flex; align-items: center; justify-content: center; }
.gumiho-frame > svg { width: 100%; height: 100%; }

.chapter-starter .starter-logo { display: block; width: min(94%,365px); height: auto; max-height: 128px; object-fit: contain; margin: 0 auto; }
.chapter-starter .intro-choice-heading { display: grid; gap: 4px; }
.chapter-starter .intro-choice-heading small { font-size: .9375rem; }
.chapter-starter .intro-choice .intro-choice-action { font-size: .9375rem; overflow-wrap: anywhere; padding-inline: 4px; }
.chapter-starter .starter-local-title { display: block; margin-top: .2rem; font-size: 1.25rem; color: #ffefb6; }
.chapter-starter .intro-choice-name { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.chapter-starter .intro-choice > :is(.intro-choice-role,small) { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
