@font-face {
  font-family: "AlibabaPuHuiTi";
  src: url("./assets/fonts/AlibabaPuHuiTi-3-55-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "AlibabaPuHuiTi";
  src: url("./assets/fonts/AlibabaPuHuiTi-3-85-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --reader-font: "AlibabaPuHuiTi", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --bg: #f5f6f4;
  --paper: #fbfcfa;
  --ink: #202320;
  --muted: #697069;
  --soft: rgba(255, 255, 255, 0.64);
  --soft-strong: rgba(255, 255, 255, 0.88);
  --line: rgba(123, 132, 121, 0.24);
  --red: #ff7676;
  --red-strong: #ff7676;
  --dark: #202320;
  --story-accent-hue: 0;
  --story-accent: #ff7676;
  --story-bg-opacity: 0.42;
  --story-bg-blur: 18px;
  --story-bg-wash: 0.74;
  --story-bg-image: none;
  --shadow: 0 18px 44px rgba(32, 35, 32, 0.14);
  color-scheme: light;
  font-family: var(--reader-font);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.reader-page {
  min-height: 100vh;
  overflow-x: clip;
  position: relative;
  padding-left: 48px;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 118, 118, 0.24), transparent 30%),
    radial-gradient(circle at 78% 8%, rgba(255, 255, 255, 0.82), transparent 24%),
    linear-gradient(135deg, #f7f7f2 0%, #eef2ed 48%, #fbf5ef 100%);
}

.bg-image,
.bg-wash,
.bg-blur {
  position: absolute;
  inset: 0;
}

.bg-image {
  opacity: var(--story-bg-opacity);
  background-image:
    var(--story-bg-image),
    radial-gradient(circle at 72% 18%, rgba(255, 118, 118, 0.32), transparent 30%),
    radial-gradient(circle at 24% 72%, rgba(255, 118, 118, 0.14), transparent 32%);
  background-position: center;
  background-size: cover;
  filter: blur(var(--story-bg-blur)) saturate(0.92) contrast(0.94);
  transform: scale(1.08);
  transition: opacity 220ms ease, filter 220ms ease;
}

.bg-wash {
  background:
    linear-gradient(90deg, rgba(245, 246, 244, 0.94) 0 18%, rgba(245, 246, 244, var(--story-bg-wash)) 44%, rgba(250, 250, 247, calc(var(--story-bg-wash) + 0.04)) 100%),
    rgba(245, 246, 244, var(--story-bg-wash));
}

.bg-blur {
  backdrop-filter: blur(18px) saturate(0.88);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06)),
    radial-gradient(circle at 1px 1px, rgba(32, 35, 32, 0.08) 1px, transparent 0);
  background-size: auto, 18px 18px;
  opacity: 0.56;
}

.reader-page.readable-mode {
  --story-bg-opacity: 0.18;
  --story-bg-blur: 28px;
  --story-bg-wash: 0.88;
}

.reader-page.has-story-image .bg-image {
  filter: blur(var(--story-bg-blur)) saturate(0.86) contrast(0.9);
}

.icon-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  background: rgba(251, 252, 250, 0.86);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.rail-logo {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: rgba(255, 118, 118, 0.82);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  background: rgba(255, 255, 255, 0.72);
}

.rail-spacer {
  flex: 1;
}

.rail-button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  color: rgba(32, 35, 32, 0.62);
  background: transparent;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.rail-button:hover,
.rail-button:focus-visible,
.rail-button.is-active {
  color: var(--story-accent);
  background: rgba(255, 118, 118, 0.12);
  outline: none;
}

.rail-button-active {
  color: #fff;
  background: var(--dark);
  box-shadow: 0 0 0 2px rgba(255, 118, 118, 0.2);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 48px;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  padding: 0 20px;
  color: rgba(32, 35, 32, 0.78);
  background: rgba(245, 246, 244, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar-brand {
  color: rgba(32, 35, 32, 0.72);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.topbar-title {
  text-align: center;
  font-size: 15px;
  font-weight: 800;
}

.topbar-actions {
  display: flex;
  gap: 6px;
}

.topbar-actions button {
  min-width: 32px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  color: rgba(32, 35, 32, 0.68);
  background: transparent;
  font-size: 12px;
}

.topbar-actions button:hover {
  background: rgba(255, 118, 118, 0.12);
}

.reader-layout {
  width: min(1500px, calc(100vw - 72px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 48px;
  padding: 54px 24px 150px;
}

.story-nav {
  align-self: start;
  position: sticky;
  top: 62px;
  z-index: 3;
  min-height: 0;
}

.nav-card {
  min-height: 430px;
  padding: 22px 22px 24px;
  border-radius: 8px;
  background: rgba(251, 252, 250, 0.16);
  border: 1px solid transparent;
  box-shadow:
    0 20px 48px rgba(32, 35, 32, 0.095),
    0 12px 34px rgba(255, 118, 118, 0.042);
  backdrop-filter: blur(22px);
  transform: translateY(8px) scale(0.992) translateZ(0);
  transform-origin: top left;
  transition:
    transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 320ms ease,
    background-color 320ms ease;
}

.story-nav.is-stuck .nav-card {
  background: rgba(251, 252, 250, 0.12);
  box-shadow:
    0 18px 44px rgba(32, 35, 32, 0.01),
    0 10px 28px rgba(255, 118, 118, 0.01);
  transform: translateY(0) scale(1) translateZ(0);
}
.story-nav.is-fixed .nav-card {
  position: relative;
  top: auto;
  left: auto;
  width: auto;
  z-index: 12;
}

.nav-kicker,
.section-label {
  margin: 0 0 8px;
  color: var(--story-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-card h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-family: var(--reader-font);
  font-weight: 700;
}

.nav-subtitle {
  margin: 6px 0 24px;
  color: var(--muted);
  font-size: 12px;
}

.nav-group {
  display: grid;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.nav-group + .nav-group {
  margin-top: 20px;
}

.nav-group > span {
  margin-bottom: 2px;
  color: rgba(255, 118, 118, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.nav-link {
  color: rgba(46, 42, 43, 0.76);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.45;
}

.nav-link::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 50%;
  background: rgba(67, 61, 62, 0.34);
}

.nav-link.is-active {
  color: var(--ink);
  font-weight: 800;
}

.nav-link.is-active::before {
  background: var(--story-accent);
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(46, 42, 43, 0.76);
  font-size: 13px;
}

.switch-row input {
  accent-color: var(--story-accent);
}

.voice-language-control {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 118, 118, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.voice-language-control.is-loading::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 118, 118, 0.72), transparent);
  transform: translateX(-88%);
  animation: voiceLanguageLoading 860ms ease-in-out infinite;
  pointer-events: none;
}

.voice-language-control.is-loading span {
  opacity: 0.72;
}

@keyframes voiceLanguageLoading {
  0% { transform: translateX(-88%); }
  100% { transform: translateX(88%); }
}

.voice-language-control label {
  position: relative;
  min-width: 0;
}

.voice-language-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.voice-language-control span {
  display: grid;
  place-items: center;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 4px;
  color: rgba(46, 42, 43, 0.62);
  font-size: 12px;
  font-weight: 800;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.voice-language-control input:checked + span {
  color: var(--story-accent);
  background: rgba(255, 118, 118, 0.095);
  box-shadow: 0 8px 18px rgba(255, 118, 118, 0.045);
}

.voice-language-control input:focus-visible + span {
  outline: 2px solid rgba(255, 118, 118, 0.34);
  outline-offset: 2px;
}

.voice-language-control label:hover span {
  color: rgba(255, 118, 118, 0.86);
  transform: translateY(-1px);
}

.story-main {
  min-width: 0;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

.story-heading {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin: 190px 0 54px;
}

.story-heading h2 {
  margin: 0;
  font-family: var(--reader-font);
  font-size: 28px;
  font-weight: 700;
}

.section-label {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--red);
  color: var(--ink);
  font-size: 20px;
}

.section-label span {
  color: rgba(42, 39, 40, 0.58);
  font-size: 12px;
}

.heading-copy {
  width: min(340px, 40%);
  margin: 0;
  color: rgba(42, 39, 40, 0.62);
  font-size: 13px;
  line-height: 1.7;
}

.chapter-strip.card_content_date {
  --date-accent: var(--story-accent);
  --date-accent-rgb: 255, 118, 118;
  margin-top: 80px;
  margin-bottom: 56px;
}

.card_content_date-track {
  position: relative;
  padding: 8px 0 40px;
}

.card_content_date-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card_content_date-item {
  width: calc(20% - 10px);
  min-width: 100px;
  max-width: 190px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.10),
    0 1px 3px rgba(255, 255, 255, 0.4) inset;
  position: relative;
  overflow: hidden;
  color: #1a1a1f;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.card_content_date-item:focus-visible {
  outline: 2px solid rgba(var(--date-accent-rgb), 0.52);
  outline-offset: 3px;
}

.card_content_date-item::before,
.card_content_date-item::after {
  content: none;
}

.card_content_date-item.is-active {
  border-color: rgba(var(--date-accent-rgb), 0.5);
  box-shadow:
    0 4px 18px rgba(var(--date-accent-rgb), 0.15),
    0 1px 3px rgba(255, 255, 255, 0.4) inset;
}

.card_content_date-body {
  padding: 10px 10px 12px;
  position: relative;
  min-height: 64px;
}

.card_content_date-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(200, 185, 210, 0.55) 0%,
    rgba(160, 140, 180, 0.35) 50%,
    rgba(120, 100, 140, 0.25) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.card_content_date-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.card_content_date-img .thumb,
.card_content_date-img figure {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  width: 100% !important;
  height: 100% !important;
}

.card_content_date-img .thumbinner,
.card_content_date-img figcaption {
  display: none !important;
}

.card_content_date-img .thumbimage {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top !important;
  display: block !important;
}

.card_content_date-num {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  font-style: italic;
  color: rgba(var(--date-accent-rgb), 0.18);
  line-height: 1;
  user-select: none;
  letter-spacing: 0;
}

.card_content_date-label {
  display: block;
  font-size: 0.58rem;
  color: rgba(80, 60, 100, 0.4);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
}

.card_content_date-item--style-a {
  border-top: 1px solid rgba(255, 255, 255, 0.55);
}

.card_content_date-item--style-a::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: 6px;
  height: 6px;
  background: var(--date-accent);
  border-radius: 1px;
  z-index: 1;
}

.card_content_date-item--style-a .card_content_date-body {
  padding-left: 20px;
}

.card_content_date-item--style-a .card_content_date-num {
  color: rgba(var(--date-accent-rgb), 0.22);
  font-size: 1.5rem;
}

.card_content_date-item--style-a .card_content_date-label {
  color: rgba(80, 60, 100, 0.38);
}

.card_content_date-item--style-b {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
}

.card_content_date-pixels {
  display: flex;
  gap: 2px;
  align-items: center;
  margin-top: 6px;
}

.card_content_date-pixels .px {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: rgba(0, 0, 0, 0.10);
  border-radius: 1px;
  flex-shrink: 0;
}

.card_content_date-pixels .px.on {
  background: var(--date-accent);
}

.card_content_date-item--end .card_content_date-pixels .px.on {
  background: rgba(var(--date-accent-rgb), 0.92);
}

.card_content_date-item--style-b .card_content_date-num {
  color: rgba(var(--date-accent-rgb), 0.15);
  font-size: 1.4rem;
}

.card_content_date-item--style-b .card_content_date-label {
  color: rgba(80, 60, 100, 0.4);
}

.card_content_date-item--end .card_content_date-label {
  color: rgba(var(--date-accent-rgb), 0.55);
  font-weight: 600;
  letter-spacing: 2.5px;
}

.card_content_date-item--style-c {
  border-top: 2px solid rgba(var(--date-accent-rgb), 0.25);
}

.card_content_date-bracket {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 8px;
}

.bracket-block {
  display: inline-block;
  width: 5px;
  height: 14px;
  background: var(--date-accent);
  border-radius: 1px;
  flex-shrink: 0;
  opacity: 0.7;
}

.bracket-block--r {
  width: 3px;
  height: 10px;
  opacity: 0.4;
}

.bracket-num {
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  font-style: italic;
  color: rgba(var(--date-accent-rgb), 0.5);
  line-height: 1;
  letter-spacing: 0;
}

.bracket-label {
  font-size: 0.55rem;
  color: rgba(80, 60, 100, 0.4);
  letter-spacing: 2px;
  text-transform: uppercase;
  flex: 1;
}

.card_content_date-item--style-d {
  border-top: 1px solid rgba(255, 255, 255, 0.55);
}

.card_content_date-item--style-d::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  background: var(--date-accent);
  border-radius: 1px;
  z-index: 1;
}

.card_content_date-item--style-d .card_content_date-num {
  color: rgba(var(--date-accent-rgb), 0.20);
  font-size: 1.5rem;
}

.card_content_date-item--style-d .card_content_date-label {
  color: rgba(80, 60, 100, 0.38);
}

.transcript {
  position: relative;
  width: min(740px, 100%);
  margin: 0 auto;
  padding: 20px 0 70px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.transcript::before,
.transcript::after {
  display: none;
}

.transcript-title {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-bottom: 38px;
  color: rgba(32, 35, 32, 0.68);
}

.transcript-title span {
  font-size: 15px;
  font-weight: 800;
}

.transcript-title small {
  color: rgba(255, 118, 118, 0.45);
  font-size: 10px;
  text-transform: uppercase;
}

.stage-line {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0;
  opacity: 0.78;
}

.stage-chip {
  min-height: 18px;
  padding: 2px 7px;
  border-radius: 999px;
  color: rgba(42, 39, 40, 0.4);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(42, 39, 40, 0.055);
  backdrop-filter: blur(10px);
  font-size: 10px;
  line-height: 1.25;
}

.stage-chip-action {
  color: rgba(255, 118, 118, 0.72);
  background: rgba(255, 118, 118, 0.055);
  border-color: rgba(255, 118, 118, 0.16);
}

.stage-chip-control {
  color: rgba(255, 118, 118, 0.8);
  background: rgba(255, 118, 118, 0.075);
  border-color: rgba(255, 118, 118, 0.18);
}

.stage-chip-raw {
  color: rgba(42, 39, 40, 0.42);
  background: rgba(255, 255, 255, 0.16);
}

.reader-page.hide-stage .stage-line,
.reader-page.hide-stage .dialogue-stage-meta,
.reader-page.hide-stage .narration[data-stage-cues]::before {
  display: none;
}

.narration {
  position: relative;
  max-width: 620px;
  margin: 28px auto;
  color: rgba(43, 39, 40, 0.76);
  font-size: 14px;
  line-height: 1.9;
  text-align: center;
  font-style: normal;
  font-weight: 400;
}

.narration-soft {
  color: rgba(255, 118, 118, 0.42);
}

.dialogue {
  position: relative;
  display: grid;
  align-items: start;
  column-gap: 12px;
  row-gap: 0;
  margin: 16px 0 0;
}

.dialogue-left {
  grid-template-columns: 4rem minmax(0, 29rem);
  justify-content: start;
}

.dialogue-left .avatar {
  grid-column: 1;
}

.dialogue-left .line {
  grid-column: 2;
  width: 100%;
  min-width: 0;
}

.bubble-row {
  display: flex;
  align-items: center;
  gap: 3px;
  max-width: min(100%, 31rem);
}

.dialogue-right .bubble-row {
  width: fit-content;
  justify-content: flex-end;
  margin-left: auto;
}

.dialogue-right .bubble-row .voice-button {
  order: -1;
}

.line strong {
  display: block;
  margin: 0 0 6px;
  color: rgba(32, 35, 32, 0.62);
  font-size: 12px;
  font-weight: 700;
}

.dialogue-left .line strong {
  padding-left: 2px;
  color: rgba(255, 118, 118, 0.72);
}

.dialogue-right .line strong {
  color: rgba(255, 118, 118, 0.72);
  text-align: right;
}

.line p {
  --voice-progress-percent: 0%;
  position: relative;
  box-sizing: border-box;
  display: inline-block;
  width: fit-content;
  max-width: min(100%, 29rem);
  min-height: 2.25rem;
  margin: 0;
  padding: 0.62rem 1rem;
  border-radius: 1.125rem 1.125rem 1.125rem 0;
  color: rgba(32, 35, 32, 0.88);
  background: rgba(255, 255, 255, 0.8);
  border: 0;
  box-shadow:
    0 0.5rem 1rem rgba(32, 35, 32, 0.018),
    0 0.32rem 0.62rem -0.64rem rgba(32, 35, 32, 0.055);
  backdrop-filter: blur(12px) saturate(1.03);
  font-size: 14px;
  line-height: 1.68;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
  word-break: normal;
}

.dialogue-left .line p {
  border-radius: 0 1.125rem 1.125rem 1.125rem;
}
.dialogue.voice-active .line p::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 7px;
  height: 2px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--story-accent), #ffbdbd) 0 0 / var(--voice-progress-percent, 0%) 100% no-repeat,
    rgba(255, 118, 118, 0.14);
  opacity: 0.9;
  pointer-events: none;
}

.dialogue-right.voice-active .line p::after {
  background:
    linear-gradient(90deg, #ffbdbd, var(--story-accent)) 0 0 / var(--voice-progress-percent, 0%) 100% no-repeat,
    rgba(255, 189, 189, 0.18);
}

.dialogue-left .line p::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0;
  width: 10px;
  height: 12px;
  background: inherit;
  clip-path: polygon(100% 0, 0 0, 100% 82%);
}

.dialogue-left.dialogue-continued .line p::before {
  opacity: 0.58;
}

.dialogue-right .line {
  text-align: right;
}

.dialogue-right .line p,
.dialogue-right .dark-line p {
  border-radius: 1.125rem 1.125rem 0 1.125rem;
  color: #ffbdbd;
  background: rgb(49 49 49 / 90%);
  box-shadow:
    0 0.75rem 1.65rem rgba(32, 35, 32, 0.055),
    0 0.5rem 0.9rem -0.78rem rgba(32, 35, 32, 0.14);
}

.dialogue-continued {
  margin-top: 3px;
}

.dialogue-left.dialogue-continued {
  grid-template-columns: 4rem minmax(0, 29rem);
}

.dialogue-left.dialogue-continued .avatar {
  visibility: hidden;
}

.dialogue-continued .line strong,
.dialogue-right.dialogue-continued .line strong {
  display: none;
}

.dialogue-continued .line p {
  margin-top: 0;
  box-shadow: 0 0.16rem 0.38rem rgba(32, 35, 32, 0.01);
}

.dialogue-right.dialogue-continued .line p {
  box-shadow: 0 0.18rem 0.42rem rgba(32, 35, 32, 0.024);
}

.dialogue-stage-meta,
.narration[data-stage-cues]::before {
  position: absolute;
  z-index: 2;
  max-width: min(44vw, 19rem);
  padding: 2px 7px;
  border: 1px solid rgba(255, 118, 118, 0.12);
  border-radius: 999px;
  color: rgba(255, 118, 118, 0.54);
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 18px rgba(255, 118, 118, 0.025);
  backdrop-filter: blur(12px);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: auto;
}

.dialogue-stage-meta {
  top: -4px;
  transform: translateY(-100%);
}

.dialogue-stage-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dialogue-left .dialogue-stage-meta {
  left: calc(4rem + 12px);
}

.dialogue-right .dialogue-stage-meta {
  right: 0;
}

.narration[data-stage-cues]::before {
  content: attr(data-stage-cues);
  left: 50%;
  top: -6px;
  transform: translate(-50%, -100%);
}

.transcript-motion-ready .dialogue,
.transcript-motion-ready .narration,
.transcript-motion-ready .stage-line,
.transcript-motion-ready .choice-group,
.transcript-motion-ready .chapter-end {
  opacity: 0;
  transform: translateY(18px) scale(0.992);
  filter: blur(2px);
  transition:
    opacity 520ms ease,
    transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 520ms ease;
  transition-delay: var(--motion-delay, 0ms);
  will-change: opacity, transform, filter;
}

.transcript-motion-ready .dialogue.is-visible,
.transcript-motion-ready .narration.is-visible,
.transcript-motion-ready .stage-line.is-visible,
.transcript-motion-ready .choice-group.is-visible,
.transcript-motion-ready .chapter-end.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .transcript-motion-ready .dialogue,
  .transcript-motion-ready .narration,
  .transcript-motion-ready .stage-line,
  .transcript-motion-ready .choice-group,
  .transcript-motion-ready .chapter-end {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

.voice-button {
  position: relative;
  flex: 0 0 22px;
  align-self: center;
  width: 22px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(255, 118, 118, 0.76);
  background: transparent;
  box-shadow: none;
  opacity: 0.78;
  transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.voice-button:hover,
.voice-button:focus-visible,
.voice-button.is-playing,
.voice-button.is-loading {
  color: var(--story-accent);
  opacity: 1;
  outline: none;
}

.dialogue-right .voice-button {
  transform: rotate(180deg);
}

.dialogue-right .voice-button:hover,
.dialogue-right .voice-button:focus-visible,
.dialogue-right .voice-button.is-playing,
.dialogue-right .voice-button.is-loading {
  transform: rotate(180deg) scale(1.04);
}

.voice-button.is-loading .voice-wave-1 {
  animation: voiceLoading 900ms ease-in-out infinite;
}

.voice-button.is-loading .voice-wave-2 {
  animation: voiceLoading 900ms 110ms ease-in-out infinite;
}

.voice-button.is-loading .voice-wave-3 {
  animation: voiceLoading 900ms 220ms ease-in-out infinite;
}

.voice-button:disabled,
.voice-button.is-unavailable {
  opacity: 0.34;
  cursor: default;
}

.voice-button.voice-missing {
  display: grid;
  place-items: center;
  color: rgba(255, 118, 118, 0.74);
  opacity: 0.88;
}

.voice-button.voice-missing:hover,
.voice-button.voice-missing:focus-visible {
  color: var(--story-accent);
  opacity: 1;
  transform: scale(1.04);
}

.dialogue-right .voice-button.voice-missing,
.dialogue-right .voice-button.voice-missing:hover,
.dialogue-right .voice-button.voice-missing:focus-visible {
  transform: none;
}

.voice-missing-mark {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 8px 18px rgba(255, 118, 118, 0.035);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.voice-button.is-unavailable:hover,
.voice-button.is-unavailable:focus-visible {
  color: rgba(255, 118, 118, 0.76);
  opacity: 0.34;
}

.voice-wave {
  position: absolute;
  top: 50%;
  left: 3px;
  border: 1.5px solid currentColor;
  border-left: 0;
  border-top-color: transparent;
  border-bottom-color: transparent;
  transform: translateY(-50%);
}

.voice-wave-1 {
  width: 5px;
  height: 8px;
  border-radius: 0 8px 8px 0;
  opacity: 0.95;
}

.voice-wave-2 {
  width: 10px;
  height: 14px;
  border-radius: 0 14px 14px 0;
  opacity: 0.62;
}

.voice-wave-3 {
  width: 15px;
  height: 20px;
  border-radius: 0 20px 20px 0;
  opacity: 0.36;
}

@keyframes voiceLoading {
  0%, 100% {
    opacity: 0.28;
  }
  50% {
    opacity: 1;
  }
}

.choice-group {
  display: grid;
  justify-content: end;
  gap: 10px;
  margin: 34px 0;
}

.choice-group button {
  min-width: 260px;
  max-width: 380px;
  min-height: 38px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  color: rgba(255, 245, 247, 0.92);
  background: rgba(32, 35, 32, 0.9);
  box-shadow: 0 12px 26px rgba(61, 57, 58, 0.11);
  text-align: left;
}

.choice-group button:hover {
  border-color: rgba(255, 118, 118, 0.48);
}

.audio-dock {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 18;
  display: grid;
  grid-template-columns: 36px 92px auto auto;
  gap: 12px;
  align-items: center;
  max-width: calc(100vw - 88px);
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(251, 252, 250, 0.78);
  border: 1px solid rgba(217, 222, 216, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.audio-main {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--dark);
}

.audio-text {
  display: grid;
  gap: 2px;
}

.audio-text span,
.volume-control span,
.mini-toggle span {
  color: rgba(42, 39, 40, 0.55);
  font-size: 11px;
}

.audio-text strong {
  color: rgba(42, 39, 40, 0.78);
  font-size: 12px;
}

.mini-toggle,
.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-toggle input {
  accent-color: var(--story-accent);
}

.volume-control input {
  width: 92px;
  accent-color: var(--story-accent);
}


.reader-settings {
  position: fixed;
  left: 60px;
  top: 60px;
  z-index: 19;
  width: min(336px, calc(100vw - 84px));
  padding: 14px;
  border: 1px solid rgba(217, 222, 216, 0.86);
  border-radius: 8px;
  background: rgba(251, 252, 250, 0.94);
  box-shadow: 0 18px 44px rgba(32, 35, 32, 0.14);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.reader-page.settings-open .reader-settings {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.settings-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.settings-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: 0;
}

.settings-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 20px;
  line-height: 1;
}

.settings-close:hover,
.settings-close:focus-visible {
  color: var(--red-strong);
  border-color: rgba(255, 118, 118, 0.42);
  outline: none;
}

.settings-grid {
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.switch-row-strong {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  font-weight: 700;
}

.range-row {
  display: grid;
  gap: 7px;
  color: rgba(32, 35, 32, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.range-row span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.range-row strong {
  color: var(--story-accent);
  font-variant-numeric: tabular-nums;
}

.range-row input {
  width: 100%;
  accent-color: var(--story-accent);
}

.settings-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 1040px) {
  .reader-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .story-nav {
    position: static;
    min-height: 0;
  }

  .story-nav.is-fixed .nav-card {
    position: static;
    width: auto;
  }

  .nav-card {
    min-height: 0;
  }

  .story-heading {
    margin-top: 40px;
  }

  .card_content_date-list {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .card_content_date-item {
    width: calc(50% - 6px);
    max-width: none;
    margin-top: 0 !important;
  }
}

@media (max-width: 720px) {
  .reader-page {
    padding-left: 0;
  }

  .icon-rail {
    display: none;
  }

  .topbar {
    grid-template-columns: 1fr;
    height: auto;
    gap: 6px;
    padding: 10px 14px;
  }

  .topbar-title {
    text-align: left;
  }

  .topbar-actions {
    display: flex;
  }

  .topbar-actions button:not([data-action-settings]) {
    display: none;
  }

  .reader-layout {
    width: 100%;
    padding: 24px 14px 132px;
  }

  .reader-settings {
    left: 12px;
    right: 12px;
    top: 72px;
    width: auto;
  }

  .story-heading {
    display: grid;
    margin: 28px 0;
  }

  .heading-copy {
    width: auto;
  }

  .card_content_date-list {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .card_content_date-item {
    width: 100%;
    max-width: none;
    margin-top: 0 !important;
  }

  .transcript {
    padding: 18px 0 48px;
  }

  .dialogue {
    gap: 10px;
  }

  .dialogue-left {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .dialogue-right,
  .dialogue-right.dialogue-has-voice {
    grid-template-columns: minmax(0, 1fr);
  }

  .dialogue-left.dialogue-continued {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .bubble-row {
    max-width: 100%;
  }

  .avatar {
    width: 3rem;
    height: 3rem;
  }

  .voice-button {
    flex-basis: 20px;
    width: 20px;
    height: 26px;
  }

  .line p {
    max-width: 100%;
  }

  .audio-dock {
    left: 12px;
    right: 12px;
    grid-template-columns: 34px 1fr auto;
  }

  .volume-control {
    display: none;
  }
}
/* story-reader-codex-overrides */
html {
  scroll-behavior: smooth;
}

.story-nav.is-fixed {
  min-height: var(--story-nav-height, 430px);
}

.story-nav.is-fixed .nav-card {
  position: fixed;
  top: 62px;
  width: var(--story-nav-width, 230px);
  z-index: 12;
}

.nav-link {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.nav-action {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 118, 118, 0.18);
  border-radius: 6px;
  color: rgba(42, 39, 40, 0.78);
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 8px 18px rgba(255, 118, 118, 0.035);
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.nav-action:hover,
.nav-action:focus-visible {
  border-color: rgba(255, 118, 118, 0.34);
  background: rgba(255, 118, 118, 0.07);
  outline: none;
  transform: translateY(-1px);
}

.transcript-chapter {
  scroll-margin-top: 88px;
}

.transcript-chapter + .transcript-chapter {
  margin-top: 66px;
}

.chapter-end {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 74px auto 34px;
  padding: 28px 0 22px;
  color: rgba(255, 118, 118, 0.68);
  text-align: center;
}

.chapter-end-line {
  width: min(58%, 360px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 118, 118, 0.2), rgba(32, 35, 32, 0.08), rgba(255, 118, 118, 0.2), transparent);
}

.chapter-end strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 14px;
  border: 1px solid rgba(255, 118, 118, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 12px 26px rgba(255, 118, 118, 0.035);
  backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 800;
}

.chapter-end small {
  color: rgba(43, 39, 40, 0.42);
  font-size: 11px;
  font-weight: 700;
}

.chapter-end[data-next-chapter] {
  min-height: 132px;
  margin-bottom: 110px;
}

.chapter-end[data-next-chapter] small::after {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  margin: 7px auto 0;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.72;
}

.avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.82), rgba(255, 118, 118, 0.14) 46%, rgba(32, 35, 32, 0.08));
  background-position: center;
  background-size: cover;
  box-shadow:
    0 10px 24px rgba(32, 35, 32, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

.avatar-has-image {
  background-color: rgba(255, 255, 255, 0.42);
}

.bubble-row {
  min-width: 0;
}

.line p {
  display: inline-block;
  flex: 0 1 auto;
  width: auto;
  max-width: min(100%, 29rem);
  min-width: 0;
  text-align: left;
  text-indent: 0;
  white-space: pre-wrap;
}

.line p.bubble-wrapped {
  width: fit-content;
  max-width: min(100%, 28rem);
}

.dialogue-left .line p.bubble-wrapped {
  padding-right: calc(1rem - 2px);
}

.dialogue-right .line p,
.dialogue-right .dark-line p {
  flex: 0 1 auto;
  margin-left: auto;
  text-align: left;
  box-shadow:
    0 0.62rem 1.3rem rgba(32, 35, 32, 0.048),
    0 0.42rem 0.75rem -0.72rem rgba(32, 35, 32, 0.12);
}

.dialogue-right .line p.bubble-wrapped,
.dialogue-right .dark-line p.bubble-wrapped {
  width: fit-content;
  max-width: min(100%, 28rem);
  margin-left: auto;
  padding-left: calc(1rem - 2px);
}

.dialogue-continued {
  margin-top: 3px;
}

.dialogue-continued .line p {
  box-shadow: 0 0.16rem 0.38rem rgba(32, 35, 32, 0.01);
}

.dialogue-right.dialogue-continued .line p {
  box-shadow: 0 0.18rem 0.42rem rgba(32, 35, 32, 0.024);
}

.transcript-motion-ready .choice-end {
  opacity: 0;
  transform: translateY(18px) scale(0.992);
  filter: blur(2px);
  transition:
    opacity 520ms ease,
    transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 520ms ease;
  transition-delay: var(--motion-delay, 0ms);
  will-change: opacity, transform, filter;
}

.transcript-motion-ready .choice-end.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.choice-branch-label {
  margin: 34px 0 18px;
}

.choice-branch-card {
  display: grid;
  gap: 4px;
  min-width: 260px;
  max-width: 420px;
  padding: 10px 14px 11px;
  border: 1px solid rgba(255, 118, 118, 0.2);
  border-radius: 4px;
  color: #ffbdbd;
  background: rgb(49 49 49 / 90%);
  box-shadow: 0 10px 22px rgba(61, 57, 58, 0.08);
}

.choice-branch-index {
  color: rgba(255, 189, 189, 0.62);
  font-size: 11px;
  font-weight: 700;
}

.choice-branch-card strong {
  color: #ffbdbd;
  font-size: 13px;
  font-weight: 700;
}

.choice-end {
  width: fit-content;
  margin: 30px auto 34px;
  padding: 5px 14px;
  border: 1px solid rgba(255, 118, 118, 0.15);
  border-radius: 999px;
  color: rgba(255, 118, 118, 0.7);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .transcript-motion-ready .choice-end {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

@media (max-width: 1040px) {
  .story-nav.is-fixed {
    min-height: 0;
  }

  .story-nav.is-fixed .nav-card {
    position: static;
    width: auto;
  }
}

@media (max-width: 720px) {
  .line p {
    max-width: 100%;
  }

  .line p.bubble-wrapped {
    width: fit-content;
    max-width: 100%;
  }
}
/* story-reader-codex-feedback-20260708 */
.narration {
  font-weight: 400;
}

.dialogue-stage-meta,
.narration[data-stage-cues]::before {
  content: none !important;
  display: none !important;
}

.dialogue-left .line p::before {
  display: none;
}

.dialogue-left.dialogue-no-avatar,
.dialogue-left.dialogue-no-avatar.dialogue-continued {
  grid-template-columns: minmax(0, 29rem);
}

.dialogue-left.dialogue-no-avatar .line {
  grid-column: 1;
}

.dialogue-left.dialogue-no-avatar .bubble-row {
  max-width: min(100%, 29rem);
}

.chapter-end[data-next-chapter] {
  --gate-progress: 0;
  --gate-pull: 0px;
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity;
}

.chapter-end[data-next-chapter]::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 128px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 118, 118, 0.42), transparent);
  opacity: 0;
  transform: translateX(-50%) scaleX(var(--gate-progress));
  transform-origin: center;
  transition: opacity 180ms ease, transform 220ms ease;
}

.chapter-end[data-next-chapter].is-resisting {
  opacity: calc(1 - (var(--gate-progress) * 0.12));
  transform: translateY(calc(var(--gate-pull) * -1)) scale(calc(1 - (var(--gate-progress) * 0.012)));
}

.chapter-end[data-next-chapter].is-resisting::before {
  opacity: 0.42;
}

.chapter-end[data-next-chapter].is-resisting small::after {
  opacity: 1;
  transform: rotate(45deg) translate(calc(var(--gate-progress) * 4px), calc(var(--gate-progress) * 4px));
}

.chapter-end[data-next-chapter].is-unlocking {
  opacity: 0.72;
  transform: translateY(-16px) scale(0.986);
}

@media (max-width: 720px) {
  .dialogue-left.dialogue-no-avatar,
  .dialogue-left.dialogue-no-avatar.dialogue-continued {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* story-reader-choice-brace-style-20260708 */
.choice-group {
  justify-content: center;
  justify-items: center;
  gap: 8px;
  margin: 34px auto;
  text-align: center;
}

.choice-group button,
.choice-branch-card {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 0;
  max-width: min(88vw, 560px);
  min-height: 0;
  padding: 2px 6px;
  border: 0;
  border-radius: 0;
  color: var(--story-accent, #ff7676);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
  white-space: normal;
  text-wrap: pretty;
  cursor: default;
}

.choice-group button::before,
.choice-branch-card::before {
  content: "{";
  margin-right: 0.28em;
  color: currentColor;
}

.choice-group button::after,
.choice-branch-card::after {
  content: "}";
  margin-left: 0.28em;
  color: currentColor;
}

.choice-group button:hover,
.choice-group button:focus-visible,
.choice-branch-card:hover,
.choice-branch-card:focus-visible {
  color: var(--story-accent, #ff7676);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  outline: none;
}

.choice-branch-label {
  display: flex;
  justify-content: center;
  margin: 30px auto 18px;
  text-align: center;
}

.choice-branch-index {
  display: none;
}

.choice-branch-card strong {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}
/* story-reader-divider-label-style-20260708 */
.choice-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(74%, 460px);
  margin: 32px auto 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(255, 118, 118, 0.72);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.6;
  white-space: nowrap;
}

.choice-end::before,
.choice-end::after,
.chapter-end strong::before,
.chapter-end strong::after {
  content: "";
  flex: 1 1 0;
  min-width: 34px;
  height: 1px;
  opacity: 0.76;
}

.choice-end::before,
.chapter-end strong::before {
  background: linear-gradient(90deg, transparent, rgba(255, 118, 118, 0.28));
}

.choice-end::after,
.chapter-end strong::after {
  background: linear-gradient(90deg, rgba(255, 118, 118, 0.28), transparent);
}

.chapter-end {
  gap: 8px;
}

.chapter-end-line {
  display: none;
}

.chapter-end strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(78%, 520px);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(255, 118, 118, 0.74);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.7;
  white-space: nowrap;
}

/* story-reader-divider-text-dash-style-20260708 */
.choice-end,
.chapter-end strong {
  gap: 0.72em;
  width: fit-content;
  max-width: calc(100% - 32px);
}

.choice-end::before,
.choice-end::after,
.chapter-end strong::before,
.chapter-end strong::after {
  content: "--------";
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  height: auto;
  color: rgba(255, 118, 118, 0.46);
  background: none;
  font: inherit;
  letter-spacing: 0.03em;
  opacity: 1;
}

/* story-reader-player-name-token-20260708 */
.player-name-token {
  color: var(--story-accent, #ff7676);
  font-weight: 600;
}
/* story-reader-audio-player-floating-refine-20260708 */
button,
input,
select {
  font: inherit;
}

.audio-dock.voice-player {
  right: 24px;
  bottom: 22px;
  width: min(452px, calc(100vw - 88px));
  max-width: calc(100vw - 88px);
  display: grid;
  grid-template-columns: none;
  align-items: stretch;
  gap: 7px;
  padding: 0;
  pointer-events: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.voice-player-now {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: end;
  min-width: 0;
  margin: 0 8px;
  pointer-events: none;
}

.voice-player-now.has-avatar-image {
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  margin: 0 8px 0 1px;
}

.voice-player-avatar {
  width: 62px;
  height: 66px;
  display: grid;
  place-items: end center;
  overflow: visible;
  border-radius: 0;
  color: rgba(255, 118, 118, 0.52);
  background-color: transparent;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.6);
  transition: transform 180ms ease, opacity 180ms ease;
}

.voice-player-avatar.has-image {
  color: transparent;
  background-color: transparent;
}

.voice-player-avatar.has-no-image {
  display: none;
}

.audio-dock.voice-player[data-state="playing"] .voice-player-avatar {
  transform: translateY(-1px) scale(1.025);
  box-shadow: none;
}

.voice-player-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 0 0 4px;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.72);
}

.voice-player-copy span {
  color: rgba(255, 118, 118, 0.88);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.voice-player-copy strong {
  display: none;
}

.voice-player-copy p {
  display: -webkit-box;
  min-width: 0;
  min-height: 0;
  max-height: 44px;
  margin: 0;
  overflow: hidden;
  color: rgba(32, 35, 32, 0.76);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.voice-player-controls {
  display: grid;
  grid-template-columns: 28px auto 56px auto minmax(70px, 86px);
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 8px 9px;
  pointer-events: auto;
  background: rgba(251, 252, 250, 0.82);
  border: 1px solid rgba(217, 222, 216, 0.66);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(32, 35, 32, 0.1), 0 8px 20px rgba(255, 118, 118, 0.026), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(22px) saturate(1.08);
}

.audio-dock.voice-player .audio-main {
  position: relative;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: rgba(49, 49, 49, 0.82);
  background: transparent;
  box-shadow: none;
  font-size: 0;
  transition: transform 160ms ease, color 160ms ease, opacity 160ms ease;
}

.audio-dock.voice-player .audio-main [data-audio-play-icon] {
  position: relative;
  width: 15px;
  height: 15px;
  display: block;
}

.audio-dock.voice-player .audio-main [data-audio-play-icon]::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 0;
  height: 0;
  border-top: 5.5px solid transparent;
  border-bottom: 5.5px solid transparent;
  border-left: 8px solid currentColor;
}

.audio-dock.voice-player .audio-main[data-state="playing"] [data-audio-play-icon]::before {
  left: 3px;
  top: 2px;
  width: 4px;
  height: 11px;
  border: 0;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 7px 0 0 currentColor;
}

.audio-dock.voice-player .audio-main:hover,
.audio-dock.voice-player .audio-main:focus-visible {
  color: var(--story-accent);
  outline: none;
  transform: translateY(-1px);
}

.audio-dock.voice-player .audio-main:active {
  transform: translateY(0) scale(0.98);
}

.audio-dock.voice-player[data-state=loading] .audio-main {
  color: rgba(255, 118, 118, 0.58);
}

.audio-dock.voice-player[data-state=missing] .audio-main,
.audio-dock.voice-player[data-state=error] .audio-main {
  color: var(--story-accent);
  background: transparent;
}

.audio-dock.voice-player .mini-toggle,
.audio-dock.voice-player .volume-control,
.audio-dock.voice-player .rate-control {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.audio-dock.voice-player .mini-toggle span,
.audio-dock.voice-player .volume-control span,
.audio-dock.voice-player .rate-control span {
  color: rgba(42, 39, 40, 0.56);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.audio-dock.voice-player .mini-toggle input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--story-accent);
}

.audio-dock.voice-player .volume-control input {
  --voice-volume-percent: 70%;
  width: 100%;
  min-width: 64px;
  height: 16px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  outline: none;
}

.audio-dock.voice-player .volume-control input::-webkit-slider-runnable-track {
  height: 1.5px;
  border-radius: 1px 0 0 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 198, 198, 0.74) 55%, rgba(255, 124, 124, 0.68) 100%) 0 50% / var(--voice-volume-percent) 100% no-repeat, rgba(0, 0, 0, 0.16);
}

.audio-dock.voice-player .volume-control input::-webkit-slider-thumb {
  width: 9px;
  height: 9px;
  margin-top: -3.75px;
  appearance: none;
  border: 0;
  border-radius: 0;
  background: rgba(255, 132, 132, 0.76);
  box-shadow: 0 2px 4px rgba(72, 28, 34, 0.14);
  transition: background-color 160ms ease, transform 160ms ease;
}

.audio-dock.voice-player .volume-control input:hover::-webkit-slider-thumb,
.audio-dock.voice-player .volume-control input:focus-visible::-webkit-slider-thumb {
  background: rgba(255, 118, 118, 0.86);
  transform: scale(1.06);
}

.audio-dock.voice-player .volume-control input::-moz-range-track {
  height: 1.5px;
  border-radius: 1px 0 0 1px;
  background: rgba(0, 0, 0, 0.16);
}

.audio-dock.voice-player .volume-control input::-moz-range-progress {
  height: 1.5px;
  border-radius: 1px 0 0 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 198, 198, 0.74) 55%, rgba(255, 124, 124, 0.68) 100%);
}

.audio-dock.voice-player .volume-control input::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 132, 132, 0.76);
  box-shadow: 0 2px 4px rgba(72, 28, 34, 0.14);
}

.audio-dock.voice-player .rate-control select {
  width: 47px;
  height: 21px;
  padding: 0 3px;
  border: 1px solid rgba(255, 118, 118, 0.14);
  border-radius: 5px;
  color: rgba(42, 39, 40, 0.76);
  background: rgba(255, 255, 255, 0.34);
  font-size: 10px;
  font-weight: 800;
}

.audio-dock.voice-player .rate-control select:focus-visible {
  border-color: rgba(255, 118, 118, 0.36);
  outline: none;
}

.audio-dock.voice-player .voice-language-control-compact {
  min-width: 54px;
  padding: 2px;
  gap: 2px;
  background: rgba(255, 255, 255, 0.26);
}

.audio-dock.voice-player .voice-language-control-compact span {
  min-height: 20px;
  padding: 0 4px;
  font-size: 10px;
  border-radius: 4px;
}

@media (max-width: 720px) {
  .audio-dock.voice-player {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
  }

  .voice-player-now {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-right: 6px;
  }

  .voice-player-now.has-avatar-image {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 8px;
  }

  .voice-player-avatar {
    width: 50px;
    height: 56px;
  }

  .voice-player-controls {
    grid-template-columns: 28px auto 54px auto;
    padding: 8px;
  }

  .audio-dock.voice-player .volume-control {
    display: none;
  }

  .audio-dock.voice-player .rate-control select {
    width: 46px;
  }
}

/* Story player mode */
.story-player[hidden] {
  display: none !important;
}


.player-dialogue[hidden],
.player-choice-panel[hidden],
.player-end-panel[hidden],
.player-screen-text[hidden],
.player-end-panel button[hidden] {
  display: none !important;
}
.reader-page[data-mode="play"] {
  min-height: 100dvh;
}

.reader-page[data-mode="play"] .reader-layout {
  display: none;
}

.reader-page[data-mode="play"] .story-player {
  display: block;
}

.story-player {
  position: relative;
  min-height: calc(100dvh - 48px);
  padding: 54px 28px 112px;
}

.player-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(196px, 236px);
  gap: 22px;
  align-items: start;
}

.player-stage {
  --player-stage-radius: 8px;
  --player-stage-dark: rgba(18, 18, 18, 0.82);
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 520px;
  max-height: calc(100dvh - 138px);
  overflow: hidden;
  border-radius: var(--player-stage-radius);
  background: linear-gradient(135deg, rgba(34, 34, 34, 0.96), rgba(10, 10, 11, 0.94));
  box-shadow:
    0 24px 72px rgba(22, 24, 24, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  isolation: isolate;
  outline: none;
}

.player-stage:focus-visible {
  box-shadow:
    0 24px 72px rgba(32, 35, 32, 0.18),
    0 18px 52px rgba(255, 118, 118, 0.08),
    inset 0 0 0 2px rgba(255, 118, 118, 0.56);
}

.player-stage::before,
.player-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.player-stage::before {
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), transparent 32%, rgba(0, 0, 0, 0.24));
}

.player-stage::after {
  z-index: 8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.player-bg {
  position: absolute;
  inset: -4%;
  z-index: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(0.94) contrast(0.96);
  will-change: transform, opacity;
  transition-property: transform, opacity;
  transition-duration: 420ms;
  transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.player-bg:empty {
  background-image: linear-gradient(145deg, #242424, #101011 66%);
}

.player-bg-id {
  position: absolute;
  z-index: 6;
  top: 14px;
  right: 14px;
  max-width: min(50%, 360px);
  padding: 4px 8px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(12, 12, 12, 0.34);
  backdrop-filter: blur(12px);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-live2d-layer {
  --player-live2d-x: 0px;
  --player-live2d-y: 0px;
  --player-live2d-scale: 1;
  --player-live2d-duration: 260ms;
  --player-live2d-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --player-live2d-origin: center bottom;
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(var(--player-live2d-x), var(--player-live2d-y), 0) scale(var(--player-live2d-scale));
  transform-origin: var(--player-live2d-origin);
  will-change: opacity, transform;
  transition: opacity 240ms ease, transform var(--player-live2d-duration) var(--player-live2d-ease);
}

.player-live2d-layer.is-ready {
  opacity: 1;
}

.player-live2d-layer.is-error {
  opacity: 0;
}

.player-live2d-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.player-stage.has-live2d-loading .player-portrait-stage-model {
  opacity: 0;
}

.player-stage.has-live2d-ready .player-portrait-stage-model {
  opacity: 0;
}

.player-portrait-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.player-portrait {
  position: absolute;
  bottom: 86px;
  width: 30%;
  height: 62%;
  min-width: 190px;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  opacity: 0.72;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.32));
  transform-origin: center bottom;
  transition: opacity 220ms ease, transform 260ms ease, filter 220ms ease;
}

.player-portrait.is-active {
  opacity: 0.98;
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.36));
}

.player-portrait-left {
  left: 6%;
}

.player-portrait-right {
  right: 6%;
}

.player-portrait-center {
  left: 50%;
  translate: -50% 0;
}

.player-portrait-stage-model {
  left: 50%;
  bottom: 78px;
  width: min(82%, 900px);
  height: min(74%, 620px);
  min-width: 0;
  background-position: center bottom;
  background-size: contain;
  opacity: 0.92;
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.26));
  transform: translate3d(calc(-50% + var(--stage-model-x, 0px)), var(--stage-model-y, 0px), 0) scale(var(--stage-model-scale, 1));
  transform-origin: center bottom;
}

.player-portrait-stage-model.player-portrait-left,
.player-portrait-stage-model.player-portrait-right,
.player-portrait-stage-model.player-portrait-center {
  left: 50%;
  right: auto;
  translate: 0 0;
}

.player-portrait-stage-model.is-active {
  opacity: 0.98;
  filter: drop-shadow(0 28px 38px rgba(0, 0, 0, 0.3));
}

.player-screen-text {
  position: absolute;
  z-index: 7;
  top: 50%;
  left: 50%;
  width: min(68%, 560px);
  transform: translate(-50%, -50%);
  padding: 22px 28px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(20, 20, 20, 0.48);
  border-left: 3px solid rgba(255, 118, 118, 0.78);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

.player-cue-strip {
  position: absolute;
  z-index: 7;
  left: 14px;
  top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: min(54%, 520px);
  pointer-events: none;
}

.player-cue-strip span {
  max-width: 180px;
  padding: 3px 7px;
  border-radius: 4px;
  color: rgba(255, 214, 214, 0.78);
  background: rgba(10, 10, 10, 0.32);
  border: 1px solid rgba(255, 118, 118, 0.16);
  backdrop-filter: blur(10px);
  font-size: 10px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-click-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: default;
}

.player-dialogue {
  --voice-progress-percent: 0%;
  position: absolute;
  z-index: 9;
  left: 36px;
  right: 36px;
  bottom: 28px;
  min-height: 132px;
  padding: 18px 22px 20px;
  color: rgba(247, 247, 247, 0.92);
  background: rgba(28, 28, 28, 0.76);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 2px solid rgba(255, 118, 118, 0.76);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.24),
    0 12px 36px rgba(255, 118, 118, 0.04);
  backdrop-filter: blur(18px) saturate(1.06);
}

.player-dialogue.is-player {
  border-left-color: rgba(255, 189, 189, 0.82);
  background: rgba(49, 49, 49, 0.82);
}

.player-dialogue.is-narration {
  border-left-color: rgba(255, 255, 255, 0.36);
}

.player-dialogue:not(.has-speaker):not(.has-voice) .player-dialogue-head {
  display: none;
}

.player-dialogue:not(.has-speaker).has-voice .player-dialogue-head {
  justify-content: flex-end;
  margin-bottom: 6px;
}

.player-dialogue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.player-dialogue-head strong {
  color: var(--story-accent);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.player-dialogue.is-player .player-dialogue-head strong {
  color: #ffbdbd;
}

.player-dialogue [data-player-text] {
  --voice-progress-percent: 0%;
  position: relative;
  margin: 0;
  max-width: 62em;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 1.45vw, 19px);
  font-weight: 500;
  line-height: 1.88;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.player-dialogue.voice-active [data-player-text]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--story-accent), #ffbdbd) 0 0 / var(--voice-progress-percent, 0%) 100% no-repeat,
    rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.player-voice-button.voice-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  color: rgba(255, 189, 189, 0.9);
  background: transparent;
  border-color: rgba(255, 189, 189, 0.2);
  box-shadow: none;
}

.player-voice-button.voice-button:hover,
.player-voice-button.voice-button:focus-visible,
.player-voice-button.voice-button.is-playing,
.player-voice-button.voice-button.is-loading {
  color: #fff;
  background: rgba(255, 118, 118, 0.16);
  border-color: rgba(255, 189, 189, 0.36);
}

.player-choice-panel {
  position: absolute;
  z-index: 10;
  inset: auto 8% 178px;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.player-choice-button {
  min-width: min(420px, 72vw);
  padding: 5px 14px;
  border: 0;
  color: var(--story-accent);
  background: transparent;
  font-size: clamp(16px, 1.35vw, 19px);
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
  transition: transform 160ms ease, color 160ms ease, opacity 160ms ease;
}

.player-choice-button::before {
  content: "{";
  margin-right: 0.35em;
  color: rgba(255, 189, 189, 0.82);
}

.player-choice-button::after {
  content: "}";
  margin-left: 0.35em;
  color: rgba(255, 189, 189, 0.82);
}

.player-choice-button:hover,
.player-choice-button:focus-visible {
  color: #ffbdbd;
  outline: none;
  transform: translateY(-1px);
}

.player-choice-button:active {
  transform: translateY(0) scale(0.99);
}

.player-end-panel {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 44px;
  width: min(520px, calc(100% - 72px));
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 20px 20px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(22, 22, 22, 0.62);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.22);
  text-align: center;
}

.player-end-panel.is-loading button {
  display: none !important;
}

.player-end-panel strong {
  color: var(--story-accent);
  font-size: 17px;
  font-weight: 800;
}

.player-end-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.player-end-panel button {
  margin-top: 2px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 118, 118, 0.28);
  border-radius: 4px;
  color: #ffbdbd;
  background: rgba(49, 49, 49, 0.72);
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.player-end-panel button:hover,
.player-end-panel button:focus-visible {
  color: #fff;
  border-color: rgba(255, 118, 118, 0.46);
  outline: none;
  transform: translateY(-1px);
}

.player-fade {
  position: absolute;
  inset: 0;
  z-index: 11;
  background: #0a0a0a;
  opacity: 0;
  pointer-events: none;
}

.player-fade.is-active {
  animation: playerFadePulse calc(var(--player-fade-in, 220ms) + var(--player-fade-out, 320ms)) ease both;
}

.player-stage.is-shaking {
  animation: playerShake var(--player-shake-duration, 420ms) linear both;
}

.player-toolbar {
  position: sticky;
  top: 70px;
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(251, 252, 250, 0.62);
  box-shadow:
    0 18px 44px rgba(32, 35, 32, 0.1),
    0 12px 34px rgba(255, 118, 118, 0.035);
  backdrop-filter: blur(22px) saturate(1.05);
  color: rgba(32, 35, 32, 0.82);
}

.player-toolbar-kicker {
  margin: 0 0 4px;
  color: rgba(255, 118, 118, 0.62);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.player-toolbar h2 {
  margin: 0;
  color: rgba(32, 35, 32, 0.88);
  font-size: 18px;
  line-height: 1.35;
}

.player-select-row {
  display: grid;
  gap: 6px;
  color: rgba(32, 35, 32, 0.58);
  font-size: 11px;
  font-weight: 800;
}

.player-select-row select {
  width: 100%;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(255, 118, 118, 0.18);
  border-radius: 5px;
  color: rgba(32, 35, 32, 0.78);
  background: rgba(255, 255, 255, 0.46);
  font-weight: 700;
}

.player-select-row select:focus-visible {
  border-color: rgba(255, 118, 118, 0.5);
  outline: none;
}

.player-toolbar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.player-toolbar-actions button {
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  color: rgba(32, 35, 32, 0.76);
  background: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.player-toolbar-actions button:hover,
.player-toolbar-actions button:focus-visible {
  color: var(--story-accent);
  background: rgba(255, 118, 118, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.player-toolbar-actions button:active {
  transform: translateY(0) scale(0.98);
}

.player-toolbar-actions [data-action-mode] {
  grid-column: 1 / -1;
}

.player-logic-note {
  margin: 0;
  color: rgba(32, 35, 32, 0.48);
  font-size: 11px;
  line-height: 1.6;
}

@keyframes playerFadePulse {
  0% { opacity: 0; }
  44% { opacity: 0.74; }
  100% { opacity: 0; }
}

@keyframes playerShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  14% { transform: translate3d(-7px, 3px, 0); }
  28% { transform: translate3d(6px, -3px, 0); }
  42% { transform: translate3d(-4px, -2px, 0); }
  56% { transform: translate3d(5px, 2px, 0); }
  70% { transform: translate3d(-3px, 1px, 0); }
  84% { transform: translate3d(2px, -1px, 0); }
}

@media (max-width: 1040px) {
  .story-player {
    padding: 36px 18px 124px;
  }

  .player-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .player-stage {
    min-height: auto;
    max-height: none;
  }

  .player-toolbar {
    position: relative;
    top: auto;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
    align-items: end;
  }

  .player-toolbar-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .player-toolbar-actions [data-action-mode] {
    grid-column: auto;
  }

  .player-logic-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .reader-page[data-mode="play"] {
    padding-left: 0;
  }

  .story-player {
    padding: 22px 12px 132px;
  }

  .player-stage {
    aspect-ratio: 9 / 14;
    border-radius: 7px;
  }

  .player-bg {
    inset: -2%;
  }

  .player-bg-id,
  .player-cue-strip {
    max-width: calc(100% - 24px);
  }

  .player-portrait {
    bottom: 154px;
    width: 46%;
    min-width: 132px;
    height: 46%;
  }

  .player-portrait-left {
    left: 2%;
  }

  .player-portrait-right {
    right: 2%;
  }

  .player-dialogue {
    left: 12px;
    right: 12px;
    bottom: 14px;
    min-height: 146px;
    padding: 15px 16px 18px;
  }

  .player-dialogue [data-player-text] {
    font-size: 15px;
    line-height: 1.76;
  }

  .player-choice-panel {
    inset: auto 12px 174px;
  }

  .player-choice-button {
    min-width: 0;
    width: 100%;
  }

  .player-end-panel {
    bottom: 24px;
    width: calc(100% - 24px);
  }

  .player-toolbar {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .player-toolbar-actions {
    grid-template-columns: 1fr 1fr;
  }

  .player-toolbar-actions [data-action-mode] {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-bg,
  .player-live2d-layer,
  .player-portrait,
  .player-toolbar-actions button,
  .player-choice-button,
  .player-end-panel button {
    transition-duration: 0.01ms;
  }

  .player-fade.is-active,
  .player-stage.is-shaking {
    animation: none;
  }
}

/* story-reader-read-scale-20260708 */
.reader-page[data-mode="read"] .transcript {
  width: min(880px, 100%);
  padding-bottom: 88px;
}

.reader-page[data-mode="read"] .narration {
  max-width: 775px;
  font-size: 17.5px;
  line-height: 1.9;
}

.reader-page[data-mode="read"] .dialogue {
  column-gap: 15px;
  margin-top: 20px;
}

.reader-page[data-mode="read"] .dialogue-left {
  grid-template-columns: 5rem minmax(0, 36.25rem);
}

.reader-page[data-mode="read"] .dialogue-left.dialogue-no-avatar,
.reader-page[data-mode="read"] .dialogue-left.dialogue-no-avatar.dialogue-continued {
  grid-template-columns: minmax(0, 36.25rem);
}

.reader-page[data-mode="read"] .dialogue-right .line,
.reader-page[data-mode="read"] .dialogue-right .bubble-row,
.reader-page[data-mode="read"] .bubble-row,
.reader-page[data-mode="read"] .dialogue-left.dialogue-no-avatar .bubble-row {
  max-width: min(100%, 38.75rem);
}

.reader-page[data-mode="read"] .line strong {
  margin-bottom: 7px;
  font-size: 15px;
}

.reader-page[data-mode="read"] .line p {
  max-width: min(100%, 36.25rem);
  min-height: 2.8rem;
  padding: 0.78rem 1.25rem;
  font-size: 17.5px;
  line-height: 1.68;
}

.reader-page[data-mode="read"] .line p.bubble-wrapped {
  max-width: min(100%, 35rem);
}

.reader-page[data-mode="read"] .dialogue-left .line p.bubble-wrapped {
  padding-right: calc(1.25rem - 2px);
}

.reader-page[data-mode="read"] .dialogue-right .line p.bubble-wrapped,
.reader-page[data-mode="read"] .dialogue-right .dark-line p.bubble-wrapped {
  padding-left: calc(1.25rem - 2px);
}

.reader-page[data-mode="read"] .avatar {
  width: 5rem;
  height: 5rem;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-position: center bottom;
  background-size: contain;
  background-repeat: no-repeat;
  box-shadow: none;
  overflow: visible;
}

.reader-page[data-mode="read"] .avatar:not(.avatar-has-image) {
  background-image: none;
}

.reader-page[data-mode="read"] .avatar-has-image {
  background-color: transparent;
}

.reader-page[data-mode="read"] .voice-button {
  width: 2.35rem;
  height: 2.35rem;
}

.reader-page[data-mode="read"] .choice-group button,
.reader-page[data-mode="read"] .choice-branch-card {
  font-size: 17px;
}

.reader-page[data-mode="read"] .choice-end,
.reader-page[data-mode="read"] .chapter-end strong {
  font-size: 15px;
}

@media (max-width: 720px) {
  .reader-page[data-mode="read"] .transcript {
    width: 100%;
    padding-bottom: 72px;
  }

  .reader-page[data-mode="read"] .narration,
  .reader-page[data-mode="read"] .line p {
    font-size: 16px;
  }

  .reader-page[data-mode="read"] .dialogue-left {
    grid-template-columns: 4.4rem minmax(0, 1fr);
  }

  .reader-page[data-mode="read"] .dialogue-left.dialogue-no-avatar,
  .reader-page[data-mode="read"] .dialogue-left.dialogue-no-avatar.dialogue-continued {
    grid-template-columns: minmax(0, 1fr);
  }

  .reader-page[data-mode="read"] .avatar {
    width: 4.4rem;
    height: 4.4rem;
  }
}
/* story-player-dialogue-avatar-routing-20260709 */
.player-dialogue-avatar[hidden] {
  display: none !important;
}

.reader-page[data-mode="play"] .player-dialogue-avatar {
  position: absolute;
  z-index: 3;
  left: clamp(18px, 3vw, 38px);
  top: -74px;
  width: 82px;
  height: 92px;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.reader-page[data-mode="play"] .player-dialogue.has-dialogue-avatar {
  padding-left: clamp(118px, 10vw, 148px);
}

.reader-page[data-mode="play"] .player-dialogue.has-dialogue-avatar .player-dialogue-head {
  margin-left: -6px;
}

@media (max-width: 720px) {
  .reader-page[data-mode="play"] .player-dialogue-avatar {
    left: 14px;
    top: -54px;
    width: 58px;
    height: 66px;
  }

  .reader-page[data-mode="play"] .player-dialogue.has-dialogue-avatar {
    padding-left: 84px;
  }
}

/* story-player-state-cleanup-20260709 */
.reader-page[data-mode="play"] .audio-dock.voice-player {
  width: min(348px, calc(100vw - 88px));
}

.reader-page[data-mode="play"] .voice-player-now {
  display: none;
}

.reader-page[data-mode="play"] .player-stage.is-blackout {
  background: #050505;
}

.reader-page[data-mode="play"] .player-stage.is-blackout::before {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 36%, rgba(0, 0, 0, 0.18));
}
/* story-reader-read-alignment-and-branches-20260709 */
.reader-page[data-mode="read"] .dialogue-right {
  justify-content: end;
}

.reader-page[data-mode="read"] .dialogue-right .line {
  width: min(100%, 38.75rem);
  margin-left: auto;
}

.reader-page[data-mode="read"] .dialogue-right .bubble-row {
  max-width: 100%;
  margin-left: auto;
}

.reader-page[data-mode="read"] .dialogue-right .line p,
.reader-page[data-mode="read"] .dialogue-right .dark-line p {
  max-width: min(100%, 36.25rem);
  margin-left: auto;
}

.reader-page[data-mode="read"] .dialogue-right .line p.bubble-wrapped,
.reader-page[data-mode="read"] .dialogue-right .dark-line p.bubble-wrapped {
  max-width: min(100%, 36.25rem);
}

.reader-page[data-mode="read"] .choice-branch-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
}

.reader-page[data-mode="read"] .choice-branch-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45em;
  color: rgba(255, 118, 118, 0.78);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.8;
}

.reader-page[data-mode="read"] .choice-branch-card {
  max-width: min(82vw, 520px);
}

@media (max-width: 720px) {
  .reader-page[data-mode="read"] .dialogue-right .line {
    width: 100%;
  }

  .reader-page[data-mode="read"] .dialogue-right .line p,
  .reader-page[data-mode="read"] .dialogue-right .dark-line p,
  .reader-page[data-mode="read"] .dialogue-right .line p.bubble-wrapped,
  .reader-page[data-mode="read"] .dialogue-right .dark-line p.bubble-wrapped {
    max-width: 100%;
  }
}
/* story-reader-choice-dot-style-20260709 */
.reader-page[data-mode="read"] .choice-group button::before,
.reader-page[data-mode="read"] .choice-branch-card::before {
  content: "·";
  margin-right: 0.38em;
  color: currentColor;
}

.reader-page[data-mode="read"] .choice-group button::after,
.reader-page[data-mode="read"] .choice-branch-card::after {
  content: none;
  margin: 0;
}

.reader-page[data-mode="read"] .choice-branch-label {
  gap: 0.28em;
}

.reader-page[data-mode="read"] .choice-branch-index {
  min-width: auto;
  margin-right: 0.12em;
}

.reader-page[data-mode="read"] .choice-branch-card {
  gap: 0;
}


/* story-player-exact-ui-assets-20260709 */
.reader-page[data-mode="play"] {
  --story-ui-dialog-normal: url("./assets/story-media/ui-original/exact/jq_bg_duihua.png");
  --story-ui-dialog-inner: url("./assets/story-media/ui-original/exact/jq_bg_xinli.png");
  --story-ui-choice-idle: url("./assets/story-media/ui-original/exact/jq_bg_xuanxiang1.png");
  --story-ui-choice-active: url("./assets/story-media/ui-original/exact/jq_bg_xuanxiang2.png");
  --story-ui-choice-icon: url("./assets/story-media/ui-original/exact/jq_icn_xuanxiang1.png");
  --story-ui-next: url("./assets/story-media/ui-original/exact/jq_btn_jixu.png");
  --story-ui-name-line: url("./assets/story-media/ui-original/exact/common_img_zhezhao5.png");
  --story-ui-name-underline: url("./assets/story-media/ui-original/exact/common_comp_square_scale9.png");
  --story-ui-dialog-bg: var(--story-ui-dialog-normal);
  --story-ui-dialog-opacity: 1;
  --story-ui-dialog-inner-opacity: 1;
}

.reader-page[data-mode="play"] .player-dialogue {
  position: absolute;
  z-index: 9;
  left: 50%;
  right: auto;
  bottom: -12.8%;
  width: 166%;
  max-width: none;
  height: 44.2%;
  min-height: 0;
  transform: translateX(-50%);
  padding: 0;
  color: rgba(255, 247, 246, 0.94);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
  isolation: isolate;
}

.reader-page[data-mode="play"] .player-dialogue::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--story-ui-dialog-bg) center / 100% 100% no-repeat;
  opacity: var(--story-ui-dialog-current-opacity, var(--story-ui-dialog-opacity));
  pointer-events: none;
}

.reader-page[data-mode="play"] .player-dialogue.dialog-type-inner {
  --story-ui-dialog-bg: var(--story-ui-dialog-inner);
  --story-ui-dialog-current-opacity: var(--story-ui-dialog-inner-opacity);
  bottom: -20.4%;
  height: 64.889%;
}

.reader-page[data-mode="play"] .player-dialogue.dialog-type-voice-over,
.reader-page[data-mode="play"] .player-dialogue.dialog-type-player,
.reader-page[data-mode="play"] .player-dialogue.dialog-type-movie {
  --story-ui-dialog-bg: var(--story-ui-dialog-normal);
}

.reader-page[data-mode="play"] .player-dialogue.has-dialogue-avatar {
  padding-left: 0;
}

.reader-page[data-mode="play"] .player-dialogue::after {
  content: "";
  position: absolute;
  z-index: 6;
  right: clamp(54px, 6vw, 86px);
  bottom: clamp(20px, 2.2vw, 30px);
  width: 32px;
  height: 28px;
  background: var(--story-ui-next) center / contain no-repeat;
  opacity: 0.86;
  pointer-events: none;
  animation: playerNextArrowPulse 980ms ease-in-out infinite alternate;
}

.reader-page[data-mode="play"] .player-dialogue-head {
  position: absolute;
  z-index: 3;
  left: 28.46%;
  top: 5.32%;
  right: auto;
  width: 6.482%;
  height: 18.817%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin: 0;
  min-height: 0;
}

.reader-page[data-mode=play] .player-dialogue.has-dialogue-avatar .player-dialogue-head {
  left: 35%;
  margin-left: 0;
}

.reader-page[data-mode="play"] .player-dialogue:not(.has-speaker).has-voice .player-dialogue-head {
  justify-content: flex-end;
}

.reader-page[data-mode="play"] .player-dialogue-head strong {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
  color: rgba(255, 245, 244, 0.94);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(46, 18, 16, 0.42);
}

.reader-page[data-mode="play"] .player-dialogue-head strong::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -21.73%;
  top: -22.29%;
  width: 178.57%;
  height: 157.14%;
  background: rgba(0, 0, 0, 0.807843);
  -webkit-mask: var(--story-ui-name-line) center / 100% 100% no-repeat;
  mask: var(--story-ui-name-line) center / 100% 100% no-repeat;
  pointer-events: none;
}

.reader-page[data-mode="play"] .player-dialogue-head strong::after {
  content: "";
  position: absolute;
  left: 0.45%;
  right: auto;
  top: 103.43%;
  width: 705.36%;
  height: 2.86%;
  background: rgba(255, 255, 255, 0.05098);
  -webkit-mask: var(--story-ui-name-underline) center / 100% 100% no-repeat;
  mask: var(--story-ui-name-underline) center / 100% 100% no-repeat;
  pointer-events: none;
}

.reader-page[data-mode="play"] .player-dialogue:not(.has-speaker):not(.has-voice) .player-dialogue-head {
  display: none;
}

.reader-page[data-mode="play"] .player-dialogue [data-player-text] {
  position: absolute;
  z-index: 2;
  display: block;
  left: 28.46%;
  top: 27.44%;
  width: 44.33%;
  max-width: none;
  margin: 0;
  color: rgba(255, 250, 249, 0.92);
  font-size: clamp(16px, 1.28vw, 20px);
  font-weight: 400;
  line-height: 1.68;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(40, 20, 18, 0.38);
}

.reader-page[data-mode=play] .player-dialogue.has-dialogue-avatar [data-player-text] {
  left: 35%;
  width: 38%;
}

.reader-page[data-mode="play"] .player-dialogue:not(.has-speaker) [data-player-text] {
  top: 23.8%;
}

.reader-page[data-mode="play"] .player-dialogue.dialog-type-inner [data-player-text] {
  left: 49.43%;
  top: 30.4%;
  line-height: 1.86;
}

.reader-page[data-mode="play"] .player-dialogue.voice-active [data-player-text]::after {
  bottom: -7px;
  height: 2px;
  background:
    linear-gradient(90deg, rgba(255, 118, 118, 0.78), rgba(255, 189, 189, 0.92)) 0 0 / var(--voice-progress-percent, 0%) 100% no-repeat,
    rgba(255, 255, 255, 0.18);
}

.reader-page[data-mode="play"] .player-voice-button.voice-button {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  min-width: 30px;
  height: 30px;
  border: 0;
  color: rgba(255, 232, 230, 0.92);
  background: transparent;
  box-shadow: none;
}

.reader-page[data-mode="play"] .player-voice-button.voice-button:hover,
.reader-page[data-mode="play"] .player-voice-button.voice-button:focus-visible,
.reader-page[data-mode="play"] .player-voice-button.voice-button.is-playing,
.reader-page[data-mode="play"] .player-voice-button.voice-button.is-loading {
  color: #fff;
  background: transparent;
  outline: none;
  filter: drop-shadow(0 0 8px rgba(255, 189, 189, 0.42));
}

.reader-page[data-mode="play"] .player-dialogue-avatar {
  position: absolute;
  z-index: 2;
  left: 21.4%;
  top: auto;
  bottom: 9%;
  width: 12.2%;
  height: 82%;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 13px 18px rgba(0, 0, 0, 0.34)) contrast(1.06);
}

.reader-page[data-mode="play"] .player-dialogue.dialog-type-cg {
  left: 13.28%;
  bottom: clamp(44px, 8.6%, 76px);
  width: 88.125%;
  height: auto;
  min-height: 122px;
  padding: 0;
  transform: none;
  --story-ui-dialog-bg: none;
  --story-ui-dialog-current-opacity: 0;
  background: transparent;
  color: rgba(255, 250, 249, 0.94);
}

.reader-page[data-mode="play"] .player-dialogue.dialog-type-cg::before {
  content: none;
}

.reader-page[data-mode="play"] .player-dialogue.dialog-type-cg::after {
  right: -2px;
  bottom: -34px;
}

.reader-page[data-mode="play"] .player-dialogue.dialog-type-cg .player-dialogue-head {
  left: -8.35%;
  top: -18px;
  right: auto;
  width: 280px;
  height: 56px;
  min-height: 0;
  justify-content: flex-end;
}

.reader-page[data-mode="play"] .player-dialogue.dialog-type-cg .player-dialogue-head strong {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  color: rgba(255, 247, 246, 0.92);
  font-size: 18px;
  font-weight: 600;
  line-height: 55.86px;
  text-align: right;
}

.reader-page[data-mode="play"] .player-dialogue.dialog-type-cg .player-dialogue-head strong::before,
.reader-page[data-mode="play"] .player-dialogue.dialog-type-cg .player-dialogue-head strong::after {
  content: none;
}

.reader-page[data-mode="play"] .player-dialogue.dialog-type-cg .player-voice-button.voice-button {
  position: absolute;
  right: -34px;
  left: auto;
  top: -2px;
  transform: none;
}

.reader-page[data-mode="play"] .player-dialogue.dialog-type-cg [data-player-text] {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  font-size: clamp(17px, 1.36vw, 21px);
  line-height: 1.7;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.48);
}

.reader-page[data-mode="play"] .player-dialogue.dialog-type-cg:not(.has-speaker) [data-player-text] {
  top: auto;
}

.reader-page[data-mode="play"] .player-choice-panel {
  z-index: 10;
  left: auto;
  right: clamp(18px, 3.2vw, 48px);
  top: 60%;
  bottom: auto;
  width: clamp(210px, 17.4vw, 390px);
  transform: translateY(-50%);
  display: grid;
  justify-items: end;
  gap: clamp(4px, 0.58vh, 7px);
}

.reader-page[data-mode="play"] .player-choice-button {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: clamp(30px, 3.9vh, 44px);
  padding: 0 clamp(24px, 2vw, 46px) 1px clamp(36px, 3vw, 68px);
  border: 0;
  border-radius: 0;
  color: rgba(255, 246, 244, 0.94);
  background: transparent var(--story-ui-choice-idle) center / 100% 100% no-repeat;
  box-shadow: none;
  font-size: clamp(12px, 0.95vw, 15px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 1px 2px rgba(50, 16, 18, 0.4);
  transition: transform 140ms ease, filter 140ms ease;
}

.reader-page[data-mode="play"] .player-choice-button::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: clamp(15px, 1.32vw, 30px);
  top: 50%;
  width: clamp(15px, 1.05vw, 22px);
  height: clamp(15px, 1.05vw, 22px);
  margin: 0;
  transform: translateY(-50%);
  background: var(--story-ui-choice-icon) center / contain no-repeat;
  pointer-events: none;
}

.reader-page[data-mode="play"] .player-choice-button::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 112%;
  height: 158%;
  margin: 0;
  transform: translate(-50%, -50%);
  background: var(--story-ui-choice-active) center / 100% 100% no-repeat;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.reader-page[data-mode="play"] .player-choice-button:hover,
.reader-page[data-mode="play"] .player-choice-button:focus-visible {
  color: #fff;
  outline: none;
  transform: translateY(-1px);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18));
}

.reader-page[data-mode="play"] .player-choice-button:hover::after,
.reader-page[data-mode="play"] .player-choice-button:focus-visible::after {
  opacity: 1;
}

.reader-page[data-mode="play"] .player-choice-button:active {
  transform: translateY(0);
}

@keyframes playerNextArrowPulse {
  from { transform: translateY(0); opacity: 0.58; }
  to { transform: translateY(4px); opacity: 0.92; }
}

@media (max-width: 720px) {
  .reader-page[data-mode="play"] .player-dialogue {
    left: 50%;
    right: auto;
    bottom: 6px;
    width: calc(100% + 28px);
    height: 148px;
    padding: 19px 42px 20px 54px;
  }

  .reader-page[data-mode="play"] .player-dialogue.has-dialogue-avatar {
    padding-left: 132px;
  }

  .reader-page[data-mode="play"] .player-dialogue.dialog-type-inner {
    height: 190px;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .reader-page[data-mode="play"] .player-dialogue-head {
    left: 48px;
    right: 42px;
    top: 18px;
  }

  .reader-page[data-mode="play"] .player-dialogue.has-dialogue-avatar .player-dialogue-head {
    left: 132px;
  }

  .reader-page[data-mode="play"] .player-dialogue-head strong {
    min-width: 92px;
    padding: 6px 28px 7px 12px;
    font-size: 14px;
  }

  .reader-page[data-mode="play"] .player-dialogue [data-player-text] {
    margin: 40px 22px 0 0;
    font-size: 15px;
    line-height: 1.66;
  }

  .reader-page[data-mode="play"] .player-dialogue-avatar {
    left: 24px;
    bottom: 16px;
    width: 96px;
    height: 92px;
  }

  .reader-page[data-mode="play"] .player-dialogue::after {
    right: 36px;
    bottom: 20px;
    width: 24px;
    height: 21px;
  }

  .reader-page[data-mode="play"] .player-choice-panel {
    right: 12px;
    top: 58%;
    bottom: auto;
    width: min(260px, calc(100% - 24px));
    transform: translateY(-50%);
  }

  .reader-page[data-mode="play"] .player-choice-button {
    width: 100%;
    min-height: 42px;
    padding: 0 28px 1px 46px;
    font-size: 14px;
  }

  .reader-page[data-mode="play"] .player-choice-button::before {
    left: 18px;
    width: 20px;
    height: 20px;
  }
}

/* story-reader-release-ui-polish-20260710 */
.reader-page {
  padding-left: 56px;
}

.icon-rail {
  width: 56px;
  gap: 10px;
  padding: 12px 0;
  background: rgba(248, 249, 247, 0.9);
  border-right-color: rgba(164, 170, 160, 0.26);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.68) inset;
}

.rail-logo,
.rail-link {
  text-decoration: none;
}

.rail-logo {
  width: 36px;
  height: 34px;
  border-radius: 3px;
  color: var(--story-accent);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 118, 118, 0.16);
  box-shadow: 0 8px 18px rgba(255, 118, 118, 0.035);
}

.rail-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.rail-button-active {
  color: #ffbdbd;
  background: rgb(49 49 49 / 90%);
  box-shadow: none;
}

.topbar {
  height: 52px;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  padding: 0 24px;
  background: rgba(249, 250, 248, 0.9);
  border-bottom-color: rgba(164, 170, 160, 0.24);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.68) inset;
}

.topbar-brand {
  font-size: 13px;
  letter-spacing: 0;
}

.topbar-title {
  font-size: 14px;
  font-weight: 700;
  color: rgba(32, 35, 32, 0.72);
}

.topbar-actions a,
.topbar-actions button {
  min-width: 0;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: rgba(32, 35, 32, 0.66);
  background: transparent;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.topbar-actions a:hover,
.topbar-actions button:hover,
.topbar-actions a:focus-visible,
.topbar-actions button:focus-visible {
  color: var(--story-accent);
  background: rgba(255, 118, 118, 0.09);
  outline: none;
  transform: translateY(-1px);
}

.reader-layout {
  width: min(1580px, calc(100vw - 68px));
  grid-template-columns: 306px minmax(0, 1fr);
  gap: 40px;
  padding: 58px 14px 150px 0;
}

.story-nav.is-fixed .nav-card {
  width: var(--story-nav-width, 306px);
}

.nav-card {
  min-height: 482px;
  padding: 27px 29px 30px;
  background: rgba(251, 252, 250, 0.13);
  box-shadow:
    0 20px 46px rgba(32, 35, 32, 0.085),
    0 12px 30px rgba(255, 118, 118, 0.026);
}

.story-nav.is-stuck .nav-card {
  box-shadow:
    0 18px 44px rgba(32, 35, 32, 0.01),
    0 10px 28px rgba(255, 118, 118, 0.006);
}

.nav-kicker,
.nav-group > span {
  font-size: 14px;
}

.nav-card h1 {
  font-size: 31px;
  line-height: 1.08;
}

.nav-subtitle {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
}

.nav-link,
.switch-row,
.nav-action {
  font-size: 16px;
}

.nav-link {
  line-height: 1.55;
}

.story-switcher-group > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.story-switcher-group > span small {
  color: rgba(42, 39, 40, 0.42);
  font-size: 11px;
  font-weight: 700;
}

.story-search {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 118, 118, 0.16);
  border-radius: 4px;
  color: rgba(32, 35, 32, 0.82);
  background: rgba(255, 255, 255, 0.34);
  outline: none;
  font-size: 13px;
}

.story-search:focus-visible {
  border-color: rgba(255, 118, 118, 0.42);
  background: rgba(255, 255, 255, 0.52);
}

.story-switch-list {
  display: grid;
  gap: 4px;
  max-height: 230px;
  overflow: auto;
  padding-right: 4px;
}

.story-switch-item {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 0;
  border-left: 2px solid transparent;
  color: rgba(42, 39, 40, 0.72);
  background: transparent;
  text-align: left;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.story-switch-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.story-switch-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(42, 39, 40, 0.42);
  font-size: 11px;
  font-weight: 600;
}

.story-switch-item:hover,
.story-switch-item:focus-visible,
.story-switch-item.is-active {
  color: var(--story-accent);
  border-left-color: var(--story-accent);
  background: rgba(255, 118, 118, 0.055);
  outline: none;
}

.story-switch-empty {
  margin: 0;
  color: rgba(42, 39, 40, 0.45);
  font-size: 12px;
}

.reader-page.reader-release-build [data-stage-control],
.reader-page.reader-release-build [data-action-stage],
.reader-page.reader-release-build .nav-actions {
  display: none !important;
}

.reader-page.is-overview .story-heading,
.reader-page.is-overview .chapter-strip,
.reader-page.is-overview .transcript {
  display: none;
}

.story-overview[hidden] {
  display: none !important;
}

.story-overview {
  width: min(980px, 100%);
  margin: 116px auto 80px;
}

.story-overview-head {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.story-overview-head h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.14;
}

.story-overview-head p:last-child {
  margin: 0;
  color: rgba(42, 39, 40, 0.55);
  font-size: 14px;
}

.story-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.story-overview-card {
  min-height: 188px;
  display: grid;
  grid-template-rows: 102px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 6px;
  color: inherit;
  background: rgba(251, 252, 250, 0.46);
  box-shadow: 0 14px 32px rgba(32, 35, 32, 0.07);
  text-decoration: none;
  backdrop-filter: blur(18px);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms ease, border-color 220ms ease;
}

.story-overview-card:hover,
.story-overview-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 118, 118, 0.28);
  box-shadow: 0 18px 38px rgba(255, 118, 118, 0.07), 0 16px 32px rgba(32, 35, 32, 0.06);
  outline: none;
}

.story-overview-image {
  display: block;
  background:
    linear-gradient(135deg, rgba(255, 118, 118, 0.2), rgba(255, 255, 255, 0.18)),
    rgba(255, 255, 255, 0.24);
  background-position: center 34%;
  background-size: cover;
  transition: transform 160ms ease, opacity 160ms ease;
}

.story-overview-copy {
  display: grid;
  gap: 5px;
  padding: 12px 14px 14px;
}

.story-overview-copy small {
  color: rgba(255, 118, 118, 0.76);
  font-size: 11px;
  font-weight: 800;
}

.story-overview-copy strong {
  color: rgba(32, 35, 32, 0.86);
  font-size: 18px;
  line-height: 1.25;
}

.story-overview-copy em,
.story-overview-empty {
  margin: 0;
  color: rgba(42, 39, 40, 0.55);
  font-size: 12px;
  font-style: normal;
  line-height: 1.65;
}

.background-choice-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.background-choice-title,
.background-choice-group small {
  grid-column: 1 / -1;
}

.background-choice-title {
  color: rgba(255, 118, 118, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.background-choice {
  position: relative;
  min-width: 0;
}

.background-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.background-choice span {
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid rgba(255, 118, 118, 0.14);
  border-radius: 4px;
  color: rgba(42, 39, 40, 0.58);
  background: rgba(255, 255, 255, 0.26);
  font-size: 12px;
  font-weight: 800;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.background-choice input:checked + span {
  color: var(--story-accent);
  border-color: rgba(255, 118, 118, 0.34);
  background: rgba(255, 118, 118, 0.085);
}

.background-choice input:focus-visible + span {
  outline: 2px solid rgba(255, 118, 118, 0.3);
  outline-offset: 2px;
}

.reader-page:not(.readable-mode).has-story-image .bg-image {
  opacity: var(--story-bg-opacity);
  filter: blur(var(--story-bg-blur)) saturate(0.96) contrast(0.92);
}

.reader-page:not(.readable-mode).has-story-image .bg-wash {
  background:
    linear-gradient(90deg, rgba(245, 246, 244, 0.86) 0 20%, rgba(245, 246, 244, var(--story-bg-wash)) 46%, rgba(250, 250, 247, calc(var(--story-bg-wash) + 0.02)) 100%),
    rgba(245, 246, 244, var(--story-bg-wash));
}

.reader-page.readable-mode .bg-image {
  opacity: 0.12;
}

.reader-page.readable-mode .bg-wash {
  background: rgba(248, 249, 247, 0.92);
}

.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 116px;
  z-index: 17;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(217, 222, 216, 0.82);
  border-radius: 7px;
  color: rgba(42, 39, 40, 0.72);
  background: rgba(251, 252, 250, 0.74);
  box-shadow: 0 12px 28px rgba(32, 35, 32, 0.09), 0 8px 20px rgba(255, 118, 118, 0.025);
  backdrop-filter: blur(20px);
  font-size: 12px;
  font-weight: 800;
  transition: transform 180ms ease, color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  color: var(--story-accent);
  border-color: rgba(255, 118, 118, 0.34);
  background: rgba(255, 255, 255, 0.84);
  outline: none;
  transform: translateY(-2px);
}

.back-to-top-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: translateY(3px) rotate(45deg);
}

.reader-page[data-mode="play"] .back-to-top {
  display: none;
}

.reader-page[data-mode="read"] .avatar {
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

.reader-page[data-mode="read"] .avatar.avatar-has-image {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center bottom;
}

@media (max-width: 1040px) {
  .reader-page {
    padding-left: 56px;
  }

  .reader-layout {
    width: min(100%, calc(100vw - 56px));
    grid-template-columns: 1fr;
    padding: 28px 18px 150px;
    transform: none;
  }

  .story-switch-list {
    max-height: 180px;
  }
}

@media (max-width: 720px) {
  .reader-page {
    padding-left: 0;
  }

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

  .topbar-actions a:not(:first-child),
  .topbar-actions button:not([data-action-settings]) {
    display: none;
  }

  .reader-layout {
    width: 100%;
    padding: 24px 14px 132px;
  }

  .nav-card {
    padding: 22px 20px;
  }

  .nav-card h1 {
    font-size: 26px;
  }

  .nav-link,
  .switch-row,
  .nav-action {
    font-size: 14px;
  }

  .background-choice-group {
    grid-template-columns: 1fr;
  }

  .story-overview {
    margin-top: 34px;
  }

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

  .back-to-top {
    right: 12px;
    bottom: 96px;
  }
}
/* story-reader-wiki-shell-adjust-20260710 */
.reader-page {
  --reader-rail-width: 56px;
  --reader-sidebar-width: 306px;
  padding-left: var(--reader-rail-width);
}

.icon-rail {
  background:
    linear-gradient(180deg, rgba(251, 252, 250, 0.96), rgba(244, 246, 242, 0.88)),
    rgba(248, 249, 247, 0.92);
  border-right: 1px solid rgba(158, 166, 153, 0.28);
}

.rail-button,
.rail-logo {
  position: relative;
}

.rail-button-active::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--story-accent);
}

.topbar {
  min-height: 54px;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto;
  background:
    linear-gradient(180deg, rgba(252, 253, 251, 0.95), rgba(246, 248, 245, 0.9)),
    rgba(249, 250, 248, 0.92);
  border-bottom: 1px solid rgba(146, 153, 140, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.72) inset,
    0 10px 24px rgba(32, 35, 32, 0.035);
  backdrop-filter: blur(18px) saturate(1.08);
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: rgba(32, 35, 32, 0.78);
  font-weight: 800;
}

.topbar-brand::before {
  content: "";
  width: 7px;
  height: 22px;
  border-radius: 2px;
  background: var(--story-accent);
  box-shadow: 8px 0 0 rgba(255, 118, 118, 0.24);
}

.topbar-title {
  color: rgba(32, 35, 32, 0.6);
  font-weight: 600;
}

.reader-layout {
  width: min(1560px, calc(100vw - var(--reader-rail-width) - 24px));
  margin: 0 auto 0 clamp(10px, 1.7vw, 30px);
  grid-template-columns: var(--reader-sidebar-width) minmax(0, 1fr);
  gap: clamp(34px, 3.2vw, 54px);
  padding: 64px 18px 156px 0;
}

.story-nav {
  margin-left: -10px;
}

.story-nav.is-fixed .nav-card {
  width: var(--story-nav-width, var(--reader-sidebar-width));
}

.nav-card {
  background: rgba(251, 252, 250, 0.12);
  box-shadow:
    0 18px 40px rgba(32, 35, 32, 0.075),
    0 10px 24px rgba(255, 118, 118, 0.018);
}

.story-nav.is-stuck .nav-card {
  box-shadow:
    0 18px 44px rgba(32, 35, 32, 0.01),
    0 10px 24px rgba(255, 118, 118, 0.004);
}

.story-switch-list {
  max-height: 260px;
  gap: 6px;
}

.story-switch-item {
  padding: 8px 9px;
}

.story-switch-item strong {
  font-size: 15px;
}

.story-switch-item span {
  font-size: 12px;
}

.story-search {
  height: 38px;
  font-size: 14px;
}

.story-main {
  max-width: 940px;
}

.story-overview {
  width: min(1040px, 100%);
  margin: 84px auto 80px;
}

.story-overview-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.story-overview-card {
  grid-template-rows: 120px minmax(0, 1fr);
}

.story-overview-image {
  background-position: center 28%;
}

.reader-page:not(.readable-mode).has-story-image .bg-image {
  opacity: var(--story-bg-opacity);
  filter: blur(var(--story-bg-blur)) saturate(1.02) contrast(0.94);
}

.reader-page:not(.readable-mode).has-story-image .bg-blur {
  opacity: 0.42;
  backdrop-filter: blur(12px) saturate(0.94);
}

.reader-page.readable-mode .bg-image {
  opacity: 0.08;
  filter: blur(30px) saturate(0.82) contrast(0.9);
}

.reader-page.readable-mode .bg-blur {
  opacity: 0.32;
}

.card_content_date-img img {
  object-position: center center;
}

.back-to-top {
  bottom: 136px;
}

@media (max-width: 1040px) {
  .reader-layout {
    width: min(100%, calc(100vw - var(--reader-rail-width)));
    margin: 0;
    grid-template-columns: 1fr;
    padding: 28px 18px 150px;
  }

  .story-nav {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .reader-page {
    padding-left: 0;
  }

  .topbar {
    min-height: 52px;
  }

  .reader-layout {
    width: 100%;
    padding: 24px 14px 132px;
  }

  .back-to-top {
    bottom: 104px;
  }
}
/* story-reader-directory-settings-final-20260710 */
.reader-page {
  --reader-rail-width: 0px;
  --reader-sidebar-width: 360px;
  padding-left: 0 !important;
}

.icon-rail,
.reader-settings {
  display: none !important;
}

.topbar {
  min-height: 54px;
  grid-template-columns: auto minmax(150px, 220px) minmax(0, 1fr) auto;
  padding: 0 clamp(18px, 3vw, 32px);
}

.topbar-overview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 5px;
  color: rgba(255, 118, 118, 0.92);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.topbar-overview:hover,
.topbar-overview:focus-visible {
  background: rgba(255, 118, 118, 0.09);
  outline: none;
}

.topbar-actions {
  align-items: center;
  gap: 8px;
}

.topbar-actions a,
.topbar-actions button {
  white-space: nowrap;
}

.reader-layout {
  width: min(1540px, calc(100vw - 48px));
  margin: 0 auto;
  grid-template-columns: minmax(284px, var(--reader-sidebar-width)) minmax(0, 1fr);
  gap: clamp(64px, 5.4vw, 96px);
  padding: 60px 24px 156px;
}

.story-nav {
  position: sticky;
  top: 62px;
  margin-left: clamp(-42px, -2.3vw, -18px);
}

.story-nav.is-fixed {
  min-height: var(--story-nav-height, 430px);
}

.story-nav.is-fixed .nav-card {
  position: fixed;
  top: 62px;
  width: var(--story-nav-width, var(--reader-sidebar-width));
}

.story-main {
  max-width: 980px;
  justify-self: center;
  margin: 0 auto;
}

.reader-page:not(.is-overview) .story-switcher-group,
.reader-page.is-overview [data-chapter-nav],
.reader-page.is-overview .nav-actions {
  display: none !important;
}

.nav-card {
  min-height: 0;
  padding: 28px 28px 30px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(251, 252, 250, 0.18);
  box-shadow:
    0 18px 40px rgba(32, 35, 32, 0.07),
    0 10px 26px rgba(255, 118, 118, 0.014);
  backdrop-filter: blur(22px) saturate(1.04);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.story-nav.is-stuck .nav-card {
  background: rgba(251, 252, 250, 0.13);
  box-shadow:
    0 18px 44px rgba(32, 35, 32, 0.01),
    0 10px 26px rgba(255, 118, 118, 0.004);
  transform: scale(1.002) translateZ(0);
}

.nav-cover[hidden] {
  display: none !important;
}

.nav-cover {
  position: relative;
  min-height: 138px;
  margin: 12px 0 18px;
  overflow: hidden;
  border-radius: 6px;
  background-color: rgba(255, 118, 118, 0.08);
  background-position: center 28%;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 14px 30px rgba(32, 35, 32, 0.075);
}

.nav-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 34%, rgba(32, 35, 32, 0.4));
}

.nav-cover span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 1;
  max-width: calc(100% - 24px);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.nav-reader-settings {
  gap: 10px;
}

.settings-subgroup {
  display: grid;
  gap: 9px;
}

.settings-subgroup-avatar {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 118, 118, 0.10);
}

.settings-hint {
  margin: -2px 0 0;
  color: rgba(42, 39, 40, 0.48);
  font-size: 11px;
  line-height: 1.55;
}

.nav-reader-settings .switch-row {
  min-height: 32px;
  justify-content: space-between;
  gap: 14px;
  color: rgba(42, 39, 40, 0.72);
  font-size: 15px;
  font-weight: 700;
}

.nav-reader-settings .switch-row input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.background-choice-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(255, 118, 118, 0.10);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
}

.background-choice-title,
.background-choice-group small {
  grid-column: 1 / -1;
}

.background-choice-title {
  color: rgba(255, 118, 118, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.background-choice span {
  min-height: 30px;
  padding: 0 7px;
  border-color: rgba(255, 118, 118, 0.13);
  background: rgba(255, 255, 255, 0.24);
  font-size: 12px;
}

.background-choice input:checked + span {
  color: #ff7676;
  border-color: rgba(255, 118, 118, 0.36);
  background: rgba(255, 118, 118, 0.09);
}

.nav-reader-settings .range-row {
  margin-top: 2px;
  font-size: 12px;
}

.nav-reader-settings .range-row input {
  height: 3px;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 118, 118, 0.42), rgba(255, 118, 118, 0.14));
}

.nav-reader-settings .range-row input::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  appearance: none;
  border-radius: 50%;
  background: #ff7676;
  box-shadow: 0 0 0 3px rgba(255, 118, 118, 0.14);
}

.nav-reader-settings .range-row input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #ff7676;
  box-shadow: 0 0 0 3px rgba(255, 118, 118, 0.14);
}

.nav-reader-settings .settings-foot {
  margin-top: 2px;
  padding-top: 10px;
  color: rgba(42, 39, 40, 0.45);
  font-size: 11px;
}

.reader-page:not(.readable-mode).has-story-image .bg-image {
  opacity: var(--story-bg-opacity);
  filter: blur(var(--story-bg-blur)) saturate(1.02) contrast(0.94);
}

.reader-page:not(.readable-mode).has-story-image .bg-wash {
  background:
    linear-gradient(90deg, rgba(245, 246, 244, var(--story-bg-wash-left, 0.78)) 0 20%, rgba(245, 246, 244, var(--story-bg-wash-mid, var(--story-bg-wash))) 48%, rgba(250, 250, 247, var(--story-bg-wash-right, 0.72)) 100%),
    rgba(245, 246, 244, var(--story-bg-wash-base, 0.68));
}

.reader-page:not(.readable-mode).has-story-image .bg-blur {
  opacity: 0.34;
  backdrop-filter: blur(10px) saturate(0.94);
}

.avatar {
  border: 0;
  padding: 0;
  appearance: none;
  font: inherit;
}

button.avatar {
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

button.avatar:hover {
  transform: translateY(-2px);
}

button.avatar:focus-visible {
  outline: 1px solid rgba(255, 118, 118, 0.42);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.reader-page[data-mode="read"] .avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0;
  background-color: transparent;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
}

.reader-page[data-mode="read"] .avatar.avatar-frame-head {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 10px;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.avatar-picker[hidden] {
  display: none !important;
}

.avatar-picker {
  position: fixed;
  left: var(--avatar-picker-left, 12px);
  top: var(--avatar-picker-top, 12px);
  z-index: 45;
  width: min(312px, calc(100vw - 24px));
  padding: 0;
  background: transparent;
  opacity: 0;
  transform: translateY(4px) scale(0.985);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  backdrop-filter: none;
}

.avatar-picker.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.avatar-picker-panel {
  width: 100%;
  max-height: min(360px, calc(100dvh - 24px));
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: rgba(251, 252, 250, 0.80);
  box-shadow: 0 18px 42px rgba(32, 35, 32, 0.16), 0 8px 18px rgba(255, 118, 118, 0.055);
  backdrop-filter: blur(18px) saturate(1.06);
}

.avatar-picker-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 10px;
}

.avatar-picker-head p,
.avatar-picker-head h2 {
  margin: 0;
}

.avatar-picker-head p {
  color: #ff7676;
  font-size: 12px;
  font-weight: 800;
}

.avatar-picker-head h2 {
  color: rgba(32, 35, 32, 0.86);
  font-size: 15px;
}

[data-avatar-picker-close] {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 4px;
  color: rgba(42, 39, 40, 0.56);
  background: rgba(255, 255, 255, 0.52);
  font-size: 22px;
}

.avatar-picker-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.avatar-picker-option {
  min-height: 62px;
  display: grid;
  place-items: center;
  padding: 4px;
  border: 0;
  border-radius: 7px;
  color: rgba(42, 39, 40, 0.72);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.avatar-picker-option.is-active,
.avatar-picker-option:hover,
.avatar-picker-option:focus-visible {
  background: rgba(255, 118, 118, 0.055);
  outline: none;
}

.avatar-picker-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (max-width: 1040px) {
  .reader-layout {
    width: min(100%, calc(100vw - 28px));
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 14px 150px;
  }

  .story-nav {
    position: static;
    margin-left: 0;
  }

  .story-nav.is-fixed {
    min-height: 0;
  }

  .story-nav.is-fixed .nav-card {
    position: static;
    width: auto;
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px 14px;
  }

  .topbar-actions button:not([data-action-settings]) {
    display: none;
  }

  .reader-layout {
    width: 100%;
    padding: 24px 14px 132px;
  }

  .nav-card {
    padding: 22px 20px;
  }

  .background-choice-group {
    grid-template-columns: 1fr;
  }

  .avatar-picker {
    left: 12px;
    right: 12px;
    width: auto;
  }
}
/* story-reader-wiki-nav-20260710 */
.topbar {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  column-gap: 16px;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(32, 35, 32, 0.86);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.topbar-brand::before {
  content: none;
  display: none;
}

.topbar-brand:hover,
.topbar-brand:focus-visible,
.topbar-overview:hover,
.topbar-overview:focus-visible {
  color: rgba(32, 35, 32, 0.92);
  background: rgba(32, 35, 32, 0.055);
  outline: none;
}

.topbar-logo {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  object-fit: contain;
}

.topbar-overview {
  color: rgba(32, 35, 32, 0.82);
  font-weight: 700;
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: auto auto 1fr;
  }

  .topbar-title {
    display: none;
  }
}
/* story-reader-smooth-nav-and-avatar-continuity-20260710 */
.nav-card {
  transition:
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 460ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 460ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 460ms cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 460ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.story-nav.is-stuck .nav-card {
  transform: translateY(-1px) scale(1.003) translateZ(0);
}

.dialogue-left.dialogue-continued.dialogue-has-avatar-source {
  grid-template-columns: 4rem minmax(0, 29rem);
}

.dialogue-left.dialogue-continued.dialogue-has-avatar-source .line {
  grid-column: 2;
}

.reader-page[data-mode="read"] .dialogue-left.dialogue-continued.dialogue-has-avatar-source {
  grid-template-columns: 5rem minmax(0, 36.25rem);
}

@media (max-width: 720px) {
  .reader-page[data-mode="read"] .dialogue-left.dialogue-continued.dialogue-has-avatar-source {
    grid-template-columns: 4.4rem minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-card {
    transition: none;
  }
}
/* story-reader-sidebar-and-top-polish-20260710 */
.reader-page {
  --reader-sidebar-width: 336px;
}

.reader-layout {
  width: min(1560px, calc(100vw - 56px));
  grid-template-columns: minmax(260px, var(--reader-sidebar-width)) minmax(0, 1fr);
  gap: clamp(88px, 6.8vw, 132px);
}

.story-nav {
  margin-left: clamp(-60px, -3vw, -28px);
}

.story-nav.is-fixed .nav-card {
  width: var(--story-nav-width, var(--reader-sidebar-width));
}

.nav-card {
  transform: translateY(4px) scale(0.994) translateZ(0);
  transition:
    transform 700ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 760ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 760ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 760ms cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 760ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.story-nav.is-stuck .nav-card {
  background: rgba(251, 252, 250, 0.115);
  box-shadow:
    0 18px 44px rgba(32, 35, 32, 0.012),
    0 10px 26px rgba(255, 118, 118, 0.003);
  transform: translateY(0) scale(1.004) translateZ(0);
}

.back-to-top {
  right: 24px;
  bottom: 164px;
  z-index: 19;
  gap: 7px;
  min-height: 34px;
  padding: 0 13px;
  background: rgba(251, 252, 250, 0.78);
  transition:
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
    color 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease,
    box-shadow 220ms ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  transform: translateY(-2px);
}

@media (min-width: 1680px) {
  .reader-layout {
    width: min(1620px, calc(100vw - 96px));
    gap: clamp(112px, 7.4vw, 168px);
  }

  .story-nav {
    margin-left: clamp(-72px, -3.4vw, -34px);
  }
}

@media (max-width: 1280px) {
  .reader-layout {
    gap: clamp(68px, 5.4vw, 96px);
  }
}

@media (max-width: 1040px) {
  .reader-layout {
    width: min(100%, calc(100vw - 28px));
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 14px 150px;
  }

  .story-nav {
    margin-left: 0;
  }

  .nav-card,
  .story-nav.is-stuck .nav-card {
    transform: none;
  }
}

@media (max-width: 720px) {
  .back-to-top {
    right: 12px;
    bottom: 138px;
    min-height: 32px;
    padding: 0 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-card,
  .story-nav.is-stuck .nav-card {
    transform: none;
    transition: none;
  }
}
/* story-reader-nav-stable-and-performance-mode-20260710 */
.nav-card,
.story-nav.is-stuck .nav-card {
  transform: none;
}

.nav-card {
  transition:
    box-shadow 620ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 620ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 620ms cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 620ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: box-shadow, background-color;
}

.audio-dock.voice-player {
  width: min(520px, calc(100vw - 88px));
}

.voice-player-controls {
  grid-template-columns: 28px auto auto 56px auto minmax(70px, 86px);
}

.performance-toggle {
  position: relative;
}

.performance-toggle::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 210px;
  padding: 8px 10px;
  border-radius: 6px;
  color: rgba(255, 245, 246, 0.94);
  background: rgba(49, 49, 49, 0.9);
  box-shadow: 0 12px 24px rgba(32, 35, 32, 0.14);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.performance-toggle:hover::after,
.performance-toggle:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.voice-performance-active .performance-toggle span {
  color: var(--story-accent);
}

.performance-current .line p,
.performance-current.narration,
.performance-current.choice-group button,
.performance-current.choice-branch-label .choice-branch-card,
.performance-current.choice-end,
.performance-current.chapter-end strong {
  box-shadow:
    0 0 0 1px rgba(255, 118, 118, 0.16),
    0 10px 24px rgba(255, 118, 118, 0.035);
}

.performance-current {
  scroll-margin-top: 42vh;
}

@media (max-width: 720px) {
  .audio-dock.voice-player {
    width: auto;
  }

  .voice-player-controls {
    grid-template-columns: 28px auto auto 54px auto;
  }

  .audio-dock.voice-player .volume-control {
    display: none;
  }

  .performance-toggle::after {
    right: -8px;
    width: min(220px, calc(100vw - 36px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-card {
    transition: none;
  }

  .performance-toggle::after {
    transition: none;
  }
}

/* story-reader-nav-no-fixed-20260710 */
.story-nav.is-fixed {
  min-height: 0 !important;
}

.story-nav.is-fixed .nav-card {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  z-index: auto;
}

.nav-card,
.story-nav.is-stuck .nav-card {
  transform: none !important;
}

.nav-card {
  transition:
    box-shadow 540ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 540ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 540ms cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 540ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: box-shadow, background-color;
}

/* story-reader-performance-scroll-polish-20260710 */
.audio-dock.voice-player {
  bottom: 34px;
}

.back-to-top {
  bottom: 178px;
}

.performance-current .line p,
.performance-current.narration,
.performance-current.choice-group button,
.performance-current.choice-branch-label .choice-branch-card,
.performance-current.choice-end,
.performance-current.chapter-end strong {
  transition:
    box-shadow 360ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 360ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reader-page[data-mode="read"] .audio-dock.voice-player .rate-control span {
  color: rgba(255, 118, 118, 0.72);
}

@media (max-width: 720px) {
  .audio-dock.voice-player {
    bottom: 18px;
  }

  .back-to-top {
    bottom: 150px;
  }
}


/* story-reader-bgm-runtime-20260710 */
.audio-dock.voice-player {
  bottom: 64px;
  width: min(438px, calc(100vw - 88px));
}

.back-to-top {
  bottom: 208px;
}

.voice-player-controls {
  grid-template-columns: 28px auto auto 54px auto minmax(62px, 78px);
  gap: 5px;
}

.bgm-toggle {
  position: relative;
}

.bgm-toggle::after {
  content: attr(data-tooltip);
  position: absolute;
  right: -8px;
  bottom: calc(100% + 10px);
  width: min(230px, calc(100vw - 36px));
  padding: 8px 10px;
  border-radius: 8px;
  color: rgba(255, 245, 245, 0.94);
  background: rgba(49, 49, 49, 0.9);
  box-shadow: 0 10px 26px rgba(49, 49, 49, 0.14);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 4;
}

.bgm-toggle:hover::after,
.bgm-toggle:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.audio-dock.voice-player.bgm-enabled .bgm-toggle span,
.audio-dock.voice-player[data-bgm-state="playing"] .bgm-toggle span {
  color: var(--story-accent);
}

.audio-dock.voice-player[data-bgm-state="missing"] .bgm-toggle span,
.audio-dock.voice-player[data-bgm-state="blocked"] .bgm-toggle span,
.audio-dock.voice-player[data-bgm-state="error"] .bgm-toggle span {
  color: rgba(114, 96, 96, 0.68);
}

.audio-dock.voice-player[data-bgm-state="playing"] .bgm-toggle span::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 4px;
  border-radius: 999px;
  background: currentColor;
  vertical-align: 2px;
  opacity: 0.82;
}

.performance-current {
  scroll-margin-top: 28vh;
}

@media (max-width: 720px) {
  .audio-dock.voice-player {
    bottom: 24px;
    width: auto;
  }

  .back-to-top {
    bottom: 164px;
  }

  .bgm-toggle::after {
    right: -8px;
    width: min(220px, calc(100vw - 36px));
  }
}

/* story-reader-voice-player-wrap-fix-20260711 */
.voice-player-controls {
  grid-template-columns: 54px auto auto minmax(78px, 1fr);
  grid-auto-rows: minmax(24px, auto);
  align-items: center;
}

.voice-player-controls .audio-main {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
}

.voice-player-controls .voice-auto-toggle {
  grid-column: 2;
  grid-row: 1;
}

.voice-player-controls .performance-toggle {
  grid-column: 3;
  grid-row: 1;
}

.voice-player-controls .bgm-toggle {
  grid-column: 4;
  grid-row: 1;
}

.voice-player-controls .voice-language-control-compact {
  grid-column: 1;
  grid-row: 2;
}

.voice-player-controls .rate-control {
  grid-column: 2;
  grid-row: 2;
}

.voice-player-controls .volume-control {
  grid-column: 3 / 5;
  grid-row: 2;
}

@media (max-width: 720px) {
  .voice-player-controls {
    grid-template-columns: 54px auto auto 54px;
  }

  .voice-player-controls .rate-control {
    grid-column: 2 / 5;
  }
}
