[hidden] { display: none !important; }
/* ============================================================
   人生体验游戏 - 主样式表
   设计原则：深色沉浸 / 单屏展示 / 翻页过渡 / 真实感细节
   ============================================================ */

/* ---------- 基础重置 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050505;
  color: #f2efe9;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

/* ---------- 舞台：iPhone 16 Pro Max 比例容器 ---------- */
.stage {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background: #0a0a0a;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
}

@media (min-width: 431px) {
  .stage {
    height: min(932px, 100vh);
    margin-top: auto;
    margin-bottom: auto;
    border-radius: 28px;
  }
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #000;
  }
}

/* ---------- 视图切换 ---------- */
.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateX(40px);
  transition: opacity 360ms ease, transform 360ms ease, visibility 360ms;
  pointer-events: none;
}

.view.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

/* ============================================================
   视图一：开始页
   ============================================================ */
.view-start {
  justify-content: center;
  padding: 48px 32px;
  background:
    radial-gradient(circle at 30% 20%, rgba(212, 184, 150, 0.08), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(160, 130, 110, 0.06), transparent 60%),
    #0a0a0a;
}

.start-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.start-mark {
  font-size: 12px;
  letter-spacing: 0.4em;
  color: rgba(242, 239, 233, 0.45);
  text-transform: uppercase;
}

.start-title {
  font-size: 38px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: #f2efe9;
  margin: 8px 0 4px;
}

.start-subtitle {
  font-size: 15px;
  color: rgba(242, 239, 233, 0.6);
  font-weight: 300;
}

.start-card {
  width: 100%;
  margin: 24px 0 12px;
  padding: 24px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  text-align: left;
}

.start-card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  font-size: 14px;
}

.start-card-row + .start-card-row {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.start-card-label {
  color: rgba(242, 239, 233, 0.4);
  letter-spacing: 0.1em;
  font-size: 12px;
}

.start-card-value {
  color: rgba(242, 239, 233, 0.9);
  font-weight: 400;
}

.start-hint {
  font-size: 12px;
  color: rgba(242, 239, 233, 0.35);
  letter-spacing: 0.1em;
  animation: hint-breath 2.4s ease-in-out infinite;
}

.start-cta {
  margin-top: 8px;
  padding: 14px 36px;
  font-size: 15px;
  letter-spacing: 0.15em;
  color: #0a0a0a;
  background: #f2efe9;
  border-radius: 999px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.start-cta:active {
  transform: scale(0.97);
  opacity: 0.85;
}

@keyframes hint-breath {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}

/* ============================================================
   视图二：体验页
   ============================================================ */
.view-experience {
  background: #0a0a0a;
}

/* ---------- 顶部状态区 ---------- */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 30;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.85), transparent);
  pointer-events: none;
}

.topbar-title {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: rgba(242, 239, 233, 0.55);
  font-weight: 300;
}

.topbar-page {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(242, 239, 233, 0.35);
  font-variant-numeric: tabular-nums;
}

.topbar-pause-btn {
  margin-left: 10px;
  padding: 4px 10px;
  background: rgba(242, 239, 233, 0.08);
  border: 1px solid rgba(242, 239, 233, 0.15);
  border-radius: 4px;
  color: rgba(242, 239, 233, 0.5);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.topbar-pause-btn:active {
  background: rgba(242, 239, 233, 0.15);
  color: rgba(242, 239, 233, 0.75);
}

/* ---------- 翻页层 ---------- */
.page-stack {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(100%);
  transition: transform 360ms cubic-bezier(0.32, 0.72, 0.2, 1),
              opacity 360ms ease;
  will-change: transform, opacity;
  pointer-events: none;
}

.page.is-current {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.page.is-prev {
  opacity: 0;
  transform: translateX(-100%);
}

/* 滑动中的即时跟随（无过渡） */
.page.is-dragging {
  transition: none;
}

/* ---------- 主内容区 ---------- */
.page-main {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 漫画页：整屏视觉 + 叠加文字 */
.page-comic .page-main {
  background: #000;
}

.page-comic .page-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}

.page-comic .page-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 80px 24px 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.55) 60%, transparent 100%);
  z-index: 2;
}

.page-comic .page-title {
  font-size: 18px;
  font-weight: 400;
  color: #f2efe9;
  margin-bottom: 10px;
  letter-spacing: 0.06em;
}

.page-comic .page-narration {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(242, 239, 233, 0.78);
}

/* 漫画页对白 */
.page-dialogues {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-dialogue {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(242, 239, 233, 0.92);
}

.page-dialogue-speaker {
  color: rgba(242, 239, 233, 0.45);
  font-size: 12px;
  margin-right: 6px;
}

/* 插图页：图片 + 叙事 */
.page-illustration .page-main {
  padding: 72px 0 0;
  display: flex;
  flex-direction: column;
}

.page-illustration .page-image-wrap {
  width: 100%;
  height: 52%;
  flex-shrink: 0;
  background: #111;
  position: relative;
  overflow: hidden;
}

.page-illustration .page-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-illustration .page-text-block {
  flex: 1;
  padding: 24px 28px 0;
  overflow: hidden;
}

.page-illustration .page-title {
  font-size: 16px;
  font-weight: 400;
  color: #f2efe9;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.page-illustration .page-narration {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(242, 239, 233, 0.72);
}

/* 文字页：沉浸式排版，大留白 */
.page-text .page-main {
  padding: 96px 32px 0;
  justify-content: center;
}

.page-text .page-title {
  font-size: 15px;
  font-weight: 400;
  color: rgba(242, 239, 233, 0.6);
  letter-spacing: 0.18em;
  margin-bottom: 28px;
}

.page-text .page-narration {
  font-size: 16px;
  line-height: 2;
  color: rgba(242, 239, 233, 0.88);
  letter-spacing: 0.04em;
  font-weight: 300;
}

/* ---------- 手机消息（短信/微信气泡） ---------- */
.page-messages {
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-text .page-messages {
  margin-top: 28px;
}

.message-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
}

.message-bubble.message-other {
  align-self: flex-start;
  background: rgba(242, 239, 233, 0.1);
  color: rgba(242, 239, 233, 0.92);
  border-bottom-left-radius: 4px;
}

.message-bubble.message-self {
  align-self: flex-end;
  background: #d4b796;
  color: #1a1208;
  border-bottom-right-radius: 4px;
}

.message-meta {
  display: block;
  font-size: 10px;
  color: rgba(242, 239, 233, 0.4);
  margin-bottom: 4px;
  letter-spacing: 0.1em;
}

.message-self .message-meta {
  color: rgba(26, 18, 8, 0.5);
  text-align: right;
}

/* ---------- 底部叙事区 ---------- */
.page-bottom {
  flex-shrink: 0;
  padding: 16px 24px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.page-bottom-narration {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(242, 239, 233, 0.55);
  font-style: italic;
  margin-bottom: 12px;
}

/* ---------- 底部交互区 ---------- */
.page-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 4px;
}

.action-btn {
  display: block;
  width: 100%;
  padding: 13px 18px;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  color: rgba(242, 239, 233, 0.92);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: background 180ms ease, transform 120ms ease, border-color 180ms ease;
}

.action-btn::before {
  content: "›";
  display: inline-block;
  margin-right: 10px;
  color: rgba(242, 239, 233, 0.35);
  font-size: 16px;
  transition: transform 200ms ease, color 200ms ease;
}

.action-btn:active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0.985);
  border-color: rgba(255, 255, 255, 0.16);
}

.action-btn:active::before {
  color: #d4b796;
  transform: translateX(3px);
}

.action-btn-silence {
  color: rgba(242, 239, 233, 0.55);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.04);
  font-style: italic;
}

.action-btn-silence::before {
  content: "—";
  color: rgba(242, 239, 233, 0.3);
}

/* 自由输入框 */
.action-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  transition: border-color 200ms ease;
}

.action-input-wrap:focus-within {
  border-color: rgba(212, 183, 150, 0.5);
}

.action-input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  font-size: 14px;
  color: #f2efe9;
  background: transparent;
  border: none;
  outline: none;
}

.action-input::placeholder {
  color: rgba(242, 239, 233, 0.35);
  font-style: italic;
}

.action-input-send {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #d4b796;
  color: #1a1208;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 180ms ease, transform 120ms ease;
}

.action-input-send:active {
  transform: scale(0.92);
  opacity: 0.85;
}

.action-input-send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* 结束人生入口：藏在最底部，弱化处理 */
.end-life-entry {
  margin-top: 6px;
  padding: 8px 4px 4px;
  text-align: center;
}

.end-life-btn {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(242, 239, 233, 0.3);
  padding: 6px 14px;
  transition: color 180ms ease;
}

.end-life-btn:active {
  color: rgba(242, 239, 233, 0.55);
}

/* ---------- 左右翻页热区 ---------- */
.tap-zone {
  position: absolute;
  top: 56px;
  bottom: 0;
  width: 22%;
  z-index: 5;
}

.tap-zone-left {
  left: 0;
}

.tap-zone-right {
  right: 0;
}

/* 当底部有可交互元素时，热区让出底部空间 */
.page-stack:has(.page.is-current .page-bottom) .tap-zone {
  bottom: 200px;
}

/* ---------- 等待层 ---------- */
.waiting-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade-in 320ms ease;
}

.waiting-inner {
  text-align: center;
  padding: 0 32px;
}

.waiting-dot {
  width: 6px;
  height: 6px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: rgba(242, 239, 233, 0.7);
  animation: breathing 2.2s ease-in-out infinite;
}

.waiting-text {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(242, 239, 233, 0.62);
  letter-spacing: 0.08em;
  font-weight: 300;
  animation: text-breath 2.2s ease-in-out infinite;
}

@keyframes breathing {
  0%, 100% { transform: scale(0.6); opacity: 0.4; }
  50% { transform: scale(1.4); opacity: 1; }
}

@keyframes text-breath {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.85; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 结束确认模态框 ---------- */
.modal {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  animation: fade-in 240ms ease;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 320px;
  padding: 28px 24px 20px;
  background: #181614;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  text-align: center;
  animation: modal-rise 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes modal-rise {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-title {
  font-size: 17px;
  font-weight: 400;
  color: #f2efe9;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}

.modal-message {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(242, 239, 233, 0.65);
  margin-bottom: 22px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-btn {
  padding: 12px 20px;
  font-size: 14px;
  border-radius: 999px;
  letter-spacing: 0.1em;
  transition: transform 160ms ease, opacity 160ms ease;
}

.modal-btn:active {
  transform: scale(0.97);
}

.modal-btn-secondary {
  color: rgba(242, 239, 233, 0.7);
  background: rgba(255, 255, 255, 0.05);
}

.modal-btn-primary {
  color: #1a1208;
  background: #d4b796;
}

/* ---------- 错误提示 ---------- */
.error-toast {
  position: absolute;
  bottom: 24px;
  left: 16px;
  right: 16px;
  z-index: 80;
  padding: 12px 16px;
  background: rgba(60, 30, 30, 0.92);
  border: 1px solid rgba(220, 100, 100, 0.3);
  border-radius: 12px;
  font-size: 13px;
  color: rgba(255, 220, 220, 0.92);
  text-align: center;
  animation: error-in 280ms ease;
}

@keyframes error-in {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   视图三：人生书
   ============================================================ */
.view-book {
  background: #16110c;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.book-container {
  width: 100%;
  min-height: 100%;
  padding: 0 0 64px;
}

/* 封面 */
.book-cover {
  position: relative;
  width: 100%;
  height: 100vh;
  max-height: 932px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px 32px;
  background:
    radial-gradient(circle at 50% 35%, rgba(212, 183, 150, 0.18), transparent 60%),
    linear-gradient(to bottom, #1a1208 0%, #0e0a06 100%);
  overflow: hidden;
}

.book-cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  z-index: 0;
}

.book-cover-inner {
  position: relative;
  z-index: 2;
}

.book-cover-tag {
  font-size: 11px;
  letter-spacing: 0.4em;
  color: rgba(212, 183, 150, 0.7);
  margin-bottom: 18px;
}

.book-cover-title {
  font-size: 30px;
  font-weight: 300;
  color: #f2efe9;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  line-height: 1.4;
}

.book-cover-subtitle {
  font-size: 14px;
  color: rgba(242, 239, 233, 0.55);
  font-weight: 300;
  margin-bottom: 28px;
  line-height: 1.7;
}

.book-cover-meta {
  font-size: 12px;
  color: rgba(242, 239, 233, 0.4);
  letter-spacing: 0.1em;
  padding-top: 16px;
  border-top: 1px solid rgba(242, 239, 233, 0.1);
}

/* 章节 */
.book-chapter {
  padding: 36px 28px 16px;
  border-bottom: 1px solid rgba(242, 239, 233, 0.06);
}

.book-chapter-title {
  font-size: 13px;
  letter-spacing: 0.25em;
  color: rgba(212, 183, 150, 0.75);
  margin-bottom: 4px;
}

.book-chapter-range {
  font-size: 11px;
  color: rgba(242, 239, 233, 0.35);
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.book-chapter-summary {
  font-size: 14px;
  line-height: 1.85;
  color: rgba(242, 239, 233, 0.78);
  margin-bottom: 16px;
}

.book-chapter-moments {
  padding-left: 16px;
  border-left: 1px solid rgba(212, 183, 150, 0.25);
}

.book-chapter-moment {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(242, 239, 233, 0.6);
  font-style: italic;
}

.book-chapter-moment + .book-chapter-moment {
  margin-top: 8px;
}

/* 关键选择 */
.book-choices {
  padding: 36px 28px 16px;
  border-bottom: 1px solid rgba(242, 239, 233, 0.06);
}

.book-section-title {
  font-size: 13px;
  letter-spacing: 0.25em;
  color: rgba(212, 183, 150, 0.75);
  margin-bottom: 20px;
}

.book-choice {
  padding: 16px 0;
  border-top: 1px solid rgba(242, 239, 233, 0.06);
}

.book-choice-scene {
  font-size: 12px;
  color: rgba(242, 239, 233, 0.45);
  margin-bottom: 6px;
}

.book-choice-text {
  font-size: 14px;
  color: rgba(242, 239, 233, 0.85);
  line-height: 1.6;
  margin-bottom: 8px;
}

.book-choice-consequence {
  font-size: 13px;
  color: rgba(242, 239, 233, 0.55);
  font-style: italic;
  line-height: 1.6;
}

/* 中立评语 */
.book-commentary {
  padding: 40px 32px;
  border-bottom: 1px solid rgba(242, 239, 233, 0.06);
}

.book-commentary-text {
  font-size: 15px;
  line-height: 2;
  color: rgba(242, 239, 233, 0.78);
  letter-spacing: 0.03em;
  font-weight: 300;
}

/* 尾声反问 */
.book-ending {
  padding: 48px 32px 32px;
  text-align: center;
}

.book-ending-question {
  font-size: 18px;
  line-height: 1.9;
  color: rgba(242, 239, 233, 0.9);
  letter-spacing: 0.06em;
  font-weight: 300;
  margin-bottom: 32px;
}

.book-restart-btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: #1a1208;
  background: #d4b796;
  border-radius: 999px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.book-restart-btn:active {
  transform: scale(0.97);
  opacity: 0.85;
}

/* 人生书生成中状态 */
.book-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  text-align: center;
}

.book-loading-dot {
  width: 6px;
  height: 6px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: rgba(212, 183, 150, 0.8);
  animation: breathing 2.2s ease-in-out infinite;
}

.book-loading-text {
  font-size: 14px;
  line-height: 1.9;
  color: rgba(242, 239, 233, 0.6);
  letter-spacing: 0.08em;
  animation: text-breath 2.2s ease-in-out infinite;
}

/* 响应式：在更大屏幕上保持手机比例 */
@media (max-height: 700px) {
  .page-text .page-main { padding: 80px 28px 0; }
  .page-illustration .page-text-block { padding: 18px 24px 0; }
  .topbar { height: 48px; }
}


/* 图片加载骨架屏 */
.page-image-skeleton {
  background: linear-gradient(135deg, #1a1612 0%, #0a0806 100%);
  animation: imageBreath 2.4s ease-in-out infinite;
}
@keyframes imageBreath {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.85; }
}
.page-image-pending {
  opacity: 0;
}
.page-image-ready {
  opacity: 1;
  transition: opacity 600ms ease;
}


/* ============================================================
   视图三：书架
   ============================================================ */
.view-bookshelf {
  background: #0a0806;
  padding: 20px 16px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bookshelf-header {
  padding: 32px 0 24px;
  text-align: center;
}

.bookshelf-title {
  font-size: 22px;
  font-weight: 300;
  color: #f2efe9;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.bookshelf-subtitle {
  font-size: 13px;
  color: rgba(242, 239, 233, 0.4);
  letter-spacing: 0.04em;
}

.bookshelf-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 60px;
  justify-content: center;
}

.book-spine {
  width: 120px;
  height: 180px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.book-spine:active {
  transform: scale(0.96);
}

.book-spine-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.book-spine-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.3) 100%);
}

.book-spine-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 10px;
}

.book-spine-title {
  font-size: 13px;
  font-weight: 400;
  color: #f2efe9;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-spine-meta {
  font-size: 10px;
  color: rgba(242, 239, 233, 0.45);
  margin-top: 4px;
}

.book-spine-status {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.book-spine-status.completed {
  background: rgba(190, 160, 120, 0.15);
  color: #bea078;
}
.book-spine-status.active {
  background: rgba(100, 180, 140, 0.15);
  color: #64b48c;
}

.bookshelf-empty {
  text-align: center;
  padding: 80px 20px;
}

.bookshelf-empty p {
  font-size: 14px;
  color: rgba(242, 239, 233, 0.4);
  margin-bottom: 24px;
}

/* ============================================================
   视图四：翻页书阅读器
   ============================================================ */
.view-book-reader {
  background: #0a0806;
}

.reader-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(10, 8, 6, 0.7);
}

.reader-back-btn {
  background: none;
  border: none;
  color: rgba(242, 239, 233, 0.6);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
}

.reader-back-btn:active {
  color: rgba(242, 239, 233, 0.9);
}

.reader-page-num {
  font-size: 12px;
  color: rgba(242, 239, 233, 0.35);
  font-variant-numeric: tabular-nums;
}

.reader-stack {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.reader-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 56px 24px 24px;
  opacity: 0;
  transform: translateX(100%);
  transition: transform 380ms cubic-bezier(0.32, 0.72, 0.2, 1),
              opacity 380ms ease;
  pointer-events: none;
}

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

.reader-page.is-prev {
  opacity: 0;
  transform: translateX(-100%);
}

.reader-page.is-dragging {
  transition: none;
}

/* 封面页 */
.reader-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
}

.reader-cover-image {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.reader-cover-tag {
  font-size: 11px;
  color: rgba(242, 239, 233, 0.35);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.reader-cover-title {
  font-size: 22px;
  font-weight: 300;
  color: #f2efe9;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.reader-cover-subtitle {
  font-size: 13px;
  color: rgba(242, 239, 233, 0.45);
  margin-bottom: 24px;
}

.reader-cover-meta {
  font-size: 11px;
  color: rgba(242, 239, 233, 0.3);
}

/* 内容页 */
.reader-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding-top: 12px;
}

.reader-page-scene {
  font-size: 11px;
  color: rgba(242, 239, 233, 0.3);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

.reader-page-title {
  font-size: 18px;
  font-weight: 400;
  color: #f2efe9;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.reader-page-narration {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(242, 239, 233, 0.75);
  margin-bottom: 20px;
}

.reader-page-dialogue {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.7;
}

.reader-page-dialogue-speaker {
  color: rgba(242, 239, 233, 0.4);
  margin-right: 8px;
  font-size: 12px;
}

.reader-page-dialogue-text {
  color: rgba(242, 239, 233, 0.85);
}

.reader-page-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  max-height: 240px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* 章节页 */
.reader-chapter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
}

.reader-chapter-label-top {
  font-size: 11px;
  color: rgba(242, 239, 233, 0.3);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.reader-chapter-title {
  font-size: 20px;
  font-weight: 300;
  color: #f2efe9;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.reader-chapter-summary {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(242, 239, 233, 0.55);
  max-width: 280px;
}

/* 尾声页 */
.reader-ending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 60px;
}

.reader-ending-label {
  font-size: 11px;
  color: rgba(242, 239, 233, 0.3);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.reader-ending-text {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(242, 239, 233, 0.65);
  margin-bottom: 32px;
}

.reader-ending-reflection {
  font-size: 16px;
  font-style: italic;
  color: rgba(242, 239, 233, 0.8);
  margin-bottom: 40px;
  text-align: center;
}

.reader-restart-btn {
  background: rgba(242, 239, 233, 0.1);
  border: 1px solid rgba(242, 239, 233, 0.2);
  color: #f2efe9;
  font-size: 14px;
  font-family: inherit;
  padding: 10px 28px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 200ms ease;
}

.reader-restart-btn:active {
  background: rgba(242, 239, 233, 0.2);
}

/* 翻页热区 */
.reader-tap-zone {
  position: absolute;
  top: 56px;
  bottom: 56px;
  width: 30%;
  z-index: 5;
}

.reader-tap-left { left: 0; }
.reader-tap-right { right: 0; }

.reader-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(10, 8, 6, 0.7);
}

.reader-chapter-label {
  font-size: 12px;
  color: rgba(242, 239, 233, 0.35);
  letter-spacing: 0.04em;
}

.start-shelf-btn {
  display: block;
  margin: 12px auto 0;
  background: none;
  border: none;
  color: rgba(242, 239, 233, 0.35);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 0;
  transition: color 200ms ease;
}
.start-shelf-btn:active {
  color: rgba(242, 239, 233, 0.7);
}

.book-spine-add {
  border: 1px dashed rgba(242, 239, 233, 0.15);
  background: rgba(242, 239, 233, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}
.book-spine-add:active {
  background: rgba(242, 239, 233, 0.06);
  border-color: rgba(242, 239, 233, 0.25);
}
.book-spine-add-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.book-spine-add-plus {
  font-size: 36px;
  font-weight: 300;
  color: rgba(242, 239, 233, 0.3);
  line-height: 1;
}
.book-spine-add-label {
  font-size: 12px;
  color: rgba(242, 239, 233, 0.3);
  letter-spacing: 1px;
}
