/* ============================================================
 * 《江东之主：仲谋物语》 样式
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #0a0f1e; color: #f0e6d2;
  font-family: "Kaiti SC", "KaiTi", "STKaiti", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  user-select: none; -webkit-user-select: none;
}
#app { position: fixed; inset: 0; overflow: hidden; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.screen.hidden { display: none; }

/* ---------------- 标题画面 ---------------- */
#screen-title {
  justify-content: center; align-items: center;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(120,80,40,.35), transparent 60%),
    linear-gradient(180deg, #0a1226 0%, #10214a 55%, #1a3a66 100%);
}
#title-bg { position: absolute; inset: 0; overflow: hidden; }
#title-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
#title-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(5,8,18,.75) 100%); }
#title-inner { position: relative; z-index: 2; text-align: center; padding: 20px; }
.title-logo {
  font-size: clamp(34px, 8vw, 64px); letter-spacing: .35em; text-indent: .35em;
  color: #f5e3b3; text-shadow: 0 0 24px rgba(245,203,120,.6), 0 2px 6px rgba(0,0,0,.8);
  margin-bottom: 6px;
}
.title-sub {
  font-size: clamp(12px, 2.6vw, 18px); letter-spacing: .5em; text-indent: .5em;
  color: #b8a67e; margin-bottom: 40px;
}
.menu { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.menu button, .end-btns button, .overlay-box button {
  min-width: 200px; padding: 11px 34px; cursor: pointer;
  font-family: inherit; font-size: 17px; letter-spacing: .25em; text-indent: .25em;
  color: #f0e2be; background: linear-gradient(180deg, #2a3a55, #1c2a40);
  border: 1px solid #6b5a35; border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
  transition: all .2s;
}
.menu button:hover, .end-btns button:hover, .overlay-box button:hover {
  background: linear-gradient(180deg, #3a4f70, #263852); border-color: #a08a52;
  transform: translateY(-1px);
}
.menu button:active, .end-btns button:active, .overlay-box button:active { transform: translateY(1px) scale(.98); }
.menu button.disabled { opacity: .4; pointer-events: none; }
.title-tip { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 12px; color: #8a7a55; letter-spacing: .2em; z-index: 2; }

/* ---------------- 游戏画面 ---------------- */
#screen-game { background: #070b16; }
#bg { position: absolute; inset: 0; background-size: cover; background-position: center bottom; z-index: 0; transition: background .6s ease; }
#bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 50%, rgba(5,8,15,.55) 100%); }
.deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; animation: bgDecoIn .9s ease both; }
@keyframes bgDecoIn { from { opacity: 0; } to { opacity: 1; } }
.dec { position: absolute; pointer-events: none; }
.dec-moon { width: 90px; height: 90px; right: 8%; top: 8%; border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fdf3c8, #e8d48f 60%, #c9a94f); box-shadow: 0 0 60px rgba(233,205,130,.55); }
.dec-sun { width: 110px; height: 110px; right: 12%; top: 14%; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #ffe9b0, #ffb45a 65%, #e0702a); box-shadow: 0 0 90px rgba(255,170,80,.6); }
.dec-stars { inset: 0; background-image:
  radial-gradient(1px 1px at 12% 18%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 34% 8%, #ffe, transparent),
  radial-gradient(1px 1px at 55% 22%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 72% 10%, #ffe, transparent),
  radial-gradient(1px 1px at 88% 24%, #fff, transparent),
  radial-gradient(1px 1px at 22% 34%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 64% 30%, #ffe, transparent),
  radial-gradient(1px 1px at 46% 40%, #fff, transparent),
  radial-gradient(1px 1px at 80% 42%, #fff, transparent);
  opacity: .8; }
.dec-mountains { bottom: 26%; left: 0; right: 0; height: 24%; background: linear-gradient(180deg, transparent 0%, #0e1a33 100%);
  clip-path: polygon(0 65%, 8% 40%, 16% 62%, 26% 30%, 36% 60%, 48% 22%, 60% 58%, 70% 34%, 80% 62%, 90% 38%, 100% 60%, 100% 100%, 0 100%); opacity: .9; }
.dec-river { bottom: 12%; left: 0; right: 0; height: 16%;
  background: linear-gradient(180deg, transparent, rgba(40,90,140,.5)); }
.dec-river::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 100%;
  background: repeating-linear-gradient(90deg, transparent 0 60px, rgba(160,210,255,.06) 60px 120px); }
.dec-pagoda { right: 12%; bottom: 22%; width: 140px; height: 170px; opacity: .75;
  background:
    linear-gradient(180deg, transparent 0 70%, #1c2c44 70%),
    radial-gradient(ellipse at 50% 100%, #243, transparent 70%);
  clip-path: polygon(50% 0%, 100% 22%, 90% 100%, 10% 100%, 0% 22%); }
.dec-pagoda::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0 30px, #16233a 30px 34px); }
.dec-lanterns { position: absolute; }
.dec-lanterns-river { bottom: 24%; left: 0; right: 0; height: 60px; }
.dec-lanterns-river .lan { position: absolute; bottom: 0; width: 14px; height: 20px; border-radius: 50% 50% 42% 42%;
  background: radial-gradient(circle at 50% 30%, #ffd9a0, #ff8f5e 70%);
  box-shadow: 0 0 14px rgba(255,150,90,.8);
  animation: bob 3.2s ease-in-out infinite; }
.dec-lanterns-river .lan::after { content: ""; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 2px; height: 8px; background: #ff9e5e; }
.dec-lanterns-market { top: 18%; left: 0; right: 0; height: 60px; }
.dec-lanterns-market .lan { position: absolute; top: 0; width: 16px; height: 22px; border-radius: 50% 50% 40% 40%;
  background: radial-gradient(circle at 50% 30%, #ffd9a0, #ff7f4f 70%);
  box-shadow: 0 0 18px rgba(255,140,80,.85); animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.dec-buildings { bottom: 30%; left: 0; right: 0; height: 26%;
  background:
    linear-gradient(90deg, #241638 0 12%, transparent 12% 15%, #2c1c44 15% 30%, transparent 30% 33%, #241638 33% 48%, transparent 48% 51%, #2c1c44 51% 66%, transparent 66% 69%, #241638 69% 84%, transparent 84% 87%, #2c1c44 87%);
  opacity: .85; }
.dec-pillars { inset: 0; background:
  repeating-linear-gradient(90deg, transparent 0 12%, rgba(90,70,35,.18) 12% 13.4%, transparent 13.4% 25%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 100%); }
.dec-pillars::before { content: ""; position: absolute; left: 0; right: 0; top: 14%; height: 7%;
  background: linear-gradient(90deg, transparent 8%, #5c4a20 8% 92%, transparent 92%); }
.dec-torch { right: 6%; top: 24%; width: 20px; height: 40px;
  background: linear-gradient(#4a3a1c, #241a0c); }
.dec-torch::after { content: ""; position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle, #ffe9a0, #ff9e5e 60%, transparent);
  box-shadow: 0 0 22px rgba(255,160,90,.9); animation: flick 1.6s ease-in-out infinite; }
@keyframes flick { 0%,100% { opacity: 1; } 50% { opacity: .75; } }
.dec-plum { right: 12%; bottom: 20%; width: 200px; height: 220px;
  background:
    radial-gradient(8px 8px at 30% 40%, #ffc9d8, transparent),
    radial-gradient(7px 7px at 45% 30%, #ffc9d8, transparent),
    radial-gradient(9px 9px at 60% 45%, #ffc9d8, transparent),
    radial-gradient(6px 6px at 70% 30%, #ffc9d8, transparent),
    radial-gradient(8px 8px at 38% 55%, #ffc9d8, transparent),
    linear-gradient(100deg, #2c4a35 0 4%, transparent 4%);
  opacity: .85; }
.dec-tents { bottom: 30%; left: 0; right: 0; height: 30%; opacity: .9;
  background:
    radial-gradient(ellipse at 20% 100%, #2c1a10 0 18%, transparent 19%),
    radial-gradient(ellipse at 45% 100%, #2c1a10 0 16%, transparent 17%),
    radial-gradient(ellipse at 70% 100%, #2c1a10 0 18%, transparent 19%),
    radial-gradient(ellipse at 92% 100%, #2c1a10 0 14%, transparent 15%),
    linear-gradient(180deg, transparent 0 30%, #1c1008 30% 100%);
  filter: brightness(.85); }
.dec-fires { bottom: 28%; left: 0; right: 0; height: 40px; }
.dec-fires::before, .dec-fires::after, .dec-fires .f { content: ""; position: absolute; bottom: 0;
  width: 16px; height: 22px; border-radius: 50% 50% 40% 40%;
  background: radial-gradient(circle, #ffe9a0, #ff7f3f 65%, transparent);
  box-shadow: 0 0 24px rgba(255,140,60,.85); }
.dec-fires::before { left: 18%; } .dec-fires::after { right: 22%; }
.dec-fires .f { left: 60%; }
.dec-fires2 { inset: 0; background:
  radial-gradient(30px 30px at 30% 60%, rgba(255,160,60,.5), transparent),
  radial-gradient(20px 20px at 55% 45%, rgba(255,200,90,.5), transparent),
  radial-gradient(26px 26px at 75% 65%, rgba(255,140,50,.45), transparent),
  radial-gradient(18px 18px at 15% 75%, rgba(255,180,80,.4), transparent),
  radial-gradient(22px 22px at 88% 40%, rgba(255,150,60,.45), transparent); }
.dec-waves { bottom: 6%; left: 0; right: 0; height: 14%;
  background: repeating-linear-gradient(180deg, transparent 0 8px, rgba(90,150,200,.25) 8px 12px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000);
  mask-image: linear-gradient(180deg, transparent, #000);
  animation: waveShift 6s linear infinite; }
@keyframes waveShift { from { background-position: 0 0; } to { background-position: 60px 0; } }
.dec-flags { top: 12%; left: 10%; right: 10%; height: 40px;
  background:
    radial-gradient(2px 18px at 12% 0%, #c0392b, transparent),
    radial-gradient(2px 18px at 30% 0%, #e67e22, transparent),
    radial-gradient(2px 18px at 50% 0%, #c0392b, transparent),
    radial-gradient(2px 18px at 68% 0%, #e67e22, transparent),
    radial-gradient(2px 18px at 86% 0%, #c0392b, transparent);
  animation: flagWave 3s ease-in-out infinite; transform-origin: top; }
@keyframes flagWave { 0%,100% { transform: skewX(0deg); } 50% { transform: skewX(-4deg); } }
.dec-cliff { right: 0; bottom: 0; width: 55%; height: 60%;
  background: linear-gradient(100deg, #1c1830 0%, #2a2340 60%, #221c34 100%);
  clip-path: polygon(100% 0, 100% 100%, 20% 100%, 28% 82%, 18% 70%, 30% 60%, 22% 46%, 36% 34%, 30% 22%, 46% 10%, 40% 0); }
.dec-bars { inset: 0; background: repeating-linear-gradient(90deg, rgba(120,150,180,.10) 0 10px, transparent 10px 34px); }

/* ---------------- CG / 特效 ---------------- */
#cg { position: absolute; inset: 0; z-index: 4; display: none; justify-content: center; align-items: center;
  background-size: contain; background-position: center; background-repeat: no-repeat; background-color: rgba(0,0,0,.88); }
#stage { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.slot { position: absolute; bottom: 14%; transform-origin: bottom center; transition: all .5s ease; }
.slot.left { left: 1%; } .slot.center { left: 50%; transform: translateX(-50%); } .slot.right { right: 1%; }
.slot img.sprite { display: block; height: min(62vh, 520px); filter: drop-shadow(0 10px 24px rgba(0,0,0,.55)); animation: spriteIn .45s ease both; }
.slot.left img.sprite, .slot.right img.sprite { height: min(50vh, 430px); }
.sprite.active { filter: drop-shadow(0 10px 30px rgba(255,190,110,.35)); animation: spriteIn .45s ease both, breathe 3.4s ease-in-out .5s infinite; }
.sprite.idle { filter: brightness(.72) saturate(.8); }
.sprite.mood-angry { filter: saturate(1.4) hue-rotate(-12deg); }
.sprite.mood-sad { filter: grayscale(.55) brightness(.8); }
.sprite.mood-happy { filter: saturate(1.25) brightness(1.05); }
.sprite.mood-shock { filter: brightness(1.3); }
.sprite.mood-blush { filter: saturate(1.2); }
@keyframes spriteIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

#fx { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
#fx.shake { animation: shake .5s; }
@keyframes shake { 0%,100% { transform: translate(0,0);} 20% { transform: translate(-10px,4px);} 40% { transform: translate(9px,-5px);} 60% { transform: translate(-7px,3px);} 80% { transform: translate(6px,-2px);} }
#fx.flash { animation: flashFx .4s; }
@keyframes flashFx { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }

/* ---------------- HUD ---------------- */
#hud { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: flex-start;
  padding: 10px 14px; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,8,15,.7), transparent); }
#hud button { pointer-events: auto; }
#chaptag { font-size: 12px; letter-spacing: .2em; color: #d8c9a0; text-shadow: 0 1px 3px #000; margin-top: 8px; }
#aff-panel { display: flex; gap: 12px; font-size: 12px; color: #e8d9b5; }
.aff-item { display: flex; flex-direction: column; align-items: center; background: rgba(10,14,26,.55); border: 1px solid #4a3d22; border-radius: 6px; padding: 4px 8px; }
.aff-label { font-size: 11px; letter-spacing: .1em; }
.aff-hearts { color: #ff8f7a; font-size: 13px; letter-spacing: 1px; }
.hud-btn { font-family: inherit; font-size: 12px; color: #d8c9a0; background: rgba(15,20,35,.6); border: 1px solid #5a4a28; border-radius: 4px; padding: 4px 9px; cursor: pointer; margin-left: 6px; }
.hud-btn:hover { background: rgba(40,52,80,.7); }
.hud-btn.on { background: #6b3a20; border-color: #b06a3a; }

/* ---------------- 对话 ---------------- */
#dialogue-box { position: absolute; left: 4%; right: 4%; bottom: 3%; z-index: 5;
  background: linear-gradient(180deg, rgba(16,20,34,.94), rgba(10,13,24,.96));
  border: 1px solid #6b5a35; border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
  padding: 14px 18px 12px; min-height: 110px; }
#namebox { display: inline-block; font-size: 15px; letter-spacing: .15em; color: #ffd98a;
  background: rgba(255,217,138,.08); border: 1px solid #6b5a35; border-radius: 4px; padding: 2px 12px; margin-bottom: 6px;
  transition: color .3s; }
#namebox.hidden { visibility: hidden; }
#text-inner { font-size: clamp(16px, 2.2vh, 20px); line-height: 1.75; color: #f2ead6; letter-spacing: .04em; min-height: 56px; display: block; }
#adv-ind { position: absolute; right: 18px; bottom: 12px; color: #ffd98a; opacity: 0; transition: opacity .2s; font-size: 16px; }
#adv-ind.blink { animation: blink 1.2s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------------- 选项 ---------------- */
#choices { position: absolute; left: 8%; right: 8%; bottom: 26%; z-index: 7; display: flex; flex-direction: column; gap: 10px; }
.choice {
  font-family: inherit; font-size: clamp(14px, 2vh, 17px); text-align: left; letter-spacing: .06em;
  padding: 10px 16px; cursor: pointer; color: #f2e6c8;
  background: linear-gradient(180deg, rgba(34,44,66,.95), rgba(22,29,46,.96));
  border: 1px solid #6b5a35; border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0,0,0,.5);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  animation: slideUp .25s ease both; transition: all .18s;
}
.choice .cb-aff { color: #ff8f7a; font-size: .85em; letter-spacing: .05em; white-space: nowrap; }
.choice:nth-child(2) { animation-delay: .06s; } .choice:nth-child(3) { animation-delay: .12s; } .choice:nth-child(4) { animation-delay: .18s; }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.choice:hover { background: linear-gradient(180deg, #3a4f70, #2a3c58); border-color: #a08a52; transform: translateX(3px); }
.choice:hover .cb-aff { color: #ffb8a0; }

/* ---------------- 章节卡 ---------------- */
#chapter-card { position: absolute; inset: 0; z-index: 20; display: none; justify-content: center; align-items: center;
  background: rgba(4,6,12,.88); flex-direction: column; gap: 16px; animation: chapterIn .5s ease both; }
#chapter-card.out { animation: chapterOut .8s ease both; }
@keyframes chapterIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
@keyframes chapterOut { from { opacity: 1; } to { opacity: 0; } }
#chapter-text { text-align: center; }
#chapter-text .ch-num { display: block; font-size: clamp(15px, 3.4vw, 22px); letter-spacing: .55em; text-indent: .55em; color: #a08a52; margin-bottom: 10px; }
#chapter-text .ch-title { display: block; font-size: clamp(30px, 7vw, 52px); letter-spacing: .42em; text-indent: .42em; color: #f5e3b3; text-shadow: 0 0 30px rgba(245,203,120,.5); }
#chapter-text::after { content: ""; display: block; width: 55%; height: 1px; margin: 18px auto 0; background: linear-gradient(90deg, transparent, #a08a52, transparent); }

/* ---------------- 结局画面 ---------------- */
#screen-end { justify-content: center; align-items: center; background: #0a0f1e; }
#end-cg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .4; }
#end-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 30%, rgba(4,6,12,.9) 100%); }
#end-inner { position: relative; z-index: 2; text-align: center; max-width: 640px; padding: 20px; }
#end-type { display: inline-block; font-size: 15px; letter-spacing: .3em; padding: 4px 16px; border-radius: 4px; margin-bottom: 16px; }
.end-type.t-good { color: #ffd98a; background: rgba(255,200,110,.12); border: 1px solid #a08a52; }
.end-type.t-bad { color: #ff8f7a; background: rgba(255,90,70,.12); border: 1px solid #a04a3a; }
.end-type.t-neutral { color: #b8c8e0; background: rgba(140,160,200,.12); border: 1px solid #5a6a8a; }
.end-type.t-comedy { color: #b8f0c8; background: rgba(120,220,150,.12); border: 1px solid #4a9a6a; }
#end-title { font-size: clamp(28px, 6vw, 46px); letter-spacing: .25em; text-indent: .25em; color: #f5e3b3; margin-bottom: 8px; text-shadow: 0 0 24px rgba(245,203,120,.45); }
#end-sub { font-size: 15px; color: #b8a67e; letter-spacing: .2em; margin-bottom: 18px; }
#end-desc { font-size: clamp(14px, 2.2vh, 17px); line-height: 1.9; color: #d8ccb0; margin-bottom: 26px; }
.end-btns { display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* ---------------- 弹窗 ---------------- */
.overlay { position: absolute; inset: 0; z-index: 15; display: none; justify-content: center; align-items: center; background: rgba(4,6,12,.82); }
.overlay-box { width: min(560px, 92%); max-height: 86vh; overflow-y: auto;
  background: linear-gradient(180deg, #1a2032, #12161f); border: 1px solid #6b5a35; border-radius: 10px; padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,.7); }
.overlay-box h3 { color: #f5e3b3; letter-spacing: .2em; text-align: center; margin-bottom: 16px; font-size: 18px; }
.slot-row { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px dashed #2a2f3e; }
.slot-row button { min-width: 0; padding: 5px 12px; font-size: 13px; }
.confirm-box { text-align: center; padding: 6px 4px; }
.confirm-box p { color: #e8dcc0; font-size: 15px; line-height: 1.8; margin: 0 0 6px; }
.confirm-btns { display: flex; gap: 14px; justify-content: center; margin-top: 14px; }
.confirm-btns .menu-btn { min-width: 96px; padding: 8px 20px; font-size: 15px; }
.slot-info { font-size: 12px; color: #a89870; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px dashed #2a2f3e; color: #d8ccb0; font-size: 15px; }
input[type=range] { width: 55%; accent-color: #c9a54a; }
.switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #2a2f3e; border-radius: 24px; transition: .25s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #d8ccb0; transition: .25s; }
.switch input:checked + span { background: #8a6a30; }
.switch input:checked + span::before { transform: translateX(22px); background: #ffe9b0; }

/* ---------------- 图鉴 ---------------- */
.g-card { border: 1px solid #4a3d22; background: rgba(20,26,40,.6); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.g-title { color: #f5e3b3; font-size: 17px; letter-spacing: .15em; margin-bottom: 4px; }
.g-time { color: #6a5a3a; font-size: 11px; letter-spacing: .1em; margin-bottom: 4px; }
.g-type { font-size: 12px; letter-spacing: .2em; margin-bottom: 6px; }
.g-type.t-good { color: #ffd98a; } .g-type.t-bad { color: #ff8f7a; } .g-type.t-neutral { color: #b8c8e0; } .g-type.t-comedy { color: #b8f0c8; }
.g-desc { font-size: 13px; line-height: 1.7; color: #b8a888; }
.g-locked { color: #6a5a3a; text-align: center; padding: 8px; font-size: 14px; letter-spacing: .3em; }

/* ---------------- 回放 ---------------- */
#backlog-list { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.7; color: #c8bca0; }
.bl-row b { color: #ffd98a; margin-right: 6px; }

/* ---------------- 提示 ---------------- */
#toast { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); z-index: 30;
  background: rgba(20,26,40,.9); border: 1px solid #8a6a30; color: #f5e3b3; font-size: 14px; letter-spacing: .1em;
  padding: 8px 18px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .3s; }
#toast.show { opacity: 1; }

/* 屏幕方向提示 */
#orient-hint { display: none; position: fixed; inset: 0; z-index: 99; background: #0a0f1e; color: #d8c9a0;
  justify-content: center; align-items: center; text-align: center; font-size: 16px; letter-spacing: .15em; line-height: 2; }
@media (orientation: landscape) and (max-height: 480px) { #orient-hint { display: flex; } }

/* ---------------- 移动端优化 ---------------- */
@media (max-width: 640px) {
  #dialogue-box { left: 2%; right: 2%; bottom: 2%; min-height: 96px; padding: 10px 12px; border-radius: 8px; }
  #text-inner { font-size: 15px; line-height: 1.7; min-height: 46px; }
  #namebox { font-size: 13px; padding: 1px 9px; }
  #choices { left: 5%; right: 5%; bottom: 24%; }
  .choice { padding: 9px 13px; font-size: 14px; }
  #hud { padding: 7px 9px; }
  .hud-btn { font-size: 11px; padding: 4px 7px; margin-left: 4px; }
  #aff-panel { gap: 6px; font-size: 11px; }
  .aff-hearts { font-size: 11px; }
  .slot { bottom: 12%; }
  .slot.left { left: -4%; } .slot.right { right: -4%; }
  #chapter-text { font-size: clamp(22px, 7vw, 34px); letter-spacing: .3em; text-indent: .3em; }
  #btn-audio-on { min-width: 0; width: 78vw; }
  .overlay-box { width: 96%; padding: 14px; }
}
/* 小屏机型进一步压缩 */
@media (max-width: 380px) {
  #dialogue-box { min-height: 88px; }
  #text-inner { font-size: 14px; }
  .choice { font-size: 13px; padding: 8px 11px; }
}
