:root {
  --ink: #37211d;
  --ink-soft: #6d564f;
  --paper: #fff9e8;
  --paper-deep: #ffe7ae;
  --rice: #fff8e8;
  --malt: #f03a18;
  --malt-deep: #ba241a;
  --malt-glow: #ff7e54;
  --sky-pink: #f4a4c6;
  --sky-pink-soft: #ffd2df;
  --festival-blue: #0798ce;
  --teal: #08a5a2;
  --green: #4fa946;
  --grass: #b9dd3b;
  --rail: #5e6c6a;
  --gold: #f3d30a;
  --line: rgba(81, 43, 25, 0.18);
  --shadow: 0 22px 60px rgba(126, 56, 48, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  background:
    radial-gradient(circle at 14% 7%, rgba(255, 255, 255, 0.88) 0 4rem, transparent 4.2rem),
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, 0.74) 0 4.8rem, transparent 5rem),
    radial-gradient(circle at 20% 96%, rgba(185, 221, 59, 0.95), transparent 30rem),
    radial-gradient(circle at 78% 92%, rgba(79, 169, 70, 0.74), transparent 29rem),
    linear-gradient(180deg, #f5a6c7 0%, #ffcbd9 36%, #fff5d8 66%, #cde74c 100%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 34px;
}

.corridor-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 66px;
}

.corridor-page {
  position: relative;
  isolation: isolate;
  color: #31241f;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(255, 255, 255, 0.78) 0 4.6rem, transparent 4.8rem),
    radial-gradient(ellipse at 84% 7%, rgba(255, 255, 255, 0.86) 0 6rem, transparent 6.2rem),
    linear-gradient(180deg, #f4abc7 0%, #ffd6df 31%, #fff6d9 63%, #d5e95a 100%);
}

.corridor-page::before,
.corridor-page::after {
  content: "";
  position: fixed;
  left: 0;
  z-index: -1;
  width: 100%;
  pointer-events: none;
}

.corridor-page::before {
  top: 0;
  height: 210px;
  background:
    radial-gradient(circle at 18% 42%, #f5cf21 0 7px, transparent 8px),
    radial-gradient(circle at 24% 48%, #fff7ec 0 7px, transparent 8px),
    radial-gradient(circle at 31% 37%, #2aa9d0 0 7px, transparent 8px),
    radial-gradient(circle at 78% 39%, #fff7ec 0 7px, transparent 8px),
    radial-gradient(circle at 84% 49%, #f15a3a 0 7px, transparent 8px),
    linear-gradient(168deg, transparent 0 40%, rgba(138, 79, 45, 0.32) 40.2% 40.8%, transparent 41% 100%);
  opacity: 0.55;
}

.corridor-page::after {
  bottom: 0;
  height: 260px;
  background:
    linear-gradient(176deg, transparent 0 38%, rgba(104, 176, 68, 0.2) 38.4% 100%),
    linear-gradient(184deg, transparent 0 52%, rgba(180, 218, 56, 0.52) 52.4% 100%);
}

.corridor-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(310px, 0.94fr);
  gap: 18px;
  align-items: stretch;
}

.corridor-hero-copy,
.corridor-poster,
.corridor-guide,
.corridor-story-card {
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  box-shadow: 0 22px 56px rgba(122, 58, 54, 0.12);
}

.corridor-hero-copy {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  padding: clamp(34px, 5.4vw, 64px);
  background:
    linear-gradient(90deg, rgba(223, 63, 37, 0.86) 0 7px, transparent 7px),
    radial-gradient(ellipse at 88% 8%, rgba(255, 255, 255, 0.82) 0 8.2rem, transparent 8.4rem),
    linear-gradient(145deg, rgba(255, 252, 240, 0.98), rgba(255, 244, 212, 0.94)),
    repeating-linear-gradient(0deg, rgba(223, 63, 37, 0.055) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(223, 63, 37, 0.045) 0 1px, transparent 1px 28px);
}

.corridor-hero-copy::before {
  content: "";
  position: absolute;
  left: clamp(34px, 5.4vw, 64px);
  right: clamp(34px, 5.4vw, 64px);
  top: clamp(28px, 4vw, 42px);
  height: 15px;
  background:
    radial-gradient(circle at 7px 7px, #f5cf21 0 6px, transparent 7px) 0 0 / 68px 15px,
    radial-gradient(circle at 7px 7px, #078fc5 0 6px, transparent 7px) 23px 0 / 68px 15px,
    radial-gradient(circle at 7px 7px, #fff8ed 0 6px, transparent 7px) 46px 0 / 68px 15px;
  opacity: 0.9;
}

.corridor-hero-copy::after {
  content: "";
  position: absolute;
  right: -72px;
  bottom: -78px;
  width: 250px;
  height: 250px;
  border: 34px solid rgba(223, 63, 37, 0.1);
  border-radius: 50%;
}

.corridor-hero-copy > * {
  position: relative;
  z-index: 1;
}

.corridor-kicker {
  max-width: 42rem;
  margin: 34px 0 24px;
  color: #078fc5;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.corridor-title {
  display: grid;
  gap: 8px;
  max-width: 10.5ch;
  margin: 0;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.02;
}

.corridor-title span {
  display: block;
  text-shadow:
    0 3px 0 rgba(245, 207, 33, 0.46),
    0 12px 24px rgba(122, 58, 54, 0.09);
}

.corridor-title span:first-child {
  color: #df3f25;
}

.corridor-title span:last-child {
  color: #0f9a9a;
}

.corridor-lead {
  max-width: 42rem;
  margin: 28px 0 0;
  color: #5f4d43;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 1.08rem;
  line-height: 2;
}

.corridor-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 42rem;
  margin-top: 34px;
  border-top: 2px solid rgba(255, 255, 255, 0.82);
  border-bottom: 2px solid rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(45deg, rgba(223, 63, 37, 0.055) 0 8px, transparent 8px 16px);
}

.corridor-meta-row span {
  display: block;
  min-height: 52px;
  padding: 14px 14px 13px 0;
  color: #df3f25;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.corridor-meta-row span + span {
  padding-left: 16px;
  border-left: 1px solid rgba(223, 63, 37, 0.14);
}

.corridor-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  max-width: 42rem;
  margin-top: 36px;
  border-top: 1px solid rgba(223, 63, 37, 0.16);
}

.corridor-nav a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  min-width: 0;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  color: #4f4139;
  border-bottom: 1px solid rgba(223, 63, 37, 0.14);
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: color 0.16s ease, padding-left 0.16s ease;
}

.corridor-nav a:hover,
.corridor-nav a:focus-visible {
  color: #df3f25;
  outline: none;
  padding-left: 6px;
}

.nav-count {
  display: block;
  color: #df3f25;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 700;
}

.corridor-poster {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 245, 250, 0.78), rgba(255, 248, 226, 0.9)),
    repeating-linear-gradient(45deg, rgba(223, 63, 37, 0.06) 0 10px, transparent 10px 20px);
}

.corridor-poster img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 540px;
  object-fit: cover;
  object-position: center 36%;
  border-radius: 4px;
  filter: saturate(0.98) contrast(0.99);
}

.corridor-poster::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(49, 36, 31, 0.03), transparent 46%, rgba(49, 36, 31, 0.1)),
    linear-gradient(90deg, rgba(255, 250, 241, 0.08), transparent 28%, rgba(255, 250, 241, 0.06));
  pointer-events: none;
}

.corridor-poster figcaption {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
  z-index: 1;
  padding: 12px 14px;
  color: #fff8e8;
  border-left: 3px solid rgba(245, 207, 33, 0.92);
  background: rgba(52, 63, 37, 0.62);
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.corridor-guide {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-top: 16px;
  padding: 18px 22px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), rgba(255, 248, 226, 0.72)),
    repeating-linear-gradient(90deg, rgba(223, 63, 37, 0.06) 0 24px, rgba(223, 63, 37, 0) 24px 48px);
  box-shadow: 0 12px 30px rgba(122, 58, 54, 0.06);
}

.corridor-guide p,
.corridor-guide strong {
  margin: 0;
}

.corridor-guide p {
  color: #df3f25;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: left;
}

.corridor-guide strong {
  color: #5f4d43;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.8;
}

.corridor-stories {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.corridor-story-card {
  scroll-margin-top: 16px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.94), rgba(255, 247, 226, 0.92)),
    repeating-linear-gradient(0deg, rgba(15, 154, 154, 0.035) 0 1px, transparent 1px 28px);
  box-shadow: 0 14px 34px rgba(122, 58, 54, 0.085);
}

.corridor-story-card:target {
  border-color: rgba(223, 63, 37, 0.42);
  box-shadow:
    0 0 0 4px rgba(245, 207, 33, 0.18),
    0 20px 46px rgba(122, 58, 54, 0.13);
}

.corridor-story-index {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 100%;
  padding: 24px 18px 20px;
  color: var(--station-tone);
  border-right: 1px solid rgba(223, 63, 37, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 243, 230, 0.86), rgba(255, 248, 226, 0.92)),
    repeating-linear-gradient(45deg, rgba(223, 63, 37, 0.055) 0 7px, transparent 7px 14px);
}

.corridor-story-index::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 88px;
  height: 1px;
  background: currentColor;
  opacity: 0.38;
}

.corridor-story-index span {
  position: relative;
  z-index: 1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.7rem;
  font-weight: 700;
  line-height: 0.9;
}

.corridor-story-index small {
  position: relative;
  z-index: 1;
  color: #756159;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
}

.corridor-card-body {
  padding: clamp(24px, 3.6vw, 38px);
}

.corridor-story-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.corridor-story-head span,
.corridor-story-head small {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0;
  border-radius: 0;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.corridor-story-head span {
  color: #9f2f24;
  background: transparent;
}

.corridor-story-head small {
  color: #8a746b;
  background: transparent;
}

.corridor-story-card h2 {
  max-width: 20ch;
  margin: 0 0 18px;
  color: #362622;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  font-weight: 900;
  line-height: 1.18;
}

.corridor-paragraphs {
  display: grid;
  gap: 0;
  max-width: 58rem;
}

.corridor-story-card p {
  margin: 0;
  color: #5f4d43;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 1.05rem;
  line-height: 2;
}

.corridor-story-card p + p {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(223, 63, 37, 0.1);
}

.hero-panel {
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.95fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 20px;
}

.poster-hero {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: stretch;
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: 38px 42px 34px;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 92% 10%, rgba(255, 255, 255, 0.54) 0 4.6rem, transparent 4.8rem),
    radial-gradient(circle at 99% 99%, rgba(255, 161, 117, 0.18) 0 7.5rem, transparent 7.7rem),
    linear-gradient(135deg, rgba(255, 253, 242, 0.98), rgba(255, 246, 221, 0.9)),
    repeating-linear-gradient(90deg, rgba(7, 152, 206, 0.07) 0 2px, transparent 2px 20px);
  box-shadow: var(--shadow);
}

.hero-copy::before {
  content: "";
  position: absolute;
  right: 46px;
  top: 38px;
  width: 130px;
  height: 106px;
  opacity: 0.95;
  background:
    radial-gradient(circle at 18px 76px, rgba(255, 255, 255, 0.9) 0 17px, transparent 18px),
    radial-gradient(circle at 48px 60px, rgba(255, 255, 255, 0.98) 0 39px, transparent 40px),
    radial-gradient(circle at 86px 74px, rgba(255, 255, 255, 0.96) 0 32px, transparent 33px);
  pointer-events: none;
  z-index: 0;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -88px;
  width: 240px;
  height: 240px;
  border: 32px solid rgba(240, 58, 24, 0.12);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-copy > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--festival-blue);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

h1 {
  margin: 0;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  color: var(--malt);
}

.hero-title {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  max-width: 9.5ch;
}

.title-overline,
.title-main {
  display: block;
  width: max-content;
  max-width: 100%;
  color: var(--malt);
  text-shadow:
    0 4px 0 rgba(243, 211, 10, 0.56),
    0 12px 22px rgba(240, 58, 24, 0.13);
}

.title-overline {
  font-size: clamp(2.25rem, 4.6vw, 3.8rem);
}

.title-main {
  font-size: clamp(3.8rem, 7.4vw, 6.25rem);
}

.lead {
  max-width: 48rem;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.8;
}

.event-ribbons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.event-ribbons span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 8px 12px;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: var(--festival-blue);
  box-shadow: 0 8px 16px rgba(7, 152, 206, 0.18);
  font-weight: 900;
}

.event-ribbons span:nth-child(2) {
  background: var(--malt);
}

.event-ribbons span:nth-child(3) {
  background: var(--teal);
}

.visual-poster {
  position: relative;
  min-height: 380px;
  margin: 0;
  padding: 10px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 240, 247, 0.9));
  box-shadow: var(--shadow);
}

.visual-poster img {
  display: block;
  width: 100%;
  height: min(62vh, 540px);
  object-fit: cover;
  object-position: center 34%;
  border-radius: calc(var(--radius) - 2px);
}

.mission-strip {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 190px repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 4% 100%, rgba(255, 255, 255, 0.78) 0 4rem, transparent 4.2rem),
    radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.62) 0 6rem, transparent 6.2rem),
    linear-gradient(180deg, rgba(255, 231, 241, 0.98) 0%, rgba(255, 250, 225, 0.98) 52%, rgba(205, 231, 76, 0.9) 100%);
  box-shadow: var(--shadow);
}

.mission-strip::before {
  content: none;
}

.mission-label,
.mission-card {
  position: relative;
  z-index: 1;
}

.mission-label {
  display: grid;
  place-items: center;
  min-height: 124px;
  padding: 14px;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: var(--festival-blue);
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 10px 20px rgba(7, 152, 206, 0.2);
}

.mission-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px 12px;
  align-content: center;
  min-height: 124px;
  padding: 18px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: #fffdf5;
  box-shadow: 0 12px 24px rgba(126, 56, 48, 0.08);
}

.mission-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  border-radius: 50%;
  background: var(--malt);
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-weight: 900;
  box-shadow: 0 7px 13px rgba(240, 58, 24, 0.2);
}

.mission-card:nth-of-type(2) .mission-icon {
  background: var(--teal);
}

.mission-card:nth-of-type(3) .mission-icon {
  color: var(--ink);
  background: var(--gold);
}

.mission-card strong {
  color: var(--festival-blue);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.25;
}

.mission-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.7;
}

.game-board {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.progress-panel,
.screen-panel {
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 253, 241, 0.93);
  box-shadow: var(--shadow);
}

.progress-panel {
  position: sticky;
  top: 18px;
  padding: 20px;
}

.progress-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 800;
}

.progress-track {
  height: 12px;
  margin: 12px 0 18px;
  overflow: hidden;
  border: 1px solid rgba(7, 152, 206, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--festival-blue), var(--teal), var(--gold), var(--malt));
  transition: width 0.4s ease;
}

.route-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.38);
}

.route-index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff4df;
  border-radius: 50%;
  background: var(--festival-blue);
  font-size: 0.86rem;
  font-weight: 900;
}

.route-item.active {
  color: var(--ink);
  border-color: rgba(240, 58, 24, 0.38);
  background: rgba(255, 239, 158, 0.66);
}

.route-item.done .route-index {
  background: var(--green);
}

.route-item.done {
  color: var(--malt-deep);
}

.testing-note {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 12px;
  border-left: 4px solid var(--festival-blue);
  background: rgba(7, 152, 206, 0.08);
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}

.screen-panel {
  min-height: 560px;
  overflow: hidden;
}

.screen-inner {
  display: grid;
  gap: 20px;
  padding: 26px;
}

.screen-head {
  display: grid;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.station-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  color: var(--malt-deep);
  border: 1px solid rgba(184, 34, 37, 0.2);
  border-radius: 999px;
  background: rgba(255, 242, 208, 0.86);
  font-size: 0.88rem;
  font-weight: 800;
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.subtitle {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

.story-card,
.clue-card,
.question-card,
.chest-card,
.ending-card {
  border: 1px solid rgba(7, 152, 206, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 241, 208, 0.56)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(7, 152, 206, 0.045) 30px 31px);
}

.story-card {
  padding: 22px;
}

.story-card p {
  margin: 0 0 16px;
  font-size: 1.05rem;
  line-height: 2;
}

.story-card p:last-child {
  margin-bottom: 0;
}

.clue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.clue-card {
  padding: 16px;
}

.clue-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--festival-blue);
}

.clue-card span {
  color: var(--ink-soft);
  line-height: 1.65;
}

.question-card,
.chest-card,
.ending-card,
.lore-card {
  padding: 20px;
}

.lore-card {
  position: relative;
  display: grid;
  gap: 12px;
  overflow: hidden;
  border: 2px solid rgba(79, 169, 70, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(185, 221, 59, 0.18), rgba(255, 244, 223, 0.86) 42%, rgba(244, 164, 198, 0.18)),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(7, 152, 206, 0.045) 22px 23px);
}

.lore-card::after {
  content: "SCAN";
  position: absolute;
  right: 16px;
  top: 12px;
  color: rgba(49, 90, 66, 0.1);
  font-family: Georgia, serif;
  font-size: 3.4rem;
  font-weight: 900;
}

.scan-label {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  color: #fff8e8;
  border-radius: 999px;
  background: var(--festival-blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.lore-card h3 {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  color: var(--teal);
  font-size: 1.35rem;
  line-height: 1.3;
}

.lore-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.85;
}

.question-title {
  margin: 0 0 14px;
  font-size: 1.24rem;
  font-weight: 900;
  line-height: 1.55;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.choice-btn {
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(7, 152, 206, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.choice-btn:hover,
.choice-btn:focus-visible {
  border-color: rgba(240, 58, 24, 0.58);
  background: #fff8e8;
  outline: none;
  transform: translateY(-1px);
}

.feedback {
  display: none;
  padding: 12px 14px;
  border-radius: var(--radius);
  line-height: 1.7;
}

.feedback.show {
  display: block;
}

.feedback.good {
  color: #174430;
  border: 1px solid rgba(79, 169, 70, 0.32);
  background: rgba(185, 221, 59, 0.18);
}

.feedback.bad {
  color: #6d1c1f;
  border: 1px solid rgba(184, 34, 37, 0.28);
  background: rgba(184, 34, 37, 0.1);
}

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

.primary-btn,
.secondary-btn {
  min-height: 46px;
  padding: 11px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-btn {
  color: #fff8e8;
  background: linear-gradient(135deg, var(--festival-blue), var(--teal));
  box-shadow: 0 12px 22px rgba(7, 152, 206, 0.22);
}

.secondary-btn {
  color: var(--ink);
  border: 1px solid rgba(104, 68, 57, 0.28);
  background: rgba(255, 255, 255, 0.72);
}

.primary-btn:hover,
.secondary-btn:hover,
.primary-btn:focus-visible,
.secondary-btn:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.primary-btn:disabled,
.secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.chest-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: stretch;
}

.big-chest {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid rgba(91, 43, 29, 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 242, 188, 0.9), transparent 5rem),
    linear-gradient(160deg, var(--sky-pink), #f3d30a 46%, #7cc84a 46.5%, #0b8fc1);
}

.big-chest::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 54%;
  width: 150px;
  height: 102px;
  transform: translate(-50%, -50%);
  border: 5px solid #4a2519;
  border-radius: 13px 13px 6px 6px;
  background:
    linear-gradient(90deg, transparent 44%, rgba(255, 244, 223, 0.46) 44% 56%, transparent 56%),
    linear-gradient(180deg, #e4a547 0 42%, #9a4c28 42.5% 100%);
  box-shadow: 0 20px 34px rgba(42, 23, 17, 0.34);
}

.big-chest::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(54% + 12px);
  width: 26px;
  height: 26px;
  transform: translateX(-50%);
  border: 4px solid #4a2519;
  border-radius: 5px;
  background: #fff4bd;
}

.secret-panel {
  display: grid;
  gap: 12px;
}

.secret-card {
  display: none;
  padding: 14px;
  border: 1px dashed rgba(240, 58, 24, 0.45);
  border-radius: var(--radius);
  background: rgba(255, 244, 223, 0.72);
}

.secret-card.show {
  display: block;
}

.secret-word {
  display: block;
  margin-top: 6px;
  color: var(--malt);
  font-size: 1.4rem;
  font-weight: 900;
}

.secret-input {
  display: grid;
  gap: 8px;
}

.secret-input label {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 900;
}

.secret-input input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid rgba(104, 68, 57, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.secret-input input:focus {
  border-color: rgba(184, 34, 37, 0.6);
  outline: 3px solid rgba(184, 34, 37, 0.12);
}

.seal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seal {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  color: #fff8e8;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--festival-blue), var(--teal), var(--green));
  font-size: 0.9rem;
  font-weight: 900;
}

.ending-card {
  display: grid;
  gap: 16px;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  padding: 12px;
  border-left: 4px solid var(--malt);
  background: rgba(255, 244, 223, 0.72);
  line-height: 1.7;
}

@keyframes babyBob {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@media (max-width: 920px) {
  .hero-panel,
  .corridor-hero,
  .game-board,
  .chest-layout {
    grid-template-columns: 1fr;
  }

  .corridor-hero-copy {
    min-height: auto;
  }

  .corridor-poster img {
    height: min(68vh, 540px);
    min-height: 440px;
    object-position: center 34%;
  }

  .corridor-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mission-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mission-label {
    min-height: 74px;
    grid-column: 1 / -1;
  }

  .progress-panel {
    position: static;
  }

  .clue-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 12px;
  }

  .corridor-shell {
    width: min(100% - 18px, 1160px);
    padding: 16px 0 42px;
  }

  .hero-copy,
  .corridor-hero-copy,
  .screen-inner,
  .progress-panel {
    padding: 18px;
  }

  .corridor-hero {
    gap: 10px;
  }

  .corridor-hero-copy::before {
    left: 22px;
    right: 22px;
    top: 24px;
  }

  .corridor-hero-copy::after {
    right: -92px;
    bottom: -100px;
    width: 210px;
    height: 210px;
    border-width: 28px;
  }

  .corridor-kicker {
    margin-top: 32px;
    margin-bottom: 18px;
    font-size: 0.72rem;
    line-height: 1.6;
  }

  .corridor-title {
    max-width: 9ch;
    font-size: clamp(2.7rem, 14vw, 3.8rem);
  }

  .corridor-lead,
  .corridor-story-card p,
  .corridor-guide strong {
    font-size: 1rem;
    line-height: 1.9;
  }

  .corridor-meta-row {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .corridor-meta-row span {
    min-height: 0;
    padding: 10px 0;
    font-size: 0.88rem;
  }

  .corridor-meta-row span + span {
    padding-left: 0;
    border-top: 1px solid rgba(92, 52, 41, 0.12);
    border-left: 0;
  }

  .corridor-nav {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 24px;
  }

  .corridor-nav a {
    min-height: 46px;
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 10px 0;
  }

  .corridor-poster {
    padding: 8px;
  }

  .corridor-poster img {
    height: 390px;
    min-height: 0;
  }

  .corridor-poster::after {
    inset: 8px;
  }

  .corridor-poster figcaption {
    left: 18px;
    right: 18px;
    bottom: 16px;
    font-size: 0.82rem;
  }

  .corridor-guide {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 16px;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.38), rgba(255, 248, 226, 0.78)),
      repeating-linear-gradient(90deg, rgba(223, 63, 37, 0.055) 0 20px, rgba(223, 63, 37, 0) 20px 40px);
  }

  .corridor-guide p {
    color: #df3f25;
    text-align: left;
  }

  .corridor-story-card {
    grid-template-columns: 1fr;
  }

  .corridor-story-index {
    display: flex;
    min-height: auto;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(92, 52, 41, 0.14);
  }

  .corridor-story-index::after {
    display: none;
  }

  .corridor-story-index span {
    font-size: 2rem;
  }

  .corridor-card-body {
    padding: 18px;
  }

  .corridor-story-card h2 {
    max-width: none;
    font-size: 1.8rem;
  }

  .hero-panel {
    gap: 10px;
  }

  .mission-strip {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .mission-label {
    grid-column: auto;
    min-height: 58px;
  }

  .mission-card {
    min-height: 96px;
  }

  h1 {
    font-size: 3rem;
  }

  .title-overline {
    font-size: 2.2rem;
  }

  .title-main {
    font-size: 3.6rem;
  }

  h2 {
    font-size: 2rem;
  }

  .story-card p {
    font-size: 1rem;
    line-height: 1.9;
  }

  .route-list {
    grid-template-columns: 1fr 1fr;
  }

  .route-item {
    grid-template-columns: 28px 1fr;
    padding: 8px;
    font-size: 0.9rem;
  }

  .route-index {
    width: 26px;
    height: 26px;
  }
}

/* Mobile-first novel reader for the cultural corridor. */
.corridor-page {
  color: #3a2722;
  background:
    radial-gradient(ellipse at 12% 5%, rgba(255, 255, 255, 0.75) 0 4.8rem, transparent 5rem),
    radial-gradient(ellipse at 88% 8%, rgba(255, 255, 255, 0.84) 0 5.6rem, transparent 5.8rem),
    linear-gradient(180deg, #f5adc9 0 16rem, #ffe3df 16rem 28rem, #fff8df 28rem 72%, #d8ea5d 100%);
}

.corridor-shell {
  width: min(100% - 22px, 430px);
  padding: 12px 0 42px;
}

.corridor-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.corridor-hero-copy,
.corridor-poster,
.corridor-guide,
.corridor-story-card {
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(127, 54, 52, 0.12);
}

.corridor-hero-copy {
  min-height: auto;
  padding: 24px 20px 18px;
  background:
    linear-gradient(180deg, rgba(255, 253, 240, 0.96), rgba(255, 244, 218, 0.94)),
    repeating-linear-gradient(0deg, rgba(223, 63, 37, 0.05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(223, 63, 37, 0.04) 0 1px, transparent 1px 28px);
}

.corridor-hero-copy::before {
  left: 20px;
  right: 20px;
  top: 18px;
  height: 12px;
  background:
    radial-gradient(circle at 6px 6px, #f4d42a 0 5px, transparent 6px) 0 0 / 54px 12px,
    radial-gradient(circle at 6px 6px, #078fc5 0 5px, transparent 6px) 18px 0 / 54px 12px,
    radial-gradient(circle at 6px 6px, #fff8ed 0 5px, transparent 6px) 36px 0 / 54px 12px;
}

.corridor-hero-copy::after {
  right: -96px;
  bottom: -98px;
  width: 210px;
  height: 210px;
  border-width: 26px;
}

.corridor-kicker {
  margin: 26px 0 12px;
  color: #078fc5;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.55;
  letter-spacing: 0.04em;
}

.corridor-title {
  max-width: none;
  gap: 2px;
  font-size: clamp(2.35rem, 14vw, 3.35rem);
  line-height: 1.04;
}

.corridor-title span {
  text-shadow:
    0 3px 0 rgba(245, 207, 33, 0.42),
    0 10px 20px rgba(122, 58, 54, 0.12);
}

.corridor-lead {
  margin-top: 16px;
  color: #59433d;
  font-size: 1rem;
  line-height: 1.95;
}

.corridor-meta-row {
  grid-template-columns: 1fr;
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.28);
  border-top: 1px solid rgba(223, 63, 37, 0.16);
  border-bottom: 1px solid rgba(223, 63, 37, 0.16);
}

.corridor-meta-row span {
  min-height: 0;
  padding: 9px 0;
  color: #df3f25;
  font-size: 0.88rem;
}

.corridor-meta-row span + span {
  padding-left: 0;
  border-left: 0;
  border-top: 1px solid rgba(223, 63, 37, 0.12);
}

.corridor-nav {
  display: flex;
  gap: 8px;
  max-width: none;
  margin: 18px -20px 0;
  padding: 0 20px 4px;
  overflow-x: auto;
  border-top: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.corridor-nav::-webkit-scrollbar {
  display: none;
}

.corridor-nav a {
  flex: 0 0 132px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  min-height: 74px;
  padding: 10px;
  color: #3a2722;
  border: 1px solid rgba(223, 63, 37, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 242, 0.76);
  scroll-snap-align: start;
}

.corridor-nav a:hover,
.corridor-nav a:focus-visible {
  padding-left: 10px;
  color: #df3f25;
}

.nav-count {
  color: #df3f25;
  font-size: 0.92rem;
}

.corridor-nav a > span:not(.nav-count) {
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.2;
}

.corridor-nav a small {
  color: #6d5750;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.corridor-poster {
  padding: 8px;
  background:
    linear-gradient(180deg, rgba(255, 245, 250, 0.84), rgba(255, 248, 226, 0.94)),
    repeating-linear-gradient(45deg, rgba(223, 63, 37, 0.06) 0 10px, transparent 10px 20px);
}

.corridor-poster img {
  height: 330px;
  min-height: 0;
  object-position: center 34%;
}

.corridor-poster::after {
  inset: 8px;
}

.corridor-poster figcaption {
  left: 18px;
  right: 18px;
  bottom: 16px;
  padding: 10px 12px;
  font-size: 0.8rem;
}

.corridor-guide {
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 10px;
  padding: 14px 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), rgba(255, 248, 226, 0.8)),
    repeating-linear-gradient(90deg, rgba(223, 63, 37, 0.055) 0 20px, rgba(223, 63, 37, 0) 20px 40px);
}

.corridor-guide p {
  color: #df3f25;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

.corridor-guide strong {
  color: #59433d;
  font-size: 0.96rem;
  line-height: 1.8;
}

.corridor-stories {
  gap: 18px;
  margin-top: 16px;
}

.corridor-story-card {
  display: grid;
  grid-template-columns: 1fr;
  scroll-margin-top: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.96), rgba(255, 247, 226, 0.94)),
    repeating-linear-gradient(0deg, rgba(15, 154, 154, 0.032) 0 1px, transparent 1px 30px);
}

.corridor-story-index {
  display: flex;
  min-height: auto;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  color: var(--station-tone);
  border-right: 0;
  border-bottom: 1px solid rgba(223, 63, 37, 0.13);
  background:
    linear-gradient(90deg, rgba(255, 243, 230, 0.88), rgba(255, 248, 226, 0.92)),
    repeating-linear-gradient(45deg, rgba(223, 63, 37, 0.05) 0 7px, transparent 7px 14px);
}

.corridor-story-index::after {
  display: none;
}

.corridor-story-index span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.72rem;
}

.corridor-story-index small {
  color: #6d5750;
  font-size: 0.92rem;
}

.corridor-card-body {
  padding: 20px 18px 22px;
}

.chapter-station {
  margin: 0 0 8px;
  color: #df3f25;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.chapter-scene {
  margin: 0 0 16px;
  padding: 11px 12px;
  color: #5d5240;
  border-left: 4px solid rgba(245, 207, 33, 0.9);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 244, 204, 0.58);
  font-size: 0.95rem;
  line-height: 1.75;
}

.corridor-story-card h2 {
  max-width: none;
  margin: 0 0 18px;
  color: #33221f;
  font-size: clamp(1.72rem, 8.2vw, 2.25rem);
  line-height: 1.25;
}

.corridor-paragraphs {
  max-width: none;
}

.corridor-story-card p {
  color: #4d3b35;
  font-size: 1.08rem;
  line-height: 2.08;
}

.corridor-paragraphs p {
  margin: 0;
  text-indent: 2em;
}

.corridor-story-card p + p {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.corridor-paragraphs p + p {
  margin-top: 0.92em;
}

.chapter-hint {
  margin: 22px 0 0;
  padding: 13px 14px;
  color: #362622;
  border: 1px solid rgba(223, 63, 37, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.46), rgba(255, 244, 204, 0.7)),
    repeating-linear-gradient(45deg, rgba(223, 63, 37, 0.052) 0 7px, transparent 7px 14px);
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.65;
}

@media (min-width: 760px) {
  .corridor-shell {
    width: min(720px, calc(100% - 48px));
    padding-top: 30px;
  }

  .corridor-hero-copy {
    padding: 34px 38px 28px;
  }

  .corridor-title {
    font-size: 4.6rem;
  }

  .corridor-poster img {
    height: 520px;
  }

  .corridor-card-body {
    padding: 32px 38px 36px;
  }

  .corridor-story-card h2 {
    font-size: 2.65rem;
  }
}

/* Red yeast mobile novel quest, inspired by the Guandu task-book flow. */
.red-novel-page {
  min-height: 100vh;
  margin: 0;
  color: #3c2924;
  font-family: "Noto Serif TC", "Source Han Serif TC", "PMingLiU", Georgia, serif;
  background:
    linear-gradient(180deg, rgba(246, 172, 205, 0.92) 0 17rem, rgba(255, 231, 221, 0.94) 17rem 34rem, rgba(255, 248, 218, 0.98) 34rem 78%, #dbe869 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 34px);
  overflow-x: hidden;
}

.red-novel-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background:
    linear-gradient(90deg, transparent 0 5%, rgba(255, 255, 255, 0.58) 5% 18%, transparent 18% 29%, rgba(255, 255, 255, 0.5) 29% 41%, transparent 41% 100%) top center / 100% 122px no-repeat,
    repeating-linear-gradient(102deg, transparent 0 34px, rgba(255, 255, 255, 0.18) 34px 36px, transparent 36px 72px);
}

.red-novel-page button,
.red-novel-page input {
  font: inherit;
}

.red-novel-page button {
  border: 0;
}

.novel-app {
  width: min(100% - 20px, 430px);
  margin: 0 auto;
  padding: 12px 0 46px;
}

.novel-cover,
.novel-ledger,
.novel-chapter-panel,
.route-board,
.novel-modal-panel {
  border: 1px solid rgba(137, 74, 42, 0.2);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(121, 55, 53, 0.16);
}

.novel-cover {
  position: relative;
  padding: 24px 18px 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 253, 242, 0.97), rgba(255, 245, 218, 0.96)),
    repeating-linear-gradient(0deg, rgba(219, 63, 38, 0.045) 0 1px, transparent 1px 30px);
}

.novel-cover::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  height: 14px;
  background:
    radial-gradient(circle at 7px 7px, #f6d12b 0 5px, transparent 6px) 0 0 / 64px 14px,
    radial-gradient(circle at 7px 7px, #1398bf 0 5px, transparent 6px) 22px 0 / 64px 14px,
    radial-gradient(circle at 7px 7px, #fff8e9 0 5px, transparent 6px) 44px 0 / 64px 14px;
}

.novel-cover::after {
  content: "";
  position: absolute;
  right: -58px;
  top: 44px;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 34px rgba(255, 255, 255, 0.55);
}

.cover-kicker,
.cover-title,
.cover-lead,
.cover-poster {
  position: relative;
  z-index: 1;
}

.cover-kicker {
  margin: 20px 0 11px;
  color: #078fc5;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.cover-title {
  display: grid;
  gap: 2px;
  margin: 0;
  color: #e73a1c;
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: clamp(2.35rem, 13vw, 3.55rem);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: 0;
}

.cover-title span {
  text-shadow:
    0 3px 0 rgba(242, 210, 38, 0.54),
    0 12px 28px rgba(129, 65, 47, 0.13);
}

.cover-lead {
  margin: 17px 0 0;
  color: #5a443e;
  font-size: 1rem;
  line-height: 1.92;
}

.cover-axis {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.cover-axis span {
  min-height: 38px;
  display: grid;
  place-items: center;
  color: #fff8df;
  border-radius: 999px;
  background: #0f9694;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.84rem;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(15, 150, 148, 0.16);
}

.cover-axis span:nth-child(2),
.cover-axis span:nth-child(5) {
  color: #4c311e;
  background: #f5d32b;
}

.cover-axis span:nth-child(3),
.cover-axis span:nth-child(6) {
  background: #df3f25;
}

.cover-poster {
  margin: 18px 0 0;
  padding: 8px;
  border: 1px solid rgba(219, 63, 38, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.cover-poster img {
  display: block;
  width: 100%;
  height: 250px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center 23%;
}

.cover-poster figcaption {
  margin: 9px 2px 0;
  color: #70564f;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.78rem;
  line-height: 1.55;
}

.novel-ledger {
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  padding: 16px;
  color: #44302a;
  border: 2px solid rgba(255, 255, 255, 0.86);
  background:
    radial-gradient(circle at 86% -8%, rgba(255, 255, 255, 0.95) 0 4.8rem, transparent 5rem),
    radial-gradient(circle at 14% 104%, rgba(178, 218, 72, 0.42) 0 5.2rem, transparent 5.4rem),
    linear-gradient(180deg, rgba(255, 250, 235, 0.98), rgba(255, 230, 242, 0.94) 62%, rgba(255, 247, 219, 0.98));
  box-shadow: 0 18px 42px rgba(176, 77, 92, 0.18);
}

.novel-ledger::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 14px;
  height: 14px;
  pointer-events: none;
  background:
    radial-gradient(circle at 7px 7px, #f5d32b 0 5px, transparent 6px) 0 0 / 64px 14px,
    radial-gradient(circle at 7px 7px, #1398bf 0 5px, transparent 6px) 21px 0 / 64px 14px,
    radial-gradient(circle at 7px 7px, #fff9ed 0 5px, transparent 6px) 42px 0 / 64px 14px;
}

.novel-ledger::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -34px;
  height: 86px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(164, 215, 62, 0.78) 0 4.4rem, transparent 4.5rem),
    radial-gradient(ellipse at 70% 82%, rgba(193, 224, 73, 0.7) 0 5.8rem, transparent 5.9rem);
}

.novel-ledger > * {
  position: relative;
  z-index: 1;
}

.ledger-head {
  display: grid;
  grid-template-columns: 1fr 42px 42px;
  gap: 8px;
  align-items: center;
}

.ledger-head p {
  margin: 0;
  color: #078fc5;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.ledger-head strong {
  display: block;
  margin-top: 4px;
  color: #df3f25;
  font-size: 1.55rem;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(245, 211, 43, 0.36);
}

.icon-action {
  width: 42px;
  height: 42px;
  color: #0f7775;
  border: 1px solid rgba(15, 150, 148, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 1.12rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 150, 148, 0.12), inset 0 -2px 0 rgba(15, 150, 148, 0.12);
}

.progress-track {
  height: 8px;
  margin: 14px 0;
  border: 1px solid rgba(15, 150, 148, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #df3f25, #f5d32b, #0f9694);
  transition: width 0.35s ease;
}

.red-seal-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.red-seal {
  min-height: 70px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: #806962;
  border: 1px solid rgba(223, 63, 37, 0.14);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 249, 232, 0.72)),
    repeating-linear-gradient(45deg, rgba(223, 63, 37, 0.04) 0 7px, transparent 7px 14px);
  box-shadow: inset 0 -2px 0 rgba(223, 63, 37, 0.07);
}

.red-seal span {
  color: #df3f25;
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(245, 211, 43, 0.32);
}

.red-seal small {
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
}

.red-seal.is-earned {
  color: #315144;
  border-color: rgba(15, 150, 148, 0.38);
  background:
    linear-gradient(180deg, #fff7c9, #dff09a),
    repeating-linear-gradient(45deg, rgba(15, 150, 148, 0.08) 0 7px, transparent 7px 14px);
  box-shadow: 0 10px 20px rgba(151, 190, 42, 0.18), inset 0 -2px 0 rgba(15, 150, 148, 0.16);
}

.red-seal.is-earned span {
  color: #0f7775;
}

.ledger-notes {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.ledger-notes p {
  margin: 0;
  padding: 10px 11px;
  color: #5b463f;
  border-left: 4px solid #f5d32b;
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.62);
  font-size: 0.84rem;
  line-height: 1.62;
}

.novel-stage {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.novel-chapter-panel {
  position: relative;
  overflow: hidden;
  padding: 22px 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 253, 240, 0.98), rgba(255, 246, 224, 0.97)),
    repeating-linear-gradient(90deg, rgba(116, 69, 39, 0.04) 0 1px, transparent 1px 36px);
}

.novel-chapter-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(178, 116, 64, 0.14);
  border-radius: 6px;
}

.chapter-meta,
.novel-chapter-panel h2,
.chapter-scene-line,
.novel-story,
.reading-choices,
.novel-puzzle {
  position: relative;
  z-index: 1;
}

.chapter-meta {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.chapter-meta p {
  margin: 0;
  color: #b72e21;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chapter-meta p::before {
  content: "";
  display: inline-block;
  width: 36px;
  height: 2px;
  margin-right: 10px;
  vertical-align: middle;
  background: linear-gradient(90deg, #df3f25, #f4cd29);
}

.chapter-meta span {
  width: fit-content;
  padding: 5px 9px;
  color: #fff9ea;
  border-radius: 4px;
  background: #0f9694;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
}

.novel-chapter-panel h2 {
  margin: 0;
  color: #2f201c;
  font-size: clamp(1.92rem, 9vw, 2.5rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0;
}

.chapter-scene-line {
  margin: 17px 0 0;
  padding: 12px 13px;
  color: #5d5141;
  border-left: 4px solid #f4cd29;
  border-radius: 0 8px 8px 0;
  background: rgba(255, 238, 184, 0.52);
  font-size: 0.94rem;
  line-height: 1.72;
}

.chapter-blueprint {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.blueprint-main,
.blueprint-grid > div {
  border: 1px solid rgba(15, 150, 148, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 248, 220, 0.64)),
    repeating-linear-gradient(45deg, rgba(15, 150, 148, 0.04) 0 8px, transparent 8px 16px);
}

.blueprint-main {
  padding: 13px;
}

.blueprint-grid {
  display: grid;
  gap: 9px;
}

.blueprint-grid > div {
  padding: 12px;
}

.chapter-blueprint span {
  display: block;
  margin-bottom: 5px;
  color: #0f7775;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.chapter-blueprint strong {
  display: block;
  color: #2f201c;
  font-size: 1.06rem;
  line-height: 1.48;
}

.chapter-blueprint p {
  margin: 6px 0 0;
  color: #5a443e;
  font-size: 0.9rem;
  line-height: 1.68;
}

.novel-story {
  margin-top: 18px;
}

.novel-story p {
  margin: 0;
  color: #4d3a34;
  font-size: 1.08rem;
  line-height: 2.08;
  text-indent: 2em;
}

.novel-story p + p {
  margin-top: 0.94em;
}

.reading-choices {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(151, 82, 38, 0.18);
}

.choice-title,
.puzzle-title {
  margin: 0 0 12px;
  color: #b72e21;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.choice-grid,
.puzzle-options {
  display: grid;
  gap: 9px;
}

.reading-choice,
.puzzle-option {
  width: 100%;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px 11px;
  color: #3e2b25;
  text-align: left;
  border: 1px solid rgba(190, 94, 48, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.reading-choice span,
.puzzle-option span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff8df;
  border-radius: 50%;
  background: #df3f25;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
}

.reading-choice strong,
.puzzle-option strong {
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.94rem;
  line-height: 1.45;
}

.reading-choice:disabled {
  opacity: 0.72;
}

.choice-result,
.feedback,
.microcopy {
  margin-top: 12px;
  color: #5b463f;
  border-radius: 8px;
  background: rgba(255, 241, 190, 0.62);
  font-size: 0.92rem;
  line-height: 1.75;
}

.choice-result,
.feedback {
  padding: 11px 12px;
}

.microcopy {
  margin: 0 0 12px;
  padding: 0;
  background: transparent;
}

.novel-puzzle {
  margin-top: 16px;
}

.reader-lock,
.puzzle-box,
.stamp-earned,
.ending-panel {
  padding: 14px;
  border: 1px solid rgba(17, 151, 151, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.reader-lock {
  display: grid;
  gap: 6px;
}

.reader-lock strong,
.destination-card strong,
.stamp-earned strong,
.ending-panel strong {
  color: #0f8988;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-weight: 900;
}

.reader-lock span,
.destination-card span,
.stamp-earned span,
.ending-panel span {
  color: #5b463f;
  font-size: 0.93rem;
  line-height: 1.72;
}

.destination-card {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  padding: 12px;
  border-left: 4px solid #0f9694;
  border-radius: 0 8px 8px 0;
  background: rgba(231, 249, 237, 0.62);
}

.primary-action,
.quiet-action {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border-radius: 8px;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-weight: 900;
}

.primary-action {
  color: #fff8df;
  background: linear-gradient(180deg, #df3f25, #bd2f20);
  box-shadow: 0 10px 20px rgba(190, 49, 32, 0.2);
}

.quiet-action {
  color: #0f7775;
  border: 1px solid rgba(15, 150, 148, 0.24);
  background: rgba(255, 255, 255, 0.66);
}

.seed-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: #3c2924;
  border: 1px solid rgba(151, 82, 38, 0.28);
  border-radius: 8px;
  background: #fffdf3;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.quiz-meta span {
  flex: 0 0 auto;
  color: #70564f;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.8rem;
  font-weight: 900;
}

.quiz-progress {
  height: 7px;
  margin: 0 0 14px;
  border-radius: 999px;
  background: rgba(151, 82, 38, 0.13);
  overflow: hidden;
}

.quiz-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #df3f25, #f4cd29);
}

.puzzle-question {
  margin: 0 0 13px;
  color: #3e2b25;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.65;
}

.puzzle-option.is-correct {
  border-color: rgba(15, 150, 148, 0.62);
  background: rgba(219, 248, 230, 0.88);
}

.puzzle-option.is-correct span {
  background: #0f9694;
}

.puzzle-option.is-wrong {
  border-color: rgba(223, 63, 37, 0.55);
  background: rgba(255, 228, 217, 0.82);
}

.feedback.is-error {
  color: #8a241c;
  background: rgba(255, 228, 217, 0.78);
}

.stamp-earned {
  display: grid;
  gap: 6px;
  color: #3c2924;
  border-color: rgba(245, 205, 41, 0.48);
  background: linear-gradient(180deg, rgba(255, 247, 206, 0.92), rgba(255, 238, 171, 0.72));
}

.stamp-earned p {
  margin: 0;
  color: #b72e21;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.stamp-earned strong {
  color: #2f201c;
  font-size: 1.75rem;
}

.ending-panel {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  border-color: rgba(223, 63, 37, 0.22);
  background: rgba(255, 255, 255, 0.72);
}

.route-board {
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 248, 226, 0.96), rgba(255, 238, 218, 0.94)),
    repeating-linear-gradient(90deg, rgba(15, 150, 148, 0.04) 0 1px, transparent 1px 34px);
}

.route-board-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.route-board-head p {
  margin: 0;
  color: #b72e21;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.route-board-head strong {
  color: #0f7775;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.9rem;
  font-weight: 900;
}

.red-novel-page .route-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.red-novel-page .route-step {
  min-height: 78px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 8px 4px;
  color: #6e5a51;
  text-align: center;
  border: 1px solid rgba(151, 82, 38, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.red-novel-page .route-step span {
  color: #b72e21;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
}

.red-novel-page .route-step strong {
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 0.8rem;
  line-height: 1.18;
}

.red-novel-page .route-step small {
  display: none;
}

.red-novel-page .route-step.is-current {
  color: #2f201c;
  border-color: rgba(15, 150, 148, 0.45);
  background: rgba(226, 250, 237, 0.88);
}

.red-novel-page .route-step.is-done {
  border-color: rgba(245, 205, 41, 0.6);
  background: rgba(255, 244, 188, 0.82);
}

.route-note {
  margin: 11px 0 0;
  color: #70564f;
  font-size: 0.88rem;
  line-height: 1.62;
}

.novel-modal[hidden] {
  display: none;
}

.novel-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(47, 32, 28, 0.52);
}

.novel-modal-panel {
  width: min(100%, 390px);
  padding: 20px;
  background: #fff9e8;
}

.novel-modal-panel h3 {
  margin: 0 0 12px;
  color: #df3f25;
  font-size: 1.6rem;
}

.novel-modal-panel p,
.novel-modal-panel li {
  color: #4d3a34;
  font-size: 0.95rem;
  line-height: 1.78;
}

.novel-modal-panel ul {
  padding-left: 1.2em;
}

@media (min-width: 760px) {
  .novel-app {
    width: min(720px, calc(100% - 52px));
    padding-top: 30px;
  }

  .novel-cover {
    padding: 34px 38px 24px;
  }

  .cover-title {
    font-size: 4.8rem;
  }

  .cover-poster img {
    height: 420px;
  }

  .cover-axis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .novel-ledger,
  .novel-stage {
    margin-top: 14px;
  }

  .novel-chapter-panel {
    padding: 34px 38px 30px;
  }

  .blueprint-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .red-novel-page .route-list {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}
