@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;500;600;700&family=Cinzel:wght@400;500;600&display=swap');

/* ==========================================================================
   一梦大千 · 蓝黑叙事界面
   ========================================================================== */
.ymdq {
  --void: #01040b;
  --abyss: #030814;
  --deep: #061226;
  --deep2: #081a33;
  --panel: rgba(6, 18, 38, 0.72);
  --panel-solid: #071426;
  --panel2: rgba(7, 22, 46, 0.9);
  --ink: #e6f4ff;
  --ink2: #c5ddf0;
  --muted: #7f9db8;
  --dim: #58718a;
  --cyan: #7fe7ff;
  --azure: #4aa8ff;
  --blue: #2f6bff;
  --violet: #a98bff;
  --gold: #e8c98a;
  --rose: #ff9fbe;
  --danger: #ff6d88;
  --line: rgba(127, 231, 255, 0.14);
  --line2: rgba(127, 231, 255, 0.28);
  --glass: rgba(5, 16, 34, 0.62);
  --serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --sans: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --latin: 'Cinzel', 'Optima', 'Times New Roman', serif;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ymdq, .ymdq * { box-sizing: border-box; }
body.ymdq-body { margin: 0; padding: 0; overflow: hidden; background: #01040b; }

.ymdq {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  background:
    radial-gradient(circle at 18% 8%, rgba(30, 87, 180, 0.2), transparent 34%),
    radial-gradient(circle at 84% 86%, rgba(111, 58, 190, 0.14), transparent 38%),
    linear-gradient(150deg, #02040a 0%, #041023 48%, #02050d 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.ymdq * { box-sizing: border-box; }
.ymdq ::selection { background: rgba(127, 231, 255, 0.28); color: #fff; }
.ymdq :where(button) { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.ymdq input, .ymdq textarea, .ymdq select {
  font: inherit;
  color: var(--ink);
  background: rgba(3, 12, 28, 0.72);
  border: 1px solid rgba(127, 231, 255, 0.16);
  outline: none;
  padding: 10px 12px;
  width: 100%;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.ymdq input:focus, .ymdq textarea:focus, .ymdq select:focus {
  border-color: rgba(127, 231, 255, 0.62);
  box-shadow: 0 0 0 1px rgba(127, 231, 255, 0.1), 0 0 26px rgba(47, 107, 255, 0.16);
  background: rgba(4, 16, 36, 0.86);
}
.ymdq textarea { resize: vertical; min-height: 80px; line-height: 1.7; }
.ymdq ::placeholder { color: rgba(127, 157, 184, 0.52); }
.ymdq ::-webkit-scrollbar { width: 5px; height: 5px; }
.ymdq ::-webkit-scrollbar-track { background: transparent; }
.ymdq ::-webkit-scrollbar-thumb { background: rgba(127, 231, 255, 0.18); }
.ymdq ::-webkit-scrollbar-thumb:hover { background: rgba(127, 231, 255, 0.34); }

.ymdq .hidden { display: none !important; }
.ymdq .ico { width: 18px; height: 18px; display: inline-block; vertical-align: middle; flex: none; }

/* ---------------- 背景层 ---------------- */
.stars-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.9; }
.bg-aurora { position: absolute; inset: -10%; pointer-events: none; filter: blur(60px); opacity: 0.65; }
.bg-aurora i { position: absolute; display: block; border-radius: 50%; mix-blend-mode: screen; }
.bg-aurora i:nth-child(1) {
  width: 48vw; height: 48vw; left: -8%; top: 2%;
  background: radial-gradient(circle, rgba(25, 92, 190, 0.28), transparent 66%);
  animation: aurora1 26s ease-in-out infinite alternate;
}
.bg-aurora i:nth-child(2) {
  width: 42vw; height: 42vw; right: -6%; top: 26%;
  background: radial-gradient(circle, rgba(112, 62, 200, 0.2), transparent 66%);
  animation: aurora2 32s ease-in-out infinite alternate;
}
.bg-aurora i:nth-child(3) {
  width: 36vw; height: 36vw; left: 32%; bottom: -16%;
  background: radial-gradient(circle, rgba(20, 130, 170, 0.16), transparent 66%);
  animation: aurora3 38s ease-in-out infinite alternate;
}
@keyframes aurora1 { to { transform: translate3d(8%, 6%, 0) scale(1.15); } }
@keyframes aurora2 { to { transform: translate3d(-9%, -5%, 0) scale(1.1); } }
@keyframes aurora3 { to { transform: translate3d(5%, -8%, 0) scale(1.2); } }

.bg-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.32;
  background-image:
    linear-gradient(rgba(90, 160, 220, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 160, 220, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 45%, #000 10%, transparent 78%);
}
.bg-noise {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}
.bg-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 38%, rgba(0, 2, 8, 0.58) 100%); }
/* ---------------- 屏幕切换 ---------------- */
.screen {
  position: absolute; inset: 0; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.72s var(--ease), visibility 0.72s;
}
.screen:not(.active) { display: none; }
#scr-start:not(.active), #scr-wizard:not(.active), #scr-game:not(.active) { display: none !important; opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.screen.active { opacity: 1; visibility: visible; pointer-events: auto; }
.screen.leaving { opacity: 0; }

/* ---------------- 通用按钮 ---------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 9px 18px; border: 1px solid rgba(127, 231, 255, 0.2);
  background: rgba(9, 26, 52, 0.36); letter-spacing: 0.12em; font-size: 13px;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.3s, color 0.3s;
  overflow: hidden; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.btn:before {
  content: ''; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.13) 48%, transparent 72%);
  transition: transform 0.7s;
}
.btn:hover { border-color: rgba(127, 231, 255, 0.66); box-shadow: 0 0 26px rgba(47, 135, 255, 0.2); transform: translateY(-1px); }
.btn:hover:before { transform: translateX(120%); }
.btn.primary {
  border-color: rgba(127, 231, 255, 0.46);
  background: linear-gradient(110deg, rgba(25, 86, 174, 0.62), rgba(12, 38, 80, 0.52));
  color: #f0fbff;
}
.btn.ghost { border-color: rgba(127, 157, 184, 0.16); background: rgba(6, 16, 34, 0.24); color: rgba(198, 220, 236, 0.84); }
.btn.danger { border-color: rgba(255, 109, 136, 0.3); color: #ffc2cf; }
.btn.small { min-height: 30px; padding: 6px 11px; font-size: 11px; letter-spacing: 0.08em; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.38; pointer-events: none; }
.icon-btn {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(127, 231, 255, 0.12); color: rgba(180, 210, 232, 0.72);
  font-size: 20px; line-height: 1; transition: 0.3s;
}
.icon-btn:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.5); transform: rotate(90deg); }

.glass-panel {
  position: relative; background: linear-gradient(145deg, rgba(7, 20, 43, 0.76), rgba(4, 11, 25, 0.52));
  border: 1px solid rgba(127, 231, 255, 0.1); backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 16px 46px rgba(0, 0, 0, 0.2);
}
.glass-panel:before {
  content: ''; position: absolute; left: -1px; top: 16%; width: 1px; height: 24%;
  background: var(--cyan); box-shadow: 0 0 16px var(--cyan); opacity: 0.42;
}
.corner-frame { position: relative; }
.corner-frame:after {
  content: ''; position: absolute; inset: 4px; pointer-events: none;
  background:
    linear-gradient(var(--line2), var(--line2)) left top / 12px 1px no-repeat,
    linear-gradient(var(--line2), var(--line2)) left top / 1px 12px no-repeat,
    linear-gradient(var(--line2), var(--line2)) right top / 12px 1px no-repeat,
    linear-gradient(var(--line2), var(--line2)) right top / 1px 12px no-repeat,
    linear-gradient(var(--line2), var(--line2)) left bottom / 12px 1px no-repeat,
    linear-gradient(var(--line2), var(--line2)) left bottom / 1px 12px no-repeat,
    linear-gradient(var(--line2), var(--line2)) right bottom / 12px 1px no-repeat,
    linear-gradient(var(--line2), var(--line2)) right bottom / 1px 12px no-repeat;
}

/* ==========================================================================
   开始界面
   ========================================================================== */
#scr-start { display: flex; align-items: center; justify-content: center; padding: clamp(20px, 5vw, 72px); }
.start-frame {
  position: relative; z-index: 3; width: min(1240px, 100%);
  display: grid; grid-template-columns: minmax(360px, 1fr) minmax(340px, 460px);
  gap: clamp(30px, 7vw, 110px); align-items: center;
}
.start-left { position: relative; padding: 20px 0; }
.start-eyebrow {
  display: flex; align-items: center; gap: 14px; color: rgba(141, 198, 232, 0.66);
  font: 500 10px/1 var(--latin); letter-spacing: 0.34em;
}
.start-eyebrow .hairline { display: block; width: 54px; height: 1px; background: linear-gradient(90deg, transparent, rgba(127, 231, 255, 0.55)); }
.start-eyebrow .hairline:last-child { background: linear-gradient(90deg, rgba(127, 231, 255, 0.55), transparent); }
.title-block { position: relative; margin: 18px 0 0; display: inline-block; }
.main-title {
  position: relative; margin: 0; display: flex; gap: 0.02em; white-space: nowrap;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(56px, 7.3vw, 108px); line-height: 1.02; letter-spacing: 0.08em;
  background: linear-gradient(108deg, #f3fbff 6%, #b9ecff 24%, #ffffff 40%, #6fc6ff 58%, #d8f1ff 78%, #8fd4ff 94%);
  background-size: 230% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 30px rgba(67, 153, 255, 0.24));
  animation: titleFlow 9s linear infinite;
}
.main-title span { display: inline-block; transform: translateY(0); }
.main-title span:nth-child(1) { transform: translateY(-0.03em); }
.main-title span:nth-child(2) { transform: translateY(0.04em); }
.main-title span:nth-child(3) { transform: translateY(-0.02em); }
.main-title span:nth-child(4) { transform: translateY(0.02em); }
@keyframes titleFlow { to { background-position: 230% 0; } }
.title-seal {
  position: absolute; right: -46px; bottom: -2px; width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center; transform: rotate(-6deg);
  border: 1px solid rgba(127, 231, 255, 0.38); color: rgba(180, 238, 255, 0.8);
  font-size: 20px; letter-spacing: 0; box-shadow: 0 0 24px rgba(74, 168, 255, 0.12), inset 0 0 18px rgba(74, 168, 255, 0.08);
  animation: sealPulse 5s ease-in-out infinite;
}
.title-seal:before { content: ''; position: absolute; inset: 3px; border: 1px solid rgba(127, 231, 255, 0.18); }
@keyframes sealPulse { 0%, 100% { opacity: 0.65; } 50% { opacity: 1; } }
.title-rule { position: relative; width: min(430px, 86%); height: 1px; margin: 26px 0 16px; background: linear-gradient(90deg, rgba(127, 231, 255, 0.48), rgba(127, 231, 255, 0.04)); }
.title-rule i { position: absolute; left: 0; top: -1px; width: 64px; height: 3px; background: var(--cyan); box-shadow: 0 0 18px var(--cyan); animation: ruleSweep 5s var(--ease) infinite; }
@keyframes ruleSweep { 0%, 100% { transform: translateX(0); opacity: 0.9; } 50% { transform: translateX(260px); opacity: 0.45; } }
.start-sub { margin: 0; color: rgba(188, 220, 241, 0.7); font-size: 14px; letter-spacing: 0.4em; }
.start-poem { margin: 30px 0 0; color: rgba(152, 184, 208, 0.56); font-size: 12.5px; line-height: 2.15; letter-spacing: 0.13em; }
.start-meta { display: flex; gap: 20px; margin-top: 30px; flex-wrap: wrap; color: rgba(127, 157, 184, 0.48); font: 500 9px/1 var(--sans); letter-spacing: 0.16em; }
.start-meta span { display: inline-flex; align-items: center; gap: 7px; }
.start-meta i { width: 4px; height: 4px; border: 1px solid rgba(127, 231, 255, 0.55); transform: rotate(45deg); display: inline-block; }

.start-menu { position: relative; display: flex; flex-direction: column; gap: 0; padding: 4px 0 2px; }
.start-menu:before {
  content: ''; position: absolute; left: 0; top: 2%; bottom: 2%; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(127, 231, 255, 0.24) 14%, rgba(127, 231, 255, 0.24) 86%, transparent);
}
.start-menu:after {
  content: ''; position: absolute; left: 0; right: 14px; bottom: -12px; height: 1px;
  background: linear-gradient(90deg, rgba(127, 231, 255, 0.28), transparent 78%);
}
.menu-head { display: flex; align-items: center; gap: 13px; padding: 0 18px 14px 26px; font: 500 8px/1 var(--latin); letter-spacing: 0.26em; color: rgba(127, 231, 255, 0.38); }
.menu-head i { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(127, 231, 255, 0.16), transparent); }
.menu-head span:last-child { color: rgba(232, 201, 138, 0.5); letter-spacing: 0.2em; }
.menu-foot { display: flex; align-items: center; gap: 12px; padding: 15px 18px 0 26px; font: 500 7.5px/1 var(--latin); letter-spacing: 0.24em; color: rgba(127, 157, 184, 0.3); }
.menu-foot i { width: 26px; height: 1px; background: rgba(127, 231, 255, 0.2); }
.menu-btn {
  position: relative; display: grid; grid-template-columns: 42px 1fr 24px 24px; align-items: center; gap: 15px;
  min-height: 80px; padding: 14px 14px 14px 26px; text-align: left; overflow: hidden;
  border-left: 1px solid rgba(127, 231, 255, 0.14); border-bottom: 1px solid rgba(127, 231, 255, 0.055);
  background: linear-gradient(90deg, rgba(127, 231, 255, 0.022), transparent 46%);
  transition: padding-left 0.45s var(--ease), background 0.45s, border-color 0.45s, transform 0.45s;
}
.menu-btn:last-of-type { border-bottom-color: transparent; }
.menu-btn:before {
  content: ''; position: absolute; inset: 0; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, rgba(41, 118, 220, 0.26), rgba(20, 58, 112, 0.06) 62%, transparent);
  transition: transform 0.55s var(--ease);
}
.menu-btn:after {
  content: ''; position: absolute; left: 26px; right: 12px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(127, 231, 255, 0.7), rgba(127, 231, 255, 0.03));
  transform: scaleX(0.02); transform-origin: left; transition: transform 0.55s var(--ease);
}
.menu-btn:hover { padding-left: 40px; border-left-color: rgba(127, 231, 255, 0.7); transform: translateX(2px); }
.menu-btn:hover:before { transform: scaleX(1); }
.menu-btn:hover:after { transform: scaleX(1); }
.menu-idx { position: relative; z-index: 1; font: 500 11px/1 var(--latin); color: rgba(127, 231, 255, 0.42); letter-spacing: 0.12em; transition: color 0.3s, text-shadow 0.3s; }
.menu-btn:hover .menu-idx { color: var(--cyan); text-shadow: 0 0 14px rgba(127, 231, 255, 0.8); }
.menu-label { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 5px; }
.menu-label strong { font-size: 20px; font-weight: 400; letter-spacing: 0.24em; color: rgba(232, 246, 255, 0.9); transition: color 0.3s, text-shadow 0.3s; }
.menu-label small { font: 500 8.5px/1 var(--latin); color: rgba(147, 181, 207, 0.4); letter-spacing: 0.24em; transition: color 0.3s; }
.menu-btn:hover .menu-label strong { color: #fff; text-shadow: 0 0 22px rgba(127, 231, 255, 0.28); }
.menu-btn:hover .menu-label small { color: rgba(168, 218, 245, 0.62); }
.menu-glyph { position: relative; z-index: 1; color: rgba(127, 231, 255, 0.15); font-size: 13px; text-align: center; transition: color 0.4s, transform 0.4s, text-shadow 0.4s; }
.menu-btn:hover .menu-glyph { color: rgba(127, 231, 255, 0.7); transform: rotate(45deg); text-shadow: 0 0 14px rgba(127, 231, 255, 0.6); }
.menu-arrow { position: relative; z-index: 1; color: rgba(127, 231, 255, 0); font: 300 18px/1 var(--sans); transform: translateX(-10px); transition: 0.45s; }
.menu-btn:hover .menu-arrow { color: var(--cyan); transform: translateX(0); }
.menu-btn.disabled { opacity: 0.34; pointer-events: none; }

.start-foot {
  position: absolute; left: clamp(20px, 5vw, 72px); right: clamp(20px, 5vw, 72px); bottom: 24px; z-index: 3;
  display: flex; justify-content: space-between; color: rgba(118, 151, 178, 0.4);
  font: 500 8.5px/1.4 var(--latin); letter-spacing: 0.22em;
}
.start-hint { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); z-index: 3; color: rgba(127, 231, 255, 0.56); font: 500 9px/1.4 var(--sans); letter-spacing: 0.18em; }
.start-hint:empty { display: none; }
.start-orbit { position: absolute; width: 620px; height: 620px; left: 8%; top: 50%; transform: translateY(-50%); pointer-events: none; opacity: 0.34; z-index: 1; }
.orbit-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(127, 231, 255, 0.09); }
.orbit-ring.r1 { animation: orbitSpin 90s linear infinite; }
.orbit-ring.r1:before, .orbit-ring.r1:after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); left: 50%; top: -2px; }
.orbit-ring.r1:after { top: auto; bottom: -2px; left: 38%; opacity: 0.6; }
.orbit-ring.r2 { inset: 12%; border-style: dashed; border-color: rgba(127, 231, 255, 0.07); animation: orbitSpin 64s linear infinite reverse; }
.orbit-ring.r3 { inset: 26%; border-color: rgba(127, 231, 255, 0.06); animation: orbitSpin 42s linear infinite; }
.orbit-core {
  position: absolute; inset: 39%; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 1px solid rgba(127, 231, 255, 0.14); color: transparent; font-size: 0;
  background: radial-gradient(circle, rgba(30, 100, 190, 0.12), transparent 68%);
  box-shadow: 0 0 80px rgba(47, 135, 255, 0.1);
}
.orbit-core:before { content: ''; width: 9px; height: 9px; border: 1px solid rgba(127, 231, 255, 0.5); transform: rotate(45deg); box-shadow: 0 0 16px rgba(127, 231, 255, 0.5); }
.orbit-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #dff8ff; box-shadow: 0 0 12px #9fe8ff; animation: starPulse 4s ease-in-out infinite; }
.orbit-star.s1 { left: 12%; top: 24%; }
.orbit-star.s2 { right: 9%; top: 62%; animation-delay: 1.2s; }
.orbit-star.s3 { left: 40%; bottom: 6%; animation-delay: 2.1s; }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes starPulse { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.25); } }

/* ==========================================================================
   向导
   ========================================================================== */
#scr-wizard { display: flex; flex-direction: column; background: radial-gradient(circle at 70% 10%, rgba(26, 82, 160, 0.14), transparent 42%); }
.wiz-top { height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 26px; border-bottom: 1px solid var(--line); background: rgba(2, 7, 16, 0.66); backdrop-filter: blur(16px); z-index: 4; }
.brand-mini { display: flex; align-items: baseline; gap: 12px; min-width: 170px; }
.brand-mini b { font-size: 17px; font-weight: 400; letter-spacing: 0.26em; }
.brand-mini span { font: 500 8.5px/1 var(--latin); letter-spacing: 0.22em; color: rgba(131, 167, 193, 0.5); }
.wiz-progress { display: flex; gap: 9px; align-items: center; }
.wiz-progress i { width: 34px; height: 2px; background: rgba(127, 231, 255, 0.12); transition: background 0.4s, box-shadow 0.4s; }
.wiz-progress i.on { background: var(--cyan); box-shadow: 0 0 10px rgba(127, 231, 255, 0.6); }
.wiz-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 246px minmax(0, 1fr); }
.wiz-rail { border-right: 1px solid var(--line); padding: 44px 24px 24px 34px; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(180deg, rgba(5, 14, 30, 0.46), transparent 70%); }
.wiz-step { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 15px 8px 15px 0; text-align: left; opacity: 0.46; transition: opacity 0.35s; }
.wiz-step:before { content: ''; position: absolute; left: -34px; top: 50%; width: 26px; height: 1px; background: rgba(127, 231, 255, 0.16); }
.wiz-step .n { font: 500 11px/1.4 var(--latin); color: rgba(127, 231, 255, 0.55); letter-spacing: 0.1em; }
.wiz-step .t b { display: block; font-size: 14px; font-weight: 400; letter-spacing: 0.16em; color: rgba(225, 243, 255, 0.88); }
.wiz-step .t small { display: block; margin-top: 4px; font: 500 8px/1.4 var(--latin); color: rgba(131, 167, 193, 0.44); letter-spacing: 0.18em; }
.wiz-step.on { opacity: 1; }
.wiz-step.on:before { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.wiz-step.on .n { color: var(--cyan); }
.wiz-step.done { opacity: 0.72; }
.wiz-step.done .n { color: var(--gold); }
.wiz-rail-note { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); color: rgba(127, 157, 184, 0.42); font-size: 10px; line-height: 1.9; letter-spacing: 0.08em; }
.wiz-main { overflow-y: auto; padding: 38px clamp(24px, 4vw, 58px) 30px; }
.wiz-main-inner { max-width: 980px; margin: 0 auto; }
.wiz-title { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 8px; }
.wiz-title .zh { font-size: clamp(26px, 3vw, 38px); font-weight: 400; letter-spacing: 0.16em; }
.wiz-title .en { font: 500 9px/1.6 var(--latin); letter-spacing: 0.24em; color: rgba(127, 231, 255, 0.42); padding-bottom: 5px; }
.wiz-desc { color: rgba(149, 181, 205, 0.6); font-size: 12px; line-height: 1.9; letter-spacing: 0.08em; margin-bottom: 26px; }
.wiz-section { margin-top: 24px; }
.wiz-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.wiz-section-head b { font-size: 12px; font-weight: 400; letter-spacing: 0.18em; color: rgba(206, 234, 250, 0.8); white-space: nowrap; }
.wiz-section-head:after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.wiz-section-head .mini { font: 500 8px/1 var(--latin); color: rgba(127, 231, 255, 0.34); letter-spacing: 0.2em; }
.wiz-grid { display: grid; gap: 14px; }
.wiz-grid.c2 { grid-template-columns: 1fr 1fr; }
.wiz-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font: 500 9px/1 var(--sans); letter-spacing: 0.16em; color: rgba(127, 157, 184, 0.6); }
.field label em { color: var(--cyan); font-style: normal; margin-left: 4px; }
.field input, .field textarea, .field select { font-size: 13px; }
.field textarea { min-height: 88px; }
.field.full { grid-column: 1 / -1; }
.field-hint { font-size: 10px; color: rgba(127, 157, 184, 0.42); line-height: 1.6; }
.wiz-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.world-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.world-card {
  position: relative; min-height: 228px; padding: 24px 22px; text-align: left; overflow: hidden;
  border: 1px solid rgba(127, 231, 255, 0.12); background: linear-gradient(145deg, rgba(8, 22, 46, 0.6), rgba(3, 9, 20, 0.62));
  transition: border-color 0.4s, transform 0.4s, box-shadow 0.4s;
}
.world-card.custom {
  grid-column: 1 / -1; min-height: 132px;
  background: linear-gradient(100deg, rgba(8, 22, 46, 0.6), rgba(3, 9, 20, 0.5) 62%, rgba(30, 80, 140, 0.14));
}
.world-card.custom .wc-name { font-size: 24px; margin-top: 9px; }
.world-card.custom .wc-desc { max-width: 62%; margin-top: 9px; }
.world-card.custom .wc-mark { right: 22px; bottom: -28px; font-size: 130px; }
.world-card:before {
  content: ''; position: absolute; inset: 0; opacity: 0.55; transition: opacity 0.4s, transform 0.6s;
  background:
    radial-gradient(circle at 78% 22%, hsl(var(--h, 210) 70% 45% / 0.28), transparent 42%),
    linear-gradient(160deg, transparent 40%, rgba(2, 8, 18, 0.72));
}
.world-card:hover { border-color: rgba(127, 231, 255, 0.46); transform: translateY(-3px); box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28); }
.world-card:hover:before { opacity: 0.9; transform: scale(1.04); }
.world-card .wc-en { position: relative; z-index: 1; font: 500 8px/1 var(--latin); letter-spacing: 0.24em; color: rgba(127, 231, 255, 0.42); }
.world-card .wc-name { position: relative; z-index: 1; margin: 12px 0 6px; font-size: 30px; letter-spacing: 0.2em; }
.world-card .wc-desc { position: relative; z-index: 1; margin-top: 16px; max-width: 88%; font-size: 11px; line-height: 1.9; color: rgba(166, 196, 218, 0.66); }
.world-card .wc-mark { display: none !important; position: absolute; right: 10px; bottom: -16px; font-size: 108px; font-weight: 300; color: rgba(127, 231, 255, 0.05); line-height: 1; pointer-events: none; }
.world-card.on { border-color: rgba(127, 231, 255, 0.7); box-shadow: 0 0 0 1px rgba(127, 231, 255, 0.14), 0 0 46px rgba(47, 135, 255, 0.16); }
.world-card.on:after { content: '已选择'; position: absolute; right: 16px; top: 16px; z-index: 1; font: 500 8px/1 var(--latin); letter-spacing: 0.16em; color: var(--cyan); border: 1px solid rgba(127, 231, 255, 0.4); padding: 6px 8px; }

.preset-row { display: flex; gap: 8px; flex-wrap: wrap; }
.preset-chip { padding: 8px 13px; border: 1px solid rgba(127, 231, 255, 0.12); color: rgba(170, 202, 224, 0.66); font-size: 11px; letter-spacing: 0.1em; transition: 0.3s; }
.preset-chip:hover { border-color: rgba(127, 231, 255, 0.4); color: var(--ink); }
.preset-chip.on { border-color: rgba(127, 231, 255, 0.6); color: var(--cyan); background: rgba(31, 87, 158, 0.16); }

.node-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.node-row { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid rgba(127, 231, 255, 0.08); background: rgba(5, 15, 32, 0.4); }
.node-row .nr-i { font: 500 9px/1 var(--latin); color: rgba(127, 231, 255, 0.4); }
.node-row b { display: block; font-size: 12px; font-weight: 400; letter-spacing: 0.08em; }
.node-row small { display: block; margin-top: 3px; color: rgba(127, 157, 184, 0.46); font-size: 9px; }
.node-row .nr-a { display: flex; gap: 4px; }
.node-row.on { border-color: rgba(232, 201, 138, 0.4); background: rgba(80, 62, 28, 0.12); }
.node-row .mini-btn { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(127, 231, 255, 0.1); color: rgba(127, 231, 255, 0.55); }
.node-row .mini-btn:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.36); }

.bond-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bond-card { position: relative; padding: 12px; border: 1px solid rgba(127, 231, 255, 0.1); background: linear-gradient(160deg, rgba(8, 22, 46, 0.62), rgba(3, 9, 20, 0.62)); text-align: left; overflow: hidden; transition: 0.35s; }
.bond-card:hover { border-color: rgba(127, 231, 255, 0.38); transform: translateY(-2px); }
.bond-card.on { border-color: rgba(232, 201, 138, 0.52); box-shadow: 0 0 22px rgba(232, 201, 138, 0.08); }
.bond-card .bc-portrait { height: 96px; margin: -12px -12px 10px; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 30%, hsl(var(--h, 210) 65% 45% / 0.4), rgba(3, 9, 20, 0.9) 74%); }
.bond-card .bc-sigil { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 38px; color: rgba(232, 248, 255, 0.24); letter-spacing: 0; }
.bond-card .bc-check { position: absolute; right: 8px; top: 8px; width: 18px; height: 18px; border: 1px solid rgba(127, 231, 255, 0.24); display: flex; align-items: center; justify-content: center; font-size: 11px; color: transparent; }
.bond-card.on .bc-check { background: var(--cyan); color: #04101e; border-color: var(--cyan); }
.bond-card b { display: block; font-size: 13px; font-weight: 400; letter-spacing: 0.12em; }
.bond-card small { display: block; margin-top: 4px; font-size: 9px; color: rgba(127, 157, 184, 0.56); line-height: 1.6; }
.bond-card p { margin: 7px 0 0; font-size: 9.5px; line-height: 1.6; color: rgba(154, 184, 206, 0.5); }

.wiz-foot { height: 74px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; border-top: 1px solid var(--line); background: rgba(2, 7, 16, 0.74); backdrop-filter: blur(16px); }
.wiz-foot-center { font-size: 10px; letter-spacing: 0.16em; color: rgba(127, 157, 184, 0.4); }
.wiz-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.summary-card { padding: 16px; border: 1px solid rgba(127, 231, 255, 0.1); background: rgba(5, 15, 32, 0.44); }
.summary-card h4 { margin: 0 0 10px; font-size: 10px; font-weight: 500; letter-spacing: 0.2em; color: rgba(127, 231, 255, 0.5); }
.summary-card p { margin: 0; font-size: 11px; line-height: 1.9; color: rgba(174, 204, 224, 0.68); }

/* ==========================================================================
   游戏主界面
   ========================================================================== */
#scr-game { padding: 0; }
.game-top {
  position: absolute; left: 0; right: 0; top: 0; height: 58px; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(2, 6, 16, 0.9), rgba(2, 6, 16, 0.36));
  backdrop-filter: blur(16px);
}
.mode-switch { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid rgba(127, 231, 255, 0.12); background: rgba(3, 12, 28, 0.5); }
.mode-switch button { position: relative; padding: 7px 20px; font-size: 12px; letter-spacing: 0.16em; color: rgba(154, 186, 210, 0.56); transition: 0.3s; }
.mode-switch button:hover { color: rgba(219, 243, 255, 0.86); }
.mode-switch button.active { color: #eafcff; background: linear-gradient(100deg, rgba(30, 92, 179, 0.5), rgba(42, 121, 181, 0.18)); box-shadow: 0 0 24px rgba(52, 141, 227, 0.12); }
.mode-switch button.active:after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 2px; height: 1px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.top-actions { display: flex; align-items: center; gap: 2px; min-width: 170px; justify-content: flex-end; }
.top-actions .mobile-only { display: none; }
.top-actions button { padding: 7px 9px; font-size: 11px; color: rgba(171, 200, 220, 0.62); letter-spacing: 0.1em; transition: 0.25s; }
.top-actions button:hover { color: var(--cyan); text-shadow: 0 0 14px rgba(127, 231, 255, 0.6); }

.game-grid {
  position: absolute; inset: 58px 12px 12px; display: grid;
  grid-template-columns: 292px minmax(0, 1fr) 74px; gap: 10px;
}
.left-rail { display: flex; flex-direction: column; gap: 9px; min-height: 0; overflow: hidden; }
.right-rail { display: flex; flex-direction: column; gap: 5px; align-items: stretch; min-height: 0; }

/* 面板 */
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.panel-title { font: 500 9px/1 var(--latin); letter-spacing: 0.18em; color: rgba(127, 231, 255, 0.52); }
.panel-meta { display: inline-flex; align-items: center; gap: 5px; font: 500 8px/1 var(--sans); letter-spacing: 0.12em; color: rgba(136, 166, 190, 0.4); }
.live-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.world-panel { padding: 13px 14px 12px; flex: none; }
.world-name { font-size: 20px; letter-spacing: 0.16em; margin: 1px 0 5px; }
.world-time { color: rgba(202, 228, 243, 0.68); font-size: 10.5px; letter-spacing: 0.03em; line-height: 1.65; }
.world-bar { height: 1px; margin: 10px 0; background: linear-gradient(90deg, rgba(127, 231, 255, 0.36), rgba(127, 231, 255, 0.02)); }
.world-hint { font-size: 10px; line-height: 1.6; color: rgba(127, 157, 184, 0.46); }

.player-panel { padding: 14px; flex: none; }
.player-row { display: flex; align-items: stretch; gap: 12px; margin-bottom: 8px; min-height: 112px; }
.player-avatar {
  width: 86px; height: 112px; flex: none; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
  border: 1px solid rgba(127, 231, 255, 0.24); color: rgba(219, 246, 255, 0.82); font-size: 21px;
  background:
    radial-gradient(circle at 50% 30%, hsla(var(--h, 205), 70%, 55%, 0.32), transparent 66%),
    linear-gradient(160deg, rgba(9, 28, 56, 0.9), rgba(3, 9, 20, 0.9));
  box-shadow: inset 0 0 18px rgba(127, 231, 255, 0.08);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.player-id { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.player-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }
.player-name { font-size: 19px; letter-spacing: 0.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-sub { font-size: 10px; color: rgba(136, 169, 194, 0.6); margin-top: 3px; line-height: 1.5; }
.player-loc { display: flex;
  margin-top: 8px; align-items: center; gap: 7px; margin: 8px 0 2px; color: rgba(198, 228, 243, 0.78); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-loc:before { content: '⌖'; color: var(--cyan); font-size: 13px; flex: none; }
.buff-title { font: 500 8px/1 var(--sans); color: rgba(123, 158, 183, 0.46); letter-spacing: 0.16em; margin: 10px 0 6px; }
.buffs { display: flex; flex-wrap: wrap; gap: 4px; max-height: 66px; overflow: hidden; }
.buff { font-size: 8.5px; line-height: 1; padding: 5px 7px; border: 1px solid rgba(232, 201, 138, 0.18); color: rgba(235, 216, 172, 0.78); background: rgba(113, 84, 31, 0.1); cursor: default; }
.buff:hover { border-color: rgba(232, 201, 138, 0.42); }

.danmaku-panel { padding: 11px 12px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.danmaku-list { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; justify-content: flex-start; gap: 5px; padding-right: 3px; mask-image: linear-gradient(180deg, transparent, #000 16%, #000 100%); }
.danmaku-item { position: relative; font-size: 9.5px; line-height: 1.55; color: rgba(182, 211, 230, 0.64); padding: 5px 7px; border-left: 1px solid rgba(127, 231, 255, 0.1); animation: danmuIn 0.55s var(--ease) both; background: linear-gradient(90deg, rgba(26, 75, 135, 0.1), transparent); }
.danmaku-item b { color: rgba(127, 231, 255, 0.62); font-weight: 400; margin-right: 5px; }
.danmaku-item b:after { content: '：'; color: rgba(127, 157, 184, 0.4); }
.danmaku-item:nth-child(3n) b { color: rgba(232, 201, 138, 0.72); }
.danmaku-item:nth-child(3n+1) b { color: rgba(255, 159, 190, 0.68); }
@keyframes danmuIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.danmaku-input { display: flex; gap: 4px; margin-top: 7px; }
.danmaku-input input { padding: 6px 8px; font-size: 9.5px; }
.danmaku-input button { padding: 0 9px; border: 1px solid rgba(127, 231, 255, 0.14); color: var(--cyan); font-size: 10px; flex: none; }
.danmaku-input button:hover { border-color: rgba(127, 231, 255, 0.5); }

/* 中栏 */
.story-main {
  position: relative; min-width: 0; min-height: 0; overflow: hidden;
  border: 1px solid rgba(127, 231, 255, 0.09);
  background: linear-gradient(180deg, rgba(3, 10, 24, 0.62), rgba(2, 7, 17, 0.38));
  backdrop-filter: blur(10px);
}
.story-main:before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 0%, rgba(40, 110, 200, 0.08), transparent 48%); }
.story-main:after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 32px; pointer-events: none; z-index: 2; background: linear-gradient(180deg, rgba(2, 5, 13, 0.9), rgba(2, 5, 13, 0)); }
.story-mode { position: absolute; inset: 0; display: none; flex-direction: column; min-height: 0; }
.story-mode.active { display: flex; animation: modeIn 0.5s var(--ease); }
@keyframes modeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.story-feed { flex: 1; overflow-y: auto; padding: 34px clamp(24px, 5vw, 76px) 18px; scroll-behavior: smooth; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 46px); mask-image: linear-gradient(180deg, transparent 0, #000 46px); }
.story-feed::-webkit-scrollbar { width: 4px; }
.story-feed::-webkit-scrollbar-thumb { background: rgba(127, 231, 255, 0.16); }

.story-row { position: relative; margin: 0 auto 30px; max-width: 820px; animation: storyIn 0.6s var(--ease) both; }
@keyframes storyIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.story-row.user { display: flex; justify-content: flex-end; }
.user-bubble {
  max-width: 76%; padding: 12px 16px; border-right: 1px solid rgba(127, 231, 255, 0.36);
  background: linear-gradient(270deg, rgba(25, 67, 123, 0.38), rgba(15, 36, 70, 0.1));
  color: rgba(215, 239, 251, 0.86); font-size: 13px; line-height: 1.9; letter-spacing: 0.03em;
}
.story-row.ai { padding-left: 28px; }
.story-row.ai:before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px;
  background: linear-gradient(180deg, var(--cyan), rgba(127, 231, 255, 0.02)); box-shadow: 0 0 16px rgba(127, 231, 255, 0.28);
}
.story-mark { position: absolute; left: -7px; top: 4px; width: 15px; height: 15px; border: 1px solid rgba(127, 231, 255, 0.46); transform: rotate(45deg); background: #051225; box-shadow: 0 0 14px rgba(127, 231, 255, 0.16); }
.story-text { font-size: var(--story-size, 15.5px); line-height: 2.08; letter-spacing: 0.035em; color: rgba(223, 239, 249, 0.9); }
.story-text p { margin: 0 0 1.02em; }
.story-text p:last-child { margin-bottom: 0; }
.story-text .speaker-line { position: relative; padding-left: 14px; margin: 0.38em 0; }
.story-text .speaker-line:before { content: ''; position: absolute; left: 0; top: 0.82em; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
.story-text p.speaker-line.dlg { padding-left: 0; margin: 0.5em 0; display: flex; align-items: baseline; gap: 8px; }
.story-text p.speaker-line.dlg:before { display: none; }
.story-text p.speaker-line.dlg .speaker { flex: none; min-width: 3.4em; color: var(--gold); font-size: 0.84em; letter-spacing: 0.1em; }
.story-text p.speaker-line.dlg .quote { color: rgba(236, 247, 255, 0.95); }
.story-text p.scene-cue { margin: 1.1em 0 0.7em; padding: 4px 10px 4px 12px; border-left: 1px solid rgba(127, 231, 255, 0.28); font-size: 0.78em; letter-spacing: 0.18em; color: rgba(127, 231, 255, 0.58); background: linear-gradient(90deg, rgba(127, 231, 255, 0.05), transparent 70%); }
.story-text .speaker { color: var(--cyan); font-weight: 500; margin-right: 4px; letter-spacing: 0.08em; }
.story-text em { color: rgba(190, 219, 237, 0.66); font-style: normal; }
.story-text strong { color: #eafaff; font-weight: 500; }
.story-text .mention { color: var(--gold); border-bottom: 1px solid rgba(232, 201, 138, 0.18); }
.story-text .sys-line { color: rgba(127, 231, 255, 0.64); font-size: 0.86em; letter-spacing: 0.08em; border-left: 1px solid rgba(127, 231, 255, 0.24); padding-left: 9px; margin: 0.6em 0; }
.story-text p.dialogue { position: relative; padding-left: 14px; color: rgba(236, 247, 255, 0.94); }
.story-text p.dialogue:before { content: ''; position: absolute; left: 0; top: 0.35em; bottom: 0.35em; width: 1px; background: linear-gradient(180deg, rgba(127, 231, 255, 0.28), rgba(127, 231, 255, 0.04)); }
.story-meta { margin-top: 10px; font: 500 8.5px/1.5 var(--sans); color: rgba(118, 149, 174, 0.34); letter-spacing: 0.1em; display: flex; gap: 10px; }
.story-actions { position: absolute; right: 0; top: -6px; display: flex; gap: 3px; opacity: 0; transform: translateY(4px); transition: 0.25s; z-index: 3; }
.story-row.ai:hover .story-actions { opacity: 1; transform: none; }
.story-actions button { padding: 4px 8px; border: 1px solid rgba(127, 231, 255, 0.2); background: rgba(3, 12, 26, 0.86); color: rgba(184, 224, 246, 0.78); font-size: 9px; letter-spacing: 0.04em; }
.story-actions button:hover { color: #eafcff; border-color: rgba(127, 231, 255, 0.56); }
.msg-raw { display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; margin: 0; padding: 14px; max-height: 320px; overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap; word-break: break-word; font: 11.5px/1.75 'Cascadia Code', 'Consolas', monospace; color: rgba(207, 232, 246, 0.86); background: rgba(2, 8, 18, 0.7); border: 1px solid rgba(127, 231, 255, 0.12); }
.story-meta .dot { color: rgba(127, 231, 255, 0.24); }
.story-caret { display: inline-block; width: 7px; height: 15px; background: rgba(127, 231, 255, 0.62); margin-left: 3px; vertical-align: -2px; animation: caret 0.9s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.story-empty { max-width: 520px; margin: 16vh auto 0; text-align: center; color: rgba(127, 157, 184, 0.52); }
.story-empty b { display: block; margin-bottom: 10px; font-weight: 400; font-size: 16px; letter-spacing: 0.2em; color: rgba(206, 234, 250, 0.76); }
.story-empty p { font-size: 11px; line-height: 1.9; }
.typing-dots { display: inline-flex; gap: 3px; margin-left: 6px; }
.typing-dots i { width: 3px; height: 3px; border-radius: 50%; background: var(--cyan); animation: dot 1.2s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 100% { opacity: 0.2; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

/* 富媒体 · 星图 8 类使用 xingtu-rich.css；这里只保留 2.0 的行内物品标签 */
.rm-item { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 3px; margin: 0 2px; border: 1px solid rgba(232, 201, 138, 0.24); background: rgba(232, 201, 138, 0.06); color: rgba(240, 220, 180, 0.88); font-size: 0.78em; vertical-align: 2px; }
.rm-item i { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 10px; background: rgba(232, 201, 138, 0.14); color: var(--gold); }

/* 输入区 */
.composer { padding: 11px 20px 15px; border-top: 1px solid rgba(127, 231, 255, 0.08); background: linear-gradient(180deg, rgba(2, 8, 19, 0.3), rgba(1, 5, 14, 0.82)); }
.composer-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font: 500 8.5px/1.4 var(--sans); letter-spacing: 0.1em; color: rgba(124, 156, 181, 0.44); }
.composer-box { display: flex; align-items: flex-end; gap: 7px; }
.composer-box textarea { min-height: 44px; max-height: 150px; padding: 11px 13px; font-size: 12.5px; line-height: 1.65; background: rgba(3, 12, 28, 0.48); }
.composer-box .send {
  position: relative; min-width: 76px; min-height: 44px; border: 1px solid rgba(127, 231, 255, 0.34);
  background: linear-gradient(135deg, rgba(28, 91, 181, 0.46), rgba(12, 39, 80, 0.38)); color: #e9fbff;
  letter-spacing: 0.18em; font-size: 11.5px; flex: none; overflow: hidden;
}
.composer-box .send i { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.16) 50%, transparent 80%); transform: translateX(-130%); transition: transform 0.6s; }
.composer-box .send:hover i { transform: translateX(130%); }
.composer-box .send:hover { box-shadow: 0 0 26px rgba(73, 163, 255, 0.22); }
.composer-box .send.busy { color: rgba(255, 255, 255, 0.5); }
.composer-tools { display: flex; gap: 3px; margin-top: 7px; flex-wrap: wrap; }
.composer-tools button { padding: 5px 8px; border: 1px solid rgba(127, 231, 255, 0.08); color: rgba(151, 185, 208, 0.56); font-size: 9.5px; letter-spacing: 0.04em; transition: 0.25s; }
.composer-tools button:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.32); background: rgba(31, 87, 158, 0.1); }
.composer-tools button.danger { color: rgba(255, 109, 136, 0.7); }

/* 右栏 */
.rail-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 54px; flex: 1; border: 1px solid rgba(127, 231, 255, 0.07); background: rgba(7, 20, 43, 0.26);
  transition: 0.35s; overflow: hidden;
}
.rail-btn:before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(41, 121, 220, 0.2), transparent 62%); opacity: 0; transition: 0.35s; }
.rail-btn:hover { border-color: rgba(127, 231, 255, 0.38); transform: translateX(-3px); box-shadow: 0 0 22px rgba(35, 120, 214, 0.12); }
.rail-btn:hover:before { opacity: 1; }
.rail-ico { font-size: 17px; color: rgba(127, 231, 255, 0.66); line-height: 1; position: relative; z-index: 1; }
.rail-btn b { font-size: 9px; font-weight: 400; letter-spacing: 0.12em; color: rgba(185, 211, 228, 0.7); position: relative; z-index: 1; }
.rail-btn.danger .rail-ico { color: rgba(255, 109, 136, 0.5); }
.rail-btn.danger:hover { border-color: rgba(255, 109, 136, 0.32); }
.rail-btn:after { content: attr(data-tip); position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%) translateX(6px); opacity: 0; pointer-events: none; font-size: 9px; letter-spacing: 0.12em; color: var(--cyan); background: rgba(3, 10, 22, 0.92); border: 1px solid rgba(127, 231, 255, 0.18); padding: 5px 8px; white-space: nowrap; transition: 0.25s; }
.rail-btn:hover:after { opacity: 1; transform: translateY(-50%) translateX(0); }

/* 关闭后的入梦浮标 */
.ymdq-orb {
  position: fixed; right: 24px; bottom: 24px; z-index: 2147483001;
  width: 62px; height: 62px; border-radius: 50%; display: none;
  align-items: center; justify-content: center; flex-direction: column; gap: 1px;
  border: 1px solid rgba(127, 231, 255, 0.34);
  background: radial-gradient(circle at 50% 38%, rgba(31, 92, 170, 0.7), rgba(3, 10, 22, 0.94) 70%);
  box-shadow: 0 0 30px rgba(47, 135, 255, 0.24), inset 0 0 20px rgba(127, 231, 255, 0.08);
  color: rgba(225, 246, 255, 0.9); font-size: 11px; letter-spacing: 0.12em;
  backdrop-filter: blur(10px); transition: 0.35s var(--ease);
}
.ymdq-orb .orb-ring { position: absolute; inset: -5px; border-radius: 50%; border: 1px solid rgba(127, 231, 255, 0.16); animation: orbSpin 12s linear infinite; }
.ymdq-orb .orb-ring:before { content: ''; position: absolute; left: 50%; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
@keyframes orbSpin { to { transform: rotate(360deg); } }
.ymdq-orb b { font-weight: 400; }
.ymdq-orb:hover { transform: translateY(-3px) scale(1.04); border-color: rgba(127, 231, 255, 0.7); box-shadow: 0 0 46px rgba(47, 135, 255, 0.4); }
#ymdq-app.closed { background: transparent !important; pointer-events: none; }
#ymdq-app.closed > *:not(.ymdq-orb) { display: none !important; }
#ymdq-app.closed .ymdq-orb { display: flex; pointer-events: auto; }


/* 星图 · 多场景美化 蓝黑纯 CSS（原样照搬，仅整理换行） */
@import url('https://fonts.googleapis.com/css2?family=Zhi+Mang+Xing&family=Ma+Shan+Zheng&display=swap');@keyframes gxIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}@keyframes gxShine{0%{left:-70%}60%,100%{left:220%}}@keyframes gxPulse{0%,100%{opacity:1}50%{opacity:.2}}@keyframes gxScan{0%{top:-30%}100%{top:130%}}@keyframes gxSpin{from{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes gxBorderFlow{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}.gx{display:block;margin:16px auto;padding:0;max-width:560px;color:#c5dfff;line-height:1.55;font-family:-apple-system,"PingFang SC","Microsoft YaHei","Segoe UI","Noto Sans SC",sans-serif;box-sizing:border-box;animation:gxIn .6s cubic-bezier(.2,.9,.3,1)}.gx *{box-sizing:border-box}.gx .gx-row{display:block;position:relative}.gx .gx-k{display:inline;color:inherit}.gx .gx-v{display:inline}.gx-msg-l,.gx-msg-r{position:relative}.gx-msg-l{text-align:left}.gx-msg-r{text-align:right}.gx-msg-l .k-发信人,.gx-msg-r .k-发信人{display:inline-block;font-size:.74em;letter-spacing:.5px;color:#7dbbff;margin:0 8px 3px 0}.gx-msg-r .k-发信人{margin:0 0 3px 8px}.gx-msg-l .k-时间,.gx-msg-r .k-时间{display:inline-block;font-size:.72em;color:#8fa4c2;margin:0 0 3px 0}.gx-msg-l .k-发信人 .gx-k,.gx-msg-r .k-发信人 .gx-k,.gx-msg-l .k-时间 .gx-k,.gx-msg-r .k-时间 .gx-k{display:none}.gx-msg-l .k-内容,.gx-msg-r .k-内容{display:block;width:fit-content;max-width:78%;padding:10px 14px;font-size:.9em;line-height:1.55;word-break:break-word;border-radius:12px;margin:0 0 8px;box-shadow:0 4px 14px rgba(0,0,0,.5)}.gx-msg-l .k-内容{margin-right:auto;text-align:left;background:linear-gradient(160deg,#0a1225,#050a18);border:1px solid rgba(125,187,255,.22);color:#c5dfff}.gx-msg-r .k-内容{margin-left:auto;text-align:left;background:linear-gradient(160deg,#12295c,#0a1830);border:1px solid rgba(125,187,255,.3);color:#e0efff}.gx-msg-l .k-内容 .gx-k,.gx-msg-r .k-内容 .gx-k{display:none}.gx-msg-l .k-内容 .gx-v,.gx-msg-r .k-内容 .gx-v{display:block}.gx-frame,.gx-noise,.gx-circuits,.gx-scan,.gx-corner,.gx-code{display:none}.gx-info{position:relative;padding:48px 48px 56px;border-radius:8px;color:#c8ddf5;background:linear-gradient(120deg,rgba(150,205,255,.07),transparent 32%,transparent 68%,rgba(120,190,255,.05)),linear-gradient(165deg,rgba(12,20,40,.82),rgba(5,10,22,.9) 55%,rgba(3,6,14,.94));backdrop-filter:blur(14px) saturate(1.15);-webkit-backdrop-filter:blur(14px) saturate(1.15);box-shadow:0 0 0 1px rgba(130,190,255,.12),inset 0 1px 0 rgba(150,205,255,.16),inset 0 -1px 0 rgba(150,205,255,.06),inset 0 0 70px rgba(60,130,240,.07),0 30px 90px rgba(0,0,0,.85),0 0 70px rgba(80,160,255,.16)}.gx-info::before{content:'';position:absolute;inset:0;border-radius:8px;padding:1px;pointer-events:none;background:linear-gradient(135deg,rgba(20,40,70,.6),rgba(120,190,255,.5) 30%,rgba(232,244,255,.85) 50%,rgba(80,150,240,.5) 70%,rgba(20,40,70,.6));background-size:300% 300%;animation:gxBorderFlow 9s linear infinite;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.gx-info .gx-frame{display:block;position:absolute;inset:12px;border-radius:3px;border:1px solid rgba(130,190,255,.13);pointer-events:none}.gx-info .gx-noise{display:block;position:absolute;inset:0;border-radius:8px;pointer-events:none;background:repeating-linear-gradient(0deg,rgba(120,180,255,.025) 0 1px,transparent 1px 4px),repeating-linear-gradient(90deg,rgba(120,180,255,.02) 0 1px,transparent 1px 11px),radial-gradient(rgba(160,210,255,.05) 1px,transparent 1.3px);background-size:100% 4px,100% 11px,7px 7px;opacity:.6}.gx-info .gx-circuits{display:block;position:absolute;inset:0;border-radius:8px;pointer-events:none;opacity:.35;background:linear-gradient(#5f9ad0,#5f9ad0) 36px 0/1px 64px,linear-gradient(#5f9ad0,#5f9ad0) 36px 64px/96px 1px,radial-gradient(circle,#9fc4ff 0 1.5px,transparent 2px) 36px 64px/6px 6px,linear-gradient(#5f9ad0,#5f9ad0) calc(100% - 46px) 0/1px 48px,linear-gradient(#5f9ad0,#5f9ad0) calc(100% - 46px) 48px/-80px 1px,radial-gradient(circle,#9fc4ff 0 1.5px,transparent 2px) calc(100% - 46px) 48px/6px 6px,linear-gradient(#5f9ad0,#5f9ad0) 46px calc(100% - 52px)/92px 1px,linear-gradient(#5f9ad0,#5f9ad0) 138px calc(100% - 52px)/1px 52px,radial-gradient(circle,#9fc4ff 0 1.5px,transparent 2px) 138px calc(100% - 52px)/6px 6px,linear-gradient(#5f9ad0,#5f9ad0) calc(100% - 56px) calc(100% - 40px)/1px 40px,linear-gradient(#5f9ad0,#5f9ad0) calc(100% - 130px) calc(100% - 1px)/74px 1px,radial-gradient(circle,#9fc4ff 0 1.5px,transparent 2px) calc(100% - 56px) calc(100% - 1px)/6px 6px;background-repeat:no-repeat}.gx-info .gx-scan{display:block;position:absolute;inset:0;border-radius:8px;overflow:hidden;pointer-events:none}.gx-info .gx-scan::before{content:'';position:absolute;left:0;right:0;top:-30%;height:22%;background:linear-gradient(180deg,transparent,rgba(150,205,255,.07),transparent);animation:gxScan 6.5s linear infinite}.gx-info .gx-corner{display:block;position:absolute;width:24px;height:24px;pointer-events:none}.gx-info .gx-corner::before{content:'';position:absolute;inset:0;opacity:.8}.gx-info .gx-corner::after{content:'◆';position:absolute;font-size:7px;color:#7dbbff;text-shadow:0 0 6px rgba(120,190,255,.9)}.gx-info .gx-tl{top:7px;left:7px}.gx-info .gx-tl::before{background:linear-gradient(#9fc4ff,#9fc4ff) left top/22px 1px,linear-gradient(#9fc4ff,#9fc4ff) left top/1px 22px;background-repeat:no-repeat}.gx-info .gx-tl::after{top:7px;left:7px}.gx-info .gx-tr{top:7px;right:7px}.gx-info .gx-tr::before{background:linear-gradient(#9fc4ff,#9fc4ff) right top/22px 1px,linear-gradient(#9fc4ff,#9fc4ff) right top/1px 22px;background-repeat:no-repeat}.gx-info .gx-tr::after{top:7px;right:7px}.gx-info .gx-bl{bottom:7px;left:7px}.gx-info .gx-bl::before{background:linear-gradient(#9fc4ff,#9fc4ff) left bottom/22px 1px,linear-gradient(#9fc4ff,#9fc4ff) left bottom/1px 22px;background-repeat:no-repeat}.gx-info .gx-bl::after{bottom:7px;left:7px}.gx-info .gx-br{bottom:7px;right:7px}.gx-info .gx-br::before{background:linear-gradient(#9fc4ff,#9fc4ff) right bottom/22px 1px,linear-gradient(#9fc4ff,#9fc4ff) right bottom/1px 22px;background-repeat:no-repeat}.gx-info .gx-br::after{bottom:7px;right:7px}.gx-info .gx-code{display:block;position:absolute;top:50px;right:48px;font-size:10px;letter-spacing:1px;color:rgba(150,195,240,.45);font-family:"SFMono-Regular",Consolas,"Courier New",monospace}.gx-info .k-类型{display:inline-block;padding:3px 12px;font-size:.72em;letter-spacing:3px;color:#9fd0ff;border:1px solid rgba(157,208,255,.35);border-radius:2px;background:rgba(157,208,255,.05);box-shadow:0 0 12px rgba(125,187,255,.16);text-shadow:0 0 8px rgba(120,190,255,.6)}.gx-info .k-类型::before{content:'◆ ';color:#7dbbff}.gx-info .k-类型 .gx-k{display:none}.gx-info .k-标题{font-size:1.3em;font-weight:300;text-align:center;letter-spacing:.6em;text-indent:.6em;color:#dceeff;text-shadow:0 0 8px rgba(150,210,255,.8),0 0 26px rgba(90,160,240,.45);margin:22px 0 10px}.gx-info .k-标题 .gx-k{display:none}.gx-info .k-标题 .gx-v{display:block}.gx-info .k-署名{text-align:center;font-size:.8em;letter-spacing:3px;color:rgba(150,195,240,.55);padding-bottom:14px;margin-bottom:18px;border-bottom:1px solid rgba(157,208,255,.18)}.gx-info .k-署名::before,.gx-info .k-署名::after{content:'─';color:rgba(157,208,255,.5);margin:0 10px}.gx-info .k-署名 .gx-k{display:none}.gx-info .k-正文{font-size:.94em;line-height:1.9em;margin:0;padding:0 0 2px;text-indent:2em;text-align:justify;color:#c4daf2;background-image:repeating-linear-gradient(0deg,transparent 0 calc(1.9em - 1px),rgba(120,190,255,.10) calc(1.9em - 1px) 1.9em)}.gx-info .k-正文 .gx-k{display:none}.gx-info .k-正文 .gx-v{display:block}.gx-info .k-落款{text-align:right;font-size:.82em;letter-spacing:2px;color:rgba(160,200,240,.6);margin-top:28px}.gx-info .k-落款 .gx-k{display:none}.gx-info .k-印章{display:none}.gx-loc{position:relative;padding:20px 22px 20px 126px;min-height:124px;border-radius:12px;background:radial-gradient(circle at 12% 50%,rgba(59,130,246,.18),transparent 62%),linear-gradient(160deg,#0a1225,#050a18);border:1px solid rgba(125,187,255,.22);box-shadow:0 10px 36px rgba(0,0,0,.7),0 0 30px rgba(125,187,255,.12)}.gx-loc::before{content:'';position:absolute;left:24px;top:50%;width:78px;height:78px;margin-top:-39px;border-radius:50%;border:1px solid rgba(125,187,255,.45);background:conic-gradient(from 0deg,rgba(125,187,255,.55),transparent 25%,rgba(125,187,255,.55) 50%,transparent 75%,rgba(125,187,255,.55));box-shadow:0 0 24px rgba(125,187,255,.28),inset 0 0 20px rgba(125,187,255,.14);animation:gxSpin 12s linear infinite}.gx-loc::after{content:'◈';position:absolute;left:24px;top:50%;width:78px;height:78px;margin-top:-39px;line-height:78px;text-align:center;font-size:17px;color:#9fd0ff;text-shadow:0 0 14px rgba(125,187,255,.95)}.gx-loc .k-地点{font-size:1.18em;font-weight:700;letter-spacing:1px;color:#e0efff;text-shadow:0 0 16px rgba(125,187,255,.5);margin-bottom:8px}.gx-loc .k-地点 .gx-k{display:none}.gx-loc .k-坐标,.gx-loc .k-距离{display:flex;gap:10px;font-size:.82em;margin-bottom:4px}.gx-loc .k-坐标 .gx-k,.gx-loc .k-距离 .gx-k{display:inline;flex:0 0 4.2em;white-space:nowrap;color:#7dbbff;letter-spacing:2px}.gx-loc .k-坐标 .gx-v,.gx-loc .k-距离 .gx-v{display:inline;color:#9fb0c8}.gx-loc .k-描述{margin-top:10px;padding-top:9px;border-top:1px dashed rgba(125,187,255,.18);font-size:.86em;color:#8fa4c2}.gx-loc .k-描述 .gx-k{display:none}.gx-gift{position:relative;overflow:hidden;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;padding:20px 24px;text-align:center;border-radius:12px;background:radial-gradient(circle at 50% 0%,rgba(59,130,246,.3),transparent 66%),linear-gradient(160deg,#12295c,#050a18);border:1px solid rgba(125,187,255,.4);box-shadow:0 10px 36px rgba(0,0,0,.75),0 0 34px rgba(125,187,255,.18)}.gx-gift::after{content:'';position:absolute;top:0;left:-70%;width:60%;height:100%;background:linear-gradient(90deg,transparent,rgba(157,208,255,.14),transparent);transform:skewX(-25deg);animation:gxShine 5s ease-in-out infinite;pointer-events:none}.gx-gift .k-类型{order:1;display:inline-block;padding:3px 12px;border-radius:20px;font-size:.74em;letter-spacing:2px;color:#9fd0ff;border:1px solid rgba(157,208,255,.45);background:rgba(157,208,255,.1)}.gx-gift .k-类型 .gx-k{display:none}.gx-gift .k-金额,.gx-gift .k-物品{order:2;flex:0 0 100%;font-size:1.7em;font-weight:700;letter-spacing:2px;color:#eaf4ff;text-shadow:0 0 22px rgba(125,187,255,.85);margin:12px 0 8px}.gx-gift .k-金额 .gx-k,.gx-gift .k-物品 .gx-k{display:none}.gx-gift .k-发送者,.gx-gift .k-接收者{order:3;display:inline-block;font-size:.8em;margin:0 8px}.gx-gift .k-发送者 .gx-k,.gx-gift .k-接收者 .gx-k{display:inline;color:#8fa4c2}.gx-gift .k-发送者 .gx-v,.gx-gift .k-接收者 .gx-v{display:inline;color:#c5dfff;font-weight:700}.gx-gift .k-备注{order:4;flex:0 0 100%;margin-top:12px;padding-top:11px;border-top:1px dashed rgba(125,187,255,.2);font-size:.82em;color:#8fa4c2}.gx-gift .k-备注 .gx-k{display:none}.gx-panel{position:relative;overflow:hidden;padding:16px 20px 18px;border-radius:10px;background:linear-gradient(160deg,#0a1225,#04080f);border:1px solid rgba(125,187,255,.3);box-shadow:0 10px 36px rgba(0,0,0,.75),0 0 30px rgba(125,187,255,.12)}.gx-panel::before{content:'';position:absolute;left:0;right:0;height:26%;top:-30%;background:linear-gradient(180deg,transparent,rgba(125,187,255,.1),transparent);animation:gxScan 4.5s linear infinite;pointer-events:none}.gx-panel .gx-row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid rgba(125,187,255,.1);font-size:.88em}.gx-panel .gx-k{display:inline;color:#8fa4c2;letter-spacing:1px}.gx-panel .gx-v{display:inline;color:#c5dfff;text-align:right;word-break:break-word}.gx-panel .k-面板,.gx-panel .k-标题{display:inline-block;padding:3px 10px;margin:0 0 4px;font-size:.72em;letter-spacing:2px;color:#7dbbff;border:1px solid rgba(125,187,255,.35);border-radius:3px}.gx-panel .k-面板::after{content:' ● LIVE';color:#9fd0ff;animation:gxPulse 1.4s infinite}.gx-panel .k-标题{float:right;color:#9fd0ff;border-color:rgba(157,208,255,.4)}.gx-panel .k-面板 .gx-k,.gx-panel .k-标题 .gx-k{display:none}.gx-moments{padding:18px 20px;border-radius:12px;background:linear-gradient(160deg,#0a1225,#050a18);border:1px solid rgba(125,187,255,.22);box-shadow:0 10px 36px rgba(0,0,0,.7),0 0 28px rgba(125,187,255,.1)}.gx-moments .k-发布者{font-size:.95em;font-weight:700;letter-spacing:.5px;color:#e0efff;padding-left:34px;margin-bottom:8px;line-height:26px}.gx-moments .k-发布者::before{content:'◈';position:absolute;left:0;top:0;width:26px;height:26px;line-height:26px;text-align:center;border-radius:8px;font-size:13px;color:#04080f;background:linear-gradient(135deg,#7dbbff,#9fd0ff);box-shadow:0 0 14px rgba(125,187,255,.45)}.gx-moments .k-发布者 .gx-k{display:none}.gx-moments .k-内容{font-size:.92em;line-height:1.6;color:#c5dfff;margin-bottom:10px}.gx-moments .k-内容 .gx-k{display:none}.gx-moments .k-点赞{font-size:.8em;color:#9fd0ff;margin-bottom:9px}.gx-moments .k-点赞::before{content:'♥ ';color:#7dbbff}.gx-moments .k-点赞 .gx-k{display:none}.gx-moments [class*="k-评论"]{font-size:.84em;color:#9fb0c8;padding:7px 11px;margin-bottom:5px;border-radius:6px;background:rgba(125,187,255,.06);border-left:2px solid rgba(125,187,255,.4)}.gx-moments [class*="k-评论"] .gx-k{display:none}.gx-media{position:relative;overflow:hidden;display:flex;flex-wrap:wrap;align-items:center;border-radius:10px;background:linear-gradient(160deg,#0a1225,#04080f);border:1px solid rgba(125,187,255,.3);box-shadow:0 10px 36px rgba(0,0,0,.75),0 0 30px rgba(125,187,255,.12)}.gx-media::before{content:'';position:absolute;left:0;right:0;top:0;height:38px;background:linear-gradient(180deg,#12295c,#0a1225);border-bottom:1px solid rgba(125,187,255,.22)}.gx-media .k-类型{order:1;position:relative;z-index:1;display:inline-block;height:38px;line-height:38px;padding:0 15px;font-size:.76em;letter-spacing:2px;color:#c5dfff}.gx-media .k-类型::before{content:'● ';color:#ff3b3b;animation:gxPulse 1.2s infinite}.gx-media .k-类型 .gx-k{display:none}.gx-media .k-时长{order:2;margin-left:auto;position:relative;z-index:1;display:inline-block;height:38px;line-height:38px;padding:0 15px;font-size:.76em;letter-spacing:1px;color:#8fa4c2}.gx-media .k-时长 .gx-k{display:none}.gx-media .k-标题{order:3;flex:0 0 100%;font-size:1.08em;font-weight:700;letter-spacing:2px;color:#e0efff;text-shadow:0 0 14px rgba(125,187,255,.4);padding:13px 15px 11px}.gx-media .k-标题 .gx-k{display:none}.gx-media .k-标题 .gx-v{display:block}.gx-media .k-画面{order:4;flex:0 0 100%;position:relative;min-height:144px;display:flex;align-items:center;justify-content:center;text-align:center;padding:26px 58px 26px 24px;font-size:.9em;line-height:1.6;color:#c5dfff;background:radial-gradient(ellipse at center,rgba(59,130,246,.14),transparent 70%),#04080f;border-top:1px solid rgba(125,187,255,.18);border-bottom:1px solid rgba(125,187,255,.18);text-shadow:0 0 12px rgba(125,187,255,.35)}.gx-media .k-画面::after{content:'▶';position:absolute;right:15px;bottom:13px;width:28px;height:28px;line-height:28px;text-align:center;border-radius:50%;font-size:11px;color:#04080f;background:linear-gradient(135deg,#7dbbff,#9fd0ff);box-shadow:0 0 16px rgba(125,187,255,.5)}.gx-media .k-画面 .gx-k{display:none}.gx-media .k-画面 .gx-v{display:block}.gx-media .k-字幕{order:5;flex:0 0 100%;padding:11px 16px;font-size:.86em;text-align:center;color:#9fd0ff}.gx-media .k-字幕::before{content:'▸ ';color:#7dbbff}.gx-media .k-字幕 .gx-k{display:none}

/* ==========================================================================
   视觉小说
   ========================================================================== */
#vnMode { position: absolute; inset: 0; background: #01030a; overflow: hidden; }
.vn-stage { position: absolute; inset: 0; overflow: hidden; cursor: pointer; }
.vn-stage:after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(1, 3, 9, 0.42), transparent 16%, transparent 80%, rgba(1, 3, 9, 0.52)),
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 2, 8, 0.42) 100%);
}
.vn-stage:before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vn-bg, .vn-bg-next { position: absolute; inset: -6%; transition: opacity 0.9s var(--ease), transform 1.6s var(--ease), filter 1s; transform: scale(1.02); }
.vn-bg-next { opacity: 0; }
.vn-bg-next.show { opacity: 1; }
.vn-bg:before, .vn-bg-next:before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2, 5, 12, 0.72), transparent 38%, transparent 62%, rgba(2, 5, 12, 0.72)), linear-gradient(0deg, rgba(2, 5, 12, 0.88), transparent 46%); }
.vn-bg:after, .vn-bg-next:after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.012) 3px 4px); mix-blend-mode: screen; }
.vn-bg.bg-cloud {
  background:
    radial-gradient(ellipse 60% 26% at 22% 24%, rgba(190, 232, 255, 0.2), transparent 70%),
    radial-gradient(ellipse 54% 22% at 78% 34%, rgba(150, 208, 255, 0.16), transparent 72%),
    radial-gradient(ellipse 70% 30% at 40% 58%, rgba(120, 180, 240, 0.12), transparent 72%),
    radial-gradient(ellipse at 28% 18%, rgba(126, 196, 255, 0.34), transparent 38%),
    radial-gradient(ellipse at 72% 60%, rgba(53, 104, 180, 0.3), transparent 44%),
    linear-gradient(165deg, #06101f 0%, #0b2545 42%, #071322 72%, #02050c 100%);
}
.vn-bg.bg-cloud:before { background: linear-gradient(0deg, rgba(2, 5, 12, 0.92), transparent 42%), radial-gradient(ellipse at 50% 82%, rgba(170, 220, 255, 0.14), transparent 42%); }
.vn-bg.bg-corridor { background: radial-gradient(ellipse at 50% 30%, rgba(196, 160, 96, 0.28), transparent 40%), linear-gradient(180deg, #0b1018 0%, #171410 46%, #06070b 100%); }
.vn-bg.bg-night { background: radial-gradient(circle at 72% 18%, rgba(180, 210, 255, 0.24), transparent 18%), radial-gradient(ellipse at 30% 40%, rgba(36, 67, 128, 0.3), transparent 44%), linear-gradient(170deg, #03060f, #08142a 60%, #02040a); }
.vn-bg.bg-palace { background: radial-gradient(ellipse at 50% 10%, rgba(110, 160, 255, 0.24), transparent 40%), linear-gradient(180deg, #0a1226, #101c3a 55%, #05070f); }
.vn-bg.bg-valley { background: radial-gradient(ellipse at 22% 22%, rgba(106, 190, 160, 0.3), transparent 40%), radial-gradient(ellipse at 78% 70%, rgba(50, 120, 110, 0.24), transparent 46%), linear-gradient(165deg, #04120f, #0a201d 52%, #020807); }
.vn-bg.bg-city { background: radial-gradient(ellipse at 70% 12%, rgba(255, 176, 110, 0.24), transparent 34%), radial-gradient(ellipse at 30% 50%, rgba(60, 90, 150, 0.3), transparent 44%), linear-gradient(170deg, #080a12, #141a2a 48%, #04060c); }
.vn-bg.bg-snow { background: radial-gradient(ellipse at 40% 20%, rgba(210, 235, 255, 0.36), transparent 42%), linear-gradient(170deg, #0a121c, #1b2c3e 56%, #060b12); }
.vn-bg.bg-forest { background: radial-gradient(ellipse at 30% 18%, rgba(110, 180, 140, 0.24), transparent 38%), linear-gradient(170deg, #040d0a, #0b1c16 50%, #020706); }
.vn-bg.bg-void { background: radial-gradient(ellipse at 50% 40%, rgba(120, 90, 220, 0.24), transparent 40%), linear-gradient(170deg, #05040c, #0e0a22 50%, #020207); }
.vn-bg.bg-void:before { background: radial-gradient(ellipse at 50% 50%, transparent 20%, rgba(2, 2, 8, 0.8) 78%); }
.vn-bg.bg-night:after, .vn-bg.bg-void:after { background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3) 0 1px, transparent 1px), radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px); background-size: 190px 190px, 260px 260px; }

.vn-aura { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 28%, rgba(0, 3, 10, 0.7) 100%); }
.vn-mountain { display: none; position: absolute; left: -6%; right: -6%; bottom: 0; height: 40%; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(12, 34, 62, 0.12), #02060e 78%); clip-path: polygon(0 74%, 9% 52%, 18% 64%, 29% 34%, 38% 52%, 48% 40%, 58% 58%, 70% 36%, 80% 56%, 90% 44%, 100% 66%, 100% 100%, 0 100%); opacity: 0.62; }
.vn-mountain.m2 { height: 28%; opacity: 0.42; background: linear-gradient(180deg, rgba(18, 44, 76, 0.14), #02060e 80%); clip-path: polygon(0 62%, 12% 40%, 24% 58%, 36% 32%, 46% 48%, 58% 28%, 70% 52%, 82% 38%, 94% 56%, 100% 42%, 100% 100%, 0 100%); }
.vn-stage.has-scenery .vn-mountain { display: block; }
.vn-title-bg { display: none !important; position: absolute; right: 5%; top: 7%; font-size: clamp(52px, 11vw, 160px); letter-spacing: 0.16em; color: rgba(155, 223, 255, 0.045); writing-mode: vertical-rl; pointer-events: none; font-weight: 300; }
.vn-hud { position: absolute; left: 22px; right: 22px; top: 18px; display: flex; justify-content: space-between; align-items: flex-start; font: 500 8.5px/1.4 var(--sans); letter-spacing: 0.16em; color: rgba(147, 198, 226, 0.46); z-index: 3; }
.vn-chapter { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 12px; color: rgba(206, 234, 250, 0.58); font-size: 10px; letter-spacing: 0.24em; white-space: nowrap; text-shadow: 0 2px 10px #01040b; }
.vn-chapter i { display: block; width: 42px; height: 1px; background: linear-gradient(90deg, transparent, rgba(127, 231, 255, 0.4)); }
.vn-chapter i:last-child { background: linear-gradient(90deg, rgba(127, 231, 255, 0.4), transparent); }
.vn-chip { border: 1px solid rgba(127, 231, 255, 0.12); padding: 6px 9px; background: rgba(2, 9, 22, 0.32); backdrop-filter: blur(8px); display: inline-flex; align-items: center; }
.vn-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 9px; margin-right: 7px; }
.vn-eq i { display: block; width: 2px; background: var(--cyan); animation: eq 1s ease-in-out infinite alternate; }
.vn-eq i:nth-child(2) { animation-delay: 0.2s; }
.vn-eq i:nth-child(3) { animation-delay: 0.4s; }
.vn-eq i:nth-child(4) { animation-delay: 0.1s; }
@keyframes eq { from { height: 2px; opacity: 0.4; } to { height: 9px; opacity: 1; } }
.vn-controls { position: absolute; right: 20px; top: 56px; z-index: 7; display: flex; flex-direction: column; gap: 4px; opacity: 0.9; transition: opacity 0.35s; }
.vn-stage:hover .vn-controls { opacity: 1; }
.vn-controls button { padding: 6px 10px; border: 1px solid rgba(127, 231, 255, 0.12); background: rgba(2, 9, 22, 0.46); color: rgba(178, 211, 232, 0.7); font-size: 9.5px; letter-spacing: 0.08em; backdrop-filter: blur(8px); transition: 0.25s; }
.vn-controls button:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.42); }
.vn-controls button.on { color: var(--cyan); border-color: rgba(127, 231, 255, 0.5); box-shadow: 0 0 14px rgba(127, 231, 255, 0.1); }
.vn-stale { position: absolute; left: 50%; top: 54px; transform: translateX(-50%); z-index: 4; padding: 6px 12px; border: 1px solid rgba(232, 201, 138, 0.25); background: rgba(40, 30, 12, 0.5); color: rgba(232, 201, 138, 0.7); font-size: 9px; letter-spacing: 0.1em; display: none; }
.vn-stale.show { display: block; animation: fadeIn 0.4s; }

.vn-figure { position: absolute; left: 9%; bottom: 20%; width: min(330px, 28vw); height: min(540px, 58vh); display: flex; align-items: flex-end; justify-content: center; transition: 0.7s var(--ease); filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.55)); animation: figureIn 0.9s var(--ease) both; z-index: 2; }
@keyframes figureIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
.vn-figure.hide { display: none; opacity: 0; animation: none; transform: translateY(16px) scale(0.96); }
.figure-img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center bottom; opacity: 0.94; filter: drop-shadow(0 0 34px hsla(var(--h, 210), 75%, 55%, 0.28)); display: none; z-index: 1; }
.figure-img.show { display: block; }
.figure-img.show ~ .figure-silhouette { display: none; }
.figure-silhouette {
  width: 100%; height: 100%; position: relative; background-color: transparent;
  filter: drop-shadow(0 0 26px hsla(var(--h, 210), 75%, 55%, 0.24));
}
.figure-silhouette .fig-body {
  position: absolute; left: 8%; right: 8%; bottom: 0; top: 17%;
  background:
    linear-gradient(180deg, hsla(var(--h, 210), 70%, 72%, 0.34), hsla(var(--h, 210), 66%, 26%, 0.62) 58%, transparent);
  clip-path: polygon(40% 0, 60% 0, 68% 8%, 78% 16%, 92% 30%, 82% 37%, 88% 100%, 12% 100%, 18% 37%, 8% 30%, 22% 16%, 32% 8%);
  border-bottom: 1px solid rgba(127, 231, 255, 0.18);
}
.figure-silhouette .fig-body:after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 40%, rgba(220, 248, 255, 0.18) 50%, transparent 60%); mix-blend-mode: screen; }
.figure-silhouette .fig-head {
  position: absolute; left: 37%; top: 2%; width: 26%; height: 16%; border-radius: 48% 48% 44% 44%;
  background: radial-gradient(circle at 42% 36%, rgba(240, 252, 255, 0.86), hsla(var(--h, 210), 58%, 34%, 0.52) 30%, transparent 72%);
  box-shadow: 0 0 24px hsla(var(--h, 210), 80%, 60%, 0.18);
}
.figure-silhouette .fig-head:before { content: ''; position: absolute; left: -14%; top: -18%; width: 128%; height: 82%; border-radius: 50% 50% 30% 30%; background: linear-gradient(180deg, hsla(var(--h, 210), 40%, 16%, 0.7), transparent 80%); clip-path: polygon(0 0, 100% 0, 82% 100%, 18% 100%); }
.figure-silhouette .fig-glow { position: absolute; left: 50%; bottom: 10%; width: 120%; height: 30%; transform: translateX(-50%); background: radial-gradient(ellipse, hsla(var(--h, 210), 80%, 60%, 0.16), transparent 68%); filter: blur(18px); }
.figure-name { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 9px; letter-spacing: 0.28em; color: rgba(178, 223, 247, 0.52); white-space: nowrap; }

.vn-dialogue {
  position: absolute; left: 6%; right: 6%; bottom: 5.5%; min-height: 146px; z-index: 3;
  padding: 24px clamp(22px, 4vw, 54px) 24px;
  background: linear-gradient(180deg, rgba(3, 10, 22, 0.78), rgba(2, 6, 15, 0.9));
  border: 1px solid rgba(127, 231, 255, 0.14);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
}
.vn-dialogue:before { content: ''; position: absolute; left: -1px; top: 16%; width: 1px; height: 42%; background: var(--cyan); box-shadow: 0 0 18px var(--cyan); opacity: 0.6; }
.vn-dialogue:after { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(127, 231, 255, 0.04); pointer-events: none; }
.vn-speaker { font-size: 13px; letter-spacing: 0.24em; color: var(--cyan); margin-bottom: 9px; text-shadow: 0 0 18px rgba(127, 231, 255, 0.28); }
.vn-text { font-size: clamp(13px, 1.25vw, 15.5px); line-height: 2; letter-spacing: 0.04em; color: rgba(228, 242, 252, 0.9); min-height: 3.4em; }
.vn-next-mark { position: absolute; right: 18px; bottom: 12px; color: rgba(127, 231, 255, 0.55); font-size: 10px; animation: nextBob 1.4s ease-in-out infinite; }
@keyframes nextBob { 0%, 100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(4px); opacity: 0.9; } }
.vn-empty { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; background: radial-gradient(ellipse at center, rgba(3, 9, 20, 0.72), rgba(1, 3, 9, 0.92)); color: rgba(188, 214, 232, 0.82); font-size: 12px; line-height: 1.9; letter-spacing: 0.04em; pointer-events: none; }
.vn-empty b { font-weight: 400; font-size: 17px; letter-spacing: 0.2em; color: rgba(232, 248, 255, 0.94); }
.vn-empty.hide { display: none; }
.vn-empty-actions { display: flex; gap: 8px; margin-top: 16px; pointer-events: auto; }
.vn-empty-actions button { padding: 9px 18px; border: 1px solid rgba(127, 231, 255, 0.38); background: rgba(10, 32, 64, 0.72); color: #dff8ff; font-size: 11.5px; letter-spacing: 0.1em; transition: 0.25s; }
.vn-empty-actions button:hover { border-color: rgba(127, 231, 255, 0.8); background: rgba(24, 72, 140, 0.6); box-shadow: 0 0 24px rgba(47, 135, 255, 0.2); }
@media (max-width: 720px) {
  .vn-controls { top: 46px; right: 8px; }
  .vn-controls button { padding: 6px 8px; font-size: 9px; }
  .vn-empty b { font-size: 14px; }
  .vn-empty { font-size: 11px; padding: 0 18px; }
  .vn-empty-actions { flex-direction: column; width: 100%; max-width: 220px; }
  .vn-empty-actions button { width: 100%; }
}

/* 特效层 */
.vn-fx { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.vn-fx .fx-mist { position: absolute; inset: -20%; background: radial-gradient(ellipse at 30% 60%, rgba(160, 220, 255, 0.14), transparent 50%), radial-gradient(ellipse at 70% 40%, rgba(160, 220, 255, 0.1), transparent 50%); filter: blur(30px); animation: mistDrift 18s ease-in-out infinite alternate; }
@keyframes mistDrift { to { transform: translate3d(6%, -4%, 0) scale(1.1); } }
.vn-fx .fx-petal { position: absolute; top: -10%; width: 8px; height: 8px; border-radius: 60% 20% 60% 20%; background: rgba(255, 190, 214, 0.42); animation: petalFall linear infinite; }
@keyframes petalFall { to { transform: translate3d(60px, 110vh, 0) rotate(320deg); opacity: 0; } }
.vn-fx .fx-rain { position: absolute; top: -20%; width: 1px; height: 60px; background: linear-gradient(180deg, transparent, rgba(170, 220, 255, 0.4)); animation: rainFall linear infinite; }
@keyframes rainFall { to { transform: translate3d(-30px, 120vh, 0); } }
.vn-fx .fx-snow { position: absolute; top: -5%; width: 4px; height: 4px; border-radius: 50%; background: rgba(230, 248, 255, 0.6); filter: blur(0.4px); animation: snowFall linear infinite; }
@keyframes snowFall { to { transform: translate3d(40px, 110vh, 0); opacity: 0.2; } }
.vn-fx .fx-flash { position: absolute; inset: 0; background: #dff6ff; opacity: 0; animation: flash 1.4s ease-out forwards; pointer-events: none; }
@keyframes flash { 0% { opacity: 0.55; } 100% { opacity: 0; } }
.vn-fx .fx-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, rgba(127, 231, 255, 0.14), transparent 42%); animation: glowPulse 4s ease-in-out infinite; }
@keyframes glowPulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* 回忆分镜 */
.vn-flash-label {
  position: absolute; top: 70px; left: 50%; transform: translateX(-50%);
  z-index: 8; display: none; align-items: center; gap: 8px;
  padding: 4px 14px; border: 1px solid rgba(232, 201, 138, 0.45);
  color: #f0d8a6; font-size: 10px; letter-spacing: 0.3em;
  background: rgba(10, 8, 5, 0.45); pointer-events: none;
}
.vn-flash-label:before, .vn-flash-label:after {
  content: ''; width: 18px; height: 1px; background: rgba(232, 201, 138, 0.5);
}
.vn-stage.vn-flashback .vn-flash-label { display: flex; }
.vn-stage.vn-flashback .vn-bg {
  filter: sepia(0.58) saturate(0.66) contrast(0.94) brightness(0.9);
}
.vn-stage.vn-flashback .vn-figure,
.vn-stage.vn-flashback .vn-user-figure {
  filter: grayscale(0.32) sepia(0.28) brightness(0.92);
}
.vn-stage.vn-flashback:after {
  content: ''; position: absolute; inset: 0; z-index: 6; pointer-events: none;
  box-shadow: inset 0 0 150px rgba(20, 12, 4, 0.72), inset 0 0 34px rgba(232, 201, 138, 0.12);
  background:
    linear-gradient(90deg, rgba(232, 201, 138, 0.16), transparent 6%, transparent 94%, rgba(232, 201, 138, 0.16)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.04) 3px 4px);
}

/* 右侧玩家立绘：常驻，非玩家发言时压暗 */
.vn-user-figure {
  position: absolute; right: 9%; bottom: 20%; z-index: 2;
  width: min(330px, 28vw); height: min(540px, 58vh);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 1; filter: none;
  transition: filter 0.45s, transform 0.45s;
  pointer-events: none;
}
.vn-user-figure .uf-img {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; height: 100%; object-fit: contain; object-position: center bottom;
  display: none; background: transparent !important; border: 0; box-shadow: none;
}
.vn-user-figure .uf-img.show { display: block; }
.vn-user-figure .uf-img.show ~ .uf-silhouette { display: none; }
.vn-user-figure .uf-silhouette {
  width: 70%; height: 78%; position: relative;
  background: linear-gradient(180deg, rgba(127, 231, 255, 0.12), rgba(3, 10, 22, 0.4));
  border: 1px solid var(--line);
  clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%);
}
.vn-user-figure .uf-silhouette span {
  position: absolute; left: 50%; top: 13%; transform: translateX(-50%);
  width: 25%; height: 22%; border-radius: 50%; background: rgba(127, 231, 255, 0.2);
}
.vn-user-figure .uf-name {
  position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
  font-size: 9px; letter-spacing: 0.18em; color: var(--muted); white-space: nowrap;
}
.vn-user-figure.active .uf-name { color: var(--cyan); }
@media (max-width: 720px) {
}
/* 分镜检查 */
.vn-inspect { max-width: 980px; margin: 0 auto; }
.vi-meta { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.vi-meta b { font-size: 13px; font-weight: 400; color: var(--gold); }
.vi-meta span { font-size: 9px; color: var(--muted); }
.vi-note { margin: 8px 0 10px; font-size: 10px; line-height: 1.8; color: var(--muted); }
.vn-inspect h4 { margin: 12px 0 5px; font-size: 11px; font-weight: 400; letter-spacing: .1em; color: var(--ink2); }
.vi-tags { display: flex; flex-wrap: wrap; gap: 4px; font-size: 9px; color: var(--muted); padding-right: 2px; }
.vi-tags code { padding: 1px 4px; border: 1px solid var(--line); color: var(--cyan); overflow-wrap: anywhere; word-break: break-all; }
.vi-list { max-height: 380px; overflow-y: auto; border: 1px solid var(--line); background: rgba(2, 8, 18, .28); }
.vi-row { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.vi-row:last-child { border-bottom: 0; }
.vi-row-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.vi-idx { flex: none; font: 500 8px/1 var(--latin); color: var(--muted); letter-spacing: .08em; }
.vi-speaker { flex: none; max-width: 120px; font-size: 11px; font-weight: 400; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vi-text { flex: 1; min-width: 0; font-size: 10.5px; line-height: 1.7; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vi-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 7px; }
.vi-fields label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vi-fields label span { font-size: 8px; letter-spacing: .08em; color: var(--muted); }
.vi-fields select { width: 100%; min-width: 0; padding: 4px 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink2); font-size: 9.5px; }
.vi-code-wrap { margin-top: 10px; }
.vi-code-wrap summary, .vi-source-wrap summary { cursor: pointer; font-size: 9px; letter-spacing: .08em; color: var(--muted); padding: 5px 0; }
.vi-source-wrap { margin-top: 8px; border-top: 1px solid var(--line); }
.vi-source-body { max-height: 220px; overflow: auto; overflow-x: hidden; scrollbar-gutter: stable; border: 1px solid var(--line); background: var(--panel2); padding: 8px 10px; }
.vi-raw, .vi-code { display: block; width: 100%; max-width: 100%; min-width: 0; overflow: visible; overflow-wrap: anywhere; word-break: break-all; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--line); background: var(--panel2); white-space: pre-wrap; font: 10px/1.65 Consolas, monospace; color: var(--ink2); }
.vi-code { max-height: 300px; overflow: auto; }
.vi-raw { max-height: none; padding: 0; border: 0; background: transparent; }
.vi-raw + * { margin-top: 0; }
@media (max-width: 720px) {
  .vi-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vi-text { white-space: normal; }
  .vi-meta { gap: 6px; flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   3.9 · 视觉小说「铺满游戏界面」与回忆范围编辑
   ========================================================================== */
/* 「视觉小说全屏」只让正文区铺满游戏界面；顶部栏、侧栏、桌宠必须隐藏，
 * 不能给它们也套 inset:0 / grid-template-columns，否则会整屏叠在一起错位。 */
#ymdq-app.vn-expand .game-top,
#ymdq-app.vn-expand .left-rail,
#ymdq-app.vn-expand .right-rail,
#ymdq-app.vn-expand .ymdq-pet { display: none !important; }
#ymdq-app.vn-expand .game-grid { inset: 0; grid-template-columns: minmax(0, 1fr); gap: 0; }
#ymdq-app.vn-expand .story-main { border: 0; margin-bottom: 0 !important; }
#ymdq-app.vn-expand .story-main:after { display: none; }
#ymdq-app.vn-expand #vnMode { inset: 0; }
#ymdq-app.vn-expand .vn-chapter { top: 18px; }
#ymdq-app.vn-expand .vn-hud { padding-bottom: 10px; }

#vnFull.on { color: var(--gold); border-color: rgba(232, 201, 138, .5); }

.vi-flash-box { margin: 4px 0 10px; padding: 10px 11px; border: 1px solid rgba(232, 201, 138, .22); background: linear-gradient(150deg, rgba(60, 44, 16, .16), rgba(4, 10, 22, .3)); }
.vi-flash-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.vi-flash-head b { font-size: 12px; font-weight: 400; color: var(--gold); }
.vi-flash-head span { font-size: 9.5px; color: var(--muted); }
.vi-flash-ctl { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 8px; }
.vi-flash-ctl label { display: flex; flex-direction: column; gap: 3px; }
.vi-flash-ctl label span { font-size: 8px; letter-spacing: .1em; color: var(--muted); }
.vi-flash-ctl select { padding: 5px 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink2); font-size: 10px; }
.vi-flash-note { margin-top: 7px; font-size: 9px; line-height: 1.7; color: rgba(150, 183, 208, .55); }
.vi-flash-tag { flex: none; font-size: 8px; font-style: normal; letter-spacing: .1em; padding: 1px 5px; color: #f2d9a4; border: 1px solid rgba(232, 201, 138, .38); background: rgba(120, 88, 26, .18); }
.vi-observer-tag { flex: none; font-size: 8px; font-style: normal; letter-spacing: .1em; padding: 1px 5px; color: #9fd8ea; border: 1px solid rgba(127, 231, 255, .3); background: rgba(31, 87, 158, .16); }
.vi-row.is-flash { background: linear-gradient(90deg, rgba(120, 88, 26, .14), transparent 70%); box-shadow: inset 2px 0 0 rgba(232, 201, 138, .55); }
.buff-tip-meta { display: block; margin-top: 4px; font-size: 8.5px; font-style: normal; color: rgba(232, 201, 138, .72); }
.buff-tip-del { margin-top: 6px; padding: 2px 8px; font-size: 9px; color: #ffb3c9; border: 1px solid rgba(255, 159, 190, .34); background: rgba(120, 30, 60, .18); }
.buff-tip-del:hover { border-color: rgba(255, 159, 190, .7); }

/* 3.9 · 未导入资源包时的桌宠占位（避免出现碎图标） */
#ymdqPet.no-image #petImg { display: none !important; }
#ymdqPet.no-image #petFigure { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; font-size: 20px; color: rgba(127, 231, 255, .85); border: 1px solid rgba(127, 231, 255, .32); border-radius: 50%; background: radial-gradient(circle at 50% 38%, rgba(31, 92, 170, .55), rgba(3, 10, 22, .92) 70%); }
#ymdqPet.no-image #petFigure::after { content: '叽'; }
.vi-flash-box { scroll-margin-top: 8px; }

.vn-fig-ctl { display: flex; gap: 4px; margin-top: 2px; }
.vn-fig-ctl button { flex: 1; }

/* 四选项 */
.vn-choices { position: absolute; left: 50%; transform: translateX(-50%); bottom: 27%; z-index: 6; display: none; flex-direction: column; gap: 7px; width: min(560px, 78%); transition: bottom 0.34s var(--ease); }
.vn-choices.show { display: flex; }
.vn-choices button { padding: 9px 14px; text-align: left; font-size: 12px; line-height: 1.5; color: var(--ink2); border: 1px solid rgba(127, 231, 255, 0.26); background: rgba(3, 12, 26, 0.74); backdrop-filter: blur(10px); transition: 0.22s; }
.vn-choices button:hover { color: #eafcff; border-color: rgba(127, 231, 255, 0.7); background: rgba(14, 44, 82, 0.86); transform: translateX(4px); }
#vnMode.vn-with-composer .vn-choices { bottom: calc(27% + var(--vn-composer-h, 0px)); }

/* 文字扮演模式里的选项 */
.story-choices { display: grid; gap: 6px; margin: 14px 0 2px; max-width: 560px; }
.story-choices button { padding: 9px 12px; text-align: left; font-size: 12px; line-height: 1.5; color: var(--ink2); border: 1px solid rgba(127, 231, 255, 0.2); background: rgba(6, 18, 34, 0.55); transition: 0.2s; }
.story-choices button:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.6); background: rgba(10, 34, 62, 0.7); }

/* 视觉小说里的输入台 */
#vnMode .composer { position: absolute; left: 0; right: 0; bottom: 0; z-index: 9; padding: 9px clamp(12px, 2.4vw, 24px) 12px; border-top: 1px solid rgba(127, 231, 255, 0.16); background: linear-gradient(180deg, rgba(2, 8, 18, 0.72), rgba(2, 6, 14, 0.97)); backdrop-filter: blur(14px); }
.vn-dialogue { transition: bottom 0.34s var(--ease); }
#vnMode.vn-with-composer .vn-dialogue { bottom: calc(4% + var(--vn-composer-h, 0px)); }
.vn-composer-toggle { position: absolute; right: 14px; bottom: 6px; width: 26px; height: 20px; font-size: 11px; line-height: 1; color: rgba(150, 190, 215, 0.55); border: 1px solid rgba(127, 231, 255, 0.18); background: rgba(2, 9, 22, 0.5); }
.vn-composer-toggle:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.55); }
.vn-composer-toggle.on { color: var(--cyan); border-color: rgba(127, 231, 255, 0.6); background: rgba(10, 34, 62, 0.8); }

/* 回忆 */
.vn-recall { display: flex; flex-direction: column; gap: 6px; }
.vn-recall-row { display: grid; grid-template-columns: 68px 1fr; gap: 10px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); background: rgba(4, 12, 24, 0.5); }
.vn-recall-row em { font-style: normal; color: var(--gold); font-size: 10px; letter-spacing: 0.08em; }
.vn-recall-row span { color: var(--ink2); font-size: 11px; line-height: 1.7; }
.vn-recall-row.on { border-color: rgba(127, 231, 255, 0.5); background: rgba(10, 32, 58, 0.72); }

/* 关系星图：无关系的人不连线 */

/* 角色排序按钮 */
.char-card { position: relative; }
.cc-order { position: absolute; right: 7px; bottom: 7px; display: flex; gap: 3px; z-index: 4; }
.cc-order button { width: 20px; height: 20px; font-size: 10px; color: rgba(180, 212, 232, 0.6); border: 1px solid rgba(127, 231, 255, 0.18); background: transparent; }
.cc-order button:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.55); }
.cc-name .cc-offscreen { margin-left: 6px; font-style: normal; font-size: 8px; letter-spacing: 0.1em; padding: 1px 5px; color: rgba(232, 201, 138, 0.85); border: 1px solid rgba(232, 201, 138, 0.35); }

/* 人设整理 */
.bf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bf-head label { font-size: 10px; letter-spacing: 0.08em; color: var(--muted); }
.bf-organize { padding: 3px 9px; font-size: 9.5px; color: var(--gold); border-color: rgba(232, 201, 138, 0.32); }
.bf-organize:hover { border-color: rgba(232, 201, 138, 0.75); }
.bf-note { margin: 4px 0 6px; font-size: 9px; line-height: 1.7; color: rgba(150, 183, 208, 0.55); }

/* AI 任务预览 */
.tg-list { display: flex; flex-direction: column; gap: 6px; max-height: 34vh; overflow: auto; margin-top: 8px; }
.tg-row { padding: 8px 10px; border: 1px solid var(--line); background: rgba(4, 12, 24, 0.5); }
.tg-row .tg-kind { display: inline-block; margin-right: 6px; font-size: 8px; letter-spacing: 0.1em; padding: 1px 5px; color: var(--cyan); border: 1px solid rgba(127, 231, 255, 0.3); }
.tg-row b { font-size: 12px; font-weight: 400; color: var(--ink); }
.tg-row p { margin: 5px 0 0; font-size: 10px; line-height: 1.7; color: var(--ink2); }
.tg-row i { display: block; margin-top: 4px; font-style: normal; font-size: 9px; color: rgba(127, 231, 255, 0.65); }
.tg-row em { display: inline-block; margin-top: 4px; font-style: normal; font-size: 9px; color: rgba(232, 201, 138, 0.7); }

/* ==========================================================================
   3.9.5 · 立绘切换去掉辉光 / 键盘键让位 / 关系连线改成弧线
   ========================================================================== */
/* 1) 立绘不再发光：只保留原来的淡入与位置过渡 */
/* 2) 键盘键挪开，别和「下一页」的小三角重合 */
.vn-composer-toggle { right: 46px; }
/* 3) 没有立绘就彻底留白：不要代码画的占位小人 */

/* 关系星图：跟地图航线一个手感（弧线 + 流动虚线） */
.map-legend .lg { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; }
.map-legend .lg.love { background: #ffb3c9; }
.map-legend .lg.kin { background: var(--gold); }
.map-legend .lg.serve { background: #a893e6; }
.map-legend .lg.friend { background: #7fd3ff; }
.map-legend .lg.none { background: #8f7bd6; }

/* 行动建议（模型没写选项时的手动入口） */
.story-choices.empty .suggest, #vnChoices .suggest {
  padding: 8px 12px; font-size: 11px; letter-spacing: 0.06em;
  color: rgba(127, 231, 255, 0.75); border: 1px dashed rgba(127, 231, 255, 0.3);
  background: rgba(4, 14, 28, 0.4);
}
.story-choices.empty .suggest:hover, #vnChoices .suggest:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.65); }

/* 3.9.5 收尾：选项面板给一点底色，立绘在后面也不糊成一团 */
.vn-choices { padding: 8px; background: rgba(2, 7, 16, 0.42); backdrop-filter: blur(3px); border-radius: 2px; }

/* ==========================================================================
   3.9.6 · 角色卡：排序按钮挪到左上角，竖排小三角
   ========================================================================== */
.char-card .cc-order {
  position: absolute; left: 6px; top: 6px; right: auto; bottom: auto;
  display: flex; flex-direction: column; gap: 2px; z-index: 5;
}
.char-card .cc-order button {
  width: 16px; height: 14px; padding: 0; line-height: 1;
  font-size: 7px; letter-spacing: 0;
  color: rgba(180, 212, 232, 0.55);
  border: 1px solid rgba(127, 231, 255, 0.16);
  background: transparent;
  backdrop-filter: blur(4px);
  transition: 0.18s;
}
.char-card .cc-order button:hover {
  color: var(--cyan); border-color: rgba(127, 231, 255, 0.6);
  background: transparent;
}
.char-card .cc-order button:disabled { opacity: 0.25; cursor: default; }

/* ==========================================================================
   3.9.6 · 视觉小说：立绘动效（无发光）+ 浅色主题适配
   ========================================================================== */
/* 换人：淡入 + 轻轻上浮；开口：轻微起落。全部只动位置与透明度，不做辉光。 */
/* 3.9.3 的切换动效：换人时整张图淡入 + 上浮（figureIn 已经在上面定义） */
/* 主角开口时只抬起一点点，不发光 */
.vn-user-figure.active { filter: none; transform: translateY(-2px); }
.vn-user-figure.active .uf-name { color: var(--ink); }

/* 行动选项：跟随主题，浅色主题下也看得清 */
.story-choices button {
  color: var(--ink2); border: 1px solid var(--line2);
  background: var(--panel);
}
.story-choices button:hover {
  color: var(--cyan); border-color: var(--cyan); background: var(--panel2);
}
.vn-choices {
  padding: 8px; background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(4px); border-radius: 2px;
}
.vn-choices button {
  color: var(--ink2); border: 1px solid var(--line2); background: var(--panel2);
}
.vn-choices button:hover {
  color: var(--cyan); border-color: var(--cyan); background: var(--panel-solid);
  transform: translateX(4px);
}
.story-choices.empty .suggest, #vnChoices .suggest {
  color: var(--cyan); border: 1px dashed var(--line2); background: var(--panel);
}


/* ==========================================================================
   3.9.9 · 回到 3.9.3 的单张立绘：只补两条必要的覆盖
   ========================================================================== */
/* 玩家没立绘时整张隐去，不留占位图形 */
.vn-user-figure.hide { display: none !important; }
/* 立绘图片不要彩色辉光，只留黑色投影 */
.vn-figure .figure-img, .vn-user-figure .uf-img {
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.45));
}

/* 4.2 表情拆分 / 闭眼叠加层：与原始立绘同尺寸、同 object-fit，叠在立绘上方 */
/* 注意叠加图不能用 width/height:100%：原始立绘按 max-width/max-height 取原尺寸，
   100% 会把闭眼图放大到容器尺寸，眼睛对不上，移动端尤其明显。 */
.vn-figure .figure-fx,
.vn-figure .figure-blink {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  object-fit: contain; object-position: center bottom;
  display: none; pointer-events: none;
  z-index: 3; opacity: 0.94;
}
.vn-figure .figure-fx.show,
.vn-figure .figure-blink.show { display: block; }
.vn-figure .figure-blink { z-index: 4; opacity: 0; transition: none; }
.vn-figure .figure-blink.on { opacity: 0.94; }
.vn-user-figure .uf-fx,
.vn-user-figure .uf-blink {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  object-fit: contain; object-position: center bottom;
  display: none; pointer-events: none;
  z-index: 3; opacity: 0.94;
}
.vn-user-figure .uf-fx.show,
.vn-user-figure .uf-blink.show { display: block; }
.vn-user-figure .uf-blink { z-index: 4; opacity: 0; transition: none; }
.vn-user-figure .uf-blink.on { opacity: 0.94; }


/* 5.1 背景压暗 / 四角压暗：只压背景层，不压立绘与对白 */
.vn-stage.has-cg .vn-dim { opacity: 0; }
.vn-dim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: rgba(0, 0, 0, var(--vn-dim, 0));
  box-shadow: inset 0 0 34vmin 4vmin rgba(0, 0, 0, var(--vn-vig, 0));
  transition: background 0.3s, box-shadow 0.3s;
}
/* ==========================================================================
   弹窗与系统
   ========================================================================== */
#ymdq-modals { position: absolute; inset: 0; z-index: 80; pointer-events: none; }
.modal-mask {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 22px;
  background: rgba(1, 5, 14, 0.72); backdrop-filter: blur(14px);
  opacity: 0; transition: opacity 0.32s var(--ease); pointer-events: auto;
}
.modal-mask.show { opacity: 1; }
.modal {
  position: relative; width: min(860px, 96vw); max-height: 90vh; display: flex; flex-direction: column;
  background: linear-gradient(155deg, rgba(7, 20, 42, 0.97), rgba(3, 9, 21, 0.98));
  border: 1px solid rgba(127, 231, 255, 0.16);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62), 0 0 80px rgba(29, 96, 190, 0.1);
  transform: translateY(14px) scale(0.985); opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s;
  overflow: hidden;
}
.modal-mask.show .modal { transform: none; opacity: 1; }
.modal:before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    linear-gradient(var(--line2), var(--line2)) left top / 16px 1px no-repeat,
    linear-gradient(var(--line2), var(--line2)) left top / 1px 16px no-repeat,
    linear-gradient(var(--line2), var(--line2)) right top / 16px 1px no-repeat,
    linear-gradient(var(--line2), var(--line2)) right top / 1px 16px no-repeat,
    linear-gradient(var(--line2), var(--line2)) left bottom / 16px 1px no-repeat,
    linear-gradient(var(--line2), var(--line2)) left bottom / 1px 16px no-repeat,
    linear-gradient(var(--line2), var(--line2)) right bottom / 16px 1px no-repeat,
    linear-gradient(var(--line2), var(--line2)) right bottom / 1px 16px no-repeat;
}
.modal-glow { position: absolute; left: 0; right: 0; top: -40%; height: 60%; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, rgba(61, 140, 255, 0.12), transparent 66%); }
.modal.wide { width: min(1080px, 97vw); }
.modal.xwide { width: min(1280px, 98vw); }
.modal.narrow { width: min(560px, 94vw); }
.modal-head { position: relative; z-index: 2; flex: none; display: flex; align-items: center; gap: 18px; padding: 20px 24px 15px; border-bottom: 1px solid rgba(127, 231, 255, 0.1); background: linear-gradient(90deg, rgba(22, 67, 125, 0.16), transparent 62%); }
.modal-title-wrap { flex: none; }
.modal-kicker { font: 500 8px/1.4 var(--latin); letter-spacing: 0.3em; color: rgba(127, 231, 255, 0.42); }
.modal-head h2 { margin: 5px 0 0; font-size: 19px; font-weight: 400; letter-spacing: 0.18em; }
.modal-head-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(127, 231, 255, 0.16), transparent); }
.modal-close { flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(127, 231, 255, 0.12); color: rgba(173, 205, 226, 0.6); transition: 0.28s; }
.modal-close .ico { width: 15px; height: 15px; }
.modal-close:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.48); transform: rotate(90deg); }
.modal-body { position: relative; z-index: 2; padding: 20px 24px 24px; overflow-y: auto; max-height: calc(90vh - 78px); }
.modal-body h3 { font-size: 13px; font-weight: 400; letter-spacing: 0.14em; color: rgba(211, 236, 249, 0.86); margin: 0 0 12px; }
.modal-body h4 { font: 500 9px/1.4 var(--sans); letter-spacing: 0.16em; color: rgba(127, 231, 255, 0.54); margin: 16px 0 8px; }
.modal-body p { font-size: 11.5px; line-height: 1.9; color: rgba(173, 201, 220, 0.76); }
.modal-body pre, .modal-body textarea, #msgRawWrap { max-width: 100%; min-width: 0; box-sizing: border-box; }
#msgRawWrap { overflow: visible; }
#msgRawWrap pre.msg-raw { height: auto; max-height: 44vh; min-height: 180px; overflow-y: scroll; overflow-x: hidden; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: rgba(127, 231, 255, 0.38) transparent; padding-right: 18px; }
#msgRawWrap pre.msg-raw::-webkit-scrollbar { width: 8px; }
#msgRawWrap pre.msg-raw::-webkit-scrollbar-thumb { background: rgba(127, 231, 255, 0.38); border-radius: 4px; }
.raw-scroll-hint { margin: 0 0 5px; font-size: 8.5px; letter-spacing: .05em; color: var(--muted); }
.modal-actions { position: relative; z-index: 2; flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 13px 24px; border-top: 1px solid rgba(127, 231, 255, 0.08); background: rgba(2, 8, 18, 0.5); flex-wrap: wrap; }
.modal-actions.left { justify-content: flex-start; }
.confirm-text { font-size: 13px !important; line-height: 1.9 !important; color: rgba(203, 227, 242, 0.82) !important; }
.modal .field { margin-bottom: 12px; }
.modal .field label { margin-bottom: 1px; }
.modal .btn { flex: none; }

/* ---------------- 地图 ---------------- */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 13px; height: min(600px, 66vh); min-height: 420px; }
.map-canvas {
  position: relative; overflow: hidden; border: 1px solid rgba(127, 231, 255, 0.12);
  background:
    radial-gradient(ellipse at 28% 22%, rgba(38, 100, 190, 0.24), transparent 42%),
    radial-gradient(ellipse at 72% 74%, rgba(112, 62, 190, 0.18), transparent 46%),
    radial-gradient(ellipse at 50% 50%, #071427 0%, #030a18 60%, #01040a 100%);
  cursor: grab;
}
.map-canvas:after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background-image:
    radial-gradient(circle at 12% 24%, rgba(200, 240, 255, 0.5) 0 0.7px, transparent 1.2px),
    radial-gradient(circle at 68% 18%, rgba(200, 240, 255, 0.35) 0 0.6px, transparent 1.1px),
    radial-gradient(circle at 42% 72%, rgba(200, 240, 255, 0.3) 0 0.6px, transparent 1.1px),
    radial-gradient(circle at 86% 64%, rgba(200, 240, 255, 0.4) 0 0.7px, transparent 1.2px),
    radial-gradient(circle at 24% 86%, rgba(200, 240, 255, 0.24) 0 0.5px, transparent 1px);
  background-size: 260px 260px, 340px 340px, 420px 420px, 300px 300px, 380px 380px;
  opacity: 0.8;
}
.map-canvas.dragging { cursor: grabbing; }
.map-canvas:before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(90, 160, 220, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(90, 160, 220, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 82%);
}
.map-plane { position: absolute; inset: 0; transform-origin: 50% 50%; transition: transform 0.18s ease-out; }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.map-svg * { vector-effect: non-scaling-stroke; }
.map-svg line { stroke: rgba(127, 231, 255, 0.16); stroke-width: 0.7; stroke-dasharray: 2 5; }
.map-svg .map-arc { stroke: rgba(127, 231, 255, 0.13); stroke-width: 0.8; fill: none; stroke-dasharray: 2 7; }
.map-svg path.route { stroke: rgba(232, 201, 138, 0.32); stroke-width: 1; fill: none; stroke-dasharray: 3 6; animation: routeFlow 12s linear infinite; }
@keyframes routeFlow { to { stroke-dashoffset: -100; } }
.map-scan { position: absolute; left: 0; right: 0; top: -30%; height: 30%; z-index: 2; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(127, 231, 255, 0.055), transparent); animation: mapScan 9s linear infinite; }
@keyframes mapScan { 0% { top: -30%; } 100% { top: 100%; } }
.map-ring { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(127, 231, 255, 0.07); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.map-ring.r1 { width: 32%; height: 32%; }
.map-ring.r2 { width: 58%; height: 58%; border-style: dashed; }
.map-ring.r3 { width: 84%; height: 84%; border-color: rgba(127, 231, 255, 0.04); }
.map-compass { position: absolute; right: 16px; bottom: 14px; width: 48px; height: 48px; border: 1px solid rgba(127, 231, 255, 0.12); border-radius: 50%; color: rgba(127, 231, 255, 0.4); font: 500 7px/1 var(--latin); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.map-title { position: absolute; right: 18px; top: 16px; z-index: 4; text-align: right; pointer-events: none; }
.map-title b { display: block; font-size: 16px; font-weight: 400; letter-spacing: 0.2em; color: rgba(226, 246, 255, 0.7); }
.map-layer-switch { position: absolute; right: 16px; top: 58px; z-index: 8; display: flex; align-items: center; gap: 7px; padding: 5px 9px 5px 5px; border: 1px solid var(--line2); background: var(--panel-solid); color: var(--cyan); cursor: pointer; pointer-events: auto; }
.map-layer-switch b { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--cyan); color: #04111f; font: 500 10px/1 var(--sans); }
.map-layer-switch span { max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8.5px; letter-spacing: .06em; color: rgba(211, 238, 250, .88); }
.map-layer-switch i { font-style: normal; font-size: 13px; line-height: 1; color: var(--gold); }
.map-layer-switch:hover { border-color: var(--cyan); box-shadow: 0 0 18px rgba(127, 231, 255, .12); }
.map-title span { display: block; margin-top: 4px; font: 500 7px/1 var(--latin); letter-spacing: 0.24em; color: rgba(127, 231, 255, 0.3); }
.map-compass:before { content: ''; position: absolute; width: 1px; height: 30px; background: linear-gradient(180deg, var(--cyan), transparent); transform: rotate(24deg); opacity: 0.5; }
.map-toolbar { position: absolute; left: 12px; top: 12px; z-index: 4; display: flex; gap: 4px; }
.map-toolbar button { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(127, 231, 255, 0.14); background: rgba(2, 9, 22, 0.6); color: rgba(181, 214, 234, 0.68); font-size: 13px; backdrop-filter: blur(6px); }
.map-toolbar button:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.44); }
.map-legend { position: absolute; left: 12px; bottom: 12px; z-index: 4; display: flex; gap: 10px; flex-wrap: wrap; max-width: 70%; font-size: 8px; color: rgba(127, 157, 184, 0.54); letter-spacing: 0.08em; }
.map-legend span { display: inline-flex; align-items: center; gap: 4px; }
.map-legend i { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.map-node { position: absolute; transform: translate(-50%, -50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: 0.3s; }
.map-node .mn-dot { position: relative; width: 10px; height: 10px; transform: rotate(45deg); border: 1px solid rgba(127, 231, 255, 0.66); background: rgba(7, 20, 43, 0.9); box-shadow: 0 0 14px rgba(127, 231, 255, 0.24); }
.map-node .mn-dot:after { content: ''; position: absolute; inset: 2px; background: rgba(127, 231, 255, 0.5); opacity: 0.6; }
.map-node .mn-label { font-size: 9.5px; letter-spacing: 0.08em; color: rgba(206, 232, 248, 0.78); white-space: nowrap; text-shadow: 0 2px 8px #01040b; padding: 2px 6px; transition: 0.25s; background: rgba(2, 8, 18, 0.42); border: 1px solid transparent; }
.map-node .mn-coord { font: 500 7px/1 var(--latin); letter-spacing: 0.1em; color: rgba(127, 231, 255, 0.3); opacity: 0; transition: 0.25s; }
.map-node:hover { transform: translate(-50%, -50%) scale(1.12); z-index: 5; }
.map-node:hover .mn-label { color: #fff; text-shadow: 0 0 12px rgba(127, 231, 255, 0.6); border-color: rgba(127, 231, 255, 0.24); background: rgba(2, 8, 18, 0.8); }
.map-node:hover .mn-coord { opacity: 1; }
.map-node.current .mn-dot { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 20px var(--cyan), 0 0 46px rgba(127, 231, 255, 0.42); }
.map-node.current .mn-dot:after { background: #02101f; }
.map-node.current .mn-label { color: var(--cyan); border-color: rgba(127, 231, 255, 0.22); }
.map-node.current .mn-coord { opacity: 1; color: rgba(127, 231, 255, 0.6); }
.map-node.current:before { content: ''; position: absolute; left: 50%; top: 5px; width: 28px; height: 28px; border: 1px solid rgba(127, 231, 255, 0.5); border-radius: 50%; transform: translate(-50%, -50%); animation: nodePulse 2.2s ease-out infinite; }
@keyframes nodePulse { 0% { opacity: 0.8; transform: translate(-50%, -50%) scale(0.5); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); } }
.map-node.task .mn-dot { border-color: var(--gold); box-shadow: 0 0 18px rgba(232, 201, 138, 0.6); }
.map-node.task .mn-dot:before { content: ''; position: absolute; inset: -6px; border: 1px solid rgba(232, 201, 138, 0.5); transform: rotate(0deg); animation: taskPulse 2.6s ease-out infinite; }
@keyframes taskPulse { 0% { opacity: 0.9; transform: scale(0.7); } 100% { opacity: 0; transform: scale(1.5); } }
.map-node.task .mn-label { color: rgba(240, 218, 170, 0.92); }
.map-node.task .mn-label:before { content: '◆'; font-size: 6px; color: var(--gold); margin-right: 4px; vertical-align: 1px; text-shadow: 0 0 8px rgba(232, 201, 138, 0.8); }
.map-node.new .mn-dot { border-color: var(--violet); }
.map-node[data-type="魔域"] .mn-dot, .map-node[data-type="秘境"] .mn-dot { border-color: rgba(255, 159, 190, 0.66); }
.map-node[data-type="现实"] .mn-dot { border-color: rgba(169, 139, 255, 0.66); }

.map-detail { position: relative; overflow: hidden; border: 1px solid rgba(127, 231, 255, 0.1); background: rgba(5, 15, 32, 0.52); padding: 16px; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.map-detail > *:not(.md-mark) { position: relative; z-index: 1; }
.map-detail .md-mark { display: none !important; position: absolute; right: -12px; bottom: -34px; z-index: 0; font-size: 130px; font-weight: 300; line-height: 1; color: rgba(127, 231, 255, 0.035); pointer-events: none; }
.map-detail .md-en { font: 500 8px/1 var(--latin); letter-spacing: 0.22em; color: rgba(127, 231, 255, 0.36); }
.map-detail .md-name { margin: 7px 0 4px; font-size: 21px; letter-spacing: 0.12em; }
.map-detail .md-coord { font: 500 9px/1.5 var(--latin); letter-spacing: 0.14em; color: rgba(232, 201, 138, 0.6); }
.map-detail .md-divider { height: 1px; margin: 12px 0; background: linear-gradient(90deg, rgba(127, 231, 255, 0.25), transparent); }
.map-detail .md-desc { font-size: 11.5px; line-height: 1.95; color: rgba(178, 207, 226, 0.72); }
.map-detail .md-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.map-detail .md-tag { font-size: 8px; padding: 4px 7px; border: 1px solid rgba(127, 231, 255, 0.12); color: rgba(127, 231, 255, 0.58); letter-spacing: 0.08em; }
.map-detail .md-actions { margin-top: auto; padding-top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.map-detail .md-tasks { margin-top: 12px; }
.map-detail .md-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.map-detail .md-stats div { padding: 8px 6px; border: 1px solid rgba(127, 231, 255, 0.07); background: rgba(8, 24, 48, 0.34); text-align: center; }
.map-detail .md-stats b { display: block; font: 400 13px/1.2 var(--serif); color: rgba(219, 246, 255, 0.82); }
.map-detail .md-stats span { display: block; margin-top: 4px; font-size: 7px; letter-spacing: 0.1em; color: rgba(127, 157, 184, 0.42); }
.map-detail .md-flavor { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(127, 231, 255, 0.08); font-size: 9px; line-height: 1.7; color: rgba(127, 157, 184, 0.36); }
.map-detail .md-task { display: flex; align-items: flex-start; gap: 6px; font-size: 9.5px; line-height: 1.6; color: rgba(232, 201, 138, 0.7); padding: 5px 0; border-bottom: 1px solid rgba(127, 231, 255, 0.06); }
.map-detail .md-task:before { content: '◆'; font-size: 6px; margin-top: 4px; color: var(--gold); }
.node-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------------- 背包 ---------------- */
.bag-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; flex-wrap: wrap; }
.bag-filters { display: flex; gap: 3px; }
.bag-filters button { padding: 6px 11px; border: 1px solid rgba(127, 231, 255, 0.1); color: rgba(151, 185, 208, 0.6); font-size: 10px; letter-spacing: 0.08em; }
.bag-filters button.on { color: var(--cyan); border-color: rgba(127, 231, 255, 0.42); background: rgba(31, 87, 158, 0.14); }
.bag-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.bag-item {
  position: relative; min-height: 138px; padding: 13px 11px 10px; border: 1px solid rgba(127, 231, 255, 0.14);
  background: linear-gradient(160deg, rgba(12, 30, 58, 0.8), rgba(4, 11, 24, 0.86));
  text-align: left; overflow: hidden; transition: 0.3s;
  display: flex; flex-direction: column; align-items: flex-start;
}
.bag-item:hover { border-color: rgba(127, 231, 255, 0.44); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24); }
.bag-item .bi-icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(127, 231, 255, 0.22); color: rgba(219, 246, 255, 0.82); font-size: 21px; margin-bottom: 10px; background: radial-gradient(circle, rgba(31, 87, 158, 0.26), transparent 70%); position: relative; }
.bag-item .bi-icon:after { content: ''; position: absolute; inset: 3px; border: 1px solid rgba(255, 255, 255, 0.04); }
.bag-item .bi-name { font-size: 11.5px; letter-spacing: 0.05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bag-item .bi-desc { margin-top: 4px; font-size: 8.5px; line-height: 1.6; color: rgba(127, 157, 184, 0.46); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bag-item .bi-qty { position: absolute; right: 9px; top: 9px; font: 500 9px/1 var(--latin); color: rgba(232, 201, 138, 0.7); }
.bag-item .bi-rarity { margin-top: 5px; font-size: 8px; letter-spacing: 0.1em; color: var(--muted); }
.bag-item:after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 40%); }
.bag-item.r-灵 { border-color: rgba(127, 231, 255, 0.24); }
.bag-item.r-灵 .bi-icon { color: var(--cyan); border-color: rgba(127, 231, 255, 0.3); }
.bag-item.r-宝 { border-color: rgba(169, 139, 255, 0.24); }
.bag-item.r-宝 .bi-icon { color: var(--violet); border-color: rgba(169, 139, 255, 0.3); }
.bag-item.r-仙 { border-color: rgba(232, 201, 138, 0.28); }
.bag-item.r-仙 .bi-icon { color: var(--gold); border-color: rgba(232, 201, 138, 0.34); }
.bag-item.r-神 { border-color: rgba(255, 159, 190, 0.3); }
.bag-item.r-神 .bi-icon { color: var(--rose); border-color: rgba(255, 159, 190, 0.36); }
.bag-empty { grid-column: 1 / -1; padding: 40px; text-align: center; color: rgba(127, 157, 184, 0.46); font-size: 11px; border: 1px dashed rgba(127, 231, 255, 0.12); }
.bag-foot { display: flex; align-items: center; gap: 18px; margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(127, 231, 255, 0.07); font-size: 8.5px; letter-spacing: 0.08em; color: rgba(127, 157, 184, 0.4); }
.bag-foot span:last-child { margin-left: auto; color: rgba(127, 231, 255, 0.32); }

/* ---------------- 立绘管理 ---------------- */
.portrait-manager { max-width: 420px; margin: 0 auto; }
.portrait-preview { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 360px; overflow: hidden; border: 1px solid rgba(127, 231, 255, 0.18); background: radial-gradient(circle at 50% 30%, hsla(var(--h, 210), 70%, 52%, 0.28), rgba(2, 7, 16, 0.92) 72%); }
.portrait-preview img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }
.pp-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: rgba(170, 202, 222, 0.6); font-size: 10px; letter-spacing: 0.12em; }
.pp-sigil { width: 90px; height: 90px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(127, 231, 255, 0.28); border-radius: 50%; color: rgba(219, 246, 255, 0.6); font-size: 40px; }
.pp-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pp-actions .btn { flex: 1; min-width: 100px; }

/* ---------------- 4.2 立绘表情拆分 / 闭眼 ---------------- */
.fx-manager { max-width: 820px; margin: 0 auto; }
.fx-top { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; align-items: start; }
.fx-preview {
  position: relative; isolation: isolate; width: 100%; aspect-ratio: 3 / 4; max-height: 320px; overflow: hidden;
  border: 1px solid var(--line); background: radial-gradient(circle at 50% 28%, rgba(40, 90, 160, 0.2), rgba(3, 9, 20, 0.8));
}
.fx-preview img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; height: 100%; object-fit: contain; object-position: center bottom; pointer-events: none; }
.fx-preview .fx-pv-base { z-index: 1; opacity: 0.94; }
.fx-preview .fx-pv-over { z-index: 2; opacity: 0.94; }
.fx-preview .fx-pv-blink { z-index: 3; opacity: 0; transition: none; }
.fx-preview .fx-pv-blink.on { opacity: 0.94; }
.fx-pv-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--muted); text-align: center; padding: 12px; }
.fx-title { font-size: 12px; color: var(--ink); letter-spacing: 0.06em; }
.fx-slots { display: flex; flex-direction: column; gap: 8px; }
.fx-slot { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); background: var(--glass); }
.fx-thumb-btn { padding: 0; border: 0; background: none; line-height: 0; cursor: pointer; }
.fx-thumb { position: relative; width: 56px; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid var(--line); background: rgba(3, 10, 22, 0.42); }
.fx-thumb img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; height: 100%; object-fit: contain; object-position: center bottom; pointer-events: none; }
.fx-thumb .fx-base { opacity: 0.92; }
.fx-thumb .fx-over { z-index: 2; opacity: 0.94; }
.fx-thumb-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--muted); }
.fx-slot-main { min-width: 0; }
.fx-slot-main select { width: 100%; padding: 6px 8px; font-size: 10.5px; }
.fx-slot-actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.fx-slot-actions .btn { min-height: 24px; padding: 3px 8px; font-size: 9.5px; }
.fx-slot-state { font-size: 9px; color: var(--muted); letter-spacing: 0.04em; }
.fx-blink-box { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line); background: var(--glass); }
.fx-blink-main { min-width: 0; }
.fx-blink-toggle-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 10.5px; color: var(--ink2); }
.fx-blink-toggle-row .set-toggle { justify-self: start; }
.fx-timing { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 10px; color: var(--muted); }
.fx-timing input { width: 62px; padding: 5px 7px; font-size: 10.5px; }
@media (max-width: 720px) {
  .fx-top { grid-template-columns: 1fr; }
  .fx-preview { max-width: 200px; margin: 0 auto; }
  .fx-slot { grid-template-columns: 46px minmax(0, 1fr); }
  .fx-thumb, .fx-blink-box .fx-thumb { width: 46px; }
  .fx-blink-box { grid-template-columns: 46px minmax(0, 1fr); }
}
.player-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.cc-portrait-edit { position: absolute; right: 8px; bottom: 8px; z-index: 5; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(127, 231, 255, 0.3); background: rgba(3, 12, 26, 0.78); color: rgba(200, 240, 255, 0.8); font-size: 14px; opacity: 0; transition: 0.25s; }
.char-card:hover .cc-portrait-edit { opacity: 1; }
.cc-portrait-edit:hover { border-color: rgba(127, 231, 255, 0.7); color: #fff; }
.char-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.char-filters { display: flex; gap: 3px; }
.char-filters button { padding: 6px 11px; border: 1px solid rgba(127, 231, 255, 0.1); color: rgba(151, 185, 208, 0.58); font-size: 10px; letter-spacing: 0.08em; }
.char-filters button.on { color: var(--cyan); border-color: rgba(127, 231, 255, 0.42); background: rgba(31, 87, 158, 0.14); }
.char-summary { font-size: 9px; color: rgba(127, 157, 184, 0.55); letter-spacing: .04em; }
@media (max-width: 720px) {
}
.char-strip-wrap { position: relative; margin: 0 -8px; }
.char-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 10px 8px 12px; align-items: stretch; min-height: 396px; }
.char-card {
  position: relative; min-width: 0; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid rgba(127, 231, 255, 0.1); background: linear-gradient(170deg, rgba(8, 22, 46, 0.7), rgba(3, 9, 20, 0.82));
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.35s;
}
.char-card:hover { border-color: rgba(127, 231, 255, 0.38); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32), 0 0 30px rgba(31, 120, 220, 0.08); transform: translateY(-4px); z-index: 2; }
.char-card .cc-portrait {
  position: relative; flex: 1; min-height: 210px; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 26%, hsla(var(--h, 210), 72%, 64%, 0.3), transparent 52%),
    radial-gradient(ellipse at 50% 100%, hsla(var(--h, 210), 60%, 30%, 0.26), transparent 58%),
    linear-gradient(180deg, rgba(10, 25, 50, 0.7), rgba(2, 7, 16, 0.92));
}
.char-card .cc-portrait:before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, transparent 42%, rgba(3, 9, 20, 0.94) 100%),
    repeating-linear-gradient(0deg, transparent 0 37px, rgba(127, 231, 255, 0.026) 37px 38px);
}
.char-card .cc-portrait:after {
  content: ''; position: absolute; left: 50%; top: 37%; width: 112px; height: 112px; z-index: 1;
  transform: translate(-50%, -50%); border: 1px solid hsla(var(--h, 210), 75%, 62%, 0.2); border-radius: 50%;
  box-shadow: inset 0 0 34px hsla(var(--h, 210), 80%, 55%, 0.08), 0 0 28px hsla(var(--h, 210), 80%, 55%, 0.06);
}
.char-card .cc-figure {
  position: absolute; left: 50%; bottom: -6%; width: 120%; height: 42%; transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 100%, hsla(var(--h, 210), 70%, 56% / 0.42), transparent 68%);
  clip-path: ellipse(48% 72% at 50% 100%);
  transition: transform 0.6s var(--ease), filter 0.6s;
}
.char-card:hover .cc-figure { transform: translateX(-50%) scale(1.05); filter: brightness(1.2); }
.char-card .cc-figure:before { content: ''; position: absolute; left: 38%; top: 2%; width: 24%; height: 26%; border-radius: 50%; background: radial-gradient(circle at 44% 38%, hsla(var(--h, 210), 80%, 82%, 0.38), hsla(var(--h, 210), 60% 30% / 0.22) 40%, transparent 74%); }
.char-card .cc-figure:after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 40%, hsla(var(--h, 210), 90%, 80%, 0.14) 50%, transparent 60%); mix-blend-mode: screen; }
.char-card .cc-sigil {
  position: absolute; left: 50%; top: 37%; transform: translate(-50%, -50%); z-index: 2;
  width: 74px; height: 74px; display: flex; align-items: center; justify-content: center;
  font-size: 33px; color: hsla(var(--h, 210), 80%, 86%, 0.62); letter-spacing: 0;
  border: 1px solid hsla(var(--h, 210), 75%, 62%, 0.28); border-radius: 50%;
  background: radial-gradient(circle, hsla(var(--h, 210), 70%, 45%, 0.16), transparent 72%);
  text-shadow: 0 0 26px hsla(var(--h, 210), 90%, 70%, 0.4);
}
.char-card .cc-ring { position: absolute; left: 50%; top: 37%; transform: translate(-50%, -50%); border-radius: 50%; z-index: 1; pointer-events: none; }
.char-card .cc-ring.aff { width: 128px; height: 128px; background: conic-gradient(hsla(var(--h, 210), 80%, 72%, 0.5) var(--aff), rgba(127, 231, 255, 0.06) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); }
.char-card .cc-ring.love { width: 146px; height: 146px; background: conic-gradient(rgba(255, 159, 190, 0.42) var(--love), rgba(255, 159, 190, 0.035) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1px), #000 calc(100% - 1px)); mask: radial-gradient(farthest-side, transparent calc(100% - 1px), #000 calc(100% - 1px)); }
.char-card .cc-vertical { position: absolute; right: 9px; top: 13px; z-index: 2; writing-mode: vertical-rl; font-size: 12px; letter-spacing: 0.22em; color: rgba(219, 242, 255, 0.2); text-shadow: 0 0 18px rgba(127, 231, 255, 0.16); }
.char-card .cc-quote { position: absolute; left: 12px; right: 12px; bottom: 75px; z-index: 2; font-size: 8px; line-height: 1.7; color: rgba(206, 228, 242, 0.28); letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.char-card .cc-state { position: absolute; left: 10px; top: 10px; z-index: 3; font-size: 7.5px; letter-spacing: 0.12em; color: rgba(127, 231, 255, 0.6); border: 1px solid rgba(127, 231, 255, 0.18); padding: 3px 5px; }
.char-card .cc-state.bond { color: rgba(232, 201, 138, 0.8); border-color: rgba(232, 201, 138, 0.26); }
.char-card .cc-info { position: relative; z-index: 3; padding: 10px 11px 11px; margin-top: -40px; }
.char-card .cc-name { font-size: 15px; letter-spacing: 0.12em; }
.char-card .cc-role { margin-top: 3px; font-size: 8.5px; color: rgba(127, 157, 184, 0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.char-card .cc-tags { margin-top: 6px; font-size: 8px; color: rgba(154, 186, 210, 0.52); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.char-card .cc-bars { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.bar-line { display: flex; align-items: center; gap: 5px; }
.bar-line .bl-k { font-size: 7.5px; color: rgba(127, 157, 184, 0.52); width: 18px; flex: none; letter-spacing: 0.04em; }
.bar-line .bl-track { flex: 1; height: 2px; background: rgba(127, 231, 255, 0.1); position: relative; overflow: hidden; }
.bar-line .bl-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(127, 231, 255, 0.4), var(--cyan)); box-shadow: 0 0 8px rgba(127, 231, 255, 0.4); transition: width 0.8s var(--ease); }
.bar-line.love .bl-fill { background: linear-gradient(90deg, rgba(255, 159, 190, 0.4), var(--rose)); box-shadow: 0 0 8px rgba(255, 159, 190, 0.4); }
.bar-line .bl-v { font: 500 8px/1 var(--latin); color: rgba(206, 234, 250, 0.62); width: 18px; text-align: right; flex: none; }
.char-card .cc-heart { margin-top: 8px; font-size: 8.5px; line-height: 1.65; color: rgba(232, 201, 138, 0.62); max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.5s var(--ease), opacity 0.4s; }
.char-card:hover .cc-heart { max-height: 64px; opacity: 1; }
.char-card .cc-more { margin-top: 7px; font-size: 8px; letter-spacing: 0.14em; color: rgba(127, 231, 255, 0.4); text-align: right; }
.char-card:hover .cc-more { color: var(--cyan); }
.char-pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.char-pager button { width: 28px; height: 28px; border: 1px solid rgba(127, 231, 255, 0.12); color: rgba(170, 202, 224, 0.6); display: flex; align-items: center; justify-content: center; }
.char-pager button:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.4); }
.char-pager .pg { display: flex; gap: 5px; }
.char-pager .pg i { width: 14px; height: 2px; background: rgba(127, 231, 255, 0.16); transition: 0.3s; }
.char-pager .pg i.on { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.char-pager .pg-t { font: 500 8px/1 var(--latin); letter-spacing: 0.14em; color: rgba(127, 157, 184, 0.44); margin-left: 6px; }

/* 角色详情 */
.cd-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; min-height: 620px; }
.cd-left { display: flex; flex-direction: column; gap: 10px; }
.cd-portrait {
  position: relative; height: 380px; border: 1px solid rgba(127, 231, 255, 0.12); overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 24%, hsla(var(--h, 210), 70%, 62%, 0.36), transparent 52%),
    linear-gradient(180deg, rgba(9, 24, 48, 0.72), rgba(2, 7, 16, 0.92));
}
.cd-portrait:after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 52%, rgba(3, 9, 20, 0.94)); }
.cd-portrait .cd-fig {
  position: absolute; left: 50%; bottom: -4%; width: 118%; height: 40%; transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 100%, hsla(var(--h, 210), 72%, 56% / 0.42), transparent 70%);
  clip-path: ellipse(48% 72% at 50% 100%);
  filter: drop-shadow(0 0 30px hsla(var(--h, 210), 75%, 52%, 0.2));
}
.cd-portrait .cd-fig:before { content: ''; position: absolute; left: 38%; top: 0; width: 24%; height: 26%; border-radius: 50%; background: radial-gradient(circle at 44% 38%, hsla(var(--h, 210), 80%, 84%, 0.4), hsla(var(--h, 210), 60% 30% / 0.22) 40%, transparent 74%); }
.cd-portrait .cd-fig:after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 40%, rgba(210, 246, 255, 0.16) 50%, transparent 60%); mix-blend-mode: screen; }
.cd-portrait:before { content: ''; position: absolute; left: 50%; top: 42%; width: 58%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 1px solid hsla(var(--h, 210), 75%, 62%, 0.18); border-radius: 50%; box-shadow: inset 0 0 60px hsla(var(--h, 210), 80%, 55%, 0.08), 0 0 60px hsla(var(--h, 210), 80%, 55%, 0.05); }
.cd-portrait .cd-sigil { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 108px; height: 108px; display: flex; align-items: center; justify-content: center; font-size: 48px; color: hsla(var(--h, 210), 80%, 86%, 0.52); z-index: 2; border: 1px solid hsla(var(--h, 210), 75%, 62%, 0.28); border-radius: 50%; background: radial-gradient(circle, hsla(var(--h, 210), 70%, 45%, 0.14), transparent 72%); text-shadow: 0 0 34px hsla(var(--h, 210), 90%, 70%, 0.4); }
.cd-portrait .cd-name { position: absolute; left: 16px; bottom: 14px; z-index: 3; font-size: 27px; letter-spacing: 0.14em; }
.cd-portrait-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 4; padding: 4px 10px; border: 1px solid rgba(127, 231, 255, 0.24); background: rgba(3, 12, 26, 0.7); color: rgba(200, 240, 255, 0.78); font-size: 9px; letter-spacing: 0.1em; opacity: 0; transition: 0.25s; pointer-events: none; }
.cd-portrait:hover .cd-portrait-hint { opacity: 1; }
.cd-portrait .cd-id { position: absolute; left: 17px; bottom: 46px; z-index: 3; font-size: 9px; color: rgba(127, 231, 255, 0.6); letter-spacing: 0.08em; max-width: 86%; }
.cd-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cd-meta .cm { padding: 9px 10px; border: 1px solid rgba(127, 231, 255, 0.08); background: rgba(5, 15, 32, 0.4); }
.cd-meta .cm b { display: block; font: 500 7.5px/1 var(--sans); letter-spacing: 0.14em; color: rgba(127, 157, 184, 0.5); font-weight: 400; }
.cd-meta .cm span { display: block; margin-top: 5px; font-size: 11px; color: rgba(206, 234, 250, 0.78); }
.cd-right { min-width: 0; display: flex; flex-direction: column; }
.cd-tabs { display: flex; gap: 2px; border-bottom: 1px solid rgba(127, 231, 255, 0.1); }
.cd-tabs button { position: relative; padding: 9px 16px; font-size: 11px; letter-spacing: 0.12em; color: rgba(151, 185, 208, 0.56); }
.cd-tabs button.on { color: var(--cyan); }
.cd-tabs button.on:after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 1px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.cd-pane { padding-top: 15px; overflow-y: auto; max-height: 560px; }
.cd-pane .field { margin-bottom: 10px; }
.cd-pane .field label { display: flex; justify-content: space-between; align-items: center; }
.cd-pane .field label .edit-hint { font-size: 7px; color: rgba(127, 231, 255, 0.34); letter-spacing: 0.1em; }
.cd-bars { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 15px; }
.cd-bars .bar-line .bl-k { width: 34px; font-size: 9px; }
.cd-bars .bar-line .bl-track { height: 3px; }
.cd-bars .bar-line .bl-v { width: 26px; font-size: 10px; }
.cd-bars .bl-text { font-size: 8px; color: rgba(127, 157, 184, 0.46); }
.cd-heart { padding: 12px 14px; border-left: 1px solid rgba(232, 201, 138, 0.3); background: linear-gradient(90deg, rgba(90, 70, 30, 0.12), transparent); font-size: 11px; line-height: 1.85; color: rgba(232, 201, 138, 0.76); }
.cd-empty { padding: 24px; text-align: center; border: 1px dashed rgba(127, 231, 255, 0.12); color: rgba(127, 157, 184, 0.46); font-size: 10.5px; line-height: 1.8; }
.mem-toolbar { display: flex; gap: 6px; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; }
.mem-toolbar .mt-l { font: 500 8px/1 var(--latin); letter-spacing: 0.14em; color: rgba(127, 231, 255, 0.4); }
.mem-list { display: flex; flex-direction: column; gap: 0; position: relative; }
.mem-list:before { content: ''; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 1px; background: linear-gradient(180deg, rgba(127, 231, 255, 0.22), rgba(127, 231, 255, 0.03)); }
.mem-item { position: relative; padding: 0 0 13px 22px; }
.mem-item:before { content: ''; position: absolute; left: 2px; top: 4px; width: 7px; height: 7px; border: 1px solid rgba(127, 231, 255, 0.4); background: #061426; transform: rotate(45deg); }
.mem-item .mi-head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.mem-item .mi-turn { font: 500 7.5px/1 var(--latin); color: rgba(127, 231, 255, 0.4); letter-spacing: 0.1em; }
.mem-item .mi-time { font-size: 7.5px; color: rgba(127, 157, 184, 0.36); }
.mem-item .mi-text { font-size: 10.5px; line-height: 1.8; color: rgba(186, 214, 232, 0.72); }
.mem-item .mi-acts { display: flex; gap: 5px; margin-top: 5px; opacity: 0; transition: 0.25s; }
.mem-item:hover .mi-acts { opacity: 1; }
.mem-item .mi-acts button { font-size: 8px; color: rgba(127, 231, 255, 0.5); border-bottom: 1px solid rgba(127, 231, 255, 0.14); }
.mem-item .mi-acts button:hover { color: var(--cyan); }
.mem-item.summary .mi-text { color: rgba(232, 201, 138, 0.78); padding: 8px 10px; border-left: 1px solid rgba(232, 201, 138, 0.24); background: rgba(90, 70, 30, 0.08); }
.mem-add { display: flex; gap: 6px; margin-top: 8px; }
.mem-add input { font-size: 10px; padding: 8px 10px; }
.cbag-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.cbag-item { position: relative; padding: 9px; border: 1px solid rgba(127, 231, 255, 0.09); background: rgba(5, 15, 32, 0.4); min-height: 96px; }
.cbag-item .ci-icon { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(232, 201, 138, 0.24); color: var(--gold); font-size: 14px; margin-bottom: 6px; }
.cbag-item b { display: block; font-size: 10px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbag-item small { display: block; margin-top: 3px; font-size: 8px; line-height: 1.5; color: rgba(127, 157, 184, 0.5); }
.cbag-item .ci-del { position: absolute; right: 4px; top: 4px; font-size: 10px; color: rgba(255, 109, 136, 0.4); opacity: 0; }
.cbag-item:hover .ci-del { opacity: 1; }
.cbag-add { display: flex; gap: 4px; margin-top: 8px; }
.cbag-add input { font-size: 9px; padding: 6px 8px; }

/* ---------------- 任务 ---------------- */
.task-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; min-height: 400px; }
.task-summary { display: flex; align-items: center; gap: 20px; padding: 13px 16px; margin-bottom: 12px; border: 1px solid rgba(127, 231, 255, 0.08); background: linear-gradient(90deg, rgba(20, 60, 110, 0.14), transparent 70%); }
.task-summary .ts-item { display: flex; align-items: baseline; gap: 6px; }
.task-summary .ts-k { font-size: 8px; letter-spacing: 0.12em; color: rgba(127, 157, 184, 0.52); }
.task-summary .ts-item b { font: 500 18px/1 var(--latin); color: rgba(219, 246, 255, 0.86); }
.task-summary .ts-item small { font-size: 8px; color: rgba(127, 157, 184, 0.4); }
.task-summary .ts-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(127, 231, 255, 0.16), transparent); }
.task-summary .ts-note { font-size: 8.5px; color: rgba(127, 157, 184, 0.4); letter-spacing: 0.04em; }
.task-col { border: 1px solid rgba(127, 231, 255, 0.09); background: rgba(4, 12, 26, 0.4); padding: 12px; display: flex; flex-direction: column; }
.task-col-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 9px; margin-bottom: 9px; border-bottom: 1px solid rgba(127, 231, 255, 0.08); }
.task-col-head b { font-size: 12px; font-weight: 400; letter-spacing: 0.16em; }
.task-col-head .tc-en { font: 500 7.5px/1 var(--latin); letter-spacing: 0.18em; color: rgba(127, 231, 255, 0.36); }
.task-card { position: relative; padding: 12px 12px 11px; margin-bottom: 8px; border: 1px solid rgba(127, 231, 255, 0.08); background: linear-gradient(150deg, rgba(9, 24, 48, 0.5), rgba(3, 9, 20, 0.4)); transition: 0.3s; }
.task-card:hover { border-color: rgba(127, 231, 255, 0.28); background: linear-gradient(150deg, rgba(12, 32, 62, 0.6), rgba(3, 9, 20, 0.44)); }
.task-card.done { opacity: 0.5; }
.task-card.done .tc-title { text-decoration: line-through; }
.task-card .tc-kind { display: inline-block; margin-right: 7px; padding: 2px 4px; border: 1px solid rgba(127, 231, 255, 0.18); font-size: 7px; letter-spacing: 0.08em; color: rgba(127, 231, 255, 0.6); vertical-align: 2px; }
.task-card.task-romance .tc-kind { border-color: rgba(255, 159, 190, 0.22); color: rgba(255, 159, 190, 0.66); }
.task-card.task-side .tc-kind { border-color: rgba(232, 201, 138, 0.22); color: rgba(232, 201, 138, 0.66); }
.task-card .tc-title { font-size: 11.5px; letter-spacing: 0.04em; line-height: 1.5; }
.task-card .tc-desc { margin-top: 5px; font-size: 9.5px; line-height: 1.7; color: rgba(154, 184, 206, 0.58); }
.task-card .tc-progress { margin-top: 5px; padding-left: 7px; border-left: 2px solid rgba(127, 231, 255, 0.28); font-size: 9.5px; line-height: 1.7; color: rgba(127, 231, 255, 0.72); }
.task-card .tc-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.task-card .tc-coord { font: 500 8px/1 var(--latin); color: rgba(232, 201, 138, 0.56); border: 1px solid rgba(232, 201, 138, 0.18); padding: 3px 5px; letter-spacing: 0.08em; cursor: pointer; }
.task-card .tc-coord:hover { color: var(--gold); border-color: rgba(232, 201, 138, 0.4); }
.task-card .tc-act { margin-left: auto; display: flex; gap: 4px; }
.task-card .tc-act button { font-size: 8px; color: rgba(127, 231, 255, 0.46); }
.task-card .tc-act button:hover { color: var(--cyan); }
.task-main { border-left: 2px solid rgba(127, 231, 255, 0.4); }
.task-romance { border-left: 2px solid rgba(255, 159, 190, 0.4); }
.task-side { border-left: 2px solid rgba(232, 201, 138, 0.4); }
.task-empty { padding: 24px 8px; text-align: center; font-size: 9px; color: rgba(127, 157, 184, 0.36); border: 1px dashed rgba(127, 231, 255, 0.08); }

/* ---------------- 设置 ---------------- */
.settings-layout { display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 18px; min-height: 460px; }
.settings-tabs { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid rgba(127, 231, 255, 0.08); padding-right: 12px; }
.settings-tabs button { text-align: left; padding: 9px 10px; font-size: 10.5px; letter-spacing: 0.1em; color: rgba(151, 185, 208, 0.56); border-left: 1px solid transparent; transition: 0.25s; }
.settings-tabs button:hover { color: rgba(219, 243, 255, 0.8); }
.settings-tabs button.on { color: var(--cyan); border-left-color: var(--cyan); background: linear-gradient(90deg, rgba(31, 87, 158, 0.16), transparent); }
.settings-pane { min-width: 0; max-height: 520px; overflow-y: auto; padding-right: 4px; }
.set-group { padding: 13px 14px; border: 1px solid rgba(127, 231, 255, 0.08); background: rgba(4, 12, 26, 0.34); margin-bottom: 10px; }
.set-group h4 { margin: 0 0 10px; font-size: 9px; font-weight: 500; letter-spacing: 0.18em; color: rgba(127, 231, 255, 0.5); }
.set-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; align-items: center; margin-bottom: 9px; }
.set-row:last-child { margin-bottom: 0; }
.set-row > label { font-size: 10px; color: rgba(186, 214, 232, 0.7); letter-spacing: 0.04em; line-height: 1.6; }
.set-row > label small { display: block; font-size: 8px; color: rgba(127, 157, 184, 0.42); margin-top: 2px; }
.set-row input, .set-row select { font-size: 10.5px; padding: 8px 10px; }
.set-row .range-wrap { display: flex; align-items: center; gap: 8px; }
.model-row { display: flex; gap: 6px; align-items: center; }
.model-row input { flex: 1; }
.model-row .btn { min-height: 30px; padding: 5px 10px; font-size: 10px; }
#modelFetched { font-size: 11px; }
.set-row input[type='range'] { padding: 0; height: 3px; accent-color: var(--cyan); background: rgba(127, 231, 255, 0.14); border: 0; }
.set-row .range-v { font: 500 9px/1 var(--latin); color: var(--cyan); width: 32px; text-align: right; }
.set-toggle { position: relative; width: 36px; height: 18px; border: 1px solid rgba(127, 231, 255, 0.2); background: rgba(4, 12, 26, 0.6); justify-self: start; cursor: pointer; transition: 0.3s; }
.set-toggle:after { content: ''; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; background: rgba(127, 157, 184, 0.5); transition: 0.3s; }
.set-toggle.on { border-color: rgba(127, 231, 255, 0.5); background: rgba(31, 87, 158, 0.24); }
.set-toggle.on:after { left: 20px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.set-note { font-size: 9px; line-height: 1.8; color: rgba(127, 157, 184, 0.44); margin-top: 8px; }
.set-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ---------------- 历史 ---------------- */
.history-list { position: relative; max-height: 420px; overflow-y: auto; padding-left: 14px; }
.history-list:before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(180deg, rgba(127, 231, 255, 0.2), transparent); }
.history-item { position: relative; padding: 8px 10px 10px 16px; border-bottom: 1px solid rgba(127, 231, 255, 0.06); cursor: pointer; transition: 0.25s; }
.history-item:before { content: ''; position: absolute; left: -12px; top: 12px; width: 6px; height: 6px; border: 1px solid rgba(127, 231, 255, 0.36); background: #061426; transform: rotate(45deg); }
.history-item:hover { background: rgba(31, 87, 158, 0.08); }
.history-item .hi-turn { font: 500 7.5px/1 var(--latin); color: rgba(127, 231, 255, 0.4); letter-spacing: 0.1em; }
.history-item .hi-text { margin-top: 4px; font-size: 10.5px; line-height: 1.7; color: rgba(186, 214, 232, 0.68); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.history-item .hi-jump { position: absolute; right: 6px; top: 8px; font-size: 8px; color: rgba(127, 231, 255, 0.4); opacity: 0; }
.history-item:hover .hi-jump { opacity: 1; }
.history-preview { margin-top: 10px; padding: 12px 14px; border: 1px solid rgba(127, 231, 255, 0.1); background: rgba(4, 12, 26, 0.5); max-height: 180px; overflow-y: auto; font-size: 10.5px; line-height: 1.9; color: rgba(186, 214, 232, 0.7); }

/* ---------------- 存档 ---------------- */
.slots { display: flex; flex-direction: column; gap: 8px; }
.slot { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid rgba(127, 231, 255, 0.1); background: rgba(4, 12, 26, 0.4); transition: 0.3s; }
.slot:hover { border-color: rgba(127, 231, 255, 0.3); background: rgba(9, 24, 48, 0.44); }
.slot .sl-n { font: 500 13px/1 var(--latin); color: rgba(127, 231, 255, 0.36); letter-spacing: 0.1em; }
.slot .sl-t { font-size: 12px; letter-spacing: 0.06em; }
.slot .sl-s { margin-top: 3px; font-size: 8.5px; color: rgba(127, 157, 184, 0.5); }
.slot .sl-a { display: flex; gap: 4px; }
.slot.empty { opacity: 0.56; }

/* ---------------- AI 提案 ---------------- */
.ai-proposal .ai-prompt { min-height: 90px; }
.ai-proposal .ai-row { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.ai-proposal .ai-status { font-size: 9px; color: rgba(127, 231, 255, 0.52); letter-spacing: 0.06em; }
.ai-preview {
  margin-top: 12px; padding: 14px; border: 1px solid rgba(127, 231, 255, 0.12); background: rgba(3, 10, 22, 0.6);
  max-height: 340px; overflow-y: auto; font-size: 10.5px; line-height: 1.85; color: rgba(186, 214, 232, 0.76); white-space: pre-wrap;
}
.ai-preview.json { font-family: 'Cascadia Code', 'Consolas', monospace; font-size: 9.5px; color: rgba(159, 208, 240, 0.76); }
.ai-loading { display: inline-flex; align-items: center; gap: 7px; color: rgba(127, 231, 255, 0.6); font-size: 9px; }
.ai-loading i { width: 10px; height: 10px; border: 1px solid rgba(127, 231, 255, 0.2); border-top-color: var(--cyan); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 论坛/直播开发中 ---------------- */
.dev-panel { position: relative; padding: 40px 30px; text-align: center; border: 1px solid rgba(127, 231, 255, 0.1); background: rgba(4, 12, 26, 0.4); overflow: hidden; }
.dev-panel:before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 27px, rgba(127, 231, 255, 0.03) 27px 28px); pointer-events: none; }
.dev-icon { font-size: 34px; color: rgba(127, 231, 255, 0.32); margin-bottom: 14px; }
.dev-panel b { display: block; font-size: 18px; font-weight: 400; letter-spacing: 0.24em; color: rgba(211, 236, 249, 0.82); }
.dev-panel p { margin: 10px auto 0; max-width: 380px; font-size: 10.5px; line-height: 1.9; color: rgba(127, 157, 184, 0.54); }
.dev-lines { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.dev-lines i { width: 26px; height: 2px; background: rgba(127, 231, 255, 0.16); }
.dev-lines i:nth-child(1) { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: devBlink 2s infinite; }
.dev-lines i:nth-child(2) { animation: devBlink 2s 0.3s infinite; }
.dev-lines i:nth-child(3) { animation: devBlink 2s 0.6s infinite; }
@keyframes devBlink { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }

/* ---------------- Toast ---------------- */
#ymdq-toast { position: absolute; left: 50%; bottom: 146px; top: auto; right: auto; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid rgba(127, 231, 255, 0.18); background: rgba(3, 11, 24, 0.94); color: rgba(208, 234, 250, 0.86); font-size: 10px; letter-spacing: 0.04em; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); opacity: 0; transform: translateY(8px); transition: 0.35s var(--ease); backdrop-filter: blur(10px); max-width: 320px; }
.toast.in { opacity: 1; transform: none; }
.toast-mark { width: 4px; height: 4px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); transform: rotate(45deg); flex: none; }
.toast.error { border-color: rgba(255, 109, 136, 0.28); }
.toast.error .toast-mark { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.toast.gold { border-color: rgba(232, 201, 138, 0.26); }
.toast.gold .toast-mark { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

/* ---------------- 加载 ---------------- */
.ymdq-loading { position: absolute; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #01040b; color: rgba(127, 231, 255, 0.6); font: 500 9px/1 var(--latin); letter-spacing: 0.3em; transition: opacity 0.6s; }
.ymdq-loading.out { opacity: 0; pointer-events: none; }
.ymdq-loading .ld-ring { width: 42px; height: 42px; border: 1px solid rgba(127, 231, 255, 0.12); border-top-color: var(--cyan); border-radius: 50%; animation: spin 1.4s linear infinite; position: relative; }
.ymdq-loading .ld-ring:after { content: ''; position: absolute; inset: 7px; border: 1px solid rgba(127, 231, 255, 0.1); border-bottom-color: rgba(127, 231, 255, 0.6); border-radius: 50%; animation: spin 2.4s linear infinite reverse; }

/* ==========================================================================
   响应式与减弱动效
   ========================================================================== */
@media (max-width: 1280px) {
  .game-grid { grid-template-columns: 268px minmax(0, 1fr) 68px; }
  .world-name { font-size: 18px; }
  .start-frame { gap: 48px; }
  .start-orbit { width: 520px; height: 520px; left: 2%; opacity: 0.45; }
  .char-strip { padding-left: 18px; padding-right: 18px; grid-template-columns: repeat(5, minmax(0, 1fr)); min-height: 372px; }
}

@media (max-width: 1100px) {
  .start-frame { grid-template-columns: minmax(300px, 1fr) minmax(320px, 410px); gap: 34px; }
  .main-title { font-size: clamp(50px, 6.8vw, 88px); }
  .menu-btn { min-height: 70px; }
  .menu-label strong { font-size: 18px; }
  .game-grid { grid-template-columns: 250px minmax(0, 1fr) 64px; }
  .bag-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cd-grid { grid-template-columns: 280px minmax(0, 1fr); }
  .cd-portrait { height: 330px; }
  .task-columns { gap: 8px; }
}

@media (max-width: 920px) {
  .game-top { padding: 0 12px; }
  .brand-mini { min-width: 0; }
  .brand-mini span { display: none; }
  .top-actions { min-width: 0; }
  .game-grid { inset: 58px 8px 8px; grid-template-columns: minmax(0, 1fr); gap: 0; }
  .left-rail { display: none; }
  .right-rail {
    position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 20;
    flex-direction: row; gap: 4px; padding: 5px; border: 1px solid rgba(127, 231, 255, 0.12);
    background: rgba(2, 8, 18, 0.9); backdrop-filter: blur(16px);
    bottom: calc(8px + env(safe-area-inset-bottom));
    overflow-x: auto; overflow-y: hidden;
  }
  .rail-btn { min-height: 42px; flex: 1 1 0; min-width: 0; border: 0; }
  .rail-btn b { font-size: 8px; }
  .rail-btn:hover { transform: none; }
  .rail-btn:after { display: none; }
  .story-main { margin-bottom: 62px; }
  .top-actions .mobile-only { display: inline-block; }
  .story-feed { padding: 22px 20px 14px; }
  .story-text { font-size: 14.5px; }
  .composer { padding: 9px 12px 12px; }
  .start-frame { grid-template-columns: 1fr; gap: 26px; max-width: 620px; }
  .start-orbit { display: none; }
  .start-left { padding: 10px 0 0; text-align: center; }
  .start-eyebrow { justify-content: center; }
  .main-title { justify-content: center; font-size: clamp(48px, 11vw, 82px); }
  .title-rule { margin-left: auto; margin-right: auto; }
  .start-poem { margin-left: auto; margin-right: auto; }
  .start-meta { justify-content: center; }
  .start-menu { max-width: 440px; margin: 0 auto; width: 100%; }
  .start-foot { font-size: 7px; }
  .title-seal { right: -30px; width: 34px; height: 34px; font-size: 15px; }
  .wiz-body { grid-template-columns: 1fr; }
  .wiz-rail { flex-direction: row; overflow-x: auto; padding: 12px 18px; gap: 2px; border-right: 0; border-bottom: 1px solid var(--line); }
  .wiz-step { min-width: 130px; padding: 7px 8px; grid-template-columns: 24px 1fr; }
  .wiz-step:before { display: none; }
  .wiz-rail-note { display: none; }
  .wiz-main { padding: 22px 18px; }
  .wiz-grid.c3 { grid-template-columns: 1fr 1fr; }
  .bond-pick { grid-template-columns: repeat(3, 1fr); }
  .map-layout { grid-template-columns: 1fr; height: auto; }
  .map-canvas { height: 340px; min-height: 0; }
  .map-detail { max-height: 260px; }
  .map-layer-switch { right: 8px; top: 50px; gap: 5px; padding: 4px 7px 4px 4px; }
  .map-layer-switch b { width: 18px; height: 18px; font-size: 9px; }
  .map-layer-switch span { max-width: 92px; font-size: 7.5px; }
  .char-strip { padding: 8px 12px 10px; min-height: 330px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .char-card .cc-portrait { min-height: 170px; }
  .char-card .cc-heart { display: none; }
  .cd-grid { grid-template-columns: 1fr; }
  .cd-portrait { height: 280px; }
  .cd-left .cd-meta { grid-template-columns: repeat(4, 1fr); }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid rgba(127, 231, 255, 0.08); padding-right: 0; padding-bottom: 6px; }
  .settings-tabs button { white-space: nowrap; border-left: 0; border-bottom: 1px solid transparent; }
  .settings-tabs button.on { border-left: 0; border-bottom-color: var(--cyan); background: linear-gradient(0deg, rgba(31, 87, 158, 0.12), transparent); }
  .task-columns { grid-template-columns: 1fr; }
  .task-col { min-height: 0; }
}

@media (max-width: 720px) {
  .modal-mask { padding: 0; }
  .modal, .modal.wide, .modal.xwide, .modal.narrow { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-left: 0; border-right: 0; }
  .modal-head { padding: 14px 16px 12px; }
  .modal-body { max-height: calc(100vh - 64px); padding: 14px 16px 20px; }
  .modal-actions { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .modal-head h2 { font-size: 16px; }
  .wiz-top { padding: 0 14px; }
  .wiz-progress i { width: 18px; }
  .wiz-title .zh { font-size: 24px; }
  .wiz-grid.c2, .wiz-grid.c3 { grid-template-columns: 1fr; }
  .world-pick { grid-template-columns: 1fr; }
  .world-card { min-height: 164px; }
  .node-list { grid-template-columns: 1fr; }
  .bond-pick { grid-template-columns: 1fr 1fr; }
  .wiz-foot { padding: 0 14px; height: 64px; }
  .wiz-foot-center { display: none; }
  .game-top { height: 52px; }
  .game-top .brand-mini { min-width: 0; }
  .game-top .brand-mini b { font-size: 14px; letter-spacing: 0.1em; white-space: nowrap; }
  .game-top .brand-mini span { display: none; }
  .mode-switch button { padding: 6px 9px; font-size: 0; letter-spacing: 0; }
  .mode-switch button:before { content: attr(data-short); font-size: 10px; letter-spacing: 0.08em; }
  .top-actions { min-width: 0; gap: 0; }
  .top-actions button:not(.mobile-only) { display: none; }
  .top-actions #btnFullscreen { display: inline-block; }
  .top-actions .mobile-only { display: inline-block; padding: 6px 7px; border: 1px solid rgba(127, 231, 255, 0.14); color: rgba(190, 226, 245, 0.72); font-size: 9.5px; }
  .top-actions button { padding: 6px 5px; font-size: 9.5px; }
  .game-grid { inset: 52px 6px 6px; }
  .story-main { margin-bottom: 60px; }
  .story-feed { padding: 16px 14px 10px; }
  .story-row.ai { padding-left: 18px; }
  .story-row { margin-bottom: 22px; }
  .story-text { font-size: 13.5px; line-height: 1.95; }
  .user-bubble { max-width: 86%; font-size: 12px; }
  .composer-box .send { min-width: 62px; font-size: 10px; }
  .composer-tools button { font-size: 8.5px; }
  .vn-dialogue { left: 3%; right: 3%; bottom: 4%; padding: 16px 18px 18px; min-height: 128px; }
  .vn-speaker { font-size: 11px; }
  .vn-text { font-size: 12.5px; line-height: 1.9; }
  .vn-controls { top: 48px; right: 10px; }
  .vn-controls button { padding: 5px 7px; font-size: 8px; }
  .vn-hud { left: 12px; right: 12px; }
  /* 3.9.4 手机：只显示中间一个立绘位，轮到谁说话显示谁 */
  .vn-choices { width: 88%; bottom: calc(27% + 10px); }
  #vnMode.vn-with-composer .vn-choices { bottom: calc(30% + var(--vn-composer-h, 0px)); }
  .vn-title-bg { display: none; }
  .bag-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cbag-grid { grid-template-columns: repeat(2, 1fr); }
  .char-strip-wrap { margin: 0 -10px; }
  .char-strip { padding: 8px 10px; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .char-card .cc-portrait { min-height: 190px; }
  .char-pager { margin-top: 6px; }
  .slot { grid-template-columns: 30px 1fr; }
  .slot .sl-a { grid-column: 2; }
  .set-row { grid-template-columns: 1fr; gap: 6px; }
  .toast { font-size: 9px; }
  .start-foot { left: 14px; right: 14px; bottom: 12px; }
  .start-hint { bottom: 34px; }
  .start-menu { gap: 0; }
  .menu-btn { min-height: 62px; padding-left: 18px; }
  .menu-label strong { font-size: 16px; }
  .menu-label small { display: none; }
  .main-title { font-size: clamp(42px, 13vw, 64px); }
  .start-poem { font-size: 10.5px; margin-top: 20px; }
  .start-sub { font-size: 12px; }
  .start-meta { margin-top: 18px; gap: 10px; }
}

@media (max-height: 700px) {
  .story-feed { padding-top: 18px; }
  .menu-btn { min-height: 62px; }
  .start-poem { margin-top: 18px; }
  .start-meta { margin-top: 16px; }
  .wiz-main { padding-top: 20px; }
}

/* 减弱动效 */
.ymdq.ymdq-reduce *, .ymdq.ymdq-reduce *:before, .ymdq.ymdq-reduce *:after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.08s !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  .ymdq *, .ymdq *:before, .ymdq *:after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.08s !important;
  }
}

/* ==========================================================================
   可读性 / 信息密度 二次调校
   目标：提高对比度与字号，收紧正文行距与段落间距，减少无效留白。
   ========================================================================== */
.ymdq {
  --ink: #f2fbff;
  --ink2: #dceffb;
  --muted: #a9c6dd;
  --dim: #82a0b8;
  --line: rgba(127, 231, 255, 0.2);
  --line2: rgba(127, 231, 255, 0.36);
}

/* ---- 向导玩家立绘 ---- */
.wiz-portrait-bar { display: flex; align-items: center; gap: 16px; margin: 16px 0 4px; padding: 14px; border: 1px solid rgba(127, 231, 255, 0.1); background: rgba(5, 15, 32, 0.42); }
.wiz-portrait { position: relative; width: 84px; height: 112px; flex: none; border: 1px solid rgba(127, 231, 255, 0.2); background: radial-gradient(circle at 50% 30%, hsla(var(--h, 210), 70%, 52%, 0.26), rgba(2, 7, 16, 0.92) 72%); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.wiz-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.wiz-portrait span { font-size: 34px; color: rgba(219, 246, 255, 0.72); }
.wiz-portrait i { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 0; text-align: center; font-style: normal; font-size: 9px; color: rgba(210, 240, 255, 0.82); background: rgba(2, 8, 18, 0.72); }
.wiz-portrait-copy b { font-size: 13px; font-weight: 400; color: rgba(232, 248, 255, 0.92); }
.wiz-portrait-copy p { margin: 5px 0 9px; font-size: 10.5px; line-height: 1.7; color: rgba(166, 198, 220, 0.7); }

/* ---- 窗口 / 全屏 ---- */
#ymdq-app.ymdq-windowed { inset: 3vh 2.4vw; border: 1px solid rgba(127, 231, 255, 0.22); box-shadow: 0 36px 120px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(0, 0, 0, 0.4); overflow: hidden; }

/* ---- 去掉装饰性副标题 ---- */
.modal-kicker,
.start-eyebrow,
.start-sub,
.start-poem,
.menu-head,
.menu-foot,
.menu-label small,
.start-foot,
.wc-en,
.wiz-title .en,
.wiz-section-head .mini,
.panel-meta,
.cc-quote { display: none !important; }

/* ---- 左侧状态栏 ---- */
.panel-title { font-size: 10.5px; color: rgba(158, 225, 255, 0.78); }
.panel-meta { font-size: 8.5px; color: rgba(154, 190, 215, 0.62); }
.world-name { font-size: 21px; color: #f2fbff; }
.world-time { font-size: 11.5px; color: rgba(220, 240, 252, 0.84); }
.world-hint { font-size: 11px; line-height: 1.7; color: rgba(166, 198, 220, 0.7); }
.player-name { font-size: 17px; color: #f2fbff; }
.player-sub { font-size: 10px; color: rgba(170, 200, 222, 0.78); }
.player-loc { font-size: 11.5px; color: rgba(214, 238, 250, 0.88); }
.buff-title { font-size: 9px; color: rgba(148, 184, 208, 0.62); }
.buff { font-size: 9.5px; color: rgba(242, 220, 172, 0.92); border-color: rgba(232, 201, 138, 0.28); background: rgba(113, 84, 31, 0.14); }
.buff.quiet { color: rgba(196, 222, 238, 0.8); border-color: rgba(127, 231, 255, 0.16); background: rgba(31, 87, 158, 0.08); }
.player-update { margin-top: 7px; font-size: 10px; line-height: 1.55; color: rgba(158, 238, 255, 0.76); letter-spacing: 0.03em; }

/* ---- 弹幕：提高字号、亮度、可读性 ---- */
.danmaku-list { mask-image: linear-gradient(180deg, transparent 0, #000 7%, #000 100%); gap: 4px; }
.danmaku-item { font-size: 10.5px; line-height: 1.55; color: rgba(202, 226, 242, 0.86); padding: 4px 7px; border-left-color: rgba(127, 231, 255, 0.18); background: linear-gradient(90deg, rgba(26, 75, 135, 0.14), transparent); }
.danmaku-item b { color: rgba(149, 237, 255, 0.9); font-weight: 400; }
.danmaku-item:nth-child(3n) b { color: rgba(244, 216, 158, 0.9); }
.danmaku-item:nth-child(3n+1) b { color: rgba(255, 181, 205, 0.88); }
.danmaku-input input { font-size: 10.5px; padding: 7px 9px; }
.danmaku-input button { font-size: 10.5px; }

/* ---- 顶栏 / 右侧栏 ---- */
.top-actions button { font-size: 12px; color: rgba(202, 228, 243, 0.8); }
.top-actions button:hover { color: #c8f6ff; }
.mode-switch button { font-size: 12.5px; color: rgba(188, 218, 236, 0.72); }
.mode-switch button.active { color: #ffffff; }
.rail-btn b { font-size: 9.5px; color: rgba(210, 235, 248, 0.82); }
.rail-ico { color: rgba(145, 238, 255, 0.86); }

/* ---- 正文：收紧行距，提高密度与亮度 ---- */
.story-feed { padding: 22px clamp(20px, 3.6vw, 52px) 14px; }
.story-row { max-width: 940px; margin-bottom: 19px; }
.story-row.ai { padding-left: 22px; }
.story-text {
  font-size: 15.5px;
  line-height: 1.74;
  letter-spacing: 0.012em;
  color: #e9f6ff;
}
.story-text p { margin: 0 0 0.52em; }
.story-text p:last-child { margin-bottom: 0; }
.story-text p.dialogue { padding-left: 10px; }
.story-text .speaker-line { padding-left: 10px; margin: 0.24em 0; }
.story-text .sys-line { font-size: 0.9em; color: rgba(148, 235, 255, 0.84); }
.story-meta { margin-top: 7px; font-size: 9px; color: rgba(142, 176, 200, 0.55); }
.user-bubble { font-size: 13.5px; line-height: 1.8; color: rgba(235, 249, 255, 0.95); border-right-color: rgba(127, 231, 255, 0.55); }
.story-main:after { height: 26px; }
.story-empty { color: rgba(173, 204, 224, 0.72); }
.story-empty b { color: rgba(231, 247, 255, 0.94); font-size: 17px; }
.story-empty p { color: rgba(176, 208, 228, 0.7); font-size: 12px; }

/* ---- 输入区 ---- */
.composer { padding: 9px 16px 12px; }
.composer-meta { font-size: 9.5px; color: rgba(150, 184, 208, 0.62); margin-bottom: 5px; }
.composer-box textarea { font-size: 13px; line-height: 1.55; padding: 9px 12px; }
.composer-tools button { font-size: 10.5px; color: rgba(176, 208, 230, 0.72); padding: 5px 9px; }

/* ---- 弹窗：整体提亮，说明文字不再灰到看不清 ---- */
.modal-body p { font-size: 12.5px; line-height: 1.85; color: rgba(203, 227, 242, 0.9); }
.modal-body h3 { font-size: 14px; color: #e2f5ff; }
.modal-body h4 { font-size: 10.5px; color: rgba(158, 231, 255, 0.78); }
.modal-kicker { font-size: 9px; color: rgba(150, 220, 255, 0.62); }
.modal-head h2 { font-size: 20px; color: #f4fcff; }
.modal-close { color: rgba(208, 232, 246, 0.85); }

.field label { font-size: 10.5px; color: rgba(184, 214, 234, 0.82); }
.field input, .field textarea, .field select { font-size: 13px; color: #f1fbff; background: rgba(4, 14, 30, 0.82); border-color: rgba(127, 231, 255, 0.24); }
.field-hint { font-size: 10.5px; color: rgba(154, 186, 208, 0.62); }
.ymdq ::placeholder { color: rgba(160, 190, 212, 0.55); }

/* ---- 设置 ---- */
.settings-tabs button { font-size: 11.5px; color: rgba(180, 210, 230, 0.76); }
.set-group { background: rgba(5, 15, 32, 0.5); border-color: rgba(127, 231, 255, 0.12); }
.set-group h4 { font-size: 10px; color: rgba(158, 231, 255, 0.78); }
.set-row > label { font-size: 11.5px; color: rgba(213, 235, 248, 0.9); }
.set-row > label small { font-size: 9.5px; color: rgba(155, 188, 210, 0.66); }
.set-row input, .set-row select { font-size: 11.5px; color: #f1fbff; }
.set-note { font-size: 10.5px; line-height: 1.75; color: rgba(166, 198, 220, 0.72); }
.range-v { font-size: 10px; color: #9feaff; }

/* ---- 角色卡 / 详情 ---- */
.char-card .cc-role { font-size: 9.5px; color: rgba(176, 207, 226, 0.76); }
.char-card .cc-tags { font-size: 9px; color: rgba(176, 206, 226, 0.66); }
.char-card .cc-heart { font-size: 9.5px; color: rgba(242, 214, 158, 0.8); }
.char-card .cc-more { font-size: 9px; color: rgba(158, 231, 255, 0.66); }
.bar-line .bl-k { font-size: 8.5px; color: rgba(166, 198, 220, 0.7); }
.bar-line .bl-v { font-size: 9px; color: rgba(224, 243, 252, 0.8); }
.char-pager .pg-t { font-size: 9px; color: rgba(160, 194, 216, 0.65); }
.cd-meta .cm b { font-size: 8.5px; color: rgba(158, 190, 212, 0.7); }
.cd-meta .cm span { font-size: 12px; color: #e2f4ff; }
.cd-bars .bl-text { font-size: 9px; color: rgba(157, 190, 212, 0.62); }
.cd-heart { font-size: 12px; line-height: 1.85; color: rgba(244, 214, 158, 0.88); }
.mem-item .mi-text { font-size: 11.5px; color: rgba(211, 233, 246, 0.86); }
.mem-item .mi-turn { font-size: 8.5px; color: rgba(158, 231, 255, 0.62); }
.mem-item .mi-time { font-size: 8.5px; color: rgba(150, 184, 208, 0.55); }
.cbag-item b { font-size: 11px; color: #eaf8ff; }
.cbag-item small { font-size: 9px; color: rgba(166, 198, 220, 0.66); }

/* ---- 地图 / 任务 / 背包 / 历史 ---- */
.map-detail .md-desc { font-size: 12px; line-height: 1.85; color: rgba(210, 233, 246, 0.86); }
.map-detail .md-coord { font-size: 10px; color: rgba(244, 214, 158, 0.8); }
.map-detail .md-tag { font-size: 8.5px; color: rgba(160, 231, 255, 0.78); }
.map-node .mn-label { font-size: 10px; color: rgba(226, 242, 252, 0.9); }
.map-node .mn-coord { font-size: 7.5px; color: rgba(160, 220, 250, 0.55); }
.map-legend { font-size: 8.5px; color: rgba(170, 202, 222, 0.7); }
.task-col-head b { font-size: 13px; color: #eaf8ff; }
.task-card .tc-title { font-size: 12.5px; color: #e8f6ff; }
.task-card .tc-desc { font-size: 10.5px; color: rgba(180, 210, 230, 0.78); }
.task-card .tc-coord { font-size: 8.5px; color: rgba(244, 216, 158, 0.8); }
.task-card .tc-act button { font-size: 9px; color: rgba(160, 220, 245, 0.7); }
.task-summary .ts-k { font-size: 9px; color: rgba(170, 202, 222, 0.7); }
.task-summary .ts-note { font-size: 9px; color: rgba(166, 198, 220, 0.6); }
.bag-item .bi-name { font-size: 12.5px; color: #eefaff; }
.bag-item .bi-desc { font-size: 10px; line-height: 1.55; color: rgba(184, 214, 232, 0.72); }
.bag-foot { font-size: 9px; color: rgba(166, 198, 220, 0.6); }
.history-item .hi-text { font-size: 11.5px; color: rgba(210, 233, 246, 0.86); }
.history-item .hi-turn { font-size: 8.5px; color: rgba(158, 231, 255, 0.62); }
.history-preview { font-size: 11.5px; color: rgba(210, 233, 246, 0.86); }
.slot .sl-t { font-size: 12.5px; color: #eaf8ff; }
.slot .sl-s { font-size: 9.5px; color: rgba(168, 200, 220, 0.7); }

/* ---- 向导 ---- */
.wiz-desc { font-size: 12.5px; color: rgba(188, 214, 232, 0.78); }
.wiz-section-head b { font-size: 12.5px; color: rgba(226, 244, 253, 0.92); }
.wiz-section-head .mini { font-size: 9px; color: rgba(150, 220, 250, 0.5); }
.world-card .wc-desc { font-size: 11.5px; color: rgba(190, 216, 234, 0.8); }
.world-card .wc-en { color: rgba(158, 231, 255, 0.6); }
.bond-card small { font-size: 9.5px; color: rgba(166, 198, 220, 0.72); }
.bond-card p { font-size: 10px; color: rgba(180, 208, 228, 0.68); }
.summary-card p { font-size: 11.5px; color: rgba(203, 227, 242, 0.84); }
.wiz-rail-note { font-size: 10.5px; color: rgba(160, 192, 214, 0.6); }
.wiz-foot-center { font-size: 10.5px; color: rgba(160, 192, 214, 0.6); }

/* ---- 开始界面 ---- */
.start-poem { color: rgba(186, 214, 234, 0.74); }
.start-meta { color: rgba(166, 198, 220, 0.68); }
.menu-label small { color: rgba(176, 208, 230, 0.56); }
.menu-head { color: rgba(158, 231, 255, 0.6); }
.menu-foot { color: rgba(156, 190, 214, 0.48); }
.start-foot { color: rgba(150, 184, 208, 0.55); }
.start-hint { color: rgba(158, 231, 255, 0.72); }

/* ---- 移动端密度 ---- */
@media (max-width: 720px) {
  .story-feed { padding: 14px 13px 10px; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 66px); mask-image: linear-gradient(180deg, transparent 0, #000 66px); }
  .story-text { font-size: 14px; line-height: 1.68; letter-spacing: 0.008em; }
  .story-text p { margin-bottom: 0.48em; }
  .story-row { margin-bottom: 16px; }
  .danmaku-item { font-size: 10px; }
  .modal-body p { font-size: 12px; }
  .set-row > label { font-size: 11px; }
  .story-actions { position: static; opacity: 1; transform: none; margin-top: 7px; }
  .story-actions button { padding: 3px 7px; font-size: 8.5px; }
  .mode-switch button { font-size: 0 !important; }
  .mode-switch button:before { font-size: 10px; }
  .composer-box textarea { min-height: 58px; font-size: 13px; }
  #ymdq-toast { top: auto; bottom: 200px; width: calc(100% - 20px); }
  #ymdq-toast .toast { max-width: 100%; font-size: 10px; }
}

/* 一梦大千 · 主题与新增组件 */

.ymdq { --quote: #bfe7ff; --quote-font: var(--serif); --quote-halo: rgba(243, 214, 160, 0.16); }
.ymdq[data-theme="void"] { --quote: #bfe7ff; --quote-halo: rgba(127, 231, 255, 0.18); }
.ymdq[data-theme="crimson"] {
  --void: #080103; --abyss: #120307; --deep: #1a050b; --deep2: #240811;
  --panel: rgba(26, 7, 13, 0.74); --panel2: rgba(32, 8, 16, 0.92); --panel-solid: #140409;
  --ink: #ffe9e5; --ink2: #f0c9c5; --muted: #b98a8c; --dim: #8a5c62;
  --cyan: #ff9c9c; --azure: #e05a6a; --blue: #b32b45; --violet: #d98cff;
  --gold: #ffc88a; --rose: #ff9fb8; --danger: #ff6b7d;
  --line: rgba(255, 120, 120, 0.16); --line2: rgba(255, 120, 120, 0.3);
  --glass: rgba(26, 7, 13, 0.66);
  --quote: #ff8f9a; --quote-halo: rgba(255, 80, 100, 0.2);
  background: radial-gradient(circle at 18% 8%, rgba(150, 25, 45, 0.24), transparent 36%),
    radial-gradient(circle at 84% 86%, rgba(90, 20, 80, 0.18), transparent 38%),
    linear-gradient(150deg, #070103 0%, #16040a 50%, #080104 100%);
}
.ymdq[data-theme="crimson"] :is(.game-top, .glass-panel, .story-main, .composer, .start-menu, .modal, .vn-dialogue, .settings-tabs) {
  border-color: rgba(255, 120, 120, 0.14);
  background-color: rgba(20, 4, 9, 0.7);
}
.ymdq[data-theme="crimson"] .game-top { background: linear-gradient(180deg, rgba(18, 3, 8, 0.94), rgba(18, 3, 8, 0.42)); }
.ymdq[data-theme="crimson"] .story-text .speaker { color: #ffb0a2; }
.ymdq[data-theme="crimson"] .story-text .quote { color: var(--quote); }

.ymdq[data-scheme="light"] { color-scheme: light; }
.ymdq[data-theme="paper"] {
  --void: #f5f0e5; --abyss: #f0e9dc; --deep: #e9e0cf; --deep2: #dfd4c0;
  --panel: rgba(255, 252, 244, 0.78); --panel2: rgba(255, 252, 246, 0.96); --panel-solid: #fffdf7;
  --ink: #26313a; --ink2: #3b4a56; --muted: #72695a; --dim: #8e8372;
  --cyan: #8a5a20; --azure: #a36b2c; --blue: #8c5a22; --violet: #7b5a72;
  --gold: #8b5e24; --rose: #a54b54; --danger: #a52f3a;
  --line: rgba(90, 70, 40, 0.18); --line2: rgba(90, 70, 40, 0.34);
  --glass: rgba(255, 252, 244, 0.74);
  --quote: #a33a2f; --quote-halo: rgba(138, 63, 47, 0.1);
  background: radial-gradient(circle at 15% 8%, rgba(210, 190, 150, 0.28), transparent 38%),
    radial-gradient(circle at 86% 84%, rgba(180, 160, 130, 0.16), transparent 40%),
    linear-gradient(150deg, #f6f2e8 0%, #efe8db 52%, #f7f3eb 100%);
}
.ymdq[data-theme="frost"] {
  --void: #eef3f6; --abyss: #e8eff3; --deep: #dfe8ee; --deep2: #d2dfe7;
  --panel: rgba(252, 254, 255, 0.8); --panel2: rgba(250, 253, 255, 0.96); --panel-solid: #f6fbfe;
  --ink: #20313d; --ink2: #354b59; --muted: #5f7480; --dim: #7e909a;
  --cyan: #3c6a81; --azure: #4f7f96; --blue: #3f6b83; --violet: #6b5b81;
  --gold: #7b5a2e; --rose: #9a4c62; --danger: #a23745;
  --line: rgba(50, 80, 100, 0.16); --line2: rgba(50, 80, 100, 0.3);
  --glass: rgba(248, 252, 255, 0.76);
  --quote: #2f5d72; --quote-halo: rgba(47, 93, 114, 0.1);
  background: radial-gradient(circle at 15% 8%, rgba(130, 170, 195, 0.22), transparent 38%),
    radial-gradient(circle at 86% 84%, rgba(160, 180, 200, 0.18), transparent 40%),
    linear-gradient(150deg, #eef4f7 0%, #e3edf2 52%, #f2f7fa 100%);
}
.ymdq[data-scheme="light"] :is(.game-top, .glass-panel, .story-main, .composer, .start-menu, .modal, .vn-dialogue, .settings-tabs) {
  border-color: var(--line);
  background-color: var(--panel);
  box-shadow: 0 18px 48px rgba(50, 45, 35, 0.08);
}
.ymdq[data-scheme="light"] .game-top { background: linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(255, 253, 248, 0.62)); }
.ymdq[data-scheme="light"] .story-text { color: var(--ink); }
.ymdq[data-scheme="light"] .story-text p.dialogue { color: var(--ink); }
.ymdq[data-scheme="light"] .story-text strong { color: var(--ink); }
.ymdq[data-scheme="light"] .story-text em { color: var(--muted); }
.ymdq[data-scheme="light"] .story-text .quote { color: var(--quote); text-shadow: none; }
.ymdq[data-scheme="light"] .story-text .sys-line { color: var(--azure); border-left-color: var(--line2); }
.ymdq[data-scheme="light"] .story-text .speaker { color: var(--cyan); }
.ymdq[data-scheme="light"] :is(.world-name, .player-name, .modal-head h2, .start-title, .md-name) { color: var(--ink); }
.ymdq[data-scheme="light"] :is(.world-time, .player-sub, .player-loc, .world-hint, .composer-meta, .danmaku-item, .md-desc, .md-flavor) { color: var(--ink2); }
.ymdq[data-scheme="light"] :is(.modal, .settings-pane, .set-row, .field label, .field-hint) { color: var(--ink); }
.ymdq[data-scheme="light"] :is(input, textarea, select) { color: var(--ink); background: rgba(255, 255, 255, 0.72); border-color: var(--line); }
.ymdq[data-scheme="light"] :is(input, textarea, select):focus { background: #fff; border-color: var(--line2); box-shadow: 0 0 0 1px var(--line); }
.ymdq[data-scheme="light"] .btn { color: var(--ink); border-color: var(--line2); background: rgba(255, 255, 255, 0.36); }
.ymdq[data-scheme="light"] .btn.primary { color: #fff; background: var(--azure); border-color: var(--azure); }
.ymdq[data-scheme="light"] .btn.ghost { color: var(--ink2); }
.ymdq[data-scheme="light"] .modal-mask { background: rgba(60, 55, 45, 0.28); }
.ymdq[data-scheme="light"] .modal { background: var(--panel2); }
.ymdq[data-scheme="light"] .modal-head { background: linear-gradient(90deg, rgba(180, 150, 100, 0.1), transparent 62%); }
.ymdq[data-scheme="light"] .composer { background: linear-gradient(180deg, rgba(255, 253, 248, 0.25), rgba(255, 253, 248, 0.9)); }
.ymdq[data-scheme="light"] .vn-dialogue { background: linear-gradient(180deg, rgba(255, 252, 246, 0.06), rgba(255, 252, 246, 0.9)); }
.ymdq[data-scheme="light"] .vn-text { color: var(--ink); }
.ymdq[data-scheme="light"] .vn-speaker { color: var(--cyan); }
.ymdq[data-scheme="light"] .panel-title { color: var(--muted); }

/* 正文引号 */
.story-text .quote, .vn-text .quote, .user-bubble .quote {
  color: var(--quote);
  font-family: var(--quote-font);
  font-weight: 500;
  letter-spacing: 0.015em;
  text-shadow: 0 0 18px var(--quote-halo);
}
.story-text p.dialogue .quote { text-shadow: 0 0 22px var(--quote-halo); }

/* 视觉小说背景选择 */
.bg-picker-note { font-size: 11px; line-height: 1.8; color: var(--muted); margin: 0 0 12px; }
.bg-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.bg-pick-item { display: flex; flex-direction: column; gap: 5px; text-align: left; padding: 8px; border: 1px solid var(--line); background: var(--glass); color: var(--ink2); }
.bg-pick-item:hover, .bg-pick-item.on { border-color: var(--line2); color: var(--ink); }
.bg-pick-item b { font-size: 11px; font-weight: 500; }
.bg-pick-item small { font-size: 9px; color: var(--muted); }
.bp-thumb { display: block; height: 70px; overflow: hidden; background: rgba(3, 10, 22, 0.4); border: 1px solid var(--line); }
.bp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-empty { display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--muted); }

/* 地图地标背景 */
.md-bg { margin: 0 0 12px; border: 1px solid var(--line); overflow: hidden; }
.md-bg img { width: 100%; height: 110px; object-fit: cover; display: block; }
.mn-bg { position: absolute; right: -14px; top: -14px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.bg-edit-prev { width: 100%; height: 120px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 10px; overflow: hidden; margin-bottom: 7px; }
.bg-edit-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 主题选择 */
.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.theme-card { text-align: left; padding: 10px; border: 1px solid var(--line); background: var(--glass); color: var(--ink2); display: flex; flex-direction: column; gap: 5px; }
.theme-card:hover, .theme-card.on { border-color: var(--line2); color: var(--ink); }
.theme-card b { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; }
.theme-card small { font-size: 9.5px; color: var(--muted); }
.tc-preview { height: 42px; display: flex; overflow: hidden; border: 1px solid var(--line); }
.tc-preview i { flex: 1; }
/* 浅色主题 · 全局可读性 */
.ymdq[data-scheme="light"] :is(.brand-mini b, .brand-mini span, .game-top, .top-actions button, .mode-switch button, .panel-title, .world-time, .world-hint, .player-sub, .player-loc, .buff-title, .buff, .danmaku-item, .danmaku-input button, .story-meta, .story-actions button, .composer-meta, .composer-tools button, .rail-btn, .rail-btn b, .rail-ico, .vn-chip, .vn-controls button, .vn-chapter, .vn-empty) { color: var(--ink2) !important; }
.ymdq[data-scheme="light"] .mode-switch button.active { color: #fff !important; }
.ymdq[data-scheme="light"] .user-bubble { color: var(--ink) !important; background: rgba(255, 252, 246, 0.86) !important; border: 1px solid var(--line2); border-right-color: var(--gold); box-shadow: 0 10px 28px rgba(50, 45, 35, 0.08); }
.ymdq[data-scheme="light"] .story-actions button { background: rgba(255, 252, 246, 0.94); border-color: var(--line2); }
.ymdq[data-scheme="light"] .glass-panel { backdrop-filter: blur(10px); }
.ymdq[data-scheme="light"] .rail-btn { border-color: var(--line); background: rgba(255, 252, 246, 0.5); }
.ymdq[data-scheme="light"] .settings-tabs { background: rgba(255, 252, 246, 0.5); }
.ymdq[data-scheme="light"] .settings-tabs button { color: var(--ink2) !important; }
.ymdq[data-scheme="light"] .settings-tabs button.on { color: #fff !important; background: var(--azure); }
.ymdq[data-scheme="light"] .set-group { background: rgba(255, 252, 246, 0.56); border-color: var(--line); }
.ymdq[data-scheme="light"] .set-group h4 { color: var(--ink); }
.ymdq[data-scheme="light"] .set-note, .ymdq[data-scheme="light"] .set-row label small, .ymdq[data-scheme="light"] .range-v { color: var(--muted) !important; }
.ymdq[data-scheme="light"] .modal-head { color: var(--ink); }
.ymdq[data-scheme="light"] .modal-close, .ymdq[data-scheme="light"] .modal-head button { color: var(--ink2) !important; }
.ymdq[data-scheme="light"] .modal-actions { background: rgba(255, 252, 246, 0.9); border-color: var(--line); }
.ymdq[data-scheme="light"] .theme-card { background: rgba(255, 255, 255, 0.5); }
.ymdq[data-scheme="light"] .theme-card b { color: var(--ink); }
.ymdq[data-scheme="light"] .theme-card small { color: var(--muted); }
.ymdq[data-scheme="light"] .main-title { background-image: linear-gradient(108deg, #1f2c36 6%, #4f6b7a 30%, #26313a 52%, #6b5a40 74%, #26313a 94%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: none; }
.ymdq[data-scheme="light"] .start-meta { color: var(--ink2) !important; }
.ymdq[data-scheme="light"] .start-meta i { border-color: var(--line2); }
.ymdq[data-scheme="light"] .start-menu { background: rgba(255, 252, 246, 0.5); border-color: var(--line); }
.ymdq[data-scheme="light"] .menu-btn { border-color: var(--line); }
.ymdq[data-scheme="light"] :is(.menu-idx, .menu-label strong, .menu-arrow) { color: #1f2c36 !important; }
.ymdq[data-scheme="light"] .menu-glyph { color: var(--line2) !important; }
.ymdq[data-scheme="light"] .title-seal { border-color: var(--line2); color: var(--ink); }
.ymdq[data-scheme="light"] .title-seal:before { border-color: var(--line); }
/* 浅色主题 · 面板背景与文字实底 */
.ymdq[data-scheme="light"] :is(.glass-panel, .story-main, .composer, .start-menu, .vn-dialogue, .settings-tabs, .modal-actions, .set-group) { background: var(--panel) !important; background-image: none !important; }
.ymdq[data-scheme="light"] .modal { background: var(--panel2) !important; background-image: none !important; }
.ymdq[data-scheme="light"] :is(.world-time, .player-sub, .player-loc, .world-hint, .buff, .buff-title, .panel-title, .story-meta, .composer-meta, .composer-tools button, .danmaku-item, .danmaku-input button, .rail-btn b, .top-actions button, .vn-chip, .vn-controls button, .vn-chapter) { color: var(--ink2) !important; opacity: 1 !important; }
.ymdq[data-scheme="light"] .buff { color: var(--gold) !important; background: rgba(160, 120, 60, 0.08); border-color: var(--line2); }
.ymdq[data-scheme="light"] .world-bar { background: linear-gradient(90deg, var(--line2), transparent); }
.ymdq[data-scheme="light"] .panel-title { color: var(--muted) !important; letter-spacing: 0.08em; }
.ymdq[data-scheme="light"] .world-time { color: var(--ink2) !important; }
.ymdq[data-scheme="light"] .player-sub { color: var(--muted) !important; }
.ymdq[data-scheme="light"] .story-meta { color: var(--muted) !important; }
.ymdq[data-scheme="light"] .composer-meta { color: var(--muted) !important; }
.ymdq[data-scheme="light"] .composer-tools button { color: var(--muted) !important; }
.ymdq[data-scheme="light"] .msg-raw { background: #fff !important; color: var(--ink) !important; border-color: var(--line); }
.ymdq[data-theme="crimson"] .main-title { background-image: linear-gradient(108deg, #fff4f0 6%, #ffc2b0 24%, #ffffff 40%, #e05a6a 58%, #ffd8d0 78%, #ff8a8a 94%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(200, 50, 60, 0.3)); }
.ymdq[data-theme="crimson"] .user-bubble { background: rgba(90, 18, 30, 0.5); border-color: rgba(255, 120, 120, 0.28); border-right-color: var(--rose); color: #ffece8; }
.ymdq[data-theme="crimson"] .mode-switch button.active { background: linear-gradient(100deg, rgba(140, 24, 42, 0.62), rgba(180, 40, 60, 0.22)); color: #fff; }
.ymdq[data-theme="crimson"] .menu-btn:hover .menu-label strong { color: #fff; }

/* BGM 曲库 */
.bgm-cat { border-top: 1px solid var(--line); padding: 9px 0; }
.bgm-cat-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.bgm-cat-head b { font-size: 12px; font-weight: 500; color: var(--ink); min-width: 42px; }
.bgm-cat-head small { font-size: 9px; color: var(--muted); flex: 1; min-width: 100px; }
.bgm-cat-head select { width: auto; min-width: 150px; padding: 6px 8px; font-size: 10px; }
.bgm-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.bgm-item { display: flex; align-items: center; gap: 6px; padding: 4px 7px; border: 1px solid var(--line); font-size: 10px; color: var(--ink2); }
.bgm-item .btn { padding: 2px 5px; font-size: 9px; }
.bgm-empty { font-size: 9.5px; color: var(--muted); padding: 4px 0; }

/* 地图二级层级 */
.map-crumb { position: absolute; left: 18px; top: 56px; z-index: 4; display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); pointer-events: auto; }
.map-crumb button { color: var(--cyan); font-size: 10px; padding: 3px 6px; border: 1px solid var(--line); background: var(--glass); }
.map-crumb i { font-style: normal; opacity: 0.4; }
.map-crumb span { color: var(--ink2); }
.map-crumb em { font-style: normal; color: var(--muted); font-size: 9px; margin-left: 4px; }
.map-empty-level { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); color: var(--muted); font-size: 11px; line-height: 1.8; text-align: center; max-width: 240px; }
.md-sub-list { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.md-sub-list h4 { width: 100%; margin: 0 0 3px; font-size: 9px; letter-spacing: 0.16em; color: var(--muted); font-weight: 500; }
.md-sub-list span { font-size: 9.5px; padding: 4px 6px; border: 1px solid var(--line); color: var(--ink2); }
.md-actions { flex-wrap: wrap; }

/* ==========================================================================
   主题统一层：非默认主题统一文字、边框、面板与子界面底色
   ========================================================================== */
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) :where(*) {
  color: var(--ink2) !important;
  border-color: var(--line) !important;
}
.ymdq[data-theme="crimson"] :is(
  .glass-panel, .story-main, .composer, .start-menu, .modal, .modal-head, .modal-actions,
  .settings-tabs, .set-group, .rail-btn, .char-card, .task-card, .bag-item, .map-detail, .node-row, .preset-chip, .bc-portrait, .wiz-portrait,
  .map-canvas, .map-toolbar button, .bg-pick-item, .bond-card, .cd-portrait, .msg-raw,
  .user-bubble, .vn-dialogue, .vn-controls button, .vn-chip, .top-actions button,
  .mode-switch, .md-tag, .cd-meta .cm, .cbag-item, .cd-tabs, .cd-tabs button,
  .char-filters button, .bag-filters button, .task-filters button, .story-actions button,
  .composer-tools button, .modal-close, .wiz-card, .summary-card, .field input,
  .field textarea, .field select, .node-editor input, .node-editor textarea,
  [class^="rm-"], [class*=" rm-"]
) {
  background-color: rgba(20, 4, 9, 0.58) !important;
  background-image: none !important;
}
.ymdq[data-theme="crimson"] :is(input, textarea, select) {
  background-color: rgba(28, 6, 12, 0.74) !important;
  color: #ffe9e5 !important;
}
.ymdq[data-scheme="light"] :is(
  .glass-panel, .story-main, .composer, .start-menu, .modal, .modal-head, .modal-actions,
  .settings-tabs, .set-group, .rail-btn, .char-card, .task-card, .bag-item, .map-detail, .node-row, .preset-chip, .bc-portrait, .wiz-portrait,
  .map-canvas, .map-toolbar button, .bg-pick-item, .bond-card, .cd-portrait, .msg-raw,
  .user-bubble, .vn-dialogue, .vn-controls button, .vn-chip, .top-actions button,
  .mode-switch, .md-tag, .cd-meta .cm, .cbag-item, .cd-tabs, .cd-tabs button,
  .char-filters button, .bag-filters button, .task-filters button, .story-actions button,
  .composer-tools button, .modal-close, .wiz-card, .summary-card, .field input,
  .field textarea, .field select, .node-editor input, .node-editor textarea,
  [class^="rm-"], [class*=" rm-"]
) {
  background-color: rgba(255, 252, 244, 0.78) !important;
  background-image: none !important;
}
.ymdq[data-scheme="light"] :is(input, textarea, select) {
  background-color: rgba(255, 255, 255, 0.84) !important;
  color: var(--ink) !important;
}
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) :is(
  .btn.primary, .settings-tabs button.on, .mode-switch button.active,
  .char-filters button.on, .bag-filters button.on, .task-filters button.on, .cd-tabs button.on
) {
  color: #fff !important;
  border-color: var(--line2) !important;
}
.ymdq[data-theme="crimson"] :is(.btn.primary, .settings-tabs button.on, .mode-switch button.active, .char-filters button.on, .bag-filters button.on, .task-filters button.on, .cd-tabs button.on) { background: #8e1f33 !important; }
.ymdq[data-scheme="light"] :is(.btn.primary, .settings-tabs button.on, .mode-switch button.active, .char-filters button.on, .bag-filters button.on, .task-filters button.on, .cd-tabs button.on) { background: var(--azure) !important; }
.ymdq[data-scheme="light"] .main-title { color: transparent !important; }
.ymdq[data-theme="crimson"] .main-title { color: transparent !important; }
.ymdq[data-theme="paper"] :is(.story-text, .story-text p, .story-text strong, .modal, .set-row, .field label, .world-name, .player-name) { color: var(--ink) !important; }
.ymdq[data-theme="frost"] :is(.story-text, .story-text p, .story-text strong, .modal, .set-row, .field label, .world-name, .player-name) { color: var(--ink) !important; }
.ymdq[data-theme="crimson"] :is(.story-text, .story-text p, .story-text strong) { color: #ffe9e5 !important; }
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) :is(.story-text .quote, .user-bubble .quote) { color: var(--quote) !important; text-shadow: 0 0 18px var(--quote-halo) !important; }
.ymdq[data-theme="crimson"] :is(.story-text .speaker, .story-text .sys-line) { color: #ff9c9c !important; }
.ymdq[data-scheme="light"] :is(.story-text .speaker, .story-text .sys-line) { color: var(--cyan) !important; }
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) :is(.btn.danger, .danger, .toast.error) { color: var(--danger) !important; }
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) :is(.md-tag, .cc-tag, .tag) { background: transparent !important; }
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) .map-canvas { background-color: var(--panel) !important; }
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) .vn-stage { background-color: var(--deep) !important; }
.ymdq[data-scheme="light"] .vn-stage { background-color: #e9e2d5 !important; }

/* 角色/玩家/立绘色相随主题；浅色主题把人物底盘改成浅底 */
.ymdq[data-theme="crimson"] { --theme-hue: 350; }
.ymdq[data-theme="paper"] { --theme-hue: 35; }
.ymdq[data-theme="frost"] { --theme-hue: 200; }
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) :is(.char-card .cc-portrait, .cd-portrait, .player-avatar, .vn-figure, .vn-user-figure, .cc-portrait .cc-figure, .cd-portrait .cd-fig) {
  --h: var(--theme-hue) !important;
}
.ymdq[data-theme="crimson"] :is(.char-card .cc-portrait, .cd-portrait) {
  background: radial-gradient(circle at 50% 30%, rgba(180, 45, 60, 0.38), transparent 66%), linear-gradient(160deg, #2a0810, #100206) !important;
}
.ymdq[data-theme="paper"] :is(.char-card .cc-portrait, .cd-portrait) {
  background: radial-gradient(circle at 50% 30%, rgba(190, 150, 90, 0.28), transparent 66%), linear-gradient(160deg, #fbf7ee, #e8ddca) !important;
}
.ymdq[data-theme="frost"] :is(.char-card .cc-portrait, .cd-portrait) {
  background: radial-gradient(circle at 50% 30%, rgba(120, 160, 180, 0.28), transparent 66%), linear-gradient(160deg, #f4f9fc, #dce8ee) !important;
}
.ymdq[data-scheme="light"] :is(.cc-vertical, .cc-name, .cc-role, .cc-heart, .cd-portrait .cd-name, .cd-portrait .cd-id, .cd-portrait .cd-sigil) {
  color: var(--ink) !important;
  text-shadow: none !important;
}
.ymdq[data-scheme="light"] .char-card .cc-figure { opacity: 0.28 !important; }
.ymdq[data-theme="paper"] .player-avatar { background: radial-gradient(circle at 50% 30%, rgba(190,150,90,.35), transparent 66%), linear-gradient(160deg, #fbf7ee, #e8ddca) !important; color: var(--ink) !important; }
.ymdq[data-theme="frost"] .player-avatar { background: radial-gradient(circle at 50% 30%, rgba(120,160,180,.35), transparent 66%), linear-gradient(160deg, #f4f9fc, #dce8ee) !important; color: var(--ink) !important; }
.ymdq[data-theme="crimson"] .player-avatar { background: radial-gradient(circle at 50% 30%, rgba(180,45,60,.4), transparent 66%), linear-gradient(160deg, #2a0810, #100206) !important; }
.ymdq[data-theme="crimson"] .char-card .cc-portrait:before {
  background: linear-gradient(180deg, transparent 42%, rgba(20, 4, 9, 0.94) 100%), repeating-linear-gradient(0deg, transparent 0 37px, rgba(255, 120, 120, 0.03) 37px 38px) !important;
}
.ymdq[data-scheme="light"] .char-card .cc-portrait:before {
  background: linear-gradient(180deg, transparent 42%, rgba(255, 252, 244, 0.96) 100%), repeating-linear-gradient(0deg, transparent 0 37px, rgba(90, 70, 40, 0.03) 37px 38px) !important;
}
.ymdq[data-scheme="light"] .char-card .cc-vertical { color: rgba(38, 49, 58, 0.28) !important; text-shadow: none !important; }
.ymdq[data-scheme="light"] .char-card .cc-sigil { color: var(--cyan) !important; }
/* 地图主题化 */
.ymdq[data-theme="crimson"] .map-node .mn-dot { background: #1a050b !important; border-color: rgba(255, 120, 120, 0.7) !important; box-shadow: 0 0 14px rgba(255, 80, 100, 0.24) !important; }
.ymdq[data-theme="crimson"] .map-node .mn-dot:after { background: rgba(255, 120, 120, 0.55) !important; }
.ymdq[data-theme="crimson"] .map-node .mn-label { background: rgba(20, 4, 9, 0.78) !important; color: #ffe9e5 !important; border-color: transparent; text-shadow: 0 2px 8px #080103; }
.ymdq[data-theme="crimson"] .map-legend i { background: var(--cyan) !important; }
.ymdq[data-scheme="light"] .map-node .mn-dot { background: #fff !important; border-color: var(--cyan) !important; box-shadow: 0 0 12px var(--line) !important; }
.ymdq[data-scheme="light"] .map-node .mn-dot:after { background: var(--cyan) !important; }
.ymdq[data-scheme="light"] .map-node .mn-label { background: rgba(255, 252, 244, 0.9) !important; color: var(--ink) !important; text-shadow: none !important; border-color: var(--line); }
.ymdq[data-scheme="light"] .map-node .mn-coord { color: var(--muted) !important; }
.ymdq[data-scheme="light"] .map-legend i { background: var(--cyan) !important; }
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) .md-stats div { background: var(--panel) !important; border-color: var(--line) !important; }
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) .map-svg line,
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) .map-svg circle,
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) .map-svg path { stroke: var(--line2) !important; }
/* 子界面任务/背包/角色面板 */
.ymdq[data-theme="crimson"] :is(.task-summary, .task-col, .task-card, .task-add, .node-row, .preset-chip, .bc-portrait, .wiz-portrait, .bag-toolbar, .bag-item, .bag-foot, .bag-filters button, .char-toolbar, .char-strip, .char-card, .char-pager, .cd-grid, .cd-left, .cd-right, .cd-pane, .cd-meta .cm, .cbag-item, .bag-empty, .task-empty) {
  background-color: rgba(20, 4, 9, 0.58) !important;
  background-image: none !important;
}
.ymdq[data-scheme="light"] :is(.task-summary, .task-col, .task-card, .task-add, .node-row, .preset-chip, .bc-portrait, .wiz-portrait, .bag-toolbar, .bag-item, .bag-foot, .bag-filters button, .char-toolbar, .char-strip, .char-card, .char-pager, .cd-grid, .cd-left, .cd-right, .cd-pane, .cd-meta .cm, .cbag-item, .bag-empty, .task-empty) {
  background-color: rgba(255, 252, 244, 0.78) !important;
  background-image: none !important;
}
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) :is(
  .task-card .tc-desc, .task-card .tc-title, .task-summary .ts-k, .task-summary .ts-item b,
  .task-summary .ts-item small, .task-summary .ts-note, .bag-item .bi-desc, .bag-item .bi-name,
  .bag-item .bi-qty, .bag-empty, .task-empty, .cd-meta .cm b, .cd-meta .cm span,
  .cd-heart, .cd-bars .bl-text, .cbag-item b, .cbag-item small
) { color: var(--ink2) !important; }
.ymdq[data-scheme="light"] :is(.btn, .task-add, .bag-foot button, .char-pager button, .task-card .tc-act button) {
  background-color: rgba(255, 255, 255, 0.45) !important;
  color: var(--ink) !important;
}
.ymdq[data-theme="crimson"] :is(.btn, .task-add, .bag-foot button, .char-pager button, .task-card .tc-act button) {
  background-color: rgba(35, 8, 15, 0.72) !important;
  color: var(--ink2) !important;
}
.ymdq[data-theme="crimson"] :is(.vn-bg:not(.bg-custom), .vn-bg-next:not(.bg-custom)) { filter: sepia(0.28) hue-rotate(-28deg) saturate(0.9) brightness(0.86); }
.ymdq[data-scheme="light"] :is(.vn-bg:not(.bg-custom), .vn-bg-next:not(.bg-custom)) { filter: sepia(0.3) saturate(0.55) brightness(1.45); }
.ymdq[data-scheme="light"] .vn-stage { background: #e8e1d4 !important; }
.ymdq[data-scheme="light"] .vn-bg { opacity: 0.82; }
.ymdq[data-scheme="light"] :is(.vn-controls button, .vn-chip, .vn-dialogue) { background-color: rgba(255, 252, 244, 0.82) !important; }
.ymdq[data-scheme="light"] .vn-text { color: var(--ink) !important; }
.ymdq[data-scheme="light"] .char-pager { background: transparent !important; border-color: transparent !important; }
.ymdq[data-scheme="light"] .char-pager button { background: rgba(255, 255, 255, 0.35) !important; }
.ymdq[data-scheme="light"] :is(.bag-item .bi-name, .bag-item .bi-desc, .bag-item .bi-qty, .bag-item .bi-rarity, .bag-item .bi-icon, .bag-toolbar, .bag-foot) {
  color: var(--ink2) !important;
}
.ymdq[data-scheme="light"] .bag-item .bi-desc { color: var(--muted) !important; }
/* 开局向导与世界选择 */
.ymdq[data-theme="crimson"] :is(.wiz-top, .wiz-foot, .wiz-rail, .world-card, .world-card.custom, .bond-card, .wiz-portrait) {
  background: rgba(20, 4, 9, 0.72) !important;
  background-image: none !important;
  border-color: var(--line) !important;
}
.ymdq[data-scheme="light"] :is(.wiz-top, .wiz-foot, .wiz-rail, .world-card, .world-card.custom, .bond-card, .wiz-portrait) {
  background: rgba(255, 252, 244, 0.82) !important;
  background-image: none !important;
  border-color: var(--line) !important;
}
.ymdq[data-theme="crimson"] .world-card:before { background: radial-gradient(circle at 78% 22%, rgba(255, 80, 100, 0.22), transparent 42%), linear-gradient(160deg, transparent 40%, rgba(20, 4, 9, 0.6)) !important; }
.ymdq[data-scheme="light"] .world-card:before { background: radial-gradient(circle at 78% 22%, rgba(160, 120, 70, 0.16), transparent 42%), linear-gradient(160deg, transparent 40%, rgba(255, 252, 244, 0.4)) !important; }
.ymdq[data-theme="crimson"] .world-card.on { border-color: rgba(255, 120, 120, 0.7) !important; }
.ymdq[data-scheme="light"] .world-card.on { border-color: var(--line2) !important; }
.ymdq[data-scheme="light"] .world-card .wc-name { color: var(--ink) !important; }
.ymdq[data-scheme="light"] .world-card .wc-mark { color: var(--line) !important; opacity: 0.55; }
.ymdq[data-theme="crimson"] .world-card .wc-mark { color: rgba(255, 120, 120, 0.08) !important; }
/* 人物关系星图 */

/* 一梦大千 · 桌宠 / 论坛 / 记忆 / 变量说明 / 桌宠设置 */
#buffTip {
  position: fixed; z-index: 2147483005; width: 238px; padding: 10px 12px;
  background: var(--panel2); border: 1px solid var(--line2); color: var(--ink2);
  box-shadow: 0 14px 36px rgba(0,0,0,.35); font-size: 10px; line-height: 1.7;
  opacity: 0; transform: translateY(6px); pointer-events: none; transition: .2s;
}
#buffTip.show { opacity: 1; transform: none; pointer-events: auto; }
#buffTip b { display: block; font-weight: 500; color: var(--cyan); margin-bottom: 3px; letter-spacing: .1em; }

/* 桌宠 */
.ymdq-pet { position: absolute; right: 92px; bottom: 136px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; transition: left 0.32s var(--ease), top 0.32s var(--ease); }
.ymdq-pet.dragging { transition: none; }
.ymdq-pet.hide { display: none; }
.pet-figure { width: calc(92px * var(--pet-scale, 1)); height: calc(92px * var(--pet-scale, 1)); border: 0; border-radius: 0; overflow: visible; background: transparent; box-shadow: none; transition: transform .3s; touch-action: none; cursor: grab; }
.pet-figure img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 8px 18px rgba(0,0,0,.28)); }
.pet-figure:hover { transform: translateY(-3px) scale(1.04); }
.pet-bubble { display: none; cursor: pointer; max-width: 290px; padding: 10px 12px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink2); font-size: 10px; line-height: 1.8; box-shadow: 0 12px 32px rgba(0,0,0,.3); }
.pet-bubble.show { display: block; }
.pet-actions { display: flex; gap: 4px; }
.pet-actions button { padding: 4px 7px; border: 1px solid var(--line); background: var(--glass); color: var(--ink2); font-size: 9px; }
.pet-actions button:hover { border-color: var(--line2); color: var(--cyan); }
.pet-setting-preview { display: flex; align-items: center; gap: 8px; }
.pet-setting-preview img { width: 58px; height: 58px; object-fit: contain; border: 1px solid var(--line); background: var(--glass); }
.pet-expr-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pet-expr-pick { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px; border: 1px solid var(--line); background: var(--glass); }
.pet-expr-pick img { width: 42px; height: 42px; object-fit: contain; }
.pet-expr-pick span { font-size: 8px; color: var(--muted); }

/* 论坛 */
.forum-home { max-width: 780px; margin: 0 auto; }
.forum-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.forum-toolbar b { display: block; font-size: 15px; font-weight: 400; letter-spacing: .12em; }
.forum-toolbar small { display: block; margin-top: 3px; font-size: 9px; color: var(--muted); }
.forum-actions { display: flex; gap: 5px; flex: none; }
.forum-warn { padding: 9px 12px; border: 1px solid rgba(255,109,136,.22); color: var(--danger); font-size: 10px; margin-bottom: 10px; }
.forum-post { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); background: var(--glass); margin-bottom: 7px; color: var(--ink2); transition: .25s; }
.forum-post:hover { border-color: var(--line2); transform: translateY(-1px); }
.forum-post .fp-new { display: none; position: absolute; right: 9px; top: 8px; color: #ff6d88; font-size: 8px; font-weight: 600; letter-spacing: .08em; }
.forum-post.new .fp-new { display: inline; }
.forum-post .fp-avatar, .fd-avatar, .fd-ra { position: relative; width: 28px; height: 28px; display: block; padding: 0; border: 1px solid var(--line2); border-radius: 50%; background: var(--panel2); color: var(--gold); overflow: hidden; flex: none; }
.forum-post .fp-avatar i, .fd-avatar i, .fd-ra i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0; font: 500 12px/1 var(--serif); font-style: normal; text-align: center; line-height: 1; }
.forum-post .fp-main { min-width: 0; display: block; }
.forum-post .fp-title { display: block; padding-right: 30px; font-size: 12.5px; color: var(--ink); letter-spacing: .04em; }
.forum-post .fp-preview { display: block; margin-top: 4px; font-size: 10px; line-height: 1.7; color: var(--ink2); opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.forum-post .fp-meta { display: block; margin-top: 5px; font-size: 8.5px; color: var(--muted); }
.forum-empty { padding: 30px; text-align: center; color: var(--muted); font-size: 11px; }
.forum-detail { max-width: 780px; margin: 0 auto; }
.fd-head { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; }
.fd-head h3 { margin: 0 0 4px; font-size: 18px; font-weight: 400; }
.fd-meta { font-size: 9px; color: var(--muted); margin-bottom: 10px; }
.fd-content { font-size: 12.5px; line-height: 2; color: var(--ink2); padding: 14px 16px; border: 1px solid var(--line); background: var(--glass); }
.fd-replies { margin-top: 12px; }
.fd-reply { display: flex; gap: 8px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 10.5px; line-height: 1.75; }
.fd-reply .fd-ra { width: 22px; height: 22px; font-size: 9px; flex: none; }
.fd-reply b { display: block; color: var(--cyan); font-weight: 400; font-size: 9.5px; }
.fd-reply span { display: block; margin-top: 2px; }
.fd-reply.anon b { color: var(--muted); }
.fd-reply.self { background: rgba(127, 231, 255, 0.04); }
.fd-reply b em { margin-left: 6px; padding: 0 4px; border: 1px solid rgba(127, 231, 255, .28); font-style: normal; font-size: 7.5px; color: var(--cyan); }
.fd-reply-title { margin-bottom: 6px; font-size: 9px; letter-spacing: .12em; color: var(--muted); }
.forum-reply-box { position: static; z-index: 1; display: block; margin-top: 14px; padding: 10px 10px 6px; border: 1px solid var(--line); background: var(--panel-solid); }
.forum-reply-box textarea { width: 100%; box-sizing: border-box; background: var(--panel); }
.forum-reply-box textarea { min-height: 46px; flex: 1; }
.forum-reply-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.forum-reply-actions .btn { flex: none; }
.forum-anon { display: inline-flex; align-items: center; gap: 5px; width: auto; min-width: 0; padding: 2px 0; border: 0; background: transparent; font-size: 10px; color: var(--ink2); white-space: nowrap; cursor: pointer; }
.forum-anon input { appearance: none; -webkit-appearance: none; width: 14px; height: 14px; margin: 0; padding: 0; border: 1px solid var(--line2); border-radius: 50%; background: transparent; flex: none; cursor: pointer; }
.forum-anon input:checked { background: var(--cyan); box-shadow: inset 0 0 0 4px var(--panel2); border-color: var(--cyan); }
.forum-anon span { line-height: 1; }
@media (max-width: 720px) { .forum-toolbar { align-items: flex-start; flex-direction: column; } }

/* 变量说明 */
.var-explain .ve-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 8px; }
.var-explain .ve-head b { font-size: 14px; font-weight: 400; }
.var-explain .ve-head span { font-size: 9.5px; color: var(--muted); }
.var-explain .ve-table { display: flex; flex-direction: column; gap: 2px; }
.var-explain .ve-row { display: grid; grid-template-columns: 100px 1fr 86px; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 10.5px; line-height: 1.7; }
.var-explain .ve-row b { font-weight: 400; color: var(--cyan); }
.var-explain .ve-row span { color: var(--ink2); }
.var-explain .ve-row em { font-style: normal; font-size: 9px; text-align: right; }
.var-explain .ve-row em.ok { color: var(--gold); }
.var-explain .ve-row em.muted { color: var(--muted); }
.var-explain .ve-warn { margin-top: 9px; padding: 8px 10px; border: 1px solid rgba(255,109,136,.2); color: var(--danger); font-size: 10px; }
.var-explain .ve-ok { margin-top: 9px; color: var(--gold); font-size: 10px; }
.var-explain .ve-note { margin-top: 8px; color: var(--muted); font-size: 9px; line-height: 1.7; }

/* 记忆 */
.mem-list { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; }
.mem-row { display: grid; grid-template-columns: 82px 1fr auto auto; gap: 6px; align-items: start; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 10px; line-height: 1.65; }
.mem-row em { font-style: normal; color: var(--cyan); }
.mem-row span { color: var(--ink2); }
.mem-row button { padding: 2px 5px; border: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.mem-empty { color: var(--muted); font-size: 10px; padding: 8px 0; }

@media (max-width: 720px) {
  .ymdq-pet { right: 68px; bottom: 74px; }
  .pet-figure { width: 70px; height: 70px; }
  .pet-bubble { max-width: 210px; }
  .var-explain .ve-row { grid-template-columns: 82px 1fr; }
  .var-explain .ve-row em { grid-column: 2; text-align: left; }
}
/* 透明立绘：有图片时不要用深色底盘冒充背景 */
.char-card .cc-portrait:has(img), .cd-portrait:has(img) { background: transparent !important; }
.char-card .cc-portrait:has(img):before { background: linear-gradient(180deg, transparent 46%, rgba(5, 12, 24, 0.7) 100%) !important; }
.cd-portrait:has(img) .cd-fig { background: transparent !important; }
.generic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.generic-cell { border: 1px solid var(--line); background: var(--glass); padding: 7px; }
.generic-thumb { height: 74px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--panel2); overflow: hidden; }
.generic-thumb img { width: 100%; height: 100%; object-fit: contain; }
.generic-thumb span { font-size: 9px; color: var(--muted); }
.generic-label { margin: 6px 0 4px; font-size: 9px; color: var(--ink2); }
.generic-actions { display: flex; gap: 4px; }
.generic-actions .btn { padding: 3px 5px; font-size: 8px; }
@media (max-width: 720px) { .generic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 透明立绘框：图片存在时不要用深色渐变冒充背景 */
:is(.wiz-portrait, .portrait-preview, .player-avatar, .cc-portrait, .cd-portrait):has(img) {
  background: transparent !important;
  background-image: none !important;
}
/* 存档管理器 · 世界 / 开局 / 存档 */
.save-manager { max-width: 900px; margin: 0 auto; }
.sm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; flex-wrap: wrap; }
.sm-head b { font-size: 15px; font-weight: 400; letter-spacing: .08em; }
.sm-head small { display: block; margin-top: 4px; font-size: 9.5px; line-height: 1.6; color: var(--muted); }
.sm-actions { display: flex; gap: 5px; flex: none; flex-wrap: wrap; }
.sm-help { margin: 8px 0 12px; padding: 8px 10px; border-left: 2px solid rgba(127,231,255,.25); background: rgba(127,231,255,.035); font-size: 9px; line-height: 1.85; color: var(--muted); }
.sm-world-block { margin-top: 14px; }
.sm-world { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 2px; border-bottom: 1px solid var(--line2); font-size: 12px; color: var(--gold); letter-spacing: .08em; }
.sm-world span { font-size: 8.5px; color: var(--muted); }
.sm-run { margin-top: 10px; border: 1px solid var(--line); background: var(--glass); }
.sm-run.current { border-color: rgba(127,231,255,.38); box-shadow: inset 2px 0 0 var(--cyan); }
.sm-run-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; align-items: flex-start; }
.sm-run-title { min-width: 0; }
.sm-run-title b { display: block; font-size: 13px; font-weight: 400; color: var(--ink); letter-spacing: .05em; }
.sm-run-title small { display: block; margin-top: 4px; font-size: 8.5px; color: var(--muted); }
.sm-run-title i { display: block; margin-top: 4px; font-size: 9px; font-style: normal; color: var(--ink2); opacity: .68; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 520px; }
.sm-run-tag { display: inline-block; margin-right: 6px; padding: 1px 5px; border: 1px solid rgba(232,201,138,.28); color: rgba(232,201,138,.8); font-size: 7.5px; letter-spacing: .1em; vertical-align: 2px; }
.sm-run-btns { display: flex; gap: 4px; flex: none; flex-wrap: wrap; justify-content: flex-end; max-width: 300px; }
.sm-run-saves { border-top: 1px solid var(--line); }
.sm-save { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid rgba(127,231,255,.055); }
.sm-save:first-child { border-top: 0; }
.sm-save.auto { background: rgba(232,201,138,.035); }
.sm-kind { flex: none; width: 30px; text-align: center; padding: 2px 0; border: 1px solid rgba(127,231,255,.16); color: rgba(127,231,255,.7); font-size: 7.5px; letter-spacing: .08em; }
.sm-save.auto .sm-kind { border-color: rgba(232,201,138,.3); color: rgba(232,201,138,.85); }
.sm-save-main { min-width: 0; flex: 1; }
.sm-save-main b { display: block; font-size: 11px; font-weight: 400; color: var(--ink); }
.sm-save-main small { display: block; margin-top: 2px; font-size: 8px; color: var(--muted); }
.sm-save-main i { display: block; margin-top: 2px; font-size: 8.5px; font-style: normal; color: var(--ink2); opacity: .62; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 540px; }
.sm-save-btns { display: flex; gap: 4px; flex: none; }
.sm-no-save, .sm-empty { padding: 20px 16px; text-align: center; font-size: 9.5px; line-height: 1.8; color: var(--muted); border: 1px dashed rgba(127,231,255,.12); }
.sm-empty { margin-top: 14px; }
@media (max-width: 720px) {
  .sm-head { flex-direction: column; align-items: flex-start; }
  .sm-run-head { flex-direction: column; }
  .sm-run-btns { justify-content: flex-start; max-width: none; }
  .sm-save { flex-wrap: wrap; }
  .sm-save-btns { width: 100%; justify-content: flex-end; }
  .sm-save-main i { max-width: 100%; white-space: normal; }
  .sm-run-title i { max-width: 100%; white-space: normal; }
}

/* 3.9.4 · BUFF 浮窗里的轮数控制 */
.buff-tip-ctl { display: flex; align-items: center; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.buff-tip-ctl button { min-width: 24px; height: 22px; padding: 0 6px; font-size: 10px; color: var(--ink2); border: 1px solid rgba(127, 231, 255, .28); background: rgba(12, 34, 62, .6); }
.buff-tip-ctl button:hover { border-color: rgba(127, 231, 255, .66); color: var(--cyan); }
.buff-tip-ctl em { font-style: normal; min-width: 34px; text-align: center; font-size: 10px; color: var(--gold); }
.buff-tip-ctl .buff-tip-long { color: rgba(232, 201, 138, .9); border-color: rgba(232, 201, 138, .3); }
.buff-tip-ctl .buff-tip-del { margin-left: auto; color: #ffb3c9; border-color: rgba(255, 159, 190, .34); }
.buff-tip-ctl .buff-tip-del:hover { border-color: rgba(255, 159, 190, .75); }

/* ==========================================================================
   一梦大千 · 3.0 新增层
   1) 正文角色名标签  2) 视觉小说相关功能折叠  3) 剧情图 / 剧情CG
   4) 直播系统  5) 提示词中心
   本文件在 themes.css 之后加载，负责覆盖主题层的全局 !important 规则。
   ========================================================================== */

/* ---------------- 1. 角色名标签 ---------------- */
.ymdq { --spk: #8ff0ff; --spk-halo: rgba(127, 231, 255, 0.4); --spk-line: rgba(127, 231, 255, 0.36); }
.ymdq[data-theme="crimson"] { --spk: #ff9aa2; --spk-halo: rgba(255, 110, 130, 0.42); --spk-line: rgba(255, 120, 120, 0.4); }
.ymdq[data-theme="paper"] { --spk: #8a5320; --spk-halo: rgba(138, 83, 32, 0.2); --spk-line: rgba(138, 83, 32, 0.34); }
.ymdq[data-theme="frost"] { --spk: #2f6076; --spk-halo: rgba(47, 96, 118, 0.2); --spk-line: rgba(47, 96, 118, 0.32); }

.ymdq .spk-tag {
  display: inline;
  color: var(--spk) !important;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px var(--spk-halo);
  border-bottom: 1px solid var(--spk-line);
  padding-bottom: 1px;
  -webkit-text-fill-color: currentColor;
}
.ymdq .spk-colon { color: var(--spk) !important; opacity: 0.72; font-weight: 400; }
.ymdq .story-text p.dialogue.tagged { padding-left: 12px; }
.ymdq .story-text p.dialogue.tagged:before { background: linear-gradient(180deg, var(--spk-line), transparent); }
.ymdq .story-text p.speaker-line.tagged { display: block; }
.ymdq .story-text p.speaker-line.tagged .quote { color: var(--quote); }
.ymdq .user-bubble .spk-tag { color: var(--spk) !important; text-shadow: none; }
.ymdq .vn-text .spk-tag { color: var(--spk) !important; }
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) .story-text p.dialogue.tagged .spk-tag { color: var(--spk) !important; }
.ymdq[data-theme="paper"] .spk-tag, .ymdq[data-theme="frost"] .spk-tag { text-shadow: none; }

/* ---------------- 2. 视觉小说：相关功能折叠 ---------------- */
.vn-hud { align-items: flex-start; }
.vn-hud-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; pointer-events: auto; }
.vn-bgm-chip { cursor: pointer; }
.vn-more-btn { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: rgba(178, 211, 232, 0.78); }
.vn-more-btn:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.42); }
.vn-more-btn.on { color: var(--cyan); border-color: rgba(127, 231, 255, 0.5); }
.vn-more-arrow { font-style: normal; font-size: 9px; line-height: 1; transition: transform 0.3s; }
.vn-more-btn.on .vn-more-arrow { transform: rotate(180deg); }
.vn-stage .vn-hud-right .vn-controls {
  position: static;
  right: auto;
  top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 118px;
  margin-top: 2px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 0.42s var(--ease, ease), opacity 0.28s, transform 0.28s;
  pointer-events: none;
}
.vn-stage .vn-hud-right .vn-controls.open {
  max-height: 460px;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.vn-stage .vn-hud-right .vn-controls button { width: 100%; text-align: left; }
@media (max-width: 720px) {
  .vn-stage .vn-hud-right .vn-controls { width: 104px; }
  .vn-stage .vn-hud-right .vn-controls.open { max-height: 380px; }
}

/* ---------------- 3. 剧情图 / 剧情CG ---------------- */
.vn-cg { position: absolute; inset: 0; z-index: 1; opacity: 0; visibility: hidden; transition: opacity 0.8s var(--ease, ease); pointer-events: none; }
.vn-cg.show { opacity: 1; visibility: visible; }
.vn-cg-frame { position: absolute; inset: 0; overflow: hidden; background: #01040b; }
.vn-cg-media { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: 50% 50%; }
.vn-cg-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: rgba(200, 225, 242, 0.7); background: radial-gradient(ellipse at 50% 45%, rgba(20, 40, 70, 0.6), rgba(1, 4, 11, 0.96)); text-align: center; }
.vn-cg-empty b { font-size: 15px; letter-spacing: 0.18em; font-weight: 400; }
.vn-cg-empty span { font-size: 10.5px; line-height: 1.8; }
.vn-cg-grain { position: absolute; inset: 0; pointer-events: none; opacity: 0.1; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"); }
.vn-cg-light { position: absolute; inset: -20%; pointer-events: none; opacity: 0; }
.vn-cg-meta { position: absolute; left: 22px; top: 46px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid rgba(127, 231, 255, 0.22); background: rgba(2, 9, 22, 0.5); backdrop-filter: blur(8px); color: rgba(214, 236, 250, 0.86); font-size: 9px; letter-spacing: 0.12em; pointer-events: auto; }
.vn-cg-meta i { font-style: normal; color: var(--gold); }
.vn-cg-meta b { font-weight: 400; color: #eaf9ff; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vn-cg-meta em { font-style: normal; color: rgba(127, 231, 255, 0.6); }
.vn-cg-meta button { border: 1px solid rgba(127, 231, 255, 0.3); background: transparent; color: var(--cyan); font-size: 9px; padding: 2px 7px; cursor: pointer; }
.vn-stage.has-cg :is(.vn-bg, .vn-bg-next, .vn-figure, .vn-user-figure, .vn-mountain) { opacity: 0 !important; visibility: hidden !important; }
.vn-stage.has-cg :is(.vn-aura) { background: radial-gradient(ellipse at 50% 46%, transparent 34%, rgba(0, 2, 8, 0.5) 100%); }

/* 循环运镜（剧情CG 与直播共用） */
.morph-zoom-in .vn-cg-media, .motion-zoom-in img { animation: cgZoomIn 6s ease-out both; }
.morph-zoom-out .vn-cg-media, .motion-zoom-out img { animation: cgZoomOut 6s ease-out both; }
.morph-pan-left .vn-cg-media, .motion-pan-left img { animation: cgPanLeft 7s ease-in-out both; }
.morph-pan-right .vn-cg-media, .motion-pan-right img { animation: cgPanRight 7s ease-in-out both; }
.morph-tilt-up .vn-cg-media, .motion-tilt-up img { animation: cgTiltUp 7s ease-in-out both; }
.morph-tilt-down .vn-cg-media, .motion-tilt-down img { animation: cgTiltDown 7s ease-in-out both; }
.morph-breath .vn-cg-media, .motion-breath img { animation: cgBreath 5.5s ease-in-out infinite; }
@keyframes cgZoomIn { from { transform: scale(1.0); } to { transform: scale(1.09); } }
@keyframes cgZoomOut { from { transform: scale(1.1); } to { transform: scale(1.0); } }
@keyframes cgPanLeft { from { transform: scale(1.08) translateX(2.2%); } to { transform: scale(1.08) translateX(-2.2%); } }
@keyframes cgPanRight { from { transform: scale(1.08) translateX(-2.2%); } to { transform: scale(1.08) translateX(2.2%); } }
@keyframes cgTiltUp { from { transform: scale(1.1) translateY(2.2%); } to { transform: scale(1.1) translateY(-2.2%); } }
@keyframes cgTiltDown { from { transform: scale(1.1) translateY(-2.2%); } to { transform: scale(1.1) translateY(2.2%); } }
@keyframes cgBreath { 0%, 100% { transform: scale(1.02); } 50% { transform: scale(1.05); } }

/* 剧情图的视觉冲击效果 */
.vn-cg.cgfx-sweep .vn-cg-light, .cgfx-sweep .vn-cg-light {
  opacity: 1;
  background: linear-gradient(102deg, transparent 38%, rgba(255, 255, 255, 0.22) 48%, rgba(180, 235, 255, 0.12) 52%, transparent 62%);
  animation: cgSweep 5.2s ease-in-out infinite;
}
@keyframes cgSweep { 0% { transform: translateX(-70%); } 55%, 100% { transform: translateX(70%); } }
.vn-cg.cgfx-bloom .vn-cg-frame:after, .cgfx-bloom .vn-cg-frame:after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 44%, rgba(255, 236, 200, 0.16), transparent 46%);
  animation: cgBloom 4.6s ease-in-out infinite;
}
@keyframes cgBloom { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.vn-cg.cgfx-ink .vn-cg-frame:after, .cgfx-ink .vn-cg-frame:after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 30% 20%, rgba(0, 0, 0, 0.28), transparent 42%), radial-gradient(circle at 72% 78%, rgba(0, 0, 0, 0.26), transparent 46%);
  mix-blend-mode: multiply;
  animation: cgInk 8s ease-in-out infinite alternate;
}
@keyframes cgInk { from { opacity: 0.5; transform: scale(1.02); } to { opacity: 1; transform: scale(1); } }
.vn-cg.cgfx-glitch .vn-cg-frame:after, .cgfx-glitch .vn-cg-frame:after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.14;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(160, 240, 255, 0.4) 2px 3px);
  animation: cgGlitch 2.6s steps(3) infinite;
}
@keyframes cgGlitch { 0%, 92%, 100% { transform: none; opacity: 0.08; } 94% { transform: translateX(-2px); opacity: 0.24; } 96% { transform: translateX(3px); opacity: 0.16; } }
.vn-cg.cgfx-spot .vn-cg-frame:after, .cgfx-spot .vn-cg-frame:after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 46% 60% at 50% 46%, transparent 30%, rgba(0, 2, 8, 0.62) 100%);
}
.ymdq-reduce .vn-cg-media, .ymdq-reduce .vn-cg-light, .ymdq-reduce .live-media img { animation: none !important; }

/* 画面查看器 */
.cg-viewer-stage { display: flex; align-items: center; justify-content: center; background: #01040b; border: 1px solid var(--line); max-height: 62vh; overflow: hidden; }
.cg-viewer-stage img, .cg-viewer-stage video { max-width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.cg-viewer-meta { display: flex; align-items: baseline; gap: 10px; padding: 8px 2px 0; }
.cg-viewer-meta b { font-size: 13px; font-weight: 400; color: var(--ink); }
.cg-viewer-meta span { font-size: 9.5px; color: var(--muted); }
.cg-viewer-prompt { margin: 8px 0 0; padding: 9px 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink2); font: 10px/1.7 Consolas, monospace; white-space: pre-wrap; max-height: 160px; overflow: auto; }

/* ---------------- 剧情图 / CG 弹窗 ---------------- */
.cg-wrap { display: flex; flex-direction: column; gap: 10px; }
.cg-note { font-size: 10.5px; line-height: 1.9; color: var(--muted); }
.cg-toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 9px 11px; border: 1px solid var(--line); background: rgba(4, 12, 26, 0.34); }
.cg-toolbar > label { font-size: 10px; letter-spacing: 0.1em; color: var(--muted); }
.cg-count { display: flex; gap: 4px; }
.cg-count button { padding: 4px 11px; border: 1px solid var(--line); background: transparent; color: var(--ink2); font-size: 10px; cursor: pointer; }
.cg-count button.on { border-color: var(--line2); color: var(--cyan); background: rgba(31, 87, 158, 0.18); }
.cg-tip { font-size: 9px; color: var(--muted); }
.cg-slots { display: flex; flex-direction: column; gap: 5px; }
.cg-slot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 7px 9px; border: 1px solid var(--line); background: rgba(4, 12, 26, 0.22); }
.cg-slot-idx { font-size: 9.5px; color: var(--gold); letter-spacing: 0.08em; min-width: 48px; }
.cg-slot em { font-style: normal; font-size: 9px; color: var(--muted); }
.cg-slot select { flex: 1; min-width: 150px; padding: 4px 6px; font-size: 10px; }
.cg-slot .cg-kind { flex: 0 0 132px; min-width: 132px; }
.cg-paras { border: 1px solid var(--line); background: rgba(2, 8, 18, 0.28); max-height: 210px; overflow-y: auto; }
.cg-paras-head { position: sticky; top: 0; padding: 6px 9px; background: var(--panel2); border-bottom: 1px solid var(--line); font-size: 9px; letter-spacing: 0.14em; color: var(--muted); }
.cg-para { display: flex; gap: 8px; padding: 6px 9px; border-bottom: 1px solid rgba(127, 231, 255, 0.05); font-size: 10.5px; line-height: 1.7; color: var(--ink2); }
.cg-para b { flex: none; width: 20px; color: var(--muted); font-weight: 400; font-size: 9px; }
.cg-para span { flex: 1; min-width: 0; }
.cg-foot-note { font-size: 9.5px; line-height: 1.8; color: var(--muted); }
.cg-step-head { display: flex; flex-direction: column; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cg-step-head b { font-size: 12px; font-weight: 400; color: var(--gold); letter-spacing: 0.1em; }
.cg-step-head span { font-size: 9.5px; line-height: 1.8; color: var(--muted); }
.cg-card { border: 1px solid var(--line); background: rgba(4, 12, 26, 0.3); padding: 10px 11px; display: flex; flex-direction: column; gap: 7px; }
.cg-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cg-card-head b { font-size: 12px; font-weight: 500; color: var(--ink); }
.cg-card-head select { width: auto; min-width: 160px; padding: 4px 7px; font-size: 10px; }
.cg-range { font-size: 9px; color: var(--muted); }
.cg-row1 { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.cg-row2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.cg-row3 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.cg-row1 label, .cg-row2 label, .cg-row3 label, .cg-prompt, .cg-negative { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cg-row1 span, .cg-row2 span, .cg-row3 span, .cg-prompt span, .cg-negative span { font-size: 8.5px; letter-spacing: 0.08em; color: var(--muted); }
.cg-row1 textarea, .cg-row3 input, .cg-row2 select { width: 100%; min-width: 0; font-size: 10px; padding: 5px 7px; }
.cg-chars { border: 1px dashed var(--line); padding: 6px 8px; display: flex; flex-direction: column; gap: 5px; }
.cg-chars-head { display: flex; align-items: center; justify-content: space-between; font-size: 9px; letter-spacing: 0.1em; color: var(--muted); }
.cg-char { display: grid; grid-template-columns: 84px 1fr 1fr 1fr 1fr auto; gap: 4px; align-items: center; }
.cg-char input { min-width: 0; font-size: 9.5px; padding: 4px 6px; }
.cg-empty { font-size: 9.5px; color: var(--muted); padding: 4px 0; }
.cg-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cg-auto { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: var(--muted); }
.cg-auto input { width: 12px; height: 12px; flex: none; accent-color: var(--azure); }
.cg-auto span { font-size: 9px !important; line-height: 1.6; color: var(--muted) !important; white-space: nowrap; }
.cg-ref-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 5px; padding-top: 6px; border-top: 1px dashed var(--line); }
.cg-ref-note { font-size: 9px !important; line-height: 1.7; color: var(--gold) !important; font-weight: 400 !important; letter-spacing: 0.02em; }
.cg-chars { font-size: 0; }
.cg-results { display: flex; flex-direction: column; gap: 8px; }
.cg-result { display: grid; grid-template-columns: 200px 1fr; gap: 10px; border: 1px solid var(--line); padding: 8px; background: rgba(4, 12, 26, 0.26); }
.cg-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 40%, rgba(30, 60, 100, 0.4), rgba(1, 4, 11, 0.9)); }
.cg-thumb img, .cg-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cg-thumb-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--muted); }
.cg-result-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cg-result-main b { font-size: 12px; font-weight: 500; color: var(--ink); }
.cg-result-main small { font-size: 9px; color: var(--muted); }
.cg-result-main p { margin: 0; font-size: 10px; line-height: 1.7; color: var(--ink2); }
.cg-result-btns { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; }
.cg-manager-actions { display: flex; justify-content: flex-end; margin: 6px 0 8px; }
.cg-manager-list { display: flex; flex-direction: column; gap: 5px; }
.cg-mrow { display: grid; grid-template-columns: 64px 1fr auto; gap: 9px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); background: rgba(4, 12, 26, 0.24); }
.cg-mthumb { width: 64px; height: 44px; overflow: hidden; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; background: rgba(2, 8, 18, 0.4); }
.cg-mthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cg-mthumb em { font-style: normal; font-size: 9px; color: var(--muted); }
.cg-mmain { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cg-mmain b { font-size: 11px; font-weight: 400; color: var(--ink); }
.cg-mmain small { font-size: 9px; color: var(--muted); }
.cg-mbtns { display: flex; gap: 4px; }
.composer-tools #btnStoryCg { position: relative; }
.composer-tools #btnStoryCg.has-cg { color: var(--gold); border-color: rgba(232, 201, 138, 0.4); }
.composer-tools #btnStoryCg.has-cg:after { content: ''; position: absolute; right: 3px; top: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px var(--gold); }
@media (max-width: 720px) {
  .cg-char { grid-template-columns: 1fr 1fr; }
  .cg-row1, .cg-row2, .cg-row3 { grid-template-columns: 1fr; }
  .cg-result { grid-template-columns: 1fr; }
  .cg-mrow { grid-template-columns: 52px 1fr; }
  .cg-mbtns { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ---------------- 4. 直播系统 ---------------- */
.live-wrap { position: absolute; inset: 0; z-index: 60; }
.live-wrap.hidden { display: none; }
.live-shell { position: absolute; inset: 0; display: flex; flex-direction: column; background: radial-gradient(circle at 18% 6%, rgba(40, 80, 140, 0.24), transparent 40%), linear-gradient(160deg, #02060f, #050b18 52%, #01030a); color: var(--ink2); overflow: hidden; }
.live-top { flex: none; display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: rgba(3, 9, 20, 0.86); backdrop-filter: blur(10px); }
.live-anchor { display: flex; align-items: center; gap: 7px; flex: none; }
.live-avatar { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line2); background: rgba(31, 87, 158, 0.24); color: var(--cyan); font-size: 13px; }
.live-anchor b { font-size: 12px; font-weight: 500; color: var(--ink); letter-spacing: 0.06em; }
.live-badge { font-style: normal; font-size: 8px; letter-spacing: 0.14em; color: #ff8fa2; border: 1px solid rgba(255, 110, 130, 0.4); padding: 1px 5px; display: inline-flex; align-items: center; gap: 3px; }
.live-badge i { width: 5px; height: 5px; border-radius: 50%; background: #ff6b7d; animation: liveBlink 1.6s infinite; }
@keyframes liveBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.live-title { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink); letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-cat { display: inline-block; margin-right: 8px; padding: 1px 6px; border: 1px solid var(--line); font-size: 8.5px; color: var(--muted); letter-spacing: 0.1em; vertical-align: middle; }
.live-eyes { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--gold); letter-spacing: 0.04em; }
.live-eyes b { font-weight: 600; font-size: 12px; }
.live-eyes em { font-style: normal; font-size: 8.5px; color: var(--muted); letter-spacing: 0.06em; }
.live-eye { font-size: 12px; filter: drop-shadow(0 0 6px rgba(232, 201, 138, 0.5)); }
.live-top-actions { display: flex; gap: 5px; flex: none; }
.live-top-actions button { padding: 4px 9px; border: 1px solid var(--line); background: transparent; color: var(--ink2); font-size: 9.5px; cursor: pointer; }
.live-top-actions button:hover { border-color: var(--line2); color: var(--cyan); }
.live-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 196px minmax(0, 1fr) 288px; gap: 10px; padding: 10px 14px 12px; }

/* 直播回顾（左侧列表） */
.live-history { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); background: rgba(3, 9, 20, 0.72); overflow: hidden; }
.live-hist-head { flex: none; display: flex; align-items: baseline; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.live-hist-head b { font-size: 10.5px; font-weight: 500; letter-spacing: 0.12em; }
.live-hist-head span { font-size: 8px; letter-spacing: 0.1em; color: var(--muted); }
.live-hist-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.live-hist-item { position: relative; display: grid; grid-template-columns: 54px 1fr; gap: 6px; align-items: center; padding: 5px; border: 1px solid var(--line); background: rgba(2, 8, 18, 0.4); cursor: pointer; transition: 0.2s; }
.live-hist-item:hover { border-color: var(--line2); }
.lh-cover { display: flex; align-items: center; justify-content: center; width: 54px; height: 36px; overflow: hidden; border: 1px solid var(--line); background: rgba(2, 8, 18, 0.5); }
.lh-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lh-cover em { font-style: normal; font-size: 8.5px; color: var(--muted); }
.lh-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lh-main b { font-size: 9.5px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lh-main small { font-size: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lh-del { position: absolute; right: 2px; top: 2px; width: 15px; height: 15px; border: 0; background: transparent; color: var(--muted); font-size: 11px; line-height: 1; cursor: pointer; opacity: 0; }
.live-hist-item:hover .lh-del { opacity: 1; }
.lh-del:hover { color: var(--danger); }
.live-hist-empty { padding: 16px 10px; font-size: 9px; line-height: 1.9; color: var(--muted); text-align: center; }
.live-hist-toggle { display: none; }
.lh-detail { display: grid; grid-template-columns: 260px 1fr; gap: 14px; }
.lh-detail-cover { border: 1px solid var(--line); overflow: hidden; min-height: 160px; display: flex; align-items: center; justify-content: center; background: rgba(2, 8, 18, 0.5); }
.lh-detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lh-detail-info { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.lh-detail-info > b { font-size: 14px; font-weight: 400; }
.lh-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 9px; color: var(--muted); }
.lh-summary { margin: 0; font-size: 11px; line-height: 1.9; }
.lh-dm-sample { display: flex; flex-direction: column; gap: 2px; max-height: 140px; overflow-y: auto; padding: 6px 8px; border: 1px solid var(--line); background: rgba(2, 8, 18, 0.35); }
.lh-dm-sample i { font-style: normal; font-size: 9px; color: var(--muted); }
.live-hist-inline { border: 1px solid var(--line); background: rgba(3, 9, 20, 0.5); display: flex; flex-direction: column; max-height: 210px; overflow: hidden; }
.live-hist-inline .live-hist-list { max-height: 168px; }
.live-stage-col { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.live-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; border: 1px solid var(--line2); background: #01040b; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.live-media { position: absolute; inset: 0; overflow: hidden; }
.live-media img, .live-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-media-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.02) 3px 4px); }
.live-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 10.5px; background: radial-gradient(ellipse at 50% 45%, rgba(20, 40, 70, 0.5), rgba(1, 4, 11, 0.96)); }
.live-placeholder b { font-size: 14px; font-weight: 400; letter-spacing: 0.16em; color: var(--ink); }

/* 留空画面：中央直接显示文字 */
.live-blank { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 8% 12%; text-align: center; background: radial-gradient(ellipse at 50% 44%, rgba(26, 48, 84, 0.5), rgba(1, 4, 11, 0.96) 78%); }
.live-blank span { font-size: clamp(13px, 1.5vw, 19px); line-height: 2.1; letter-spacing: 0.06em; color: #eaf7ff; text-shadow: 0 2px 18px rgba(0, 6, 16, 0.8); }
.live-blank em { font-style: normal; font-size: 8.5px; letter-spacing: 0.24em; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }

/* 已结束 */
.live-ended { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 46%, rgba(2, 8, 18, 0.72), rgba(1, 3, 9, 0.94)); backdrop-filter: blur(3px); }
.live-ended.hidden { display: none; }
.live-ended-card { width: min(460px, 84%); padding: 26px 24px; border: 1px solid var(--line2); background: rgba(4, 12, 26, 0.72); text-align: center; display: flex; flex-direction: column; gap: 9px; }
.le-mark { font-size: 17px; letter-spacing: 0.34em; color: var(--gold); }
.le-title { font-size: 13px; letter-spacing: 0.08em; color: var(--ink); }
.le-meta { display: flex; justify-content: center; gap: 12px; font-size: 9px; color: var(--muted); }
.le-summary { margin: 4px 0 0; font-size: 10.5px; line-height: 1.9; color: var(--ink2); max-height: 140px; overflow-y: auto; }
.le-actions { display: flex; gap: 7px; justify-content: center; margin-top: 6px; }
.live-console.off { opacity: 0.55; }
.live-console.off textarea, .live-console.off button { pointer-events: none; }
.live-side-foot button.hidden { display: none; }

/* 匿名勾选（开播前设置） */
.live-form label > span small { display: block; margin-top: 2px; font-size: 8.5px; color: var(--muted); letter-spacing: 0; }
.live-form .live-check { flex-direction: row !important; align-items: center; justify-content: flex-start; gap: 7px; padding: 2px 0; }
.live-check { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--ink2); cursor: pointer; white-space: nowrap; }
.live-check input { width: 13px; height: 13px; accent-color: var(--azure); flex: none; }
.live-check em { font-style: normal; font-size: 8.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-check-sm { font-size: 9px; margin-right: auto; }
.live-check-sm em { display: none; }

/* 直播画面：宽屏才显示回顾列，窄屏收成抽屉 */
@media (max-width: 1180px) {
  .live-body { grid-template-columns: minmax(0, 1fr) 268px; }
  .live-history { position: absolute; left: 8px; top: 56px; bottom: 8px; width: 200px; z-index: 20; display: none; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
  .live-history.open { display: flex; }
  .live-hist-toggle { display: inline-block; }
}
.live-stage-fx { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, transparent 44%, rgba(0, 2, 8, 0.6) 100%); }
.live-caption { position: absolute; left: 14px; bottom: 12px; right: 14px; z-index: 2; font-size: 11.5px; line-height: 1.7; color: #eaf7ff; text-shadow: 0 2px 12px #01040b; letter-spacing: 0.03em; }
.live-stage-tags { position: absolute; left: 12px; top: 10px; z-index: 2; display: flex; gap: 6px; }
.live-stage-tags span { font-size: 8px; letter-spacing: 0.14em; padding: 2px 6px; border: 1px solid var(--line); background: rgba(2, 9, 22, 0.5); color: var(--muted); }
.live-rec { display: inline-flex; align-items: center; gap: 3px; color: #ff8fa2 !important; border-color: rgba(255, 110, 130, 0.4) !important; }
.live-rec i { width: 4px; height: 4px; border-radius: 50%; background: #ff6b7d; animation: liveBlink 1.6s infinite; }
.live-shell[data-mood="happy"] .live-stage-fx { background: radial-gradient(ellipse at 50% 46%, transparent 48%, rgba(60, 40, 10, 0.4) 100%); }
.live-shell[data-mood="tense"] .live-stage-fx { background: radial-gradient(ellipse at 50% 46%, transparent 34%, rgba(40, 0, 8, 0.66) 100%); }
.live-console { flex: none; border: 1px solid var(--line); background: rgba(3, 9, 20, 0.7); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.live-console-main { display: flex; gap: 7px; align-items: stretch; }
.live-console-main textarea { flex: 1; min-height: 46px; max-height: 90px; resize: vertical; padding: 7px 9px; font-size: 11px; line-height: 1.7; }
.live-send { flex: none; width: 96px; border: 1px solid var(--line2); background: rgba(31, 87, 158, 0.28); color: #dff4ff; font-size: 11px; cursor: pointer; letter-spacing: 0.1em; }
.live-send:hover { background: rgba(47, 135, 255, 0.34); }
.live-send:disabled { opacity: 0.5; cursor: default; }
.live-console-tip { font-size: 8.5px; color: var(--muted); letter-spacing: 0.04em; }
.live-preview { border: 1px solid var(--gold); border-color: rgba(232, 201, 138, 0.4); background: rgba(24, 18, 6, 0.4); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.live-preview.hidden { display: none; }
.live-preview-head { display: flex; align-items: baseline; gap: 8px; }
.live-preview-head b { font-size: 10.5px; font-weight: 500; color: var(--gold); letter-spacing: 0.1em; }
.live-preview-head span { font-size: 8.5px; color: var(--muted); }
.live-preview-body { display: grid; grid-template-columns: 150px 1fr; gap: 8px; }
.live-preview-media { height: 84px; border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; background: rgba(2, 8, 18, 0.5); }
.live-preview-media img, .live-preview-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-preview-media span { font-size: 9px; color: var(--muted); padding: 4px; text-align: center; }
.live-preview-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.live-preview-info p { margin: 0; font-size: 10.5px; color: var(--ink); }
.live-preview-info small { font-size: 8.5px; line-height: 1.6; color: var(--muted); }
.live-preview-dm { display: flex; flex-direction: column; gap: 1px; max-height: 44px; overflow: hidden; }
.live-preview-dm i { font-style: normal; font-size: 8.5px; color: var(--ink2); opacity: 0.8; }
.live-preview-btns { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; }
.live-side { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); background: rgba(3, 9, 20, 0.72); overflow: hidden; }
.live-side-head { flex: none; display: flex; align-items: baseline; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.live-side-head b { font-size: 10.5px; font-weight: 500; letter-spacing: 0.12em; color: var(--cyan); }
.live-side-head span { font-size: 7.5px; letter-spacing: 0.16em; color: var(--muted); }
.live-dm-list { flex: 1; min-height: 0; overflow-y: auto; padding: 7px 9px; display: flex; flex-direction: column; gap: 4px; scroll-behavior: smooth; }
.live-dm-empty { font-size: 9.5px; line-height: 1.8; color: var(--muted); padding: 8px 2px; }
.live-dm { font-size: 10.5px; line-height: 1.6; color: var(--ink2); animation: liveDmIn 0.3s ease both; overflow-wrap: anywhere; }
.live-dm b { font-weight: 400; color: var(--cyan); margin-right: 5px; }
.live-dm b:after { content: '：'; color: var(--muted); }
.live-dm.self b { color: var(--gold); }
.live-dm.self span { color: var(--gold); }
.live-dm.special span { color: var(--rose); }
@keyframes liveDmIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.live-dm-input { flex: none; display: flex; gap: 4px; padding: 7px 8px; border-top: 1px solid var(--line); }
.live-dm-input input { flex: 1; min-width: 0; padding: 6px 8px; font-size: 10.5px; }
.live-dm-input button { flex: none; padding: 5px 10px; border: 1px solid var(--line2); background: rgba(31, 87, 158, 0.24); color: #dff4ff; font-size: 10px; cursor: pointer; }
.live-side-foot { flex: none; display: flex; gap: 4px; padding: 0 8px 8px; }
.live-side-foot button { flex: 1; padding: 5px 4px; border: 1px solid var(--line); background: transparent; color: var(--ink2); font-size: 9.5px; cursor: pointer; }
.live-side-foot button:hover { border-color: var(--line2); color: var(--cyan); }
.live-side-foot button:disabled { opacity: 0.5; }
.live-setup { display: flex; flex-direction: column; gap: 12px; }
.live-form { display: flex; flex-direction: column; gap: 8px; }
.live-form label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.live-form label > span { font-size: 9.5px; letter-spacing: 0.08em; color: var(--muted); }
.live-form-row { display: grid; grid-template-columns: 150px 118px 1fr; gap: 9px; align-items: end; }
.live-anon { flex-direction: row !important; align-items: center; gap: 6px !important; padding-bottom: 9px; white-space: nowrap; }
.live-anon span { color: var(--ink2); font-size: 10.5px; white-space: nowrap; }
.live-media-box { display: flex; flex-direction: column; gap: 7px; }
.live-media-prev { position: relative; height: 190px; border: 1px solid var(--line); background: rgba(2, 8, 18, 0.5); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.live-media-prev span { font-size: 10px; line-height: 1.8; color: var(--muted); padding: 18px; text-align: center; }
.live-media-prev img, .live-media-prev video { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-media-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.live-media-hint { font-size: 9px; color: var(--muted); }
.live-media-caption { font-size: 10.5px; line-height: 1.8; color: var(--ink2); }
@media (max-width: 900px) {
  .live-body { grid-template-columns: 1fr; grid-template-rows: minmax(180px, 1fr) 260px; }
  .live-title { font-size: 11px; }
  .live-eyes { font-size: 10.5px; }
  .live-form-row { grid-template-columns: 1fr 1fr; }
  .live-preview-body { grid-template-columns: 1fr; }
}

/* ---------------- 5. 提示词中心 ---------------- */
/* ---------------- 弹窗叠层：窗口内不透明，窗外保持正常 ---------------- */
/* 3.7：二层窗口不再把整块背景涂成主题色，只轻轻压暗一点，让下面的窗口仍然看得见 */
.modal-mask.stacked { background: rgba(1, 5, 14, 0.3); backdrop-filter: none; }
.ymdq[data-scheme="light"] .modal-mask.stacked { background: rgba(60, 55, 45, 0.16); }
.modal-mask.stacked .modal { box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72); }
/* 弹窗本体（含二层弹窗）底色不透明：窗口里的东西不透明，窗外照常可见 */
#ymdq-app .modal,
#ymdq-app .modal.wide,
#ymdq-app .modal.xwide,
#ymdq-app .modal.narrow {
  background: var(--panel-solid) !important;
  background-image: none !important;
}
#ymdq-app .modal :is(.modal-head, .modal-body, .modal-actions) {
  background-color: var(--panel-solid) !important;
  background-image: none !important;
}
#ymdq-app .modal .modal-head { background-image: linear-gradient(90deg, rgba(22, 67, 125, 0.16), transparent 62%) !important; }
#ymdq-app .modal .modal-actions { background-image: linear-gradient(180deg, rgba(2, 8, 18, 0.28), transparent) !important; }
.ymdq[data-scheme="light"] #ymdq-app .modal .modal-head { background-image: linear-gradient(90deg, rgba(180, 150, 100, 0.1), transparent 62%) !important; }
.ymdq[data-scheme="light"] #ymdq-app .modal .modal-actions { background-image: none !important; }
@media (max-width: 720px) {
  .modal-mask.stacked { background: rgba(1, 5, 14, 0.3); backdrop-filter: none; }
  .ymdq[data-scheme="light"] .modal-mask.stacked { background: rgba(60, 55, 45, 0.16); }
}

/* 世界设定面板 */
.world-info { display: flex; flex-direction: column; gap: 8px; }
.panel-link { font-size: 8px; letter-spacing: 0.12em; color: rgba(127, 231, 255, 0.62); border: 1px solid rgba(127, 231, 255, 0.18); background: transparent; padding: 2px 7px; cursor: pointer; }
.panel-link:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.44); }
.world-name { cursor: pointer; }
.world-name:hover { color: var(--cyan); }

.vi-fields { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }

/* 手机端视觉小说：只保留画面中间那一张立绘，轮到谁说话就换谁（平板/电脑不受影响） */
@media (max-width: 720px) {
  .vn-stage .vn-user-figure { display: none !important; }
  .vn-stage .vn-figure {
    left: 50% !important;
    right: auto !important;
    width: min(360px, 62vw);
    height: min(520px, 52vh);
    margin-left: calc(min(360px, 62vw) / -2);
  }
  .vn-stage .vn-figure.is-user { filter: drop-shadow(0 0 22px var(--line2)); }
  .vn-stage .vn-figure.is-user .figure-name { color: var(--gold); }
}
.prompt-block { border: 1px solid var(--line); background: rgba(4, 12, 26, 0.28); padding: 8px 10px; margin-bottom: 8px; }
.prompt-block > summary { cursor: pointer; display: flex; flex-direction: column; gap: 3px; list-style: none; }
.prompt-block > summary::-webkit-details-marker { display: none; }
.prompt-block > summary b { font-size: 11.5px; font-weight: 500; color: var(--ink); letter-spacing: 0.06em; }
.prompt-block > summary b:before { content: '▸ '; color: var(--muted); }
.prompt-block[open] > summary b:before { content: '▾ '; color: var(--cyan); }
.prompt-block > summary span { font-size: 9px; line-height: 1.7; color: var(--muted); }
.prompt-block textarea { width: 100%; margin-top: 7px; }
.prompt-warn { margin-top: 6px; padding: 7px 9px; border-left: 2px solid var(--danger); background: rgba(162, 55, 69, 0.1); color: var(--danger); font-size: 9.5px; line-height: 1.8; }
.ph-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ph-list code { padding: 3px 6px; border: 1px solid var(--line); color: var(--cyan); font-size: 10px; }
.ymdq:is([data-theme="crimson"], [data-theme="paper"], [data-theme="frost"], [data-theme="frosted"], [data-theme^="neu-"]) .prompt-warn { color: var(--danger) !important; }

/* ==========================================================================
   直播 · 主题适配（弹幕亮度、面板底色）
   主题层的 :where(*) 会把所有文字设成 --ink2，浅色主题下直播面板仍是深底，
   于是弹幕变成深字浅底、发灰看不清。这里按主题重设面板与弹幕颜色。
   ========================================================================== */
.ymdq .live-shell :is(.live-dm, .live-dm span) { color: #e8f6ff !important; font-size: 11px; }
.ymdq .live-shell .live-dm b { color: #86e6ff !important; }
.ymdq .live-shell :is(.live-dm.self b, .live-dm.self span) { color: var(--gold) !important; }
.ymdq .live-shell :is(.live-side-head b, .live-hist-head b, .live-anchor b, .live-title, .lh-main b) { color: #eaf7ff !important; }
.ymdq .live-shell :is(.live-console-tip, .live-media-hint, .live-hist-empty, .lh-main small) { color: rgba(190, 214, 232, 0.72) !important; }

.ymdq[data-theme="crimson"] .live-shell :is(.live-dm, .live-dm span) { color: #ffe9e5 !important; }
.ymdq[data-theme="crimson"] .live-shell .live-dm b { color: #ff9aa2 !important; }
.ymdq[data-theme="crimson"] .live-shell :is(.live-side-head b, .live-hist-head b, .live-anchor b, .live-title, .lh-main b) { color: #fff2ef !important; }
.ymdq[data-theme="crimson"] .live-shell {
  background: radial-gradient(circle at 18% 6%, rgba(140, 26, 48, 0.3), transparent 40%), linear-gradient(160deg, #070103, #170409 52%, #060103) !important;
}
.ymdq[data-theme="crimson"] .live-shell :is(.live-top, .live-side, .live-console, .live-history, .live-preview, .live-ended-card, .live-hist-item, .live-hist-inline) {
  background-color: rgba(24, 5, 10, 0.78) !important;
  background-image: none !important;
}
.ymdq[data-theme="crimson"] .live-shell .live-blank {
  background: radial-gradient(ellipse at 50% 44%, rgba(60, 12, 24, 0.6), rgba(4, 1, 3, 0.96) 80%) !important;
}

.ymdq[data-scheme="light"] .live-shell {
  background: radial-gradient(circle at 18% 6%, rgba(190, 210, 225, 0.28), transparent 40%), linear-gradient(160deg, var(--void), var(--abyss) 52%, var(--void)) !important;
  color: var(--ink) !important;
}
.ymdq[data-scheme="light"] .live-shell :is(.live-top, .live-side, .live-console, .live-history, .live-preview, .live-ended-card) {
  background-color: var(--panel2) !important;
  background-image: none !important;
}
.ymdq[data-scheme="light"] .live-shell :is(.live-stage) { background-color: var(--panel-solid) !important; }
.ymdq[data-scheme="light"] .live-shell :is(.live-dm, .live-dm span) { color: var(--ink) !important; }
.ymdq[data-scheme="light"] .live-shell .live-dm b { color: var(--azure) !important; }
.ymdq[data-scheme="light"] .live-shell :is(.live-dm.self b, .live-dm.self span) { color: var(--gold) !important; }
.ymdq[data-scheme="light"] .live-shell :is(.live-side-head b, .live-hist-head b, .live-anchor b, .live-title, .lh-main b, .le-title) { color: var(--ink) !important; }
.ymdq[data-scheme="light"] .live-shell :is(.live-console-tip, .live-media-hint, .live-hist-empty, .lh-main small, .le-meta) { color: var(--muted) !important; }
.ymdq[data-scheme="light"] .live-shell :is(.live-hist-item, .lh-dm-sample, .lh-cover, .live-preview-media, .live-media-prev, .live-detail-cover, .live-hist-inline) { background-color: rgba(255, 255, 255, 0.55) !important; }
.ymdq[data-scheme="light"] .live-shell .live-blank {
  background: radial-gradient(ellipse at 50% 44%, rgba(255, 255, 255, 0.9), var(--deep) 82%) !important;
}
.ymdq[data-scheme="light"] .live-shell .live-blank span { color: var(--ink) !important; text-shadow: none !important; }
.ymdq[data-scheme="light"] .live-shell .live-ended { background: rgba(240, 236, 226, 0.9) !important; }
.ymdq[data-scheme="light"] .live-shell .live-caption { color: var(--ink) !important; text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8) !important; }
.ymdq[data-scheme="light"] .live-shell .live-stage-tags span { background: rgba(255, 255, 255, 0.76) !important; color: var(--ink2) !important; border-color: var(--line) !important; }
.ymdq[data-scheme="light"] .live-shell .live-rec { color: var(--danger) !important; border-color: rgba(165, 47, 58, 0.35) !important; }
.ymdq[data-scheme="light"] .live-wrap .live-form :is(input, textarea, select) { color: var(--ink) !important; }
.ymdq[data-scheme="light"] .live-wrap .live-check { color: var(--ink) !important; }
.ymdq[data-scheme="light"] .live-wrap .live-check em { color: var(--muted) !important; }
.live-dm { line-height: 1.72; }

/* ==========================================================================
   3.7 手机端窗口
   窗口（.modal）本身已经设为不透明；手机端只调窗口高度，蒙层仍保持
   「窗外可见」的暗化效果，不再把整块背景涂成主题色。
   ========================================================================== */
@media (max-width: 720px) {
  #ymdq-app .modal,
  #ymdq-app .modal.wide,
  #ymdq-app .modal.xwide,
  #ymdq-app .modal.narrow {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
  }
  #ymdq-app .modal .modal-body { max-height: calc(100dvh - 64px); }
}

/* 地图右侧详情：窗口内部不再被 flex 压缩，背景图高度保持一致，其余内容滚动查看 */
.map-detail > * { flex: 0 0 auto; }
.map-detail .md-bg { flex: 0 0 auto; }
.map-detail .md-bg img { height: 110px; width: 100%; object-fit: cover; display: block; }

/* ==========================================================================
   3.8 场景地点标签（正文里单独一行的【地点名】）
   ========================================================================== */
.story-text p.scene-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 12px;
  padding: 0;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  color: var(--cyan);
  text-indent: 0;
}
.story-text p.scene-line:before,
.story-text p.scene-line:after {
  content: '';
  height: 1px;
  flex: 1 1 auto;
  background: linear-gradient(90deg, transparent, var(--line2));
}
.story-text p.scene-line:after { background: linear-gradient(90deg, var(--line2), transparent); }
.ymdq[data-scheme="light"] .story-text p.scene-line { color: var(--cyan); }

/* ==========================================================================
   一梦大千 · 4.0 美化层
   1) 封面：开始界面可上传多张静态图 / 动图 / 视频，随时切换
   2) 界面背景：游戏与向导界面共用一张静态背景
   3) 主题：新增「通透」（液态玻璃）与「磨砂」（毛玻璃），面板与按键半透明
   所有可调数值由 settings.beautify 写入 #ymdq-app 的内联变量，这里只读取。
   ========================================================================== */

.ymdq {
  --ymdq-ga: 0.42;      /* 玻璃面板 / 按键的填充不透明度 */
  --ymdq-gb: 18px;      /* 磨砂强度（backdrop blur） */
  --cover-dim: 0.34;    /* 封面压暗 */
  --cover-blur: 0px;    /* 封面模糊 */
  --cover-fit: cover;
  --scene-dim: 0.42;    /* 界面背景压暗 */
  --scene-blur: 2px;
  --scene-fit: cover;
}

/* ==========================================================================
   1. 封面（开始界面）
   ========================================================================== */
.start-cover {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  pointer-events: none; opacity: 0; transition: opacity 1s var(--ease);
}
.start-cover.on { opacity: 1; }
.start-cover .sc-media { position: absolute; inset: -46px; filter: blur(var(--cover-blur)) saturate(1.04); }
.start-cover .sc-media .sc-item {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  object-fit: var(--cover-fit); object-position: center;
  opacity: 0; transition: opacity 0.9s var(--ease);
}
.start-cover .sc-media .sc-item.is-on { opacity: 1; }
.start-cover .sc-media img.sc-item.drift { animation: coverDrift 34s ease-in-out infinite alternate; }
@keyframes coverDrift {
  from { transform: scale(1.015) translate3d(0, 0, 0); }
  to { transform: scale(1.11) translate3d(-1.4%, -1.2%, 0); }
}
.start-cover .sc-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(158deg,
      rgba(2, 5, 12, calc(var(--cover-dim) * 0.62)) 0%,
      rgba(2, 5, 12, var(--cover-dim)) 48%,
      rgba(1, 3, 9, calc(var(--cover-dim) * 1.3 + 0.04)) 100%);
}
.start-cover .sc-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(96deg,
      rgba(1, 4, 11, calc(var(--cover-dim) * 1.15 + 0.1)) 0%,
      rgba(1, 4, 11, calc(var(--cover-dim) * 0.62)) 38%,
      rgba(1, 4, 11, 0) 68%);
}
.start-cover .sc-shade.r {
  background: linear-gradient(264deg,
      rgba(1, 4, 11, calc(var(--cover-dim) * 0.85 + 0.06)) 0%,
      rgba(1, 4, 11, calc(var(--cover-dim) * 0.4)) 34%,
      rgba(1, 4, 11, 0) 64%);
}
.start-cover .sc-edge { position: absolute; inset: 0; box-shadow: inset 0 0 190px 46px rgba(1, 3, 9, 0.5); }
.start-cover .sc-grain {
  position: absolute; inset: 0; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)' opacity='0.6'/%3E%3C/svg%3E");
}
#scr-start.has-cover .start-frame { text-shadow: 0 2px 24px rgba(1, 3, 9, 0.55); }
#scr-start.has-cover .start-orbit { opacity: 0.2; }

/* 封面切换控件（开始界面右下） */
.start-cover-ctl {
  position: absolute; right: clamp(20px, 5vw, 72px); bottom: 56px; z-index: 5;
  display: flex; align-items: center; gap: 5px; padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px;
  background: rgba(3, 10, 22, 0.42);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 12px 34px rgba(0, 0, 0, 0.32);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.start-cover-ctl.on { opacity: 1; transform: none; pointer-events: auto; }
.start-cover-ctl button {
  height: 26px; min-width: 26px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; color: rgba(233, 247, 255, 0.82); font-size: 12px; letter-spacing: 0.1em;
  transition: background 0.25s, color 0.25s;
}
.start-cover-ctl button:hover { color: #fff; background: rgba(255, 255, 255, 0.16); }
.start-cover-ctl .scc-label { gap: 6px; padding: 0 11px; font-size: 9.5px; color: rgba(214, 238, 252, 0.76); }
.start-cover-ctl .scc-label em { font-style: normal; font-size: 8px; letter-spacing: 0.2em; color: rgba(127, 231, 255, 0.62); }
.start-cover-ctl .scc-label b { font-weight: 400; font: 500 9px/1 var(--latin); letter-spacing: 0.1em; }
.start-cover-ctl .scc-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.28); }
.start-cover-ctl .scc-dot.on { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

/* ==========================================================================
   2. 界面背景（游戏 / 向导）
   ========================================================================== */
.ymdq-scene {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  opacity: 0; transition: opacity 0.9s var(--ease);
}
.ymdq-scene.on { opacity: 1; }
.ymdq[data-screen="start"] .ymdq-scene { opacity: 0 !important; }
.ymdq-scene .scene-media { position: absolute; inset: -46px; filter: blur(var(--scene-blur)) saturate(1.02); }
.ymdq-scene .scene-media img {
  width: 100%; height: 100%; display: block; object-fit: var(--scene-fit);
  object-position: center; opacity: 0; transition: opacity 0.9s var(--ease);
}
.ymdq-scene .scene-media img.is-on { opacity: 1; }
.ymdq-scene .scene-tint {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 26% 16%, rgba(3, 8, 18, calc(var(--scene-dim) * 0.5)), transparent 58%),
    linear-gradient(160deg, rgba(2, 5, 12, calc(var(--scene-dim) * 0.72)) 0%, rgba(2, 5, 12, var(--scene-dim)) 52%, rgba(1, 3, 9, calc(var(--scene-dim) * 1.15)) 100%);
}
.ymdq-scene .scene-grain {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)' opacity='0.6'/%3E%3C/svg%3E");
}
#ymdq-app.has-scene .bg-aurora { opacity: 0.3; }
#ymdq-app.has-scene .bg-grid { opacity: 0.16; }

/* ==========================================================================
   3. 液态玻璃 / 磨砂玻璃 主题
   ========================================================================== */

/* ---------- 通透 · 液态玻璃 ---------- */
.ymdq[data-theme="liquid"] {
  color-scheme: dark;
  --void: #02050d; --abyss: #030912; --deep: #05101f; --deep2: #071a30;
  --panel: rgba(8, 20, 38, var(--ymdq-ga));
  --panel2: rgba(10, 24, 44, calc(var(--ymdq-ga) + 0.12));
  --panel-solid: #071426;
  --ink: #f1f9ff; --ink2: #d6e9f7; --muted: #93b0c6; --dim: #6c8aa3;
  --cyan: #8ff2ff; --azure: #57b4ff; --blue: #2f7dff; --violet: #b79cff;
  --gold: #f0d59c; --rose: #ffaec8; --danger: #ff7d95;
  --line: rgba(255, 255, 255, 0.16); --line2: rgba(255, 255, 255, 0.3);
  --glass: rgba(255, 255, 255, 0.1);
  --quote: #c9f4ff; --quote-halo: rgba(127, 231, 255, 0.28);
  --glass-tint: 9, 22, 42;
  --glass-alpha: var(--ymdq-ga);
  --glass-btn-alpha: calc(var(--ymdq-ga) * 0.66);
  --glass-line: rgba(255, 255, 255, 0.24);
  --surface-sheen: rgba(255, 255, 255, 0.26);
  --glass-blur: var(--ymdq-gb);
  --glass-radius: 20px;
  --glass-sheen: rgba(255, 255, 255, 0.3);
  background:
    radial-gradient(circle at 16% 6%, rgba(24, 96, 196, 0.24), transparent 42%),
    radial-gradient(circle at 86% 88%, rgba(88, 62, 196, 0.2), transparent 44%),
    linear-gradient(155deg, #02050d 0%, #04101f 52%, #01040b 100%);
}

/* ---------- 磨砂 · 毛玻璃 ---------- */
.ymdq[data-theme="frosted"] {
  color-scheme: light;
  --void: #eef4f9; --abyss: #e8f0f6; --deep: #dfe9f1; --deep2: #d2e0ea;
  --panel: rgba(248, 252, 255, calc(var(--ymdq-ga) * 1.05));
  --panel2: rgba(251, 254, 255, calc(var(--ymdq-ga) + 0.12));
  --panel-solid: #eef5fa;
  --ink: #1e2a32; --ink2: #34454f; --muted: #5c7180; --dim: #7b8e9b;
  --cyan: #2e6a86; --azure: #3f7f9c; --blue: #376f8e; --violet: #6a5b86;
  --gold: #7a5a2b; --rose: #9b4f63; --danger: #a13540;
  --line: rgba(38, 68, 88, 0.18); --line2: rgba(38, 68, 88, 0.32);
  --glass: rgba(255, 255, 255, 0.24);
  --quote: #235b6f; --quote-halo: rgba(35, 91, 111, 0.12);
  --glass-tint: 250, 253, 255;
  --glass-alpha: calc(var(--ymdq-ga) * 1.3 + 0.06);
  --glass-btn-alpha: calc(var(--ymdq-ga) * 1.2 + 0.1);
  --glass-line: rgba(255, 255, 255, 0.76);
  --surface-sheen: rgba(255, 255, 255, 0.66);
  --glass-blur: calc(var(--ymdq-gb) * 1.7);
  --glass-radius: 26px;
  --glass-sheen: rgba(255, 255, 255, 0.62);
  --theme-hue: 205;
  --spk: #235b6f;
  --spk-halo: rgba(35, 91, 111, 0.2);
  --spk-line: rgba(35, 91, 111, 0.32);
  background:
    radial-gradient(circle at 14% 6%, rgba(176, 208, 228, 0.42), transparent 42%),
    radial-gradient(circle at 88% 90%, rgba(196, 206, 226, 0.34), transparent 46%),
    linear-gradient(155deg, #eff5fa 0%, #e4edf4 52%, #f3f8fb 100%);
}
.ymdq[data-theme="frosted"] .story-main:before { background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.5), transparent 52%); }
.ymdq[data-theme="frosted"] .story-main:after { background: linear-gradient(180deg, rgba(252, 254, 255, 0.72), rgba(252, 254, 255, 0)); }
.ymdq[data-theme="frosted"] .vn-stage { background-color: #dbe7f0 !important; }
.ymdq[data-theme="frosted"] .bg-noise { opacity: 0.16; }
.ymdq[data-theme="frosted"] .modal-mask { background: rgba(44, 62, 76, 0.34); }
.ymdq[data-theme="frosted"] .start-orbit { opacity: 0.22; }

/* ---------- 共用：面板层 ---------- */
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(
  .game-top, .glass-panel, .story-main, .composer, .start-menu, .modal,
  .settings-tabs, .set-group, .wiz-top, .wiz-foot, .wiz-rail,
  .world-card, .bond-card, .live-shell, .live-top, .live-side, .live-console,
  .live-history, .live-preview, .live-ended-card, .live-hist-item, .live-stage,
  .map-canvas, .map-detail, .cd-grid, .cd-left, .cd-right, .cd-pane,
  .bag-toolbar, .bag-item, .bag-foot, .char-toolbar, .char-strip, .char-card,
  .char-pager, .task-summary, .task-col, .task-card, .task-add,
  .vn-dialogue, .settings-pane, .theme-card, .bg-pick-item, .cbag-item,
  .summary-card, .wiz-card, .user-bubble, .msg-raw, .live-hist-inline,
  .modal-head, .modal-actions, .bag-empty, .task-empty
) {
  background-color: rgba(var(--glass-tint), var(--glass-alpha)) !important;
  background-image:
    radial-gradient(125% 70% at 14% -12%, var(--surface-sheen), transparent 56%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015) 46%, rgba(255, 255, 255, 0.045)) !important;
  border: 1px solid var(--glass-line) !important;
  border-radius: var(--glass-radius);
  backdrop-filter: blur(var(--glass-blur)) saturate(165%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(165%);
  box-shadow:
    inset 0 1px 0 var(--glass-sheen),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 22px 60px rgba(0, 0, 0, 0.26);
}

/* 视觉小说 · 底部文本框：比其它玻璃面板多一层底色，正文读起来才不虚 */
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .vn-dialogue {
  background-color: rgba(var(--glass-tint), clamp(0.62, calc(var(--glass-alpha) + 0.26), 0.96)) !important;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02) 52%, rgba(255, 255, 255, 0.07)) !important;
  box-shadow: inset 0 1px 0 var(--glass-sheen), inset 0 -1px 0 rgba(255, 255, 255, 0.1), 0 22px 60px rgba(0, 0, 0, 0.34) !important;
}
#ymdq-app.ymdq[data-theme="liquid"] .vn-dialogue {
  border-color: rgba(255, 255, 255, 0.34) !important;
  backdrop-filter: blur(calc(var(--glass-blur) * 1.1)) saturate(150%) !important;
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 1.1)) saturate(150%) !important;
}
#ymdq-app.ymdq[data-theme="frosted"] .vn-dialogue {
  border-color: rgba(255, 255, 255, 0.78) !important;
  background-color: rgba(var(--glass-tint), clamp(0.66, calc(var(--glass-alpha) + 0.14), 0.95)) !important;
}

/* 顶栏、弹窗头尾不切圆角 */
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .game-top {
  border-radius: 0 0 var(--glass-radius) var(--glass-radius);
  border-top: 0 !important;
}
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .modal {
  border-radius: calc(var(--glass-radius) + 4px);
}
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(.modal-head, .modal-actions) {
  border: 0 !important;
  border-radius: 0;
  box-shadow: none;
  background-color: rgba(255, 255, 255, 0.08) !important;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 62%) !important;
}
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .modal-head { border-bottom: 1px solid var(--glass-line) !important; }
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .modal-actions { border-top: 1px solid var(--glass-line) !important; background-image: none !important; }
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .settings-tabs { border: 0 !important; box-shadow: none; background-color: transparent !important; }
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .settings-pane { border: 0 !important; background: transparent !important; box-shadow: none; backdrop-filter: none; }
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .set-group { border-radius: 16px; }
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .glass-panel:before {
  content: ''; position: absolute; left: 8%; top: 0; width: 84%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  box-shadow: 0 0 18px rgba(190, 235, 255, 0.55); opacity: 0.85;
}
.ymdq[data-theme="frosted"] .glass-panel:before { box-shadow: 0 0 16px rgba(255, 255, 255, 0.9); }
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .glass-panel:after {
  content: ''; position: absolute; right: 12px; top: 10px; width: 34px; height: 34px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.06) 58%, transparent 72%);
  opacity: 0.55;
}

/* 弹窗头尾：不再做玻璃透视，保证与不透明的弹窗主体一致 */
#ymdq-app.ymdq[data-theme="liquid"] .modal :is(.modal-head, .modal-actions) {
  background-color: rgba(7, 18, 34, 0.66) !important;
  background-image: linear-gradient(90deg, rgba(127, 231, 255, 0.1), transparent 62%) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
#ymdq-app.ymdq[data-theme="frosted"] .modal :is(.modal-head, .modal-actions) {
  background-color: rgba(249, 252, 255, 0.76) !important;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.5), transparent 62%) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: rgba(38, 68, 88, 0.16) !important;
}

/* ---------- 共用：按键 / 小控件 ---------- */
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(
  .btn, .icon-btn, .rail-btn, .mode-switch, .mode-switch button, .top-actions button,
  .composer-tools button, .story-actions button, .settings-tabs button, .map-toolbar button,
  .vn-chip, .vn-controls button, .char-filters button, .bag-filters button, .task-filters button,
  .cd-tabs, .cd-tabs button, .modal-close, .panel-link, .bag-foot button, .char-pager button,
  .task-card .tc-act button, .danmaku-input button, .live-form button, .bg-pick-item,
  .mobile-only, .vn-more-btn, .vn-composer-toggle, .composer-box .send
) {
  background-color: rgba(var(--glass-tint), var(--glass-btn-alpha)) !important;
  background-image: linear-gradient(160deg, var(--glass-sheen), rgba(255, 255, 255, 0.02) 62%) !important;
  border: 1px solid var(--glass-line) !important;
  border-radius: 999px;
  backdrop-filter: blur(calc(var(--glass-blur) * 0.7)) saturate(150%);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 0.7)) saturate(150%);
  box-shadow: inset 0 1px 0 var(--glass-sheen), 0 8px 22px rgba(0, 0, 0, 0.16);
  clip-path: none;
}
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(.btn, .rail-btn, .mode-switch button):hover {
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 12px 30px rgba(0, 0, 0, 0.2);
}
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .mode-switch { padding: 4px; }
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .mode-switch button.active,
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .settings-tabs button.on,
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(.char-filters button.on, .bag-filters button.on, .task-filters button.on, .cd-tabs button.on),
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .btn.primary {
  background-color: rgba(var(--glass-tint), calc(var(--glass-alpha) * 0.9)) !important;
  background-image: linear-gradient(120deg, rgba(127, 231, 255, 0.34), rgba(255, 255, 255, 0.08) 62%) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 24px rgba(0, 0, 0, 0.2);
}
.ymdq[data-theme="frosted"] .mode-switch button.active,
.ymdq[data-theme="frosted"] .settings-tabs button.on,
.ymdq[data-theme="frosted"] :is(.char-filters button.on, .bag-filters button.on, .task-filters button.on, .cd-tabs button.on),
.ymdq[data-theme="frosted"] .btn.primary {
  background-image: linear-gradient(120deg, rgba(88, 150, 180, 0.5), rgba(255, 255, 255, 0.3) 70%) !important;
}
#ymdq-app.ymdq[data-theme="frosted"] :is(.mode-switch button.active, .settings-tabs button.on, .char-filters button.on, .bag-filters button.on, .task-filters button.on, .cd-tabs button.on, .btn.primary) {
  background-color: rgba(63, 127, 156, 0.88) !important;
  background-image: linear-gradient(120deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 70%) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
}
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .rail-btn { border-radius: 18px !important; }

/* ---------- 共用：输入控件 ---------- */
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(input, textarea, select) {
  background-color: rgba(var(--glass-tint), calc(var(--glass-alpha) * 0.66)) !important;
  border: 1px solid var(--glass-line) !important;
  border-radius: 12px;
  color: var(--ink) !important;
  backdrop-filter: blur(calc(var(--glass-blur) * 0.5));
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 0.5));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(input, textarea, select):focus {
  border-color: rgba(255, 255, 255, 0.6) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 26px rgba(127, 231, 255, 0.16);
}
.ymdq[data-theme="frosted"] :is(input, textarea, select) { background-color: rgba(255, 255, 255, 0.56) !important; }
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .set-row input[type='range'] {
  background: rgba(255, 255, 255, 0.24) !important; border: 0 !important; box-shadow: none;
  accent-color: var(--azure);
}

/* ---------- 通透：水滴高光与更锐的边框 ---------- */
.ymdq[data-theme="liquid"] :is(.start-menu, .story-main, .composer, .glass-panel) {
  background-image:
    radial-gradient(120% 90% at 14% -12%, rgba(255, 255, 255, 0.24), transparent 46%),
    radial-gradient(90% 70% at 92% 112%, rgba(127, 231, 255, 0.16), transparent 54%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02) 46%, rgba(255, 255, 255, 0.06)) !important;
}
.ymdq[data-theme="liquid"] .start-menu { border-radius: 22px; padding: 8px 6px 6px; }
.ymdq[data-theme="liquid"] .start-menu:before,
.ymdq[data-theme="liquid"] .start-menu:after,
.ymdq[data-theme="frosted"] .start-menu:before,
.ymdq[data-theme="frosted"] .start-menu:after { display: none; }
.ymdq[data-theme="liquid"] .menu-btn { border-radius: 14px; border-left-color: transparent !important; border-bottom-color: transparent !important; margin: 2px 0; }
.ymdq[data-theme="liquid"] .menu-btn:before { border-radius: 14px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(127, 231, 255, 0.06) 62%, transparent); }
.ymdq[data-theme="liquid"] .menu-btn:hover { padding-left: 34px; border-color: rgba(255, 255, 255, 0.34) !important; }
.ymdq[data-theme="liquid"] .composer { border-radius: 22px 22px 0 0; border-bottom: 0 !important; }
.ymdq[data-theme="liquid"] .story-main { border-radius: 24px; }
.ymdq[data-theme="liquid"] .rail-btn { border-radius: 20px; }

/* ---------- 磨砂：更厚的霜面与柔光 ---------- */
#ymdq-app.ymdq[data-theme="frosted"] :is(.start-menu, .story-main, .composer, .glass-panel) {
  background-image:
    radial-gradient(120% 100% at 18% -10%, rgba(255, 255, 255, 0.72), transparent 52%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.14) 52%, rgba(255, 255, 255, 0.26)) !important;
}
.ymdq[data-theme="frosted"] .start-menu { border-radius: 28px; padding: 8px 6px 6px; }
.ymdq[data-theme="frosted"] .menu-btn { border-radius: 18px; border-left-color: transparent !important; border-bottom-color: transparent !important; margin: 3px 0; }
.ymdq[data-theme="frosted"] .menu-btn:before { border-radius: 18px; background: linear-gradient(90deg, rgba(120, 170, 200, 0.24), rgba(255, 255, 255, 0.1) 62%, transparent); }
.ymdq[data-theme="frosted"] .menu-btn:hover { padding-left: 34px; }
.ymdq[data-theme="frosted"] .composer { border-radius: 26px 26px 0 0; border-bottom: 0 !important; }
.ymdq[data-theme="frosted"] .story-main { border-radius: 28px; }

/* ---------- 玻璃主题下的正文与配色 ---------- */
.ymdq[data-theme="liquid"] :is(.story-text, .story-text p, .story-text strong, .modal, .set-row, .world-name, .player-name) { color: var(--ink); }
.ymdq[data-theme="liquid"] :is(.story-text .speaker, .story-text .sys-line, .spk-tag, .panel-title) { color: var(--cyan); }
.ymdq[data-theme="liquid"] .buff { background: rgba(255, 255, 255, 0.12); border-color: rgba(240, 213, 156, 0.34); color: var(--gold); }
.ymdq[data-theme="liquid"] .main-title {
  background-image: linear-gradient(108deg, #ffffff 6%, #c9f4ff 24%, #ffffff 40%, #7fd8ff 58%, #e8fbff 78%, #a8e6ff 94%);
  filter: drop-shadow(0 0 34px rgba(120, 210, 255, 0.32));
}
.ymdq[data-theme="frosted"] .main-title {
  background-image: linear-gradient(108deg, #24333c 6%, #5a7d90 26%, #1d2a31 46%, #6d5b3d 68%, #26333b 90%);
  filter: drop-shadow(0 6px 22px rgba(255, 255, 255, 0.55));
}
.ymdq[data-theme="frosted"] :is(.start-sub, .start-poem, .start-eyebrow, .start-foot, .start-hint, .start-meta) { color: var(--ink2) !important; }
.ymdq[data-theme="frosted"] :is(.start-sub, .start-poem, .start-eyebrow) { text-shadow: 0 1px 12px rgba(255, 255, 255, 0.75); }
.ymdq[data-theme="frosted"] .menu-label strong { color: var(--ink) !important; }
.ymdq[data-theme="frosted"] .menu-label small { color: var(--muted) !important; }
.ymdq[data-theme="frosted"] .menu-glyph { color: var(--line2) !important; }
.ymdq[data-theme="frosted"] .title-seal { border-color: var(--line2); color: var(--ink); }
.ymdq[data-theme="frosted"] :is(.user-bubble, .story-actions button, .msg-raw) { color: var(--ink) !important; }
.ymdq[data-theme="frosted"] .user-bubble { border: 1px solid var(--glass-line) !important; }
.ymdq[data-theme="frosted"] .vn-text { color: var(--ink) !important; }
.ymdq[data-theme="frosted"] .vn-speaker { color: var(--cyan) !important; }
.ymdq[data-theme="frosted"] .buff { background: rgba(255, 255, 255, 0.5); border-color: rgba(120, 90, 45, 0.28); color: var(--gold); }
.ymdq[data-theme="frosted"] .theme-card { color: var(--ink); }
.ymdq[data-theme="frosted"] .theme-card b { color: var(--ink); }
.ymdq[data-theme="frosted"] .theme-card small { color: var(--muted); }

/* 玻璃主题：主题卡片预览边框 */
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .theme-card .tc-preview { border-radius: 10px; overflow: hidden; border-color: var(--glass-line); }

/* 玻璃主题：弹幕行用白色分隔线 */
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .danmaku-item { border-left: 1px solid var(--glass-line); border-radius: 0 8px 8px 0; }

/* 玻璃主题：主题卡选中、开关、图标对比 */
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .theme-card.on {
  border-color: rgba(255, 255, 255, 0.72) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32), 0 12px 28px rgba(0, 0, 0, 0.2);
}
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .set-toggle {
  border-radius: 999px;
  background-color: rgba(var(--glass-tint), var(--glass-btn-alpha)) !important;
  border-color: var(--glass-line) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}
.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .set-toggle:after { border-radius: 50%; }
.ymdq[data-theme="liquid"] .set-toggle.on { background-color: rgba(84, 172, 220, 0.5) !important; }
.ymdq[data-theme="frosted"] .set-toggle.on { background-color: rgba(63, 127, 156, 0.55) !important; }
.ymdq[data-theme="liquid"] .modal-mask { background: rgba(1, 5, 14, 0.52); }
.ymdq[data-theme="liquid"] .rail-ico { color: rgba(159, 240, 255, 0.9); }
.ymdq[data-theme="frosted"] :is(.rail-ico, .panel-link) { color: var(--cyan) !important; }
.ymdq[data-theme="frosted"] :is(.rail-btn b, .mode-switch button, .vn-controls button, .vn-chip, .composer-tools button, .top-actions button) { color: var(--ink2) !important; }
.ymdq[data-theme="frosted"] .danmaku-item b { color: var(--azure) !important; }
.ymdq[data-theme="frosted"] .danmaku-item:nth-child(3n) b { color: var(--gold) !important; }
.ymdq[data-theme="frosted"] .danmaku-item:nth-child(3n+1) b { color: var(--rose) !important; }
.ymdq[data-theme="frosted"] .composer-box .send {
  background-image: linear-gradient(120deg, rgba(70, 132, 162, 0.9), rgba(104, 168, 190, 0.7)) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  color: #ffffff !important;
}
/* 视觉小说的舞台仍是深色画面，舞台上没有玻璃面板的文字要保持浅色 */
#ymdq-app[data-theme="frosted"] :is(.vn-chapter, .vn-title-bg, .vn-empty, .vn-stale, .vn-flash-label, .vn-next-mark) { color: rgba(236, 248, 255, 0.86) !important; }
#ymdq-app[data-theme="frosted"] .vn-empty b { color: #f2fbff !important; }
#ymdq-app[data-theme="frosted"] .vn-empty-actions button { color: var(--ink2) !important; }
.ymdq[data-theme="frosted"] .main-title span { text-shadow: 0 2px 18px rgba(255, 255, 255, 0.6); }

/* ==========================================================================
   4. 设置 · 美化面板
   ========================================================================== */
.bz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 9px; margin: 8px 0 10px; }
.bz-card {
  position: relative; display: flex; flex-direction: column; gap: 5px; padding: 7px;
  border: 1px solid var(--line); background: var(--glass); color: var(--ink2);
  border-radius: 12px; text-align: left; transition: border-color 0.25s, transform 0.25s;
}
.bz-card:hover { border-color: var(--line2); transform: translateY(-1px); }
.bz-card.on { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(127, 231, 255, 0.25) inset; }
.bz-thumb {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px;
  background: rgba(3, 10, 22, 0.5); display: flex; align-items: center; justify-content: center;
}
.bz-thumb img, .bz-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.bz-thumb .bz-empty-mark { font-size: 10px; color: var(--muted); letter-spacing: 0.1em; }
.bz-kind {
  position: absolute; left: 5px; top: 5px; z-index: 2; padding: 2px 5px; border-radius: 999px;
  font: 500 7.5px/1 var(--sans); letter-spacing: 0.12em; color: #04121f;
  background: rgba(127, 231, 255, 0.82);
}
.bz-kind.video { background: rgba(232, 201, 138, 0.88); }
.bz-name { font-size: 10px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bz-acts { display: flex; gap: 4px; }
.bz-acts .btn { flex: 1; min-height: 24px; padding: 3px 6px; font-size: 9px; }
.bz-on-mark { position: absolute; right: 5px; top: 5px; z-index: 2; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; background: var(--cyan); color: #04121f; }
.bz-empty {
  padding: 18px 14px; border: 1px dashed var(--line2); border-radius: 12px; text-align: center;
  font-size: 10px; line-height: 1.9; color: var(--muted); margin: 8px 0 10px;
}
.bz-swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 4px; }
.bz-swatch { display: flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 9.5px; color: var(--ink2); }
.bz-swatch.on { border-color: var(--cyan); color: var(--ink); box-shadow: 0 0 0 1px rgba(127, 231, 255, 0.2) inset; }
.bz-swatch i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.bz-preview { position: relative; height: 68px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin: 4px 0 10px; }
.bz-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bz-preview .bz-prev-tags { position: absolute; inset: 0; padding: 8px; display: flex; align-items: center; gap: 6px; backdrop-filter: blur(var(--ymdq-gb)); background: rgba(8, 20, 38, var(--ymdq-ga)); }
.bz-preview .bz-prev-tags span { padding: 4px 8px; border-radius: 999px; font-size: 8.5px; color: #eafaff; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3); }

/* 封面画廊 */
.bz-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.bz-gallery-grid .bz-card { padding: 8px; }
.bz-gallery-tip { margin: 0 0 12px; font-size: 10.5px; line-height: 1.9; color: var(--muted); }

@media (max-width: 720px) {
  .start-cover-ctl { right: 14px; bottom: 72px; }
  .start-cover-ctl .scc-label em { display: none; }
  .bz-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .bz-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .start-cover .sc-media { inset: -24px; }
  .ymdq-scene .scene-media { inset: -24px; }
}

/* 减弱动效 */
.ymdq.ymdq-reduce .start-cover .sc-media img.sc-item.drift { animation: none; }
.ymdq.ymdq-reduce .start-cover,
.ymdq.ymdq-reduce .ymdq-scene { transition: none; }

/* ==========================================================================
   5.1 封面切换条：拟物态 / 玻璃浅色适配 + 手机端缩小
   ========================================================================== */
.ymdq[data-theme^="neu-"] .start-cover-ctl {
  background: var(--neu-surface) !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: var(--neu-raised-sm), inset 0 1px 0 var(--neu-hi) !important;
}
.ymdq[data-theme^="neu-"] .start-cover-ctl button { color: var(--ink2) !important; }
.ymdq[data-theme^="neu-"] .start-cover-ctl button:hover { color: var(--neu-accent) !important; background: transparent !important; }
.ymdq[data-theme^="neu-"] .start-cover-ctl .scc-label em { color: var(--neu-accent) !important; }
.ymdq[data-theme^="neu-"] .start-cover-ctl .scc-dot.on { background: var(--neu-accent) !important; box-shadow: 0 0 8px var(--neu-glow) !important; }
.ymdq[data-theme="frosted"] .start-cover-ctl {
  background: rgba(247, 252, 255, 0.86) !important;
  border-color: rgba(63, 127, 156, 0.34) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 12px 30px rgba(40, 70, 90, 0.16) !important;
}
.ymdq[data-theme="frosted"] .start-cover-ctl button { color: #2e5c72 !important; }
.ymdq[data-theme="frosted"] .start-cover-ctl button:hover { color: #123f54 !important; background: rgba(63, 127, 156, 0.12) !important; }
.ymdq[data-theme="frosted"] .start-cover-ctl .scc-label { color: #2e5c72 !important; }
.ymdq[data-theme="frosted"] .start-cover-ctl .scc-label em { color: #1f6f8f !important; }
.ymdq[data-theme="frosted"] .start-cover-ctl .scc-label b { color: #24495c !important; }
.ymdq[data-theme="frosted"] .start-cover-ctl .scc-dot { background: rgba(46, 92, 114, 0.28) !important; }
.ymdq[data-theme="frosted"] .start-cover-ctl .scc-dot.on { background: #1f6f8f !important; }

@media (max-width: 720px) {
  .start-cover-ctl { right: 10px; bottom: 46px; padding: 3px; gap: 2px; }
  .menu-btn { min-height: 56px; }
  .start-cover-ctl button { height: 22px; min-width: 22px; font-size: 10px; }
  .start-cover-ctl .scc-label { padding: 0 7px; gap: 4px; font-size: 8.5px; }
  .start-cover-ctl .scc-label em { display: none; }
  .start-cover-ctl .scc-label b { font-size: 8px; }
  .start-cover-ctl .scc-dot { width: 4px; height: 4px; }
}
/* 一梦大千 · 4.3 语音系统 */
.say-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; padding: 0; margin: 0 3px 0 5px;
  border: 1px solid rgba(127, 231, 255, 0.16);
  background: transparent;
  color: rgba(150, 190, 215, 0.62);
  border-radius: 50%; cursor: pointer; vertical-align: -3px;
  transition: color 0.16s, border-color 0.16s, background 0.16s, transform 0.16s;
}
.say-btn svg { width: 11px; height: 11px; display: block; }
.say-btn:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.6); background: transparent; transform: translateY(-1px); }
.say-btn:active { transform: scale(0.92); }
.say-btn[disabled] { opacity: 0.32; cursor: default; }
.cd-heart { display: flex; align-items: flex-start; gap: 6px; }
.cd-heart .cd-heart-text { flex: 1; min-width: 0; }
.cd-heart .say-btn { flex: none; margin-top: 2px; }
.bf-label-row { display: flex; align-items: center; gap: 2px; }
.bf-label-row .say-btn { margin: 0 0 0 4px; }

/* 视觉小说对白右下：键盘 / 三角左侧 */
.vn-say {
  position: absolute; right: 76px; bottom: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 20px; padding: 0;
  color: rgba(150, 190, 215, 0.62);
  border: 1px solid rgba(127, 231, 255, 0.18);
  background: transparent;
  cursor: pointer; border-radius: 2px;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.vn-say svg { width: 12px; height: 12px; }
.vn-say:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.55); background: transparent; }
.vn-say.hide { display: none; }
#vnVoiceAuto.on { color: var(--cyan); border-color: rgba(127, 231, 255, 0.55); background: rgba(10, 34, 62, 0.8); }

/* 音色管理 */
.voice-manager { display: flex; flex-direction: column; gap: 12px; }
.vm-provider {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 11px; border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(31, 87, 158, 0.12), rgba(6, 14, 26, 0.24));
}
.vm-provider b { display: block; font-weight: 400; font-size: 11.5px; color: var(--ink2); }
.vm-hint { display: block; margin-top: 3px; font-size: 9px; line-height: 1.6; color: var(--muted); }
.vm-provider .btn { flex: none; }
.vm-test label { display: block; margin-bottom: 5px; font-size: 9px; letter-spacing: 0.12em; color: var(--muted); }
.vm-test label small { display: block; margin-top: 2px; letter-spacing: 0; font-size: 8.5px; color: rgba(150, 183, 208, 0.55); }
.vm-test textarea { width: 100%; resize: vertical; font-size: 12px; line-height: 1.7; }
.vm-gender {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 10px; border: 1px solid var(--line); background: rgba(6, 16, 30, 0.28);
  font-size: 9.5px; line-height: 1.6; color: var(--muted);
}
.vm-gender b { font-weight: 400; color: var(--cyan); }
.vm-gender select { width: 96px; flex: none; }
.vm-idquick label { display: block; margin-bottom: 5px; font-size: 9px; letter-spacing: 0.12em; color: var(--muted); }
.vm-idquick label small { display: block; margin-top: 2px; letter-spacing: 0; font-size: 8.5px; color: rgba(150, 183, 208, 0.55); }
.vm-idhint { min-height: 14px; margin-top: 4px; font-size: 9px; color: rgba(150, 183, 208, 0.65); }
.vs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vs-card {
  padding: 10px; border: 1px solid var(--line);
  background: rgba(6, 16, 30, 0.34);
  transition: border-color 0.16s, background 0.16s;
}
.vs-card.on { border-color: rgba(127, 231, 255, 0.6); background: rgba(10, 42, 74, 0.4); box-shadow: inset 0 0 0 1px rgba(127, 231, 255, 0.08); }
.vs-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.vs-head b { font: 500 9px/1 var(--latin); letter-spacing: 0.16em; color: var(--muted); }
.vs-active { font-size: 8px; color: var(--cyan); border: 1px solid rgba(127, 231, 255, 0.38); padding: 1px 5px; }
.vs-note { font-size: 8px; color: rgba(150, 183, 208, 0.55); }
.vs-name { margin: 7px 0 8px; min-height: 30px; font-size: 11.5px; line-height: 1.45; color: var(--ink2); overflow-wrap: anywhere; }
.vs-field { display: block; margin-top: 6px; }
.vs-field span { display: block; margin-bottom: 3px; font-size: 8px; color: var(--muted); line-height: 1.4; }
.vs-field input { width: 100%; font-size: 10px; padding: 5px 7px; }
.vs-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.vs-actions .btn { flex: 1 1 auto; }
.vs-card .say-btn { display: none; }

@media (max-width: 720px) {
  .vm-provider { align-items: flex-start; flex-direction: column; }
  .vs-grid { grid-template-columns: 1fr; }
  .vn-say { right: 70px; }
}

/* 一梦大千 · 4.4.2 修复层
 * 自动朗读状态、场景图亮度、玻璃主题下的表情/音色/喇叭、视觉小说选项组
 */

/* ---------------- 1. 自动朗读状态 ---------------- */
#vnVoiceAuto {
  display: inline-flex; align-items: center; gap: 5px;
}
#vnVoiceAuto .vn-va-led {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(150, 190, 215, 0.45);
  box-shadow: none; transition: 0.2s;
}
#vnVoiceAuto b {
  font-weight: 500; font-size: 8.5px; letter-spacing: 0.08em;
  color: var(--muted);
}
#vnVoiceAuto.on .vn-va-led {
  background: var(--cyan);
  box-shadow: 0 0 9px rgba(127, 231, 255, 0.9);
}
#vnVoiceAuto.on b { color: var(--cyan); }
#vnVoiceAuto.on { color: var(--cyan); }

.vn-auto-chip {
  position: absolute; top: 8px; right: 16px; z-index: 5;
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 10px;
  font-size: 9px; letter-spacing: 0.08em; line-height: 1;
  color: var(--cyan); cursor: pointer;
  border: 1px solid rgba(127, 231, 255, 0.42);
  border-radius: 999px;
  background: rgba(3, 12, 26, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: color 0.18s, border-color 0.18s, background 0.18s, transform 0.18s;
}
.vn-auto-chip:hover { color: #eafcff; border-color: rgba(127, 231, 255, 0.8); background: rgba(10, 42, 74, 0.82); transform: translateY(-1px); }
.vn-auto-chip.hide { display: none; }
.vn-auto-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 9px rgba(127, 231, 255, 0.95);
  animation: vnAutoPulse 1.35s ease-in-out infinite;
}
@keyframes vnAutoPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.78); } }

/* ---------------- 2. 场景图不再压暗 / 暗角 ---------------- */
.vn-stage.has-custom-bg .vn-bg.bg-custom:before,
.vn-stage.has-custom-bg .vn-bg.bg-custom:after { background: none !important; }
.vn-stage.has-custom-bg .vn-aura { background: none !important; }
.vn-stage.has-custom-bg .vn-mountain { display: none !important; }
.vn-stage.has-custom-bg .vn-bg.bg-custom { filter: none; }
.vn-stage.has-custom-bg:after { background: none !important; }
.vn-stage.has-custom-bg:before { opacity: 0.018; }
.vn-stage.has-custom-bg .vn-bg.bg-custom { opacity: 1 !important; }
.vn-stage.has-custom-bg .vn-hud,
.vn-stage.has-custom-bg .vn-chapter { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7), 0 0 18px rgba(0, 0, 0, 0.35); }
.vn-stage.has-custom-bg .vn-chip {
  background: rgba(2, 8, 18, 0.66) !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  color: rgba(225, 243, 255, 0.92) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---------------- 3. 视觉小说选项：四张独立玻璃卡，从上到下 ---------------- */
.vn-choices {
  gap: 8px !important;
  width: min(560px, 78%);
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.vn-choices button {
  position: relative;
  width: 100%;
  font-weight: 600;
  font-size: 12.5px;
  padding: 11px 36px 11px 16px;
  border: 1px solid rgba(127, 231, 255, 0.24) !important;
  border-radius: 12px !important;
  background: rgba(3, 12, 26, 0.74) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink2);
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
  transform: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: color 0.18s, background 0.18s, border-color 0.18s, transform 0.18s, padding-left 0.18s, letter-spacing 0.18s;
}
.vn-choices button:before {
  content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 2px;
  background: var(--cyan); opacity: 0; transition: opacity 0.18s;
}
.vn-choices button:after {
  content: '›'; position: absolute; right: 15px; top: 50%;
  transform: translateY(-50%) translateX(-4px);
  color: var(--cyan); opacity: 0; font-size: 16px;
  transition: opacity 0.18s, transform 0.18s;
}
.vn-choices button:hover {
  color: #ecfdff;
  border-color: rgba(127, 231, 255, 0.68) !important;
  background: linear-gradient(90deg, rgba(127, 231, 255, 0.18), rgba(255, 255, 255, 0.05) 60%, transparent), rgba(6, 20, 38, 0.92) !important;
  transform: translateX(5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding-left: 21px;
  letter-spacing: 0.015em;
}
.vn-choices button:hover:before { opacity: 1; }
.vn-choices button:hover:after { opacity: 1; transform: translateY(-50%) translateX(0); }
.vn-choices .suggest { text-align: center; padding: 11px 16px; color: var(--cyan); }

/* 文字模式选项：同样四张独立卡 */
.story-choices {
  display: grid;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
}
.story-choices button {
  position: relative;
  font-weight: 500;
  font-size: 12.5px;
  border: 1px solid rgba(127, 231, 255, 0.2) !important;
  border-radius: 10px !important;
  background: rgba(6, 18, 34, 0.55) !important;
  padding: 10px 28px 10px 14px;
  color: var(--ink2);
  text-align: left;
  transition: color 0.18s, background 0.18s, border-color 0.18s, transform 0.18s, padding-left 0.18s;
}
.story-choices button:after {
  content: '›'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%) translateX(-3px);
  color: var(--cyan); opacity: 0; transition: opacity 0.18s, transform 0.18s;
}
.story-choices button:hover {
  color: #ecfdff;
  border-color: rgba(127, 231, 255, 0.6) !important;
  background: linear-gradient(90deg, rgba(127, 231, 255, 0.15), transparent 72%) !important;
  transform: translateX(4px);
  padding-left: 19px;
}
.story-choices button:hover:after { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ---------------- 4. 两种液态玻璃主题下的新组件 ---------------- */
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(.say-btn, .vn-say, .vn-auto-chip, #vnVoiceAuto) {
  background-color: rgba(var(--glass-tint), calc(var(--glass-btn-alpha) * 0.92)) !important;
  background-image: linear-gradient(150deg, var(--glass-sheen), rgba(255, 255, 255, 0.02) 62%) !important;
  border: 1px solid var(--glass-line) !important;
  color: var(--ink2) !important;
  box-shadow: inset 0 1px 0 var(--glass-sheen), 0 6px 16px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(calc(var(--glass-blur) * 0.55)) saturate(155%);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 0.55)) saturate(155%);
}
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(.say-btn, .vn-say, .vn-auto-chip, #vnVoiceAuto):hover {
  background-color: rgba(var(--glass-tint), calc(var(--glass-btn-alpha) * 1.2)) !important;
  border-color: var(--cyan) !important;
  color: var(--cyan) !important;
}
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) #vnVoiceAuto.on,
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .vn-auto-chip {
  color: var(--cyan) !important;
  border-color: rgba(46, 106, 134, 0.55) !important;
}
#ymdq-app.ymdq[data-theme="liquid"] #vnVoiceAuto.on,
#ymdq-app.ymdq[data-theme="liquid"] .vn-auto-chip {
  border-color: rgba(127, 231, 255, 0.55) !important;
}
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .say-btn { border-radius: 50%; }
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .vn-say { border-radius: 8px; }
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .vn-auto-chip { border-radius: 999px; }

#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(.vm-provider, .vm-gender, .vs-card, .fx-slot, .fx-blink-box) {
  background-color: rgba(var(--glass-tint), calc(var(--glass-alpha) * 0.62)) !important;
  background-image: linear-gradient(155deg, var(--glass-sheen), rgba(255, 255, 255, 0.015) 58%) !important;
  border: 1px solid var(--glass-line) !important;
  border-radius: calc(var(--glass-radius) * 0.62);
  backdrop-filter: blur(calc(var(--glass-blur) * 0.55)) saturate(150%);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 0.55)) saturate(150%);
  box-shadow: inset 0 1px 0 var(--glass-sheen), 0 8px 22px rgba(0, 0, 0, 0.12);
}
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(.fx-preview, .fx-thumb) {
  background: rgba(var(--glass-tint), calc(var(--glass-alpha) * 0.5)) !important;
  border: 1px solid var(--glass-line) !important;
  border-radius: calc(var(--glass-radius) * 0.5);
  backdrop-filter: blur(calc(var(--glass-blur) * 0.45));
}
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .vs-card.on {
  border-color: var(--cyan) !important;
  background-color: rgba(var(--glass-tint), calc(var(--glass-alpha) * 0.9)) !important;
  box-shadow: inset 0 0 0 1px rgba(127, 231, 255, 0.2), 0 10px 26px rgba(0, 0, 0, 0.16);
}
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(.vm-hint, .vm-idhint, .vm-test label small, .vs-note, .vs-field span, .vs-head b) {
  color: var(--muted) !important;
}
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(.vm-provider b, .vs-name, .fx-title, .vs-field span) {
  color: var(--ink2) !important;
}
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) .vs-active {
  border-color: rgba(127, 231, 255, 0.55);
  color: var(--cyan);
}

#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(.vn-choices, .story-choices) {
  border: 0 !important;
  background: transparent !important;
  background-image: none !important;
  border-radius: 0;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
  gap: 8px !important;
}
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(.vn-choices button, .story-choices button) {
  border: 1px solid var(--glass-line) !important;
  border-radius: calc(var(--glass-radius) * 0.55) !important;
  background-color: rgba(var(--glass-tint), var(--glass-alpha)) !important;
  background-image: linear-gradient(150deg, var(--glass-sheen), rgba(255, 255, 255, 0.02) 58%) !important;
  color: var(--ink) !important;
  opacity: 1;
  text-shadow: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16), inset 0 1px 0 var(--glass-sheen);
  backdrop-filter: blur(var(--glass-blur)) saturate(155%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(155%);
}
#ymdq-app.ymdq:is([data-theme="liquid"], [data-theme="frosted"]) :is(.vn-choices button:hover, .story-choices button:hover) {
  color: var(--ink) !important;
  border-color: var(--cyan) !important;
  background-color: rgba(var(--glass-tint), calc(var(--glass-alpha) * 0.8)) !important;
  background-image: linear-gradient(150deg, var(--glass-sheen), rgba(255, 255, 255, 0.04) 58%) !important;
  transform: translateX(5px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22), inset 0 1px 0 var(--glass-sheen);
}
.ymdq[data-theme="liquid"] .vn-auto-chip { color: var(--cyan); }

@media (max-width: 720px) {
  .vn-auto-chip { top: 6px; right: 10px; font-size: 8px; height: 20px; padding: 0 8px; }
  .vn-choices { width: calc(100% - 22px); padding: 5px; }
  .vn-choices button { padding: 10px 30px 10px 13px; font-size: 11.5px; }
  .vn-choices button:hover { padding-left: 17px; }
  .story-choices { padding: 5px; }
}

/* ==========================================================================
   一梦大千 · 4.5 拟物态（Neumorphism）
   data-theme = neu-dark-{blue|violet|pink|gold} / neu-light-{...}
   原则：整屏同一块底色，凹凸只靠双向柔和阴影；主题色只落在小色块、图标与当前项上。
   新增配色：照抄一组变量即可，不需要改结构。
   ========================================================================== */

/* ---------- 1. 底色与体积（深色 / 浅色） ---------- */
.ymdq[data-theme^="neu-dark"] {
  color-scheme: dark;
  --neu-bg: #1b1e25;
  --neu-surface: #21252d;
  --neu-surface-2: #262a33;
  --neu-shadow: rgba(0, 0, 0, 0.55);
  --neu-hi: rgba(255, 255, 255, 0.04);
  --neu-title-dark: rgba(0, 0, 0, 0.55);
  --neu-title-light: rgba(255, 255, 255, 0.07);
  --neu-raised: 7px 8px 18px rgba(0, 0, 0, 0.5), -6px -6px 16px rgba(255, 255, 255, 0.04);
  --neu-raised-sm: 4px 4px 10px rgba(0, 0, 0, 0.45), -3px -3px 9px rgba(255, 255, 255, 0.038);
  --neu-inset: inset 4px 5px 12px rgba(0, 0, 0, 0.55), inset -3px -4px 10px rgba(255, 255, 255, 0.03);
  --neu-inset-sm: inset 2px 3px 6px rgba(0, 0, 0, 0.5), inset -2px -2px 5px rgba(255, 255, 255, 0.028);
  --neu-fill-ink: #ffffff;
  --neu-line: rgba(255, 255, 255, 0.16);

  --void: #1b1e25;
  --abyss: #1d2028;
  --deep: #20242c;
  --deep2: #252a33;
  --panel: #21252d;
  --panel2: #242830;
  --panel-solid: #21252d;
  --ink: #eaedf3;
  --ink2: #c6ccd8;
  --muted: #8f97a7;
  --dim: #6e7686;
  --line: rgba(255, 255, 255, 0.055);
  --line2: rgba(255, 255, 255, 0.11);
  --glass: #21252d;
  --danger: #ff8296;
}

.ymdq[data-theme^="neu-light"] {
  color-scheme: light;
  --neu-bg: #e7ebf1;
  --neu-surface: #e9edf3;
  --neu-surface-2: #eef2f7;
  --neu-shadow: rgba(90, 105, 130, 0.3);
  --neu-hi: #ffffff;
  --neu-title-dark: rgba(120, 138, 165, 0.5);
  --neu-title-light: rgba(255, 255, 255, 0.95);
  --neu-raised: 6px 7px 16px rgba(160, 175, 198, 0.6), -6px -7px 16px #ffffff;
  --neu-raised-sm: 3px 4px 9px rgba(160, 175, 198, 0.55), -3px -4px 9px rgba(255, 255, 255, 0.96);
  --neu-inset: inset 4px 5px 11px rgba(160, 175, 198, 0.6), inset -3px -4px 10px rgba(255, 255, 255, 0.98);
  --neu-inset-sm: inset 2px 3px 6px rgba(160, 175, 198, 0.55), inset -2px -2px 5px rgba(255, 255, 255, 0.95);
  --neu-fill-ink: #ffffff;
  --neu-line: rgba(120, 135, 160, 0.34);

  --void: #e7ebf1;
  --abyss: #e8ecf2;
  --deep: #e4e9ef;
  --deep2: #dfe4eb;
  --panel: #e9edf3;
  --panel2: #edf1f6;
  --panel-solid: #e9edf3;
  --ink: #3a4353;
  --ink2: #4d5768;
  --muted: #79839a;
  --dim: #98a1b1;
  --line: rgba(84, 101, 130, 0.14);
  --line2: rgba(84, 101, 130, 0.24);
  --glass: #e9edf3;
  --danger: #c4485c;
}

/* ---------- 2. 主题色（只做小面积点缀） ---------- */
.ymdq[data-theme="neu-dark-blue"] { --neu-accent: #8ba4ff; --neu-fill: #5a74e0; --neu-tint: rgba(90, 116, 230, 0.14); --neu-glow: rgba(120, 150, 255, 0.3); }
.ymdq[data-theme="neu-dark-violet"] { --neu-accent: #bda6ff; --neu-fill: #7a5fd0; --neu-tint: rgba(140, 110, 230, 0.13); --neu-glow: rgba(160, 130, 255, 0.28); }
.ymdq[data-theme="neu-dark-pink"] { --neu-accent: #ffa6c4; --neu-fill: #c9547b; --neu-tint: rgba(210, 90, 130, 0.13); --neu-glow: rgba(255, 140, 180, 0.26); }
.ymdq[data-theme="neu-dark-gold"] { --neu-accent: #eed7a4; --neu-fill: #a07a34; --neu-tint: rgba(200, 160, 80, 0.11); --neu-glow: rgba(230, 200, 140, 0.24); }
.ymdq[data-theme="neu-light-blue"] { --neu-accent: #4b63d4; --neu-fill: #4b63d4; --neu-tint: rgba(75, 99, 212, 0.09); --neu-glow: rgba(75, 99, 212, 0.22); }
.ymdq[data-theme="neu-light-violet"] { --neu-accent: #6f52cc; --neu-fill: #6f52cc; --neu-tint: rgba(111, 82, 204, 0.09); --neu-glow: rgba(111, 82, 204, 0.22); }
.ymdq[data-theme="neu-light-pink"] { --neu-accent: #c2456f; --neu-fill: #c2456f; --neu-tint: rgba(194, 69, 111, 0.08); --neu-glow: rgba(194, 69, 111, 0.2); }
.ymdq[data-theme="neu-light-gold"] { --neu-accent: #96702a; --neu-fill: #96702a; --neu-tint: rgba(150, 112, 42, 0.08); --neu-glow: rgba(150, 112, 42, 0.2); }

/* 主题色接管原本的青色 / 金色点缀：整屏只有一种彩色 */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) {
  --cyan: var(--neu-accent);
  --azure: var(--neu-fill);
  --blue: var(--neu-fill);
  --violet: var(--neu-accent);
  --gold: var(--neu-accent);
  --rose: var(--neu-accent);
  --quote: var(--neu-accent);
  --quote-halo: var(--neu-glow);
  --spk: var(--neu-accent);
  --spk-halo: var(--neu-glow);
  --spk-line: var(--neu-glow);
}

/* ---------- 3. 页面底色与装饰层 ---------- */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) {
  background:
    radial-gradient(circle at 12% 2%, var(--neu-tint), transparent 42%),
    radial-gradient(circle at 90% 94%, var(--neu-tint), transparent 46%),
    var(--neu-bg);
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .bg-aurora,
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .bg-grid { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .stars-canvas { opacity: 0.16; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .bg-noise { opacity: 0.035; }
.ymdq[data-theme^="neu-light"] .bg-vignette { display: none; }
.ymdq[data-theme^="neu-dark"] .bg-vignette { opacity: 0.6; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .start-orbit { opacity: 0.14; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) ::selection { background: var(--neu-glow); color: var(--ink); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) ::-webkit-scrollbar-thumb { background: var(--neu-line, rgba(120, 135, 160, 0.3)); border-radius: 999px; }

/* ---------- 4. 凸起面 ---------- */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(
  .glass-panel, .story-main, .start-menu, .modal, .set-group, .rail-btn,
  .char-card, .task-card, .bag-item, .map-detail, .node-row, .preset-chip,
  .bc-portrait, .wiz-portrait, .map-canvas, .bg-pick-item, .bond-card, .cd-portrait,
  .wiz-card, .summary-card, .task-summary, .task-col, .task-add, .bag-toolbar,
  .bag-foot, .char-toolbar, .char-strip, .char-pager, .cd-grid, .cd-left, .cd-right,
  .cd-pane, .bag-empty, .task-empty, .wiz-rail, .world-card, .live-shell, .live-top,
  .live-side, .live-console, .live-history, .live-preview, .live-ended-card,
  .live-hist-item, .live-stage, .forum-post, .forum-detail, .fd-reply,
  .save-manager, .sm-run, .sm-save, .generic-cell, .vn-empty,
  .cd-meta .cm, .cbag-item, .live-hist-inline, .msg-raw
) {
  background-color: var(--neu-surface) !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: var(--neu-raised) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(
  .glass-panel, .story-main, .start-menu, .modal, .map-canvas, .cd-grid,
  .cd-left, .cd-right, .cd-pane, .world-card, .live-shell, .live-side,
  .live-console, .live-stage, .save-manager, .forum-detail, .wiz-card
) { border-radius: 18px; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.set-group, .char-card, .task-card, .bag-item, .map-detail, .bond-card, .forum-post, .summary-card, .task-col, .live-hist-item, .bg-pick-item) { border-radius: 14px; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.rail-btn, .node-row, .preset-chip, .cd-meta .cm, .cbag-item) { border-radius: 12px; }

/* 顶部栏 / 弹窗头尾 / 设置侧栏：同一底色，只用一道极浅的线分隔 */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .game-top {
  background: var(--neu-surface) !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: 0 8px 18px -14px var(--neu-shadow) !important;
  backdrop-filter: none !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .wiz-top,
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .wiz-foot {
  background: var(--neu-surface) !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .modal {
  box-shadow: var(--neu-raised), 0 30px 90px var(--neu-shadow) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .modal:before { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .modal-glow { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.modal-head, .modal-actions) {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .modal-head { border-bottom: 1px solid var(--line) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .modal-actions { border-top: 1px solid var(--line) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .modal-mask { background: rgba(20, 24, 30, 0.62); backdrop-filter: blur(6px); }
.ymdq[data-theme^="neu-light"] .modal-mask { background: rgba(90, 105, 130, 0.32); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .modal-mask.stacked { background: rgba(20, 24, 30, 0.3); }
.ymdq[data-theme^="neu-light"] .modal-mask.stacked { background: rgba(90, 105, 130, 0.18); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .settings-tabs { background: transparent !important; border-right: 1px solid var(--line) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .settings-pane { background: transparent !important; box-shadow: none !important; }

/* ---------- 5. 小控件：按键、标签、开关 ---------- */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(
  .btn, .icon-btn, .rail-btn, .composer-tools button, .story-actions button,
  .top-actions button, .vn-chip, .vn-controls button, .modal-close, .panel-link,
  .bag-foot button, .char-pager button, .task-card .tc-act button,
  .danmaku-input button, .map-toolbar button, .char-filters button,
  .bag-filters button, .task-filters button, .cd-tabs button, .vn-more-btn,
  .vn-composer-toggle, .live-form button, .pet-actions button
) {
  background: var(--neu-surface) !important;
  background-image: none !important;
  color: var(--ink2) !important;
  border: 0 !important;
  border-radius: 10px;
  box-shadow: var(--neu-raised-sm) !important;
  clip-path: none !important;
  text-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(
  .btn, .icon-btn, .rail-btn, .composer-tools button, .story-actions button,
  .top-actions button, .vn-chip, .vn-controls button, .modal-close, .panel-link,
  .bag-foot button, .char-pager button, .task-card .tc-act button,
  .danmaku-input button, .map-toolbar button, .char-filters button,
  .bag-filters button, .task-filters button, .cd-tabs button
):hover {
  color: var(--neu-accent) !important;
  box-shadow: var(--neu-raised), 0 0 0 1px var(--neu-glow) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.btn, .icon-btn, .rail-btn, .vn-controls button, .settings-tabs button):active {
  box-shadow: var(--neu-inset-sm) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .btn:before { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .btn.primary,
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.mode-switch button.active, .char-filters button.on, .bag-filters button.on, .task-filters button.on, .cd-tabs button.on, .settings-tabs button.on) {
  background: var(--neu-fill) !important;
  background-image: none !important;
  color: var(--neu-fill-ink) !important;
  border: 0 !important;
  box-shadow: var(--neu-raised-sm), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .mode-switch {
  background: var(--neu-bg) !important;
  border: 0 !important;
  box-shadow: var(--neu-inset-sm) !important;
  padding: 3px;
  border-radius: 12px;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .mode-switch button { border-radius: 9px; box-shadow: none !important; background: transparent !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .mode-switch button.active {
  background: var(--neu-surface) !important;
  color: var(--neu-accent) !important;
  box-shadow: var(--neu-raised-sm) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .mode-switch button:after { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .settings-tabs button {
  background: transparent !important;
  box-shadow: none !important;
  border-left: 2px solid transparent !important;
  border-radius: 0 10px 10px 0;
  color: var(--muted) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .settings-tabs button:hover { color: var(--ink2) !important; background: var(--neu-bg) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .settings-tabs button.on {
  background: var(--neu-surface) !important;
  box-shadow: var(--neu-raised-sm) !important;
  border-left-color: var(--neu-accent) !important;
  color: var(--neu-accent) !important;
}

/* 开关 */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .set-toggle {
  width: 44px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: var(--neu-bg);
  box-shadow: var(--neu-inset-sm);
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .set-toggle:after {
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--neu-surface);
  box-shadow: var(--neu-raised-sm);
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .set-toggle.on { background: var(--neu-bg); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .set-toggle.on:after { left: 23px; background: var(--neu-accent); box-shadow: 0 2px 6px var(--neu-shadow), 0 0 10px var(--neu-glow); }

/* ---------- 6. 输入控件：向内凹 ---------- */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(input, textarea, select) {
  background: var(--neu-surface) !important;
  color: var(--ink) !important;
  border: 0 !important;
  border-radius: 10px;
  box-shadow: var(--neu-inset) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(input, textarea, select):focus {
  box-shadow: var(--neu-inset), 0 0 0 1px var(--neu-accent) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: var(--neu-bg) !important;
  box-shadow: var(--neu-inset-sm) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--neu-surface);
  border: 0;
  box-shadow: 0 0 0 2px var(--neu-accent), 0 2px 6px var(--neu-shadow);
  cursor: pointer;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--neu-surface);
  border: 2px solid var(--neu-accent);
  box-shadow: 0 2px 6px var(--neu-shadow);
}

/* ---------- 7. 文字层级 ---------- */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(
  .world-name, .player-name, .modal-head h2, .btn, .menu-label strong,
  .story-text, .story-text p, .story-text strong, .vn-text, .vn-choices button,
  .set-row, .field label, .char-card b, .task-card b, .bag-item b, .skin-name,
  .forum-post .fp-title, .fd-head h3, .sm-save-main b, .summary-card b,
  .vn-empty b, .map-detail h3
) { color: var(--ink) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(
  .story-text p.dialogue, .story-text p.speaker-line.dlg .quote, .user-bubble,
  .world-time, .player-sub, .player-loc, .world-hint, .composer-meta,
  .danmaku-item, .story-meta, .panel-title, .panel-meta, .buff-title,
  .set-note, .set-row > label small, .range-v, .modal-body p, .confirm-text,
  .start-poem, .start-sub, .start-foot, .skin-desc, .skin-pick, .skin-on,
  .ynote, .md-desc, .md-flavor, .vn-chapter, .live-console-tip
) { color: var(--ink2) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(
  .set-group h4, .modal-body h4, .story-text em, .modal-kicker, .skin-en,
  .menu-head, .menu-foot, .start-eyebrow, .start-meta, .vn-empty,
  .story-empty, .set-note, .skin-extra-note, .skin-foot
) { color: var(--muted) !important; }
/* 小色块：说话人、正文引号、系统提示、链接 */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(
  .story-text .speaker, .story-text p.speaker-line.dlg .speaker,
  .story-text .sys-line, .story-text .mention, .story-text .quote,
  .user-bubble .quote, .vn-speaker, .vn-text .quote, .panel-link,
  .menu-arrow, .menu-idx, .skin-eyebrow,
  .set-row .range-v, .char-card .cc-sigil, .live-dot
) { color: var(--neu-accent) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.story-text .quote, .user-bubble .quote, .vn-text .quote) { text-shadow: none !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .story-text .sys-line { border-left-color: var(--neu-accent) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .story-text p.dialogue:before { background: linear-gradient(180deg, var(--neu-glow), transparent) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .story-text p.scene-cue {
  background: var(--neu-surface) !important;
  border-left: 2px solid var(--neu-accent) !important;
  color: var(--muted) !important;
  box-shadow: var(--neu-raised-sm);
  border-radius: 0 8px 8px 0;
}

/* ---------- 8. 正文区 ---------- */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .story-main:before,
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .story-main:after { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .composer {
  background: var(--neu-surface) !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 0 18px 18px;
  box-shadow: inset 0 10px 18px -16px var(--neu-shadow) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .composer-box textarea { min-height: 46px; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .composer-box .send {
  background: var(--neu-fill) !important;
  background-image: none !important;
  color: var(--neu-fill-ink) !important;
  border: 0 !important;
  border-radius: 12px;
  box-shadow: var(--neu-raised-sm) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .composer-box .send i { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .user-bubble {
  background: var(--neu-surface) !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 14px;
  box-shadow: var(--neu-raised-sm) !important;
  padding: 12px 16px;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .story-row.ai:before {
  width: 2px;
  background: linear-gradient(180deg, var(--neu-accent), transparent) !important;
  box-shadow: none !important;
  opacity: 0.55;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .story-mark {
  border-radius: 50%;
  transform: none;
  width: 12px;
  height: 12px;
  border: 0;
  background: var(--neu-surface);
  box-shadow: 0 0 0 2px var(--neu-accent), var(--neu-raised-sm);
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .danmaku-item {
  background: var(--neu-surface) !important;
  background-image: none !important;
  border-left: 2px solid var(--neu-glow) !important;
  border-radius: 0 8px 8px 0;
  box-shadow: var(--neu-raised-sm);
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .buff {
  background: var(--neu-surface) !important;
  border: 0 !important;
  border-radius: 8px;
  box-shadow: var(--neu-raised-sm);
  color: var(--neu-accent) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .rail-btn:before { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .rail-btn { gap: 3px; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .rail-ico { color: var(--muted) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .rail-btn:hover .rail-ico,
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .rail-btn:hover b { color: var(--neu-accent) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .rail-btn b { color: var(--muted) !important; font-size: 8.5px; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .rail-btn:after { background: var(--neu-surface); border: 0; box-shadow: var(--neu-raised-sm); color: var(--neu-accent); border-radius: 8px; }

/* ---------- 9. 开始界面 ---------- */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .main-title {
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: var(--ink) !important;
  filter: none !important;
  animation: none !important;
  text-shadow: 2px 2px 5px var(--neu-title-dark), -2px -2px 5px var(--neu-title-light);
  letter-spacing: 0.1em;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .title-seal {
  border: 0;
  border-radius: 12px;
  background: var(--neu-surface);
  color: var(--neu-accent);
  box-shadow: var(--neu-raised);
  animation: none;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .title-seal:before { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .title-rule {
  background: linear-gradient(90deg, var(--neu-glow), transparent);
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .title-rule i { background: var(--neu-accent); box-shadow: 0 0 14px var(--neu-glow); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .start-eyebrow .hairline { background: linear-gradient(90deg, transparent, var(--neu-glow)); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .start-eyebrow .hairline:last-child { background: linear-gradient(90deg, var(--neu-glow), transparent); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .start-meta i { border-color: var(--neu-accent); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .start-menu {
  padding: 10px 12px 8px;
  border-radius: 22px;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .start-menu:before,
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .start-menu:after { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .menu-head,
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .menu-foot { padding-left: 12px; padding-right: 12px; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .menu-head i,
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .menu-foot i { background: var(--line2); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .menu-btn {
  border: 0 !important;
  border-radius: 14px;
  padding: 12px 14px 12px 16px;
  min-height: 70px;
  background: transparent !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .menu-btn:before { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .menu-btn:after { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .menu-btn:hover {
  background: var(--neu-surface) !important;
  box-shadow: var(--neu-raised-sm);
  padding-left: 20px;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .menu-btn:hover .menu-label strong { color: var(--neu-accent) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .menu-label strong { color: var(--ink) !important; font-weight: 400; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .menu-label small { color: var(--muted) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .menu-glyph { color: var(--muted) !important; opacity: 0.5; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .menu-arrow { color: var(--neu-accent) !important; }

/* ---------- 10. 视觉小说 ---------- */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .vn-stage { background: var(--deep) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.vn-bg, .vn-bg-next) { filter: saturate(0.45) contrast(1.02); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .vn-mountain { opacity: 0.3; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .vn-aura { opacity: 0.25; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .vn-title-bg { opacity: 0.14; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .vn-dialogue {
  background: var(--neu-surface) !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 18px;
  box-shadow: var(--neu-raised), 0 20px 50px var(--neu-shadow) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .vn-dialogue:before { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .vn-dialogue:after { display: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .vn-speaker { text-shadow: none !important; letter-spacing: 0.2em; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .vn-next-mark { color: var(--neu-accent); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .vn-empty { background: var(--neu-surface) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .vn-empty-actions button {
  border: 0 !important;
  border-radius: 10px;
  background: var(--neu-surface) !important;
  color: var(--ink2) !important;
  box-shadow: var(--neu-raised-sm);
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .vn-empty-actions button:hover { color: var(--neu-accent) !important; box-shadow: var(--neu-raised); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.vn-choices button, .story-choices button) {
  background: var(--neu-surface) !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: var(--neu-raised-sm) !important;
  color: var(--ink2) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.vn-choices button, .story-choices button):hover {
  color: var(--neu-accent) !important;
  box-shadow: var(--neu-raised), 0 0 0 1px var(--neu-glow) !important;
  transform: none;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.vn-choices button, .story-choices button):before { background: var(--neu-accent); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.vn-choices button, .story-choices button):after { color: var(--neu-accent); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .vn-controls {
  background: var(--neu-surface) !important;
  border: 0 !important;
  box-shadow: var(--neu-raised) !important;
  border-radius: 14px;
}

/* ---------- 11. 地图 / 角色 / 背包 / 任务 / 向导 ---------- */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .map-canvas {
  background: var(--neu-bg) !important;
  border: 0 !important;
  box-shadow: var(--neu-inset) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .map-node .mn-dot {
  border: 2px solid var(--neu-accent) !important;
  background: var(--neu-surface) !important;
  box-shadow: 0 0 0 4px var(--neu-glow) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .map-node .mn-dot:after { background: var(--neu-accent) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .map-node .mn-label {
  background: var(--neu-surface) !important;
  border: 0 !important;
  border-radius: 8px;
  box-shadow: var(--neu-raised-sm) !important;
  color: var(--ink2) !important;
  text-shadow: none !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .map-svg :is(line, circle, path) { stroke: var(--line2) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .map-legend i { background: var(--neu-accent) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .md-stats div {
  background: var(--neu-bg) !important;
  border: 0 !important;
  border-radius: 10px;
  box-shadow: var(--neu-inset-sm) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .md-tag {
  background: var(--neu-surface) !important;
  border: 0 !important;
  border-radius: 999px;
  box-shadow: var(--neu-raised-sm);
  color: var(--neu-accent) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.char-card, .task-card, .bag-item, .bond-card, .world-card) { overflow: hidden; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.char-card .cc-portrait, .cd-portrait, .player-avatar, .wiz-portrait, .bc-portrait) {
  border: 0 !important;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 30%, var(--neu-tint), transparent 70%), var(--neu-bg) !important;
  box-shadow: var(--neu-inset) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .char-card .cc-portrait:before { background: linear-gradient(180deg, transparent 46%, var(--neu-surface) 100%) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) :is(.cc-vertical, .cc-name, .cc-role, .cc-heart, .cd-portrait .cd-name, .cd-portrait .cd-id) { text-shadow: none !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .cd-tabs {
  background: var(--neu-bg) !important;
  border: 0 !important;
  box-shadow: var(--neu-inset-sm) !important;
  border-radius: 10px;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .cd-tabs button.on {
  background: var(--neu-surface) !important;
  color: var(--neu-accent) !important;
  box-shadow: var(--neu-raised-sm) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .wiz-progress i { background: var(--neu-accent) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .world-card:before { background: linear-gradient(160deg, transparent 42%, var(--neu-surface) 100%) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .world-card.on,
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .bond-card.on { box-shadow: var(--neu-raised), 0 0 0 2px var(--neu-accent) !important; }

/* ---------- 12. 其它 ---------- */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .toast {
  background: var(--neu-surface) !important;
  border: 0 !important;
  border-radius: 12px;
  box-shadow: var(--neu-raised);
  color: var(--ink2) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .toast-mark { background: var(--neu-accent); box-shadow: 0 0 10px var(--neu-glow); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .ymdq-orb {
  background: var(--neu-surface) !important;
  border: 0;
  color: var(--neu-accent);
  box-shadow: var(--neu-raised);
  backdrop-filter: none;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .ymdq-orb .orb-ring { border-color: var(--neu-glow); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .ymdq-orb .orb-ring:before { background: var(--neu-accent); box-shadow: 0 0 10px var(--neu-accent); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .pet-bubble {
  background: var(--neu-surface) !important;
  border: 0 !important;
  border-radius: 12px;
  box-shadow: var(--neu-raised-sm);
  color: var(--ink2) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .msg-raw { color: var(--ink2) !important; border-radius: 12px; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .live-shell :is(.live-top, .live-side, .live-console, .live-history, .live-preview, .live-ended-card, .live-hist-item) { border: 0 !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .live-stage { border: 0 !important; border-radius: 16px !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .live-stage-tags span {
  background: var(--neu-surface) !important;
  border: 0 !important;
  border-radius: 999px;
  color: var(--ink2) !important;
  box-shadow: var(--neu-raised-sm);
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .danmaku-input button { color: var(--neu-accent) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .forum-post { border: 0 !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .forum-post:hover { box-shadow: var(--neu-raised), 0 0 0 1px var(--neu-glow) !important; transform: none; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .fp-avatar, .ymdq[data-theme^="neu-"]:is(#ymdq-app) .fd-avatar, .ymdq[data-theme^="neu-"]:is(#ymdq-app) .fd-ra {
  border: 0 !important;
  background: var(--neu-bg) !important;
  color: var(--neu-accent) !important;
  box-shadow: var(--neu-inset-sm);
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .mem-row { border-bottom: 1px dashed var(--line) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .skin-card[data-skin="neu"] { background: var(--neu-surface) !important; box-shadow: var(--neu-raised) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .skin-card[data-skin="neu"]:hover { box-shadow: var(--neu-raised), 0 0 0 1px var(--neu-glow) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .skin-card[data-skin="neu"].on { box-shadow: var(--neu-raised), 0 0 0 1px var(--neu-accent) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .skin-modes { background: var(--neu-bg) !important; border: 0 !important; box-shadow: var(--neu-inset-sm); }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .skin-modes button.on { background: var(--neu-surface) !important; box-shadow: var(--neu-raised-sm); color: var(--ink) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .skin-try { background: var(--neu-surface) !important; color: var(--ink2) !important; border: 0 !important; box-shadow: var(--neu-raised-sm) !important; }
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .skin-try:hover { color: var(--ink) !important; box-shadow: var(--neu-raised), 0 0 0 1px var(--neu-accent) !important; }

/* 浅色底下的深色文字兜底：原生控件与占位符 */
.ymdq[data-theme^="neu-light"] ::placeholder { color: rgba(77, 87, 104, 0.4); }
.ymdq[data-theme^="neu-light"] .vn-bg { opacity: 0.9; }

/* ---------- 5.1 边角处补一点点主题色 ---------- */
/* 只落在图标、标签、进度、头像字这类小面积上，不碰整块面板。 */
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .rail-ico {
  color: color-mix(in srgb, var(--neu-accent) 58%, var(--ink2)) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .rail-btn:hover .rail-ico {
  color: var(--neu-accent) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .bag-item .bi-icon {
  color: var(--neu-accent) !important;
  border-color: color-mix(in srgb, var(--neu-accent) 30%, transparent) !important;
  background: color-mix(in srgb, var(--neu-accent) 7%, var(--neu-surface)) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .bag-item .bi-rarity {
  color: color-mix(in srgb, var(--neu-accent) 72%, var(--muted)) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .task-card .tc-kind {
  color: var(--neu-accent) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .task-card .tc-progress {
  color: color-mix(in srgb, var(--neu-accent) 76%, var(--ink2)) !important;
}
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .forum-post .fp-avatar i,
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .fd-avatar i,
.ymdq[data-theme^="neu-"]:is(#ymdq-app) .fd-ra i {
  color: var(--neu-accent) !important;
}
/* ==========================================================================
   一梦大千 · 4.5 美化主题面板
   三张横向风格卡纵向排列；每张卡自带风格缩略图、说明、配色圆点与「试穿」。
   排版与设置页其它地方同一套字号节奏：抬头 19px，正文 11px，注释 9.5px。
   新增风格不需要改这里：卡片由 Y.Themes.STYLES 生成，缩略图按 data-glyph 取样式。
   ========================================================================== */

.skin-pane { display: flex; flex-direction: column; gap: 18px; padding: 2px 2px 0; }

/* 美化主题比其它页多留一点高度，三张卡 + 玻璃细节一屏放得下 */
.settings-pane[data-tab="theme"] { max-height: min(640px, calc(90vh - 208px)); }

/* ---------- 抬头 ---------- */
.skin-intro { display: flex; flex-direction: column; gap: 9px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.skin-toprow { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.skin-eyebrow {
  display: flex; align-items: center; gap: 8px; flex: none;
  font: 500 8px/1 var(--latin); letter-spacing: 0.3em; color: var(--cyan) !important;
}
.skin-eyebrow i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }

.skin-now { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 9px; letter-spacing: 0.08em; }
.skin-now span { font: 500 7.5px/1 var(--latin); letter-spacing: 0.26em; color: var(--muted) !important; }
.skin-now b {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 400; letter-spacing: 0.1em;
  color: var(--ink) !important; white-space: nowrap;
}
.skin-now b:before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--acc, var(--cyan)); box-shadow: 0 0 7px var(--acc, var(--cyan)); }

.skin-intro h3 {
  margin: 1px 0 0; font-family: var(--serif); font-size: 18px; font-weight: 400;
  line-height: 1.6; letter-spacing: 0.1em; color: var(--ink) !important;
}
.skin-intro p {
  margin: 0; max-width: 640px; font-size: 11px; line-height: 2; letter-spacing: 0.02em;
  color: var(--ink2) !important; opacity: 0.72;
}

/* ---------- 风格卡 ---------- */
.skin-list { display: flex; flex-direction: column; gap: 14px; }

.skin-card {
  position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr);
  column-gap: 18px; align-items: start;
  padding: 16px 18px;
  border: 1px solid var(--line2); background: var(--panel2); color: var(--ink2);
  cursor: pointer; outline: none;
  transition: border-color 0.3s, box-shadow 0.35s, background 0.3s, transform 0.3s var(--ease);
}
.skin-card:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12); }
.skin-card:focus-visible { border-color: var(--acc); }
.skin-card.on {
  border-color: var(--acc) !important;
  background: var(--panel2);
  background: color-mix(in srgb, var(--acc) 7%, var(--panel2));
  box-shadow: inset 2px 0 0 var(--acc), 0 12px 30px rgba(0, 0, 0, 0.12);
}
.skin-card[data-skin="flat"] { border-radius: 2px; }
.skin-card[data-skin="glass"] {
  border-radius: 16px;
  background-image: linear-gradient(150deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.012) 58%);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}
.skin-card[data-skin="glass"]:not(.on) { border-color: rgba(255, 255, 255, 0.2); }
.skin-card[data-skin="neu"] {
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.skin-card[data-skin="neu"]:not(.on) { border-color: transparent; }
.skin-card[data-skin="neu"]:hover { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.05); }

/* 使用中：一颗小点 + 文字，不做胶囊 */
.skin-acts { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.skin-on {
  display: none; align-items: center; gap: 6px;
  font-size: 8.5px; letter-spacing: 0.18em; color: var(--ink) !important; white-space: nowrap;
}
.skin-on i { width: 4px; height: 4px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 6px var(--acc); }
.skin-card.on .skin-on { display: inline-flex; }

/* ---------- 卡片文字 ---------- */
.skin-body { flex: 1; min-width: 0; }
.skin-head { display: flex; align-items: center; gap: 12px; }
.skin-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.skin-name {
  font-family: var(--serif); font-size: 16px; font-weight: 500;
  line-height: 1.35; letter-spacing: 0.14em; color: var(--ink) !important;
}
.skin-en {
  font: 500 7.5px/1 var(--latin); letter-spacing: 0.28em;
  color: var(--muted) !important; opacity: 0.75;
}
.skin-desc {
  margin: 7px 0 15px; max-width: 620px;
  font-size: 11px; line-height: 1.85; letter-spacing: 0.02em;
  color: var(--ink2) !important; opacity: 0.72;
}

/* ---------- 配色 + 试穿 ---------- */
.skin-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.skin-dots { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.skin-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; padding: 0; background: none; border: 0; cursor: pointer;
}
.skin-dot i {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--dot, var(--cyan));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16), 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s var(--ease), outline-color 0.2s;
  outline: 1px solid transparent; outline-offset: 2px;
}
.skin-dot:hover i { transform: scale(1.16); }
.skin-dot.on i { outline-color: var(--dot); }
.skin-dot.is-off { display: none; }

/* 当前配色的名字：一条细线 + 色名 + 一句色相说明 */
.skin-pick {
  display: inline-flex; align-items: baseline; min-width: 0;
  font-size: 10.5px; letter-spacing: 0.1em; color: var(--ink2) !important; white-space: nowrap;
}
.skin-pick:before { content: ''; width: 14px; height: 1px; background: var(--line2); margin-right: 9px; align-self: center; }
.skin-pick b { font-weight: 400; color: var(--ink) !important; }
.skin-pick em { font-style: normal; font-size: 9.5px; color: var(--muted) !important; }
.skin-pick em:before { content: '·'; margin: 0 7px; }

/* 明暗切换（拟物态） */
.skin-modes {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  border: 1px solid var(--line2); border-radius: 999px;
}
.skin-modes button {
  padding: 3px 10px 4px; border: 0; border-radius: 999px; background: none;
  font-size: 9px; letter-spacing: 0.1em; color: var(--muted) !important; cursor: pointer;
  transition: color 0.24s, box-shadow 0.24s;
}
.skin-modes button:hover { color: var(--ink2) !important; }
.skin-modes button.on { color: var(--ink) !important; background: var(--line2); }

/* 试穿：一枚细描边的按钮 */
.skin-try {
  margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 15px 8px; border-radius: 999px; border: 1px solid var(--line2);
  background: transparent; color: var(--ink2) !important;
  font-size: 10px; line-height: 1; letter-spacing: 0.14em; white-space: nowrap; cursor: pointer;
  transition: background 0.26s, color 0.26s, box-shadow 0.26s, transform 0.26s;
}
.skin-try:hover { border-color: var(--acc); color: var(--ink) !important; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); }
.skin-try:active { transform: none; }

/* ---------- 风格缩略图 ---------- */
.skin-visual {
  position: relative; flex: none; width: 92px; height: 92px; overflow: hidden;
  --pv-bg: #0a1322; --pv-ink: rgba(255, 255, 255, 0.58); --pv-ink2: rgba(255, 255, 255, 0.22);
  --pv-line: rgba(255, 255, 255, 0.16);
}
.skin-card[data-mode="light"] .skin-visual {
  --pv-bg: #eef2f8; --pv-ink: rgba(40, 52, 68, 0.6); --pv-ink2: rgba(40, 52, 68, 0.2);
  --pv-line: rgba(40, 52, 68, 0.14);
}
.skin-visual .sg-top,
.skin-visual .sg-l1,
.skin-visual .sg-l2,
.skin-visual .sg-btn { position: absolute; display: block; }
.skin-visual .sg-top { left: 11px; right: 11px; top: 10px; height: 13px; background: var(--pv-ink2); }
.skin-visual .sg-l1 { left: 11px; top: 33px; width: 62%; height: 5px; background: var(--pv-ink); }
.skin-visual .sg-l2 { left: 11px; top: 45px; width: 44%; height: 5px; background: var(--pv-ink2); }
.skin-visual .sg-btn { left: 11px; bottom: 14px; width: 36px; height: 14px; background: var(--acc); }
.skin-visual:after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.18) 48%, transparent 64%);
  transform: translateX(-130%); transition: transform 0.9s var(--ease);
}
.skin-card:hover .skin-visual:after { transform: translateX(130%); }

/* 扁平化：硬边、色块、细描边 */
.skin-card[data-skin="flat"] .skin-visual { background: var(--pv-bg); border: 1px solid var(--pv-line); }
.skin-card[data-skin="flat"] .sg-top { height: 3px; top: 11px; background: var(--acc); opacity: 0.9; }

/* 液态玻璃：透光、圆角、亮边 */
.skin-card[data-skin="glass"] .skin-visual {
  border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.34);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.03) 58%), var(--pv-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 24px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(8px) saturate(150%); -webkit-backdrop-filter: blur(8px) saturate(150%);
}
.skin-card[data-skin="glass"] .sg-top { height: 17px; top: 9px; border-radius: 5px; background: rgba(255, 255, 255, 0.16); }
.skin-card[data-skin="glass"] .sg-l1,
.skin-card[data-skin="glass"] .sg-l2 { border-radius: 3px; }
.skin-card[data-skin="glass"] .sg-btn {
  height: 13px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.skin-card[data-skin="glass"] .sg-btn:after {
  content: ''; position: absolute; right: 7px; top: 4px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--acc); box-shadow: 0 0 6px var(--acc);
}

/* 拟物态：同色凸起 + 凹槽文字条 */
.skin-card[data-skin="neu"] .skin-visual {
  border-radius: 20px; background: var(--pv-bg);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 58%);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, 0.26), -6px -6px 14px rgba(255, 255, 255, 0.62);
}
.skin-card[data-skin="neu"][data-mode="dark"] .skin-visual {
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 58%);
  box-shadow: 6px 6px 14px rgba(0, 0, 0, 0.62), -6px -6px 14px rgba(255, 255, 255, 0.05);
}
.skin-card[data-skin="neu"] .sg-top { background: transparent; }
.skin-card[data-skin="neu"] .sg-l1,
.skin-card[data-skin="neu"] .sg-l2 {
  height: 6px; border-radius: 999px; background: var(--pv-bg);
  box-shadow: inset 1px 2px 4px rgba(40, 52, 68, 0.4), inset -1px -1px 3px rgba(255, 255, 255, 0.9);
}
.skin-card[data-skin="neu"][data-mode="dark"] .sg-l1,
.skin-card[data-skin="neu"][data-mode="dark"] .sg-l2 {
  background: #171a20;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9), inset 0 -1px 2px rgba(255, 255, 255, 0.07);
}
.skin-card[data-skin="neu"] .sg-btn {
  width: 40px; height: 15px; border-radius: 999px; background: var(--pv-bg);
  box-shadow: 2px 2px 6px rgba(40, 52, 68, 0.36), -2px -2px 6px rgba(255, 255, 255, 0.92);
}
.skin-card[data-skin="neu"][data-mode="dark"] .sg-btn {
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8), -2px -2px 6px rgba(255, 255, 255, 0.07);
}
.skin-card[data-skin="neu"] .sg-btn:after {
  content: ''; position: absolute; right: 10px; top: 4px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--acc); box-shadow: 0 0 7px var(--acc);
}

/* ---------- 玻璃细节 ---------- */
.skin-extra { grid-column: 1 / -1; display: none; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.skin-card.on[data-skin="glass"] .skin-extra { display: block; animation: skinFade 0.36s var(--ease) both; }
@keyframes skinFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.skin-extra-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px;
  font-size: 8.5px; letter-spacing: 0.14em; color: var(--muted) !important;
}
.skin-extra-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
.skin-slider {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'lab val' 'range range';
  gap: 6px 8px; align-items: center; cursor: pointer;
}
.skin-slider-lab { grid-area: lab; font-size: 9.5px; line-height: 1.3; color: var(--ink2) !important; }
.skin-slider input[type="range"] {
  grid-area: range; width: 100%; height: 3px; margin: 0;
  -webkit-appearance: none; appearance: none;
  border: 0; border-radius: 999px; background: var(--line2);
  accent-color: var(--acc);
}
.skin-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%;
  background: var(--acc); border: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 0 10px var(--acc);
  cursor: pointer;
}
.skin-slider input[type="range"]::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%; background: var(--acc);
  border: 0; box-shadow: 0 0 8px var(--acc); cursor: pointer;
}
.skin-slider-v { grid-area: val; font: 500 9.5px/1 var(--sans); letter-spacing: 0.02em; text-align: right; color: var(--ink2) !important; }
.skin-extra-note { margin: 6px 0 0; font-size: 8.5px; line-height: 1.7; color: var(--muted) !important; }

/* ---------- 页脚 ---------- */
.skin-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 1px; }
.skin-foot span { font-size: 9.5px; line-height: 1.8; letter-spacing: 0.02em; color: var(--muted) !important; }

/* ---------- 试穿层 ---------- */
.skin-try-layer { position: fixed; inset: 0; z-index: 2147483200; pointer-events: none; opacity: 0; transition: opacity 0.3s var(--ease); }
.skin-try-layer.on { opacity: 1; }
.skin-try-mask { position: absolute; inset: 0; pointer-events: auto; background: linear-gradient(180deg, rgba(0, 0, 0, 0.26), transparent 24%); }
.skin-trybar {
  position: absolute; left: 0; right: 0; top: 0; transform: translateY(-100%);
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 18px;
  border: 0; border-bottom: 1px solid var(--line2); background: var(--panel2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  transition: transform 0.34s var(--ease);
}
.skin-try-layer.on .skin-trybar { transform: none; }
.stb-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--cyan)); box-shadow: 0 0 12px var(--c, var(--cyan)); }
.stb-text { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.stb-text b { font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; color: var(--ink) !important; }
.stb-text em { font-style: normal; font-size: 11px; color: var(--cyan) !important; }
.stb-text i { font-style: normal; font-size: 8.5px; letter-spacing: 0.04em; color: var(--muted) !important; }
.stb-acts { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }

/* 浅色主题下玻璃卡的白色描边会看不见，换成主题线色 */
.ymdq[data-scheme="light"] .skin-pane .skin-card[data-skin="glass"]:not(.on) { border-color: var(--line2) !important; }

/* ---------- 兜底：压过各主题统一层的 color / border-color !important ---------- */
.skin-pane .skin-eyebrow { color: var(--cyan) !important; }
.skin-pane .skin-name { color: var(--ink) !important; }
.skin-pane .skin-en { color: var(--muted) !important; }
.skin-pane .skin-on { color: var(--ink) !important; }
.skin-pane .skin-desc { color: var(--ink2) !important; }
.skin-pane .skin-now span { color: var(--muted) !important; }
.skin-pane .skin-now b { color: var(--ink) !important; }
.skin-pane .skin-pick { color: var(--ink2) !important; }
.skin-pane .skin-pick b { color: var(--ink) !important; }
.skin-pane .skin-pick em { color: var(--muted) !important; }
.skin-pane .skin-modes button { color: var(--muted) !important; }
.skin-pane .skin-modes button:hover { color: var(--ink2) !important; }
.skin-pane .skin-modes button.on { color: var(--ink) !important; }
.skin-pane .skin-try { color: var(--ink2) !important; }
.skin-pane .skin-try:hover { color: var(--ink) !important; }
.skin-pane .skin-foot span { color: var(--muted) !important; }
.skin-pane .skin-extra-head { color: var(--muted) !important; }
.skin-pane .skin-extra-note { color: var(--muted) !important; }
.skin-pane .skin-slider-lab { color: var(--ink2) !important; }
.skin-pane .skin-slider-v { color: var(--ink2) !important; }
.skin-pane .skin-card { border-color: var(--line2) !important; }
.skin-pane .skin-card.on { border-color: var(--acc) !important; }
.skin-pane .skin-card[data-skin="glass"]:not(.on) { border-color: rgba(255, 255, 255, 0.2) !important; }
.skin-pane .skin-card[data-skin="neu"]:not(.on) { border-color: transparent !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .skin-toprow { flex-wrap: wrap; gap: 6px 14px; }
  .skin-now { width: auto; margin-left: auto; }
}
@media (max-width: 720px) {
  .skin-pane { gap: 15px; }
  .skin-card { grid-template-columns: 64px minmax(0, 1fr); column-gap: 13px; padding: 13px 13px 13px 12px; }
  .skin-visual { width: 64px; height: 64px; }
  .skin-visual .sg-top { left: 8px; right: 8px; top: 8px; height: 9px; }
  .skin-visual .sg-l1 { left: 8px; top: 24px; height: 4px; }
  .skin-visual .sg-l2 { left: 8px; top: 33px; height: 4px; }
  .skin-visual .sg-btn { left: 8px; bottom: 10px; width: 28px; height: 11px; }
  .skin-intro h3 { font-size: 16.5px; }
  .skin-intro p { font-size: 10.5px; line-height: 1.9; }
  .skin-name { font-size: 15px; }
  .skin-en { display: none; }
  .skin-desc { margin: 6px 0 12px; font-size: 10px; line-height: 1.8; }
  .skin-row { gap: 11px; }
  .skin-pick em { display: none; }
  .skin-dots { gap: 6px; }
  .skin-dot { width: 14px; height: 14px; }
  .skin-modes button { padding: 3px 8px; font-size: 8.5px; }
  .skin-extra-grid { gap: 6px 12px; }
  .skin-trybar { min-height: 52px; padding: 7px 11px; gap: 9px; flex-wrap: wrap; }
  .stb-text i { display: none; }
  .stb-acts { width: 100%; margin-left: 0; justify-content: flex-end; }
}

/* ==========================================================================
   一梦大千 · 5.0 联络系统（手机界面）
   全部颜色走主题变量；玻璃主题半透明，拟物态走凸起/凹槽。
   ========================================================================== */

/* ---------------- 外壳 ---------------- */
#ymdq-phone {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2, 6, 14, 0.44);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  opacity: 0; transition: opacity 0.32s var(--ease);
}
#ymdq-phone.on { opacity: 1; }
#ymdq-phone.hidden { display: none; }
.ph-shell {
  position: relative; display: flex; flex-direction: column;
  width: min(432px, calc(100vw - 32px)); height: min(880px, calc(100vh - 40px));
  background: var(--deep); color: var(--ink);
  border: 1px solid var(--line2); border-radius: 42px; overflow: hidden;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(0, 0, 0, 0.18);
  transform: translateY(12px) scale(0.985); opacity: 0;
  transition: transform 0.36s var(--ease), opacity 0.3s;
  font-family: var(--sans);
}
#ymdq-phone.shown .ph-shell { transform: none; opacity: 1; }
.ph-ico { width: 18px; height: 18px; display: inline-block; vertical-align: middle; flex: none; }

.ph-status {
  flex: none; height: 38px; display: flex; align-items: center; gap: 10px;
  padding: 0 22px; font-size: 10px; letter-spacing: 0.04em; color: var(--ink2);
  border-bottom: 1px solid var(--line);
}
.ph-st-time { font-weight: 600; color: var(--ink); white-space: nowrap; }
.ph-st-place { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ph-st-sys { display: inline-flex; align-items: center; gap: 5px; flex: none; opacity: 0.55; }
.ph-sig { width: 13px; height: 9px; display: block; background: linear-gradient(90deg, currentColor 0 60%, transparent 60%); clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.ph-bat { width: 16px; height: 8px; display: block; border: 1px solid currentColor; border-radius: 2px; position: relative; }
.ph-bat:after { content: ''; position: absolute; left: 1px; top: 1px; bottom: 1px; width: 9px; background: currentColor; border-radius: 1px; }

.ph-screen { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

/* 底部 Dock */
.ph-dock {
  flex: none; height: 70px; display: flex; align-items: center; justify-content: space-around;
  gap: 4px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--panel2);
}
.ph-dock-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 2px; border-radius: 14px; color: var(--muted); background: none; border: 0; cursor: pointer;
  transition: color 0.25s, background 0.25s;
}
.ph-dock-btn:hover, .ph-dock-btn.on { color: var(--cyan); background: var(--line); }
.ph-dock-ico { position: relative; display: inline-flex; }
.ph-dock-ico .ph-ico { width: 21px; height: 21px; }
.ph-dock-btn b { font-size: 9px; font-weight: 400; letter-spacing: 0.06em; }
.ph-badge {
  position: absolute; right: -7px; top: -6px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff; font: 600 8px/15px var(--sans);
  text-align: center; font-style: normal; display: none;
}
.ph-badge.show { display: block; }

/* ---------------- 首页 ---------------- */
.ph-home { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.ph-home > * { flex: 0 0 auto; }
.ph-home-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 2px 2px 0; }
.ph-hi { font-size: 15px; color: var(--ink); letter-spacing: 0.04em; }
.ph-home-date { font-size: 9.5px; color: var(--muted); }
.ph-widget {
  position: relative; display: block; width: 100%; text-align: left; border: 1px solid var(--line);
  background: var(--panel2); border-radius: 18px; overflow: hidden; cursor: pointer;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.ph-widget:hover { border-color: var(--line2); transform: translateY(-1px); }
.ph-photos { height: 186px; display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; }
.ph-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-photos img:first-child { grid-row: span 2; }
.ph-photos img:nth-child(n+4) { display: none; }
.ph-photos[data-count="1"] { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.ph-photos[data-count="1"] img:first-child { grid-row: auto; }
.ph-photos[data-count="2"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.ph-photos[data-count="2"] img:first-child { grid-row: auto; }
.ph-photo-empty { grid-column: 1 / -1; grid-row: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); background: linear-gradient(150deg, var(--deep2), var(--deep)); }
.ph-photo-empty .ph-ico { width: 28px; height: 28px; opacity: 0.6; }
.ph-photo-empty em { font-style: normal; font-size: 10px; line-height: 1.8; text-align: center; }
.ph-widget-cap { position: absolute; left: 12px; bottom: 10px; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.42); color: #fff; font-size: 9px; letter-spacing: 0.06em; }
.ph-widget-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ph-world, .ph-music { height: 104px; padding: 13px 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; cursor: default; }
.ph-world b, .ph-music b { font-size: 14px; font-weight: 500; color: var(--ink); letter-spacing: 0.04em; }
.ph-world small, .ph-music small { font-size: 9px; color: var(--muted); line-height: 1.6; }
.ph-w-cap { position: absolute; left: 14px; top: 12px; font-size: 8px; letter-spacing: 0.2em; color: var(--muted); }
.ph-music { cursor: pointer; }
.ph-music-eq { position: absolute; left: 14px; top: 14px; display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.ph-music-eq i { width: 2px; background: var(--cyan); animation: phEq 1.2s ease-in-out infinite; }
.ph-music-eq i:nth-child(1) { height: 40%; animation-delay: 0s; }
.ph-music-eq i:nth-child(2) { height: 90%; animation-delay: 0.15s; }
.ph-music-eq i:nth-child(3) { height: 60%; animation-delay: 0.3s; }
.ph-music-eq i:nth-child(4) { height: 100%; animation-delay: 0.45s; }
@keyframes phEq { 0%, 100% { transform: scaleY(0.4); opacity: 0.6; } 50% { transform: scaleY(1); opacity: 1; } }
.ph-moment-peek { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.ph-moment-peek-t { font-size: 8px; letter-spacing: 0.2em; color: var(--muted); }
.ph-moment-peek-b { font-size: 11px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-calltoast {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px;
  border: 1px solid var(--line2); background: var(--panel2); color: var(--ink); cursor: pointer;
  font-size: 10.5px; text-align: left;
}
.ph-calltoast-ava .ph-ava { width: 34px !important; height: 34px !important; }
.ph-calltoast b { font-weight: 500; }
.ph-calltoast em { margin-left: auto; color: var(--cyan); font-style: normal; font-size: 10px; }
.ph-unread {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 16px;
  border: 1px solid var(--line2); background: var(--panel2); color: var(--ink2); cursor: pointer; font-size: 10.5px; text-align: left;
}
.ph-unread b { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; padding: 0 5px; }
.ph-unread em { margin-left: auto; font-style: normal; color: var(--cyan); }
.ph-home-actions { display: flex; gap: 10px; margin-top: 2px; }
.ph-round { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--panel2); color: var(--ink2); cursor: pointer; }
.ph-round:hover { color: var(--cyan); border-color: var(--line2); }
.ph-home-hint { margin-top: auto; padding-top: 10px; font-size: 8.5px; line-height: 1.8; color: var(--muted); }

/* 最近联络 / 今日一句 */
.ph-startchat { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 18px; border: 1px dashed var(--line2); background: var(--panel2); color: var(--ink2); cursor: pointer; text-align: left; }
.ph-startchat .ph-ico { width: 22px; height: 22px; color: var(--cyan); flex: none; }
.ph-startchat span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ph-startchat b { font-size: 12.5px; font-weight: 500; color: var(--ink); }
.ph-startchat small { font-size: 9.5px; color: var(--muted); }
.ph-startchat em { margin-left: auto; font-style: normal; color: var(--cyan); }
.ph-recent { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel2); }
.ph-recent-t { font-size: 8px; letter-spacing: 0.2em; color: var(--muted); padding: 2px 4px 6px; }
.ph-recent-row { display: flex; align-items: center; gap: 9px; padding: 7px 4px; border: 0; border-radius: 12px; background: none; cursor: pointer; text-align: left; color: var(--ink); }
.ph-recent-row:hover { background: var(--line); }
.ph-recent-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ph-recent-main b { font-size: 12px; font-weight: 500; }
.ph-recent-main small { font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-recent-row em { font-style: normal; font-size: 8.5px; color: var(--muted); }
.ph-quote { padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(150deg, var(--deep2), var(--panel2)); }
.ph-quote span { font-size: 8px; letter-spacing: 0.2em; color: var(--muted); }
.ph-quote p { margin: 6px 0 0; font-size: 12px; line-height: 1.9; color: var(--ink2); font-family: var(--serif); letter-spacing: 0.04em; }

/* ---------------- 应用壳 ---------------- */
.ph-app, .ph-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ph-appbar {
  flex: none; height: 48px; display: flex; align-items: center; gap: 8px;
  padding: 0 12px; border-bottom: 1px solid var(--line);
}
.ph-back, .ph-appact { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 0; background: none; color: var(--ink2); cursor: pointer; }
.ph-back:hover, .ph-appact:hover { color: var(--cyan); background: var(--line); }
.ph-apptitle { font-size: 13px; font-weight: 500; letter-spacing: 0.06em; color: var(--ink); }
.ph-appfill { flex: 1; }
.ph-appbody { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 12px 16px; }
.ph-apptabs { flex: none; height: 58px; display: flex; border-top: 1px solid var(--line); background: var(--panel2); }
.ph-apptabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 9px; }
.ph-apptabs button.on { color: var(--cyan); }
.ph-tabico { position: relative; display: inline-flex; }
.ph-tabico .ph-ico { width: 20px; height: 20px; }
.ph-apptabs b { font-weight: 400; letter-spacing: 0.04em; }

/* 空状态 */
.ph-empty { margin: 8vh auto 0; max-width: 280px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--muted); }
.ph-empty-ico { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line2); color: var(--cyan); }
.ph-empty-ico .ph-ico { width: 24px; height: 24px; }
.ph-empty b { font-size: 13px; font-weight: 500; color: var(--ink2); letter-spacing: 0.06em; }
.ph-empty p { margin: 0; font-size: 10px; line-height: 1.9; }
.ph-empty.small { margin: 18px 0; }

/* 列表 */
.ph-chat-row {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 14px;
  border: 0; background: none; color: var(--ink); cursor: pointer; text-align: left;
}
.ph-chat-row:hover { background: var(--line); }
.ph-chat-row + .ph-chat-row { margin-top: 2px; }
.ph-chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ph-chat-main b { font-size: 13px; font-weight: 500; letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-chat-main small { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-chat-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ph-chat-side em { font-style: normal; font-size: 8.5px; color: var(--muted); }
.ph-chat-badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font: 600 9px/16px var(--sans); text-align: center; font-style: normal; }
.ph-chat-row.unread .ph-chat-main b { color: var(--ink); }
.ph-chat-pending { border: 1px solid var(--line2); background: var(--panel2); margin-bottom: 6px; }
.ph-chat-pending small { color: var(--cyan); }
.ph-list { display: flex; flex-direction: column; gap: 2px; }
.ph-contact-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 14px; border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); }
.ph-contact-row:hover { background: var(--line); }
.ph-contact-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ph-contact-main b { font-size: 13px; font-weight: 500; }
.ph-contact-main small { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-tag { font-style: normal; font-size: 8px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 6px; }
.ph-pin { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); margin-left: 5px; vertical-align: middle; }

/* 头像 */
.ph-ava { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; flex: none; border: 1px solid var(--line2); background: var(--deep2); }
.ph-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-ava-txt b { font-size: 0.42em; color: var(--ink); font-weight: 400; }
.ph-ava-txt { font-size: 30px; }
.ph-ava-group { border-radius: 16px; background: linear-gradient(150deg, var(--deep2), var(--deep)); color: var(--cyan); }

/* 朋友圈 */
.ph-discover-head { display: flex; gap: 8px; padding: 0 2px 10px; }
.ph-moments { display: flex; flex-direction: column; gap: 12px; }
.ph-moment { border: 1px solid var(--line); background: var(--panel2); border-radius: 16px; padding: 12px 12px 8px; }
.ph-mhead { display: flex; align-items: center; gap: 8px; }
.ph-mhead span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ph-mhead b { font-size: 11.5px; font-weight: 500; color: var(--ink); }
.ph-mhead small { font-size: 8.5px; color: var(--muted); }
.ph-mdel { margin-left: auto; width: 26px; height: 26px; border-radius: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.ph-mdel:hover { color: var(--danger); background: var(--line); }
.ph-mtext { margin: 8px 0 6px; font-size: 11.5px; line-height: 1.85; color: var(--ink2); white-space: pre-wrap; word-break: break-word; }
.ph-mimg { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin: 4px 0 6px; }
.ph-mimg img { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.ph-mimg span { display: block; padding: 6px 9px; font-size: 9px; color: var(--muted); background: var(--deep); }
.ph-mfoot { display: flex; gap: 4px; margin-top: 4px; }
.ph-mfoot button { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 999px; border: 0; background: none; color: var(--muted); font-size: 9.5px; cursor: pointer; }
.ph-mfoot button:hover { background: var(--line); color: var(--ink2); }
.ph-mfoot button.on { color: var(--rose); }
.ph-mfoot .ph-ico { width: 13px; height: 13px; }
.ph-mlikes { margin-top: 4px; padding: 7px 9px; border-radius: 10px; background: var(--deep); font-size: 9.5px; color: var(--ink2); line-height: 1.7; }
.ph-mlikes i { font-style: normal; color: var(--rose); margin-right: 4px; }
.ph-mcomments { margin-top: 4px; padding: 4px 9px 7px; border-radius: 10px; background: var(--deep); font-size: 9.5px; line-height: 1.9; color: var(--ink2); }
.ph-mcomments b { color: var(--cyan); font-weight: 400; }
.ph-cmt-row { display: none; gap: 6px; margin-top: 6px; }
.ph-cmt-row.on { display: flex; }
.ph-cmt-input { flex: 1; min-width: 0; padding: 7px 10px; font-size: 10px; border: 1px solid var(--line); background: var(--deep); color: var(--ink); border-radius: 10px; outline: none; }
.ph-cmt-send { flex: none; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel2); color: var(--cyan); font-size: 10px; cursor: pointer; }
.ph-cmt-send:disabled { opacity: 0.5; }

/* 我的 */
.ph-me { display: flex; flex-direction: column; gap: 14px; padding: 8px 2px; }
.ph-me-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel2); text-align: center; }
.ph-me-card b { font-size: 17px; font-weight: 500; color: var(--ink); letter-spacing: 0.06em; margin-top: 4px; }
.ph-me-card small { font-size: 10px; color: var(--ink2); }
.ph-me-card em { font-style: normal; font-size: 9px; color: var(--muted); }
.ph-me-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel2); }
.ph-me-list button { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink2); font-size: 11px; text-align: left; cursor: pointer; }
.ph-me-list button:last-child { border-bottom: 0; }
.ph-me-list button:hover { background: var(--line); color: var(--ink); }
.ph-me-list .ph-ico { width: 16px; height: 16px; color: var(--muted); }
.ph-note { margin: 0; font-size: 9px; line-height: 1.8; color: var(--muted); }

/* ---------------- 聊天 ---------------- */
.ph-chat-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ph-chat-title b { font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-chat-title small { font-size: 8.5px; color: var(--muted); }
.ph-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px 10px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.ph-chat-empty { margin: 12vh auto 0; font-size: 10px; color: var(--muted); }
.ph-timesep { align-self: center; margin: 4px 0; padding: 3px 9px; border-radius: 999px; background: var(--deep); color: var(--muted); font-size: 8.5px; letter-spacing: 0.04em; }
.ph-msg { display: flex; align-items: flex-start; gap: 8px; max-width: 100%; }
.ph-msg.me { flex-direction: row-reverse; }
.ph-msg .ph-ava { margin-top: 2px; }
.ph-stack { display: flex; flex-direction: column; gap: 4px; width: max-content; max-width: 74%; min-width: 0; flex: 0 1 auto; align-items: flex-start; }
.ph-msg.me .ph-stack { align-items: flex-end; }
.ph-bubble {
  position: relative; width: max-content; max-width: 100%; min-width: 42px; padding: 8px 11px 16px;
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--ink);
  font-size: 12.5px; line-height: 1.7; word-break: normal; overflow-wrap: anywhere;
  transition: border-color 0.2s;
}
.ph-msg.char .ph-bubble { border-top-left-radius: 4px; }
.ph-msg.me .ph-bubble { border-top-right-radius: 4px; background: var(--panel2); border-color: var(--line2); }
.ymdq[data-theme] .ph-msg.me .ph-bubble { background: color-mix(in srgb, var(--azure) 16%, var(--panel2)); }
.ph-who { display: none; font-size: 8.5px; color: var(--muted); margin-bottom: 2px; }
.ph-msg.group .ph-who { display: block; }
.ph-text { margin: 0; white-space: pre-wrap; overflow-wrap: normal; word-break: normal; }
.ph-bubble.bare { padding: 0; background: transparent; border: 0; }
#ymdq-phone .ph-bubble.bare { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.ph-bubble.bare .ph-who { display: none; }
.ph-bubble.bare .ph-meta { position: static; display: block; text-align: right; margin-top: 3px; }
.ph-edited { margin-left: 6px; font-style: normal; font-size: 8px; color: var(--muted); }
.ph-meta { position: absolute; right: 8px; bottom: 3px; font-size: 7.5px; color: var(--muted); opacity: 0.8; }
.ph-mact { position: absolute; right: -10px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-solid); color: var(--muted); opacity: 0; transition: opacity 0.2s; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ph-mact .ph-ico { width: 12px; height: 12px; }
.ph-msg:hover .ph-mact { opacity: 1; }
.ph-bubble .ph-ico { width: 16px; height: 16px; }

/* 语音条 */
.ph-voice { display: flex; flex-direction: column; gap: 4px; min-width: 128px; }
.ph-voice-bar { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--cyan); cursor: pointer; }
.ph-wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.ph-wave i { width: 2px; height: 30%; background: currentColor; border-radius: 2px; animation: phWave 1.1s ease-in-out infinite; animation-play-state: paused; }
.ph-wave i:nth-child(2) { height: 70%; animation-delay: 0.1s; }
.ph-wave i:nth-child(3) { height: 100%; animation-delay: 0.2s; }
.ph-wave i:nth-child(4) { height: 60%; animation-delay: 0.3s; }
.ph-wave i:nth-child(5) { height: 40%; animation-delay: 0.4s; }
.ph-voice.playing .ph-wave i { animation-play-state: running; }
@keyframes phWave { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }
.ph-voice-bar b { font-weight: 400; font-size: 10px; color: var(--muted); }
.ph-voice-txt { align-self: flex-start; border: 0; background: none; color: var(--muted); font-size: 8.5px; cursor: pointer; padding: 0; text-decoration: underline; }
.ph-voice-extra { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; padding: 0 3px; }
.ph-msg.me .ph-voice-extra { align-items: flex-end; }
.ph-voice-body { display: none; margin: 0; max-width: 230px; padding: 6px 9px; border-radius: 10px; background: var(--deep); border: 1px solid var(--line); font-size: 11.5px; color: var(--ink2); line-height: 1.7; }
.ph-voice-extra.show-text .ph-voice-body { display: block; }

/* 图片 / 位置 / 钱 */
.ph-imgmsg { display: flex; flex-direction: column; gap: 4px; }
.ph-imgmsg img { max-width: 200px; max-height: 240px; border-radius: 10px; display: block; border: 1px solid var(--line); }
.ph-imgmsg span { font-size: 9px; color: var(--muted); line-height: 1.6; }
.ph-locmsg { display: flex; gap: 8px; align-items: flex-start; min-width: 150px; }
.ph-locmsg .ph-ico { color: var(--cyan); margin-top: 2px; }
.ph-locmsg b { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink); }
.ph-locmsg small { font-size: 8.5px; color: var(--muted); }
.ph-moneymsg { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 170px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--deep); color: var(--ink); text-align: left; cursor: pointer; }
.ph-moneymsg.me { cursor: default; }
.ph-money-ico { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--line2); color: var(--gold); flex: none; }
.ph-moneymsg span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ph-moneymsg b { font-size: 10.5px; font-weight: 500; }
.ph-moneymsg small { font-size: 8px; color: var(--muted); }
.ph-moneymsg em { font-style: normal; font-size: 15px; color: var(--gold); }
.ph-moneymsg.redpacket em { color: var(--rose); }

/* 系统消息 / 通话 / 概要 */
.ph-sysmsg { align-self: center; max-width: 86%; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 12px; border-radius: 12px; background: var(--deep); color: var(--muted); font-size: 9px; line-height: 1.7; text-align: center; }
.ph-sysmsg button { border: 0; background: none; color: var(--muted); font-size: 9px; cursor: pointer; text-decoration: underline; }
.ph-callmsg { cursor: pointer; border: 1px solid var(--line); }
.ph-callmsg span { display: inline-flex; align-items: center; gap: 5px; color: var(--ink2); }
.ph-callmsg em { font-style: normal; color: var(--ink2); }
.ph-callmsg small { color: var(--muted); font-size: 8px; }
.ph-typing { align-self: flex-start; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel2); }
.ph-typing-dots { display: inline-flex; gap: 3px; }
.ph-typing-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); animation: phDot 1.2s ease-in-out infinite; }
.ph-typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.ph-typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes phDot { 0%, 100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }

/* 输入区 */
.ph-composer { flex: none; border-top: 1px solid var(--line); background: var(--panel2); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
.ph-compose-row { display: flex; align-items: flex-end; gap: 6px; }
.ph-compose-row .ph-cbtn, .ph-compose-row .ph-send { align-self: center; }
.ph-cbtn { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ph-cbtn.on { color: var(--cyan); border-color: var(--line2); background: var(--line); }
.ph-cbtn .ph-ico { width: 17px; height: 17px; }
#ymdq-phone .ph-input { min-height: 34px; }
.ph-input { flex: 1; min-width: 0; min-height: 34px; max-height: 96px; resize: none; padding: 8px 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--deep); color: var(--ink); font-size: 12.5px; line-height: 1.6; outline: none; }
.ph-input:focus { border-color: var(--line2); }
.ph-send { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 0; background: var(--azure); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ph-send .ph-ico { width: 18px; height: 18px; }
.ph-send:hover { filter: brightness(1.08); }
.ph-morepanel { display: none; position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--panel-solid); border-top: 1px solid var(--line); z-index: 3; }
.ph-morepanel.on { display: block; }
.ph-more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ph-more-grid button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink2); font-size: 9px; cursor: pointer; }
.ph-more-grid button:hover { color: var(--cyan); border-color: var(--line2); }
.ph-more-grid .ph-ico { width: 18px; height: 18px; }

/* ---------------- 资料页 ---------------- */
.ph-profile { flex: 1; min-height: 0; overflow-y: auto; }
.ph-profile-hero { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 30px 16px 20px; text-align: center; overflow: hidden; }
.ph-profile-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, var(--line2), transparent 62%), linear-gradient(160deg, var(--deep2), var(--deep)); opacity: 0.9; }
.ph-profile-hero > * { position: relative; }
.ph-profile-hero b { font-size: 19px; font-weight: 500; letter-spacing: 0.08em; color: var(--ink); margin-top: 4px; }
.ph-profile-hero small { font-size: 10px; color: var(--ink2); }
.ph-profile-hero em { font-style: normal; font-size: 9px; color: var(--muted); line-height: 1.7; max-width: 300px; }
.ph-profile-acts { display: flex; gap: 8px; padding: 14px 16px; flex-wrap: wrap; }
.ph-profile-acts .ph-btn { flex: 1; min-width: 92px; }
.ph-profile-card { margin: 0 16px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel2); }
.ph-profile-card > b { display: block; font-size: 10px; font-weight: 500; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 8px; }
.ph-profile-mo { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 10px; color: var(--ink2); }
.ph-profile-mo:last-child { border-bottom: 0; }
.ph-profile-mo small { color: var(--muted); flex: none; }

/* ---------------- 视频通话 ---------------- */
.ph-call { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--void); }
.ph-call-bg { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: radial-gradient(circle at 50% 34%, var(--line2), transparent 58%), linear-gradient(160deg, var(--deep2), var(--void)); }
.ph-call-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; filter: saturate(0.92) brightness(0.9); animation: phBreath 9s ease-in-out infinite; }
.ph-call-bg .ph-ava { margin-bottom: 26vh; }
.ph-call-blink { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 18%; opacity: 0; transition: opacity 0.12s; }
.ph-call-blink.on { opacity: 1; }
@keyframes phBreath { 0%, 100% { transform: scale(1) translateY(0); } 50% { transform: scale(1.02) translateY(-0.6%); } }
.ph-call-glow { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 30%, transparent 55%, rgba(0, 0, 0, 0.75)); }
.ph-call-empty { position: absolute; top: 34%; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--ink2); }
.ph-call-empty b { width: 132px; height: 132px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line2); background: var(--panel2); font-size: 52px; font-weight: 300; color: var(--cyan); }
.ph-call-empty i { font-style: normal; font-size: 20px; letter-spacing: 0.24em; color: var(--ink2); }
.ph-call-top { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 18px 12px 0; color: #fff; text-align: center; }
.ph-call-top b { font-size: 18px; font-weight: 500; letter-spacing: 0.1em; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6); }
.ph-call-top small { font-size: 9.5px; opacity: 0.7; }
.ph-call-top em { font-style: normal; font-size: 10px; letter-spacing: 0.14em; opacity: 0.8; margin-top: 2px; }
.ph-call-lines { position: relative; z-index: 2; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 20px 20px 14px; overflow-y: auto; }
.ph-call-lines p { align-self: flex-start; max-width: 82%; margin: 0; padding: 8px 13px; border-radius: 14px; background: rgba(0, 0, 0, 0.42); color: #fff; font-size: 12.5px; line-height: 1.75; backdrop-filter: blur(6px); animation: phLineIn 0.45s var(--ease) both; }
.ph-call-lines p.me { align-self: flex-end; background: rgba(255, 255, 255, 0.14); }
.ph-call-lines p.char { background: rgba(0, 0, 0, 0.44); }
.ph-call-hint { background: none !important; color: rgba(255, 255, 255, 0.6) !important; font-size: 10px !important; }
@keyframes phLineIn { from { opacity: 0; transform: translateY(8px) scale(0.98); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.ph-call-compose { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55)); }
.ph-call-hang { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: #c8444f; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ph-call-hang .ph-ico { width: 20px; height: 20px; }
.ph-call-input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.24); background: rgba(0, 0, 0, 0.42); color: #fff; font-size: 12px; outline: none; }
.ph-call-input::placeholder { color: rgba(255, 255, 255, 0.5); }
.ph-call-send { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.18); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ph-call.incoming .ph-call-bg img { filter: brightness(0.72); }
.ph-call.incoming { justify-content: space-between; padding-bottom: 30px; }
.ph-call-acts { position: relative; z-index: 2; display: flex; justify-content: center; gap: 48px; padding: 30px 0; }
.ph-call-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 66px; height: 66px; border-radius: 50%; border: 0; color: #fff; font-size: 10px; cursor: pointer; }
.ph-call-btn .ph-ico { width: 24px; height: 24px; }
.ph-call-btn b { font-weight: 400; }
.ph-call-btn.decline { background: #c8444f; }
.ph-call-btn.accept { background: #3aa76d; }

/* ---------------- 相机 ---------------- */
.ph-cam { display: flex; flex-direction: column; gap: 10px; }
.ph-cam-stage { position: relative; aspect-ratio: 3 / 4; max-height: 46vh; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(160deg, var(--deep2), var(--void)); display: flex; align-items: center; justify-content: center; }
.ph-cam-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-cam-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); }
.ph-cam-empty .ph-ico { width: 34px; height: 34px; opacity: 0.6; }
.ph-cam-empty b { font-size: 14px; font-weight: 500; color: var(--ink2); letter-spacing: 0.1em; }
.ph-cam-empty small { font-size: 9.5px; }
.ph-cam-desc { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 7px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 9px; line-height: 1.6; }
.ph-cam-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ph-cam-chips button { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink2); font-size: 9.5px; cursor: pointer; }
.ph-cam-chips button:hover { border-color: var(--line2); color: var(--cyan); }
.ph-cam-idea { width: 100%; min-height: 74px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--deep); color: var(--ink); font-size: 11.5px; line-height: 1.7; outline: none; resize: vertical; }
.ph-cam-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- 相册 ---------------- */
.ph-album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.ph-album-grid.small { grid-template-columns: repeat(3, 1fr); }
.ph-album-cell { position: relative; aspect-ratio: 3 / 4; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 0; background: var(--deep); cursor: pointer; }
.ph-album-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-album-cell span { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 6px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72)); color: #fff; font-size: 8px; text-align: left; line-height: 1.4; max-height: 46%; overflow: hidden; }
.ph-pin-mark { position: absolute; right: 4px; top: 4px; font-style: normal; font-size: 7px; padding: 2px 5px; border-radius: 999px; background: rgba(0, 0, 0, 0.5); color: #fff; }
.ph-photo-body { display: flex; flex-direction: column; gap: 10px; }
.ph-photo { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.ph-photo img { width: 100%; display: block; }
.ph-sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- 通用按钮 / 字段 ---------------- */
.ph-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink2); font-size: 10.5px; letter-spacing: 0.04em; cursor: pointer; }
.ph-btn:hover { color: var(--ink); border-color: var(--line2); background: var(--line); }
.ph-btn.primary { background: var(--azure); border-color: var(--azure); color: #fff; }
.ph-btn.primary:hover { filter: brightness(1.06); color: #fff; }
.ph-btn.ghost { background: transparent; }
.ph-btn.danger { color: var(--danger); border-color: var(--line2); }
.ph-btn:disabled { opacity: 0.5; cursor: default; }
.ph-btn.busy { opacity: 0.6; }
.ph-btn .ph-ico { width: 15px; height: 15px; }
.ph-para { margin: 0; font-size: 11.5px; line-height: 1.9; color: var(--ink2); white-space: pre-wrap; }
.ph-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.ph-field span { font-size: 9.5px; color: var(--muted); letter-spacing: 0.08em; }
.ph-field input { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--deep); color: var(--ink); font-size: 12px; outline: none; }
.ph-pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow-y: auto; margin-bottom: 10px; }
.ph-pick { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; cursor: pointer; }
.ph-pick:hover { background: var(--line); }
.ph-pick input { accent-color: var(--azure); }
.ph-pick span { font-size: 11.5px; color: var(--ink); }
.ph-pick small { font-size: 9px; color: var(--muted); margin-left: auto; }
.ph-picked { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; }
.ph-picked img { width: 42px; height: 54px; object-fit: cover; border-radius: 6px; }
.ph-picked span { flex: 1; font-size: 9.5px; color: var(--ink2); line-height: 1.5; }
.ph-picked button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--line); color: var(--muted); cursor: pointer; }
.ph-picked button .ph-ico { width: 12px; height: 12px; }

/* ---------------- 底部抽屉 ---------------- */
.ph-sheet-wrap { position: absolute; inset: 0; z-index: 9; display: flex; flex-direction: column; justify-content: flex-end; opacity: 0; transition: opacity 0.24s; }
.ph-sheet-wrap.on { opacity: 1; }
.ph-sheet-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.42); }
.ph-sheet { position: relative; max-height: 82%; display: flex; flex-direction: column; background: var(--panel-solid); border-top: 1px solid var(--line2); border-radius: 22px 22px 0 0; transform: translateY(24px); transition: transform 0.28s var(--ease); }
.ph-sheet-wrap.on .ph-sheet { transform: none; }
.ph-sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.ph-sheet-head b { font-size: 13px; font-weight: 500; color: var(--ink); letter-spacing: 0.06em; }
.ph-sheet-head button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.ph-sheet-body { overflow-y: auto; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); }
.ph-sheet-list { display: flex; flex-direction: column; gap: 2px; padding: 8px 8px 14px; }
.ph-sheet-list button { display: flex; align-items: center; gap: 8px; padding: 12px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink2); font-size: 11.5px; text-align: left; cursor: pointer; }
.ph-sheet-list button:hover { background: var(--line); color: var(--ink); }
.ph-sheet-list button.danger { color: var(--danger); }

/* ---------------- 主题适配 ---------------- */
.ymdq[data-theme^="liquid"] #ymdq-phone .ph-shell {
  background: rgba(var(--glass-tint), calc(var(--glass-alpha) + 0.34));
  backdrop-filter: blur(calc(var(--glass-blur) * 1.2)) saturate(150%);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 1.2)) saturate(150%);
}
.ymdq[data-theme^="liquid"] #ymdq-phone .ph-bubble,
.ymdq[data-theme^="liquid"] #ymdq-phone .ph-widget,
.ymdq[data-theme^="liquid"] #ymdq-phone .ph-chat-row:hover { backdrop-filter: blur(8px); }
.ymdq[data-theme^="neu-"] #ymdq-phone .ph-shell { background: var(--neu-surface); }
.ymdq[data-theme^="neu-"] #ymdq-phone .ph-widget,
.ymdq[data-theme^="neu-"] #ymdq-phone .ph-bubble,
.ymdq[data-theme^="neu-"] #ymdq-phone .ph-moment,
.ymdq[data-theme^="neu-"] #ymdq-phone .ph-me-card,
.ymdq[data-theme^="neu-"] #ymdq-phone .ph-me-list,
.ymdq[data-theme^="neu-"] #ymdq-phone .ph-dock { background: var(--neu-surface) !important; border-color: transparent !important; box-shadow: var(--neu-raised-sm); }
.ymdq[data-theme^="neu-"] #ymdq-phone .ph-msg.me .ph-bubble { background: color-mix(in srgb, var(--neu-accent) 12%, var(--neu-surface)) !important; }
.ymdq[data-theme^="neu-"] #ymdq-phone .ph-input,
.ymdq[data-theme^="neu-"] #ymdq-phone .ph-cmt-input,
.ymdq[data-theme^="neu-"] #ymdq-phone .ph-cam-idea { background: var(--neu-bg); border: 0; box-shadow: var(--neu-inset-sm); }
.ymdq[data-theme^="neu-"] #ymdq-phone .ph-send { background: var(--neu-fill); box-shadow: var(--neu-raised-sm); }
.ymdq[data-scheme="light"] #ymdq-phone { background: rgba(90, 105, 130, 0.3); }
.ymdq[data-scheme="light"] #ymdq-phone .ph-shell { box-shadow: 0 40px 100px rgba(60, 80, 110, 0.3), 0 0 0 8px rgba(255, 255, 255, 0.35); }

/* ---------------- 侧栏徽标 ---------------- */
.rail-btn .phone-badge {
  position: absolute; right: 5px; top: 5px; min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 999px; background: var(--danger); color: #fff; font: 600 7.5px/14px var(--sans);
  text-align: center; display: none; z-index: 2;
}
.rail-btn .phone-badge.show { display: block; }

/* ---------------- 手机端 ---------------- */
@media (max-width: 720px) {
  #ymdq-phone { align-items: stretch; justify-content: stretch; padding: 0; }
  .ph-shell { width: 100%; height: 100%; border-radius: 0; border: 0; box-shadow: none; }
  .ph-status { padding: 0 16px; }
  .ph-home { padding: 12px 14px 14px; }
  .ph-photos { height: 150px; }
  .ph-world, .ph-music { height: 92px; }
  .ph-bubble { max-width: 100%; font-size: 12.5px; }
  .ph-call-lines p { max-width: 88%; }
  .ph-profile-hero { padding-top: 22px; }
}
@media (max-height: 620px) {
  .ph-photos { height: 120px; }
  .ph-world, .ph-music { height: 82px; }
}

/* ---------------- 联络记忆管理 ---------------- */
.cmem-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.cmem-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); background: var(--panel2); border-radius: 12px; flex-wrap: wrap; }
.cmem-main { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 3px; }
.cmem-main b { font-size: 12px; font-weight: 400; color: var(--ink); letter-spacing: 0.04em; }
.cmem-main small { font-size: 9px; color: var(--muted); line-height: 1.6; }
.cmem-acts { display: flex; gap: 6px; flex-wrap: wrap; }
/* 5.1 建群：小方块多选 */
.ph-pick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; max-height: 44vh; overflow-y: auto; margin-bottom: 10px; padding: 2px; }
.ph-pick-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 7px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; min-width: 0; transition: border-color 0.2s, background 0.2s; }
.ph-pick-tile input { position: absolute; opacity: 0; pointer-events: none; }
.ph-pick-face .ph-ava { width: 44px !important; height: 44px !important; }
.ph-pick-tile b { font-size: 9.5px; font-weight: 400; color: var(--ink2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-pick-check { position: absolute; right: 4px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--azure); color: #fff; font-style: normal; font-size: 9px; line-height: 14px; text-align: center; opacity: 0; transition: opacity 0.2s; }
.ph-pick-tile:has(input:checked) { border-color: var(--azure); background: color-mix(in srgb, var(--azure) 12%, var(--panel2)); }
.ph-pick-tile:has(input:checked) .ph-pick-check { opacity: 1; }
.ph-pick-tile:has(input:focus-visible) { box-shadow: 0 0 0 2px color-mix(in srgb, var(--azure) 45%, transparent); }

/* 5.1 朋友圈点赞：主题色 */
.ph-mfoot button.ph-mlike.on { color: var(--cyan); }
.ph-mlike.on .ph-ico { fill: currentColor; }
/* 5.1 手机背景 / 主屏相册来源 */
.ph-wall { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ph-wall img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-wall:after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)); }
.ph-shell.has-wall { background: color-mix(in srgb, var(--deep) 70%, transparent); }
.ph-shell.has-wall .ph-status, .ph-shell.has-wall .ph-screen, .ph-shell.has-wall .ph-dock { position: relative; z-index: 1; }
.ymdq[data-scheme="light"] .ph-wall:after { background: linear-gradient(180deg, rgba(246, 251, 255, 0.58), rgba(226, 236, 246, 0.74)); }
.ymdq[data-theme^="liquid"] .ph-shell.has-wall { background: rgba(var(--glass-tint), calc(var(--glass-alpha) + 0.12)); }
.ymdq[data-theme^="neu-"] .ph-shell.has-wall { background: color-mix(in srgb, var(--neu-surface) 80%, transparent); }
.ph-photo-src { position: absolute; right: 10px; bottom: 8px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 11px; line-height: 1; border: 1px solid rgba(255, 255, 255, 0.28); }
.ph-photo-src:hover { background: rgba(0, 0, 0, 0.62); }
/* 5.1 相机：先整理、可编辑、再出图 */
.ph-cam-form { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ph-cam-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ph-cam-field.wide { grid-column: 1 / -1; }
.ph-cam-field span { font-size: 9px; color: var(--muted); letter-spacing: 0.08em; }
.ph-cam-field textarea { min-height: 44px; padding: 7px 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--deep); color: var(--ink); font-size: 11px; line-height: 1.6; resize: vertical; }
.ph-cam-prompt { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 9.5px; color: var(--muted); }
.ph-cam-prompt summary { cursor: pointer; }
.ph-cam-prompt p { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.7; color: var(--ink2); }
/* 5.2.1 手机背景多张选择 */
.ph-wall-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 2px 0 4px; }
.ph-wall-tile {
  position: relative; display: block; padding: 0; border: 1px solid var(--line); border-radius: 9px;
  overflow: hidden; background: var(--panel2); aspect-ratio: 9 / 14; cursor: pointer;
}
.ph-wall-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-wall-tile span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 4px;
  font-size: 8.5px; color: #eaf6ff; text-align: center;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
}
.ph-wall-tile.on { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.ph-wall-tile.on span { color: var(--cyan); }
.ph-wall-empty { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 8px; color: var(--muted); }
/* 一梦大千 · 5.2 封面音乐按钮与曲目菜单 */
.cover-bgm-ctl {
  position: absolute; right: clamp(20px, 5vw, 72px); bottom: 100px; z-index: 5;
  display: flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px;
  background: rgba(3, 10, 22, 0.42);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 30px rgba(0, 0, 0, 0.28);
  transition: opacity 0.3s, border-color 0.3s, background 0.3s;
}
.cover-bgm-ctl.off { opacity: 0.55; }
.cover-bgm-ctl.blocked .cb-play { animation: cbPulse 1.8s ease-in-out infinite; }
@keyframes cbPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(127, 231, 255, 0.25); } 50% { box-shadow: 0 0 0 4px rgba(127, 231, 255, 0.08); } }
.cb-track {
  display: flex; align-items: center; gap: 7px; padding: 3px 4px 3px 0;
  border: 0; background: none; color: rgba(233, 247, 255, 0.86); cursor: pointer; text-align: left;
}
.cb-track:hover { color: #fff; }
.cb-note { color: rgba(127, 231, 255, 0.75); font-size: 12px; line-height: 1; }
.cb-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cb-text b { font: 400 9.5px/1.15 var(--sans); letter-spacing: 0.08em; white-space: nowrap; }
.cb-text small { font: 400 7.5px/1.15 var(--sans); letter-spacing: 0.04em; color: rgba(180, 214, 235, 0.58); white-space: nowrap; }
.cb-play {
  width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1); color: rgba(240, 250, 255, 0.9);
  display: inline-flex; align-items: center; justify-content: center; font-size: 8px; line-height: 1; cursor: pointer;
}
.cb-play:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }

/* 拟物态 / 浅色玻璃 */
.ymdq[data-theme^="neu-"] .cover-bgm-ctl {
  background: var(--neu-surface) !important; border-color: transparent !important;
  box-shadow: var(--neu-raised-sm) !important;
}
.ymdq[data-theme^="neu-"] .cb-track { color: var(--ink2) !important; }
.ymdq[data-theme^="neu-"] .cb-text small { color: var(--muted) !important; }
.ymdq[data-theme^="neu-"] .cb-note { color: var(--neu-accent) !important; }
.ymdq[data-theme^="neu-"] .cb-play { color: var(--ink2) !important; border-color: var(--line2) !important; background: transparent !important; }
.ymdq[data-theme^="neu-"] .cb-play:hover { color: var(--neu-accent) !important; }
.ymdq[data-theme="frosted"] .cover-bgm-ctl {
  background: rgba(247, 252, 255, 0.88) !important; border-color: rgba(63, 127, 156, 0.32) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 12px 30px rgba(40, 70, 90, 0.14) !important;
}
.ymdq[data-theme="frosted"] .cb-track { color: #2e5c72 !important; }
.ymdq[data-theme="frosted"] .cb-text small { color: #5c7f91 !important; }
.ymdq[data-theme="frosted"] .cb-note { color: #1f6f8f !important; }
.ymdq[data-theme="frosted"] .cb-play { color: #2e5c72 !important; border-color: rgba(63, 127, 156, 0.32) !important; background: rgba(63, 127, 156, 0.08) !important; }
.ymdq[data-theme="frosted"] .cb-play:hover { color: #123f54 !important; }

.cover-bgm-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 10px; }
.cover-bgm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel2); color: var(--ink2); text-align: left; cursor: pointer;
}
.cover-bgm-row:hover { border-color: var(--line2); }
.cover-bgm-row.on { border-color: var(--cyan); }
.cover-bgm-row span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cover-bgm-row b { font-size: 11px; font-weight: 400; color: var(--ink); }
.cover-bgm-row small { font-size: 8.5px; color: var(--muted); }
.cover-bgm-row em { font-style: normal; font-size: 8.5px; color: var(--muted); flex: none; }
.cover-bgm-row.on em { color: var(--cyan); }

@media (max-width: 720px) {
  .cover-bgm-ctl { right: 10px; bottom: 82px; padding: 2px 3px 2px 8px; }
  .cb-play { width: 22px; height: 22px; }
  .cb-text b { font-size: 9px; }
  .cb-text small { display: none; }
}

/* 5.2 修正：左上角，可折叠；折叠后只留透明底音乐图标 */
.cover-bgm-ctl {
  top: 22px; left: 22px; right: auto; bottom: auto;
  padding: 3px 4px 3px 6px;
}
.cb-icon {
  width: 30px; height: 30px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: rgba(127, 231, 255, 0.8);
  font-size: 15px; line-height: 1; cursor: pointer; border-radius: 50%;
}
.cb-icon:hover { color: #fff; }
.cb-body { display: flex; align-items: center; gap: 2px; }
.cover-bgm-ctl.collapsed {
  background: transparent !important; border-color: transparent !important;
  box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  padding: 0;
}
.cover-bgm-ctl.collapsed .cb-body { display: none; }
.cover-bgm-ctl.collapsed .cb-icon { color: rgba(233, 247, 255, 0.72); }
.cover-bgm-ctl.collapsed .cb-note { display: none; }
.ymdq[data-theme^="neu-"] .cover-bgm-ctl.collapsed,
.ymdq[data-theme="frosted"] .cover-bgm-ctl.collapsed {
  background: transparent !important; box-shadow: none !important; border: 0 !important;
}
.ymdq[data-theme^="neu-"] .cover-bgm-ctl.collapsed .cb-icon { color: var(--neu-accent) !important; }
.ymdq[data-theme="frosted"] .cover-bgm-ctl.collapsed .cb-icon { color: #1f6f8f !important; }
@media (max-width: 720px) {
  .cover-bgm-ctl { top: 14px; left: 12px; right: auto; bottom: auto; }
  .cb-icon { width: 28px; height: 28px; font-size: 14px; }
}
/* ==========================================================================
   一梦大千 · Web 外壳样式
   --------------------------------------------------------------------------
   包含：邀请码门 / 模型连接页 / 图片处理协议弹窗 / 邀请码管理台
   仅供 app/shell/* 使用；与角色卡主样式（app/css/main.css）共用同一套配色，
   但不依赖 main.css —— 本文件可单独加载（管理台、预览页即如此）。

   约定：
   - 所有选择器以 ys- / ysc- / ysa- 前缀，或直接挂在 #ymdq-gate / #ymdq-consent
     / .ys-admin 之下，避免与原卡样式互相污染。
   - 按钮最小高度 44px，输入框最小高度 46px；移动端 360px 起可用。
   - 不依赖 hover：所有交互均有 focus-visible / :active 反馈。
   ========================================================================== */

:root {
  /* —— 原卡配色（与 app/css/main.css 顶部保持一致）—— */
  --cyan: #7fe7ff;
  --gold: #e8c98a;
  --pink: #ff9fbe;
  --azure: #4aa8ff;
  --blue: #2f6bff;
  --violet: #a98bff;
  --rose: #ff9fbe;
  --danger: #ff6d88;
  --ink: #e6f4ff;
  --ink2: #c5ddf0;
  --muted: #7f9db8;
  --dim: #58718a;
  --line: rgba(127, 231, 255, 0.14);
  --line2: rgba(127, 231, 255, 0.28);

  /* —— 外壳专用 —— */
  --shell-bg: rgba(4, 10, 20, 0.82);
  --shell-panel: linear-gradient(150deg, rgba(10, 26, 52, 0.86), rgba(4, 10, 20, 0.88) 46%, rgba(2, 8, 18, 0.93));
  --shell-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shell-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --shell-serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --shell-sans: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --shell-mono: 'JetBrains Mono', 'Cascadia Mono', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  --shell-latin: 'Cinzel', 'Optima', 'Times New Roman', serif;
}

/* ==========================================================================
   0. 基础
   ========================================================================== */

#ymdq-gate,
#ymdq-gate *,
#ymdq-consent,
#ymdq-consent *,
.ys-admin,
.ys-admin * {
  box-sizing: border-box;
}

#ymdq-gate [hidden],
#ymdq-consent [hidden],
.ys-admin [hidden],
.ys-admin-page #ymdq-admin-root [hidden] {
  display: none !important;
}

.ys-overlay :where(button),
.ys-admin :where(button) {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#ymdq-gate :focus-visible,
#ymdq-consent :focus-visible,
.ys-admin :focus-visible {
  outline: 2px solid rgba(127, 231, 255, 0.72);
  outline-offset: 2px;
}

#ymdq-gate ::selection,
#ymdq-consent ::selection,
.ys-admin ::selection {
  background: rgba(127, 231, 255, 0.28);
  color: #fff;
}

#ymdq-gate ::-webkit-scrollbar,
#ymdq-consent ::-webkit-scrollbar,
.ys-admin ::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
#ymdq-gate ::-webkit-scrollbar-thumb,
#ymdq-consent ::-webkit-scrollbar-thumb,
.ys-admin ::-webkit-scrollbar-thumb {
  background: rgba(127, 231, 255, 0.2);
}
#ymdq-gate ::-webkit-scrollbar-track,
#ymdq-consent ::-webkit-scrollbar-track,
.ys-admin ::-webkit-scrollbar-track {
  background: transparent;
}

/* ==========================================================================
   1. 全屏遮罩基座
   ========================================================================== */

.ys-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483640;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  color: var(--ink);
  font-family: var(--shell-serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: opacity 0.42s var(--shell-ease), visibility 0.42s;
}

.ys-overlay.ys-show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#ymdq-gate {
  z-index: 2147483640;
}

#ymdq-consent {
  z-index: 2147483645;
}

/* —— 背景层 —— */
.ys-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 8%, rgba(30, 87, 180, 0.22), transparent 34%),
    radial-gradient(circle at 84% 86%, rgba(111, 58, 190, 0.16), transparent 38%),
    linear-gradient(150deg, #02040a 0%, #041023 48%, #02050d 100%);
}

.ys-aurora {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.62;
  mix-blend-mode: screen;
  will-change: transform;
}
.ys-aurora-1 {
  width: 48vw;
  height: 48vw;
  left: -10%;
  top: 0;
  background: radial-gradient(circle, rgba(25, 92, 190, 0.3), transparent 66%);
  animation: ys-aurora-1 26s ease-in-out infinite alternate;
}
.ys-aurora-2 {
  width: 42vw;
  height: 42vw;
  right: -8%;
  top: 24%;
  background: radial-gradient(circle, rgba(112, 62, 200, 0.22), transparent 66%);
  animation: ys-aurora-2 32s ease-in-out infinite alternate;
}
.ys-aurora-3 {
  width: 36vw;
  height: 36vw;
  left: 30%;
  bottom: -18%;
  background: radial-gradient(circle, rgba(20, 130, 170, 0.18), transparent 66%);
  animation: ys-aurora-3 38s ease-in-out infinite alternate;
}
@keyframes ys-aurora-1 { to { transform: translate3d(8%, 6%, 0) scale(1.14); } }
@keyframes ys-aurora-2 { to { transform: translate3d(-9%, -5%, 0) scale(1.1); } }
@keyframes ys-aurora-3 { to { transform: translate3d(5%, -8%, 0) scale(1.18); } }

.ys-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(90, 160, 220, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 160, 220, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 10%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 45%, #000 10%, transparent 78%);
}

.ys-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.ys-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 36%, rgba(0, 2, 8, 0.6) 100%);
}

.ys-watermark {
  position: absolute;
  right: -2vw;
  bottom: -10vh;
  font-family: var(--shell-serif);
  font-size: min(48vw, 620px);
  line-height: 0.8;
  color: rgba(127, 231, 255, 0.028);
  pointer-events: none;
  user-select: none;
}

/* ==========================================================================
   2. 邀请码门 / 模型连接页
   ========================================================================== */

.ys-scroll {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(14px, 4vh, 54px) 16px;
  -webkit-overflow-scrolling: touch;
}

.ys-card {
  position: relative;
  width: min(560px, 100%);
  margin: auto;
  padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 42px) clamp(16px, 3vw, 24px);
  background: var(--shell-panel);
  border: 1px solid rgba(127, 231, 255, 0.16);
  box-shadow:
    var(--shell-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.ys-card.ys-card-api {
  width: min(620px, 100%);
}

.ys-card::before {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 231, 255, 0.62), transparent);
  pointer-events: none;
}

.ys-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 18%;
  width: 2px;
  height: 22%;
  background: var(--cyan);
  opacity: 0.42;
  box-shadow: 0 0 18px var(--cyan);
  pointer-events: none;
}

/* 四角描边（复用原卡的 corner-frame 视觉） */
.ys-frame {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  opacity: 0.85;
  background:
    linear-gradient(var(--line2), var(--line2)) left top / 14px 1px no-repeat,
    linear-gradient(var(--line2), var(--line2)) left top / 1px 14px no-repeat,
    linear-gradient(var(--line2), var(--line2)) right top / 14px 1px no-repeat,
    linear-gradient(var(--line2), var(--line2)) right top / 1px 14px no-repeat,
    linear-gradient(var(--line2), var(--line2)) left bottom / 14px 1px no-repeat,
    linear-gradient(var(--line2), var(--line2)) left bottom / 1px 14px no-repeat,
    linear-gradient(var(--line2), var(--line2)) right bottom / 14px 1px no-repeat,
    linear-gradient(var(--line2), var(--line2)) right bottom / 1px 14px no-repeat;
}

/* —— 头部品牌区 —— */
.ys-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 20px);
}

.ys-mark {
  position: relative;
  flex: none;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(127, 231, 255, 0.24);
  transform: rotate(-4deg);
  background: radial-gradient(circle at 50% 40%, rgba(47, 107, 255, 0.16), transparent 72%);
  box-shadow: 0 0 26px rgba(74, 168, 255, 0.12), inset 0 0 18px rgba(74, 168, 255, 0.08);
}
.ys-mark b {
  font-family: var(--shell-serif);
  font-size: 23px;
  font-weight: 400;
  color: rgba(196, 240, 255, 0.86);
  text-shadow: 0 0 18px rgba(127, 231, 255, 0.4);
}
.ys-mark-ring {
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(127, 231, 255, 0.1);
  border-top-color: rgba(127, 231, 255, 0.44);
  border-radius: 2px;
  animation: ys-spin 16s linear infinite;
}
@keyframes ys-spin { to { transform: rotate(360deg); } }

.ys-head-text {
  min-width: 0;
  flex: 1;
}

.ys-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(141, 198, 232, 0.6);
  font: 500 9px/1 var(--shell-latin);
  letter-spacing: 0.28em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ys-hair {
  flex: none;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, rgba(127, 231, 255, 0.5), transparent);
}

.ys-title {
  margin: 9px 0 0;
  font-family: var(--shell-serif);
  font-weight: 400;
  font-size: clamp(30px, 4.8vw, 42px);
  line-height: 1.08;
  letter-spacing: 0.18em;
  white-space: nowrap;
  background: linear-gradient(108deg, #f3fbff 6%, #b9ecff 24%, #ffffff 40%, #6fc6ff 58%, #d8f1ff 78%, #8fd4ff 94%);
  background-size: 230% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(67, 153, 255, 0.22));
  animation: ys-title-flow 9s linear infinite;
}
@keyframes ys-title-flow { to { background-position: 230% 0; } }

.ys-sub {
  margin: 8px 0 0;
  font-size: 12px;
  letter-spacing: 0.34em;
  color: rgba(170, 208, 232, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ys-close {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(127, 231, 255, 0.16);
  background: rgba(3, 12, 28, 0.6);
  color: rgba(180, 210, 232, 0.72);
  font-size: 22px;
  line-height: 1;
  transition: color 0.3s, border-color 0.3s, transform 0.3s;
}
.ys-close:active { transform: scale(0.94); }
@media (hover: hover) {
  .ys-close:hover { color: var(--cyan); border-color: rgba(127, 231, 255, 0.5); }
}

.ys-head .ys-close { right: -6px; top: -6px; }

.ys-rule {
  position: relative;
  height: 1px;
  margin: clamp(16px, 3vw, 24px) 0 clamp(14px, 2.6vw, 20px);
  background: linear-gradient(90deg, rgba(127, 231, 255, 0.46), rgba(127, 231, 255, 0.04));
  overflow: visible;
}
.ys-rule i {
  position: absolute;
  left: 0;
  top: -1px;
  width: 64px;
  height: 3px;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
  animation: ys-rule-sweep 6s var(--shell-ease) infinite;
}
@keyframes ys-rule-sweep {
  0%, 100% { transform: translateX(0); opacity: 0.9; }
  50% { transform: translateX(min(320px, 60vw)); opacity: 0.42; }
}

/* —— 视图 —— */
.ys-view {
  position: relative;
  z-index: 1;
}

.ys-view-inner {
  animation: ys-rise 0.42s var(--shell-ease) both;
}
@keyframes ys-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ys-lead {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.95;
  letter-spacing: 0.04em;
  color: rgba(196, 224, 242, 0.76);
}

/* —— 表单 —— */
.ys-field {
  display: block;
}
.ys-field + .ys-field {
  margin-top: 16px;
}

.ys-label {
  display: block;
  margin-bottom: 8px;
  font: 500 11px/1.4 var(--shell-sans);
  letter-spacing: 0.2em;
  color: rgba(190, 224, 245, 0.78);
}

.ys-input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  font: 400 14px/1.5 var(--shell-sans);
  color: var(--ink);
  background: rgba(3, 12, 28, 0.72);
  border: 1px solid rgba(127, 231, 255, 0.16);
  border-radius: 0;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  -webkit-appearance: none;
  appearance: none;
}
.ys-input::placeholder {
  color: rgba(127, 157, 184, 0.5);
}
.ys-input:focus {
  border-color: rgba(127, 231, 255, 0.62);
  background: rgba(4, 16, 36, 0.86);
  box-shadow: 0 0 0 1px rgba(127, 231, 255, 0.1), 0 0 26px rgba(47, 107, 255, 0.16);
}
.ys-input[aria-invalid="true"] {
  border-color: rgba(255, 109, 136, 0.55);
}

.ys-input-wrap {
  position: relative;
}
.ys-input-glow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 231, 255, 0.55), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.ys-input-wrap:focus-within .ys-input-glow {
  opacity: 1;
}

.ys-input-code {
  font-family: var(--shell-mono);
  font-size: 17px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}

.ys-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

/* —— 按钮 —— */
.ys-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid rgba(127, 231, 255, 0.2);
  background: rgba(9, 26, 52, 0.36);
  color: var(--ink);
  font: 400 13px/1.2 var(--shell-sans);
  letter-spacing: 0.14em;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.2s, color 0.3s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.ys-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.12) 48%, transparent 72%);
  transition: transform 0.7s;
  pointer-events: none;
}
.ys-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.ys-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ys-btn-primary {
  border-color: rgba(127, 231, 255, 0.46);
  background: linear-gradient(110deg, rgba(25, 86, 174, 0.62), rgba(12, 38, 80, 0.52));
  color: #f0fbff;
}
.ys-btn-primary::before {
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.16) 48%, transparent 72%);
}

.ys-btn-ghost {
  border-color: rgba(127, 157, 184, 0.2);
  background: rgba(6, 16, 34, 0.28);
  color: rgba(198, 220, 236, 0.88);
}

.ys-btn-wide {
  width: 100%;
  margin-top: 18px;
  min-height: 48px;
  font-size: 14px;
  letter-spacing: 0.24em;
}

.ys-btn-arrow {
  font-family: var(--shell-sans);
  transition: transform 0.3s;
}

@media (hover: hover) {
  .ys-btn:hover:not(:disabled) {
    border-color: rgba(127, 231, 255, 0.66);
    box-shadow: 0 0 26px rgba(47, 135, 255, 0.2);
  }
  .ys-btn:hover:not(:disabled)::before {
    transform: translateX(120%);
  }
  .ys-btn-primary:hover:not(:disabled) {
    background: linear-gradient(110deg, rgba(33, 104, 200, 0.72), rgba(15, 47, 98, 0.62));
  }
  .ys-btn:hover:not(:disabled) .ys-btn-arrow {
    transform: translateX(3px);
  }
}

.ys-btn.ys-loading {
  pointer-events: none;
  color: rgba(230, 244, 255, 0.86);
}
.ys-btn.ys-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  flex: none;
  border: 1px solid rgba(127, 231, 255, 0.3);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: ys-spin 0.8s linear infinite;
}

.ys-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.ys-actions .ys-btn {
  min-width: 130px;
}

/* —— 错误 / 状态 / 提示 —— */
.ys-error {
  margin: 14px 0 0;
  padding: 9px 12px;
  border-left: 2px solid rgba(255, 109, 136, 0.72);
  background: rgba(255, 109, 136, 0.07);
  font: 400 12px/1.75 var(--shell-sans);
  letter-spacing: 0.02em;
  color: #ffc2cf;
  animation: ys-rise 0.3s var(--shell-ease) both;
}

.ys-status {
  margin: 14px 0 0;
  padding: 9px 12px;
  border-left: 2px solid rgba(127, 231, 255, 0.55);
  background: rgba(47, 107, 255, 0.08);
  font: 400 12px/1.75 var(--shell-sans);
  color: rgba(210, 238, 252, 0.88);
  animation: ys-rise 0.3s var(--shell-ease) both;
}
.ys-status-ok {
  border-left-color: rgba(127, 231, 255, 0.8);
  background: rgba(47, 135, 255, 0.12);
  color: #d5f5ff;
}
.ys-status-bad {
  border-left-color: rgba(255, 109, 136, 0.72);
  background: rgba(255, 109, 136, 0.07);
  color: #ffc2cf;
}
.ys-status-wait {
  color: rgba(214, 236, 250, 0.78);
}

.ys-insecure {
  margin: 14px 0 0;
  padding: 8px 12px;
  border: 1px dashed rgba(232, 201, 138, 0.4);
  background: rgba(232, 201, 138, 0.06);
  font: 400 11.5px/1.7 var(--shell-sans);
  color: rgba(232, 201, 138, 0.9);
}
.ys-insecure::before {
  content: '⚠';
  margin-right: 7px;
  font-family: var(--shell-sans);
}

.ys-note {
  margin: 16px 0 0;
  font: 400 11px/1.85 var(--shell-sans);
  letter-spacing: 0.02em;
  color: rgba(127, 157, 184, 0.62);
}

.ys-mock {
  margin: 14px 0 0;
  padding: 8px 12px;
  border: 1px dashed rgba(232, 201, 138, 0.34);
  font: 400 11px/1.7 var(--shell-sans);
  color: rgba(232, 201, 138, 0.82);
}

/* —— 预设地址 —— */
.ys-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ys-chip {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid rgba(127, 231, 255, 0.16);
  background: rgba(4, 14, 30, 0.55);
  color: rgba(186, 216, 236, 0.78);
  font: 400 12px/1.2 var(--shell-sans);
  letter-spacing: 0.06em;
  transition: border-color 0.25s, color 0.25s, background 0.25s, box-shadow 0.25s;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}
.ys-chip:active {
  transform: translateY(1px);
}
.ys-chip-active {
  border-color: rgba(127, 231, 255, 0.56);
  background: rgba(31, 96, 180, 0.28);
  color: #eafaff;
  box-shadow: 0 0 18px rgba(47, 135, 255, 0.16), inset 0 0 12px rgba(127, 231, 255, 0.06);
}
@media (hover: hover) {
  .ys-chip:hover {
    border-color: rgba(127, 231, 255, 0.44);
    color: #eafaff;
  }
}

/* —— 模型列表 —— */
.ys-models {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  max-height: 150px;
  overflow-y: auto;
  padding: 2px 2px 2px 0;
}

.ys-model-chip {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(127, 231, 255, 0.12);
  background: rgba(3, 12, 26, 0.5);
  color: rgba(180, 212, 234, 0.78);
  font: 400 11px/1.4 var(--shell-mono);
  letter-spacing: 0.02em;
  text-align: left;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.ys-model-chip:active { transform: translateY(1px); }
.ys-model-active {
  border-color: rgba(127, 231, 255, 0.56);
  background: rgba(31, 96, 180, 0.24);
  color: #eafaff;
}
@media (hover: hover) {
  .ys-model-chip:hover { border-color: rgba(127, 231, 255, 0.4); color: #eafaff; }
}

.ys-row .ys-input {
  min-height: 46px;
}
.ys-row-btn {
  min-height: 46px;
  letter-spacing: 0.08em;
}

/* —— 模型页头部 —— */
.ys-view-head {
  margin-bottom: 18px;
}
.ys-view-title {
  margin: 0;
  font-family: var(--shell-serif);
  font-size: clamp(17px, 3vw, 20px);
  font-weight: 400;
  letter-spacing: 0.16em;
  color: rgba(230, 247, 255, 0.94);
}
.ys-view-desc {
  margin: 9px 0 0;
  font: 400 11.5px/1.85 var(--shell-sans);
  letter-spacing: 0.02em;
  color: rgba(160, 192, 214, 0.66);
}

/* —— 底部小字 —— */
.ys-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(16px, 3vw, 24px);
  padding-top: 14px;
  border-top: 1px solid rgba(127, 231, 255, 0.07);
  font: 400 9.5px/1.4 var(--shell-sans);
  letter-spacing: 0.28em;
  color: rgba(127, 157, 184, 0.48);
  text-align: center;
}
.ys-foot-line {
  flex: 1;
  max-width: 62px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 231, 255, 0.28));
}
.ys-foot-line.r {
  background: linear-gradient(90deg, rgba(127, 231, 255, 0.28), transparent);
}

/* @supports：不支持毛玻璃时提高不透明度，保证可读 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ys-card {
    background: linear-gradient(150deg, rgba(8, 22, 44, 0.98), rgba(2, 8, 18, 0.98));
  }
}

/* ==========================================================================
   3. 图片处理协议弹窗
   ========================================================================== */

.ys-consent {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 16px;
}

.ysc-mask {
  position: absolute;
  inset: 0;
  background: rgba(1, 5, 14, 0.78);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.ysc-wrap {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
  margin: auto;
}

.ysc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: clamp(22px, 4vw, 34px);
  background: linear-gradient(160deg, rgba(9, 24, 48, 0.97), rgba(3, 9, 20, 0.98));
  border: 1px solid rgba(127, 231, 255, 0.18);
  box-shadow: var(--shell-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  animation: ys-rise 0.4s var(--shell-ease) both;
}
.ysc-card::before {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 201, 138, 0.5), transparent);
  pointer-events: none;
}

.ysc-kicker {
  font: 500 9px/1 var(--shell-sans);
  letter-spacing: 0.32em;
  color: rgba(232, 201, 138, 0.68);
}

.ysc-title {
  margin: 10px 0 0;
  font-family: var(--shell-serif);
  font-size: clamp(19px, 3.8vw, 25px);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: #eefaff;
}

.ysc-rule {
  position: relative;
  height: 1px;
  margin: 16px 0 14px;
  background: linear-gradient(90deg, rgba(127, 231, 255, 0.4), rgba(127, 231, 255, 0.03));
}
.ysc-rule i {
  position: absolute;
  left: 0;
  top: -1px;
  width: 46px;
  height: 2px;
  background: var(--gold);
  opacity: 0.72;
  box-shadow: 0 0 14px rgba(232, 201, 138, 0.5);
}

.ysc-body {
  overflow-y: auto;
  margin: 2px 0 0;
  padding-right: 6px;
  overscroll-behavior: contain;
}

.ysc-p {
  margin: 0 0 11px;
  font: 400 13px/1.95 var(--shell-sans);
  letter-spacing: 0.015em;
  color: rgba(190, 218, 236, 0.84);
}
.ysc-p:last-child {
  margin-bottom: 0;
}

.ysc-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid rgba(127, 231, 255, 0.1);
  min-height: 44px;
  cursor: pointer;
}

.ysc-check-input {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ysc-check-box {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1px solid rgba(127, 231, 255, 0.38);
  background: rgba(3, 12, 28, 0.82);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.ysc-check-box::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 7px;
  height: 12px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(42deg) scale(0);
  transform-origin: center;
  transition: transform 0.18s var(--shell-ease);
}
.ysc-check-input:checked + .ysc-check-box {
  border-color: rgba(127, 231, 255, 0.86);
  background: rgba(47, 107, 255, 0.22);
  box-shadow: 0 0 18px rgba(127, 231, 255, 0.22);
}
.ysc-check-input:checked + .ysc-check-box::after {
  transform: rotate(42deg) scale(1);
}
.ysc-check-input:focus-visible + .ysc-check-box {
  outline: 2px solid rgba(127, 231, 255, 0.72);
  outline-offset: 2px;
}

.ysc-check-text {
  font: 400 13px/1.85 var(--shell-sans);
  letter-spacing: 0.015em;
  color: rgba(222, 240, 252, 0.92);
}

.ysc-foot {
  margin-top: 18px;
}

.ysc-footnote {
  margin: 0;
  font: 400 11px/1.8 var(--shell-sans);
  letter-spacing: 0.04em;
  color: rgba(127, 157, 184, 0.66);
}

.ysc-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.ysc-actions .ys-btn {
  min-width: 118px;
}

/* ==========================================================================
   4. 邀请码管理台（独立页面）
   ========================================================================== */

.ys-admin-page {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--shell-serif);
  background:
    radial-gradient(circle at 16% 6%, rgba(30, 87, 180, 0.22), transparent 36%),
    radial-gradient(circle at 86% 88%, rgba(111, 58, 190, 0.16), transparent 40%),
    linear-gradient(150deg, #02040a 0%, #041023 48%, #02050d 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.ys-noscript {
  margin: 40px auto;
  max-width: 520px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 109, 136, 0.3);
  color: #ffc2cf;
  font: 400 13px/1.8 var(--shell-sans);
}

.ys-admin {
  position: relative;
  z-index: 1;
}

.ysa-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* —— 顶栏 —— */
.ysa-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px clamp(14px, 4vw, 40px);
  border-bottom: 1px solid rgba(127, 231, 255, 0.1);
  background: rgba(3, 10, 22, 0.6);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.ysa-top::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 231, 255, 0.24), transparent);
  pointer-events: none;
}

.ysa-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ysa-brand-mark {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(127, 231, 255, 0.26);
  color: rgba(196, 240, 255, 0.86);
  font-size: 19px;
  transform: rotate(-4deg);
  background: radial-gradient(circle at 50% 40%, rgba(47, 107, 255, 0.16), transparent 72%);
  box-shadow: 0 0 22px rgba(74, 168, 255, 0.1);
}
.ysa-brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ysa-brand-text b {
  font-family: var(--shell-serif);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: rgba(232, 246, 255, 0.92);
}
.ysa-brand-text em {
  font: normal 500 9px/1 var(--shell-sans);
  letter-spacing: 0.24em;
  color: rgba(127, 157, 184, 0.62);
}

.ysa-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ysa-env {
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 9px;
  border: 1px solid rgba(127, 231, 255, 0.12);
  font: 400 10px/1.4 var(--shell-mono);
  color: rgba(160, 195, 220, 0.66);
}
.ysa-top-actions .ys-btn {
  padding: 8px 14px;
  letter-spacing: 0.1em;
}

/* —— 主体 —— */
.ysa-main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(16px, 3.4vw, 34px) clamp(12px, 3vw, 40px) 40px;
}
.ysa-main-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ysa-foot {
  padding: 18px clamp(14px, 4vw, 40px) 26px;
  text-align: center;
  font: 400 9px/1.4 var(--shell-sans);
  letter-spacing: 0.28em;
  color: rgba(127, 157, 184, 0.38);
}

/* —— 管理员验证卡片 —— */
.ysa-card {
  position: relative;
  width: min(460px, 100%);
  padding: clamp(24px, 4.4vw, 38px) clamp(20px, 4vw, 34px);
  background: var(--shell-panel);
  border: 1px solid rgba(127, 231, 255, 0.16);
  box-shadow: var(--shell-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.ysa-login {
  margin: clamp(20px, 7vh, 80px) auto;
  animation: ys-rise 0.45s var(--shell-ease) both;
}
.ysa-login::before {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 231, 255, 0.55), transparent);
  pointer-events: none;
}
.ysa-login-title {
  margin: 0;
  font-family: var(--shell-serif);
  font-size: clamp(21px, 3.6vw, 26px);
  font-weight: 400;
  letter-spacing: 0.18em;
  color: rgba(234, 249, 255, 0.94);
}
.ysa-desc {
  margin: 12px 0 20px;
  font: 400 12px/1.85 var(--shell-sans);
  letter-spacing: 0.02em;
  color: rgba(150, 184, 208, 0.7);
}
.ysa-field {
  display: block;
  margin-bottom: 6px;
}
.ysa-label {
  display: block;
  margin-bottom: 8px;
  font: 500 11px/1.4 var(--shell-sans);
  letter-spacing: 0.2em;
  color: rgba(190, 224, 245, 0.78);
}
.ysa-login .ys-btn-wide {
  margin-top: 18px;
}
.ysa-mock {
  margin: 14px 0 0;
  padding: 8px 12px;
  border: 1px dashed rgba(232, 201, 138, 0.34);
  font: 400 11px/1.7 var(--shell-sans);
  color: rgba(232, 201, 138, 0.82);
}

.ysa-fatal {
  max-width: 520px;
  margin: 60px auto;
  padding: 22px;
  border: 1px solid rgba(255, 109, 136, 0.3);
  background: rgba(255, 109, 136, 0.06);
  color: #ffc2cf;
}
.ysa-fatal h1 {
  margin: 0 0 10px;
  font: 400 18px/1.4 var(--shell-serif);
  letter-spacing: 0.1em;
}
.ysa-fatal p {
  margin: 0;
  font: 400 12px/1.8 var(--shell-sans);
}

/* —— 工具栏 —— */
.ysa-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(127, 231, 255, 0.12);
  background: rgba(6, 18, 38, 0.62);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.ysa-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 44px;
}
.ysa-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 400 12px/1.4 var(--shell-sans);
  letter-spacing: 0.06em;
  color: rgba(190, 216, 234, 0.8);
}
.ysa-count {
  width: 68px;
  min-height: 44px;
  padding: 9px 10px;
  font: 400 14px/1.4 var(--shell-mono);
  color: var(--ink);
  text-align: center;
  background: rgba(3, 12, 28, 0.72);
  border: 1px solid rgba(127, 231, 255, 0.16);
  border-radius: 0;
  outline: none;
}
.ysa-count:focus {
  border-color: rgba(127, 231, 255, 0.62);
  box-shadow: 0 0 0 1px rgba(127, 231, 255, 0.1);
}
.ysa-select {
  min-height: 44px;
  padding: 9px 30px 9px 12px;
  font: 400 12px/1.4 var(--shell-sans);
  color: var(--ink);
  background-color: rgba(3, 12, 28, 0.72);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(127, 231, 255, 0.6) 50%),
    linear-gradient(135deg, rgba(127, 231, 255, 0.6) 50%, transparent 50%);
  background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  border: 1px solid rgba(127, 231, 255, 0.16);
  border-radius: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.ysa-select:focus {
  border-color: rgba(127, 231, 255, 0.62);
}
.ysa-select option {
  background: #061226;
  color: var(--ink);
}
.ysa-bar .ys-btn {
  padding: 9px 16px;
  letter-spacing: 0.08em;
}

/* —— 提示条 —— */
.ysa-notice {
  margin: 0 0 16px;
  padding: 10px 13px;
  border-left: 2px solid rgba(127, 231, 255, 0.6);
  background: rgba(47, 107, 255, 0.08);
  font: 400 12px/1.75 var(--shell-sans);
  color: rgba(214, 238, 252, 0.9);
  animation: ys-rise 0.3s var(--shell-ease) both;
}
.ysa-notice-ok {
  border-left-color: rgba(127, 231, 255, 0.85);
  background: rgba(47, 135, 255, 0.13);
}
.ysa-notice-bad {
  border-left-color: rgba(255, 109, 136, 0.75);
  background: rgba(255, 109, 136, 0.08);
  color: #ffc2cf;
}

/* —— 新生成的邀请码 —— */
.ysa-newcodes {
  margin: 0 0 16px;
  padding: 13px 14px;
  border: 1px dashed rgba(232, 201, 138, 0.34);
  background: rgba(232, 201, 138, 0.045);
  animation: ys-rise 0.35s var(--shell-ease) both;
}
.ysa-newcodes-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 11px;
}
.ysa-newcodes-head b {
  font: 400 13px/1.4 var(--shell-serif);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: rgba(232, 201, 138, 0.94);
}
.ysa-newcodes-head span {
  font: 400 11px/1.4 var(--shell-sans);
  color: rgba(160, 192, 214, 0.6);
}
.ysa-newcodes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ysa-newcode {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid rgba(127, 231, 255, 0.22);
  background: rgba(4, 14, 30, 0.6);
  color: var(--cyan);
  font: 400 13px/1.4 var(--shell-mono);
  letter-spacing: 0.08em;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.ysa-newcode:active {
  transform: translateY(1px);
  background: rgba(47, 107, 255, 0.2);
}

/* —— 表格 —— */
.ysa-table-section {
  margin: 0;
}
.ysa-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(127, 231, 255, 0.12);
  background: rgba(6, 18, 38, 0.55);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: opacity 0.3s;
}
.ysa-table-wrap.ysa-loading {
  opacity: 0.72;
}
.ysa-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}
.ysa-table thead th {
  padding: 12px 14px;
  text-align: left;
  white-space: nowrap;
  font: 500 10px/1.4 var(--shell-sans);
  letter-spacing: 0.18em;
  color: rgba(150, 185, 210, 0.76);
  border-bottom: 1px solid rgba(127, 231, 255, 0.14);
  background: rgba(3, 12, 26, 0.66);
}
.ysa-table tbody td {
  padding: 6px 14px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(127, 231, 255, 0.06);
  font: 400 12.5px/1.6 var(--shell-sans);
  color: rgba(190, 216, 234, 0.84);
  white-space: nowrap;
}
.ysa-table tbody tr:last-child td {
  border-bottom: 0;
}
.ysa-table tbody tr {
  transition: background 0.25s;
}
@media (hover: hover) {
  .ysa-table tbody tr:hover {
    background: rgba(47, 107, 255, 0.06);
  }
}
.ysa-table-empty {
  padding: 34px 14px !important;
  text-align: center;
  font: 400 12px/1.8 var(--shell-sans) !important;
  color: rgba(127, 157, 184, 0.6) !important;
  white-space: normal !important;
}

.ysa-cell-code {
  font-family: var(--shell-mono);
}
.ysa-code {
  display: inline-block;
  min-height: 44px;
  padding: 10px 0;
  font: 400 13px/1.4 var(--shell-mono);
  letter-spacing: 0.08em;
  color: var(--cyan);
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(127, 231, 255, 0.28);
  text-underline-offset: 4px;
  transition: color 0.2s, text-shadow 0.2s;
}
.ysa-code:active {
  color: #fff;
  text-shadow: 0 0 16px rgba(127, 231, 255, 0.6);
}
@media (hover: hover) {
  .ysa-code:hover {
    color: #eafaff;
    text-decoration-color: rgba(127, 231, 255, 0.7);
  }
}

.ysa-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid rgba(127, 231, 255, 0.22);
  font: 400 10.5px/1.4 var(--shell-sans);
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.ysa-status-unused {
  border-color: rgba(127, 231, 255, 0.3);
  background: rgba(127, 231, 255, 0.07);
  color: rgba(190, 244, 255, 0.9);
}
.ysa-status-used {
  border-color: rgba(232, 201, 138, 0.34);
  background: rgba(232, 201, 138, 0.07);
  color: rgba(240, 216, 168, 0.94);
}
.ysa-status-revoked {
  border-color: rgba(255, 159, 190, 0.34);
  background: rgba(255, 159, 190, 0.07);
  color: rgba(255, 190, 210, 0.92);
}

.ysa-ops {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ysa-op {
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid rgba(127, 231, 255, 0.14);
  background: rgba(3, 12, 26, 0.42);
  color: rgba(196, 224, 243, 0.82);
  font: 400 11.5px/1.3 var(--shell-sans);
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.ysa-op:active:not(:disabled) {
  transform: translateY(1px);
  background: rgba(47, 107, 255, 0.16);
}
.ysa-op:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}
.ysa-op-danger {
  border-color: rgba(255, 109, 136, 0.5) !important;
  background: rgba(255, 109, 136, 0.1) !important;
  color: #ffc2cf !important;
}
@media (hover: hover) {
  .ysa-op:hover:not(:disabled) {
    border-color: rgba(127, 231, 255, 0.44);
    color: #eafaff;
  }
}

.ysa-summary {
  margin: 11px 0 0;
  font: 400 11px/1.6 var(--shell-sans);
  letter-spacing: 0.04em;
  color: rgba(127, 157, 184, 0.58);
}

/* —— 管理台骨架在窄屏 —— */
@media (max-width: 760px) {
  .ysa-env {
    display: none;
  }
  .ysa-bar {
    align-items: stretch;
  }
  .ysa-tool {
    width: 100%;
  }
  .ysa-tool .ys-btn {
    flex: 1;
    min-width: 100px;
  }
  .ysa-inline {
    flex: 1;
    min-width: 120px;
  }
  .ysa-inline .ysa-select {
    flex: 1;
    min-width: 0;
  }

  .ysa-table {
    min-width: 0;
  }
  .ysa-table thead {
    display: none;
  }
  .ysa-table,
  .ysa-table tbody,
  .ysa-table tr,
  .ysa-table td {
    display: block;
    width: 100%;
  }
  .ysa-table tbody tr {
    margin: 0 0 12px;
    padding: 4px 2px;
    border: 1px solid rgba(127, 231, 255, 0.12);
    background: rgba(5, 16, 34, 0.55);
  }
  .ysa-table tbody tr:last-child {
    margin-bottom: 0;
  }
  .ysa-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 12px;
    border-bottom: 1px dashed rgba(127, 231, 255, 0.07);
    white-space: normal;
    text-align: right;
    overflow-wrap: anywhere;
  }
  .ysa-table tbody td::before {
    content: attr(data-label);
    flex: none;
    font: 500 10px/1.4 var(--shell-sans);
    letter-spacing: 0.16em;
    color: rgba(127, 157, 184, 0.6);
  }
  .ysa-table tbody td:last-child {
    border-bottom: 0;
  }
  .ysa-table tbody td.ysa-cell-code {
    align-items: center;
  }
  .ysa-table tbody td.ysa-cell-code .ysa-code {
    text-align: right;
    font-size: 13.5px;
  }
  .ysa-table tbody td[data-label="操作"] {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    text-align: left;
  }
  .ysa-table tbody td[data-label="操作"]::before {
    align-self: flex-start;
  }
  .ysa-ops {
    justify-content: stretch;
  }
  .ysa-ops .ysa-op {
    flex: 1;
    min-width: 0;
  }
  .ysa-table-empty {
    text-align: center !important;
  }
  .ysa-table-empty::before {
    display: none;
  }
}

/* ==========================================================================
   5. 移动端 / 小屏
   ========================================================================== */

@media (max-width: 640px) {
  .ys-scroll {
    align-items: flex-start;
    padding: 12px;
  }
  .ys-card {
    width: 100%;
    margin: 6px auto;
    padding: 22px 18px 16px;
  }
  .ys-head {
    gap: 12px;
    padding-right: 44px;
  }
  .ys-mark {
    width: 44px;
    height: 44px;
  }
  .ys-mark b {
    font-size: 19px;
  }
  .ys-title {
    font-size: 29px;
    letter-spacing: 0.14em;
  }
  .ys-sub {
    font-size: 11px;
    letter-spacing: 0.24em;
  }
  .ys-eyebrow {
    font-size: 8px;
    letter-spacing: 0.2em;
  }
  .ys-hair {
    width: 22px;
  }
  .ys-head .ys-close {
    right: -4px;
    top: -6px;
  }
  .ys-row {
    grid-template-columns: 1fr;
  }
  .ys-row-btn {
    min-height: 44px;
    width: 100%;
  }
  .ys-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .ys-actions .ys-btn {
    width: 100%;
    min-width: 0;
  }
  .ys-btn-wide {
    min-height: 46px;
  }
  .ys-input,
  .ys-input-code,
  .ysa-count,
  .ysa-select {
    font-size: 16px;
  }
  .ys-input-code {
    letter-spacing: 0.1em;
  }
  .ys-note {
    margin-top: 14px;
  }
  .ysc-card {
    max-height: calc(100dvh - 24px);
    padding: 20px 16px 16px;
  }
  .ysc-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .ysc-actions .ys-btn {
    width: 100%;
    min-width: 0;
  }
  .ysc-body {
    max-height: 42vh;
  }
  .ysc-title {
    font-size: 18px;
  }
  .ysc-p {
    font-size: 12.5px;
  }
  .ysc-check-text {
    font-size: 12.5px;
  }
  .ysa-top {
    padding: 12px 14px;
  }
  .ysa-main {
    padding: 14px 12px 30px;
  }
  .ysa-login {
    margin: 10px auto;
  }
  .ysa-brand-text b {
    font-size: 15px;
  }
  .ys-admin-page .ysa-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (max-width: 390px) {
  .ys-card {
    padding: 18px 14px 14px;
  }
  .ys-title {
    font-size: 25px;
    letter-spacing: 0.1em;
  }
  .ys-sub {
    font-size: 10px;
  }
  .ys-mark {
    width: 38px;
    height: 38px;
  }
  .ys-mark b {
    font-size: 17px;
  }
  .ys-actions .ys-btn {
    letter-spacing: 0.08em;
  }
  .ysa-brand-text em {
    letter-spacing: 0.14em;
  }
  .ysa-top-actions .ys-btn {
    padding: 8px 12px;
  }
}

/* 横屏矮屏：卡片贴顶，允许滚动 */
@media (max-height: 560px) and (orientation: landscape) {
  .ys-scroll {
    align-items: flex-start;
    padding-top: 12px;
  }
  .ys-card {
    margin: 0 auto;
  }
  .ysc-card {
    max-height: calc(100vh - 16px);
  }
  .ysc-body {
    max-height: 34vh;
  }
}

/* ==========================================================================
   6. 无障碍 / 降低动效
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  #ymdq-gate *,
  #ymdq-consent *,
  .ys-admin-page * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* 一梦大千 · 网页版覆盖样式（尽量少写，能复用原卡变量就复用） */

html.ymdq-host,
html:has(.ymdq-gate:not([hidden])) {
  background: #04070f;
}

.ymdq-gate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  padding: 24px;
  background:
    radial-gradient(900px 600px at 50% -10%, rgba(127, 231, 255, .10), transparent 60%),
    radial-gradient(700px 500px at 80% 110%, rgba(232, 201, 138, .06), transparent 60%),
    #04070f;
  font-family: 'Noto Serif SC', 'Songti SC', -apple-system, serif;
  color: #dcefff;
  overflow: auto;
}

/* 隐藏态必须真的隐藏：外壳用了 flex/block，靠属性选择器兜底 */
.ymdq-gate[hidden],
.ys-overlay[hidden] {
  display: none !important;
  pointer-events: none !important;
}

/* 设置页里的紧凑行 */
.set-row .model-row { display: flex; gap: 8px; align-items: center; }
.set-row .model-row input { flex: 1; }

@media (max-width: 480px) {
  .ymdq-gate { padding: 16px; }
}

/* 手机：桌宠不要压在输入框工具栏上 */
@media (max-width: 640px) {
  .ymdq-pet { right: 10px; bottom: 196px; }
  .ymdq-pet .pet-actions { transform: scale(.9); transform-origin: bottom right; }
  .pet-figure { width: 62px; height: 62px; }
}
