/* ============ 全局（甜美恋爱风） ============ */
@font-face {
  font-family: 'LXGWWenKai';
  src: url('../assets/fonts/LXGWWenKai-Regular.ttf') format('truetype');
  font-weight: normal;
  font-display: swap;
}

:root {
  --accent: #ff85ae;            /* 少女粉 */
  --accent-deep: #f0518f;       /* 玫瑰粉 */
  --accent-soft: #ffcfe0;       /* 浅粉 */
  --accent-ghost: #ffecf4;      /* 粉白 */
  --ink: #5c4452;               /* 深梅子色（正文） */
  --ink-soft: rgba(92, 68, 82, 0.78);
  --ink-faint: rgba(92, 68, 82, 0.66);
  --panel: rgba(255, 247, 251, 0.5);
  --panel-border: rgba(244, 143, 177, 0.4);
  --font-body: 'YouYuan', '幼圆', 'LXGWWenKai', 'Kaiti SC', 'KaiTi', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-title: 'YouYuan', '幼圆', 'LXGWWenKai', 'Kaiti SC', 'KaiTi', 'STKaiti', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: #fdeef5 url('../imgs/背景.jpg') center / cover fixed no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
  user-select: none;
}

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

.hidden { display: none !important; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: rgba(255, 207, 224, 0.25); }
::-webkit-scrollbar-thumb { background: rgba(240, 81, 143, 0.45); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(240, 81, 143, 0.65); }

/* ============ 舞台 ============ */
#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #ffeef5;
}

#bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: opacity 0.7s ease;
  filter: saturate(1.06) brightness(1.0);
}

#bgDim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255, 214, 231, 0.20) 0%, rgba(255, 226, 238, 0.06) 32%, rgba(255, 236, 244, 0.22) 58%, rgba(255, 242, 248, 0.78) 100%),
    radial-gradient(120% 60% at 50% 112%, rgba(255, 190, 214, 0.25) 0%, rgba(255, 226, 238, 0) 60%);
  pointer-events: none;
}

/* ============ 多角色立绘 ============ */
#portraits {
  position: absolute;
  right: clamp(8px, 3vw, 70px);
  bottom: clamp(112px, 17vh, 170px);
  display: flex;
  align-items: flex-end;
  gap: clamp(8px, 1.2vw, 22px);
  pointer-events: none;
}

.pfig {
  height: clamp(300px, 60vh, 74vh);
  opacity: 0.82;
  filter: saturate(0.88) brightness(0.94);
  transition: opacity 0.25s, filter 0.25s;
  animation: fadeIn 0.4s ease;
}

/* 说话者：提亮放大 + 重复微微跳动 */
.pfig.speaking {
  opacity: 1;
  filter: none;
  animation: fadeIn 0.4s ease, speakBob 1.6s ease-in-out infinite;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes speakBob {
  0%, 100% { transform: translateY(0) scale(1.07); }
  50%      { transform: translateY(-9px) scale(1.07); }
}

.pfig img {
  height: 100%;
  max-width: min(30vw, 310px);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(240, 81, 143, 0.30))
          drop-shadow(0 3px 8px rgba(120, 60, 90, 0.22));
}

/* 相框照片模式（无透明通道时） */
.pfig.photo img {
  background: linear-gradient(180deg, #fffdfd 0%, #fff5f9 100%);
  border: 3px solid #ffffff;
  outline: 1px solid var(--accent-soft);
  padding: 12px 12px 30px;
  border-radius: 16px;
  transform: rotate(1.6deg);
  box-shadow: 0 16px 36px rgba(240, 81, 143, 0.28), 0 4px 12px rgba(120, 60, 90, 0.20);
}

/* 抠图立绘模式（png 含透明通道时） */
.pfig.cutout img {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  transform: rotate(0deg);
  filter: drop-shadow(0 12px 28px rgba(240, 81, 143, 0.28))
          drop-shadow(0 3px 8px rgba(120, 60, 90, 0.22));
}

/* ============ 日期印章 ============ */
#dateStamp {
  position: absolute;
  top: 64px;
  left: 22px;
  background: rgba(255, 240, 246, 0.88);
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  padding: 5px 18px;
  font-size: 14px;
  letter-spacing: 3px;
  color: #c2446f;
  box-shadow: 0 4px 14px rgba(240, 81, 143, 0.18);
  backdrop-filter: blur(6px);
}

/* ============ 顶栏 ============ */
#topBar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: linear-gradient(to bottom, rgba(255, 236, 244, 0.85), rgba(255, 236, 244, 0));
  z-index: 40;
}

#topTitle {
  font-family: var(--font-title);
  color: var(--accent-deep);
  font-size: 20px;
  letter-spacing: 4px;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.9);
}

#topChapter {
  font-size: 13px;
  color: #8f3b60;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.8);
}

#topBtns { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.tbtn {
  padding: 5px 11px;
  font-size: 13px;
  border-radius: 999px;
  color: #8f3b60;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--accent-soft);
  box-shadow: 0 2px 8px rgba(240, 81, 143, 0.12);
  transition: background 0.2s, transform 0.1s, border-color 0.2s;
}
.tbtn:hover { background: #fff3f8; border-color: var(--accent); }
.tbtn:active { transform: scale(0.94); }
.tbtn.on { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; border-color: transparent; }

/* ============ 对话窗 ============ */
#dialog {
  position: absolute;
  left: 50%;
  bottom: clamp(14px, 3vh, 34px);
  transform: translateX(-50%);
  width: min(1040px, 95vw);
  min-height: 168px;
  padding: 26px 34px 38px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 12px 44px rgba(240, 81, 143, 0.22);
  z-index: 30;
}

#nameTag {
  position: absolute;
  top: -18px;
  left: 24px;
  padding: 4px 22px;
  border-radius: 999px;
  font-size: 17px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 5px 16px rgba(240, 81, 143, 0.4);
}

#nameTag.narr { background: linear-gradient(135deg, #b9a3ad, #9d8496); }

#text {
  font-size: clamp(15.5px, 2vw, 19.5px);
  line-height: 1.95;
  letter-spacing: 0.8px;
  min-height: 4.2em;
  color: var(--ink);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

#text .narrate { color: var(--ink-soft); font-style: italic; }

#advanceHint {
  position: absolute;
  right: 26px;
  bottom: 14px;
  color: var(--accent-deep);
  font-size: 15px;
  animation: bob 1s infinite;
}

@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ============ 选项 ============ */
#choiceBox {
  position: absolute;
  left: 50%;
  bottom: 36%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: min(560px, 88vw);
  z-index: 35;
}

.choice {
  padding: 14px 24px;
  border-radius: 999px;
  background: rgba(255, 250, 252, 0.9);
  border: 1.5px solid var(--accent-soft);
  font-size: clamp(15px, 1.8vw, 17.5px);
  color: var(--ink);
  letter-spacing: 1px;
  box-shadow: 0 6px 22px rgba(240, 81, 143, 0.18);
  transition: transform 0.12s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
  text-align: center;
}
.choice:hover {
  border-color: var(--accent);
  background: #fff0f6;
  transform: scale(1.02);
  box-shadow: 0 8px 26px rgba(240, 81, 143, 0.3);
}
.choice:active { transform: scale(0.98); }

/* ============ CG相片层 ============ */
#cgLayer {
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, #4a2537 0%, #2e1623 100%);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
}

#cgImg {
  max-width: 88vw;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 12px;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 60px rgba(240, 81, 143, 0.45);
  animation: cgIn 0.5s ease;
}

@keyframes cgIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

#cgCaption {
  max-width: 78vw;
  text-align: center;
  font-size: clamp(14px, 1.8vw, 18px);
  color: #ffe9f2;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(240, 81, 143, 0.6);
}

#cgClose { font-size: 12px; color: rgba(255, 233, 242, 0.6); letter-spacing: 2px; }

/* ============ 章节标题卡 ============ */
#titleCard {
  position: absolute;
  inset: 0;
  background: radial-gradient(85% 85% at 50% 42%, rgba(255, 226, 238, 0.94), rgba(255, 240, 247, 0.98));
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

#tcNum { color: var(--accent-deep); font-size: 16px; letter-spacing: 8px; }
#tcTitle {
  font-family: var(--font-title);
  font-size: clamp(38px, 7vw, 64px);
  letter-spacing: 12px;
  font-weight: 700;
  background: linear-gradient(120deg, #ff8fb2, #f0518f, #c86dd7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 18px rgba(240, 81, 143, 0.35));
}
#tcSub { color: #8a5f73; font-size: 15px; letter-spacing: 4px; margin-top: 8px; }
#tcHint { position: absolute; bottom: 8vh; color: #c2446f; font-size: 13px; letter-spacing: 3px; animation: bob 1.2s infinite; }

/* ============ 弹窗 ============ */
#modalMask {
  position: fixed;
  inset: 0;
  background: rgba(94, 52, 72, 0.45);
  backdrop-filter: blur(5px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#modalBox {
  width: min(640px, 94vw);
  max-height: 82vh;
  overflow-y: auto;
  background: rgba(255, 250, 252, 0.98);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 20px 70px rgba(240, 81, 143, 0.35);
}

#modalBox h3 { color: var(--accent-deep); font-size: 18px; letter-spacing: 3px; margin-bottom: 16px; }

.slot {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 16px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: rgba(255, 236, 244, 0.55);
  border: 1px solid rgba(244, 143, 177, 0.3);
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}
.slot:hover { border-color: var(--accent); background: #fff0f6; }
.slot .slotLabel { color: var(--accent-deep); font-size: 15px; flex: 0 0 46px; font-weight: 700; }
.slot .slotMeta { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .slotMeta small { display: block; color: var(--ink-faint); font-size: 11px; margin-top: 2px; }
.slot .slotDel { margin-left: auto; color: rgba(143, 59, 96, 0.8); padding: 6px 10px; }
.slot .slotDel:hover { color: #e35d8c; }

.modalRow { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px dashed rgba(244, 143, 177, 0.35); }
.modalRow:last-child { border-bottom: none; }
.modalRow label { flex: 0 0 90px; font-size: 15px; color: var(--ink); }
.modalRow input[type=range] { flex: 1; accent-color: var(--accent-deep); }
.modalRow .val { flex: 0 0 64px; text-align: right; font-size: 13px; color: var(--accent-deep); }

#modalClose {
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffc9dd, #ffa9c8);
  border: 1px solid rgba(240, 81, 143, 0.4);
  color: #8f3b60;
  letter-spacing: 4px;
  font-size: 15px;
  font-weight: 700;
}
#modalClose:hover { background: linear-gradient(135deg, #ffa9c8, #ff8fb2); color: #fff; }

/* ============ 历史回顾 ============ */
#backlogList { max-height: 56vh; overflow-y: auto; padding-right: 6px; }
.bkRow { margin-bottom: 14px; padding: 8px 12px; border-left: 3px solid var(--accent-deep); background: rgba(255, 236, 244, 0.5); border-radius: 0 12px 12px 0; }
.bkRow .bkName { color: var(--accent-deep); font-size: 14px; margin-bottom: 3px; letter-spacing: 1px; font-weight: 700; }
.bkRow .bkName.narr { color: var(--ink-faint); }
.bkRow .bkText { font-size: 15px; line-height: 1.75; color: var(--ink); }

/* ============ 提示 ============ */
#toast {
  position: fixed;
  left: 50%;
  bottom: 12vh;
  transform: translateX(-50%);
  background: rgba(255, 247, 251, 0.95);
  border: 1px solid var(--accent-soft);
  color: #8f3b60;
  padding: 9px 24px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 2px;
  box-shadow: 0 8px 26px rgba(240, 81, 143, 0.25);
  z-index: 400;
  animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ============ 全屏界面 ============ */
#titleScreen, #chapterScreen, #galleryScreen, #endingScreen {
  position: fixed;
  inset: 0;
  z-index: 100;
}

#tsBgWrap { position: absolute; inset: 0; }
#tsBg { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.04) saturate(1.05); }
#tsShade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(255, 236, 244, 0.92) 0%, rgba(255, 226, 238, 0.30) 46%, rgba(255, 244, 249, 0.62) 100%);
}

/* 漂浮的甜心 */
#tsHearts { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
#tsHearts span {
  position: absolute;
  bottom: -40px;
  font-size: 22px;
  color: rgba(240, 81, 143, 0.55);
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.9);
  animation: heartFloat linear infinite;
}
#tsHearts .h1 { left: 8%;  font-size: 26px; animation-duration: 9s;  animation-delay: 0s; }
#tsHearts .h2 { left: 24%; font-size: 18px; animation-duration: 11s; animation-delay: 2.2s; }
#tsHearts .h3 { left: 46%; font-size: 22px; animation-duration: 10s; animation-delay: 4s; }
#tsHearts .h4 { left: 66%; font-size: 17px; animation-duration: 12s; animation-delay: 1.2s; }
#tsHearts .h5 { left: 82%; font-size: 24px; animation-duration: 9.5s; animation-delay: 3.1s; }
#tsHearts .h6 { left: 93%; font-size: 19px; animation-duration: 10.8s; animation-delay: 5s; }

@keyframes heartFloat {
  0%   { transform: translateY(0) rotate(-8deg); opacity: 0; }
  10%  { opacity: 0.9; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-105vh) rotate(10deg); opacity: 0; }
}

#tsContent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 3;
}

#tsTitle {
  font-family: var(--font-title);
  font-size: clamp(52px, 10vw, 108px);
  letter-spacing: 18px;
  text-indent: 18px;
  font-weight: 700;
  background: linear-gradient(120deg, #ff8fb2 0%, #f0518f 45%, #c86dd7 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 22px rgba(240, 81, 143, 0.45)) drop-shadow(0 2px 6px rgba(255, 255, 255, 0.6));
  animation: titleShimmer 7s ease-in-out infinite alternate;
}

@keyframes titleShimmer {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

#tsSub { font-size: clamp(15px, 2.4vw, 20px); letter-spacing: 8px; text-indent: 8px; color: #8a5f73; text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8); }

#tsMenu {
  margin-top: clamp(22px, 5vh, 48px);
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: min(320px, 84vw);
}

.tsbtn {
  padding: 13px 10px;
  border-radius: 999px;
  font-size: clamp(16px, 2.2vw, 19px);
  letter-spacing: 8px;
  text-indent: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px solid var(--accent-soft);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 22px rgba(240, 81, 143, 0.16);
  transition: transform 0.12s, background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.tsbtn:hover {
  background: linear-gradient(135deg, #ffaecb, #ff85ae);
  border-color: transparent;
  color: #fff;
  transform: scale(1.04);
  box-shadow: 0 10px 30px rgba(240, 81, 143, 0.4);
}
.tsbtn:active { transform: scale(0.97); }

#tsTips { margin-top: 26px; font-size: 12px; color: #8a5f73; letter-spacing: 3px; }

/* 章节/画廊/结局通用屏幕（粉白毛玻璃） */
#chapterScreen, #galleryScreen, #endingScreen {
  background: rgba(253, 238, 245, 0.9);
  backdrop-filter: blur(22px) saturate(1.15);
  overflow-y: auto;
  padding-bottom: 40px;
}

.screenHead {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(255, 250, 252, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(244, 143, 177, 0.35);
  z-index: 5;
}

.screenTitle { font-family: var(--font-title); font-size: 26px; letter-spacing: 8px; background: linear-gradient(120deg, #ff8fb2, #f0518f); -webkit-background-clip: text; background-clip: text; color: transparent; }

.sbtn {
  margin-left: auto;
  padding: 7px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--accent-soft);
  color: #8f3b60;
  font-size: 14px;
  letter-spacing: 2px;
  background: rgba(255, 255, 255, 0.75);
  transition: all 0.2s;
}
.sbtn:hover { background: linear-gradient(135deg, #ffaecb, #ff85ae); color: #fff; border-color: transparent; }

#chapterList, #galleryBody, #endingBody { max-width: 980px; margin: 0 auto; padding: 26px 20px; }

.chCard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(244, 143, 177, 0.3);
  box-shadow: 0 6px 20px rgba(240, 81, 143, 0.10);
  transition: border-color 0.2s, transform 0.12s, background 0.2s, box-shadow 0.2s;
}
.chCard:hover:not(.locked) { border-color: var(--accent); transform: translateY(-2px); background: #fff6fa; box-shadow: 0 10px 28px rgba(240, 81, 143, 0.2); }
.chCard.locked { opacity: 0.5; cursor: not-allowed; }
.chCard .chNum { color: var(--accent-deep); font-size: 13px; letter-spacing: 4px; font-weight: 700; }
.chCard .chTitle { font-family: var(--font-title); font-size: 23px; letter-spacing: 3px; color: var(--ink); }
.chCard .chSub { font-size: 13.5px; color: var(--ink-soft); letter-spacing: 1px; }
.chCard .chMeta { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.chCard .done { color: #4fae6b; }

/* 画廊 */
#galTabs { display: flex; gap: 8px; margin-left: 18px; }
.gtab {
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  letter-spacing: 2px;
  color: #8f3b60;
  border: 1px solid var(--accent-soft);
  background: rgba(255, 255, 255, 0.7);
}
.gtab.active { background: linear-gradient(135deg, #ff85ae, #f0518f); color: #fff; border-color: transparent; font-weight: 700; }

#galTabs + .sbtn { margin-left: auto; }

.galGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.galCard {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(244, 143, 177, 0.3);
  aspect-ratio: 4 / 3;
  position: relative;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(240, 81, 143, 0.12);
}
.galCard img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.galCard:hover img { transform: scale(1.06); }
.galCard .galName {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(to top, rgba(200, 60, 120, 0.9), rgba(240, 81, 143, 0));
  letter-spacing: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.galCard.locked { filter: blur(4px) brightness(0.75) saturate(0.6); cursor: not-allowed; }
.galCard.locked .galName { filter: blur(0); background: linear-gradient(to top, rgba(110, 90, 100, 0.9), rgba(110, 90, 100, 0)); }

.galMusic {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(244, 143, 177, 0.3);
}
.galMusic .mName { font-size: 16px; letter-spacing: 1px; color: var(--ink); }
.galMusic .mHint { font-size: 12px; color: var(--ink-faint); margin-top: 3px; }
.galMusic .mPlay {
  margin-left: auto;
  padding: 8px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffaecb, #ff85ae);
  border: none;
  color: #fff;
  font-size: 14px;
  letter-spacing: 2px;
  box-shadow: 0 4px 14px rgba(240, 81, 143, 0.3);
}
.galMusic .mPlay:hover { background: linear-gradient(135deg, #ff85ae, #f0518f); }
.galMusic .mPlay:disabled { background: rgba(222, 208, 214, 0.6); color: rgba(92, 68, 82, 0.62); box-shadow: none; }

/* 结局 */
.endCard {
  padding: 26px 30px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(244, 143, 177, 0.3);
  box-shadow: 0 6px 20px rgba(240, 81, 143, 0.10);
}
.endCard .eTitle { font-family: var(--font-title); font-size: 28px; letter-spacing: 5px; margin-bottom: 10px; background: linear-gradient(120deg, #ff8fb2, #f0518f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.endCard .eText { font-size: 15.5px; line-height: 1.9; color: var(--ink); }
.endCard.locked { opacity: 0.5; }
.endCard.locked .eTitle { -webkit-text-fill-color: rgba(92, 68, 82, 0.68); background: none; }
.endCard .eTag { display: inline-block; margin-bottom: 12px; padding: 3px 14px; border-radius: 999px; font-size: 12px; letter-spacing: 2px; background: linear-gradient(135deg, #ffc9dd, #ffa9c8); color: #8f3b60; font-weight: 700; }
.endCard.locked .eTag { background: rgba(200, 185, 192, 0.4); color: rgba(92, 68, 82, 0.7); }

/* ============ 响应式 ============ */
@media (max-width: 760px) {
  #topTitle { font-size: 16px; letter-spacing: 2px; }
  #topChapter { display: none; }
  .tbtn { padding: 4px 9px; font-size: 12px; }
  #dialog { min-height: 130px; padding: 20px 18px 30px; border-radius: 16px; }
  #nameTag { font-size: 15px; }
  #portraits { right: 4px; bottom: clamp(120px, 17vh, 160px); }
  .pfig { height: clamp(300px, 52vh, 60vh); }
  .pfig:not(.speaking) { display: none; }  /* 手机只显示当前说话者 */
  #choiceBox { bottom: 30%; }
  #dateStamp { top: 54px; left: 12px; font-size: 12px; letter-spacing: 2px; }
  #tsSub { letter-spacing: 5px; }
  .galGrid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
