/* 青云录 · 复古 WAP · 方正 · 神秘 */
:root {
  --bg: #0b0a0c;
  --bg2: #121014;
  --bg3: #1a161c;
  --bg4: #0e0c10;
  --border: #3a3428;
  --border-soft: #2a241c;
  --text: #c8c0b0;
  --text-dim: #6e6658;
  --gold: #b89a3e;
  --gold-dim: #7a6420;
  --cyan: #5a7a6a;
  --red: #8a3a3a;
  --san: #5a3a6a;
  --hp: #7a3030;
  --mp: #2a4a5a;
  --luck: #b89a3e;
  --ok: #5a8a5a;
  --danger: #a44;
  --radius: 0;
  --radius-sm: 0;
  --font: "Songti SC", "STSong", "SimSun", "Noto Serif SC", "PingFang SC", serif;
  --font-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --mono: "Songti SC", "SimSun", monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tab-h: 52px;
  --status-h: 36px;
  --touch: 44px;
}

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

html, body {
  height: 100%;
  background: #050608;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  overflow: hidden;
  user-select: none;
  -webkit-text-size-adjust: 100%;
}

#phone {
  max-width: 430px;
  height: 100%;
  max-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  border-left: 1px solid #111;
  border-right: 1px solid #111;
  box-shadow: 0 0 80px rgba(100, 60, 140, 0.07);
  overflow: hidden;
}

/* —— 顶栏 —— */
#status-bar {
  min-height: var(--status-h);
  padding: calc(6px + var(--safe-t)) 10px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #161b26 0%, var(--bg2) 100%);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  flex-shrink: 0;
  gap: 8px;
  z-index: 5;
  position: relative;
}
.sb-left {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  flex: 1;
}
#sb-name {
  color: var(--gold);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 38%;
  letter-spacing: 0.02em;
}
.sb-chip {
  font-size: 10px;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 2px 6px;
  border-radius: 0;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(184, 154, 62, 0.06);
  letter-spacing: 0.04em;
}
.sb-meta {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}
.sb-meta b { color: #c0b070; font-weight: 500; }
.dim { color: var(--text-dim); font-size: 12px; }
.sb-spirit {
  color: var(--gold);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#sb-online {
  color: var(--cyan);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0.9;
}
.sb-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
/* —— 属性条 —— */
#bars {
  padding: 6px 12px 7px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.bar-row {
  display: grid;
  grid-template-columns: 28px minmax(24px, 1fr) minmax(64px, max-content);
  gap: 6px;
  align-items: center;
  margin-bottom: 3px;
}
.bar-row:last-child { margin-bottom: 0; }
.bar-label {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.bar-track {
  height: 6px;
  background: var(--bg4);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #1a1e28;
}
.bar-track.mini { height: 6px; flex: 1; }
.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.bar-track.hp .bar-fill { background: linear-gradient(90deg, #5c2020, var(--hp)); }
.bar-track.mp .bar-fill { background: linear-gradient(90deg, #1a3a50, var(--mp)); }
.bar-track.san .bar-fill { background: linear-gradient(90deg, #3a2860, var(--san)); }
.bar-track.exp .bar-fill { background: linear-gradient(90deg, #4a3a10, var(--gold)); }
.bar-track.enemy .bar-fill { background: linear-gradient(90deg, #602020, #c44); }
.bar-num {
  min-width: 0;
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bar-num.center { text-align: center; margin-top: 4px; }
.realm-num {
  font-size: 10px;
  color: var(--gold);
  font-family: var(--font);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-log .log-line.realm { color: #e0c060; font-weight: 600; }

/* —— 主屏 —— */
#screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 4px;
  scroll-padding-bottom: 8px;
}
.view {
  display: none;
  padding: 12px 12px 16px;
  animation: fadein 0.18s ease;
}
.view.active { display: block; }
@keyframes fadein {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

/* —— 登录 —— */
#view-auth {
  min-height: 100%;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 24px 14px 36px;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(60, 30, 80, 0.2), transparent 55%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(0, 0, 0, 0.03) 3px,
      rgba(0, 0, 0, 0.03) 4px
    ),
    var(--bg);
}
#view-auth.active { display: flex; }
.auth-frame {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg2);
  padding: 28px 18px 22px;
  max-width: 340px;
  width: 100%;
  margin: 0 auto;
  box-shadow: inset 0 0 40px rgba(40, 20, 60, 0.15);
}
.auth-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--gold-dim);
  border-style: solid;
  opacity: 0.7;
}
.auth-corner.tl { top: 4px; left: 4px; border-width: 1px 0 0 1px; }
.auth-corner.tr { top: 4px; right: 4px; border-width: 1px 1px 0 0; }
.auth-corner.bl { bottom: 4px; left: 4px; border-width: 0 0 1px 1px; }
.auth-corner.br { bottom: 4px; right: 4px; border-width: 0 1px 1px 0; }
.auth-hero {
  text-align: center;
  padding: 4px 4px 18px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 18px;
}
.auth-well {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-well-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  box-shadow:
    inset 0 0 20px rgba(40, 20, 60, 0.5),
    0 0 24px rgba(60, 30, 80, 0.25);
  animation: well-pulse 6s ease-in-out infinite;
}
.auth-well-ring::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(90, 58, 106, 0.5);
  border-radius: 50%;
}
.auth-well-eye {
  position: relative;
  z-index: 1;
  font-size: 22px;
  color: var(--san);
  text-shadow: 0 0 12px rgba(90, 58, 106, 0.8);
  line-height: 1;
  font-family: var(--mono);
}
@keyframes well-pulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; box-shadow: inset 0 0 24px rgba(60, 30, 90, 0.6), 0 0 32px rgba(90, 40, 100, 0.3); }
}
.auth-hero h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.4em;
  margin: 4px 0 8px;
  text-indent: 0.4em;
}
.auth-sub {
  color: #7a6a8a;
  font-size: 11px;
  letter-spacing: 0.22em;
  font-family: var(--font);
}
.auth-flavor {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.85;
  letter-spacing: 0.04em;
}
.auth-form { padding: 0 2px; }
.auth-field {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg4);
  padding: 0 0 0 10px;
}
.auth-field .field-label {
  font-size: 12px;
  color: var(--gold-dim);
  letter-spacing: 0.15em;
  margin: 0;
  white-space: nowrap;
}
.auth-field input {
  width: 100%;
  padding: 12px 12px;
  margin: 0;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border-soft);
  border-radius: 0;
  color: var(--text);
  font-size: 16px;
  outline: none;
  font-family: var(--font);
}
.auth-field input:focus {
  background: rgba(184, 154, 62, 0.04);
}
.auth-field input::placeholder { color: #4a4438; }
.field-label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin: 0 0 5px 2px;
  letter-spacing: 0.08em;
}
.auth-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 14px;
  border: 1px solid var(--border);
}
.auth-btns .btn {
  min-height: var(--touch);
  border: none;
  border-radius: 0;
}
.auth-btns .btn.primary { border-right: 1px solid var(--border); }
.err {
  color: #b06060;
  font-size: 12px;
  margin-top: 12px;
  text-align: center;
  min-height: 1.2em;
  letter-spacing: 0.06em;
}
.auth-hint {
  margin-top: 14px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  letter-spacing: 0.08em;
}

/* —— 按钮（方正 WAP） —— */
.btn {
  padding: 10px 14px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg3);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  letter-spacing: 0.08em;
}
.btn:active { background: #2a2430; }
.btn.primary {
  background: #1e1a12;
  border-color: var(--gold-dim);
  color: var(--gold);
  font-weight: 500;
}
.btn.primary:active { background: #2a2418; }
.btn.danger {
  background: #1a1010;
  border-color: #5a2828;
  color: #c07070;
}
.btn.ghost {
  background: transparent;
  color: var(--text-dim);
}
.btn.ghost:active { color: var(--text); background: var(--bg3); }
.btn.block { width: 100%; margin-top: 10px; }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn.small { padding: 6px 10px; font-size: 12px; min-height: 32px; }
.btn-stack { margin-top: 10px; }
.btn-stack .btn.block { margin-top: 8px; }
.btn.busy { opacity: 0.55; pointer-events: none; }
.link-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 11px;
  font-family: var(--font);
  cursor: pointer;
  padding: 4px 6px;
  min-height: 28px;
}
.link-btn:active { color: var(--gold); }
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sec-tip {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0;
  font-weight: 400;
  margin-left: 6px;
  opacity: 0.85;
}
.panel-hint.tight {
  margin: -2px 0 10px;
  padding: 7px 10px;
  font-size: 11px;
}

/* —— 场景 —— */
.loc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.loc-title-wrap { min-width: 0; flex: 1; }
#loc-name {
  font-size: 19px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
}
.region-tag {
  display: inline-block;
  font-size: 10px;
  color: #a090c8;
  border: 1px solid #3a3060;
  background: rgba(107, 76, 154, 0.08);
  padding: 1px 7px;
  border-radius: 4px;
  margin-bottom: 5px;
  letter-spacing: 0.06em;
}
#loc-flags {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  max-width: 40%;
}
#loc-flags .li-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-dim);
  font: 10px/1 var(--font);
  white-space: nowrap;
}
#loc-flags .li-tag.boss { border-color: #6a3030; color: #e08080; }
.location-aftermath-trigger {
  appearance: none;
  cursor: pointer;
}
.location-aftermath-trigger:active { background: var(--bg3); }
.prose {
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.72;
  margin-bottom: 8px;
}
.location-insight {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-soft);
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
}
.location-insight strong {
  flex: 0 0 auto;
  color: var(--gold-dim);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
}
.location-insight span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flavor {
  color: var(--text-dim);
  font-size: 12px;
  font-style: italic;
  border-left: 2px solid #3a3060;
  padding: 5px 0 5px 10px;
  margin-bottom: 10px;
  line-height: 1.6;
  background: linear-gradient(90deg, rgba(60, 40, 90, 0.12), transparent);
}
.location-aftermath {
  margin: 2px 0 10px;
  padding: 9px 11px;
  border: 1px solid #4b4027;
  border-left: 3px solid #9a8144;
  background: linear-gradient(90deg, #17140d, #11100d);
  color: #cfc19a;
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.7;
}
.location-aftermath strong {
  display: block;
  margin-bottom: 2px;
  color: var(--gold-dim);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
}
.location-aftermath .aftermath-entry + .aftermath-entry {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #332c1d;
}
.section-title {
  font-size: 11px;
  color: var(--gold-dim);
  letter-spacing: 0.14em;
  margin: 14px 0 7px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-soft);
  font-weight: 500;
}
.panel-title {
  font-size: 17px;
  color: var(--gold);
  margin-bottom: 12px;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.list { display: flex; flex-direction: column; gap: 6px; }
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  min-height: var(--touch);
  background: var(--bg2);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--border);
  border-radius: 0;
  cursor: pointer;
}
.list-item:active {
  background: var(--bg3);
  border-left-color: var(--gold-dim);
}
.list-item.interact-item {
  border-left-color: var(--san);
}
.list-item.interact-item .li-tag {
  color: #a090b8;
  border-color: #4a3a5a;
}
.list-item .li-main { min-width: 0; flex: 1; }
.list-item .li-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.list-item .li-sub {
  color: var(--text-dim);
  font-size: 11px;
  margin-top: 2px;
  line-height: 1.4;
}
.list-item .li-tag {
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}
.list-item .li-tag.boss { color: #e08080; border-color: #6a3030; background: rgba(160, 50, 50, 0.08); }
.list-item .li-tag.quest { color: var(--gold); border-color: var(--gold-dim); background: rgba(201, 162, 39, 0.06); }
.list-item .li-tag.thread { color: #b6c98a; border-color: #59683d; background: rgba(113, 137, 67, 0.08); }
.list-item .li-tag.community { color: #d4b987; border-color: #70552f; background: rgba(139, 96, 43, 0.09); }
.era-person-item { border-left-color: #875f3c; }
.era-person-item .li-name { color: #c37f4f; }
.era-person-item.active {
  background: rgba(153, 82, 42, 0.08);
  border-left-color: #c06a36;
}
.era-person-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text-dim);
  font-size: 11px;
}
.era-person-head b { color: #c37f4f; font-weight: 500; }
.era-person-reward {
  margin-top: 12px;
  padding: 8px 10px;
  border-left: 2px solid var(--gold-dim);
  background: rgba(184, 154, 62, 0.07);
  color: var(--gold);
  font-size: 12px;
}
html[data-theme="paper"] .era-person-item .li-name,
html[data-theme="paper"] .era-person-head b { color: #8b3f18; }
.player-list-item {
  width: 100%;
  color: var(--text);
  font: inherit;
  text-align: left;
  appearance: none;
}
.player-list-item .li-name,
.player-list-item .li-sub { display: block; }
.player-list-item.familiar { border-left-color: var(--gold-dim); }
.player-list-item.in-combat { border-left-color: var(--red); }
.monster-name.monster-boss { color: #d96969; }
.monster-name.monster-deadly { color: #b784d1; }
.monster-name.monster-danger { color: #d48a56; }
.monster-name.monster-matched { color: #c6a84d; }
.monster-name.monster-weaker { color: #6eaa79; }
.nearby-inline {
  display: flex;
  align-items: baseline;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 2px 0;
  white-space: nowrap;
}
.nearby-label {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 12px;
}
.nearby-names {
  display: flex;
  align-items: baseline;
  min-width: 0;
  overflow: hidden;
}
.nearby-player-name,
.nearby-ellipsis {
  min-width: 0;
  max-width: 84px;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font: 12px/1.5 var(--font);
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.nearby-player-name + .nearby-player-name::before,
.nearby-ellipsis::before { content: '，'; color: var(--text-dim); }
.nearby-ellipsis { flex: 0 0 auto; max-width: none; }
.nearby-none { color: var(--text-dim); font-size: 12px; }
.nearby-player-page {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.list-empty {
  color: var(--text-dim);
  font-size: 13px;
  padding: 16px 10px;
  text-align: center;
  line-height: 1.6;
  background: var(--bg4);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-soft);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px;
  min-height: 0;
}
.chip-row:empty { display: none; }
.chip {
  font-size: 11px;
  padding: 4px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--cyan);
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip:active { border-color: var(--cyan); }
.chip.active-title {
  border-color: var(--gold);
  color: var(--gold);
  background: #1a1810;
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.12);
}

/* 道友名帖：只展示世界内可见的行迹与装束 */
.player-profile { color: var(--text); }
.profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.profile-kicker {
  color: var(--gold-dim);
  font-size: 10px;
  letter-spacing: .22em;
}
.profile-name {
  margin-top: 3px;
  color: var(--gold);
  font-size: 22px;
  letter-spacing: .12em;
}
.profile-rank { margin-top: 4px; color: var(--cyan); font-size: 12px; }
.profile-fighting {
  flex: 0 0 auto;
  max-width: 45%;
  padding: 4px 7px;
  border: 1px solid #7c3d3d;
  color: #e08080;
  font-size: 10px;
  line-height: 1.4;
}
.profile-aura {
  margin: 12px 0 0;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.7;
}
.profile-verse {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-left: 2px solid var(--gold-dim);
  background: #14120e;
  color: #d8c58d;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: .08em;
}
.player-profile section { margin-top: 15px; }
.player-profile h4 {
  margin: 0 0 7px;
  color: var(--gold-dim);
  font-size: 11px;
  letter-spacing: .16em;
  font-weight: 500;
}
.profile-deeds {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
}
.profile-shared-fate {
  padding: 10px 11px;
  border: 1px solid #4a3d22;
  background: #17140d;
}
.profile-shared-fate .shared-fate-origin {
  margin-bottom: 6px;
  color: #d8c58d;
  font-size: 11px;
  line-height: 1.55;
}
.profile-gear-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.profile-era-path > div { display: grid; gap: 5px; }
.profile-era-path span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-size: 11px;
}
.profile-era-path span.done { border-left: 2px solid var(--gold-dim); }
.profile-era-path b { color: var(--text); font-weight: 500; }
.profile-era-path i { font-style: normal; white-space: nowrap; }
.profile-gear {
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid var(--border-soft);
  background: var(--bg3);
  text-align: center;
}
.profile-gear span, .profile-gear small {
  display: block;
  color: var(--text-dim);
  font-size: 9px;
  line-height: 1.35;
}
.profile-gear strong {
  display: block;
  margin: 3px 0;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-techniques { display: grid; gap: 5px; }
.profile-technique {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 8px;
  border-left: 1px solid var(--cyan);
  background: var(--bg3);
}
.profile-technique strong { flex: 0 0 auto; color: var(--cyan); font-size: 11px; font-weight: 500; }
.profile-technique span { color: var(--text-dim); font-size: 10px; line-height: 1.45; }
.profile-marks { display: flex; flex-wrap: wrap; gap: 5px; }
.profile-mark {
  padding: 3px 6px;
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-size: 10px;
}
.profile-privacy {
  margin: 16px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--border-soft);
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.55;
}

@media (max-width: 350px) {
  .profile-gear-grid { grid-template-columns: 1fr; }
  .profile-gear { text-align: left; }
}

/* —— 罗盘 —— */
.compass {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 6px;
  max-width: 280px;
  margin: 4px auto 6px;
}
.cmp-btn {
  padding: 8px 4px;
  min-height: 52px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  line-height: 1.15;
}
.cmp-btn .cmp-dir { font-weight: 600; font-size: 13px; }
.cmp-btn .cmp-dest {
  font-size: 10px;
  color: var(--text-dim);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}
.cmp-btn.on {
  border-color: #3a4a60;
  background: #1a2434;
}
.cmp-btn.on .cmp-dest { color: var(--cyan); }
.cmp-btn.on .cmp-dir { color: var(--text); }
.cmp-btn.quest-route {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold-dim);
}
.cmp-btn.quest-route .cmp-dest { color: var(--gold); }
.cmp-btn.locked { border-color: #7a5050; background: color-mix(in srgb, var(--bg3) 82%, #5a2020); }
.cmp-btn.locked .cmp-dest { color: #d28a8a; }
.cmp-btn .cmp-dir em {
  margin-left: 3px;
  color: var(--gold);
  font-size: 8px;
  font-style: normal;
  font-weight: 500;
  vertical-align: 1px;
}
.cmp-btn:active:not(:disabled) {
  background: #2a3548;
  border-color: var(--gold-dim);
  color: var(--gold);
}
.cmp-btn:disabled {
  opacity: 0.18;
  pointer-events: none;
  background: transparent;
}
.cmp-n { grid-column: 2; grid-row: 1; }
.cmp-w { grid-column: 1; grid-row: 2; }
.cmp-e { grid-column: 3; grid-row: 2; }
.cmp-s { grid-column: 2; grid-row: 3; }
.cmp-u { grid-column: 1; grid-row: 1; }
.cmp-d { grid-column: 3; grid-row: 3; }
.cmp-map {
  grid-column: 2;
  grid-row: 2;
}
.cmp-c {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.45;
  letter-spacing: 0.1em;
  pointer-events: none;
  user-select: none;
}
.exit-labels {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.55;
  margin-bottom: 2px;
  padding: 0 4px;
}
.scene-mount-line,
.scene-mount-shortcut { display: none; }
.world-gates {
  display: grid;
  gap: 6px;
  max-width: 520px;
  margin: 8px auto 2px;
}
.world-gate {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #6f5480;
  border-left: 3px solid #9670aa;
  background: linear-gradient(90deg, #17111d, #111018);
  color: var(--text);
  text-align: left;
  font-family: var(--font);
  cursor: pointer;
}
.world-gate span { color: #ad8fbd; font-size: 9px; letter-spacing: .12em; }
.world-gate b { color: #d5c4dd; font-size: 13px; font-weight: 600; }
.world-gate small { color: var(--text-dim); font-size: 10px; line-height: 1.45; }
.world-gate.locked { border-color: var(--border-soft); border-left-color: #625a67; background: var(--bg3); }
.world-gate.locked b { color: var(--text-dim); }
.world-gate-detail h3,
.world-cross-result h3 { margin: 7px 0; color: #c6a8d4; font: 600 18px/1.4 var(--font-serif); }
.world-gate-detail p,
.world-cross-result p { margin: 0; color: var(--text); font-size: 13px; line-height: 1.75; }
.world-gate-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px;
  border-top: 1px solid #5d4569;
  border-bottom: 1px solid #5d4569;
  color: var(--text-dim);
  text-align: center;
  font-size: 11px;
}
.world-gate-route i { color: #ad8fbd; font-style: normal; }
.world-gate-detail > small { display: block; margin-top: 9px; color: var(--red); line-height: 1.55; }
.world-gate-arrival {
  margin-top: 12px;
  padding: 10px 11px;
  border-left: 3px solid #9670aa;
  background: #120f16;
  color: #cdbfd3;
  font-size: 12px;
  line-height: 1.7;
}

/* —— 日志 —— */
.event-log {
  max-height: 132px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 12px;
  line-height: 1.6;
  padding: 8px 10px;
  background: var(--bg4);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
}
.event-log.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  overflow: hidden;
  margin: 0;
}
.event-log .log-line {
  margin-bottom: 5px;
  color: var(--text-dim);
  word-break: break-word;
}
.event-log .log-line:last-child { margin-bottom: 0; }
.event-log .log-line.luck { color: var(--gold); }
.event-log .log-line.san { color: #a080c0; }
.event-log .log-line.combat { color: #c08080; }
.event-log .log-line.reward { color: var(--ok); font-weight: 500; }
.event-log .log-line.quest { color: #d0b060; }
.event-log .log-line.death { color: #ff7a7a; }
.event-log .log-line.win { color: #80c080; }
.event-log .log-line.monster { color: #9080a0; font-style: italic; }
.event-log .log-line.intent { color: #d0a868; }
.event-log .log-line.move { color: #8a9aaa; }
.event-log .log-line.item { color: #8ab0c0; }
.event-log .log-line.info { color: #9a9588; }
.event-log .log-empty {
  color: var(--text-dim);
  text-align: center;
  padding: 12px 0;
}
.scene-footprints {
  margin-top: 14px;
  border: 1px solid var(--border);
  background: var(--bg2);
}
.footprints-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 34px;
  padding: 2px 5px 2px 8px;
}
.footprints-line > strong {
  margin-right: 8px;
  color: var(--text);
  font-size: 12px;
  letter-spacing: .08em;
}
.footprint-latest {
  min-width: 0;
  overflow: hidden;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scene-footprints .link-btn {
  min-height: 26px;
  padding: 3px 4px 3px 8px;
}
.scene-footprints .event-log {
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
}
.scene-footprints .event-log.collapsed { border-width: 0; }
.footprint-moments {
  padding: 9px 10px 10px;
  border-top: 1px solid var(--border-soft);
}
.footprint-moments .section-title { margin-top: 0; }
.scene-facility {
  width: 100%;
  color: var(--text);
  font: inherit;
  text-align: left;
  appearance: none;
}
.world-task-list { display: grid; gap: 7px; }
.world-task-card {
  width: 100%;
  color: var(--text);
  font: inherit;
  text-align: left;
  appearance: none;
}
.world-task-card .li-tag { max-width: 42%; text-align: center; white-space: normal; }

/* —— 战斗 —— */
.combat-frame {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: min(76vh, 620px);
}
.combat-enemy {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 15px 14px 13px;
  background:
    radial-gradient(circle at 50% 8%, rgba(142, 38, 38, .18), transparent 54%),
    linear-gradient(180deg, #171012, var(--bg2));
  border: 1px solid #603034;
  border-top: 3px solid #8e3434;
  border-radius: var(--radius);
}
.cbt-name {
  font-size: 18px;
  color: #e08080;
  margin-bottom: 9px;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(200, 60, 60, 0.28);
  font-weight: 600;
}
.cbt-intent {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 12px 0 0;
  padding: 8px 10px;
  border: 1px solid #553640;
  background: #130d13;
  text-align: left;
}
.cbt-intent > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  color: #d08080;
  font-size: 13px;
}
.cbt-intent b { display: block; color: #d8b0a8; font-size: 12px; font-weight: 500; }
.cbt-intent small { display: block; margin-top: 2px; color: var(--text-dim); font-size: 10px; line-height: 1.35; }
.cbt-intent em {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 58px;
  padding-left: 8px;
  border-left: 1px solid currentColor;
  color: #e4c58c;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}
.cbt-intent.targets-pet em { color: #d2a85f; animation: combat-target-pulse 1.2s ease-in-out infinite; }
.cbt-intent.type-heavy { border-color: #7a3a32; background: #1a0d0b; }
.cbt-intent.type-mind { border-color: #563b70; background: #120d1a; }
.cbt-intent.type-ward { border-color: #365b61; background: #0b1517; }
.cbt-intent.type-swift { border-color: #66572c; background: #171409; }
.combat-versus {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 0 4px;
  color: #a05a55;
  font-size: 10px;
  letter-spacing: .18em;
}
.combat-versus i { height: 1px; background: linear-gradient(90deg, #7f2f31, #9b7a42 50%, #486f4d); }
.combat-versus b { color: #6f9271; font-weight: 500; }
.combat-party {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.combatant-card {
  min-width: 0;
  padding: 9px 10px 8px;
  border: 1px solid var(--border);
  border-left: 3px solid #53835a;
  background: var(--bg2);
}
.combatant-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}
.combatant-card header b {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.combatant-card header span { color: var(--text-dim); font-size: 10px; }
.combatant-card .bar-track { height: 7px; }
.combatant-pet { border-left-color: #aa7a35; }
.combatant-pet .bar-track .bar-fill { background: linear-gradient(90deg, #85531e, #d09a45); }
.combatant-pet.is-down { opacity: .55; filter: grayscale(.75); }
.combatant-meta {
  overflow: hidden;
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 9px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.combat-log-panel { border: 1px solid var(--border); background: var(--bg4); }
.combat-log-title {
  display: flex;
  justify-content: space-between;
  padding: 7px 9px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 10px;
  letter-spacing: .06em;
}
.combat-log-title span { color: var(--text-dim); font-size: 9px; font-weight: 400; }
.cbt-log {
  min-height: 118px;
  max-height: 25vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 12.5px;
  line-height: 1.6;
  padding: 10px;
  background: transparent;
  border: 0;
}
.cbt-log .log-line { margin-bottom: 5px; color: var(--text-dim); }
.cbt-log .log-line.intent { color: #d0a868; border-left: 1px solid #72553a; padding-left: 6px; }
.cbt-log .log-line.luck { color: var(--gold); }
.cbt-log .log-line.combat { color: #c08080; }
.cbt-log .log-line.san { color: #a080c0; }
.cbt-log .log-line.reward, .cbt-log .log-line.win { color: var(--ok); }
@keyframes combat-target-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .48; }
}
@media (prefers-reduced-motion: reduce) {
  .cbt-intent.targets-pet em { animation: none; }
}
.cbt-style {
  min-height: 16px;
  font-size: 10px;
  line-height: 1.4;
  color: #b9a574;
  padding: 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combat-command {
  position: sticky;
  bottom: 6px;
  z-index: 6;
  border: 1px solid var(--border);
  background: var(--bg2);
  box-shadow: 0 -10px 24px rgba(0, 0, 0, .2);
}
.combat-action-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}
.combat-action-tabs button {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text-dim);
  font: 11px/1 var(--font);
}
.combat-action-tabs button:last-child { border-right: 0; }
.combat-action-tabs button.active {
  background: var(--bg2);
  color: var(--gold);
  box-shadow: inset 0 3px var(--gold);
}
.combat-action-tabs span { color: inherit; font-size: 9px; }
.combat-action-panel { display: none; padding: 8px; }
.combat-action-panel.active { display: block; }
.cbt-action-scroll {
  max-height: 174px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.cbt-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cbt-actions-base .btn:last-child { grid-column: 1 / -1; min-height: 36px; }
.cbt-actions .btn {
  padding: 12px 8px;
  font-size: 14px;
  min-height: 48px;
}
.cbt-actions .career-skill {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 9px;
  border-color: var(--gold-dim);
  background: #17180f;
  color: var(--gold);
  line-height: 1.2;
  text-align: left;
}
.cbt-actions .career-skill b {
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cbt-actions .career-skill small {
  overflow: hidden;
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cbt-actions .career-skill.fit-counter {
  border-color: var(--gold);
  box-shadow: inset 3px 0 var(--gold);
}
.cbt-actions .btn.fit-counter {
  border-color: var(--gold);
  box-shadow: inset 3px 0 var(--gold);
  color: var(--gold);
}
.cbt-actions .career-skill.fit-good { border-color: var(--cyan); }
.cbt-actions .career-skill.is-strong small { color: var(--ok); }
.cbt-actions .career-skill.is-suppressed small { color: #aa7770; }
.cbt-actions .career-skill:disabled {
  cursor: not-allowed;
  opacity: .72;
}
.cbt-actions .career-skill.depth-skill {
  min-height: 92px;
}
.cbt-actions .career-skill.depth-skill small {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.cbt-actions .career-skill.depth-skill .depth-skill-desc {
  color: var(--text);
}
.cbt-actions .combat-item {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  padding: 8px 9px;
  border-color: var(--border);
  background: var(--bg3);
  color: var(--text);
  text-align: left;
}
.cbt-actions .combat-item b,
.cbt-actions .combat-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cbt-actions .combat-item b { font-size: 12px; font-weight: 500; }
.cbt-actions .combat-item small { color: var(--text-dim); font-size: 9px; }
.combat-action-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 8px;
  color: var(--text-dim);
  font-size: 11px;
  text-align: center;
}

/* —— 属性面板 —— */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 6px;
}
.cultivation-overview {
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    linear-gradient(105deg, rgba(184, 154, 62, .09), transparent 46%),
    var(--bg2);
}
.cultivation-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 72px;
  padding: 10px 12px 8px;
}
.cultivation-identity { min-width: 0; }
.cultivation-identity span {
  display: block;
  overflow: hidden;
  color: var(--text-dim);
  font-size: 9px;
  letter-spacing: .12em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cultivation-identity strong {
  display: block;
  margin-top: 2px;
  color: var(--gold);
  font: 600 22px/1.2 var(--font-serif);
  letter-spacing: .08em;
}
.cultivation-identity small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-dim);
  font: 10px/1.45 var(--font-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.power-seal {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  min-width: 72px;
  padding-left: 12px;
  border-left: 1px solid var(--border-soft);
  text-align: right;
}
.power-seal span { grid-column: 1 / -1; color: var(--gold-dim); font-size: 9px; letter-spacing: .12em; }
.power-seal b { color: var(--text); font: 600 20px/1.15 var(--font-serif); font-variant-numeric: tabular-nums; }
.power-seal small { margin: 0 0 2px 4px; color: var(--text-dim); font-size: 8px; }
.cultivation-progress {
  padding: 7px 12px 9px;
  border-top: 1px solid var(--border-soft);
}
.cultivation-progress > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cultivation-progress span { color: var(--text-dim); font-size: 9px; white-space: nowrap; }
.cultivation-progress b { overflow: hidden; color: var(--text); font-size: 10px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.cultivation-progress .bar-track { height: 3px; margin-top: 5px; }
.status-ledger {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding: 6px 4px 4px;
  font-family: var(--font-serif);
}
.status-ledger-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
}
.status-ledger-row > span {
  color: var(--gold-dim);
  font-size: 10px;
  letter-spacing: .12em;
  white-space: nowrap;
}
.status-ledger-row > span::before { content: '〔'; }
.status-ledger-row > span::after { content: '〕'; }
.status-ledger-row p {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 5px;
  margin: 0;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.65;
}
.status-ledger-row p b {
  margin-left: 1px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.status-ledger-row p i {
  margin: 0 3px;
  color: var(--border-soft);
  font-style: normal;
}
.realm-detail-body { display: grid; gap: 9px; }
.realm-detail-lead > div,
.power-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding-bottom: 8px;
  border-bottom: 1px dotted var(--border-soft);
}
.realm-detail-lead span,
.power-breakdown span,
.realm-detail-label,
.first-choice-detail span { width: 100%; color: var(--text-dim); font-size: 9px; letter-spacing: .08em; }
.realm-detail-lead b,
.power-breakdown b { color: var(--text); font-size: 10px; font-weight: 500; }
.realm-detail-lead p { margin: 7px 0 0; color: var(--text-dim); font-size: 10px; line-height: 1.55; }
.realm-detail-lead p strong { margin-right: 7px; color: var(--gold); }
.realm-detail-body .realm-system-card { padding-bottom: 8px; border-bottom: 1px dotted var(--border-soft); }
.realm-detail-body .realm-system-grid { margin-top: 5px; }
.first-choice-detail b { display: block; margin-top: 2px; color: var(--text); font: 12px/1.5 var(--font-serif); }
.realm-detail-body .combat-bonus-card { padding: 0; border: 0; background: transparent; }
.realm-detail-body .combat-bonus-card .sk { color: var(--text-dim); font-size: 9px; }

/* 纸面 / 夜色状态页：详情按人物卷的道途、随身、生平分组。 */
html:not([data-theme="classic"]) #view-stats.active {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0;
  padding: 10px 14px 18px;
}
html:not([data-theme="classic"]) #view-stats > :not(.stats-detail) { grid-column: 1 / -1; }
html:not([data-theme="classic"]) #view-stats > .stats-detail {
  min-width: 0;
  margin: 0;
}
html:not([data-theme="classic"]) #view-stats > details.stats-detail {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html:not([data-theme="classic"]) #view-stats > .stats-action {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg2);
  text-align: left;
}
html:not([data-theme="classic"]) #view-stats > .stats-action > span:first-child {
  display: none;
}
html:not([data-theme="classic"]) #view-stats > .stats-action > span:nth-child(2) b {
  overflow: hidden;
  max-width: 100%;
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html:not([data-theme="classic"]) #view-stats > .stats-action > span:nth-child(2) small { display: none; }
html:not([data-theme="classic"]) #view-stats > .stats-action > i {
  display: block;
  margin-left: auto;
  color: var(--gold-dim);
  font: 0/1 var(--font-serif);
  font-style: normal;
}
html:not([data-theme="classic"]) #view-stats > .stats-action > i::after { content: '›'; font-size: 12px; }
html:not([data-theme="classic"]) #view-stats > .stats-detail:not([open]) > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg2);
  text-align: left;
}
html:not([data-theme="classic"]) #view-stats > .stats-detail:not([open]) > summary span {
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: .02em;
}
html:not([data-theme="classic"]) #view-stats > .stats-detail:not([open]) > summary small { display: none; }
html:not([data-theme="classic"]) #view-stats > .stats-detail:not([open]) > summary::after {
  display: block;
  margin-left: auto;
  color: var(--gold-dim);
  content: '›';
  font: 12px/1 var(--font-serif);
}
html:not([data-theme="classic"]) #view-stats > .stats-action,
html:not([data-theme="classic"]) #view-stats > .equipment-detail,
html:not([data-theme="classic"]) #view-stats > .attribute-breakdown { margin-left: -1px; }
html:not([data-theme="classic"]) #view-stats > .stats-detail:not([open]):hover > summary,
html:not([data-theme="classic"]) #view-stats > .stats-action:hover {
  background: var(--bg3);
  color: var(--gold);
}
html:not([data-theme="classic"]) #view-stats > .stats-detail:not([open]):active > summary {
  translate: 0 1px;
}
html:not([data-theme="classic"]) #view-stats > .stats-action:active {
  translate: 0 1px;
}
.status-index-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 5px;
  padding-top: 0;
  border-top: 0;
  font-family: var(--font-serif);
}
.status-index-label span {
  color: var(--gold-dim);
  font-size: 10px;
  letter-spacing: .16em;
}
.status-index-label small { color: var(--text-dim); font-size: 9px; }
html[data-theme="paper"] #view-stats > .stats-action,
html[data-theme="paper"] #view-stats > .stats-detail:not([open]) > summary {
  border-color: #202520;
  background: #fff;
}
html[data-theme="paper"] #view-stats > .stats-action:hover,
html[data-theme="paper"] #view-stats > .stats-detail:not([open]):hover > summary { background: #f4f6f2; }
.stats-modal-intro {
  margin: 0 0 10px;
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.5;
}
.modal-body > .stats-modal-content {
  display: block;
  padding: 0;
  border: 0;
}
.modal-body > .stats-modal-content > .section-title:first-child { margin-top: 0; }

/* 状态页保持连续阅读感：数字靠留白分组，只给行动建议一条视觉锚点。 */
html:not([data-theme="classic"]) #view-stats > .panel-title { margin: 0 2px; }
html:not([data-theme="classic"]) #view-stats > #stats-body {
  gap: 8px;
  margin: 0;
}
html:not([data-theme="classic"]) #view-stats .cultivation-overview {
  overflow: visible;
  border: 0;
  background: transparent !important;
}
html:not([data-theme="classic"]) #view-stats .cultivation-head {
  min-height: 58px;
  padding: 2px 4px 7px;
}
html:not([data-theme="classic"]) #view-stats .power-seal {
  min-width: 66px;
  padding-left: 10px;
  border-left: 0;
}
html:not([data-theme="classic"]) #view-stats .cultivation-progress {
  padding: 4px 4px 2px;
  border-top: 0;
}
html:not([data-theme="classic"]) #view-stats .growth-guide {
  margin: 1px 0;
  border: 0;
  border-left: 2px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 6%, var(--bg2));
}
html:not([data-theme="classic"]) #view-stats .growth-guide-focus { align-items: center; }
html:not([data-theme="classic"]) #view-stats .growth-guide-copy { padding: 8px 10px; }
html:not([data-theme="classic"]) #view-stats .growth-guide-action {
  min-width: 92px;
  border-left: 0;
  background: transparent;
}
html:not([data-theme="classic"]) #view-stats .growth-roadmap { border-top: 0; }
html:not([data-theme="classic"]) #view-stats .growth-roadmap > summary {
  padding: 5px 10px 7px;
  background: transparent;
}
html:not([data-theme="classic"]) #view-stats .btn-stack {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  margin-top: 14px;
  border-top: 1px solid var(--border-soft);
}
html:not([data-theme="classic"]) #view-stats .btn-stack .btn.block { margin-top: 0; }
html:not([data-theme="classic"]) #view-stats .status-quiet-action {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px 2px;
  border: 0;
  border-bottom: 1px dotted var(--border-soft);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}
html:not([data-theme="classic"]) #view-stats .status-action-mark {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  color: var(--gold-dim);
  font: 11px/1 var(--font-serif);
}
html:not([data-theme="classic"]) #view-stats .status-quiet-action > span:nth-child(2) { min-width: 0; }
html:not([data-theme="classic"]) #view-stats .status-quiet-action b,
html:not([data-theme="classic"]) #view-stats .status-quiet-action small { display: block; }
html:not([data-theme="classic"]) #view-stats .status-quiet-action b { font: 12px/1.35 var(--font-serif); }
html:not([data-theme="classic"]) #view-stats .status-quiet-action small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-dim);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html:not([data-theme="classic"]) #view-stats .status-quiet-action i {
  color: var(--gold-dim);
  font: 10px/1 var(--font-serif);
  font-style: normal;
}
html:not([data-theme="classic"]) #view-stats .status-quiet-action:hover { background: color-mix(in srgb, var(--gold) 5%, transparent); }
html:not([data-theme="classic"]) #view-stats .status-quiet-action.resting { opacity: .72; }
.rest-ritual {
  position: fixed;
  left: 50%;
  top: 28%;
  z-index: 90;
  display: grid;
  grid-template-columns: 36px 1fr;
  width: min(250px, calc(100vw - 32px));
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .24);
  pointer-events: none;
  transform: translateX(-50%);
}
.rest-breath {
  grid-row: 1 / 3;
  align-self: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font: 16px/26px var(--font-serif);
  text-align: center;
  animation: rest-breathe 1.5s ease-in-out infinite;
}
.rest-ritual b { font: 13px/1.35 var(--font-serif); }
.rest-ritual small { color: var(--text-dim); font-size: 10px; }
.rest-ritual i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: var(--gold);
  animation: rest-progress 3s linear forwards;
}
.mount-loading { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 96px; color: var(--text-dim); }
.mount-loading span { color: var(--gold); font: 24px var(--font-serif); animation: rest-breathe 1.2s ease-in-out infinite; }
.mount-loading b { font-size: 12px; font-weight: 400; }
.mount-card button[aria-busy="true"],
.mount-travel-grid button[aria-busy="true"],
.mount-acquire-choice button[aria-busy="true"] { color: var(--text-dim); cursor: wait; }
@keyframes rest-breathe { 0%, 100% { transform: scale(.86); opacity: .55; } 50% { transform: scale(1); opacity: 1; } }
@keyframes rest-progress { from { width: 0; } to { width: 100%; } }
html[data-theme="classic"] .status-index-label { display: none; }
.stat-card {
  padding: 10px 11px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.stat-card.metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 8px 11px;
}
.metric-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.stat-card.metric.has-sources {
  display: block;
  min-height: 58px;
}
.stat-card.metric .sv { margin-top: 0; font-size: 17px; }
.metric-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 5px;
  margin-top: 5px;
  padding-top: 4px;
  border-top: 1px dotted var(--border-soft);
  color: var(--text-dim);
  font-size: 8px;
  line-height: 1.35;
}
.metric-sources span { white-space: nowrap; }
.metric-sources b { margin-left: 2px; color: var(--ok); font-weight: 500; }
.metric-sources .negative,
.metric-sources .negative b { color: var(--red); }
.metric-sources i { color: var(--border); font-style: normal; }
.combat-bonus-card .sk { margin-bottom: 4px; }
.combat-bonus-list { display: grid; gap: 4px; }
.combat-bonus-list span {
  display: block;
  color: var(--text-dim);
  font-size: 9px;
  line-height: 1.5;
}
.combat-bonus-list b { margin-right: 6px; color: var(--gold); font-weight: 500; }
.profession-summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  margin: 8px 0;
  padding: 9px 10px;
  border: 1px solid var(--gold-dim);
  background: var(--bg2);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.profession-summary > span:first-child,
.profession-sigil {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid currentColor;
  color: var(--gold);
  font: 700 17px/1 var(--font-serif);
}
.profession-summary b,
.profession-summary small { display: block; }
.profession-summary b { color: var(--gold); font-size: 14px; }
.profession-summary small { margin-top: 2px; color: var(--text-dim); font-size: 10px; }
.profession-summary i { color: var(--text-dim); font-size: 11px; font-style: normal; }
.profession-path {
  margin-bottom: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--bg3);
}
.profession-path.current { border-left: 3px solid var(--gold); }
.profession-path.next-stage { position: relative; padding-top: 28px; border-style: dashed; }
.profession-stage-label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 9px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--gold);
  font-size: 9px;
  letter-spacing: .14em;
}
.profession-path-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}
.profession-path h3 { margin: 0; color: var(--gold); font-size: 15px; }
.profession-path h3 span { margin-left: 6px; color: var(--text-dim); font-size: 10px; font-weight: 400; }
.profession-path p { margin: 7px 0 0; font-size: 12px; line-height: 1.55; }
.profession-path .profession-motto { color: var(--text-dim); font-family: var(--font-serif); }
.profession-requirements { margin-top: 7px; color: var(--red); font-size: 11px; }
.profession-requirements.ready { color: var(--ok); }
.profession-skill-list { margin-top: 10px; border-top: 1px dotted var(--border-soft); }
.skill-system + .skill-system { margin-top: 9px; }
.skill-system-head { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0 4px; border-bottom: 1px solid var(--border); }
.skill-system-head b { color: var(--gold); font: 13px var(--font-serif); letter-spacing: .08em; }
.skill-system-head span { color: var(--text-dim); font-size: 9px; }
.profession-skill-row {
  padding: 8px 0;
  border-bottom: 1px dotted var(--border-soft);
}
.profession-skill-title { display: flex; gap: 7px; align-items: baseline; }
.profession-skill-title b { color: var(--text); font-size: 13px; }
.profession-skill-title i { color: var(--gold); font-size: 10px; font-style: normal; }
.profession-skill-row p { margin: 3px 0 0; color: var(--text-dim); font-size: 11px; }
.profession-skill-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.profession-skill-actions button {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font: 11px/1.2 var(--font);
}
.profession-skill-actions button:disabled { opacity: .45; }
.profession-skill-actions button.on { border-color: var(--gold); color: var(--gold); }
.attribute-add-controls { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.attribute-add-controls button,
.attribute-add-controls input {
  min-height: 30px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font: 11px/1.2 var(--font);
}
.attribute-add-controls button { min-width: 38px; padding: 4px 8px; }
.attribute-add-controls input { width: 76px; padding: 4px 7px; font-variant-numeric: tabular-nums; }
.attribute-add-controls input::placeholder { color: var(--text-dim); }
.attribute-add-controls :is(button, input):focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.attribute-add-controls :is(button, input):disabled { opacity: .45; }
.pet-attribute-list { margin-top: 0; }
.profession-mentor-line {
  margin-top: 9px;
  padding: 7px 9px;
  border-left: 2px solid var(--gold-dim);
  background: var(--bg3);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 12px;
}
.profession-loadout {
  margin-top: 8px;
  padding: 6px 8px;
  border-left: 2px solid var(--gold);
  background: var(--bg3);
  color: var(--text-dim);
  font-size: 10px;
}

.bag-filter-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 9px 0 0;
  border: 1px solid var(--border);
}
.bag-filter-tabs button {
  min-width: 0;
  min-height: 34px;
  padding: 4px 2px;
  border: 0;
  border-right: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text-dim);
  font: 10px/1.2 var(--font);
}
.bag-filter-tabs button:last-child { border-right: 0; }
.bag-filter-tabs button.active {
  background: var(--bg3);
  color: var(--gold);
  box-shadow: inset 0 3px var(--gold);
}
.bag-list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  margin: 4px 2px 3px;
}
.bag-filter-meta {
  min-height: 16px;
  margin: 0;
  color: var(--text-dim);
  font-size: 9px;
}
.bag-sort-control {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  color: var(--text-dim);
  font-size: 9px;
}
.bag-sort-control select {
  min-height: 28px;
  max-width: 112px;
  padding: 3px 22px 3px 7px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg2);
  color: var(--text);
  font: 10px/1.2 var(--font);
}
.stat-card .sk { font-size: 10px; color: var(--text-dim); letter-spacing: 0.04em; }
.stat-card .sv { font-size: 15px; color: var(--text); margin-top: 3px; font-weight: 500; }
.stat-card .sv.gold { color: var(--gold); }
.stat-card .sv.san { color: #a080c0; }
.stat-card.wide { grid-column: 1 / -1; }
.growth-guide {
  display: block;
  margin: 8px 0;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  background: var(--bg2);
}
.growth-guide[data-kind="recovery"] { border-left-color: var(--red); }
.growth-guide-focus { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
.growth-guide-copy { min-width: 0; padding: 9px 10px; }
.growth-guide-copy > span {
  display: block;
  margin-bottom: 2px;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: .16em;
}
.growth-guide[data-kind="recovery"] .growth-guide-copy > span { color: var(--red); }
.growth-guide-copy b { display: block; color: var(--text); font: 600 14px/1.4 var(--font-serif); }
.growth-guide-copy p { margin: 3px 0 0; color: var(--text-dim); font-size: 10px; line-height: 1.55; }
.growth-guide-action {
  min-width: 98px;
  padding: 8px 10px;
  border: 0;
  border-left: 1px solid var(--border-soft);
  background: var(--bg3);
  color: var(--gold);
  font: 11px/1.45 var(--font);
  cursor: pointer;
}
.growth-guide-action i { margin-left: 3px; font-style: normal; }
.growth-roadmap { border-top: 1px solid var(--border-soft); }
.growth-roadmap > summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
  background: var(--bg3);
}
.growth-roadmap > summary::-webkit-details-marker { display: none; }
.growth-roadmap > summary span { color: var(--text); font: 600 11px/1.4 var(--font-serif); }
.growth-roadmap > summary small { color: var(--text-dim); font-size: 9px; text-align: right; }
.growth-route-list { display: grid; }
.growth-route-row {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-top: 1px dotted var(--border-soft);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.growth-route-row:first-child { border-top: 0; }
.growth-route-row:active { background: var(--bg3); }
.growth-route-mark {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font: 600 11px/1 var(--font-serif);
}
.growth-route-row.ready .growth-route-mark { border-color: var(--gold); color: var(--gold); box-shadow: inset 0 -2px var(--gold-dim); }
.growth-route-copy { min-width: 0; }
.growth-route-copy b { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 11px; }
.growth-route-copy b i { color: var(--gold-dim); font-size: 9px; font-style: normal; font-weight: 400; }
.growth-route-copy small { display: block; margin-top: 2px; color: var(--text-dim); font-size: 9px; line-height: 1.45; }
.growth-route-row > em { color: var(--gold); font-size: 9px; font-style: normal; white-space: nowrap; }
.attribute-breakdown { margin-top: 8px; }
.attribute-breakdown-body { padding-top: 2px; }
.attribute-ledger-row { padding: 8px 0; border-bottom: 1px dotted var(--border-soft); }
.attribute-ledger-row:last-child { border-bottom: 0; }
.attribute-ledger-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.attribute-ledger-head b { color: var(--text); font-size: 12px; }
.attribute-ledger-head strong { color: var(--gold); font: 600 15px/1 var(--font-serif); }
.attribute-sources { display: flex; flex-wrap: wrap; gap: 3px 9px; margin-top: 5px; }
.attribute-source { color: var(--text-dim); font-size: 9px; line-height: 1.45; }
.attribute-source b { color: var(--ok); font-weight: 500; }
.attribute-source.negative,
.attribute-source.negative b { color: var(--red); }
.attribute-source.empty { font-style: italic; }
.attribute-modifier {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dotted var(--red);
  color: var(--red);
  font-size: 9px;
}
.attribute-modifier span { font-variant-numeric: tabular-nums; }
.fellow-item { cursor: default; border-left-color: var(--gold-dim); }
.fellow-item:active { background: var(--bg2); }
.fellow-item .li-name .dim { font-size: 10px; font-weight: 400; }
.fellow-item .fellow-tag { color: var(--gold); border-color: var(--gold-dim); }

/* —— 众生榜：公开排行摘要，不把榜单扩成离线名帖 —— */
.leaderboard-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 10px;
}
.leaderboard-tabs button {
  min-width: 0;
  min-height: 32px;
  padding: 5px 3px;
  border: 1px solid var(--border-soft);
  background: var(--bg3);
  color: var(--text-dim);
  font: 11px var(--font);
  cursor: pointer;
}
.leaderboard-tabs button.active { border-color: var(--gold); color: var(--gold); box-shadow: inset 2px 0 var(--gold); }
.leaderboard-summary { margin-bottom: 8px; }
.leaderboard-summary p { margin: 0 0 3px; color: var(--text); font-size: 12px; line-height: 1.55; }
.leaderboard-summary span { color: var(--text-dim); font-size: 9px; }
.leaderboard-list { display: grid; gap: 4px; }
.leaderboard-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 45px;
  padding: 6px 8px;
  border: 1px solid var(--border-soft);
  background: var(--bg3);
}

button.leaderboard-row { width: 100%; text-align: left; color: inherit; cursor: pointer; }
button.leaderboard-row:hover { transform: translateY(-1px); filter: brightness(1.06); }
.leaderboard-avatar { display:grid; place-items:center; width:34px; height:34px; flex:0 0 34px; border-radius:50%; background:#33473a; color:#f0d38e; font-weight:800; }

.profile-legend { margin: 12px 0 6px; padding: 12px 14px; border-left: 3px solid var(--gold, #b99143); background: rgba(185,145,67,.1); font-weight: 700; line-height: 1.7; }
.chat-person { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.chat-person:hover .cn { text-decoration: underline; }
.stall-head { display:flex; justify-content:space-between; gap:12px; margin-bottom:12px; color:var(--muted); }
.stall-list-form { margin: 10px 0 16px; padding: 12px; border: 1px solid var(--line); }
.stall-list-form label, .stall-buy label { display:grid; gap:5px; margin:10px 0; }
.stall-list-form input, .stall-list-form select, .stall-buy input { width:100%; box-sizing:border-box; padding:9px; }
.stall-item { display:grid; grid-template-columns:1fr auto; gap:12px; padding:13px; margin:9px 0; border:1px solid var(--line); background:rgba(255,255,255,.03); }
.stall-item div { display:grid; gap:5px; }
.stall-item p { margin:0; color:var(--muted); }
.stall-item strong { color:#c59a43; }
.friend-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:7px; margin:8px 0; }
.friend-row > button:first-child { display:flex; justify-content:space-between; gap:8px; text-align:left; }
.friend-row.pending { grid-template-columns:1fr; opacity:.8; }
.leaderboard-row.mine { border-color: var(--gold); box-shadow: inset 3px 0 var(--gold); }
.leaderboard-rank { color: var(--text-dim); font: 18px var(--font-serif); text-align: center; }
.leaderboard-row.rank-1 .leaderboard-rank,
.leaderboard-row.rank-2 .leaderboard-rank,
.leaderboard-row.rank-3 .leaderboard-rank { color: var(--gold); }
.leaderboard-person { min-width: 0; }
.leaderboard-person b, .leaderboard-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-person b { color: var(--text); font-size: 12px; }
.leaderboard-person small { margin-top: 2px; color: var(--text-dim); font-size: 9px; }
.leaderboard-row > strong { color: var(--gold); font-size: 11px; font-weight: 500; white-space: nowrap; }
.leaderboard-mine {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px solid var(--gold-dim);
  background: var(--bg3);
}
.leaderboard-mine span { grid-row: 1 / 3; align-self: center; color: var(--text-dim); font-size: 10px; }
.leaderboard-mine b, .leaderboard-mine strong { text-align: right; }
.leaderboard-mine b { color: var(--gold); font-size: 12px; }
.leaderboard-mine strong { color: var(--text-dim); font-size: 9px; font-weight: 400; }
.leaderboard-mine.empty { border-color: var(--border-soft); }

/* —— 聊天 —— */
.chat-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-tabs .tab {
  flex: 1;
  padding: 11px 8px;
  min-height: 40px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
}
.chat-tabs .tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 500;
}
.chat-meta {
  font-size: 11px;
  color: var(--text-dim);
  margin: -2px 0 6px;
  line-height: 1.4;
  flex-shrink: 0;
}
.chat-view {
  display: none !important;
  flex-direction: column;
  height: 100%;
  padding-bottom: 0 !important;
  box-sizing: border-box;
}
.chat-view.active { display: flex !important; }
.chat-log {
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 13px;
  line-height: 1.6;
  padding: 2px 2px 10px;
  margin-bottom: 0;
}
.chat-line { margin-bottom: 9px; word-break: break-word; }
.chat-line .cn { color: var(--cyan); font-weight: 500; }
.chat-line .cm { color: var(--text); }
.chat-line .ct {
  color: var(--text-dim);
  font-size: 10px;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.chat-line.me .cn { color: var(--gold); }
.chat-empty {
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  padding: 32px 14px;
  line-height: 1.7;
}
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 8px 0 calc(8px + var(--safe-b));
  border-top: 1px solid var(--border-soft);
  background: var(--bg);
  flex-shrink: 0;
  align-items: center;
}
.chat-input-row input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  outline: none;
  font-family: var(--font);
}
.chat-input-row input:focus { border-color: var(--gold-dim); }
.chat-input-row .btn {
  flex-shrink: 0;
  min-width: 56px;
  min-height: 44px;
}

/* —— 底栏 —— */
#tabbar {
  display: flex;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: linear-gradient(180deg, #141922, var(--bg2));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 5;
}
.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 10px;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  letter-spacing: 0.04em;
  position: relative;
  padding: 6px 0 4px;
  min-width: 0;
}
.tab-btn .tab-ico {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.75;
  line-height: 1.1;
}
.tab-btn.active { color: var(--gold); }
.tab-btn.active .tab-ico { opacity: 1; }
.tab-btn:active { background: rgba(255, 255, 255, 0.03); }
.tab-badge {
  position: absolute;
  top: 3px;
  right: max(10%, 8px);
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  line-height: 15px;
  text-align: center;
  font-weight: 600;
}
.tab-badge.hidden { display: none; }

/* —— 新角色：真实首页随行动逐层出现 —— */
html[data-interface-intro="0"] #status-bar .sb-status > :not(.sb-left),
html[data-interface-intro="0"] #status-bar .sb-left > :not(#sb-name),
html[data-interface-intro="1"] #status-bar .sb-status > :not(.sb-left),
html[data-interface-intro="1"] #status-bar .sb-left > :not(#sb-name),
html[data-interface-intro="2"] #status-bar .sb-status > :not(.sb-left),
html[data-interface-intro="2"] #status-bar .sb-left > :not(#sb-name),
html[data-interface-intro="3"] #status-bar .sb-status > :not(.sb-left),
html[data-interface-intro="3"] #status-bar .sb-left > :not(#sb-name),
html[data-interface-intro="4"] #status-bar .sb-status > :not(.sb-left),
html[data-interface-intro="4"] #status-bar .sb-left > :not(#sb-name),
html[data-interface-intro="5"] #status-bar .sb-status > :not(.sb-left),
html[data-interface-intro="5"] #status-bar .sb-left > :not(#sb-name),
html[data-interface-intro="0"] #bars,
html[data-interface-intro="1"] #bars,
html[data-interface-intro="2"] #bars,
html[data-interface-intro="3"] #bars,
html[data-interface-intro="4"] #bars,
html[data-interface-intro="5"] #bars,
html[data-interface-intro="0"] #tabbar,
html[data-interface-intro="1"] #tabbar,
html[data-interface-intro="2"] #tabbar,
html[data-interface-intro="3"] #tabbar { display: none !important; }

html[data-interface-intro="0"] #view-scene > *,
html[data-interface-intro="1"] #view-scene > :not(.scene-location),
html[data-interface-intro="2"] #view-scene > :not(.scene-location):not(.scene-presence),
html[data-interface-intro="3"] #view-scene > :not(.scene-location):not(.scene-presence):not(#scene-footprints),
html[data-interface-intro="4"] #view-scene > :not(.scene-location):not(.scene-presence):not(#scene-footprints),
html[data-interface-intro="5"] #view-scene > :not(.scene-location):not(.movement-panel):not(.scene-presence):not(#scene-footprints) {
  display: none !important;
}
html[data-interface-intro="1"] .scene-location,
html[data-interface-intro="2"] .scene-presence,
html[data-interface-intro="3"] #scene-footprints,
html[data-interface-intro="4"] #tabbar,
html[data-interface-intro="5"] .movement-panel {
  animation: interface-reveal .55s ease both;
}
html[data-interface-intro="1"] .scene-location #loc-insight,
html[data-interface-intro="2"] .scene-location #loc-insight,
html[data-interface-intro="3"] .scene-location #loc-insight,
html[data-interface-intro="4"] .scene-location #loc-insight,
html[data-interface-intro="5"] .scene-location #loc-insight,
html[data-interface-intro="1"] .scene-location #loc-flags,
html[data-interface-intro="2"] .scene-location #loc-flags,
html[data-interface-intro="3"] .scene-location #loc-flags,
html[data-interface-intro="4"] .scene-location #loc-flags,
html[data-interface-intro="5"] .scene-location #loc-flags,
html[data-interface-intro="2"] .movement-panel #btn-map-scene,
html[data-interface-intro="2"] .movement-panel .scene-mount-line,
html[data-interface-intro="2"] .movement-panel #exit-labels,
html[data-interface-intro="2"] .movement-panel #world-gates,
html[data-interface-intro="3"] .movement-panel #btn-map-scene,
html[data-interface-intro="3"] .movement-panel .scene-mount-line,
html[data-interface-intro="3"] .movement-panel #exit-labels,
html[data-interface-intro="3"] .movement-panel #world-gates,
html[data-interface-intro="4"] .movement-panel #btn-map-scene,
html[data-interface-intro="4"] .movement-panel .scene-mount-line,
html[data-interface-intro="4"] .movement-panel #exit-labels,
html[data-interface-intro="4"] .movement-panel #world-gates,
html[data-interface-intro="5"] .movement-panel #btn-map-scene,
html[data-interface-intro="5"] .movement-panel .scene-mount-line,
html[data-interface-intro="5"] .movement-panel #exit-labels,
html[data-interface-intro="5"] .movement-panel #world-gates { display: none !important; }
html[data-interface-intro="1"] #loc-desc,
html[data-interface-intro="2"] #loc-desc,
html[data-interface-intro="3"] #loc-desc,
html[data-interface-intro="4"] #loc-desc,
html[data-interface-intro="5"] #loc-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
html[data-interface-intro="2"] .scene-presence > *,
html[data-interface-intro="3"] .scene-presence > *,
html[data-interface-intro="4"] .scene-presence > *,
html[data-interface-intro="5"] .scene-presence > * { display: none !important; }
html[data-interface-intro="2"] .scene-presence #sec-npcs,
html[data-interface-intro="3"] .scene-presence #sec-npcs,
html[data-interface-intro="4"] .scene-presence #sec-npcs,
html[data-interface-intro="5"] .scene-presence #sec-npcs { display: block !important; }
html[data-interface-intro="2"] .scene-presence .hidden,
html[data-interface-intro="3"] .scene-presence .hidden,
html[data-interface-intro="4"] .scene-presence .hidden,
html[data-interface-intro="5"] .scene-presence .hidden { display: none !important; }
html[data-interface-intro="3"] #scene-footprints #sec-moments,
html[data-interface-intro="4"] #scene-footprints #sec-moments,
html[data-interface-intro="5"] #scene-footprints #sec-moments { display: none !important; }
html[data-interface-intro="0"] #screen,
html[data-interface-intro="1"] #screen,
html[data-interface-intro="2"] #screen,
html[data-interface-intro="3"] #screen { padding-bottom: 0; }

.modal.interface-intro-modal #modal-close { display: none; }
.modal.interface-intro-modal.story-result .modal-card {
  isolation: isolate;
  justify-content: flex-start;
}
.modal.interface-intro-modal.story-result .modal-card::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: clamp(54px, 9vh, 92px);
  left: 50%;
  width: clamp(116px, 28vw, 172px);
  aspect-ratio: 1;
  border: 1px solid rgba(204, 175, 105, .32);
  border-radius: 50%;
  box-shadow:
    0 0 0 12px rgba(204, 175, 105, .035),
    0 0 0 34px rgba(204, 175, 105, .022),
    inset 0 0 38px rgba(0, 0, 0, .58),
    0 0 48px rgba(176, 143, 70, .08);
  transform: translateX(-50%);
}
.modal.interface-intro-modal.story-result .story-reveal {
  flex: 0 0 auto;
  min-height: 0;
  margin-top: clamp(168px, 30vh, 270px);
  cursor: default;
}
.modal.interface-intro-modal.story-result .story-reveal-rule,
.modal.interface-intro-modal.story-result .story-reveal-cue { display: none; }
.modal.interface-intro-modal.story-result .story-reveal-lines {
  min-height: 0;
  gap: 12px;
  padding: 17px 18px 19px;
  border-left: 2px solid rgba(210, 181, 108, .72);
  background: linear-gradient(90deg, rgba(6, 9, 7, .76), rgba(6, 9, 7, .30) 72%, transparent);
  box-shadow: -12px 0 34px rgba(0, 0, 0, .18);
}
.modal.interface-intro-modal.story-result .modal-body { display: none; }
.modal.interface-intro-modal.story-result .modal-actions {
  width: min(100%, 280px);
  align-self: center;
  margin: 30px 0 0;
}
.modal.interface-intro-modal .modal-actions .btn {
  position: relative;
  min-height: 54px;
  padding: 12px 34px;
  overflow: hidden;
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
  border-color: #ad9253;
  background: linear-gradient(180deg, rgba(38, 38, 29, .92), rgba(12, 15, 12, .96));
  color: #f1dfb3;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .14em;
  box-shadow: inset 0 0 0 3px rgba(9, 12, 9, .88), inset 0 0 0 4px rgba(196, 164, 89, .24), 0 10px 28px rgba(0, 0, 0, .34);
  transition: filter .16s ease, transform .08s ease, box-shadow .16s ease;
}
.modal.interface-intro-modal .modal-actions .btn::before,
.modal.interface-intro-modal .modal-actions .btn::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 14px;
  height: 1px;
  background: #c7aa64;
  box-shadow: 0 -3px rgba(199, 170, 100, .34), 0 3px rgba(199, 170, 100, .34);
}
.modal.interface-intro-modal .modal-actions .btn::before { left: 13px; }
.modal.interface-intro-modal .modal-actions .btn::after { right: 13px; }
.modal.interface-intro-modal .modal-actions .btn:hover { filter: brightness(1.14); }
.modal.interface-intro-modal .modal-actions .btn:active {
  transform: translateY(2px);
  filter: brightness(.92);
  box-shadow: inset 0 0 0 3px rgba(9, 12, 9, .92), inset 0 0 0 4px rgba(196, 164, 89, .32), 0 4px 12px rgba(0, 0, 0, .4);
}
html[data-theme="paper"] .modal.interface-intro-modal .modal-actions .btn.primary {
  background: #fff;
  border-color: #343630;
  color: #20221e;
  box-shadow: inset 3px 0 #343630;
}
@keyframes interface-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mark-ok { color: var(--ok); font-size: 12px; }
.mark-turnin {
  display: inline-block;
  margin-left: 3px;
  color: #b3261e;
  font: 800 16px/1 var(--font);
  text-shadow: 0 0 1px rgba(111, 16, 12, .35);
  animation: quest-turnin-blink 1.8s steps(2, end) infinite;
}
@keyframes quest-turnin-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .38; }
}
@media (prefers-reduced-motion: reduce) {
  .mark-turnin { animation: none; }
}
.mark-q { color: #d0b060; font-size: 12px; }
.mark-new { color: var(--gold); font-size: 10px; }
.mark-objective { color: #d6b86f; font-size: 10px; }
.mark-thread { color: #b6c98a; font-size: 11px; }
.mark-lamp { color: #d9a951; font-size: 10px; }
.npc-community-teaser {
  margin-top: 4px;
  color: #a98f63;
  font-size: 10px;
  line-height: 1.5;
}
.npc-routine {
  margin-top: 5px;
  color: #8f9691;
  font-size: 10px;
  line-height: 1.55;
}
.npc-routine span {
  margin-right: 5px;
  color: #788d75;
}
.npc-moment-note span {
  display: block;
  margin-bottom: 3px;
  color: var(--gold-dim);
  font-size: 9px;
  letter-spacing: .12em;
}
.npc-moment-note p { margin: 0; color: var(--text); font: 13px/1.75 var(--font-serif); }
.npc-info-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 11px;
}
.npc-person-intro { margin-bottom: 10px; }
.npc-person-intro p { margin: 0; color: var(--text-dim); font-size: 12px; line-height: 1.65; }
.npc-person-intro p + p { margin-top: 3px; }
.npc-person-intro p span { margin-right: 7px; color: var(--gold-dim); font-size: 10px; letter-spacing: .1em; }
.npc-info-tabs button {
  min-width: 64px;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg2);
  color: var(--text-dim);
  font: 11px/1.2 var(--font-serif);
  cursor: pointer;
}
.npc-info-tabs button[aria-expanded="true"] {
  border-color: var(--gold-dim);
  box-shadow: inset 0 -2px 0 var(--gold-dim);
  color: var(--gold);
}
.npc-info-tabs .npc-combat-shortcut {
  border-color: color-mix(in srgb, var(--danger) 70%, var(--border));
  color: var(--danger);
}
.npc-info-tabs .npc-combat-shortcut:active { background: color-mix(in srgb, var(--danger) 9%, var(--bg2)); }
.npc-info-stage { min-height: 0; }
.npc-info-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0 0 11px;
  padding: 11px 13px;
  border-left: 3px solid var(--gold-dim);
  background: color-mix(in srgb, var(--gold) 7%, var(--bg2));
  box-shadow: 0 7px 20px rgba(0, 0, 0, .12);
}
.npc-info-panel::after {
  position: absolute;
  z-index: -1;
  top: -45px;
  right: -25px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 13%, transparent), transparent 68%);
  content: '';
}
.npc-info-panel.revealed { animation: npc-short-note 10s cubic-bezier(.2, .8, .2, 1) both; }
.npc-info-panel.revealed::after { animation: npc-ink-bloom 10s ease-out both; }
.npc-info-panel > :first-child { margin-top: 0; }
.npc-info-panel > :last-child { margin-bottom: 0; }
.npc-tale-response { display: grid; gap: 7px; }
.npc-tale-response .npc-response-prompt { margin: 0 0 2px; }
html:not([data-theme="classic"]) .modal-body .npc-info-panel .dialog {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 13px/1.75 var(--font-serif);
}
html[data-theme="paper"] .npc-info-tabs button {
  border-color: #202520;
  background: #fff;
  color: #343934;
}
html[data-theme="paper"] .npc-info-tabs button[aria-expanded="true"] {
  border-color: #356d42;
  box-shadow: inset 0 -2px 0 #356d42;
  color: #245d32;
}
html[data-theme="paper"] .npc-info-tabs .npc-combat-shortcut { border-color: #7a2727; color: #7a2727; }
html[data-theme="paper"] .npc-info-panel {
  border-left-color: #356d42;
  background: #f4f7f2;
  box-shadow: 0 7px 20px rgba(25, 38, 27, .09);
}
@keyframes npc-short-note {
  0% { opacity: 0; transform: translateY(-6px) scale(.985); clip-path: inset(0 0 100% 0); }
  3%, 90% { opacity: 1; transform: none; clip-path: inset(0); }
  100% { opacity: 0; transform: translateY(-3px); clip-path: inset(0 0 12% 0); }
}
@keyframes npc-ink-bloom {
  0% { opacity: 0; transform: scale(.45); }
  5%, 90% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .npc-info-panel.revealed,
  .npc-info-panel.revealed::after { animation: none; }
}
.first-choice-echo {
  margin: 9px 0;
  padding: 9px 11px;
  border: 1px solid #594923;
  border-left: 2px solid var(--gold);
  background: #19160d;
  color: #d1c49f;
  font-size: 12px;
  line-height: 1.65;
}
.first-choice-echo span {
  display: block;
  margin-bottom: 3px;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: .12em;
}
.fellow-witness {
  margin: 9px 0;
  padding: 9px 11px;
  border: 1px solid #405a49;
  border-left: 2px solid #6f9b7c;
  background: #101a14;
  color: #c2d3c6;
  font-size: 12px;
  line-height: 1.65;
}
.fellow-witness-title {
  margin-bottom: 3px;
  color: #78a987;
  font-size: 9px;
  letter-spacing: .12em;
}
.npc-choice-echo,
.npc-choice-echo-hint {
  margin: 10px 0;
  padding: 10px 11px;
  border: 1px solid #4f5d3d;
  border-left: 2px solid #8da461;
  background: #14190f;
  color: #cbd6ba;
  font-size: 12px;
  line-height: 1.65;
}
.npc-choice-echo-title {
  margin-bottom: 4px;
  color: #a8bc78;
  font-size: 9px;
  letter-spacing: .11em;
}
.npc-choice-origin { margin-bottom: 5px; color: #9da78e; font-size: 10px; }
.npc-choice-echo-hint { border-style: dashed; }
.npc-response-prompt {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #4d432a;
  color: #c8b982;
  font-size: 11px;
  line-height: 1.6;
}
.response-choice-made {
  margin: 2px 0 9px;
  color: #c8b982;
  font-size: 11px;
  line-height: 1.6;
}
.opening-body { white-space: pre-wrap; }
.opening-result { margin-bottom: 13px; }
.opening-mark {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: .12em;
  text-align: center;
}
.opening-result blockquote {
  margin: 10px 0;
  padding: 9px 11px;
  border-left: 2px solid var(--gold-dim);
  color: #d5c79c;
  font-family: var(--font-serif);
  line-height: 1.7;
}
.opening-quest {
  margin: 12px 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.return-greeting {
  display: grid;
  gap: 10px;
}
.return-time {
  color: var(--gold-dim);
  font-size: 11px;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 8px;
}
.return-arrival {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.75;
}
.return-person {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 8px;
}
.return-person b { color: var(--gold); font-size: 16px; }
.return-person span { color: var(--text-dim); font-size: 12px; }
.return-person em {
  color: var(--san);
  border: 1px solid rgba(128, 96, 160, 0.45);
  padding: 1px 5px;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.08em;
}
.return-chronicle {
  border: 1px solid var(--border-soft);
  background: rgba(16, 14, 12, 0.65);
  padding: 9px 10px;
}
.return-chronicle p { color: var(--text-dim); font-size: 12px; line-height: 1.65; }
.return-quiet {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.65;
  border-left: 2px solid var(--border);
  padding-left: 9px;
}
.first-choice-stat .sv {
  color: #cdbf94;
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.6;
}

.panel-hint {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.55;
  margin: -4px 0 12px;
  padding: 8px 10px;
  background: var(--bg4);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--gold-dim);
}

.reward-box {
  margin-top: 10px;
  padding: 10px 12px;
  background: #0d1814;
  border: 1px solid #2a4a38;
  border-radius: var(--radius-sm);
  color: var(--cyan);
  font-size: 13px;
  line-height: 1.6;
}
.reward-box .rb-title {
  color: var(--gold);
  font-size: 12px;
  margin-bottom: 4px;
  letter-spacing: 0.1em;
}

.story-card {
  padding: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.story-card .sc-title {
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.story-card .sc-body {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
}
.story-prose {
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: var(--text);
  margin: 8px 0;
}
.person-met-note {
  margin: 9px 0;
  padding: 7px 9px;
  border-left: 2px solid var(--gold);
  background: #18150d;
  color: #d8c58d;
  font-size: 11px;
  line-height: 1.55;
}
.people-journal { display: grid; gap: 7px; }
.people-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}
.people-progress > div {
  padding: 8px 3px;
  background: #15171d;
  text-align: center;
}
.people-progress strong, .people-progress span { display: block; }
.people-progress strong { color: var(--gold); font-size: 14px; font-weight: 500; }
.people-progress span { margin-top: 2px; color: var(--text-dim); font-size: 9px; }
.person-entry {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--border-soft);
  border-left: 2px solid #4a3d22;
  border-radius: 0;
  background: var(--bg2);
  color: var(--text);
  font-family: inherit;
  text-align: left;
}
.person-entry.met { cursor: pointer; }
.person-entry.met:active { background: var(--bg3); border-left-color: var(--gold); }
.person-entry.locked { opacity: .65; border-left-color: var(--border); }
.person-sigil {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin-right: 9px;
  border: 1px solid #51452b;
  color: var(--gold-dim);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 32px;
  text-align: center;
}
.person-entry.locked .person-sigil { border-color: var(--border); color: var(--text-dim); }
.person-summary { min-width: 0; flex: 1; }
.person-name { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.person-name span { color: var(--text-dim); font-size: 10px; font-weight: 400; }
.person-line { margin-top: 4px; color: var(--text-dim); font-size: 10px; line-height: 1.45; }
.person-open { flex: 0 0 auto; margin-left: 7px; color: var(--gold-dim); font-size: 10px; }
.person-profile > header { padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.person-nature {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-left: 2px solid var(--gold-dim);
  background: #17140d;
  color: #d8c58d;
  font-size: 12px;
  line-height: 1.65;
}
.person-section { margin-top: 15px; }
.person-section h4 {
  margin: 0 0 7px;
  color: var(--gold-dim);
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 500;
}
.person-section.thread { padding: 10px; border: 1px solid #51452b; background: #17140d; }
.person-section.echo { padding: 10px; border: 1px solid #4f5d3d; background: #14190f; }
.person-section.moment { padding: 10px; border: 1px solid #405044; background: #121914; }
.person-section.ending { padding: 9px 10px; border: 1px solid #47304d; background: #17121a; }
.person-pending {
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px dashed var(--border);
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.5;
}
.person-response { margin-top: 9px; color: var(--text-dim); font-size: 11px; line-height: 1.55; }
.person-after { margin-top: 7px; color: #b9aa7b; font-size: 11px; line-height: 1.6; }
.life-moments { display: grid; gap: 7px; }
.life-moment {
  display: grid;
  width: 100%;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid #4b5d4f;
  border-left: 2px solid #748c69;
  border-radius: 0;
  background: linear-gradient(100deg, #111812, #12151a 72%);
  color: var(--text);
  font-family: inherit;
  text-align: left;
}
.life-moment.seen { border-color: var(--border-soft); border-left-color: #56604d; }
.life-moment-kicker { color: #91a77e; font-size: 9px; letter-spacing: .1em; }
.life-moment strong { color: #d8c99b; font-family: var(--font-serif); font-size: 14px; font-weight: 500; }
.life-moment > span:not(.life-moment-kicker) { color: var(--text-dim); font-size: 11px; line-height: 1.55; }
.life-moment i { color: #87937d; font-size: 9px; font-style: normal; }
.moment-scene .story-prose { margin-top: 11px; }
.moment-after {
  margin-top: 13px;
  padding: 9px 10px;
  border-left: 2px solid #748c69;
  background: #121912;
  color: #aebd9e;
  font-size: 11px;
  line-height: 1.6;
}
.npc-thread-card {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #65542f;
  border-left: 3px solid var(--gold);
  background: linear-gradient(135deg, #17140e, #111014);
}
.npc-thread-kicker {
  color: var(--gold-dim);
  font-size: 10px;
  letter-spacing: .14em;
}
.npc-thread-title {
  margin-top: 4px;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: .08em;
}
.npc-thread-hint {
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed #65542f;
  color: var(--text);
  font-size: 12px;
  line-height: 1.65;
}
.quest-tabs { margin: -4px 0 12px; }

/* 任务卷：只在首屏摆当下行止，其余按阶段收起。 */
html:not([data-theme="classic"]) #view-quest.active {
  display: block;
  padding: 10px 14px 18px;
}
html:not([data-theme="classic"]) #view-quest .quest-page-title {
  margin: 0 2px 7px;
}
html:not([data-theme="classic"]) #view-quest .quest-tabs {
  justify-content: flex-start;
  gap: 0;
  margin: 0 0 9px;
  border-bottom: 1px solid var(--border-soft);
}
html:not([data-theme="classic"]) #view-quest .quest-tabs .tab {
  flex: 0 0 auto;
  min-width: 62px;
  min-height: 34px;
  padding: 6px 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
}
html:not([data-theme="classic"]) #view-quest .quest-tabs .tab.active {
  border-bottom-color: var(--gold);
  color: var(--gold);
}
#quest-body { display: block; }
.quest-overview {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 5px 2px 10px;
  border-bottom: 1px dotted var(--border-soft);
}
.quest-overview-mark {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  color: var(--gold-dim);
  font: 12px/1 var(--font-serif);
}
.quest-overview > div { min-width: 0; }
.quest-overview small {
  display: block;
  color: var(--gold-dim);
  font-size: 9px;
  letter-spacing: .14em;
}
.quest-overview p {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-overview p strong,
.quest-overview p b { color: var(--text); font-weight: 500; }
.quest-overview > b {
  padding: 2px 6px;
  border: 1px solid var(--border);
  color: var(--gold-dim);
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}
.quest-focus-card {
  margin: 10px 0 4px;
  padding: 10px 10px 8px;
  border-left: 2px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 6%, var(--bg2));
}
.quest-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.quest-card-title .li-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font: 13px/1.35 var(--font-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-card-tags { display: flex; flex: 0 0 auto; gap: 4px; }
.quest-card-tags .li-tag { padding: 2px 5px; font-size: 9px; }
.quest-card-next {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.quest-card-next > i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  color: var(--gold-dim);
  font: 10px/1 var(--font-serif);
  font-style: normal;
}
.quest-card-next span { min-width: 0; }
.quest-card-next small,
.quest-card-next b { display: block; }
.quest-card-next small { color: var(--text-dim); font-size: 8px; letter-spacing: .08em; }
.quest-card-next b {
  margin-top: 1px;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-focus-card > .btn { margin-top: 9px; }
.quest-focus-detail { margin-top: 6px; border-top: 1px dotted var(--border-soft); }
.quest-focus-detail > summary {
  padding: 7px 1px 1px;
  color: var(--text-dim);
  font-size: 9px;
  cursor: pointer;
  list-style: none;
}
.quest-focus-detail > summary::-webkit-details-marker { display: none; }
.quest-focus-detail > summary::after { content: '展开 ›'; float: right; color: var(--gold-dim); }
.quest-focus-detail[open] > summary::after { content: '收起 ˅'; }
.quest-shelf {
  margin: 4px 0 0;
  border-bottom: 1px solid var(--border-soft);
}
.quest-shelf > summary {
  display: flex;
  align-items: center;
  min-height: 43px;
  padding: 7px 2px;
  cursor: pointer;
  list-style: none;
}
.quest-shelf > summary::-webkit-details-marker { display: none; }
.quest-shelf > summary > span {
  color: var(--text);
  font: 12px/1.35 var(--font-serif);
}
.quest-shelf > summary > small {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 9px;
}
.quest-shelf > summary::after {
  margin-left: 8px;
  color: var(--gold-dim);
  content: '›';
  font: 12px/1 var(--font-serif);
}
.quest-shelf[open] > summary::after { content: '˅'; }
.quest-shelf[open] > summary { border-bottom: 1px dotted var(--border-soft); }
.quest-shelf-body { padding: 5px 0 8px; }
.quest-card {
  display: block;
  border-bottom: 1px dotted var(--border-soft);
}
.quest-card:last-child { border-bottom: 0; }
.quest-card > summary {
  padding: 8px 2px;
  cursor: pointer;
  list-style: none;
}
.quest-card > summary::-webkit-details-marker { display: none; }
.quest-card > summary .quest-card-next { margin-top: 5px; }
.quest-card > summary .quest-card-next > i { display: none; }
.quest-card > summary .quest-card-next { grid-template-columns: minmax(0, 1fr); }
.quest-card > summary .quest-card-next small { display: none; }
.quest-card > summary .quest-card-next b { color: var(--text-dim); font-size: 10px; font-weight: 400; }
.quest-card.is-done { opacity: .74; }
.quest-card-body {
  padding: 2px 2px 10px 32px;
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.55;
}
.quest-card-body p { margin: 2px 0 7px; }
.quest-card-person { margin-bottom: 6px; color: var(--gold-dim); }
.quest-step-list { display: grid; gap: 4px; margin: 6px 0; }
.quest-step { display: grid; grid-template-columns: 15px minmax(0, 1fr); gap: 4px; }
.quest-step i { color: var(--gold-dim); font-style: normal; }
.quest-step.done { opacity: .55; }
.quest-card-note,
.quest-card-blocker,
.quest-card-resolution { margin-top: 6px; }
.quest-card-note { color: #a080c0; }
.quest-card-blocker { color: #c08080; }
.quest-card-resolution { color: #c9ad66; }
.quest-card-body .btn { margin-top: 8px; }
.quest-shelf .world-task-list { display: grid; gap: 0; }
.quest-shelf .world-task-card {
  min-height: 42px;
  padding: 7px 2px;
  border: 0;
  border-bottom: 1px dotted var(--border-soft);
  background: transparent;
}
.quest-shelf .world-task-card:last-child { border-bottom: 0; }
.quest-shelf .world-task-card .li-name { font-size: 11px; }
.quest-shelf .world-task-card .li-sub { font-size: 9px; }
.quest-late-game { margin-top: 11px; border-top: 1px solid var(--border-soft); }
.quest-late-game > summary > span { color: var(--text-dim); }
.quest-chronicle-card {
  display: block;
  min-height: 0;
  padding: 8px 2px;
  border: 0;
  background: transparent;
  cursor: default;
}
html[data-theme="paper"] .quest-focus-card { background: #f7f7f3; }
html[data-theme="paper"] .quest-overview > b { border-color: #777b73; }
html[data-theme="paper"] .quest-shelf .world-task-card:hover { background: #f4f6f2; }
.hidden { display: none !important; }

/* —— Modal —— */
.modal {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  padding: 0;
  animation: fadein 0.14s ease;
}
.modal.hidden { display: none; }
.modal-card {
  width: 100%;
  max-height: 88%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg2);
  border-top: 2px solid var(--gold-dim);
  border-radius: 0;
  padding: 8px 16px calc(14px + var(--safe-b));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
}
.modal-grab {
  width: 40px;
  height: 3px;
  border-radius: 0;
  background: var(--border);
  margin: 4px auto 12px;
}
.modal-title {
  font-size: 16px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  line-height: 1.35;
  padding-right: 4px;
}
.modal-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
}
.modal-body:has(.map-chart-wrap) {
  margin-left: -4px;
  margin-right: -4px;
}
.modal-body .dialog {
  padding: 10px 12px;
  background: var(--bg4);
  border-left: 3px solid var(--san);
  margin: 8px 0;
  font-style: italic;
  color: #c0b8d0;
  border-radius: 0 6px 6px 0;
  line-height: 1.65;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 8px;
}
.modal-actions .btn { min-height: 44px; width: 100%; }

/* —— 渐进剧情：四句一页，像黑暗里逐笔写出的旧事 —— */
.modal.story-stage {
  align-items: stretch;
  background:
    radial-gradient(circle at 50% 42%, rgba(95, 74, 34, .16), transparent 48%),
    rgba(3, 4, 3, .91);
  backdrop-filter: blur(5px) saturate(.72);
  -webkit-backdrop-filter: blur(5px) saturate(.72);
}
.modal.story-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background-image: repeating-linear-gradient(112deg, transparent 0 8px, rgba(255,255,255,.025) 9px, transparent 10px 17px);
  mix-blend-mode: soft-light;
}
.modal.story-stage .modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: none;
  padding: max(28px, calc(var(--safe-t) + 18px)) 24px max(22px, calc(var(--safe-b) + 16px));
  border: 0;
  background: linear-gradient(180deg, rgba(5, 6, 5, .3), rgba(10, 9, 6, .68));
  box-shadow: none;
}
.modal.story-stage .modal-grab { display: none; }
.modal.story-stage .modal-title {
  flex: 0 0 auto;
  margin: 0;
  color: #d8bd74;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  opacity: .84;
}
.story-reveal {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 0 auto;
  min-height: 58vh;
  flex-direction: column;
  justify-content: center;
  outline: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.story-reveal-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  color: rgba(216, 189, 116, .58);
  font-size: 9px;
  letter-spacing: .2em;
}
.story-reveal-rule::after {
  content: '';
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, rgba(216, 189, 116, .48), transparent);
}
.story-reveal-lines {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 250px;
}
.story-reveal-line {
  margin: 0;
  color: #eee7d8;
  font-family: var(--font);
  font-size: clamp(17px, 4.8vw, 21px);
  line-height: 1.72;
  letter-spacing: .035em;
  text-wrap: pretty;
  opacity: 0;
  filter: blur(3px);
  transform: translateY(8px);
  animation: story-line-in .72s cubic-bezier(.2,.72,.18,1) forwards;
}
.story-reveal-cue {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 5px 10px;
  min-height: 45px;
  margin-top: 28px;
  color: rgba(216, 189, 116, .8);
  font-size: 11px;
  letter-spacing: .12em;
}
.story-reveal-cue i {
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  animation: story-cue 1.4s ease-in-out infinite;
}
.story-reveal-cue small {
  grid-column: 1 / -1;
  color: rgba(238, 231, 216, .38);
  font-size: 9px;
  letter-spacing: .08em;
}
.modal.story-mode .modal-body,
.modal.story-mode .modal-actions,
.modal.story-mode #modal-close { display: none; }
.modal.story-result .modal-card { overflow: hidden; }
.modal.story-result .modal-title {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(216, 189, 116, .28);
}
.modal.story-result .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -8px 12px 0;
  padding: 16px 8px 8px 0;
  -webkit-overflow-scrolling: touch;
}
.modal.story-result .story-source-read { display: none !important; }
.modal.story-result .modal-actions,
.modal.story-result #modal-close { flex: 0 0 auto; }
@keyframes story-line-in {
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}
@keyframes story-cue {
  0%, 100% { opacity: .35; transform: translateY(-2px) rotate(45deg); }
  55% { opacity: 1; transform: translateY(3px) rotate(45deg); }
}
@media (prefers-reduced-motion: reduce) {
  .story-reveal-line { animation-duration: .01ms; }
  .story-reveal-cue i { animation: none; }
}
.account-settings {
  display: grid;
  gap: 10px;
}
.account-settings > .dim {
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--border-soft);
}
.account-settings label {
  display: grid;
  gap: 5px;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: .06em;
}
.account-settings input {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 0;
  outline: 0;
  background: var(--bg4);
  color: var(--text);
  font: 14px/1.4 var(--font);
  user-select: text;
}
.account-settings input:focus {
  border-color: var(--gold-dim);
  box-shadow: inset 3px 0 var(--gold-dim);
}
.account-settings input::placeholder { color: var(--text-dim); opacity: .72; }
.font-picker { display: grid; gap: 7px; }
.font-picker > p { margin: 0 1px 3px; color: var(--text-dim); font-size: 10px; line-height: 1.6; }
.font-choice {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 82px;
  padding: 10px 11px;
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--border-soft);
  border-radius: 0;
  background: var(--bg3);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.font-choice:active { background: var(--bg4); }
.font-choice:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.font-choice.active { border-color: var(--gold-dim); border-left-color: var(--gold); }
.font-choice > span { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.font-choice > span b { color: var(--gold); font-size: 13px; }
.font-choice > span i { color: var(--text-dim); font-size: 9px; font-style: normal; }
.font-choice > strong { color: var(--text); font-size: 17px; font-weight: 500; line-height: 1.45; }
.font-choice > small { color: var(--text-dim); font: 9px/1.5 var(--font); }
.font-choice[data-font-choice="book"] > strong { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif; }
.font-choice[data-font-choice="kai"] > strong { font-family: "Kaiti SC", "STKaiti", "KaiTi", "BiauKai", "Noto Serif CJK SC", serif; }
.font-choice[data-font-choice="sans"] > strong { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }

.loading {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.78);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading.hidden { display: none; }
.loading-inner {
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.14em;
  padding: 14px 24px;
  border: 1px solid var(--gold-dim);
  border-radius: 20px;
  background: rgba(20, 24, 36, 0.96);
}
.connection-notice {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(56px + var(--safe-b));
  z-index: 180;
  padding: 8px 10px;
  border: 1px solid var(--gold-dim);
  background: rgba(20, 17, 22, 0.97);
  color: var(--gold);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}
.connection-notice.hidden { display: none; }

.action-status {
  position: absolute;
  top: 84px;
  left: 50%;
  z-index: 190;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 8px 13px;
  transform: translateX(-50%);
  border: 1px solid var(--gold-dim);
  background: rgba(20, 24, 36, 0.97);
  color: var(--gold);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.action-status.hidden { display: none; }
.action-status i {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: action-status-spin 0.7s linear infinite;
}
@keyframes action-status-spin { to { transform: rotate(360deg); } }
body.action-pending button:not(:disabled) { cursor: progress; }

body.busy-act .cbt-actions .btn,
body.busy-act .cmp-btn {
  opacity: 0.55;
  pointer-events: none;
}

/* —— Toast —— */
.toast {
  position: absolute;
  top: 26%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 12, 16, 0.96);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 10px 16px;
  border-radius: 0;
  font-size: 13px;
  z-index: 200;
  pointer-events: none;
  white-space: normal;
  text-align: center;
  line-height: 1.4;
  max-width: 84%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.06em;
}
.toast.hidden { display: none; }

/* —— 实用攻略：旧式文字网游速查页 —— */
.guide-sheet {
  display: grid;
  gap: 8px;
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 2px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.62;
}
.guide-sheet section {
  padding: 9px 10px;
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold-dim);
  background: var(--bg3);
}
.guide-sheet .guide-lead { border-left-color: var(--gold); }
.guide-lead b, .guide-lead span { display: block; }
.guide-lead b { color: var(--gold); font-size: 13px; }
.guide-lead span { margin-top: 2px; color: var(--text-dim); }
.guide-sheet h3 { margin: 0 0 5px; color: var(--gold); font: 600 13px var(--font-serif); }
.guide-sheet ol { margin: 0; padding-left: 19px; }
.guide-sheet li + li { margin-top: 3px; }
.guide-sheet p { margin: 5px 0 0; color: var(--text-dim); }
.guide-sheet li b, .guide-sheet p b { color: var(--text); }
.guide-counters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.guide-counters span { padding: 5px 6px; border: 1px dotted var(--border); color: var(--text-dim); }
.guide-counters b { color: var(--text); }
.guide-rule { padding-bottom: 7px; border-bottom: 1px dotted var(--border-soft); }
.guide-career-list, .guide-attribute-list { display: grid; gap: 6px; margin-top: 7px; }
.guide-career-card {
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--gold-dim);
  background: var(--bg2);
}
.guide-career-card header { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.guide-career-card header b { color: var(--gold); font-size: 12px; }
.guide-career-card header span { color: var(--text-dim); font-size: 9px; text-align: right; }
.guide-career-card p { margin-top: 4px; }
.guide-career-card small { display: block; margin-top: 5px; color: var(--gold-dim); font-size: 9px; }
.guide-attribute-row {
  display: grid;
  grid-template-columns: 42px 44px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px dotted var(--border-soft);
}
.guide-attribute-row:last-child { border-bottom: 0; }
.guide-attribute-row b { color: var(--gold); }
.guide-attribute-row span { color: var(--text); }
.guide-attribute-row p { margin: 0; }

/* —— 剧情 / 世界介绍：像一张可翻阅的旧志，不提前泄露选择答案 —— */
.intro-sheet {
  display: grid;
  gap: 8px;
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 2px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.62;
}
.intro-lead {
  padding: 11px 12px;
  border: 1px solid var(--gold-dim);
  background: var(--bg3);
}
.intro-lead > span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-dim);
  font-size: 9px;
  letter-spacing: 0.16em;
}
.intro-lead > b {
  display: block;
  color: var(--gold);
  font: 600 14px/1.5 var(--font-serif);
}
.intro-lead p { margin: 5px 0 0; color: var(--text-dim); }
.story-act,
.world-eras section {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg3);
}
.story-act > i,
.world-eras section > i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font: normal 12px var(--font-serif);
}
.story-act h3,
.world-laws h3,
.world-eras h3 {
  margin: 0 0 3px;
  color: var(--text);
  font: 600 12px var(--font-serif);
}
.story-act p,
.world-eras p { margin: 0; color: var(--text-dim); }
.intro-question {
  padding: 9px 11px;
  border-left: 3px solid var(--gold);
  background: var(--bg3);
}
.intro-question span { display: block; color: var(--text-dim); font-size: 9px; letter-spacing: 0.12em; }
.intro-question b { color: var(--gold); font-weight: 600; }
.world-laws {
  padding: 9px 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg3);
}
.world-laws > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.world-laws p { margin: 0; padding: 6px 7px; border: 1px dotted var(--border); color: var(--text-dim); }
.world-laws b { display: block; color: var(--gold); }
.world-eras { display: grid; gap: 6px; }
.world-eras h3 small { margin-left: 4px; color: var(--text-dim); font-size: 9px; font-weight: 400; }
.intro-shared {
  display: block;
  padding: 9px 11px;
  border-top: 1px solid var(--gold-dim);
  border-bottom: 1px solid var(--gold-dim);
}
.intro-shared b { display: block; color: var(--gold); }
.intro-shared span { display: block; margin-top: 2px; color: var(--text-dim); }

/* 社交 / 签 / 模板 / 结算 */
.s-btn {
  padding: 6px 10px;
  min-height: 32px;
  font-size: 11px;
  font-family: var(--font);
  color: #a09888;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  letter-spacing: 0.06em;
}
.s-btn:active {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: #1a1610;
}
.s-btn.assist {
  color: #d6b86f;
  border-color: #6e5828;
  background: #19150d;
}
.chip.in-combat {
  color: #d6b86f;
  border-color: #6e5828;
}
.assist-card { line-height: 1.65; }
.assist-intent {
  margin: 10px 0;
  padding: 8px 10px;
  color: #d6b86f;
  border-left: 2px solid #80662d;
  background: #15120d;
}
.assist-intent span { color: var(--text-dim); font-size: 11px; }
.cbt-allies {
  margin: 2px 0 8px;
  padding: 6px 8px;
  color: #d6b86f;
  background: #15120d;
  border-left: 2px solid #80662d;
  font-size: 11px;
  line-height: 1.5;
}
.cbt-allies.hidden { display: none; }

.monster-sighting {
  padding: 13px 14px;
  border: 1px solid #564a35;
  background: linear-gradient(145deg, #171712, #10120f);
  box-shadow: inset 3px 0 #8c7137;
}
.monster-sighting p {
  margin: 0;
  color: #e5dcc8;
  font-size: 15px;
  line-height: 1.85;
}
.monster-sighting small {
  display: block;
  margin-top: 9px;
  color: var(--text-dim);
  font-size: 11px;
}
.monster-intel {
  margin-top: 10px;
  border-top: 1px dashed var(--border);
}
.monster-intel > summary {
  padding: 9px 0 2px;
  color: var(--gold);
  font-size: 12px;
  cursor: pointer;
}

.defeat-traces {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #60484b;
}
.defeat-trace {
  margin: 8px 0;
  padding: 9px 10px;
  color: #d3bec0;
  background: #171112;
  border-left: 3px solid #854c52;
  font-size: 12px;
  line-height: 1.65;
}
.defeat-trace.own { border-left-color: #665b42; opacity: .8; }
.defeat-trace b { color: #d39196; font-weight: 500; }
.defeat-trace .row-between span { color: var(--text-dim); font-size: 10px; }
.defeat-trace small { display: block; margin-top: 5px; color: #b8a168; }

.ending-reaction {
  margin: 10px 0;
  padding: 10px 12px;
  color: #cbb8d8;
  background: linear-gradient(90deg, #17111d, #111018);
  border-left: 3px solid #76578c;
  line-height: 1.75;
  font-size: 13px;
}
.ending-reaction-title {
  margin-bottom: 5px;
  color: #a98aba;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.world-reaction {
  margin: 10px 0;
  padding: 10px 12px;
  color: #d4c9a8;
  background: linear-gradient(90deg, #17150f, #11110e);
  border-left: 3px solid #8a763f;
  line-height: 1.75;
  font-size: 13px;
}
.world-reaction-title {
  margin-bottom: 5px;
  color: #b9a466;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.ending-choice-warning {
  padding: 12px;
  color: #e0c2b2;
  background: #1b1112;
  border: 1px solid #704044;
  line-height: 1.75;
}
.ending-choice-warning b { color: #e09a8f; }
.quest-resolution {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #665326;
  border-left: 3px solid var(--gold-dim);
  background: #17140d;
  color: #d6c79e;
  font-size: 12px;
  line-height: 1.7;
}
.quest-resolution b { color: var(--gold); font-weight: 500; }
.collective-cause {
  margin: 10px 0;
  padding: 11px 12px;
  border: 1px solid #3e3a2c;
  background: #10110f;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.55;
}
.collective-cause.compact {
  margin: 8px 0 2px;
  padding: 9px 10px;
}
.collective-cause-title {
  color: #c9ad66;
  font-size: 11px;
  letter-spacing: .06em;
}
.collective-cause-text {
  margin: 5px 0 8px;
  color: #b7ad93;
  font-family: var(--font-serif);
  line-height: 1.65;
}
.cause-choice { margin-top: 7px; }
.cause-choice-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.cause-choice-line span { min-width: 0; color: #aaa18c; }
.cause-choice-line i {
  flex: 0 0 auto;
  color: #77736a;
  font-size: 10px;
  font-style: normal;
}
.cause-choice.mine .cause-choice-line span { color: var(--gold); }
.cause-track {
  height: 3px;
  margin-top: 3px;
  overflow: hidden;
  background: #29271f;
}
.cause-track span {
  display: block;
  height: 100%;
  background: #68614d;
}
.cause-choice.mine .cause-track span { background: var(--gold-dim); }
.collective-cause-foot {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #302e27;
  color: #68665f;
  font-size: 9px;
}

.daily-omen {
  margin: 10px 0 6px;
  padding: 9px 11px;
  border-left: 3px solid var(--san);
  background: #0e1018;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  line-height: 1.55;
  color: #b0a8c8;
}

.realm-system-card { gap: 6px; }
.realm-system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border); }
.realm-system-grid > div { display: grid; gap: 2px; min-width: 0; padding: 7px 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.realm-system-grid > div:nth-child(2n) { border-right: 0; }
.realm-system-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.realm-system-grid > div.current { box-shadow: inset 3px 0 0 var(--gold); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.realm-system-grid span { color: var(--text-dim); font-size: 9px; }
.realm-system-grid b { overflow: hidden; color: var(--text); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.realm-system-grid i { color: var(--text-dim); font-size: 8px; font-style: normal; }

.item-use-result { display: grid; gap: 10px; }
.item-use-result h3, .item-use-result p { margin: 0; }
.item-use-changes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border); }
.item-use-changes > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; min-width: 0; padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.item-use-changes > div:nth-child(2n) { border-right: 0; }
.item-use-changes > div:nth-last-child(-n+2) { border-bottom: 0; }
.item-use-changes span { color: var(--text-dim); font-size: 10px; }
.item-use-changes b { font-size: 15px; }
.item-use-changes b.gain { color: var(--gold); }
.item-use-changes b.loss { color: var(--danger); }
.item-use-changes i { grid-column: 1 / -1; color: var(--text-dim); font-size: 9px; font-style: normal; }
.item-use-progress { margin-top: 8px !important; padding: 7px 9px; border-left: 3px solid var(--gold); background: var(--bg3); color: var(--text); font-size: 11px; }
.item-use-empty, .item-use-foot { color: var(--text-dim); font-size: 10px; }

.npc-community-card {
  margin: 11px 0 6px;
  padding: 12px;
  border: 1px solid #5d482a;
  border-left: 3px solid #b47d34;
  background: linear-gradient(120deg, #19140d, #11110f 72%);
  color: #d3c5a3;
}
.npc-community-card.compact { padding: 10px; }
.npc-community-kicker {
  margin-bottom: 5px;
  color: #b58a49;
  font-size: 9px;
  letter-spacing: .1em;
}
.npc-community-card > strong {
  display: block;
  color: #dfc17e;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
}
.npc-community-body {
  margin-top: 7px;
  color: #c8bea8;
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.npc-community-card .dialog { margin: 10px 0 0; border-left-color: #9b7137; }
.npc-community-foot {
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px dashed #40331f;
  color: #756c5b;
  font-size: 9px;
  line-height: 1.5;
}

.chat-templates {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin: 0 0 8px;
  padding: 0 1px 2px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
  scrollbar-width: none;
}
.chat-templates::-webkit-scrollbar { display: none; }
.chat-templates button {
  flex-shrink: 0;
  font-size: 11px;
  padding: 6px 10px;
  min-height: 30px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: #a09888;
  font-family: var(--font);
  white-space: nowrap;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.chat-templates button:active {
  border-color: var(--gold-dim);
  color: var(--gold);
}

.broadcast-toast {
  position: absolute;
  top: calc(10% + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 12, 28, 0.96);
  border: 1px solid #6a4a80;
  box-shadow: 0 4px 24px rgba(80, 40, 120, 0.28);
  color: #d0b0e8;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 12px;
  z-index: 180;
  max-width: 90%;
  text-align: center;
  line-height: 1.45;
  pointer-events: none;
  word-break: break-word;
}
.broadcast-toast.hidden { display: none; }

.settlement-card {
  border: 1px solid #6a5a20;
  background: linear-gradient(180deg, #16140e, #0e0c08);
  padding: 14px 12px;
  border-radius: var(--radius);
  margin-top: 2px;
}
.settlement-card .sc-kicker {
  font-size: 10px;
  color: var(--gold-dim);
  letter-spacing: 0.2em;
  margin-bottom: 4px;
}
.settlement-card .sc-tag {
  color: var(--gold);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.settlement-card .sc-line {
  color: #c0a870;
  font-size: 13px;
  font-style: italic;
  margin-bottom: 10px;
  line-height: 1.5;
}
.settlement-card .sc-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 0;
  white-space: pre-wrap;
}
.settlement-card .sc-share {
  margin-top: 12px;
  padding: 10px;
  background: #0a0c10;
  border: 1px dashed #3a4030;
  font-size: 11px;
  color: #9a9a80;
  white-space: pre-wrap;
  border-radius: 4px;
  user-select: all;
  -webkit-user-select: all;
  line-height: 1.5;
}
.combat-settlement-rewards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  border: 1px solid var(--border);
  background: var(--border);
}
.combat-settlement-rewards.reward-count-1 {
  grid-template-columns: 1fr;
}
.combat-settlement-rewards.reward-count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.combat-settlement-rewards.reward-count-4 > div:nth-child(4) {
  grid-column: 1 / -1;
}
.combat-settlement-rewards > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 6px;
  background: var(--bg3);
  text-align: center;
}
.combat-settlement-rewards span {
  color: var(--text-dim);
  font-size: 9px;
  letter-spacing: .08em;
}
.combat-settlement-rewards b {
  overflow-wrap: anywhere;
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
}
.tip-copy {
  margin-top: 10px !important;
  font-size: 11px !important;
  text-align: center;
}

/* 理智侵蚀 */
body.low-san #phone {
  filter: saturate(0.72) hue-rotate(-8deg);
}
body.low-san .prose {
  text-shadow: 0 0 8px rgba(120, 60, 160, 0.28);
}
body.critical-san #phone {
  filter: saturate(0.42) hue-rotate(-22deg) contrast(1.08);
}
body.critical-san::after {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 48%, rgba(40, 0, 60, 0.28) 100%);
  z-index: 50;
}

/* 世界相位 / 旁门 */
.world-strip {
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--san);
  background: var(--bg4);
  font-size: 11px;
  color: #a090a8;
  line-height: 1.45;
  letter-spacing: 0.04em;
}
.world-strip.hidden { display: none; }
.world-strip b { color: var(--gold); font-weight: 500; }
.world-strip .ws-gaze { color: #b080a0; }
.world-chronicle {
  width: 100%;
  display: block;
  margin: 0 0 12px;
  padding: 9px 10px 8px;
  border: 1px solid #40352b;
  border-left: 2px solid #9e7645;
  border-radius: 0;
  background: linear-gradient(100deg, #17130f, #100d11);
  color: var(--text);
  font-family: inherit;
  text-align: left;
}
.world-chronicle.hidden { display: none; }
.wc-head,
.wc-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.wc-head { justify-content: space-between; margin-bottom: 5px; }
.wc-head b { color: var(--gold); font-size: 12px; font-weight: 500; letter-spacing: .12em; }
.wc-head i { color: #766c62; font-size: 10px; font-style: normal; }
.wc-row { padding: 3px 0; font-size: 10px; line-height: 1.45; }
.wc-row em { flex: 0 0 auto; color: #a98759; font-style: normal; }
.wc-row span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #aaa09a;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wc-row time { flex: 0 0 auto; color: #665f5b; }
.wc-more { display: block; margin-top: 5px; color: #8d7489; font-size: 10px; text-align: right; }
.chronicle-list { margin-top: 12px; border-top: 1px solid var(--border-soft); }
.chronicle-row { padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.chronicle-row > div { display: flex; justify-content: space-between; gap: 10px; }
.chronicle-row b { color: var(--gold); font-size: 11px; font-weight: 500; }
.chronicle-row time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.chronicle-row p { margin: 5px 0 0; color: var(--text2); font-size: 12px; line-height: 1.65; }
.world-crisis-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding: 7px 0 1px;
  border: 0;
  border-top: 1px solid #3a2940;
  background: transparent;
  color: #d0a868;
  font: inherit;
  text-align: left;
}
.world-crisis-btn span:last-child { color: #b080a0; white-space: nowrap; }
.crisis-meter {
  height: 7px;
  margin: 12px 0 6px;
  border: 1px solid #49354d;
  background: #08060a;
}
.crisis-meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6a304f, #c69655);
}
.crisis-choice-box {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #54472d;
  background: #12110e;
}
.crisis-choices { display: grid; gap: 6px; margin-top: 8px; }
.crisis-choice {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg3);
  color: var(--text);
  font-family: inherit;
  text-align: left;
}
.crisis-choice > span { display: flex; justify-content: space-between; gap: 8px; }
.crisis-choice b { color: var(--gold-dim); font-size: 12px; font-weight: 500; }
.crisis-choice i { color: var(--text-dim); font-size: 10px; font-style: normal; white-space: nowrap; }
.crisis-choice small { display: block; margin-top: 5px; color: var(--text-dim); font-size: 10px; line-height: 1.55; }
.crisis-choice.selected { border-color: var(--gold); background: #1a170f; }
.crisis-choice.won { border-color: #758b4f; box-shadow: inset 3px 0 #8fa762; }
.crisis-choice:disabled { opacity: 1; cursor: default; }
.crisis-chronicle {
  margin-top: 12px;
  border-top: 1px dashed var(--border);
  color: var(--text-dim);
  font-size: 10px;
}
.crisis-chronicle summary { padding: 9px 0; color: var(--gold-dim); cursor: pointer; }
.crisis-chronicle-row { padding: 7px 0; border-top: 1px solid var(--border-soft); line-height: 1.5; }
.crisis-chronicle-row b, .crisis-chronicle-row span { display: block; }
.crisis-chronicle-row b { color: var(--text); font-weight: 500; }
.sys-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--border);
}
.sys-row .s-btn {
  flex: 1;
  min-width: 30%;
  border: none;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  min-height: 40px;
}
.sys-row .s-btn:last-child { border-right: none; }
.sec-systems.hidden { display: none; }
.lore-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.lore-item .li-name { color: var(--gold); font-size: 13px; margin-bottom: 4px; }
.lore-item .li-body { font-size: 12px; color: var(--text); line-height: 1.7; }
.lore-item.locked .li-name { color: var(--text-dim); }
.lore-item.locked .li-body { color: var(--text-dim); font-style: italic; }

.supply-wallet,
.supply-source,
.supply-contract,
.supply-card {
  border: 1px solid var(--border);
  background: var(--bg2);
}
.supply-wallet { display: flex; align-items: center; justify-content: space-between; padding: 12px; }
.supply-wallet span { color: var(--text-dim); font-size: 12px; }
.supply-wallet b { color: var(--gold); font-size: 22px; }
.supply-source { margin-top: 10px; padding: 10px 12px; }
.supply-source b,
.supply-source span { display: block; }
.supply-source b { color: var(--ok); font-size: 12px; margin-bottom: 4px; }
.supply-source span { font-size: 12px; line-height: 1.65; }
.supply-section { margin-top: 16px; }
.supply-section h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 7px; font-size: 14px; }
.supply-section h3 small { color: var(--text-dim); font-size: 11px; font-weight: normal; }
.supply-contract,
.supply-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; margin-top: 6px; }
.supply-contract b,
.supply-contract small,
.supply-contract em,
.supply-card b,
.supply-card small,
.supply-card em { display: block; }
.supply-contract small,
.supply-card small { color: var(--text-dim); font-size: 11px; line-height: 1.55; margin-top: 3px; }
.supply-contract em,
.supply-card em { color: var(--ok); font-size: 10px; font-style: normal; margin-top: 3px; }
.supply-card.disabled { opacity: 0.58; }
.supply-card .btn,
.supply-contract .btn { min-width: 74px; }

/* —— 诗词 —— */
.poem-block {
  margin: 8px 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold-dim);
  background: #0e0c10;
  text-align: center;
}
.poem-title {
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.2em;
  margin-bottom: 10px;
  font-weight: 600;
}
.poem-line {
  font-size: 14px;
  color: var(--text);
  line-height: 1.9;
  letter-spacing: 0.12em;
}
.poem-card {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-soft);
  text-align: center;
}
.poem-card .poem-title { margin-bottom: 8px; font-size: 12px; }
.poem-card .poem-line { font-size: 13px; line-height: 1.75; }
.poem-card .link-btn { margin-top: 6px; color: var(--gold-dim); }
.quest-handoff {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-dim);
  background: var(--bg3);
}
.quest-handoff > span {
  display: block;
  color: var(--gold-dim);
  font-size: 11px;
  letter-spacing: .1em;
}
.quest-handoff > b {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}
.quest-handoff-reason {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.7;
}
.quest-handoff :is(p, b, small) > i {
  display: inline-block;
  min-width: 34px;
  margin-right: 8px;
  color: var(--gold-dim);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .08em;
}
.quest-handoff > small {
  display: block;
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.55;
}
.pet-set-list {
  display: grid;
  gap: 7px;
  margin: 7px 0 11px;
}
.pet-set-card {
  padding: 9px 10px;
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--text-dim);
  background: var(--bg3);
}
.pet-set-card.active {
  border-left-color: var(--gold);
}
.pet-set-card header,
.pet-set-card p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.pet-set-card header b {
  font-size: 13px;
}
.pet-set-card header span,
.pet-set-card p span,
.pet-set-card small {
  color: var(--text-dim);
  font-size: 11px;
}
.pet-set-card p {
  margin: 6px 0 0;
  line-height: 1.55;
}
.pet-set-card p b {
  color: var(--gold-dim);
  font-size: 11px;
}
.pet-set-card small {
  display: block;
  margin-top: 5px;
}
.journey-completion {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  background: var(--bg3);
}
.journey-completion > span,
.journey-completion > b,
.journey-completion > small {
  display: block;
}
.journey-completion > span {
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
}
.journey-completion > b {
  margin-top: 5px;
  font-size: 15px;
}
.journey-completion > p {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}
.journey-completion > small {
  margin-top: 7px;
  color: var(--gold-dim);
  font-size: 12px;
  line-height: 1.55;
}

.profession-invitation {
  margin-top: 11px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  background: var(--bg3);
}
.profession-invitation-head {
  padding: 9px 10px 8px;
  border-bottom: 1px solid var(--border-soft);
}
.profession-invitation-head > span {
  display: block;
  color: var(--gold-dim);
  font-size: 9px;
  letter-spacing: .16em;
}
.profession-invitation-head > b {
  display: block;
  margin-top: 3px;
  color: var(--gold);
  font: 600 15px/1.45 var(--font-serif);
}
.profession-invitation > p {
  margin: 0;
  padding: 9px 10px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.6;
}
.profession-invitation-paths { border-top: 1px dotted var(--border-soft); }
.profession-invitation-path {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px dotted var(--border-soft);
}
.profession-invitation-path > div { min-width: 0; }
.profession-invitation-path b {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.profession-invitation-path span {
  margin-left: 6px;
  color: var(--text-dim);
  font-size: 10px;
}
.profession-invitation-path small {
  flex: 0 0 auto;
  color: var(--gold-dim);
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}
.profession-invitation-foot {
  display: block;
  padding: 7px 10px 8px;
  color: var(--text-dim);
  font-size: 9px;
  line-height: 1.5;
}

/* —— 山河图 —— */
.map-era-strip {
  display: flex;
  gap: 5px;
  margin-bottom: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}
.map-era-strip::-webkit-scrollbar { display: none; }
.map-era-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-dim);
  font: 11px/1.4 var(--font);
  white-space: nowrap;
}
.map-era-tab.on {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(184, 154, 62, 0.08);
}
.map-era-tab i {
  margin-left: 4px;
  color: var(--cyan);
  font-style: normal;
  font-size: 9px;
}
.map-toolbar {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.map-tab {
  flex: 0 0 auto;
  padding: 8px 12px;
  min-height: 36px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
}
.map-tab.on {
  color: var(--gold);
  background: rgba(184, 154, 62, 0.08);
}
.map-stat {
  flex: 1;
  text-align: right;
  padding: 0 10px;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.map-here {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.map-here b { color: var(--gold); font-weight: 600; }
.map-gate-guide {
  display: grid;
  gap: 4px;
  margin: 0 0 8px;
  padding: 7px;
  border: 1px solid #5d4569;
  background: rgba(83, 55, 94, .12);
}
.map-gate-guide > span { color: #ad8fbd; font-size: 9px; letter-spacing: .14em; }
.map-gate-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  text-align: left;
}
.map-gate-link b { font-size: 11px; }
.map-gate-link span { color: #b69bc2; font-size: 10px; }
.map-gate-link.locked span { color: var(--text-dim); }

.map-chart-wrap { margin: 0 -4px; }
.map-pan-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-bottom: 0;
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.35;
}
.map-pan-guide > span { flex: 1 1 150px; }
.map-pan-guide button {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid var(--gold-dim);
  background: rgba(184, 154, 62, .08);
  color: var(--gold);
  font: 10px/1.2 var(--font);
}
.map-zoom-controls {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--border-soft);
}
.map-zoom-controls button {
  width: 28px;
  min-height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
}
.map-zoom-controls output {
  min-width: 42px;
  padding: 0 4px;
  color: var(--text-dim);
  font: 10px/1 var(--font);
  text-align: center;
}
.map-viewport {
  position: relative;
  width: 100%;
  height: clamp(360px, 56vh, 560px);
  overflow: auto;
  border: 1px solid var(--border);
  overscroll-behavior: contain;
  touch-action: none;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
  -webkit-overflow-scrolling: touch;
}
.map-viewport.dragging {
  cursor: grabbing;
  user-select: none;
}
.map-viewport.zooming { cursor: zoom-in; }
.map-viewport:focus-visible { outline: 2px solid var(--gold-dim); outline-offset: 2px; }
.map-stage {
  position: relative;
  flex: none;
}
.map-chart {
  position: relative;
  flex: none;
  transform-origin: 0 0;
  will-change: transform;
  background:
    radial-gradient(ellipse 80% 50% at 50% 20%, rgba(60, 40, 80, 0.12), transparent 55%),
    linear-gradient(rgba(184, 154, 62, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 154, 62, .035) 1px, transparent 1px),
    linear-gradient(180deg, #100e12 0%, #0a090c 100%);
  background-size: auto, 120px 90px, 120px 90px, auto;
  overflow: visible;
}
.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.map-edge {
  stroke: #3a3428;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  fill: none;
  opacity: 0.28;
}
.map-edge.solid {
  stroke: #6a5a30;
  opacity: 0.58;
  stroke-width: 1.25;
}
.map-edge.fog {
  stroke: #3a3040;
  stroke-dasharray: 1.2 1.2;
  opacity: 0.4;
}
.map-edge.vert {
  stroke: #5a3a6a;
  opacity: 0.5;
}

.map-node {
  position: absolute;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  z-index: 2;
  min-width: 64px;
  touch-action: none;
}
.map-node .mn-dot {
  width: 11px;
  height: 11px;
  border: 1px solid var(--lc, #8a7a50);
  background: #121014;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
}
.map-node.visited .mn-dot {
  background: var(--lc, #8a7a50);
  opacity: 0.85;
}
.map-node.here .mn-dot {
  width: 14px;
  height: 14px;
  background: var(--gold);
  border-color: #e0c060;
  box-shadow: 0 0 10px rgba(184, 154, 62, 0.55);
  animation: map-pulse 2.2s ease-in-out infinite;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.map-node.fog .mn-dot {
  background: transparent;
  border-style: dashed;
  border-color: #5a4a60;
  opacity: 0.7;
}
.map-node.safe.visited .mn-dot { border: 2px solid #4f8557; border-radius: 50%; background: #18351f; }
.map-node.dungeon.visited .mn-dot { border: 2px solid #a45242; background: #3b1815; transform: rotate(45deg); }
.map-node.abyss.visited .mn-dot { border: 2px solid #8a5a9b; background: #4e2859; transform: rotate(45deg); box-shadow: 0 0 7px rgba(103, 60, 117, .55); }
.map-node.here.safe .mn-dot { border-radius: 50%; background: #315f38; border-color: #5d9665; }
.map-node.here.dungeon .mn-dot { background: #7f3329; border-color: #b75a49; transform: rotate(45deg); }
.map-node.here.abyss .mn-dot { background: #60356c; border-color: #9b69aa; transform: rotate(45deg); }
.map-node.world-boss .mn-dot { border-color: #b5483d; box-shadow: 0 0 0 3px rgba(181, 72, 61, .22), 0 0 10px rgba(181, 72, 61, .55); }
.map-node .mn-lab {
  max-width: 94px;
  padding: 2px 5px;
  border: 1px solid rgba(106, 90, 48, .28);
  background: rgba(12, 10, 14, .86);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  text-shadow: 0 1px 2px #000;
}
.map-node .mn-gate {
  padding: 1px 3px;
  border: 1px solid #765787;
  background: #17111d;
  color: #c3a6d0;
  font-size: 7px;
  line-height: 1.25;
  white-space: nowrap;
}
.map-node.here .mn-lab {
  color: var(--gold);
  font-weight: 600;
}
.map-node.fog .mn-lab { color: #5a5060; }
.map-node:active .mn-dot { transform: scale(1.15); }

@keyframes map-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(184, 154, 62, 0.4); }
  50% { box-shadow: 0 0 16px rgba(184, 154, 62, 0.75); }
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 4px 4px;
  font-size: 10px;
  color: var(--text-dim);
}
.map-leg { display: inline-flex; align-items: center; gap: 4px; }
.map-leg i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1px solid var(--border);
}
.map-leg .ml-here { background: var(--gold); border-color: #e0c060; }
.map-leg .ml-visited { background: #6a5a30; }
.map-leg .ml-fog { border-style: dashed; background: transparent; }
.map-leg .ml-safe {
  border: 2px solid #4f8557;
  border-radius: 50%;
  background: #18351f;
}
.map-leg .ml-dungeon { background: transparent; border: 2px solid #a45242; transform: rotate(45deg) scale(.78); }
.map-leg .ml-abyss { background: #5a3a6a; border-color: #8a5a9b; transform: rotate(45deg) scale(.78); }
.map-leg .ml-gateway { border: 2px double #9670aa; border-radius: 50%; background: transparent; }
.map-hint {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  padding: 4px 2px 0;
  letter-spacing: 0.03em;
}

.map-list { max-height: 55vh; overflow-y: auto; }
.map-layer-title {
  font-size: 11px;
  color: var(--gold-dim);
  letter-spacing: 0.15em;
  margin: 10px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-soft);
}
.map-list-item {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}
.map-list-item.here { border-left: 2px solid var(--gold); padding-left: 6px; }
.map-list-item:active { background: var(--bg3); }
.mli-name { font-size: 13px; color: var(--text); }
.mli-ex { font-size: 11px; color: var(--text-dim); margin-top: 2px; line-height: 1.4; }

/* 奇遇抉择 */
.event-choices {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
  border: 1px solid var(--border);
}
.event-choices .btn {
  border: none;
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
  justify-content: flex-start;
  text-align: left;
  padding: 12px 14px;
  letter-spacing: 0.04em;
}
.event-choices .btn:last-child { border-bottom: none; }
.event-choices .btn:active {
  background: #1a1610;
  color: var(--gold);
}
.event-body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  margin: 8px 0 4px;
  letter-spacing: 0.03em;
}
.choice-result-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  color: var(--gold);
  font-size: 12px;
  line-height: 1.65;
}
.choice-result-changes span { color: var(--text-dim); }
.event-kicker {
  font-size: 10px;
  color: var(--san);
  letter-spacing: 0.25em;
  margin-bottom: 6px;
}

/* 桌面预览 */
@media (min-width: 480px) {
  body { padding: 12px 0; background: #050406; }
  #phone {
    border-radius: 0;
    border: 1px solid #2a241c;
    max-height: calc(100dvh - 24px);
  }
}

/* —— 2026 纸面主题与信息收束 —— */
#status-bar {
  display: block;
  height: auto;
}
.sb-brand {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  line-height: 1;
}
.sb-brand strong {
  color: var(--gold);
  font-size: 18px;
  letter-spacing: .18em;
  text-indent: .18em;
}
.sb-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.auth-theme {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--border-soft);
  border-radius: 0;
  background: transparent;
  color: var(--text-dim);
  font: 11px/1 var(--font);
  cursor: pointer;
}
.auth-theme:focus-visible,
.utility-fold > summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.utility-fold {
  margin-top: 14px;
  border: 1px solid var(--border);
  background: var(--bg2);
}
.utility-fold > summary {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: var(--touch);
  padding: 10px 34px 10px 12px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.utility-fold > summary::-webkit-details-marker { display: none; }
.utility-fold > summary::after {
  content: '＋';
  position: absolute;
  right: 12px;
  top: 50%;
  color: var(--gold-dim);
  font-size: 16px;
  transform: translateY(-50%);
}
.utility-fold[open] > summary::after { content: '－'; }
.utility-fold > summary span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
}
.utility-fold > summary small {
  overflow: hidden;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.utility-fold-body {
  padding: 0 12px 12px;
  border-top: 1px solid var(--border-soft);
}
details.utility-fold:not([open]) > .utility-fold-body { display: none; }

#view-scene .movement-panel {
  position: static;
  background: var(--bg2);
}

html[data-theme="paper"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg2: #ffffff;
  --bg3: #ffffff;
  --bg4: #f2f2f2;
  --border: #111111;
  --border-soft: #999999;
  --text: #111111;
  --text-dim: #555555;
  --gold: #2f6d3d;
  --gold-dim: #356f41;
  --cyan: #2f6d3d;
  --red: #8a3531;
  --san: #566d50;
  --hp: #469451;
  --mp: #469451;
  --luck: #2f6d3d;
  --ok: #2f6d3d;
  --danger: #8a3531;
  --font: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", "PingFang SC", serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  --mono: "SFMono-Regular", "Roboto Mono", "Courier New", monospace;
  --text2: #33382f;
  --muted: #686e65;
}
html[data-font="book"] {
  --font: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
}
html[data-font="kai"] {
  --font: "Kaiti SC", "STKaiti", "KaiTi", "BiauKai", "Noto Serif CJK SC", serif;
  --font-serif: "Kaiti SC", "STKaiti", "KaiTi", "BiauKai", "Noto Serif CJK SC", serif;
}
html[data-font="sans"] {
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-serif: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
html[data-theme][data-font="kai"] body { line-height: 1.62; }
html[data-theme][data-font="sans"] body { letter-spacing: .01em; }
html[data-theme="paper"],
html[data-theme="paper"] body {
  background: #ffffff;
  color: var(--text);
}
html[data-theme="paper"] body {
  padding: 0;
  font-size: 15px;
  line-height: 1.55;
}
html[data-theme="paper"] #phone {
  max-width: 720px;
  max-height: 100dvh;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: none;
}
html[data-theme="paper"] #phone,
html[data-theme="paper"] #phone * {
  text-shadow: none !important;
}
html[data-theme="paper"] #status-bar {
  padding: calc(8px + var(--safe-t)) 10px 6px;
  background: #ffffff;
  border-bottom: 0;
  font-size: 12px;
  text-align: center;
}
html[data-theme="paper"] .sb-brand { width: 100%; justify-content: center; }
html[data-theme="paper"] .sb-brand strong {
  color: var(--text);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: .12em;
  text-indent: .12em;
}
html[data-theme="paper"] .sb-status {
  margin-top: 5px;
  padding-top: 0;
  justify-content: center;
  border-top: 0;
}
html[data-theme="paper"] .sb-left,
html[data-theme="paper"] .sb-right {
  flex: 0 1 auto;
  justify-content: center;
}
html[data-theme="paper"] #sb-name,
html[data-theme="paper"] #sb-realm,
html[data-theme="paper"] #sb-luck,
html[data-theme="paper"] #sb-luck b,
html[data-theme="paper"] #sb-spirit,
html[data-theme="paper"] #sb-online {
  color: var(--text);
  opacity: 1;
}
html[data-theme="paper"] #sb-name { max-width: 42%; font-weight: 700; }
html[data-theme="paper"] .sb-chip {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 11px;
}
html[data-theme="paper"] .sb-meta,
html[data-theme="paper"] .sb-spirit,
html[data-theme="paper"] #sb-online {
  font-size: 11px;
}
html[data-theme="paper"] #bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  margin: 6px 8px 0;
  padding: 7px 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
}
html[data-theme="paper"] .bar-row {
  grid-template-columns: 32px minmax(24px, 1fr) minmax(68px, max-content);
  gap: 5px;
  margin: 0;
}
html[data-theme="paper"] .bar-label,
html[data-theme="paper"] .bar-num,
html[data-theme="paper"] .realm-num {
  color: var(--text);
  font-size: 11px;
}
html[data-theme="paper"] .bar-track,
html[data-theme="paper"] .bar-track.mini {
  height: 9px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0;
}
html[data-theme="paper"] .bar-fill,
html[data-theme="paper"] .bar-track.hp .bar-fill,
html[data-theme="paper"] .bar-track.mp .bar-fill,
html[data-theme="paper"] .bar-track.san .bar-fill,
html[data-theme="paper"] .bar-track.exp .bar-fill {
  border-radius: 0;
  background: #48a657;
}
html[data-theme="paper"] .bar-track.enemy .bar-fill { background: #8a3531; }
html[data-theme="paper"] #screen { padding: 0; }
html[data-theme="paper"] .view {
  padding: 6px 8px 10px;
  animation: none;
}
html[data-theme="paper"] #view-auth {
  padding: 28px 16px;
  background: var(--bg);
}
html[data-theme="paper"] .auth-frame {
  max-width: 460px;
  padding: 42px 24px 24px;
  border: 1px solid var(--border);
  background: var(--bg2);
  box-shadow: none;
}
html[data-theme="paper"] .auth-corner,
html[data-theme="paper"] .auth-well { display: none; }
html[data-theme="paper"] .auth-hero {
  padding: 0 0 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
html[data-theme="paper"] .auth-hero h1 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 34px;
  letter-spacing: .16em;
  text-indent: .16em;
}
html[data-theme="paper"] .auth-sub {
  color: var(--text);
  font-size: 13px;
  letter-spacing: .12em;
}
html[data-theme="paper"] .auth-flavor {
  margin-top: 15px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.7;
}
html[data-theme="paper"] .auth-field {
  grid-template-columns: 54px 1fr;
  padding-left: 12px;
  border-color: var(--border);
  background: #fff;
}
html[data-theme="paper"] .auth-field .field-label { color: var(--text); }
html[data-theme="paper"] .auth-field input {
  border-left-color: var(--border);
  color: var(--text);
}
html[data-theme="paper"] .auth-field input:focus { background: #f2f2f2; }
html[data-theme="paper"] .auth-field input::placeholder { color: #70756d; }
html[data-theme="paper"] .auth-hint { color: var(--text-dim); }
html[data-theme="paper"] .auth-theme {
  border-color: var(--border-soft);
  color: var(--text-dim);
}
html[data-theme="paper"] .btn,
html[data-theme="paper"] .chat-templates button,
html[data-theme="paper"] .map-tab,
html[data-theme="paper"] .crisis-choice {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
  box-shadow: none;
}
html[data-theme="paper"] .btn:hover,
html[data-theme="paper"] .list-item:hover,
html[data-theme="paper"] .cmp-btn:hover { background: #f2f2f2; }
html[data-theme="paper"] .btn:active,
html[data-theme="paper"] .list-item:active,
html[data-theme="paper"] .cmp-btn:active:not(:disabled) {
  background: #e8e8e8;
  transform: translateY(1px);
}
html[data-theme="paper"] .btn.primary {
  border-color: #295f35;
  background: #356f41;
  color: #fff;
}
html[data-theme="paper"] .btn.danger {
  border-color: #8a3531;
  background: #fff;
  color: #742824;
}
html[data-theme="paper"] .btn.ghost { background: transparent; color: var(--text-dim); }
html[data-theme="paper"] .link-btn { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
html[data-theme="paper"] .scene-location,
html[data-theme="paper"] .movement-panel {
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  background: var(--bg2);
}
html[data-theme="paper"] .scene-location {
  margin-top: 0;
  border-color: var(--border);
}
html[data-theme="paper"] .movement-panel {
  border-width: 1px;
  border-color: var(--border);
}
html[data-theme="paper"] .scene-mount-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  margin: -1px auto 3px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}
html[data-theme="paper"] .scene-mount-shortcut {
  display: inline-block;
  width: auto;
  min-height: 28px;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: #000099;
  font-family: var(--font);
  font-size: inherit;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
html[data-theme="paper"] .scene-mount-shortcut b { font-weight: 400; }
html[data-theme="paper"] .scene-mount-shortcut:hover { color: #0000bb; }
html[data-theme="paper"] .scene-mount-shortcut:active {
  transform: translateY(1px);
}
html[data-theme="paper"] .loc-header { margin-bottom: 2px; }
html[data-theme="paper"] #loc-name {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}
html[data-theme="paper"] #loc-name::before {
  content: '当前位置：';
  margin-right: 2px;
}
html[data-theme="paper"] .region-tag {
  display: none;
}
html[data-theme="paper"] .prose { margin-bottom: 4px; color: var(--text); font-size: 14px; line-height: 1.55; }
html[data-theme="paper"] .flavor {
  margin: 6px 0 0;
  padding: 6px 0 0;
  border: 0;
  border-top: 1px dashed var(--border);
  background: transparent;
  color: var(--text-dim);
  font-style: normal;
}
html[data-theme="paper"] .section-title {
  margin: 0 0 4px;
  padding-bottom: 3px;
  border-bottom: 1px dashed var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
}
html[data-theme="paper"] .utility-fold-body .section-title { margin-top: 14px; }
html[data-theme="paper"] .panel-title {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
}
html[data-theme="paper"] .sec-tip,
html[data-theme="paper"] .dim { color: var(--text-dim); }
html[data-theme="paper"] .list { gap: 0; }
html[data-theme="paper"] .list-item {
  min-height: 32px;
  padding: 3px 1px;
  border: 0;
  background: transparent;
}
html[data-theme="paper"] .list-item .li-name,
html[data-theme="paper"] .list-item .li-sub { color: var(--text); }
html[data-theme="paper"] .list-item .li-sub { color: var(--text-dim); }
html[data-theme="paper"] #loc-monsters .monster-name.monster-boss { color: #8f1d24; }
html[data-theme="paper"] #loc-monsters .monster-name.monster-deadly { color: #6f2a7f; }
html[data-theme="paper"] #loc-monsters .monster-name.monster-danger { color: #a33b32; }
html[data-theme="paper"] #loc-monsters .monster-name.monster-matched { color: #8a5a14; }
html[data-theme="paper"] #loc-monsters .monster-name.monster-weaker { color: #2f6d3d; }
html[data-theme="paper"] .list-item .li-tag,
html[data-theme="paper"] .list-item .li-tag.quest,
html[data-theme="paper"] .list-item .li-tag.thread,
html[data-theme="paper"] .list-item .li-tag.community {
  border-color: var(--gold);
  background: transparent;
  color: var(--gold);
  border-radius: 0;
}
html[data-theme="paper"] .list-item .li-tag.boss {
  border-color: var(--red);
  background: transparent;
  color: var(--red);
}
html[data-theme="paper"] #loc-npcs .list-item,
html[data-theme="paper"] #loc-players .list-item {
  justify-content: flex-start;
  gap: 5px;
  padding: 3px 1px;
}
html[data-theme="paper"] #loc-npcs .list-item::before,
html[data-theme="paper"] #loc-players .list-item::before {
  content: '›';
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
}
html[data-theme="paper"] #loc-npcs .list-item .li-name,
html[data-theme="paper"] #loc-players .list-item .li-name {
  color: #000099;
  font-size: 14px;
}
html[data-theme="paper"] #loc-npcs .list-item .li-main,
html[data-theme="paper"] #loc-players .list-item .li-main,
html[data-theme="paper"] #loc-monsters .list-item .li-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
}
html[data-theme="paper"] #loc-npcs .list-item .li-sub,
html[data-theme="paper"] #loc-players .list-item .li-sub,
html[data-theme="paper"] #loc-monsters .list-item .li-sub { margin-top: 0; font-size: 10px; }
html[data-theme="paper"] #loc-npcs .list-item .li-sub::before,
html[data-theme="paper"] #loc-players .list-item .li-sub::before,
html[data-theme="paper"] #loc-monsters .list-item .li-sub::before { content: '['; }
html[data-theme="paper"] #loc-npcs .list-item .li-sub::after,
html[data-theme="paper"] #loc-players .list-item .li-sub::after,
html[data-theme="paper"] #loc-monsters .list-item .li-sub::after { content: ']'; }
html[data-theme="paper"] #loc-npcs .list-item .li-tag {
  display: none;
}
html[data-theme="paper"] #loc-players .list-item .li-tag { display: none; }
html[data-theme="paper"] #loc-monsters .list-item .li-tag { display: none; }
html[data-theme="paper"] #loc-npcs .npc-routine,
html[data-theme="paper"] #loc-npcs .npc-community-teaser { display: none; }
html[data-theme="paper"] .scene-presence {
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  background: var(--bg2);
}
html[data-theme="paper"] .scene-presence > div + div { margin-top: 5px; }
html[data-theme="paper"] #sec-npcs .section-title,
html[data-theme="paper"] #sec-monsters .section-title,
html[data-theme="paper"] #sec-interact .section-title,
html[data-theme="paper"] #sec-echoes .section-title {
  margin-bottom: 3px;
  padding-bottom: 0;
  border-bottom: 0;
}
html[data-theme="paper"] .chip,
html[data-theme="paper"] .s-btn {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}
html[data-theme="paper"] .movement-panel .section-title { display: none; }
html[data-theme="paper"] .compass { max-width: 520px; gap: 8px; }
html[data-theme="paper"] .cmp-btn {
  min-height: 42px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}
html[data-theme="paper"] .cmp-btn.on { border-color: var(--border); background: #fff; }
html[data-theme="paper"] .cmp-btn.quest-route {
  border-color: var(--gold);
  background: #f4faf3;
  box-shadow: inset 0 0 0 1px var(--gold);
}
html[data-theme="paper"] .cmp-btn.quest-route .cmp-dir,
html[data-theme="paper"] .cmp-btn.quest-route .cmp-dest,
html[data-theme="paper"] .cmp-btn.quest-route .cmp-dir em { color: var(--gold); }
html[data-theme="paper"] .cmp-map { border-color: var(--border); background: #fff; }
html[data-theme="paper"] .cmp-btn.on .cmp-dir,
html[data-theme="paper"] .cmp-btn.on .cmp-dest { color: var(--text); }
html[data-theme="paper"] .cmp-btn:disabled { background: var(--bg4); color: #8a8e86; }
html[data-theme="paper"] .cmp-c {
  border-style: dashed;
  background: var(--bg4);
  color: var(--text-dim);
}
html[data-theme="paper"] .cmp-u:disabled,
html[data-theme="paper"] .cmp-d:disabled { visibility: hidden; }
html[data-theme="paper"] .utility-fold {
  margin-top: 7px;
  border-color: var(--border);
  background: var(--bg2);
}
html[data-theme="paper"] .utility-fold > summary {
  min-height: 36px;
  padding: 6px 30px 6px 8px;
}
html[data-theme="paper"] .utility-fold > summary::after { right: 8px; }
html[data-theme="paper"] .utility-fold-body { padding: 0 8px 8px; }
html[data-theme="paper"] .utility-fold-body { border-top-color: var(--border); }
html[data-theme="paper"] .scene-footprints {
  margin-top: 7px;
  border: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}
html[data-theme="paper"] .footprints-line { min-height: 30px; }
html[data-theme="paper"] .scene-footprints .event-log {
  border-top-color: var(--border);
  background: #ffffff !important;
}
html[data-theme="paper"] .footprint-moments {
  padding: 7px 8px 8px;
  border-top-color: var(--border);
}
html[data-theme="paper"] #loc-flags .li-tag {
  min-height: 22px;
  border-radius: 0;
  border-color: var(--border);
  color: var(--text-dim);
}
html[data-theme="paper"] #loc-flags .li-tag.boss { border-color: var(--red); color: var(--red); }
html[data-theme="paper"] .location-insight {
  padding-top: 4px;
  border-top-color: var(--border);
}
html[data-theme="paper"] .location-insight strong { color: var(--gold); }
html[data-theme="paper"] .nearby-player-name,
html[data-theme="paper"] .nearby-ellipsis {
  color: #000099;
}
html[data-theme="paper"] .world-strip,
html[data-theme="paper"] .world-chronicle,
html[data-theme="paper"] .event-log,
html[data-theme="paper"] .location-aftermath,
html[data-theme="paper"] .daily-omen,
html[data-theme="paper"] .reward-box,
html[data-theme="paper"] .story-card,
html[data-theme="paper"] .poem-block,
html[data-theme="paper"] .settlement-card,
html[data-theme="paper"] .quest-handoff,
html[data-theme="paper"] .journey-completion,
html[data-theme="paper"] .profession-invitation,
html[data-theme="paper"] .collective-cause,
html[data-theme="paper"] .npc-community-card,
html[data-theme="paper"] .ending-reaction,
html[data-theme="paper"] .world-reaction,
html[data-theme="paper"] .quest-resolution,
html[data-theme="paper"] .ending-choice-warning,
html[data-theme="paper"] .profile-verse,
html[data-theme="paper"] .profile-shared-fate,
html[data-theme="paper"] .person-section,
html[data-theme="paper"] .life-moment,
html[data-theme="paper"] .npc-thread-card,
html[data-theme="paper"] .npc-community-teaser,
html[data-theme="paper"] .cbt-intent,
html[data-theme="paper"] .defeat-trace,
html[data-theme="paper"] .monster-sighting {
  border-color: var(--border-soft) !important;
  background: #ffffff !important;
  color: var(--text) !important;
  box-shadow: none !important;
}
html[data-theme="paper"] .crisis-choice-box,
html[data-theme="paper"] .person-met-note,
html[data-theme="paper"] .first-choice-echo,
html[data-theme="paper"] .fellow-witness,
html[data-theme="paper"] .npc-choice-echo,
html[data-theme="paper"] .npc-choice-echo-hint,
html[data-theme="paper"] .person-nature,
html[data-theme="paper"] .person-section.thread,
html[data-theme="paper"] .person-section.echo,
html[data-theme="paper"] .person-section.moment,
html[data-theme="paper"] .person-section.ending,
html[data-theme="paper"] .moment-after,
html[data-theme="paper"] .return-chronicle,
html[data-theme="paper"] .assist-intent,
html[data-theme="paper"] .cbt-allies,
html[data-theme="paper"] .sc-share {
  border-color: var(--border-soft) !important;
  background: #ffffff !important;
  color: var(--text) !important;
  box-shadow: none !important;
}
html[data-theme="paper"] .crisis-meter {
  border-color: var(--border);
  background: #ffffff;
}
html[data-theme="paper"] .combat-settlement-rewards > div,
html[data-theme="paper"] .people-progress > div {
  background: #ffffff;
}
html[data-theme="paper"] :is(
  .crisis-choice-box, .person-met-note, .first-choice-echo, .fellow-witness,
  .npc-choice-echo, .npc-choice-echo-hint, .person-nature, .person-section,
  .moment-after, .return-chronicle, .assist-intent, .cbt-allies, .sc-share
) :is(strong, b, span, p, div, small, i, em) {
  color: inherit;
}
html[data-theme="paper"] .scene-footprints .event-log {
  border-top-color: var(--border) !important;
}
html[data-theme="paper"] :is(
  .world-strip, .world-chronicle, .event-log, .location-aftermath,
  .daily-omen, .reward-box, .story-card, .poem-block, .settlement-card,
  .collective-cause, .npc-community-card, .ending-reaction, .world-reaction,
  .quest-resolution, .ending-choice-warning, .profile-verse, .profile-shared-fate,
  .person-section, .life-moment, .npc-thread-card, .npc-community-teaser,
  .defeat-trace, .monster-sighting
) :is(strong, b, span, p, div, small, i, em) {
  color: inherit;
}
html[data-theme="paper"] .stat-card,
html[data-theme="paper"] .profile-gear,
html[data-theme="paper"] .profile-technique,
html[data-theme="paper"] .person-entry,
html[data-theme="paper"] .leaderboard-tabs button,
html[data-theme="paper"] .leaderboard-row,
html[data-theme="paper"] .leaderboard-mine {
  border-color: var(--border-soft);
  background: #ffffff;
}
html[data-theme="paper"] .stat-card .sk,
html[data-theme="paper"] .stat-card .sv,
html[data-theme="paper"] .profile-gear strong,
html[data-theme="paper"] .profile-technique strong,
html[data-theme="paper"] .profile-technique span,
html[data-theme="paper"] .person-name,
html[data-theme="paper"] .person-line { color: var(--text); }
html[data-theme="paper"] .profession-summary,
html[data-theme="paper"] .profession-path,
html[data-theme="paper"] .profession-skill-actions button,
html[data-theme="paper"] .attribute-add-controls :is(button, input),
html[data-theme="paper"] .profession-mentor-line,
html[data-theme="paper"] .profession-loadout,
html[data-theme="paper"] .cbt-actions .career-skill,
html[data-theme="paper"] .cbt-actions .combat-item,
html[data-theme="paper"] .combat-command {
  border-color: var(--border);
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
}
html[data-theme="paper"] .combat-action-tabs button,
html[data-theme="paper"] .bag-filter-tabs button { background: #f4f4f0; color: var(--text-dim); }
html[data-theme="paper"] .bag-sort-control select { background: #fff; }
html[data-theme="paper"] .combat-action-tabs button.active,
html[data-theme="paper"] .bag-filter-tabs button.active { background: #ffffff; color: var(--gold); }
html[data-theme="paper"] .cbt-actions .career-skill small { color: var(--text-dim); }
html[data-theme="paper"] .cbt-actions .career-skill.fit-counter {
  border-color: var(--gold);
  box-shadow: inset 3px 0 var(--gold);
}
html[data-theme="paper"] .cbt-actions .btn.fit-counter {
  border-color: var(--gold);
  box-shadow: inset 3px 0 var(--gold);
  color: var(--text);
}
html[data-theme="paper"] .cbt-actions .career-skill.fit-good { border-color: var(--ok); }
html[data-theme="paper"] .cbt-actions .career-skill.is-strong small { color: var(--ok); }
html[data-theme="paper"] .cbt-actions .career-skill.is-suppressed small { color: var(--red); }
html[data-theme="paper"] .profession-summary > span:first-child,
html[data-theme="paper"] .profession-summary b,
html[data-theme="paper"] .profession-path h3,
html[data-theme="paper"] .profession-sigil,
html[data-theme="paper"] .profession-skill-title i,
html[data-theme="paper"] .profession-skill-actions button.on {
  color: var(--gold);
}
html[data-theme="paper"] .modal { background: rgba(30, 33, 28, .44); }
html[data-theme="paper"] .modal-card {
  border-color: var(--border);
  background: var(--bg2);
  box-shadow: none;
}
html[data-theme="paper"] .modal-title {
  color: var(--text);
  border-bottom-color: var(--border);
}
/* 剧情阅读保留深色舞台；读完后回到不透明纸面，避免深底深字。 */
html[data-theme="paper"] .modal.story-stage.story-result {
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html[data-theme="paper"] .modal.story-stage.story-result::before { display: none; }
html[data-theme="paper"] .modal.story-stage.story-result .modal-card {
  background: #fff;
  color: var(--text);
  box-shadow: none;
}
html[data-theme="paper"] .modal.story-stage.story-result .modal-body {
  background: #fff;
  color: var(--text);
}
/* 新手引导不是普通剧情结算：始终保留可透出真实场景的深色幕布。 */
html[data-theme="paper"] .modal.story-stage.story-result.interface-intro-modal {
  background:
    radial-gradient(circle at 50% 18%, rgba(132, 105, 48, .18), transparent 28%),
    linear-gradient(180deg, rgba(8, 15, 13, .72), rgba(4, 7, 6, .90));
  backdrop-filter: blur(8px) saturate(.62);
  -webkit-backdrop-filter: blur(8px) saturate(.62);
}
html[data-theme="paper"] .modal.story-stage.story-result.interface-intro-modal::before {
  display: block;
  opacity: .26;
}
html[data-theme="paper"] .modal.story-stage.story-result.interface-intro-modal .modal-card {
  background:
    linear-gradient(90deg, rgba(211, 179, 102, .055) 1px, transparent 1px) 50% 0 / 76px 100%,
    linear-gradient(180deg, rgba(5, 10, 8, .10), rgba(3, 6, 5, .42));
  color: #f3ead7;
}
html[data-theme="paper"] .modal.story-stage.story-result.interface-intro-modal .modal-title {
  color: #d8bd74;
  border-bottom-color: rgba(216, 189, 116, .28);
}
html[data-theme="paper"] .modal.story-stage.story-result.interface-intro-modal .story-reveal-line {
  color: #f5ecd9;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .88);
}
html[data-theme="paper"] .modal.story-stage.story-result.interface-intro-modal .modal-actions .btn.primary {
  background: linear-gradient(180deg, rgba(47, 44, 31, .96), rgba(11, 15, 12, .98));
  border-color: #b99d5c;
  color: #f1dfb3;
  box-shadow: inset 0 0 0 3px rgba(9, 12, 9, .9), inset 0 0 0 4px rgba(210, 177, 98, .28), 0 10px 28px rgba(0, 0, 0, .4);
}
html[data-theme="paper"] .modal-grab { background: var(--border-soft); }
html[data-theme="paper"] .account-settings input {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}
html[data-theme="paper"] .account-settings input:focus {
  background: #f7f7f3;
  box-shadow: inset 3px 0 var(--gold);
}
html[data-theme="paper"] .font-choice { border-color: var(--border-soft); background: #fff; }
html[data-theme="paper"] .font-choice.active { border-color: var(--gold-dim); border-left-color: var(--gold); }
html[data-theme="paper"] #tabbar {
  height: calc(46px + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--bg2);
  border-top: 1px solid var(--border);
}
html[data-theme="paper"] .tab-btn {
  min-height: 46px;
  border-right: 1px solid var(--border);
  color: var(--text-dim);
}
html[data-theme="paper"] .tab-btn:last-child { border-right: 0; }
html[data-theme="paper"] .tab-btn .tab-ico { display: none; }
html[data-theme="paper"] .tab-btn.active {
  background: #eeeeee;
  color: var(--gold);
  font-weight: 700;
  box-shadow: inset 0 3px var(--gold);
}
html[data-theme="paper"] .chat-tabs { border-color: var(--border); }
html[data-theme="paper"] .chat-tabs .tab {
  border-color: var(--border-soft);
  background: #fff;
  color: var(--text);
}
html[data-theme="paper"] .chat-tabs .tab.active { background: #eeeeee; color: var(--gold); }
html[data-theme="paper"] .s-btn {
  min-height: 28px;
  padding: 3px 7px;
  font-size: 10px;
}
html[data-theme="paper"] .fellowship-actions .s-btn {
  min-height: 48px;
  padding: 7px 4px;
}
html[data-theme="paper"] .chat-log,
html[data-theme="paper"] .chat-input-row input,
html[data-theme="paper"] .cbt-log,
html[data-theme="paper"] .combat-enemy {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}
html[data-theme="paper"] .chat-line .cn,
html[data-theme="paper"] .chat-line.me .cn { color: var(--gold); }
html[data-theme="paper"] .chat-line .cm { color: var(--text); }
html[data-theme="paper"] .combat-enemy {
  border: 1px solid #8d6a67;
  border-top: 3px solid #9b3d38;
  background:
    radial-gradient(circle at 50% 0, rgba(159, 61, 56, .12), transparent 58%),
    #fff !important;
}
html[data-theme="paper"] .cbt-name { color: #a23d38; text-shadow: none; }
html[data-theme="paper"] .cbt-intent {
  border-color: #b99a78 !important;
  border-left: 3px solid #a96e31 !important;
  background: #fffaf0 !important;
}
html[data-theme="paper"] .cbt-intent.targets-pet {
  border-left-color: #9a6530 !important;
  background: #fff8e9 !important;
}
html[data-theme="paper"] .cbt-intent b { color: #6e3c2e; }
html[data-theme="paper"] .cbt-intent em { color: #8c2f2b; }
html[data-theme="paper"] .cbt-intent.targets-pet em { color: #8a5a20; }
html[data-theme="paper"] .combatant-card,
html[data-theme="paper"] .combat-log-panel {
  background: #fff;
  border-color: var(--border);
}
html[data-theme="paper"] .combatant-card { border-left-color: #47764d; }
html[data-theme="paper"] .combatant-pet { border-left-color: #a36c26; }
html[data-theme="paper"] .combatant-pet .bar-track .bar-fill { background: #b77a2f; }
html[data-theme="paper"] .combat-log-title { border-bottom-color: var(--border); }
html[data-theme="paper"] .toast,
html[data-theme="paper"] .broadcast-toast,
html[data-theme="paper"] .loading-inner,
html[data-theme="paper"] .connection-notice {
  border: 1px solid var(--border);
  border-radius: 0;
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
}
html[data-theme="paper"] .action-status {
  border-color: #b9b9b9;
  background: rgba(255, 255, 255, 0.98);
  color: #222;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}
html[data-theme="paper"] .guide-sheet section { border-color: var(--border); background: #fff; }
html[data-theme="paper"] .guide-sheet .guide-lead { border-left-color: var(--gold); }
html[data-theme="paper"] .guide-career-card { border-color: var(--border); border-left-color: var(--gold-dim); background: var(--bg2); }
html[data-theme="paper"] .map-chart {
  background:
    linear-gradient(rgba(71, 118, 77, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 118, 77, .045) 1px, transparent 1px),
    #ffffff;
  background-size: 120px 90px, 120px 90px, auto;
}
html[data-theme="paper"] .map-node .mn-dot { background: #fff; box-shadow: none; }
html[data-theme="paper"] .map-node.fog .mn-dot { background: transparent; border-style: dashed; }
html[data-theme="paper"] .map-node.safe.visited .mn-dot { background: #eef6ed; border-color: #47764d; border-radius: 50%; }
html[data-theme="paper"] .map-node.dungeon.visited .mn-dot { background: #fff4ef; border-color: #9a4438; transform: rotate(45deg); }
html[data-theme="paper"] .map-node.abyss.visited .mn-dot { background: #64426e; border-color: #402547; transform: rotate(45deg); }
html[data-theme="paper"] .map-node .mn-lab { border-color: #d8d3c5; background: rgba(255, 255, 255, .94); color: var(--text-dim); text-shadow: none; }
html[data-theme="paper"] .map-edge { stroke: #73786f; }
html[data-theme="paper"] .map-edge.solid { stroke: var(--gold); }
html[data-theme="paper"] .map-node.here .mn-dot {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: none;
  animation: none;
}
html[data-theme="paper"] .map-node.here.safe .mn-dot { background: #eef6ed; border-color: #47764d; border-radius: 50%; }
html[data-theme="paper"] .map-node.here.dungeon .mn-dot { background: #fff4ef; border-color: #9a4438; transform: rotate(45deg); }
html[data-theme="paper"] .map-node.here.abyss .mn-dot { background: #64426e; border-color: #402547; transform: rotate(45deg); }
html[data-theme="paper"] .map-leg .ml-safe { background: #eef6ed; border-color: #47764d; }
html[data-theme="paper"] .world-gate,
html[data-theme="paper"] .world-gate-arrival,
html[data-theme="paper"] .map-gate-guide {
  border-color: #796481;
  background: #f6f1f7;
  color: var(--text);
}
html[data-theme="paper"] .world-gate { border-left-color: #73557f; }
html[data-theme="paper"] .world-gate span,
html[data-theme="paper"] .world-gate b,
html[data-theme="paper"] .world-gate-detail h3,
html[data-theme="paper"] .world-cross-result h3,
html[data-theme="paper"] .map-gate-guide > span,
html[data-theme="paper"] .map-gate-link span { color: #684b73; }
html[data-theme="paper"] .world-gate.locked { border-color: var(--border); background: #f3f3ef; }
html[data-theme="paper"] .world-gate-route { border-color: #a58eac; }
html[data-theme="paper"] .world-gate-arrival { border-left-color: #73557f; }
html[data-theme="paper"] .map-node .mn-gate { border-color: #73557f; background: #fff; color: #573b62; }
html[data-theme="paper"] .map-leg .ml-gateway { border-color: #73557f; }
html[data-theme="paper"] body.low-san #phone,
html[data-theme="paper"] body.critical-san #phone { filter: none; }
html[data-theme="paper"] body.critical-san::after { display: none; }

/* —— 旧式 WAP：严格使用早期手机网页的自然文档流 —— */
html:not([data-theme="classic"]) .retro-only,
html:not([data-theme="classic"]) #tabbar [data-action="equipment"] { display: none; }
html[data-theme="classic"] {
  color-scheme: light;
  --bg: #fff;
  --bg2: #fff;
  --bg3: #fff;
  --bg4: #fff;
  --border: #fff;
  --border-soft: #fff;
  --text: #000;
  --text-dim: #000;
  --gold: #651f1f;
  --gold-dim: #651f1f;
  --cyan: #0000ee;
  --red: #651f1f;
  --font: Arial, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-serif: Arial, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
html[data-theme="classic"],
html[data-theme="classic"] body {
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  color: #000;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.32;
  user-select: text;
}
html[data-theme="classic"] #phone {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  height: auto;
  max-height: none;
  margin: 0;
  overflow: visible;
  border: 0;
  background: #fff;
  box-shadow: none;
}
html[data-theme="classic"] #phone,
html[data-theme="classic"] #phone * { text-shadow: none !important; }
html[data-theme="classic"] #status-bar,
html[data-theme="classic"] #bars { display: none !important; }
html[data-theme="classic"] #screen {
  display: block;
  overflow: visible;
  padding: 0;
  background: #fff;
  overscroll-behavior: auto;
}
html[data-theme="classic"] .view { padding: 9px 10px 0; animation: none; background: #fff; }
html[data-theme="classic"] #view-scene > :not(.classic-scene) { display: none !important; }
html[data-theme="classic"] .classic-scene { color: #000; font-size: 18px; line-height: 1.32; }
html[data-theme="classic"] .classic-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  color: #651f1f;
}
html[data-theme="classic"] .classic-head span { margin-right: 3px; }
html[data-theme="classic"] .classic-link,
html[data-theme="classic"] .classic-desc {
  appearance: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0000ee;
  font: inherit;
  line-height: inherit;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}
html[data-theme="classic"] .classic-primary,
html[data-theme="classic"] .classic-exits { display: flex; flex-direction: column; align-items: flex-start; }
html[data-theme="classic"] .classic-exit-title { margin-top: 1px; color: #651f1f; }
html[data-theme="classic"] .classic-desc {
  display: -webkit-box;
  overflow: hidden;
  width: 100%;
  margin-top: 2px;
  color: #000;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
html[data-theme="classic"] .classic-rule { height: 23px; color: #651f1f; }
html[data-theme="classic"] .classic-single { display: block; line-height: 1.35; }
html[data-theme="classic"] .classic-mount-line { line-height: 1.35; }
html[data-theme="classic"] .classic-mount-line .classic-link { display: inline; }
html[data-theme="classic"] #tabbar {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  justify-content: start;
  align-content: start;
  column-gap: 0;
  row-gap: 8px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0 10px;
  border: 0;
  background: #fff;
}
html[data-theme="classic"] .tab-btn {
  display: inline-flex;
  flex: none;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px/1.1 var(--font);
  letter-spacing: 0;
  text-decoration: underline;
}
html[data-theme="classic"] #tabbar > [data-action="blessing"],
html[data-theme="classic"] #tabbar > [data-action="wish"] { display: none !important; }
html[data-theme="classic"] #tabbar > [data-view="scene"] { order: 1; }
html[data-theme="classic"] #tabbar > [data-view="stats"] { order: 2; }
html[data-theme="classic"] #tabbar > [data-action="equipment"] { order: 3; }
html[data-theme="classic"] #tabbar > [data-view="bag"] { order: 4; }
html[data-theme="classic"] #tabbar > [data-view="quest"] { order: 5; }
html[data-theme="classic"] #tabbar > [data-action="skills"] { order: 6; }
html[data-theme="classic"] #tabbar > [data-action="companions"] { order: 7; }
html[data-theme="classic"] #tabbar > [data-view="chat"] { order: 8; }
html[data-theme="classic"] #tabbar > [data-action="map"] { order: 9; }
html[data-theme="classic"] #btn-global-functions { order: 10; }
html[data-theme="classic"] .tab-btn::after {
  content: '|';
  margin: 0 5px;
  color: #000;
  text-decoration: none;
}
html[data-theme="classic"] #tabbar > [data-view="quest"]::after,
html[data-theme="classic"] #btn-global-functions::after { display: none; }
html[data-theme="classic"] .tab-btn .tab-ico { display: none; }
html[data-theme="classic"] .tab-btn.active { color: #651f1f; font-weight: 400; text-decoration: none; box-shadow: none; }
html[data-theme="classic"] #tabbar > [data-view="stats"] > span:nth-child(2),
html[data-theme="classic"] #tabbar > [data-view="bag"] > span:nth-child(2),
html[data-theme="classic"] #tabbar > [data-view="chat"] > span:nth-child(2),
html[data-theme="classic"] #btn-global-functions > span:nth-child(2),
html[data-theme="classic"] #tabbar > [data-view="scene"] > span:last-child { font-size: 0; }
html[data-theme="classic"] #tabbar > [data-view="stats"] > span:nth-child(2)::after { content: '状态'; font-size: 18px; }
html[data-theme="classic"] #tabbar > [data-view="bag"] > span:nth-child(2)::after { content: '行囊'; font-size: 18px; }
html[data-theme="classic"] #tabbar > [data-view="chat"] > span:nth-child(2)::after { content: '传音'; font-size: 18px; }
html[data-theme="classic"] #btn-global-functions > span:nth-child(2)::after { content: '更多'; font-size: 18px; }
html[data-theme="classic"] #tabbar > [data-view="scene"] > span:last-child::after { content: '场景'; font-size: 18px; }
html[data-theme="classic"] .tab-badge {
  position: static;
  display: inline;
  min-width: 0;
  height: auto;
  margin-left: 1px;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  color: #651f1f;
  font-size: 16px;
}
html[data-theme="classic"] .tab-badge::before { content: '('; }
html[data-theme="classic"] .tab-badge::after { content: ')'; }
html[data-theme="classic"] .classic-time {
  display: block;
  padding: 20px 10px 0;
  color: #651f1f;
  font-size: 18px;
}
html[data-theme="classic"] .classic-time:empty { display: none; }
html[data-theme="classic"] .modal { background: rgba(0, 0, 0, .2); }
html[data-theme="classic"] .modal-card {
  max-height: 82dvh;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
html[data-theme="classic"] .modal-title { border-bottom: 0; color: #651f1f; font-size: 20px; font-weight: 400; }
html[data-theme="classic"] .modal-grab { display: none; }
html[data-theme="classic"] .modal-body { color: #000; font-size: 18px; }
html[data-theme="classic"] .modal-actions { gap: 0; }
html[data-theme="classic"] .modal-actions .btn,
html[data-theme="classic"] #modal-close {
  min-height: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font-size: 18px;
  text-decoration: underline;
}
html[data-theme="classic"] .auth-frame { border: 0; background: #fff; box-shadow: none; }


@media (max-width: 620px) {
  .utility-fold > summary { grid-template-columns: 1fr; gap: 1px; }
  html[data-theme="paper"] body { padding: 0; }
  html[data-theme="paper"] #phone {
    max-width: none;
    max-height: 100dvh;
    border: 0;
  }
  html[data-theme="paper"] #status-bar { padding-left: 12px; padding-right: 12px; }
  html[data-theme="paper"] #bars {
    gap: 4px 8px;
    margin: 5px 8px 0;
    padding: 6px 7px;
  }
  html[data-theme="paper"] .view { padding: 6px 8px 10px; }
  html[data-theme="paper"] .scene-location,
  html[data-theme="paper"] .movement-panel { padding: 6px 7px; }
  #view-scene .movement-panel {
    margin: 6px 0 0;
    padding: 5px 6px;
  }
  #view-scene .movement-panel .compass {
    grid-template-rows: repeat(3, 40px);
    gap: 3px;
    max-width: none;
    margin: 0 auto;
  }
  #view-scene .movement-panel .cmp-btn {
    min-height: 40px;
    padding: 2px 3px;
  }
  #view-scene .movement-panel .cmp-btn .cmp-dir { font-size: 12px; }
  #view-scene .movement-panel .cmp-btn .cmp-dest {
    margin-top: 0;
    font-size: 9px;
    line-height: 1.2;
  }
  #view-scene .movement-panel .exit-labels { display: none; }
}

@media (max-width: 390px) {
  .sb-status { gap: 5px; }
  .sb-left, .sb-right { gap: 5px; }
  html[data-theme="paper"] #sb-luck { display: none; }
  html[data-theme="paper"] .sb-spirit,
  html[data-theme="paper"] #sb-online { font-size: 10px; }
  html[data-theme="paper"] #bars { gap: 6px 8px; }
  html[data-theme="paper"] .bar-row { grid-template-columns: 28px minmax(20px, 1fr) minmax(68px, max-content); gap: 4px; }
  html[data-theme="paper"] .auth-frame { padding: 42px 16px 20px; }
  html[data-theme="paper"] .auth-hero h1 { font-size: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* —— 多人名帖 / 远征 / 装备鉴定 —— */
.profile-head { justify-content: flex-start; position: relative; overflow: hidden; }
.profile-head::after {
  content: '青\A云\A录';
  white-space: pre;
  position: absolute;
  right: 3px;
  top: -9px;
  color: rgba(167, 69, 52, .16);
  font: 700 19px/1.05 var(--font-serif);
  border: 2px solid rgba(167, 69, 52, .13);
  padding: 6px 5px;
  transform: rotate(-7deg);
}
.profile-gear strong i { display: block; color: var(--gold-dim); font-size: 8px; font-style: normal; font-weight: 400; }
.profile-mark { display: grid; gap: 2px; min-width: 74px; background: var(--bg3); }
.profile-mark i { color: var(--gold-dim); font-size: 8px; font-style: normal; letter-spacing: .08em; }
.profile-mark b { color: var(--gold); font-size: 11px; }
.profile-mark small { max-width: 230px; color: var(--text-dim); line-height: 1.45; }
.profile-mount {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid #4a3d22;
  background: linear-gradient(90deg, rgba(143, 112, 46, .12), transparent);
}
.profile-mount-sigil { color: var(--gold); font: 26px var(--font-serif); }
.profile-mount h4 { margin: 0 0 2px; }
.profile-mount b, .profile-mount span { display: block; }
.profile-mount b { color: var(--gold); font-size: 12px; }
.profile-mount span { color: var(--text-dim); font-size: 9px; line-height: 1.45; }
.profile-records { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 1px; border: 1px solid var(--border-soft); background: var(--border-soft); }
.profile-records > div { display: grid; gap: 1px; padding: 7px 4px; background: var(--bg3); text-align: center; }
.profile-records span, .profile-records i { color: var(--text-dim); font-size: 8px; font-style: normal; }
.profile-records b { color: var(--gold); font: 15px var(--font-serif); }

.item-quality { font-size: 9px; }
.quality-凡品, .quality-凡品 b { color: #77705f !important; }
.quality-良品, .quality-良品 b { color: #3d8c62 !important; }
.quality-珍品, .quality-珍品 b { color: #4f8fc6 !important; }
.quality-诡珍, .quality-诡珍 b { color: #aa67ba !important; }
.quality-绝品, .quality-绝品 b { color: #c88b2f !important; }
.quality-神兵, .quality-神兵 b { color: #c43b32 !important; text-shadow: 0 0 10px rgba(196, 59, 50, .18); }
.quality-神品, .quality-神品 b { color: #c43b32 !important; text-shadow: 0 0 10px rgba(196, 59, 50, .18); }
.quality-道品, .quality-道品 b { color: #a98512 !important; text-shadow: 0 0 10px rgba(169, 133, 18, .22); }
.equipment-inspector { margin-bottom: 10px; padding: 10px; border: 1px solid currentColor; background: var(--bg3); }
.equipment-inspector > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
.equipment-inspector > div:first-child b { letter-spacing: .18em; }
.equipment-inspector > div:first-child span { color: var(--text-dim); font-size: 10px; }
.equipment-attrs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.equipment-attrs span { padding: 3px 6px; border: 1px solid var(--border-soft); color: var(--text-dim); font-size: 9px; }
.equipment-attrs b { margin-left: 3px; color: inherit; }
.equipment-compare { margin: -1px 0 10px; padding: 9px 10px; border: 1px solid var(--border-soft); border-left: 3px solid var(--text-dim); background: var(--bg2); }
.equipment-compare.gain { border-left-color: var(--ok); }
.equipment-compare.loss { border-left-color: var(--red); }
.equipment-compare.mixed { border-left-color: var(--gold); }
.equipment-compare-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 10px; }
.equipment-compare-head span { color: var(--text-dim); white-space: nowrap; }
.equipment-compare-head b { color: var(--text); text-align: right; font-weight: normal; }
.equipment-deltas { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.equipment-deltas span { padding: 2px 5px; border: 1px solid var(--border-soft); color: var(--text-dim); font-size: 10px; }
.equipment-deltas .up { color: var(--ok); }
.equipment-deltas .down { color: var(--red); }
.equipment-deltas b { margin-left: 2px; color: inherit; }
.equipment-compare p { margin: 7px 0 0; color: var(--text-dim); font-size: 10px; }
.artifact-state { display: grid; gap: 3px; margin: -3px 0 10px; padding: 8px 10px; border-left: 2px solid #b22222; background: rgba(178, 34, 34, .08); }
.artifact-state b { color: #d15a51; font-size: 11px; }
.artifact-state span, .equipment-sources { color: var(--text-dim); font-size: 10px; line-height: 1.55; }
.equipment-sources b { color: var(--gold-dim); }
.equipment-wardrobe { display: grid; gap: 7px; }
.equipment-overview {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px;
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-size: 10px;
}
.equipment-overview b { color: var(--text); font: 14px var(--font-serif); }
.equipment-loadout { margin: 0; padding: 7px 9px; border-left: 2px solid var(--gold); background: var(--bg3); color: var(--text-dim); font-size: 10px; line-height: 1.55; }
.equipment-slot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.equipment-slot {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  min-height: 70px;
  padding: 8px 9px;
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold-dim);
  border-radius: 0;
  background: var(--bg3);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.equipment-slot:active { background: var(--bg4); }
.equipment-slot:focus-visible, .equipment-choice:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.equipment-slot.empty { border-left-color: var(--border-soft); }
.equipment-slot-label { display: flex; justify-content: space-between; gap: 6px; color: var(--text-dim); font-size: 9px; letter-spacing: .08em; }
.equipment-slot-label i { color: var(--gold-dim); font-style: normal; letter-spacing: 0; }
.equipment-slot > b { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.equipment-slot > small { overflow: hidden; color: var(--text-dim); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.equipment-wardrobe-hint { margin: 0; color: var(--text-dim); font-size: 9px; line-height: 1.5; }
.equipment-current { display: grid; gap: 4px; margin-bottom: 12px; padding: 10px; border: 1px solid currentColor; background: var(--bg3); }
.equipment-current > span { color: var(--text-dim); font-size: 9px; letter-spacing: .08em; }
.equipment-current > b { color: inherit; font-size: 13px; }
.equipment-current > small, .equipment-current > p { color: var(--text-dim); font-size: 10px; line-height: 1.5; }
.equipment-current > p { margin: 2px 0 0; }
.equipment-current.empty { border-color: var(--border-soft); }
.equipment-choice-title { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 5px; padding-bottom: 5px; border-bottom: 1px dashed var(--border-soft); }
.equipment-choice-title b { font-size: 11px; letter-spacing: .08em; }
.equipment-choice-title span { color: var(--text-dim); font-size: 10px; }
.equipment-choice-list { display: grid; gap: 6px; }
.equipment-choice {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 64px;
  padding: 9px 10px;
  border: 1px solid var(--border-soft);
  border-left: 3px solid currentColor;
  border-radius: 0;
  background: var(--bg2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.equipment-choice:active { background: var(--bg4); }
.equipment-choice:disabled { cursor: not-allowed; opacity: .48; }
.equipment-choice-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.equipment-choice-head b { overflow: hidden; color: inherit; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.equipment-choice-head i { flex: 0 0 auto; color: var(--gold-dim); font-size: 10px; font-style: normal; }
.equipment-choice-deltas { display: flex; flex-wrap: wrap; gap: 4px; }
.equipment-choice-deltas span, .equipment-choice-deltas em { padding: 2px 4px; border: 1px solid var(--border-soft); font-size: 9px; font-style: normal; }
.equipment-choice-deltas .up { color: var(--ok); }
.equipment-choice-deltas .down { color: var(--red); }
.equipment-choice-deltas .same { color: var(--text-dim); }
.equipment-choice-deltas em { color: var(--gold-dim); }
.equipment-choice > small { color: var(--text-dim); font-size: 9px; line-height: 1.45; }
.equipment-choice-empty { padding: 14px 10px; border: 1px dashed var(--border-soft); color: var(--text-dim); font-size: 11px; text-align: center; }
.equipment-choice-empty small { display: block; margin-top: 5px; font-size: 9px; line-height: 1.5; }
.title-ledger { display: grid; gap: 6px; }
.title-overview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 3px 9px;
  padding: 7px 9px;
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold-dim);
  background: var(--bg3);
}
.title-overview span { color: var(--text-dim); font-size: 9px; letter-spacing: .08em; }
.title-overview b { overflow: hidden; color: var(--gold); font: 13px var(--font-serif); text-overflow: ellipsis; white-space: nowrap; }
.title-overview i { grid-column: 2; color: var(--text-dim); font-size: 9px; font-style: normal; }
.title-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.title-seal {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 60px;
  padding: 7px 27px 7px 9px;
  border: 1px solid var(--border-soft);
  border-radius: 0;
  background: var(--bg3);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.title-seal:active { background: var(--bg4); }
.title-seal:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.title-seal > span { color: var(--text-dim); font-size: 8px; letter-spacing: .08em; }
.title-seal > b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.title-seal > small { overflow: hidden; color: var(--text-dim); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.title-seal > i {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font: 9px var(--font-serif);
  font-style: normal;
}
.title-seal.active { border-color: var(--gold-dim); border-left: 3px solid var(--gold); }
.title-seal.active > b, .title-seal.active > i { color: var(--gold); }
.title-detail { display: grid; gap: 10px; padding: 11px; border: 1px solid var(--border); background: var(--bg3); }
.title-detail.active { border-left: 4px solid var(--gold); }
.title-detail-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; align-items: baseline; }
.title-detail-head > span { grid-column: 1 / -1; color: var(--text-dim); font-size: 9px; letter-spacing: .1em; }
.title-detail-head > b { color: var(--gold); font: 17px var(--font-serif); }
.title-detail-head > i { color: var(--text-dim); font-size: 9px; font-style: normal; }
.title-detail-effect { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-block: 1px dashed var(--border-soft); }
.title-detail-effect span { color: var(--text-dim); font-size: 10px; }
.title-detail-effect b { color: var(--ok); font-size: 11px; }
.title-detail p { margin: 0; color: var(--text); font-size: 11px; line-height: 1.7; }
.title-detail > small { color: var(--text-dim); font-size: 9px; }
.title-detail-rule { margin: 9px 2px 0; color: var(--text-dim); font-size: 9px; line-height: 1.6; }
.era-rule { display: grid; gap: 4px; margin-bottom: 9px; padding: 8px 10px; border: 1px solid var(--border); border-left-width: 3px; background: var(--bg3); }
.era-rule > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.era-rule b { color: var(--gold); font-size: 12px; }
.era-rule span { color: var(--text-dim); font-size: 9px; }
.era-rule p { margin: 0; color: var(--text-dim); font-size: 10px; line-height: 1.55; }
.era-rule.suppressed { border-left-color: #9d443d; }
.era-rule.adapted { border-left-color: #557a55; }

.fellowship-hall { margin: 8px 0; border: 1px solid var(--border); background: var(--bg2); }
.fellowship-hall > summary { padding: 8px 10px; }
.fellowship-hall > .utility-fold-body { padding: 0 8px 8px; }
.fellowship-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border-soft); }
.fellowship-actions .s-btn {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 48px;
  padding: 7px 4px;
  border: 0;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.fellowship-actions .s-btn:nth-child(3n) { border-right: 0; }
.fellowship-actions .s-btn:nth-last-child(-n + 3) { border-bottom: 0; }
.fellowship-actions .s-btn b { color: var(--text); font-size: 11px; font-weight: 500; }
.fellowship-actions .s-btn small { color: var(--text-dim); font-size: 8px; }
#fellowship-status b { color: #b85b50; }

html[data-theme="paper"] .cultivation-overview { background-color: #fff; }
html[data-theme="paper"] .cultivation-overview {
  background-image: linear-gradient(105deg, rgba(140, 91, 39, .06), transparent 46%);
}
.party-card { display: grid; gap: 6px; }
.party-member { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 8px; border-left: 2px solid var(--border); background: var(--bg3); }
.party-member.here { border-left-color: var(--gold); }
.party-member b { color: var(--text); font-size: 12px; }
.party-member span, .party-member i { color: var(--text-dim); font-size: 9px; font-style: normal; }
.party-member.here i { color: var(--gold); }

.private-compose textarea { width: 100%; min-height: 110px; margin-top: 8px; padding: 10px; resize: vertical; border: 1px solid var(--border); border-radius: 0; background: var(--bg3); color: var(--text); font: 13px/1.7 var(--font-serif); }
.private-quota { margin-bottom: 8px; color: var(--gold-dim); font-size: 10px; letter-spacing: .1em; }
.private-threads { display: grid; gap: 5px; }
.private-thread { width: 100%; padding: 8px 9px; border: 1px solid var(--border-soft); background: var(--bg3); color: var(--text); font: inherit; text-align: left; }
.private-thread span { display: flex; justify-content: space-between; gap: 8px; }
.private-thread b { color: var(--gold); font-size: 12px; }
.private-thread i { color: var(--text-dim); font-size: 9px; font-style: normal; }
.private-thread p { margin: 4px 0 0; overflow: hidden; color: var(--text-dim); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.world-raid-btn { border-top-color: #733a32; color: #d77b63; }
.world-raid-btn span:last-child { color: #d77b63; }
.raid-card h3, .npc-combat-card h3 { margin: 7px 0; color: var(--gold); font: 18px var(--font-serif); letter-spacing: .08em; }
.raid-card p, .npc-combat-card p { color: var(--text-dim); font-size: 11px; line-height: 1.65; }
.raid-result { margin-top: 10px; padding: 9px; border-left: 2px solid var(--gold); background: var(--bg3); color: var(--text); font-size: 11px; line-height: 1.7; }
.world-boss-option { margin-top: 8px; }
.raid-lost .raid-result { border-color: #b85b50; color: #d77b63; }
.npc-combat-card h3 em { margin-left: 5px; color: #c65f50; font-size: 10px; font-style: normal; }
.npc-combat-stats { display: flex; border: 1px solid var(--border); }
.npc-combat-stats span { flex: 1; padding: 6px; border-right: 1px solid var(--border); color: var(--text); font-size: 10px; text-align: center; }
.npc-combat-stats span:last-child { border-right: 0; }
.npc-drop { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 8px; border: 1px dashed var(--gold-dim); }
.npc-drop b { color: var(--gold); font-size: 10px; }
.npc-drop span { color: var(--text-dim); font-size: 9px; }

.mount-list { display: grid; gap: 7px; }
.pet-roster-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  margin-bottom: 6px;
  padding: 9px 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg3);
  color: var(--text);
  text-align: left;
}
.pet-roster-card.active { border-left: 3px solid var(--gold); }
.pet-roster-main { min-width: 0; }
.pet-roster-main .li-name, .pet-roster-main .li-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pet-roster-main .li-name i { margin-right: 5px; padding: 1px 4px; background: var(--gold); color: var(--bg); font-size: 8px; font-style: normal; }
.pet-roster-score { display: grid; justify-items: end; }
.pet-roster-score b { color: var(--gold); font: 17px var(--font-serif); }
.pet-roster-score i { color: var(--text-dim); font-size: 8px; font-style: normal; }
.pet-detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border); border-left: 3px solid var(--gold); background: var(--bg3); }
.pet-detail-head span, .pet-detail-head p { color: var(--text-dim); font-size: 9px; }
.pet-detail-head h3 { margin: 2px 0; color: var(--text); font: 17px var(--font-serif); }
.pet-detail-head p { margin: 0; }
.pet-score { display: grid; min-width: 66px; justify-items: center; padding-left: 10px; border-left: 1px solid var(--border-soft); }
.pet-score b { color: var(--gold); font: 24px var(--font-serif); }
.pet-score span, .pet-score i { color: var(--text-dim); font-size: 8px; font-style: normal; }
.pet-score i { color: var(--gold-dim); }
.pet-stats { margin-top: 8px; }
.pet-rating-note { margin: 6px 0 10px; color: var(--text-dim); font-size: 9px; line-height: 1.55; }
.pet-level-rule, .pet-gear-note { margin: 7px 0; padding: 7px 9px; border-left: 2px solid var(--gold-dim); background: var(--bg3); color: var(--text-dim); font-size: 9px; line-height: 1.55; }
.pet-gear-note { border-left-color: var(--border); background: transparent; }
.pet-equipment-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.pet-equipment-slot { min-width: 0; margin: 0; }
.pet-equipment-slot .li-main { min-width: 0; }
.pet-equipment-current { display: grid; gap: 3px; margin-bottom: 8px; padding: 9px; border: 1px solid var(--border); }
.pet-equipment-current span { color: var(--text-dim); font-size: 9px; }
.pet-equipment-current b { color: var(--text); font-size: 12px; }
.pet-equipment-choices { display: grid; gap: 5px; }
.pet-equipment-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: center; width: 100%; min-height: 46px; padding: 7px 8px; border: 1px solid var(--border-soft); background: var(--bg3); color: var(--text); text-align: left; }
.pet-equipment-choice b, .pet-equipment-choice small { display: block; }
.pet-equipment-choice b { font-size: 11px; }
.pet-equipment-choice small { margin-top: 2px; color: var(--text-dim); font-size: 8px; line-height: 1.4; }
.pet-equipment-choice i { color: var(--gold); font-size: 9px; font-style: normal; white-space: nowrap; }
.pet-equipment-choice:disabled { opacity: .48; }
.pet-aptitudes { display: grid; gap: 5px; margin: 7px 0 10px; }
.pet-aptitude { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px; overflow: hidden; padding: 6px 8px; border: 1px solid var(--border-soft); }
.pet-aptitude span, .pet-aptitude b { position: relative; z-index: 1; font-size: 10px; }
.pet-aptitude span i { margin-left: 6px; color: var(--text-dim); font-size: 8px; font-style: normal; }
.pet-aptitude b { color: var(--text); }
.pet-aptitude em { position: absolute; inset: 0 auto 0 0; width: var(--apt); background: rgba(93, 121, 98, .13); }
.pet-aptitude.good em { background: rgba(124, 135, 76, .17); }
.pet-aptitude.excellent em { background: rgba(163, 113, 42, .19); }
.pet-aptitude.low em { background: rgba(142, 74, 65, .12); }
.pet-skill-grid { display: grid; gap: 5px; margin: 7px 0 10px; }
.pet-skill-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 8px; border: 1px solid var(--border-soft); background: var(--bg3); }
.pet-skill-row b, .pet-skill-row span, .pet-skill-row small { display: block; }
.pet-skill-row b { color: var(--text); font-size: 11px; }
.pet-skill-row span, .pet-skill-row small { margin-top: 2px; color: var(--text-dim); font-size: 9px; line-height: 1.45; }
.pet-skill-row small { color: var(--gold-dim); }
.pet-skill-row button { min-width: 48px; min-height: 34px; border: 1px solid var(--border); background: var(--bg2); color: var(--gold); font: 10px var(--font); }
.pet-skill-row button:disabled { color: var(--text-dim); opacity: .45; }
.mount-card { display: grid; grid-template-columns: 38px 1fr auto; gap: 9px; align-items: center; padding: 9px; border: 1px solid var(--border-soft); background: var(--bg3); }
.mount-card.active { border-color: var(--gold); box-shadow: inset 3px 0 var(--gold); }
.mount-mark { color: var(--gold); font: 24px var(--font-serif); text-align: center; }
.mount-card-copy { min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.mount-card span, .mount-card small { color: var(--text-dim); font-size: 8px; }
.mount-card h3 { margin: 1px 0 3px; color: var(--text); font: 14px var(--font-serif); }
.mount-card p { margin: 0; color: var(--text-dim); font-size: 9px; line-height: 1.5; }
.mount-effects { margin: 4px 0; color: var(--gold-dim); font-size: 9px; }
.mount-card > button[data-mount] { padding: 7px 6px; border: 1px solid var(--border); background: transparent; color: var(--gold); font: 9px var(--font); }
.mount-card > button[data-mount]:disabled { color: var(--muted); opacity: .55; }
.mount-detail { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-left: 3px solid var(--gold-dim); background: var(--bg3); }
.mount-detail.active { border-left-color: var(--gold); }
.mount-detail-seal { display: grid; min-height: 88px; place-items: center; align-content: center; border: 1px solid var(--gold-dim); }
.mount-detail-seal span, .mount-detail-seal i { color: var(--gold-dim); font-size: 8px; font-style: normal; letter-spacing: .14em; }
.mount-detail-seal b { color: var(--gold); font: 23px var(--font-serif); }
.mount-detail-copy > span { color: var(--gold-dim); font-size: 9px; }
.mount-detail-copy h3 { margin: 3px 0 6px; color: var(--text); font: 19px var(--font-serif); }
.mount-detail-copy p { margin: 0; color: var(--text-dim); font-size: 10px; line-height: 1.65; }
.mount-riding-line { margin: 9px 0; padding: 8px 10px; border-left: 2px solid var(--gold); color: var(--text); font: 11px/1.65 var(--font-serif); }
.mount-detail-ledger { margin: 0; border-top: 1px solid var(--border-soft); }
.mount-detail-ledger div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; padding: 7px 2px; border-bottom: 1px dotted var(--border-soft); }
.mount-detail-ledger dt { color: var(--text-dim); font-size: 9px; }
.mount-detail-ledger dd { margin: 0; color: var(--text); font-size: 10px; line-height: 1.5; }
.mount-summary { margin: 0 0 10px; }
.mount-travel-list, .mount-acquire-list { display: grid; gap: 8px; margin-bottom: 12px; }
.mount-waypoint-note {
  margin: -2px 0 9px;
  color: var(--text-dim);
  font-size: 9px;
  line-height: 1.55;
}
.mount-waypoint-note span { color: var(--text); }
.mount-travel-group { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px; align-items: start; }
.mount-travel-area { padding-top: 7px; color: var(--text-dim); font-size: 9px; line-height: 1.35; }
.mount-travel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.mount-travel-grid button, .mount-acquire-entry, .mount-acquire-choice button {
  min-height: 34px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--gold);
  font: 10px var(--font);
  cursor: pointer;
}
.mount-travel-grid button { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 5px 6px; }
.mount-waypoint-marks { display: inline-flex; flex: 0 0 auto; gap: 2px; }
.mount-waypoint-marks:empty { display: none; }
.mount-waypoint-marks i {
  display: inline-grid;
  min-width: 15px;
  height: 15px;
  padding: 0 2px;
  place-items: center;
  border: 1px solid currentColor;
  color: var(--gold);
  font-style: normal;
  font-size: 8px;
  line-height: 1;
}
.mount-waypoint-marks i.safe { color: var(--ok); }
.mount-waypoint-marks i.danger { color: #b4873e; }
.mount-waypoint-marks i.abyss { color: #9b6cab; }
.mount-waypoint-marks i.gate { color: #6887a9; }
.mount-waypoint-marks i.calamity { color: var(--red); }
.mount-waypoint-marks i.region-boss { color: #9b6540; }
.mount-waypoint-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mount-acquire-entry { width: 100%; margin-top: 10px; }
.mount-acquire-choice { display: grid; grid-template-columns: minmax(0, 1fr) 58px; gap: 9px; align-items: center; padding: 8px; border: 1px solid var(--border-soft); }
.mount-acquire-choice b, .mount-acquire-choice span { display: block; }
.mount-acquire-choice b { color: var(--text); font: 13px var(--font-serif); }
.mount-acquire-choice span, .mount-acquire-choice p { margin: 2px 0 0; color: var(--text-dim); font-size: 9px; line-height: 1.45; }
.maze-card { display: grid; grid-template-columns: 78px 1fr; gap: 12px; align-items: center; padding: 12px; border: 1px solid #5a3c5c; background: radial-gradient(circle at 20% 50%, rgba(114, 61, 120, .2), transparent 42%), var(--bg3); }
.maze-depth { display: grid; place-items: center; min-height: 94px; border: 1px solid #6d4a70; }
.maze-depth i, .maze-depth span { color: #a377aa; font-size: 9px; font-style: normal; }
.maze-depth b { color: #c998d0; font: 30px var(--font-serif); }
.maze-card h3 { margin: 0 0 5px; color: #c998d0; font: 17px var(--font-serif); }
.maze-card p, .maze-card div, .maze-card small { color: var(--text-dim); font-size: 9px; line-height: 1.55; }
.tower-card { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 12px; align-items: stretch; padding: 11px; border: 1px solid var(--border); border-top: 3px solid var(--gold-dim); background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 7%, var(--bg3)), var(--bg3) 48%); }
.tower-card.boss { border-top-color: #a84d42; background: linear-gradient(135deg, rgba(158, 57, 47, .13), var(--bg3) 52%); }
.tower-floor { display: grid; min-height: 105px; place-items: center; align-content: center; border: 1px solid var(--gold-dim); }
.tower-card.boss .tower-floor { border-color: #a84d42; }
.tower-floor i, .tower-floor span { color: var(--gold-dim); font-size: 8px; font-style: normal; letter-spacing: .14em; }
.tower-card.boss .tower-floor i, .tower-card.boss .tower-floor span { color: #bd6257; }
.tower-floor b { color: var(--gold); font: 34px/.95 var(--font-serif); }
.tower-card.boss .tower-floor b { color: #bd6257; }
.tower-copy > span { color: var(--gold-dim); font-size: 9px; letter-spacing: .08em; }
.tower-copy h3 { margin: 4px 0 6px; color: var(--text); font: 17px var(--font-serif); }
.tower-copy p, .tower-copy div { margin: 0; color: var(--text-dim); font-size: 9px; line-height: 1.6; }
.tower-copy div { margin-top: 6px; color: var(--text); }
.tower-skip { margin: 8px 0; padding: 8px 9px; border-left: 3px solid var(--gold); background: color-mix(in srgb, var(--gold) 7%, var(--bg3)); color: var(--text-dim); font-size: 10px; line-height: 1.55; }
.tower-skip b { color: var(--gold); }
.tower-power { display: grid; grid-template-columns: 1fr auto 1fr; gap: 7px; align-items: center; margin: 8px 0; }
.tower-power > div { display: grid; padding: 8px; border: 1px solid var(--border-soft); text-align: center; }
.tower-power span { color: var(--text-dim); font-size: 8px; }
.tower-power b { color: var(--text); font: 16px var(--font-serif); }
.tower-power em { color: var(--gold); font: 10px var(--font-serif); font-style: normal; text-align: center; }
.tower-power em small { display: block; color: var(--text-dim); font-size: 8px; }
.tower-rule { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 8px 10px; border: 1px solid var(--border-soft); }
.tower-rule span { color: var(--text-dim); font-size: 9px; }
.tower-rule b { color: var(--text); font-size: 10px; text-align: right; }
.tower-spine { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.tower-step { display: grid; grid-template-columns: auto 1fr; gap: 1px 5px; align-items: center; padding: 6px 7px; border: 1px solid var(--border-soft); background: var(--bg3); }
.tower-step i { grid-row: 1 / 3; display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid var(--border); color: var(--text-dim); font-size: 8px; font-style: normal; }
.tower-step b { color: var(--text); font: 13px var(--font-serif); }
.tower-step span { overflow: hidden; color: var(--text-dim); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.tower-step.current { border-color: var(--gold); }
.tower-step.current i { border-color: var(--gold); color: var(--gold); }
.tower-step.boss i { border-color: #a84d42; color: #bd6257; }
.tower-locked { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); background: var(--bg3); }
.tower-locked > span { display: grid; width: 50px; height: 50px; place-items: center; border: 2px double var(--border); color: var(--text-dim); font: 19px var(--font-serif); transform: rotate(-5deg); }
.tower-locked h3 { margin: 0 0 4px; color: var(--text); font: 17px var(--font-serif); }
.tower-locked p { margin: 0; color: var(--text-dim); font-size: 10px; line-height: 1.6; }
.stall-direct-form { display: grid; gap: 8px; }
.stall-direct-form > p, .stall-direct-form > small { margin: 0; color: var(--text-dim); font-size: 10px; line-height: 1.55; }
.stall-direct-form label { display: grid; grid-template-columns: 1fr minmax(110px, 42%); gap: 8px; align-items: center; color: var(--text); font-size: 10px; }
.stall-direct-form input { width: 100%; padding: 8px; border: 1px solid var(--border); background: var(--bg3); color: var(--text); }
.stall-direct-owned { display: flex; align-items: baseline; gap: 5px; padding: 8px 10px; border-left: 3px solid var(--gold); background: color-mix(in srgb, var(--gold) 7%, var(--bg3)); color: var(--text-dim); font-size: 9px; }
.stall-direct-owned b { color: var(--gold); font: 20px var(--font-serif); }

html[data-theme="paper"] :is(.fellowship-hall, .party-member, .private-thread, .mount-card, .mount-detail, .tower-card, .tower-step, .tower-locked, .maze-card, .equipment-inspector, .equipment-compare, .profile-mount, .profile-records > div, .pet-roster-card, .pet-detail-head, .pet-skill-row, .pet-level-rule, .pet-equipment-choice) { background: #fff; }
html[data-theme="paper"] :is(.mount-travel-grid button, .mount-acquire-entry, .mount-acquire-choice) { background: #fff; }
html[data-theme="paper"] :is(.equipment-overview, .equipment-slot, .equipment-current, .equipment-choice, .title-overview, .title-seal, .title-detail) { background: #fff; }
html[data-theme="paper"] .maze-card { background: radial-gradient(circle at 20% 50%, rgba(114, 61, 120, .08), transparent 42%), #fff; }

@media (max-width: 430px) {
  .profile-gear-grid { grid-template-columns: 1fr; }
  .profile-gear { text-align: left; }
  .mount-card { grid-template-columns: 32px 1fr; }
  .mount-card > button[data-mount] { grid-column: 2; width: 100%; }
  .mount-travel-group { grid-template-columns: 1fr; gap: 3px; }
  .mount-travel-area { padding-top: 0; }
  .pet-equipment-list { grid-template-columns: 1fr; }
}

/* —— 旧式 WAP 完整覆盖：页面、战斗、功能与剧情使用同一文字网页语言 —— */
@keyframes classic-wap-tap {
  0%, 100% { translate: 0 0; }
  45% { translate: 1px 1px; color: #651f1f; }
}

html[data-theme="classic"] .classic-tap-feedback {
  animation: classic-wap-tap 160ms ease-out;
}

html[data-theme="classic"] :is(
  .stat-card, .growth-guide, .growth-roadmap, .growth-route-row,
  .profession-summary, .fellowship-hall, .utility-fold,
  .story-card, .person-entry, .daily-omen, .reward-box, .poem-block,
  .settlement-card, .quest-handoff, .profession-invitation, .collective-cause,
  .journey-completion,
  .npc-community-card, .ending-reaction, .world-reaction, .quest-resolution,
  .profile-verse, .profile-shared-fate, .person-section, .life-moment,
  .npc-thread-card, .defeat-trace, .crisis-choice-box,
  .person-met-note, .first-choice-echo, .fellow-witness, .npc-choice-echo,
  .npc-choice-echo-hint, .person-nature, .moment-after, .return-chronicle,
  .assist-intent, .cbt-allies, .sc-share, .profession-path,
  .profession-skill-row, .profession-mentor-line, .profession-loadout,
  .era-rule, .skill-system, .equipment-inspector, .equipment-compare,
  .equipment-overview, .equipment-current, .equipment-choice,
  .title-overview, .title-seal, .title-detail, .pet-roster-card,
  .pet-detail-head, .pet-skill-row, .pet-aptitude, .mount-card,
  .maze-card, .party-member, .private-thread, .raid-card, .npc-combat-card
) {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #000 !important;
}

html[data-theme="classic"] :is(.panel-title, .section-title, .event-kicker, .sc-kicker, .rb-title) {
  margin: 0 0 3px;
  padding: 0;
  border: 0;
  color: #651f1f;
  font: 400 18px/1.32 var(--font);
  letter-spacing: 0;
}
html[data-theme="classic"] .panel-hint { display: none; }
html[data-theme="classic"] #view-stats .panel-title,
html[data-theme="classic"] #view-bag .panel-title { font-size: 0; }
html[data-theme="classic"] #view-stats .panel-title::after,
html[data-theme="classic"] #view-bag .panel-title::after {
  color: #651f1f;
  font-size: 18px;
}
html[data-theme="classic"] #view-stats .panel-title::after { content: '[状态]'; }
html[data-theme="classic"] #view-stats.classic-equipment-mode .panel-title::after { content: '[装备]'; }
html[data-theme="classic"] #view-bag .panel-title::after { content: '[物品]'; }
html[data-theme="classic"] #view-bag .panel-title .dim { display: none; }
html[data-theme="classic"] #view-quest::before,
html[data-theme="classic"] #view-chat::before {
  display: block;
  margin-bottom: 3px;
  color: #651f1f;
  font: 400 18px/1.32 var(--font);
}
html[data-theme="classic"] #view-quest::before { content: '[任务]'; }
html[data-theme="classic"] #view-chat::before { content: '[传音]'; }

html[data-theme="classic"] .stats-grid { display: block; }
html[data-theme="classic"] .stat-card {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 4px;
  min-height: 0;
  margin: 0;
  padding: 0;
}
html[data-theme="classic"] .stat-card .sk,
html[data-theme="classic"] .stat-card .sv {
  color: #000;
  font: 400 18px/1.32 var(--font) !important;
}
html[data-theme="classic"] .stat-card .sk { color: #651f1f; }
html[data-theme="classic"] .stat-card .sk::after { content: ':'; }
html[data-theme="classic"] .stat-card.metric,
html[data-theme="classic"] .stat-card.metric.has-sources,
html[data-theme="classic"] .combat-bonus-card { display: block; }
html[data-theme="classic"] .metric-main {
  display: flex;
  justify-content: flex-start;
  gap: 4px;
}
html[data-theme="classic"] .metric-sources {
  display: block;
  margin: 0 0 3px 10px;
  padding: 0;
  border: 0;
  color: #000;
  font: 16px/1.32 var(--font);
}
html[data-theme="classic"] .metric-sources span,
html[data-theme="classic"] .metric-sources i { margin-right: 5px; color: #000; font: inherit; }
html[data-theme="classic"] .metric-sources b { color: inherit; font: inherit; }
html[data-theme="classic"] .combat-bonus-card .sk { margin: 3px 0 0; }
html[data-theme="classic"] .combat-bonus-list { display: block; margin: 0 0 4px 10px; }
html[data-theme="classic"] .combat-bonus-list span,
html[data-theme="classic"] .combat-bonus-list b { color: #000; font: 16px/1.32 var(--font); }
html[data-theme="classic"] .combat-bonus-list span { display: block; }
html[data-theme="classic"] .combat-bonus-list b { margin-right: 5px; }
html[data-theme="classic"] .stat-card .li-sub,
html[data-theme="classic"] .stat-card .bar-track,
html[data-theme="classic"] .realm-system-card,
html[data-theme="classic"] .first-choice-stat { display: none; }

html[data-theme="classic"] #growth-guide { display: none; }
html[data-theme="classic"] .growth-guide { margin: 8px 0 2px; padding: 0; }
html[data-theme="classic"] .growth-guide-focus { display: block; }
html[data-theme="classic"] .growth-guide-copy { padding: 0; }
html[data-theme="classic"] .growth-guide-copy > span { color: #651f1f; font: inherit; }
html[data-theme="classic"] .growth-guide-copy b { display: inline; margin-left: 4px; color: #000; font: inherit; }
html[data-theme="classic"] .growth-guide-copy p { display: none; }
html[data-theme="classic"] .growth-guide-action,
html[data-theme="classic"] .growth-route-row,
html[data-theme="classic"] .profession-summary,
html[data-theme="classic"] .fellowship-actions .s-btn,
html[data-theme="classic"] .btn-stack .btn {
  display: block;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-align: left;
  text-decoration: underline;
}
html[data-theme="classic"] .growth-guide-action { margin-top: 1px; }
html[data-theme="classic"] .growth-roadmap { margin: 3px 0; }
html[data-theme="classic"] .growth-roadmap > summary,
html[data-theme="classic"] .utility-fold > summary {
  display: block;
  min-height: 0;
  padding: 0;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-decoration: underline;
}
html[data-theme="classic"] .growth-roadmap > summary small,
html[data-theme="classic"] .utility-fold > summary small,
html[data-theme="classic"] .utility-fold > summary::after { display: none; }
html[data-theme="classic"] .growth-roadmap > summary span,
html[data-theme="classic"] .utility-fold > summary span { color: inherit; font: inherit; }
html[data-theme="classic"] .growth-route-list,
html[data-theme="classic"] .utility-fold-body { padding: 3px 0 0; border: 0; }
html[data-theme="classic"] .growth-route-row { margin-bottom: 2px; }
html[data-theme="classic"] .growth-route-row > :not(.growth-route-copy),
html[data-theme="classic"] .growth-route-copy small,
html[data-theme="classic"] .growth-route-copy b i { display: none; }
html[data-theme="classic"] .growth-route-copy b { color: #0000ee; font: inherit; text-decoration: underline; }

html[data-theme="classic"] .profession-summary { margin: 4px 0; }
html[data-theme="classic"] .profession-summary { color: #0000ee !important; }
html[data-theme="classic"] .profession-summary > span:first-child,
html[data-theme="classic"] .profession-summary small,
html[data-theme="classic"] .profession-summary i { display: none; }
html[data-theme="classic"] .profession-summary b { color: inherit; font: inherit; }
html[data-theme="classic"] .profession-summary b::before { content: '职业:'; }
html[data-theme="classic"] .fellowship-hall { margin: 4px 0; padding: 0; }
html[data-theme="classic"] .fellowship-hall .section-title .dim,
html[data-theme="classic"] .fellowship-actions .s-btn small,
html[data-theme="classic"] #fellowship-status { display: none; }
html[data-theme="classic"] .fellowship-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
html[data-theme="classic"] .fellowship-actions .s-btn { margin-right: 10px; }
html[data-theme="classic"] .fellowship-actions .s-btn b { color: inherit; font: inherit; }
html[data-theme="classic"] .utility-fold { margin: 3px 0; }
html[data-theme="classic"] .utility-fold > summary:focus { outline: none; }
html[data-theme="classic"] .btn-stack { display: block; margin-top: 4px; }
html[data-theme="classic"] #view-stats:not(.classic-equipment-mode) .fellowship-hall,
html[data-theme="classic"] #view-stats:not(.classic-equipment-mode) .equipment-detail { display: none; }

html[data-theme="classic"] #view-stats.classic-equipment-mode > :not(.panel-title):not(.equipment-detail) { display: none !important; }
html[data-theme="classic"] #view-stats.classic-equipment-mode .equipment-detail { display: block; margin: 0; }
html[data-theme="classic"] #view-stats.classic-equipment-mode .equipment-detail > summary,
html[data-theme="classic"] #view-stats.classic-equipment-mode #combat-style-title,
html[data-theme="classic"] #view-stats.classic-equipment-mode #combat-style-body,
html[data-theme="classic"] #view-stats.classic-equipment-mode #titles-section-title,
html[data-theme="classic"] #view-stats.classic-equipment-mode #titles-body,
html[data-theme="classic"] #view-stats.classic-equipment-mode .equipment-overview,
html[data-theme="classic"] #view-stats.classic-equipment-mode .equipment-loadout,
html[data-theme="classic"] #view-stats.classic-equipment-mode .equipment-wardrobe-hint { display: none !important; }
html[data-theme="classic"] #view-stats.classic-equipment-mode #equipment-section-title { display: none !important; }
html[data-theme="classic"] #view-stats.classic-equipment-mode .equipment-detail > .utility-fold-body { display: block; padding: 0; }
html[data-theme="classic"] #equipment-section-title { margin-top: 0; }
html[data-theme="classic"] #equipment-section-title .dim { display: none; }
html[data-theme="classic"] .equipment-slot-grid { display: flex; flex-direction: column; gap: 0; }
html[data-theme="classic"] .equipment-slot {
  display: flex;
  align-items: baseline;
  gap: 4px;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-align: left;
  text-decoration: underline;
}
html[data-theme="classic"] .equipment-slot-label { color: #651f1f; font: inherit; }
html[data-theme="classic"] .equipment-slot-label::after { content: ':'; }
html[data-theme="classic"] .equipment-slot-label i,
html[data-theme="classic"] .equipment-slot small { display: none; }
html[data-theme="classic"] .equipment-slot > b { color: #0000ee !important; font: inherit; }

html[data-theme="classic"] .equipment-current {
  display: block;
  margin: 0 0 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
}
html[data-theme="classic"] .equipment-current > span {
  display: block;
  color: #651f1f;
  font: 18px/1.32 var(--font);
  letter-spacing: 0;
}
html[data-theme="classic"] .equipment-current > b,
html[data-theme="classic"] .equipment-current > small,
html[data-theme="classic"] .equipment-current > p {
  display: block;
  margin: 0;
  color: #000;
  font: 18px/1.32 var(--font);
}
html[data-theme="classic"] .equipment-choice-title {
  display: block;
  margin: 5px 0 1px;
  padding: 0;
  border: 0;
}
html[data-theme="classic"] .equipment-choice-title b,
html[data-theme="classic"] .equipment-choice-title span {
  color: #651f1f;
  font: 18px/1.32 var(--font);
  letter-spacing: 0;
}
html[data-theme="classic"] .equipment-choice-title b::after { content: ' · '; }
html[data-theme="classic"] .equipment-choice-list { display: block; }
html[data-theme="classic"] .equipment-choice {
  display: block;
  width: auto;
  min-height: 0;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-decoration: underline;
}
html[data-theme="classic"] .equipment-choice-head {
  display: block;
  color: inherit;
}
html[data-theme="classic"] .equipment-choice-head b,
html[data-theme="classic"] .equipment-choice-head i {
  color: inherit;
  font: inherit;
  font-style: normal;
}
html[data-theme="classic"] .equipment-choice-head i::before { content: ' · '; }
html[data-theme="classic"] .equipment-choice-deltas,
html[data-theme="classic"] .equipment-choice > small { display: none; }
html[data-theme="classic"] .equipment-choice-empty {
  margin: 0;
  padding: 0;
  border: 0;
  color: #000;
  font: 18px/1.32 var(--font);
  text-align: left;
}
html[data-theme="classic"] .equipment-choice-empty small {
  display: block;
  margin: 0;
  color: #000;
  font: 16px/1.32 var(--font);
}

html[data-theme="classic"] .bag-filter-tabs,
html[data-theme="classic"] .chat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 5px;
  border: 0;
}
html[data-theme="classic"] .bag-filter-tabs button,
html[data-theme="classic"] .chat-tabs .tab,
html[data-theme="classic"] .chat-templates button {
  flex: none;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-decoration: underline;
}
html[data-theme="classic"] .bag-filter-tabs button:not(:last-child)::after,
html[data-theme="classic"] .chat-tabs .tab:not(:last-child)::after { content: '|'; margin: 0 5px; color: #000; text-decoration: none; }
html[data-theme="classic"] .bag-filter-tabs button.active,
html[data-theme="classic"] .chat-tabs .tab.active { color: #651f1f; }
html[data-theme="classic"] .bag-filter-meta { margin: 2px 0; color: #651f1f; font-size: 18px; }
html[data-theme="classic"] .bag-list-tools {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  min-height: 0;
  margin: 0 0 4px;
}
html[data-theme="classic"] .bag-sort-control { color: #000; font-size: 18px; }
html[data-theme="classic"] .bag-sort-control select {
  min-height: 0;
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-decoration: underline;
}
html[data-theme="classic"] #view-bag .list-item,
html[data-theme="classic"] #view-quest .list-item {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
html[data-theme="classic"] #view-bag .list-item .li-name,
html[data-theme="classic"] #view-quest .list-item .li-name {
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-decoration: underline;
}
html[data-theme="classic"] #view-quest .classic-chapter-link {
  display: inline;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}
html[data-theme="classic"] #view-bag .list-item .li-name *,
html[data-theme="classic"] #view-quest .list-item .li-name * { color: inherit !important; }
html[data-theme="classic"] #view-bag .list-item .li-sub,
html[data-theme="classic"] #view-bag .list-item .li-tag,
html[data-theme="classic"] #view-quest .list-item .li-sub,
html[data-theme="classic"] #view-quest .list-item .li-tag { display: none; }
html[data-theme="classic"] #view-bag .list-item.bag-power-row .li-tag {
  display: inline;
  padding: 0;
  border: 0;
  color: #651f1f;
  font: 16px/1.32 var(--font);
}
html[data-theme="classic"] .quest-tabs { margin-top: 0; }
html[data-theme="classic"] .quest-page-title { display: none; }
html[data-theme="classic"] .quest-overview {
  display: block;
  padding: 0 0 5px;
  border: 0;
  font-size: 18px;
}
html[data-theme="classic"] .quest-overview-mark,
html[data-theme="classic"] .quest-overview small,
html[data-theme="classic"] .quest-overview > b { display: none; }
html[data-theme="classic"] .quest-overview p {
  overflow: visible;
  margin: 0;
  color: #651f1f;
  font-size: 18px;
  white-space: normal;
}
html[data-theme="classic"] .quest-focus-card { margin: 0 0 5px; padding: 0; border: 0; background: transparent; }
html[data-theme="classic"] .quest-card-title .li-name,
html[data-theme="classic"] .quest-shelf > summary > span {
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-decoration: underline;
}
html[data-theme="classic"] .quest-card-tags,
html[data-theme="classic"] .quest-card-next > i,
html[data-theme="classic"] .quest-card-next small,
html[data-theme="classic"] .quest-shelf > summary > small { display: none; }
html[data-theme="classic"] .quest-card-next { display: block; margin: 0; }
html[data-theme="classic"] .quest-card-next b { color: #000; font: 18px/1.32 var(--font); white-space: normal; }
html[data-theme="classic"] .quest-focus-detail,
html[data-theme="classic"] .quest-shelf,
html[data-theme="classic"] .quest-card { margin: 0; border: 0; }
html[data-theme="classic"] .quest-focus-detail > summary,
html[data-theme="classic"] .quest-shelf > summary,
html[data-theme="classic"] .quest-card > summary { min-height: 0; padding: 0; }
html[data-theme="classic"] .quest-shelf > summary::after,
html[data-theme="classic"] .quest-focus-detail > summary::after { display: none; }
html[data-theme="classic"] .quest-shelf-body,
html[data-theme="classic"] .quest-card-body { padding: 0 0 5px; color: #000; font-size: 18px; }
html[data-theme="classic"] .quest-step { grid-template-columns: 20px 1fr; }
html[data-theme="classic"] .story-card { margin: 0 0 8px; padding: 0; }
html[data-theme="classic"] .story-card .sc-title { color: #651f1f; font: inherit; }
html[data-theme="classic"] .story-card .sc-body { color: #000; font: inherit; }

html[data-theme="classic"] .chat-meta { margin: 0 0 4px; color: #651f1f; font-size: 16px; }
html[data-theme="classic"] .chat-templates { display: none; }
html[data-theme="classic"] .chat-log {
  min-height: 0;
  max-height: none;
  overflow: visible;
  margin: 0 0 5px;
  padding: 0;
  border: 0;
  background: #fff;
  color: #000;
  font-size: 18px;
}
html[data-theme="classic"] .chat-line .cn,
html[data-theme="classic"] .chat-line.me .cn { color: #0000ee; }
html[data-theme="classic"] .chat-line .cm { color: #000; }
html[data-theme="classic"] .chat-input-row { align-items: baseline; }
html[data-theme="classic"] :is(.chat-input-row input, .account-settings input, .private-compose textarea) {
  min-height: 32px;
  padding: 3px 4px;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font: 18px/1.32 var(--font);
}
html[data-theme="classic"] .chat-input-row .btn { min-width: 0; min-height: 0; padding: 0 4px; border: 0; background: transparent; color: #0000ee; font: 18px var(--font); text-decoration: underline; }

html[data-theme="classic"] .classic-development-intro { display: none; }
html[data-theme="classic"] .classic-disclosure {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
html[data-theme="classic"] .classic-disclosure > summary {
  display: block;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-decoration: underline;
  cursor: pointer;
}
html[data-theme="classic"] .classic-disclosure > summary::-webkit-details-marker { display: none; }
html[data-theme="classic"] .classic-disclosure > summary:focus { outline: none; }
html[data-theme="classic"] .classic-disclosure[open] { margin-bottom: 5px; }
html[data-theme="classic"] .classic-disclosure > p,
html[data-theme="classic"] .classic-disclosure > .profession-requirements,
html[data-theme="classic"] .classic-disclosure > .profession-skill-actions {
  margin: 0;
  padding: 0 0 0 10px;
  color: #000;
  font: 18px/1.32 var(--font);
}
html[data-theme="classic"] .classic-disclosure .profession-skill-actions button {
  min-height: 0;
  margin: 0 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-decoration: underline;
}
html[data-theme="classic"] .classic-disclosure .profession-skill-actions button:disabled { color: #777; }
html[data-theme="classic"] .classic-disclosure > .attribute-add-controls { margin: 0; padding-left: 10px; }
html[data-theme="classic"] .attribute-add-controls button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-decoration: underline;
}
html[data-theme="classic"] .attribute-add-controls input { min-height: 28px; border: 1px solid #888; background: #fff; color: #000; font: 16px/1.2 var(--font); }
html[data-theme="classic"] .attribute-add-controls :is(button, input):disabled { color: #777; }

html[data-theme="classic"] .pet-roster-card {
  display: block;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: #0000ee !important;
  font: 18px/1.32 var(--font);
  text-align: left;
  text-decoration: underline;
}
html[data-theme="classic"] .pet-roster-card .li-sub,
html[data-theme="classic"] .pet-roster-card .pet-roster-score { display: none; }

html[data-theme="classic"] .map-era-strip,
html[data-theme="classic"] .map-toolbar,
html[data-theme="classic"] .map-gate-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
}
html[data-theme="classic"] :is(.map-era-tab, .map-tab, .map-gate-link) {
  min-height: 0;
  margin: 0 10px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-decoration: underline;
}
html[data-theme="classic"] :is(.map-era-tab, .map-tab).on { color: #651f1f; }
html[data-theme="classic"] .map-stat { margin-left: auto; color: #000; font: 18px/1.32 var(--font); }
html[data-theme="classic"] .map-here { margin: 0 0 5px; padding: 0; color: #000; font: 18px/1.32 var(--font); }
html[data-theme="classic"] .map-here b { color: #651f1f; }
html[data-theme="classic"] .map-chart-wrap { margin: 0; }
html[data-theme="classic"] .map-chart {
  height: 220px;
  padding-bottom: 0;
  border: 0;
  background: #fff;
  box-shadow: none;
}
html[data-theme="classic"] .map-edge { stroke: #888; filter: none; }
html[data-theme="classic"] .map-edge.solid { stroke: #333; }
html[data-theme="classic"] .map-edge.fog { stroke: #aaa; }
html[data-theme="classic"] .map-node { color: #0000ee; }
html[data-theme="classic"] .map-node .mn-dot { display: none; }
html[data-theme="classic"] .map-node .mn-lab {
  padding: 0;
  border: 0;
  background: #fff;
  color: #0000ee;
  max-width: 104px;
  font: 14px/1.2 var(--font);
  text-decoration: underline;
  text-shadow: none;
}
html[data-theme="classic"] .map-node.here .mn-lab {
  padding: 1px 2px;
  border: 1px solid #a22;
  color: #651f1f;
}
html[data-theme="classic"] .map-node.fog .mn-lab { color: #777; }
html[data-theme="classic"] .map-node .mn-gate { display: none; }
html[data-theme="classic"] .map-legend { margin: 4px 0; color: #000; font-size: 16px; }
html[data-theme="classic"] .map-pan-guide { border-color: #999; color: #000; font-size: 14px; }
html[data-theme="classic"] .map-pan-guide button { border-color: #0000ee; background: #fff; color: #0000ee; font-size: 14px; }
html[data-theme="classic"] .map-viewport { border-color: #999; }

html[data-theme="classic"] .modal {
  position: fixed;
  inset: 0;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 9px 10px 24px;
  background: #fff;
  animation: none;
}
html[data-theme="classic"] .modal.hidden { display: none; }
html[data-theme="classic"] .modal-card {
  width: 100%;
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
}
html[data-theme="classic"] .modal-title {
  margin: 0 0 6px;
  padding: 0;
  color: #651f1f;
  font: 400 18px/1.32 var(--font);
  letter-spacing: 0;
}
html[data-theme="classic"] .modal-body {
  margin: 0 0 6px;
  color: #000;
  font: 18px/1.32 var(--font);
}
html[data-theme="classic"] .modal-body :is(p, div, span, strong, b, small, i, em) {
  font-size: 18px;
  line-height: 1.32;
  text-shadow: none;
}
html[data-theme="classic"] .modal-body .event-kicker {
  margin: 4px 0 2px !important;
  color: #651f1f;
}
html[data-theme="classic"] .monster-sighting {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
html[data-theme="classic"] .monster-sighting p { color: #000; }
html[data-theme="classic"] .monster-sighting small { color: #651f1f; }
html[data-theme="classic"] .monster-intel { margin-top: 4px; border: 0; }
html[data-theme="classic"] .monster-intel > summary {
  padding: 0;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-decoration: underline;
}
html[data-theme="classic"] .classic-choice-changes {
  margin: 4px 0 0;
  color: #651f1f;
  font: 18px/1.32 var(--font);
}
html[data-theme="classic"] .modal-body .dialog,
html[data-theme="classic"] .story-prose,
html[data-theme="classic"] .event-body {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  font: inherit;
  font-style: normal;
  white-space: normal;
}
html[data-theme="classic"] .modal-actions { display: block; margin: 0; }
html[data-theme="classic"] .modal-actions.event-choices::before {
  content: '抉择';
  display: block;
  margin: 4px 0 2px;
  color: #651f1f;
  font: 18px/1.32 var(--font);
}
html[data-theme="classic"] .modal:has(.event-kicker) .modal-actions.event-choices::before { display: none; }
html[data-theme="classic"] .modal-actions .btn,
html[data-theme="classic"] #modal-close,
html[data-theme="classic"] .modal-body button:not(:disabled) {
  display: block;
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px/1.38 var(--font);
  text-align: left;
  text-decoration: underline;
  box-shadow: none;
}
html[data-theme="classic"] #modal-close { margin-top: 2px; }
html[data-theme="classic"] .modal-body button:disabled { border: 0; background: transparent; color: #777; box-shadow: none; }
html[data-theme="classic"] :is(
  .profession-path, .profession-skill-row, .skill-system,
  .pet-roster-card, .pet-detail-head, .pet-skill-row,
  .mount-card, .private-thread, .party-member,
  .equipment-choice, .title-seal
) { margin: 0 0 5px; padding: 0; }
html[data-theme="classic"] :is(.profession-sigil, .profession-stage-label, .pet-roster-score, .mount-mark) { display: none; }
html[data-theme="classic"] :is(.profession-path h3, .profession-skill-title b, .pet-detail-head h3, .mount-card h3) { color: #651f1f; font: 18px/1.32 var(--font); }
html[data-theme="classic"] :is(.profession-skill-title i, .profession-requirements, .profile-privacy, .pet-rating-note) { color: #000; font-size: 16px; }

html[data-theme="classic"] .combat-frame,
html[data-theme="classic"] .combat-enemy,
html[data-theme="classic"] .combat-command,
html[data-theme="classic"] .cbt-intent,
html[data-theme="classic"] .cbt-log,
html[data-theme="classic"] .combatant-card,
html[data-theme="classic"] .combat-log-panel {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  box-shadow: none;
}
html[data-theme="classic"] .combat-party { display: block; }
html[data-theme="classic"] .combatant-card { margin-bottom: 5px; }
html[data-theme="classic"] .combat-versus { display: none; }
html[data-theme="classic"] .combat-log-title { padding: 0; border: 0; }
html[data-theme="classic"] .combat-action-tabs { display: flex; border: 0; }
html[data-theme="classic"] .combat-action-tabs button {
  flex: none;
  min-height: 0;
  padding: 0 10px 0 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px var(--font);
  text-decoration: underline;
}
html[data-theme="classic"] .combat-action-tabs button.active { background: transparent; color: #651f1f; }
html[data-theme="classic"] .combat-action-panel { padding: 3px 0; }
html[data-theme="classic"] .cbt-actions { display: flex; flex-direction: column; gap: 0; }
html[data-theme="classic"] .cbt-actions .btn,
html[data-theme="classic"] .cbt-actions .career-skill,
html[data-theme="classic"] .cbt-actions .combat-item {
  display: block;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-align: left;
  text-decoration: underline;
  box-shadow: none;
}
html[data-theme="classic"] .cbt-actions :is(small, .li-sub) { display: none; }

html[data-theme="classic"] .modal-body:has(.profession-catalog) > .profile-privacy { display: none; }
html[data-theme="classic"] .classic-profession-choice[open] > summary { color: #651f1f; }
html[data-theme="classic"] .classic-profession-choice > :not(summary) { margin-left: 10px; }
html[data-theme="classic"] .classic-profession-choice > :is(p, .profession-requirements, .profession-skill-actions) { padding-left: 0; }
html[data-theme="classic"] .classic-profession-choice .classic-profession-motto { margin-top: 2px; }
html[data-theme="classic"] .classic-profession-choice .section-title { margin-top: 4px; }
html[data-theme="classic"] .classic-profession-skill { margin: 0 0 4px; }
html[data-theme="classic"] .classic-profession-skill b { color: #651f1f; font: 18px/1.32 var(--font); }
html[data-theme="classic"] .classic-profession-skill p { margin: 0; padding: 0; }
html[data-theme="classic"] .classic-profession-choice .profession-requirements { font-size: 18px; }
html[data-theme="classic"] .classic-mount-choice[open] > summary { color: #651f1f; }
html[data-theme="classic"] .classic-mount-choice > :not(summary) { margin-left: 10px; }
html[data-theme="classic"] .classic-mount-choice > p { margin-top: 2px; padding-left: 0; }
html[data-theme="classic"] .classic-mount-choice .mount-effects { color: #651f1f; }

/* 旧式 WAP 子页面：首屏只留摘要，详情点击展开。 */
html[data-theme="classic"] .classic-profile { color: #000; font: 18px/1.32 var(--font); }
html[data-theme="classic"] .classic-profile-name { margin-bottom: 2px; color: #651f1f; font-size: 20px; }
html[data-theme="classic"] .classic-profile-row { display: block; }
html[data-theme="classic"] .classic-profile-row > span,
html[data-theme="classic"] .classic-profile-detail span { color: #651f1f; }
html[data-theme="classic"] .classic-profile > p { margin: 5px 0; }
html[data-theme="classic"] .classic-profile-section { margin: 0; }
html[data-theme="classic"] .classic-profile-detail {
  margin: 2px 0 5px 10px;
  padding: 0;
  color: #000;
  font: 18px/1.32 var(--font);
}
html[data-theme="classic"] ul.classic-profile-detail { padding-left: 20px; }
html[data-theme="classic"] .classic-profile-detail > div { margin: 0; }

html[data-theme="classic"] .classic-function-list > button,
html[data-theme="classic"] .classic-function-group > button {
  display: block;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-align: left;
  text-decoration: underline;
}
html[data-theme="classic"] .classic-function-group { margin: 2px 0 5px 10px; }

html[data-theme="classic"] .chat-empty {
  margin: 0 0 5px;
  padding: 0;
  color: #000;
  font: 18px/1.32 var(--font);
  text-align: left;
}

html[data-theme="classic"] .map-stat {
  flex-basis: 100%;
  margin: 2px 0 0;
  color: #000;
  font: 18px/1.32 var(--font);
  text-align: left;
}
html[data-theme="classic"] .map-list { max-height: none; overflow: visible; }
html[data-theme="classic"] .map-layer-title {
  margin: 5px 0 1px;
  padding: 0;
  border: 0;
  color: #651f1f;
  font: 18px/1.32 var(--font);
  letter-spacing: 0;
}
html[data-theme="classic"] .map-list-item,
html[data-theme="classic"] .map-list-item.here {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
html[data-theme="classic"] .mli-name {
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-decoration: underline;
}
html[data-theme="classic"] .map-list-item.here .mli-name { color: #651f1f; }
html[data-theme="classic"] .mli-ex { display: none; }

/* 所有复古弹层取消现代卡片外观，保留可读文字与真实操作。 */
html[data-theme="classic"] .modal-body :is(
  .list-item, .font-choice, .leaderboard-row, .leaderboard-mine,
  .leaderboard-summary, .guide-sheet section, .supply-wallet,
  .supply-section, .item-use-result, .account-settings,
  .profile-records, .profile-gear, .profile-technique, .profile-mark
) {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html[data-theme="classic"] .modal-body .list-item {
  display: block;
  min-height: 0;
  margin: 0 0 3px;
  padding: 0;
}
html[data-theme="classic"] .modal-body .list-item .li-name {
  color: #0000ee;
  font: 18px/1.32 var(--font);
  text-decoration: underline;
}
html[data-theme="classic"] .modal-body .list-item :is(.li-sub, .li-tag) { display: none; }
html[data-theme="classic"] .font-picker { display: block; }
html[data-theme="classic"] .font-picker > p { margin: 0 0 4px; color: #000; font: 18px/1.32 var(--font); }
html[data-theme="classic"] .font-choice {
  display: block;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: #0000ee;
  text-decoration: underline;
}
html[data-theme="classic"] .font-choice > span { display: block; }
html[data-theme="classic"] .font-choice > span b { color: inherit; font: inherit; }
html[data-theme="classic"] .font-choice > span i,
html[data-theme="classic"] .font-choice > strong,
html[data-theme="classic"] .font-choice > small { display: none; }
html[data-theme="classic"] .leaderboard-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
html[data-theme="classic"] .leaderboard-row { display: block; margin: 0 0 2px; padding: 0; }
html[data-theme="classic"] .leaderboard-row > * { display: inline; margin-right: 5px; }
html[data-theme="classic"] .leaderboard-avatar { display: none; }
html[data-theme="classic"] .leaderboard-person small { display: none; }
html[data-theme="classic"] .leaderboard-mine { display: block; margin: 5px 0 0; padding: 0; }

html[data-theme="classic"] .attribute-ledger-row {
  margin: 0 0 5px;
  padding: 0;
  border: 0;
  background: transparent;
}
html[data-theme="classic"] .attribute-ledger-head {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 4px;
}
html[data-theme="classic"] .attribute-ledger-head b,
html[data-theme="classic"] .attribute-ledger-head strong { font: 18px/1.32 var(--font); }
html[data-theme="classic"] .attribute-ledger-head b { color: #651f1f; }
html[data-theme="classic"] .attribute-ledger-head b::after { content: ':'; }
html[data-theme="classic"] .attribute-ledger-head strong { color: #000; }
html[data-theme="classic"] .attribute-sources { display: block; margin: 0 0 0 10px; }
html[data-theme="classic"] .attribute-source { display: block; color: #000; font: 16px/1.32 var(--font); }
html[data-theme="classic"] .attribute-source b { color: inherit; font: inherit; }
html[data-theme="classic"] .attribute-modifier { margin-left: 10px; color: #000; font: 16px/1.32 var(--font); }

html[data-theme="classic"] .guide-sheet {
  display: block;
  max-height: none;
  overflow: visible;
  padding: 0;
  color: #000;
  font: 18px/1.32 var(--font);
}
html[data-theme="classic"] .guide-sheet section { margin: 0 0 8px; padding: 0; }
html[data-theme="classic"] .guide-sheet h3 { margin: 0 0 2px; color: #651f1f; font: 18px/1.32 var(--font); }
html[data-theme="classic"] .guide-sheet :is(p, li, b, span, small) { color: #000; font: 18px/1.32 var(--font); }
html[data-theme="classic"] .guide-career-list,
html[data-theme="classic"] .guide-attribute-list,
html[data-theme="classic"] .guide-counters { display: block; margin: 0; }
html[data-theme="classic"] .guide-career-card,
html[data-theme="classic"] .guide-attribute-row,
html[data-theme="classic"] .guide-counters span {
  display: block;
  margin: 0 0 5px;
  padding: 0;
  border: 0;
  background: transparent;
}
html[data-theme="classic"] .guide-career-card header,
html[data-theme="classic"] .guide-attribute-row { display: block; }

html[data-theme="classic"] .world-eras { display: block; }
html[data-theme="classic"] .world-eras section {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
}
html[data-theme="classic"] .world-eras section > i { display: none; }
html[data-theme="classic"] .world-eras h3 { margin: 0 0 2px; color: #651f1f; font: 18px/1.32 var(--font); }
html[data-theme="classic"] .world-eras p { color: #000; font: 18px/1.32 var(--font); }

html[data-theme="classic"] .lore-item,
html[data-theme="classic"] .poem-card,
html[data-theme="classic"] .poem-block {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  background: transparent;
}
html[data-theme="classic"] .lore-item .li-name,
html[data-theme="classic"] .poem-title { color: #651f1f; font: 18px/1.32 var(--font); }
html[data-theme="classic"] .lore-item .li-body,
html[data-theme="classic"] .poem-line { color: #000; font: 18px/1.32 var(--font); }

html[data-theme="classic"] .supply-wallet,
html[data-theme="classic"] .supply-source,
html[data-theme="classic"] .supply-contract,
html[data-theme="classic"] .supply-card {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  background: transparent;
}
html[data-theme="classic"] .supply-wallet b { margin-left: 4px; color: #000; font: inherit; }
html[data-theme="classic"] .supply-section { margin-top: 8px; }
html[data-theme="classic"] .supply-section h3 { display: block; margin: 0 0 2px; color: #651f1f; font: 18px/1.32 var(--font); }
html[data-theme="classic"] .supply-section h3 small { display: block; color: #000; font: 16px/1.32 var(--font); }
html[data-theme="classic"] .supply-card .btn,
html[data-theme="classic"] .supply-contract .btn { min-width: 0; margin-top: 1px; }

html[data-theme="classic"] .equipment-inspector > div:first-child { display: block; }
html[data-theme="classic"] .equipment-attrs { display: block; margin: 2px 0; }
html[data-theme="classic"] .equipment-attrs span { display: inline; margin-right: 8px; padding: 0; border: 0; color: #000; font: 18px/1.32 var(--font); }
html[data-theme="classic"] .artifact-state { display: block; margin: 0 0 5px; padding: 0; border: 0; background: transparent; }
html[data-theme="classic"] .item-use-changes { display: block; border: 0; }
html[data-theme="classic"] .item-use-changes > div {
  display: flex;
  justify-content: flex-start;
  gap: 4px;
  padding: 0;
  border: 0;
}
html[data-theme="classic"] .item-use-progress { margin-top: 4px !important; padding: 0; border: 0; background: transparent; }

/* Toast、广播、断线与加载提示也必须是白底文字页。 */
html[data-theme="classic"] .toast,
html[data-theme="classic"] .broadcast-toast,
html[data-theme="classic"] .connection-notice,
html[data-theme="classic"] .loading-inner {
  position: fixed;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  color: #651f1f;
  box-shadow: none;
  font: 18px/1.32 var(--font);
  letter-spacing: 0;
}
html[data-theme="classic"] .action-status {
  top: 72px;
  padding: 4px 7px;
  border: 1px solid #999;
  background: #fff;
  color: #111;
  font: 12px/1.3 Arial, sans-serif;
  box-shadow: none;
}
html[data-theme="classic"] .toast { top: 24%; max-width: calc(100% - 20px); padding: 6px 9px; }
html[data-theme="classic"] .broadcast-toast { top: 10%; max-width: calc(100% - 20px); padding: 6px 9px; }
html[data-theme="classic"] .connection-notice { inset: auto 10px 10px; padding: 6px 9px; }
html[data-theme="classic"] .loading { position: fixed; background: rgba(255, 255, 255, .92); }
html[data-theme="classic"] .loading-inner { position: static; padding: 6px 9px; }

/* 剧情揭示是三种主题共用的叙事层；旧式 WAP 也不一次倾倒整段文字。 */
html[data-theme="classic"] .modal.story-stage {
  display: flex;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(95, 74, 34, .16), transparent 48%),
    rgba(3, 4, 3, .94);
}
html[data-theme="classic"] .modal.story-stage .modal-card {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: max(28px, calc(var(--safe-t) + 18px)) 24px max(22px, calc(var(--safe-b) + 16px));
  background: linear-gradient(180deg, rgba(5, 6, 5, .3), rgba(10, 9, 6, .68));
}
html[data-theme="classic"] .modal.story-stage .modal-title {
  margin: 0;
  color: #d8bd74;
  font: 500 12px/1.35 var(--font);
  letter-spacing: .18em;
}
html[data-theme="classic"] .modal.story-stage .story-reveal-line {
  color: #eee7d8;
  font: 400 clamp(17px, 4.8vw, 21px)/1.72 var(--font);
  letter-spacing: .035em;
}
html[data-theme="classic"] .modal.story-mode .modal-body,
html[data-theme="classic"] .modal.story-mode .modal-actions,
html[data-theme="classic"] .modal.story-mode #modal-close { display: none; }
html[data-theme="classic"] .modal.story-result .modal-card { overflow: hidden; }
html[data-theme="classic"] .modal.story-result .modal-body {
  min-height: 0;
  overflow-y: auto;
}

/* 手机紧凑字号：保留触控高度，只收紧文字层级和纵向留白。 */
@media (max-width: 620px) {
  html:not([data-theme="classic"]) .btn { font-size: 13px; }
  html:not([data-theme="classic"]) .panel-title {
    margin-bottom: 8px;
    font-size: 18px;
    letter-spacing: .08em;
  }
  html:not([data-theme="classic"]) .modal-title { font-size: 15px; }
  html:not([data-theme="classic"]) .modal-body {
    font-size: 13px;
    line-height: 1.65;
  }
  html:not([data-theme="classic"]) .list-item .li-name { font-size: 13px; }
  html:not([data-theme="classic"]) .list-item .li-sub { font-size: 10px; }

  html[data-theme="paper"] .sb-brand strong { font-size: 24px; }
  html[data-theme="paper"] .sb-meta,
  html[data-theme="paper"] .sb-spirit,
  html[data-theme="paper"] #sb-online,
  html[data-theme="paper"] .bar-label,
  html[data-theme="paper"] .bar-num,
  html[data-theme="paper"] .realm-num { font-size: 10px; }
  html[data-theme="paper"] #loc-name { font-size: 16px; }
  html[data-theme="paper"] .prose {
    font-size: 13px;
    line-height: 1.5;
  }

  html:not([data-theme="classic"]) #view-stats.active {
    padding: 6px 12px 14px;
  }
  html:not([data-theme="classic"]) #view-stats > #stats-body { gap: 5px; }
  html:not([data-theme="classic"]) #view-stats .cultivation-head {
    min-height: 50px;
    padding-bottom: 5px;
  }
  html:not([data-theme="classic"]) #view-stats .cultivation-identity strong { font-size: 18px; }
  html:not([data-theme="classic"]) #view-stats .power-seal b { font-size: 17px; }
  html:not([data-theme="classic"]) #view-stats .cultivation-progress { padding-top: 2px; }
  html:not([data-theme="classic"]) #view-stats .status-ledger {
    gap: 4px;
    padding-top: 3px;
  }
  html:not([data-theme="classic"]) #view-stats .status-ledger-row p {
    font-size: 11px;
    line-height: 1.55;
  }
  html:not([data-theme="classic"]) #view-stats .status-ledger-row p b { font-size: 12px; }
  html:not([data-theme="classic"]) #view-stats .growth-guide { margin: 3px 0; }
  html:not([data-theme="classic"]) #view-stats .growth-guide-copy { padding: 6px 8px; }
  html:not([data-theme="classic"]) #view-stats .growth-guide-copy b { font-size: 12px; }
  html:not([data-theme="classic"]) #view-stats .growth-guide-copy p {
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.45;
  }
  html:not([data-theme="classic"]) #view-stats .growth-guide-action {
    min-width: 82px;
    padding: 6px 8px;
    font-size: 10px;
  }
  html:not([data-theme="classic"]) #view-stats .status-index-label { margin: 10px 0 4px; }
  html:not([data-theme="classic"]) #view-stats > .stats-action,
  html:not([data-theme="classic"]) #view-stats > .stats-detail:not([open]) > summary {
    min-height: 40px;
    padding: 7px 9px;
  }
  html:not([data-theme="classic"]) #view-stats > .stats-action > span:nth-child(2) b,
  html:not([data-theme="classic"]) #view-stats > .stats-detail:not([open]) > summary span { font-size: 11px; }
}
