@import url("https://fonts.googleapis.com/css2?family=Alegreya:wght@400;500;700&family=Cinzel:wght@600;700&family=IM+Fell+English+SC&display=swap");

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Alegreya", Georgia, serif;
  background: #000;
  color: #f2f2f2;
  line-height: 1.5;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100vw;
  margin: -28px 0 34px 50%;
  padding: 22px max(20px, calc((100vw - 1180px) / 2 + 20px));
  border: 0;
  border-bottom: 1px solid rgba(181, 122, 65, 0.28);
  border-radius: 0;
  background: linear-gradient(180deg, #3b2415 0%, #24160d 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  will-change: transform;
}

.site-header.is-header-hidden {
  transform: translate(-50%, -100%);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.site-logo {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: clamp(42px, 5.2vw, 58px);
  max-width: min(210px, 28vw);
  object-fit: contain;
}

.site-title {
  min-width: 0;
  font-family: "IM Fell English SC", "Cinzel", Georgia, serif;
  font-size: clamp(1.35rem, 2.55vw, 2rem);
  font-weight: 400;
  line-height: 1.15;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.site-nav a,
.nav-more {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #e9dfd2;
  font-family: "IM Fell English SC", "Cinzel", Georgia, serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active,
.nav-more.is-active,
.nav-more:hover,
.nav-more:focus-visible,
.nav-dropdown.is-open .nav-more {
  background: transparent;
  color: #f1c75b;
  font-weight: 700;
}

.nav-dropdown {
  position: relative;
}

.nav-more::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.nav-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 170px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  background: #24160d;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.nav-dropdown:hover .nav-menu,
.nav-dropdown:focus-within .nav-menu,
.nav-dropdown.is-open .nav-menu {
  display: grid;
  gap: 4px;
}

.nav-menu a {
  justify-content: flex-start;
  min-height: 38px;
  font-size: 0.78rem;
}

.nav-gallery-menu {
  min-width: 245px;
  max-height: min(72vh, 520px);
  overflow-y: auto;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

h1 {
  margin: 0 0 8px;
  text-align: center;
  font-family: "IM Fell English SC", "Cinzel", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #fff;
}

h2 {
  margin: 0 0 22px;
  font-family: "IM Fell English SC", "Cinzel", Georgia, serif;
  font-weight: 700;
  color: #211b0b;
}

.page-location h2[id] {
  scroll-margin-top: 112px;
}

.subhead,
.footer {
  text-align: center;
  color: #bdbdbd;
  font-size: 0.75rem;
}

.subhead a,
.footer a,
.subhead a:visited,
.footer a:visited {
  color: #d9d9d9;
  text-decoration: none;
  transition: color 0.2s ease;
}

.subhead a:hover,
.footer a:hover {
  color: #f5e6d3;
}

.footer {
  margin: 36px 0 0;
}

.page-index .subhead {
  margin: 0 0 12px;
}

.page-gallery .subhead {
  margin: 0 0 36px;
}

.page-character .footer {
  margin: 36px 0 0;
}

.page-location .footer {
  margin: 0 0 36px;
}

.top-links {
  text-align: center;
  margin: 0 0 36px;
  font-size: 0.95rem;
  line-height: 1.8;
}

.top-links a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.top-links a:hover {
  color: #d9d9d9;
}

.chapter-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 28px;
  padding-bottom: 20px;
}

.chapter-card,
.character-card,
.location-card,
.production-card {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.chapter-card {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100%;
}

.cover-trigger {
  display: block;
  width: 100%;
  max-width: 320px;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0 0 20px;
  cursor: pointer;
  border-radius: 14px;
  overflow: hidden;
}

.cover-trigger:focus-visible,
.play-btn:focus-visible,
.character-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

.thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #333;
  background: #1a1a1a;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cover-trigger:hover .thumb {
  transform: scale(1.015);
  opacity: 0.95;
}

.chapter-title {
  width: 100%;
  margin: 0 0 18px;
  font-family: "IM Fell English SC", "Cinzel", Georgia, serif;
  color: #fff;
  font-weight: bold;
  font-size: 1.08rem;
  line-height: 1.45;
  min-height: 3.2em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn {
  font-family: "Alegreya", Georgia, serif;
  border: 1px solid #5c5c5c;
  background: #fff;
  color: #000;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.98rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  margin-bottom: 14px;
  min-width: 130px;
}

.play-btn:hover {
  background: #d9d9d9;
  transform: translateY(-1px);
}

.play-btn.is-playing {
  background: #7a4b2b;
  color: #fff;
  border-color: #7a4b2b;
}

.audio-wrap {
  width: 100%;
  margin-top: 6px;
}

audio {
  width: 100%;
  filter: invert(1) hue-rotate(180deg);
}

.coming-soon {
  display: inline-block;
  width: 100%;
  padding: 10px 16px;
  text-align: center;
  color: #e60000;
  font-weight: bold;
  border-radius: 6px;
  box-sizing: border-box;
}

.audio-placeholder {
  width: 100%;
  height: 40px;
  margin-top: 10px;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding-bottom: 20px;
}

.character-card {
  padding: 16px;
  text-align: center;
}

.character-link {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #333;
  background: #1a1a1a;
}

.character-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.character-link:hover .character-thumb {
  transform: scale(1.015);
  opacity: 0.95;
}

.character-name {
  margin: 14px 0 2px;
  font-family: "IM Fell English SC", "Cinzel", Georgia, serif;
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
}

.production-grid,
.location-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 20px;
}

.production-card,
.location-card {
  padding: 12px;
}

.production-link,
.location-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #333;
  background: #1a1a1a;
}

.production-thumb,
.location-thumb {
  width: 100%;
  height: auto;
  display: block;
}

.production-thumb {
  border-radius: 12px;
  border: 1px solid #333;
}

.production-link:hover .production-thumb,
.location-link:hover .location-thumb {
  opacity: 0.95;
  transform: scale(1.01);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.production-name,
.location-name {
  margin-top: 10px;
  text-align: center;
  font-family: "IM Fell English SC", "Cinzel", Georgia, serif;
  font-weight: bold;
  color: #fff;
}

.more-placeholder {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 28px;
  border: 1px dashed rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
  color: #111;
  font-size: 1.2rem;
  text-align: center;
}

.notebook-shell {
  color: #f2f2f2;
}

.notebook-shell h2 {
  color: #f1c75b;
}

.notebook-viewer {
  position: relative;
  background: #090807;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.65);
}

.notebook-page-frame {
  display: grid;
  place-items: center;
  min-height: min(72dvh, 840px);
  margin: 0;
  padding: 18px;
}

.notebook-spread {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  width: min(100%, 1180px);
  gap: 0;
}

.notebook-page-frame.is-single-page .notebook-spread {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 590px);
}

.notebook-page {
  display: grid;
  place-items: center;
  min-width: 0;
}

.notebook-page-image {
  display: block;
  max-width: 100%;
  max-height: min(68dvh, 800px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #111;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
}

.notebook-page-frame.is-two-page .notebook-page:first-child .notebook-page-image {
  box-shadow: -12px 16px 36px rgba(0, 0, 0, 0.45);
}

.notebook-page-frame.is-two-page .notebook-page:last-child .notebook-page-image {
  box-shadow: 12px 16px 36px rgba(0, 0, 0, 0.45);
}

.notebook-hotspot {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 28%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.notebook-hotspot-left {
  left: 0;
}

.notebook-hotspot-right {
  right: 0;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  padding: 24px;
  align-items: center;
  justify-content: center;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: 96vw;
  max-height: 92vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.65);
  background: #111;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 24px;
  color: #f5e6d3;
  font-size: 2.4rem;
  line-height: 1;
  text-decoration: none;
  font-weight: bold;
}

.lightbox-caption {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  text-align: center;
  color: #f5e6d3;
  font-weight: bold;
}

.page-character .lightbox-caption {
  letter-spacing: 0.03em;
}

.viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.94);
}

.viewer.is-open {
  display: block;
}

.viewer-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.viewer-image {
  max-width: calc(100vw - 48px);
  max-height: calc(100dvh - 120px);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center center;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.65);
  background: #000;
}

.viewer-close,
.viewer-nav,
.viewer-play {
  position: fixed;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.55);
  color: #f5e6d3;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.viewer-close,
.viewer-play {
  top: 18px;
  height: 48px;
  min-width: 48px;
  border-radius: 999px;
  font-size: 1rem;
  padding: 0 16px;
}

.viewer-close {
  right: 24px;
  font-size: 2rem;
  line-height: 1;
}

.viewer-play {
  right: 88px;
  font-weight: bold;
}

.viewer-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 64px;
  border-radius: 16px;
  font-size: 2rem;
  line-height: 1;
}

.viewer-prev {
  left: 24px;
}

.viewer-next {
  right: 24px;
}

.viewer-caption {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: calc(100vw - 48px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #f5e6d3;
  font-weight: bold;
  text-align: center;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.viewer-hotspot {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 22vw;
  min-width: 88px;
  z-index: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.viewer-hotspot-left {
  left: 0;
}

.viewer-hotspot-right {
  right: 0;
}

.viewer-hotspot:focus-visible,
.viewer-close:focus-visible,
.viewer-nav:focus-visible,
.viewer-play:focus-visible {
  outline: 2px solid #f5e6d3;
  outline-offset: 2px;
}

body.viewer-open {
  overflow: hidden;
  touch-action: manipulation;
}

/* part-bar1: blue */
.part-bar1,
.part-bar2,
.part-bar3,
.part-bar4,
.part-bar5,
.part-bar6,
.part-bar7,
.part-bar8,
.part-bar9,
.part-bar10,
.part-bar11 {
  font-family: "IM Fell English SC", "Cinzel", Georgia, serif;
}

.part-bar1 {
  background: linear-gradient(180deg, #8fa8e6 0%, #6f8fd6 20%, #3f5fa8 62%, #2a3f73 100%);
  border-top: 1px solid #8fa8e6;
  border-bottom: 1px solid #2a3f73;
  margin: 60px 0 28px;
  padding: 14px 20px 20px;
  text-align: left;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* part-bar2: copper */
.part-bar2 {
  background: linear-gradient(180deg, #b8643a 0%, #a0522d 22%, #7a3e2a 62%, #3e1f15 100%);
  border-top: 1px solid #b8643a;
  border-bottom: 1px solid #3e1f15;
  margin: 60px 0 28px;
  padding: 14px 20px 20px;
  text-align: left;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* part-bar3: burgundy */
.part-bar3 {
  background: linear-gradient(180deg, #8a2a3a 0%, #7a1e2c 20%, #5f1726 60%, #4a0f1c 100%);
  border-top: 1px solid #8a2a3a;
  border-bottom: 1px solid #2a0a12;
  margin: 60px 0 28px;
  padding: 14px 20px 20px;
  text-align: left;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* part-bar4: brown */
.part-bar4 {
  background: linear-gradient(180deg, #6b432a 0%, #5a3722 22%, #3b2415 62%, #2a1a10 100%);
  border-top: 1px solid #6b432a;
  border-bottom: 1px solid #2a1a10;
  margin: 60px 0 28px;
  padding: 14px 20px 20px;
  text-align: left;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* part-bar5: purple */
.part-bar5 {
  background: linear-gradient(180deg, #7f6491 0%, #6e547f 22%, #4b3a5a 62%, #2a2233 100%);
  border-top: 1px solid #7f6491;
  border-bottom: 1px solid #2a2233;
  margin: 60px 0 28px;
  padding: 14px 20px 20px;
  text-align: left;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* part-bar6: sage green */
.part-bar6 {
  background: linear-gradient(180deg, #708468 0%, #5e7256 22%, #3f4f3a 62%, #1f2a1c 100%);
  border-top: 1px solid #708468;
  border-bottom: 1px solid #1f2a1c;
  margin: 60px 0 28px;
  padding: 14px 20px 20px;
  text-align: left;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* part-bar7: teal */
.part-bar7 {
  background: linear-gradient(180deg, #6b9393 0%, #4f7a7a 22%, #2f4f4f 62%, #162626 100%);
  border-top: 1px solid #6b9393;
  border-bottom: 1px solid #162626;
  margin: 60px 0 28px;
  padding: 14px 20px 20px;
  text-align: left;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* part-bar8: sand */
.part-bar8 {
  background: linear-gradient(180deg, #e0c69f 0%, #d2b48c 22%, #b89b6a 62%, #7a6240 100%);
  border-top: 1px solid #e0c69f;
  border-bottom: 1px solid #7a6240;
  margin: 60px 0 28px;
  padding: 14px 20px 20px;
  text-align: left;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* part-bar9: blue green */
.part-bar9 {
  background: linear-gradient(180deg, #7fb9b3 0%, #5a9a96 22%, #2f6671 62%, #17383f 100%);
  border-top: 1px solid #7fb9b3;
  border-bottom: 1px solid #17383f;
  margin: 60px 0 28px;
  padding: 14px 20px 20px;
  text-align: left;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* part-bar10: pale yellow */
.part-bar10 {
  background: linear-gradient(180deg, #fff2c7 0%, #f3e8bd 22%, #e7d99b 62%, #a9944f 100%);
  border-top: 1px solid #fff2c7;
  border-bottom: 1px solid #a9944f;
  margin: 60px 0 28px;
  padding: 14px 20px 20px;
  text-align: left;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  color: #211b0b;
}

/* part-bar11: warm gray */
.part-bar11 {
  background: linear-gradient(180deg, #a69d91 0%, #898176 22%, #5d5851 62%, #343029 100%);
  border-top: 1px solid #a69d91;
  border-bottom: 1px solid #343029;
  margin: 60px 0 28px;
  padding: 14px 20px 20px;
  text-align: left;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* part-bar12: midnight blue */
.part-bar12 {
  background: linear-gradient(180deg, #355b8c 0%, #27466f 22%, #172f50 62%, #0b182b 100%);
  border-top: 1px solid #355b8c;
  border-bottom: 1px solid #0b182b;
  margin: 60px 0 28px;
  padding: 14px 20px 20px;
  text-align: left;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

@media (max-width: 980px) {
  .chapter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .character-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px), (max-height: 520px) {
  .site-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: flex-start;
    gap: 10px 14px;
    margin-top: -22px;
    padding: 18px 16px;
  }

  .site-brand {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding-right: 0;
  }

  .site-title {
    display: block;
    max-width: 100%;
    padding-right: 62px;
    font-size: 1.2rem;
    white-space: normal;
  }

  .site-logo {
    justify-self: center;
    width: min(260px, 72vw);
    height: auto;
    max-width: 100%;
  }

  .nav-toggle {
    display: block;
    position: absolute;
    right: 16px;
    bottom: 18px;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% - 10px);
    left: 0;
    right: 0;
    z-index: 20;
    padding: 10px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    background: #24160d;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  }

  .site-header.is-nav-open .site-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .site-nav a {
    justify-content: flex-start;
    min-height: 42px;
    font-size: 0.9rem;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-more {
    justify-content: space-between;
    width: 100%;
    min-height: 42px;
    font-size: 0.9rem;
  }

  .nav-menu {
    position: static;
    min-width: 0;
    margin: 2px 0 0;
    padding: 4px 0 0 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-menu a {
    min-height: 38px;
    font-size: 0.86rem;
  }

  .nav-gallery-menu {
    max-height: none;
    overflow-y: visible;
  }

  .viewer {
    background: #000;
  }

  .viewer-stage {
    padding: 0;
  }

  .viewer-image {
    width: 100vw;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  .viewer-close {
    right: 16px;
  }

  .viewer-nav,
  .viewer-play,
  .viewer-caption {
    display: none;
  }

  .viewer-hotspot {
    width: 50vw;
    min-width: 0;
    z-index: 3;
  }

  .viewer-close {
    z-index: 4;
  }

  .notebook-page-frame {
    min-height: 64dvh;
    padding: 10px;
  }

  .notebook-spread {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .notebook-page-frame.is-single-page .notebook-spread {
    width: 100%;
  }

  .notebook-page-image {
    max-height: 60dvh;
  }

  .notebook-hotspot {
    width: 42%;
  }

}

@media (max-width: 640px) {
  .wrap {
    padding: 22px 16px 48px;
  }

  .chapter-list {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .chapter-card {
    padding: 18px 16px 22px;
  }

  .cover-trigger {
    max-width: 100%;
    margin-bottom: 18px;
  }

  .chapter-title {
    font-size: 1.06rem;
    min-height: auto;
    margin-bottom: 16px;
  }

  .play-btn {
    width: 100%;
    max-width: 260px;
  }

  .top-links {
    margin-bottom: 30px;
  }
}

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