/* ⚠ 构建产物：由 src/styles/*.css 按 manifest 顺序合并生成（npm run styles:build）。改样式请改分段源文件。 */
:root {
  color-scheme: dark;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "PingFang SC", serif;
  background: var(--rs-night);
  color: var(--rs-paper-text);
  font-size: 16px;
}

/* ════════════════════════════════════════════════════════
   临帝阙Plus · 全局设计令牌（美术优化 2026-07-26）
   六色体系：纸/墨/金/玉/朱/夜，均采样自现有界面基调。
   规则：新样式一律引用 --rs-*；旧样式逐屏迁移。
   ════════════════════════════════════════════════════════ */
:root {
  /* 纸 —— 面板与卡片基底 */
  --rs-paper-bright: #faf4e4;
  --rs-paper: #f5ecd6;
  --rs-paper-deep: #efe3c6;
  --rs-paper-dim: #e4d3ae;
  /* 墨 —— 浅底文字 */
  --rs-ink-strong: #2c2113;
  --rs-ink: #3a2c1c;
  --rs-ink-soft: #6a5940;
  --rs-ink-faint: #8f7d5c;
  /* 金 —— 描边与装饰 */
  --rs-gold-bright: #e0c384;
  --rs-gold: #c59b56;
  --rs-gold-dim: #9a7b4f;
  --rs-gold-deep: #6e5836;
  /* 玉 —— 青瓷绿，次级面板与主操作按钮 */
  --rs-jade-pale: #dbe4d5;
  --rs-jade: #b9c8b4;
  --rs-jade-mid: #7d9a8b;
  --rs-jade-deep: #4f756a;
  --rs-jade-ink: #2f4a41;
  /* 朱 —— 强调、徽章、要害操作 */
  --rs-cinnabar-bright: #b5433a;
  --rs-cinnabar: #8b2c24;
  --rs-cinnabar-deep: #5f1e18;
  /* 夜 —— 深色底与遮罩 */
  --rs-night: #11100f;
  --rs-night-soft: #1d1a16;
  --rs-veil: rgba(15, 12, 9, 0.58);
  --rs-veil-heavy: rgba(15, 12, 9, 0.78);
  /* 深底文字 */
  --rs-paper-text: #f4ead7;
  --rs-paper-text-dim: rgba(244, 234, 215, 0.72);
  /* 字号阶梯（六级封顶，不再自造） */
  --rs-fs-hero: 1.65rem;
  --rs-fs-title: 1.3rem;
  --rs-fs-sub: 1.08rem;
  --rs-fs-body: 0.95rem;
  --rs-fs-note: 0.84rem;
  --rs-fs-tiny: 0.76rem;
  /* 字体 */
  --rs-font-kai: "Royal Kai", "STKaiti", "KaiTi", "Songti SC", "STSong", serif;
  --rs-font-song: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --rs-font-hei: "Source Han Sans SC", "PingFang SC", system-ui, sans-serif;
  /* 圆角（三档封顶） */
  --rs-r-s: 4px;
  --rs-r-m: 8px;
  --rs-r-l: 12px;
  /* 阴影 */
  --rs-shadow-lift: 0 4px 14px rgba(30, 22, 8, 0.22);
  --rs-shadow-panel: 0 14px 38px rgba(0, 0, 0, 0.32);
  --rs-shadow-pop: 0 22px 60px rgba(0, 0, 0, 0.5);
  /* 描金线 */
  --rs-line-gold: 1px solid rgba(197, 155, 86, 0.55);
  --rs-line-gold-strong: 1px solid var(--rs-gold);
  /* 高频遗留色收编（别名 token：先变量化、后合并；值与原字面量一致，零视觉变化） */
  --rs-deep-text: #f3e9d2;    /* 深底浅字 */
  --rs-gold-text: #e7c689;    /* 深底金字 */
  --rs-gold-hover: #f4d58d;   /* hover 亮金 */
  --rs-gold-mid: #b08d57;     /* 中棕金边 */
  --rs-gold-strong: #cda25f;  /* 实金 */
}

/* ── 宫廷纸卷组件基类（rs-*）：跨屏统一的弹窗/按钮/徽章/空状态 ── */
.rs-panel {
  background: linear-gradient(180deg, var(--rs-paper-bright), var(--rs-paper-deep));
  border: 1px solid var(--rs-gold-dim);
  border-radius: var(--rs-r-m);
  box-shadow:
    inset 0 0 0 3px rgba(250, 244, 228, 0.9),
    inset 0 0 0 4px rgba(197, 155, 86, 0.5),
    var(--rs-shadow-panel);
  color: var(--rs-ink);
}
.rs-panel--pop { box-shadow:
    inset 0 0 0 3px rgba(250, 244, 228, 0.9),
    inset 0 0 0 4px rgba(197, 155, 86, 0.5),
    var(--rs-shadow-pop); }

.rs-btn {
  font: inherit;
  font-size: var(--rs-fs-body);
  color: var(--rs-ink);
  background: linear-gradient(180deg, var(--rs-paper-bright), var(--rs-paper-deep));
  border: 1px solid var(--rs-gold-dim);
  border-radius: var(--rs-r-s);
  padding: 0.5em 1.2em;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(250, 244, 228, 0.65), var(--rs-shadow-lift);
  transition: filter 0.15s ease, transform 0.05s ease;
}
.rs-btn:hover { filter: brightness(1.05); }
.rs-btn:active { transform: translateY(1px); }
.rs-btn:disabled, .rs-btn.is-disabled { opacity: 0.45; cursor: default; }
.rs-btn--jade {
  color: #f2ead2;
  background: linear-gradient(180deg, #3d5c52, var(--rs-jade-ink));
  border-color: rgba(224, 195, 132, 0.5);
}
.rs-btn--cinnabar {
  color: #f7e8cf;
  background: linear-gradient(180deg, #a03a30, var(--rs-cinnabar));
  border-color: rgba(224, 195, 132, 0.5);
}
.rs-btn--ghost {
  background: transparent;
  color: var(--rs-paper-text);
  border-color: rgba(224, 195, 132, 0.45);
  box-shadow: none;
}

.rs-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--rs-font-kai);
  font-size: var(--rs-fs-note);
  color: #f7e8cf;
  background: var(--rs-cinnabar);
  border-radius: 3px;
  padding: 0.15em 0.5em;
  letter-spacing: 0.12em;
  box-shadow: inset 0 0 0 1px rgba(247, 232, 207, 0.35);
}
.rs-chip--jade { background: var(--rs-jade-deep); }

.rs-empty {
  display: grid;
  place-items: center;
  gap: 0.6rem;
  padding: 3rem 1rem;
  color: var(--rs-ink-soft);
  text-align: center;
}
.rs-empty b {
  font-family: var(--rs-font-kai);
  font-size: var(--rs-fs-title);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--rs-ink);
}
.rs-empty small { font-size: var(--rs-fs-note); color: var(--rs-ink-faint); }

.rs-title {
  font-family: var(--rs-font-kai);
  letter-spacing: 0.18em;
  color: var(--rs-ink-strong);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0e0b09;
  -webkit-user-select: none;  /* Safari：快速连点跳过字幕时，禁掉浏览器默认的选词/选段高亮 */
  user-select: none;
}

#app.game-stage {
  position: relative;
  width: min(100vw, calc(100vh * 1.77777778));
  height: min(100vh, calc(100vw * 0.5625));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  container-type: size;
  background: var(--rs-night);
  box-shadow: 0 0 0 1px rgba(224, 195, 132, 0.22), 0 18px 60px rgba(0, 0, 0, 0.45);
}

button {
  font: inherit;
}

.game-shell {
  position: relative;
  min-height: 100vh;
  padding: 18px;
  display: grid;
  grid-template-columns: 280px minmax(360px, 1fr) 320px;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(13, 10, 8, 0.88), rgba(13, 10, 8, 0.24) 42%, rgba(13, 10, 8, 0.82)),
    linear-gradient(0deg, rgba(13, 10, 8, 0.72), rgba(13, 10, 8, 0.12) 45%, rgba(13, 10, 8, 0.68)),
    var(--scene-bg) center / cover no-repeat;
}

.topbar,
.hud,
.route-bar,
.action-dock,
.court-panel,
.detail-panel,
.log-panel,
.event-panel {
  border: 1px solid rgba(231, 198, 137, 0.54);
  background: rgba(22, 18, 16, 0.78);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.topbar {
  grid-column: 1 / 4;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto auto 1fr;   /* 续94-UI修复(Yan 2026-06-27)：头像+年月时靠左，资源靠右 → 所有场景左上角显示年月时 */
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  position: relative;   /* 续104r：右上角三快捷牌相对顶栏定位 */
}
.topbar .resource-strip { justify-self: end; }

/* 续104s·Yan：三快捷牌（寝宫/地点/私宅）挪到左上角·紧挨左侧状态牌右侧（grid 第二列·resources 仍靠最右）。容器矮(40px·随顶栏行高)→82px 高的牌图向下溢出悬挂·不撑高顶栏。 */
.topnav-banners { display: flex; align-items: flex-start; gap: 3px; height: 40px; overflow: visible; align-self: center; margin-left: 4px; }
.navban { position: relative; width: 46px; height: 82px; min-height: 0; padding: 0; border: 0; background: transparent; cursor: pointer; transition: transform 140ms ease, filter 140ms ease; }
.navban img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 6px rgba(0,0,0,0.3)); }
.navban span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.navban:hover { transform: translateY(-2px); filter: brightness(1.1); }
.navban:active { transform: translateY(1px) scale(0.97); }

/* 续104t·Yan：三快捷牌「点不动」修复。根因＝82px 牌图向下溢出到正文区，被满屏背景/后续内容盖住或拦截
   （尤其 map-screen-bg 的 `> * {z-index:1}` 把顶栏也压成 z-1，DOM 靠后的地图内容覆盖三牌）。
   做法：①court/map 顶栏整体 pointer-events:none —— 顶栏只有三牌可点，皇帝头像/日期/资源皆只读，
        故透明区点击直接穿透到正文，正文照常可点（不会被顶栏宽透明框挡住）；
        ②三牌 pointer-events:auto 且置于内容之上（地图屏顶栏抬到 z-40；court 本就 z6>内容 z5）→ 牌永远可点。*/
.court-screen .topbar, .map-screen .topbar { pointer-events: none; }
.map-screen .topbar { z-index: 40; }
.topnav-banners { pointer-events: auto; }

.brand-block {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 续95(Yan 2026-06-27)：日期横排紧凑，避免在窄屏竖排堆三行、把顶栏撑高盖住下方内容首行 */
.time-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
}

/* 顶栏皇帝头像：基础约束成小头像。此前只有 .palace-home 作用域下设了尺寸，导致地图等非主页界面 emperor-standee.png 按原图巨幅铺开、把内容挤出屏幕（表现为"一个大立绘+全黑+无按钮"）。.palace-home 的 96px 规则更具体、仍覆盖本规则 */
.brand-block img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(210, 174, 105, 0.7);
  background: rgba(35, 29, 27, 0.7);
  justify-self: start;
}

.brand-block span,
.time-block small,
.dock-title,
.eyebrow {
  color: #d8b56d;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.brand-block strong {
  font-size: 1.32rem;
  font-weight: 700;
}

.time-block {
  text-align: left;
  justify-items: start;
}

.time-block span {
  font-size: 1.08rem;
  font-weight: 700;
}

.save-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.save-tools button,
.route-bar button,
.event-actions button {
  min-height: 34px;
  border: 1px solid rgba(233, 204, 145, 0.62);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(84, 38, 31, 0.92), rgba(39, 26, 24, 0.95));
  color: #f6ead1;
  cursor: pointer;
}

.save-tools button:hover,
.route-bar button:hover,
.event-actions button:hover,
.action-button:hover,
.character-row:hover {
  border-color: var(--rs-gold-hover);
  filter: brightness(1.08);
}

.hud {
  grid-column: 1 / 4;
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  padding: 8px;
}

.stat-pill {
  position: relative;
  min-height: 42px;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid rgba(237, 210, 158, 0.16);
  background: rgba(247, 232, 188, 0.08);
}

.stat-pill span,
.stat-pill strong {
  position: relative;
  z-index: 1;
  display: block;
}

.stat-pill span {
  color: #d9c39a;
  font-size: 0.78rem;
}

.stat-pill strong {
  margin-top: 3px;
  font-size: 1rem;
}

.stat-pill i {
  position: absolute;
  inset: auto auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, #a4312f, #d9b66f, #5f9f8a);
}

.scene-copy {
  grid-column: 2;
  align-self: start;
  max-width: 620px;
  margin-top: 18px;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.76);
}

.scene-copy p {
  margin: 0 0 8px;
  color: #e2c37d;
}

.scene-copy h1 {
  margin: 0;
  font-size: 2.3rem;
  line-height: 1.1;
  font-weight: 700;
}

.scene-copy span {
  display: block;
  max-width: 560px;
  margin-top: 12px;
  color: #f2e8d5;
  line-height: 1.7;
}

.route-bar {
  grid-column: 2;
  align-self: end;
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 8px;
  padding: 10px;
}

.action-dock {
  grid-column: 3;
  grid-row: 3 / 5;
  align-self: stretch;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.dock-title {
  margin: 0 0 2px;
}

.action-button {
  min-height: 64px;
  padding: 10px;
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid rgba(226, 196, 132, 0.34);
  border-radius: 4px;
  background: rgba(46, 30, 25, 0.72);
  color: #f6ead1;
  cursor: pointer;
}

.action-button span {
  font-size: 1rem;
  font-weight: 700;
}

.action-button small {
  color: #cfbaa0;
  font-size: 0.76rem;
  line-height: 1.35;
}

.court-panel {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.character-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(226, 196, 132, 0.24);
  border-radius: 4px;
  background: rgba(28, 24, 22, 0.72);
  color: #f6ead1;
  text-align: left;
  cursor: pointer;
}

.character-row.is-selected {
  border-color: #d5b46f;
  background: rgba(84, 38, 31, 0.72);
}

.character-row img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid rgba(227, 202, 153, 0.5);
}

.character-row span {
  min-width: 0;
}

.character-row strong,
.character-row small {
  display: block;
}

.character-row small {
  margin-top: 2px;
  color: #ceb795;
}

.detail-panel {
  grid-column: 1 / 3;
  grid-row: 4;
  min-height: 170px;
  display: grid;
  grid-template-columns: 210px 1fr;
  overflow: hidden;
}

.portrait-stage {
  position: relative;
  min-height: 170px;
  background: linear-gradient(180deg, rgba(80, 44, 39, 0.7), rgba(16, 14, 13, 0.92));
  overflow: hidden;
}

.portrait-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.detail-copy {
  padding: 16px;
}

.detail-copy h2 {
  margin: 2px 0 8px;
  font-size: 1.55rem;
}

.detail-copy p {
  margin: 0 0 10px;
  line-height: 1.65;
  color: #eadcc5;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.tag-list span {
  padding: 3px 8px;
  border: 1px solid rgba(218, 183, 111, 0.45);
  color: #f1d99f;
  background: rgba(78, 42, 36, 0.48);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.mini-stats li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 244, 214, 0.07);
  border: 1px solid rgba(233, 204, 145, 0.16);
}

.mini-stats span {
  color: #d3bea2;
}

.log-panel {
  grid-column: 1 / 3;
  grid-row: 5;
  max-height: 112px;
  overflow: hidden;
  padding: 10px 14px;
}

.log-panel p {
  margin: 0;
  padding: 6px 0;
  color: #eadcc5;
  line-height: 1.45;
  border-bottom: 1px solid rgba(233, 204, 145, 0.14);
}

.log-panel p:last-child {
  border-bottom: 0;
}

.event-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.30);
}

/* 续94(Yan 2026-06-27)：事件＝对话框（屏幕底·全宽渐变·与 .dialog-box 一致）。非按钮的文字一律走对话框。 */
.event-panel {
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  min-height: 22vh;
  padding: 24px 44px 28px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  background: linear-gradient(180deg, rgba(15,12,10,0) 0%, rgba(15,12,10,0.85) 22%, rgba(15,12,10,0.97) 100%);
  color: var(--rs-deep-text);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
}

/* 事件人物的实际几何统一由后段 .standee-geom 管理，与养心殿主控共用同一套中央大立绘规则。 */
.event-standee { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 18px 24px rgba(0,0,0,0.48)); }

.event-panel h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #f6ecd2;
}

.event-panel p {
  margin: 0;
  line-height: 1.85;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .game-shell {
    min-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 12px;
  }

  .topbar,
  .hud,
  .scene-copy,
  .route-bar,
  .action-dock,
  .court-panel,
  .detail-panel,
  .log-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .topbar {
    /* 续95(Yan 2026-06-27)：原 grid-template-columns:1fr 会把 头像/日期/资源 竖排成三行、撑高顶栏盖住下方内容。改横向 flex 一行。 */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    text-align: left;
  }
  .topbar .resource-strip { margin-left: auto; }

  .time-block {
    text-align: left;
  }

  .hud {
    grid-template-columns: repeat(2, 1fr);
  }

  .scene-copy {
    margin-top: 10px;
  }

  .scene-copy h1 {
    font-size: 1.8rem;
  }

  .route-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-panel {
    grid-template-columns: 1fr;
  }

  .portrait-stage {
    min-height: 240px;
  }

  .mini-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ============================================================================
   2026-07-07 Codex：东殿 / 共享名册 / 权贵府邸 / 商肆 UI 重设
   范围：六尚局、慎刑司、宫侍/储秀/教坊/兴宁坊/皇嗣名册、重臣近臣府邸、
   景氏钱庄、奇珍阁、济世堂。所有超屏内容仍走翻页，不启用滚动。
   ============================================================================ */
#app.game-stage .east-admin-screen::before,
#app.game-stage .shared-ledger-screen::before,
#app.game-stage .market-ledger-screen::before {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 247, 219, 0.24), transparent 36%),
    linear-gradient(90deg, rgba(28, 20, 13, 0.38), rgba(28, 20, 13, 0.08) 24%, rgba(28, 20, 13, 0.08) 76%, rgba(28, 20, 13, 0.38)),
    linear-gradient(0deg, rgba(44, 28, 18, 0.28), transparent 50%);
}

#app.game-stage .east-admin-screen .scene-groups {
  top: clamp(96px, 14cqh, 128px);
  width: min(980px, 86cqw);
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 0.82fr);
  gap: clamp(16px, 2cqw, 26px);
}

#app.game-stage .east-admin-screen .scene-group {
  min-width: 0;
  padding: clamp(16px, 2cqh, 24px);
  border-radius: 8px;
  border: 1px solid rgba(190, 145, 76, 0.56);
  background:
    linear-gradient(180deg, rgba(255, 250, 231, 0.92), rgba(225, 230, 210, 0.88)),
    linear-gradient(90deg, rgba(73, 109, 96, 0.12), rgba(139, 44, 36, 0.05));
  box-shadow: 0 24px 48px rgba(22, 14, 9, 0.28), inset 0 0 0 1px rgba(255, 255, 241, 0.42);
}

#app.game-stage .east-admin-screen .scene-group-h {
  color: #49321b;
  text-shadow: none;
  letter-spacing: 0;
  border-bottom-color: rgba(190, 145, 76, 0.38);
}

#app.game-stage .east-admin-screen .scene-group-btns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.1cqh, 12px);
}

#app.game-stage .east-admin-screen .scene-group:last-child .scene-group-btns {
  grid-template-columns: 1fr;
}

#app.game-stage .east-admin-screen .palace-btn {
  min-height: clamp(44px, 6.2cqh, 56px);
  border-radius: 6px;
  border-color: rgba(75, 113, 96, 0.54);
  background: linear-gradient(180deg, rgba(231, 238, 222, 0.96), rgba(174, 198, 178, 0.94));
  color: #263f35;
  letter-spacing: 0;
  box-shadow: 0 8px 18px rgba(28, 20, 13, 0.18);
}

#app.game-stage .shared-ledger-screen .topnav-banners,
#app.game-stage .market-ledger-screen .topnav-banners,
#app.game-stage .noble-mansion-screen .topnav-banners,
#app.game-stage .xingning-ledger-screen .topnav-banners {
  display: none;
}

#app.game-stage .shared-ledger-screen,
#app.game-stage .market-ledger-screen {
  --ledger-ink: #33271d;
  --ledger-muted: #6f5b3e;
  --ledger-paper: rgba(255, 251, 235, 0.94);
  --ledger-paper-2: rgba(234, 227, 201, 0.9);
  --ledger-jade: #b9c8b1;
  --ledger-jade-deep: #496d5d;
  --ledger-gold: #b88942;
  --ledger-red: var(--rs-cinnabar);
}

#app.game-stage .shared-ledger-screen.bureau-screen,
#app.game-stage .market-ledger-screen.bureau-screen {
  justify-content: center;
  padding: clamp(96px, 13cqh, 122px) 0 clamp(76px, 10cqh, 100px);
}

#app.game-stage .shared-ledger-body,
#app.game-stage .market-ledger-body {
  width: min(1160px, 90cqw);
  max-height: 100%;
  padding: 0;
  margin: 0 auto;
  overflow: hidden;
}

#app.game-stage .shared-ledger-panel,
#app.game-stage .market-ledger-panel {
  box-sizing: border-box;
  max-height: calc(100cqh - clamp(178px, 24cqh, 220px));
  overflow: hidden;
  padding: clamp(18px, 2.4cqh, 26px) clamp(18px, 2.5cqw, 32px);
  border-radius: 8px;
  border: 1px solid rgba(184, 138, 67, 0.58);
  background:
    linear-gradient(180deg, var(--ledger-paper), var(--ledger-paper-2)),
    linear-gradient(90deg, rgba(73, 109, 96, 0.1), rgba(139, 44, 36, 0.06));
  color: var(--ledger-ink);
  box-shadow: 0 22px 44px rgba(30, 20, 12, 0.26), inset 0 0 0 1px rgba(255, 255, 244, 0.48);
}

#app.game-stage .shared-ledger-head,
#app.game-stage .market-ledger-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  margin: 0 0 clamp(14px, 2cqh, 20px);
  padding-bottom: clamp(9px, 1.4cqh, 13px);
  border-bottom: 1px solid rgba(184, 138, 67, 0.34);
  color: var(--ledger-ink);
}

#app.game-stage .shared-ledger-head span,
#app.game-stage .market-ledger-head span {
  color: var(--ledger-ink);
  font-size: clamp(24px, 3.5cqh, 32px);
  font-weight: 700;
  letter-spacing: 0;
}

#app.game-stage .shared-ledger-head small,
#app.game-stage .market-ledger-head small {
  color: var(--ledger-muted);
  font-size: clamp(12px, 1.9cqh, 15px);
  letter-spacing: 0;
}

#app.game-stage .shared-ledger-screen .bureau-sec:not(.shared-ledger-panel),
#app.game-stage .market-ledger-block {
  border-radius: 7px;
  border: 1px solid rgba(75, 113, 96, 0.24);
  background: rgba(255, 253, 241, 0.64);
  color: var(--ledger-ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 246, 0.35);
}

#app.game-stage .shared-ledger-screen .bureau-sec-h,
#app.game-stage .market-ledger-screen .bureau-sec-h {
  color: #743f27;
  font-size: clamp(16px, 2.3cqh, 22px);
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}

#app.game-stage .bureau-ledger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(10px, 1.4cqh, 16px);
  overflow: hidden;
}

#app.game-stage .servant-ledger-screen .bureau-ledger-grid {
  display: block;
}

#app.game-stage .shared-ledger-screen .bureau-line,
#app.game-stage .shared-ledger-screen .bureau-rank-row,
#app.game-stage .shared-ledger-screen .bureau-cand,
#app.game-stage .shared-ledger-screen .roster-d-line,
#app.game-stage .shared-ledger-screen .roster-attr,
#app.game-stage .shared-ledger-screen .roster-d-extra,
#app.game-stage .market-inventory {
  color: var(--ledger-muted);
}

#app.game-stage .shared-ledger-screen .bureau-line b,
#app.game-stage .shared-ledger-screen .roster-d-head,
#app.game-stage .shared-ledger-screen .roster-d-sec,
#app.game-stage .shared-ledger-screen .roster-name,
#app.game-stage .shared-ledger-screen .roster-d-line span,
#app.game-stage .shared-ledger-screen .roster-attr i,
#app.game-stage .shared-ledger-screen .roster-d-extra span {
  color: #743f27;
}

#app.game-stage .shared-ledger-screen .roster-panel {
  margin-top: 0;
}

#app.game-stage .shared-ledger-screen .roster-body {
  display: grid;
  grid-template-columns: clamp(150px, 15cqw, 210px) minmax(0, 1fr);
  gap: clamp(12px, 1.6cqw, 20px);
  align-items: stretch;
  min-height: 0;
}

#app.game-stage .shared-ledger-screen .roster-list {
  flex-basis: auto;
  max-height: none;
  min-height: 0;
  overflow: hidden;
}

#app.game-stage .shared-ledger-screen .roster-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(140px, 14cqw, 190px);
  gap: clamp(12px, 1.6cqw, 20px);
  min-width: 0;
}

#app.game-stage .shared-ledger-screen .roster-entry,
#app.game-stage .shared-ledger-screen .roster-detail,
#app.game-stage .shared-ledger-screen .roster-portrait {
  border-radius: 7px;
  border-color: rgba(75, 113, 96, 0.34);
  background: rgba(255, 253, 241, 0.72);
  color: var(--ledger-ink);
}

#app.game-stage .shared-ledger-screen .roster-entry.is-on {
  border-color: rgba(184, 138, 67, 0.84);
  background: linear-gradient(180deg, rgba(243, 220, 173, 0.96), rgba(224, 194, 138, 0.94));
}

#app.game-stage .shared-ledger-screen .roster-entry small {
  color: var(--ledger-muted);
}

#app.game-stage .shared-ledger-screen .roster-portrait img {
  object-fit: contain;
  object-position: center bottom;
  padding: 4px;
}

#app.game-stage .shared-ledger-screen .roster-actions,
#app.game-stage .shared-ledger-screen .bureau-acts,
#app.game-stage .market-ledger-screen .bureau-acts {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

#app.game-stage .shared-ledger-screen .palace-btn,
#app.game-stage .shared-ledger-screen .court-action,
#app.game-stage .shared-ledger-screen .persona-tag,
#app.game-stage .market-ledger-screen .palace-btn {
  border-radius: 6px;
  border-color: rgba(75, 113, 96, 0.58);
  background: linear-gradient(180deg, rgba(224, 233, 214, 0.96), rgba(174, 198, 178, 0.94));
  color: #263f35;
  letter-spacing: 0;
  font-weight: 600;
}

#app.game-stage .shared-ledger-screen .palace-btn:hover:not(:disabled),
#app.game-stage .shared-ledger-screen .court-action:hover:not(:disabled),
#app.game-stage .shared-ledger-screen .persona-tag:hover:not(:disabled),
#app.game-stage .market-ledger-screen .palace-btn:hover:not(:disabled) {
  border-color: rgba(184, 138, 67, 0.82);
  background: linear-gradient(180deg, rgba(246, 224, 181, 0.98), rgba(218, 190, 132, 0.96));
  color: #4b3217;
}

#app.game-stage .shared-ledger-screen .palace-btn-danger,
#app.game-stage .shared-ledger-screen .danger {
  border-color: rgba(139, 44, 36, 0.64);
  background: linear-gradient(180deg, rgba(235, 205, 188, 0.96), rgba(181, 118, 96, 0.94));
  color: #6e2118;
}

#app.game-stage .shared-ledger-screen .roster-pgnum {
  min-width: 58px;
  text-align: center;
  color: #704b21;
  font-size: 14px;
}

#app.game-stage .storyclaim-ledger-screen .xiu-layout,
#app.game-stage .jiaofang-ledger-screen .xiu-layout {
  display: block;
}

#app.game-stage .qujin-ledger-screen .shared-ledger-body,
#app.game-stage .xingning-ledger-screen .shared-ledger-body,
#app.game-stage .noble-mansion-screen .shared-ledger-body,
#app.game-stage .shenxing-ledger-screen .shared-ledger-body {
  width: min(1080px, 88cqw);
}

#app.game-stage .heir-ledger-screen .heir-ledger {
  position: relative;
  left: auto;
  top: auto;
  bottom: auto;
  width: auto;
  transform: none;
  display: flex;
  min-height: 0;
  padding: clamp(18px, 2.3cqh, 26px) clamp(20px, 2.6cqw, 34px);
}

#app.game-stage .heir-ledger-screen .heir-ledger__cards {
  grid-template-columns: repeat(auto-fill, minmax(clamp(132px, 12cqw, 172px), 1fr));
}

#app.game-stage .heir-ledger-screen .heir-ledger__head {
  color: var(--ledger-ink);
}

#app.game-stage .noble-mansion-screen .sz-tabs,
#app.game-stage .xingning-ledger-screen .sz-tabs {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: clamp(8px, 1cqw, 14px);
  margin: 0 0 clamp(12px, 1.8cqh, 18px);
}

#app.game-stage .noble-mansion-screen .sz-tab,
#app.game-stage .xingning-ledger-screen .sz-tab,
#app.game-stage .storexiu-ledger-screen .xiu-cat {
  border-radius: 6px;
  border-color: rgba(75, 113, 96, 0.54);
  background: linear-gradient(180deg, rgba(224, 233, 214, 0.96), rgba(174, 198, 178, 0.94));
  color: #263f35;
  letter-spacing: 0;
}

#app.game-stage .noble-mansion-screen .sz-tab.is-on,
#app.game-stage .xingning-ledger-screen .sz-tab.is-on,
#app.game-stage .storexiu-ledger-screen .xiu-cat.on {
  border-color: rgba(184, 138, 67, 0.86);
  background: linear-gradient(180deg, #f3dcad, #dfbf82);
  color: #4c3218;
}

#app.game-stage .market-ledger-body {
  width: min(920px, 82cqw);
}

#app.game-stage .market-ledger-head {
  margin-bottom: clamp(16px, 2.2cqh, 24px);
}

#app.game-stage .bank-balances,
#app.game-stage .market-stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.4cqw, 16px);
  margin: 0 0 clamp(14px, 2cqh, 22px);
}

#app.game-stage .market-stat-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#app.game-stage .bank-bal,
#app.game-stage .market-stat-row span {
  min-height: clamp(54px, 7.2cqh, 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid rgba(75, 113, 96, 0.32);
  background: rgba(255, 253, 241, 0.7);
  color: var(--ledger-muted);
  text-align: center;
}

#app.game-stage .bank-bal b {
  color: #743f27;
  font-size: clamp(15px, 2.1cqh, 19px);
}

#app.game-stage .bank-bal-k {
  color: var(--ledger-muted);
  font-size: 12px;
}

#app.game-stage .market-ledger-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.6cqw, 20px);
}

#app.game-stage .market-ledger-block {
  padding: clamp(12px, 1.7cqh, 18px);
  overflow: hidden;
}

#app.game-stage .market-ledger-screen .palace-btn {
  min-width: clamp(116px, 12cqw, 164px);
  min-height: 42px;
  white-space: normal;
}

#app.game-stage .market-inventory {
  margin: 0;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 980px) {
  #app.game-stage .east-admin-screen .scene-groups,
  #app.game-stage .market-ledger-cols,
  #app.game-stage .shared-ledger-screen .roster-body,
  #app.game-stage .shared-ledger-screen .roster-main {
    grid-template-columns: 1fr;
  }
  #app.game-stage .bank-balances,
  #app.game-stage .market-stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .hud,
  .route-bar,
  .event-actions,
  .mini-stats {
    grid-template-columns: 1fr;
  }

  .save-tools {
    grid-template-columns: 1fr;
  }
}

/* 临帝阙风格首屏：全屏宫殿、中央主控、左侧圆形行动入口 */
.palace-home {
  min-height: 100vh;
  height: 100vh;
  display: block;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(236, 231, 217, 0.05), rgba(255, 255, 255, 0.18) 48%, rgba(33, 24, 19, 0.2)),
    linear-gradient(0deg, rgba(38, 33, 31, 0.36), rgba(255, 255, 255, 0.04) 42%, rgba(255, 255, 255, 0.08)),
    var(--scene-bg) center / cover no-repeat;
}

.palace-home .topbar,
.palace-home .route-bar,
.palace-home .action-dock,
.palace-home .court-panel,
.palace-home .detail-panel,
.palace-home .log-panel {
  position: absolute;
  z-index: 2;
}

.palace-home .topbar {
  top: 22px;
  left: 22px;
  right: 26px;
  min-height: 96px;
  display: grid;
  grid-template-columns: 250px minmax(360px, 520px) 1fr 250px;
  gap: 16px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.palace-home .brand-block {
  position: relative;
  min-height: 96px;
  padding: 16px 0 0 112px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}


.palace-home .brand-block span {
  display: block;
  color: #efe4c5;
  font-size: 0.8rem;
}

.palace-home .brand-block strong {
  display: block;
  margin-top: 2px;
  color: #fff5d8;
  font-size: 1.35rem;
}

.palace-home .time-block {
  min-height: 76px;
  padding: 14px 28px 12px;
  text-align: left;
  color: #39312d;
  background:
    linear-gradient(90deg, rgba(244, 240, 225, 0.88), rgba(221, 211, 194, 0.72)),
    url("./assets/ui/time-frame.png") center / 100% 100% no-repeat;
  border: 1px solid rgba(79, 63, 49, 0.42);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.22);
}



.palace-home .resource-strip {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 16px;
  color: #fff7d9;
  background: rgba(37, 34, 31, 0.5);
  border: 1px solid rgba(229, 205, 154, 0.42);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.palace-home .resource-strip span {
  white-space: nowrap;
  color: #d8c59f;
}

.palace-home .resource-strip strong {
  margin-left: 6px;
  color: #fff6d0;
  font-size: 1.08rem;
}

.palace-home .save-tools {
  justify-self: end;
  width: 220px;
  grid-template-columns: 1fr;
  gap: 8px;
}

.palace-home .save-tools button,
.palace-home .route-bar button {
  min-height: 42px;
  color: #f8edca;
  border-radius: 8px;
  border-color: rgba(227, 198, 128, 0.72);
  background: linear-gradient(180deg, rgba(67, 58, 48, 0.86), rgba(34, 31, 27, 0.88));
  box-shadow: 0 0 0 1px rgba(255, 245, 208, 0.12) inset, 0 5px 14px rgba(0, 0, 0, 0.22);
}

.palace-home .hud,
.palace-home .scene-copy {
  display: none;
}

.ruler-standee {
  position: absolute;
  z-index: 1;
  inset: 74px 22% 0 23%;
  pointer-events: none;
}


.palace-home .action-dock {
  left: 38px;
  top: 210px;
  width: 285px;
  display: grid;
  grid-template-columns: repeat(2, 112px);
  gap: 24px 20px;
  padding: 0;
  align-content: start;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.palace-home .action-dock .dock-title {
  grid-column: 1 / 3;
  margin: 0 0 -6px;
  color: rgba(255, 244, 213, 0.9);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.palace-home .action-button {
  position: relative;
  width: 112px;
  height: 112px;
  min-height: 112px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(222, 184, 108, 0.86);
  background:
    radial-gradient(circle at 44% 38%, rgba(255, 250, 222, 0.96), rgba(220, 203, 160, 0.82) 44%, rgba(78, 57, 42, 0.8) 100%);
  color: #463629;
  text-align: center;
  box-shadow:
    0 0 0 7px rgba(61, 48, 39, 0.54),
    0 10px 22px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255, 249, 220, 0.46) inset;
}

.palace-home .action-button b {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: rgba(58, 46, 35, 0.86);
  border-radius: 50%;
  background: rgba(255, 253, 232, 0.22);
}

.palace-home .action-button span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -25px;
  min-height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff4d1;
  font-size: 0.9rem;
  background: rgba(48, 43, 37, 0.82);
  border: 1px solid rgba(224, 194, 129, 0.56);
}

.palace-home .action-button small {
  display: none;
}

.palace-home .route-bar {
  right: 86px;
  bottom: 90px;
  width: 140px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.palace-home .court-panel {
  top: 350px;
  right: 28px;
  width: 270px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-color: rgba(230, 203, 148, 0.38);
  background: rgba(39, 35, 31, 0.48);
}

.palace-home .court-panel .dock-title {
  color: #f1dfb2;
}

.palace-home .character-row {
  min-height: 54px;
  grid-template-columns: 42px 1fr;
  background: rgba(31, 29, 27, 0.68);
}

.palace-home .character-row img {
  width: 42px;
  height: 42px;
}

.palace-home .detail-panel {
  left: 360px;
  right: 360px;
  bottom: 24px;
  min-height: 120px;
  grid-template-columns: 118px 1fr;
  background: rgba(39, 35, 31, 0.52);
}

.palace-home .portrait-stage {
  min-height: 120px;
}

.palace-home .detail-copy {
  padding: 12px 14px;
}

.palace-home .detail-copy h2 {
  font-size: 1.3rem;
}

.palace-home .detail-copy p {
  margin-bottom: 6px;
}

.palace-home .tag-list {
  margin: 6px 0;
}

.palace-home .mini-stats {
  grid-template-columns: repeat(4, minmax(70px, 1fr));
}

.palace-home .log-panel {
  left: 370px;
  right: 370px;
  bottom: 154px;
  max-height: 92px;
  background: rgba(31, 28, 25, 0.48);
}

@media (max-width: 980px) {
  .palace-home {
    height: auto;
    min-height: 100vh;
    overflow: auto;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .palace-home .topbar,
  .palace-home .route-bar,
  .palace-home .action-dock,
  .palace-home .court-panel,
  .palace-home .detail-panel,
  .palace-home .log-panel {
    position: relative;
    inset: auto;
    width: auto;
    right: auto;
    left: auto;
    top: auto;
    bottom: auto;
  }

  .palace-home .topbar {
    grid-template-columns: 1fr;
  }

  .palace-home .resource-strip,
  .palace-home .save-tools {
    justify-self: stretch;
    width: auto;
  }

  .ruler-standee {
    position: relative;
    inset: auto;
    height: 360px;
    order: 3;
  }

  .palace-home .action-dock {
    order: 4;
    grid-template-columns: repeat(2, 112px);
    justify-content: center;
  }

  .palace-home .route-bar,
  .palace-home .court-panel,
  .palace-home .detail-panel,
  .palace-home .log-panel {
    order: 6;
  }

  .palace-home .detail-panel {
    grid-template-columns: 1fr;
  }

  .palace-home .portrait-stage {
    min-height: 220px;
  }
}

/* 临帝阙养心殿复刻方向：桌面首屏，真实素材拼装 */
body {
  overflow: hidden;
}

.palace-home {
  width: 100vw;
  height: 100vh;
  min-width: 1180px;
  min-height: 680px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(16, 17, 18, 0.24), rgba(255, 255, 255, 0.02) 34%, rgba(255, 255, 255, 0.08) 58%, rgba(20, 18, 16, 0.18)),
    var(--scene-bg) center / cover no-repeat;
}

.palace-home::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(222, 235, 226, 0.08);
}

.palace-home .hud,
.palace-home .scene-copy,
.palace-home .court-panel,
.palace-home .detail-panel,
.palace-home .log-panel {
  display: none;
}

.palace-home .topbar {
  top: 18px;
  left: 18px;
  right: 18px;
  height: 118px;
  display: block;
  min-height: 0;
  z-index: 5;
  pointer-events: none;
}

.palace-home .brand-block {
  position: absolute;
  left: 0;
  top: 0;
  width: 178px;
  min-height: 148px;
  padding: 0;
}

.palace-home .brand-block img {
  position: absolute;
  left: 0;
  top: 0;
  width: 118px;
  height: 118px;
  border: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: 49% 22%;
  background: rgba(37, 35, 34, 0.76);
  box-shadow:
    0 0 0 3px rgba(46, 37, 32, 0.72),
    0 0 0 6px rgba(222, 186, 119, 0.68),
    0 12px 18px rgba(12, 11, 10, 0.24);
}

.palace-home .brand-block::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 70px;
  width: 60px;
  height: 60px;
  background: url("./assets/ui/home-palace.webp") center / contain no-repeat;
  opacity: 0.88;
}

.palace-home .brand-block span {
  position: absolute;
  left: 128px;
  top: 72px;
  width: 190px;
  padding: 7px 12px;
  color: #fff2cf;
  font-size: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
  background: rgba(55, 48, 42, 0.64);
  border: 1px solid rgba(221, 192, 134, 0.32);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.palace-home .time-block {
  position: absolute;
  left: 176px;
  top: 20px;
  width: 430px;
  height: 72px;
  min-height: 0;
  padding: 13px 32px 0 58px;
  border: 0;
  background: url("./assets/ui/home-time.webp") center / 100% 100% no-repeat;
  box-shadow: none;
}

.palace-home .time-block span {
  position: absolute;
  color: #453b33;
  font-size: 1.26rem;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.44);
}

.palace-home .time-block .date-era {
  left: 92px;
  top: 21px;
}

.palace-home .time-block .date-month {
  left: 238px;
  top: 21px;
}

.palace-home .time-block .date-slot {
  left: 326px;
  top: 21px;
}

.palace-home .time-block small {
  position: absolute;
  left: 118px;
  top: 46px;
  color: #79634f;
  font-size: 0.92rem;
}

.palace-home .resource-strip {
  position: absolute;
  top: 22px;
  right: 180px;
  width: 522px;
  height: 70px;
  min-height: 0;
  justify-content: flex-end;
  gap: 34px;
  padding: 16px 44px 0 96px;
  border: 0;
  color: #f8edcc;
  background: url("./assets/ui/home-money.webp") center / 100% 100% no-repeat;
  box-shadow: none;
}

.palace-home .resource-strip span {
  color: #efe2bf;
  font-size: 0.92rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}

.palace-home .resource-strip strong {
  color: #fff7d7;
  font-size: 1.25rem;
}

.quick-tabs {
  position: absolute;
  z-index: 6;
  top: 52px;
  left: 50%;
  display: flex;
  gap: 12px;
  transform: translateX(-50%);
}

.quick-tabs button,
.side-stack button,
.home-control,
.palace-home .route-bar button {
  cursor: pointer;
}

.quick-tabs button {
  width: 65px;
  height: 115px;
  padding: 0;
  border: 0;
  background: transparent;
}

.quick-tabs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 5px rgba(0, 0, 0, 0.22));
}

.ruler-standee {
  z-index: 2;
  inset: 20px 210px -78px 250px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.ruler-standee img {
  width: min(72vw, 1110px);
  height: auto;
  max-height: 104vh;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 24px 22px rgba(0, 0, 0, 0.28));
}

.palace-home .action-dock {
  z-index: 7;
  left: 38px;
  top: 186px;
  width: 282px;
  grid-template-columns: repeat(2, 122px);
  gap: 28px 22px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.home-control {
  position: relative;
  width: 122px;
  height: 122px;
  min-height: 122px;
  padding: 0;
  border: 0;
  color: #fff5d6;
  background: transparent;
  text-align: center;
  filter: drop-shadow(0 8px 7px rgba(0, 0, 0, 0.26));
}

.home-control img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  object-position: center;
  transition: transform 140ms ease, filter 140ms ease;
}

.home-control[data-home-control="month"] img {
  width: 104px;
  height: 104px;
}

.home-control[data-home-control="save"] img,
.home-control[data-home-control="dress"] img {
  width: 96px;
  height: 96px;
}

.home-control span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -4px;
  min-height: 26px;
  display: grid;
  place-items: center;
  color: #fff1cb;
  font-size: 0.96rem;
  line-height: 1;
  background: rgba(47, 42, 37, 0.82);
  border: 1px solid rgba(218, 188, 123, 0.52);
  border-radius: 9px;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.48);
}

.home-control:hover img {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.08);
}

.side-stack {
  position: absolute;
  z-index: 8;
  top: 40px;
  right: 24px;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.side-stack button {
  width: 82px;
  min-height: 46px;
  padding: 0 10px;
  border: 1px solid rgba(221, 193, 128, 0.58);
  color: #f8edca;
  font-size: 1rem;
  background: rgba(47, 42, 36, 0.8);
  box-shadow: 0 0 0 1px rgba(255, 246, 211, 0.16) inset, 0 6px 12px rgba(0, 0, 0, 0.2);
}

.side-stack .icon-only {
  width: 72px;
  height: 72px;
  min-height: 72px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.side-stack img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.28));
}

.palace-home .route-bar {
  z-index: 7;
  right: 88px;
  bottom: 72px;
  width: 150px;
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.palace-home .route-bar button {
  min-height: 42px;
  border: 0;
  color: #fff0ca;
  font-size: 1rem;
  background: url("./assets/ui/home-wide-button.webp") center / 100% 100% no-repeat;
  box-shadow: none;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.55);
}

.palace-home .route-bar button:hover {
  background-image: url("./assets/ui/home-wide-button-active.webp");
  filter: none;
}

.imperial-note {
  position: absolute;
  z-index: 6;
  left: 348px;
  right: 318px;
  bottom: 24px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 22px;
  color: #f6edd2;
  background: rgba(38, 34, 30, 0.46);
  border: 1px solid rgba(222, 194, 137, 0.34);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.imperial-note span {
  color: #ead59c;
  font-size: 1.28rem;
}

.imperial-note p {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: #f1e4c4;
  font-size: 1rem;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 养心殿像素参考皮肤：以截图为视觉底板，保留透明可点击热区 */
.palace-home.reference-skin {
  min-width: 0;
  min-height: 0;
  aspect-ratio: 16 / 9;
  background: url("./assets/reference/lingdique-yangxin-home.png") center / cover no-repeat;
}

.reference-skin::after,
.reference-skin .topbar,
.reference-skin .quick-tabs,
.reference-skin .ruler-standee,
.reference-skin .route-bar,
.reference-skin .side-stack,
.reference-skin .imperial-note {
  opacity: 0;
}

.reference-skin .topbar,
.reference-skin .quick-tabs,
.reference-skin .ruler-standee,
.reference-skin .imperial-note {
  pointer-events: none;
}

.reference-skin .action-dock {
  left: 3.2%;
  top: 22.4%;
  width: 235px;
  height: 590px;
  display: grid;
  grid-template-columns: repeat(2, 98px);
  grid-auto-rows: 112px;
  gap: 36px 42px;
}

.reference-skin .home-control {
  width: 98px;
  height: 112px;
  min-height: 112px;
  opacity: 0;
}

.reference-skin .home-control:hover {
  opacity: 0.08;
  background: #fff6cf;
  border-radius: 50%;
}

.reference-skin .route-bar {
  right: 15.5%;
  bottom: 18.5%;
  width: 180px;
  height: 260px;
  display: grid;
  gap: 24px;
  pointer-events: auto;
}

.reference-skin .route-bar button {
  width: 180px;
  height: 92px;
  opacity: 0;
}

.reference-skin .side-stack {
  top: 3.8%;
  right: 2.2%;
  width: 96px;
  pointer-events: auto;
}

.reference-skin .side-stack button {
  width: 96px;
  height: 92px;
  min-height: 92px;
  opacity: 0;
}

.reference-skin .event-backdrop {
  opacity: 1;
}

/* ===== 地点·地图导航 ===== */
.map-screen { padding: 24px; max-width: 820px; margin: 0 auto; color: #ece1c6; font-family: "PingFang SC", system-ui, sans-serif; }
.map-head { display: flex; align-items: center; gap: 24px; margin-bottom: 16px; }
.map-head h1 { font-size: 22px; margin: 0; letter-spacing: 4px; }
.map-head button { padding: 6px 14px; cursor: pointer; border: 1px solid #cbb890; border-radius: 6px; background: #f7f1e3; }
.map-area { margin-bottom: 18px; }
.map-area h2 { font-size: 13px; color: var(--rs-gold-strong); border-bottom: 1px solid #6e5a39; padding-bottom: 4px; margin: 0 0 10px; letter-spacing: 2px; }
.map-places { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.map-place { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 13px 16px; border: 1px solid #cbb890; border-radius: 8px; background: #f7f1e3; color: #2b2b2b; cursor: pointer; text-align: left; }
.map-place:hover { background: #efe6d0; }
.map-place.current { border-color: var(--rs-gold-mid); box-shadow: inset 0 0 0 2px rgba(176,141,87,0.35); }
.map-place .mp-name { font-size: 15px; font-weight: 600; }
.map-place .mp-sum { font-size: 12px; color: #6b6b6b; }
.map-exit { background: #efe3c8; border-color: var(--rs-gold-mid); font-weight: 600; }
.map-exit:hover { background: #e6d6b3; }
.topnav { padding: 6px 16px; cursor: pointer; border: 1px solid #cbb890; border-radius: 6px; background: #f7f1e3; color: #3a2f23; font-size: 14px; }
.map-tabs { display: flex; gap: 8px; }
.topnav.active { background: var(--rs-gold-mid); color: #fff; border-color: var(--rs-gold-mid); cursor: default; }
.topnav-primary { background: var(--rs-gold-mid); color: #fff; border-color: #8a6d3b; font-weight: 600; }
.palace-home .home-tabs { position: absolute; z-index: 7; top: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.palace-home .home-goout { position: absolute; z-index: 7; right: 4%; bottom: 9%; }
.palace-home .home-goout .topnav { padding: 13px 30px; font-size: 17px; letter-spacing: 2px; box-shadow: 0 8px 18px rgba(0,0,0,0.28); }
.map-exits-top { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; justify-content: center; }
.map-exits-top .map-place { min-width: 170px; }
.map-screen-bg { max-width: none; min-height: 100vh; padding: 0 0 40px; box-sizing: border-box; position: relative; background: var(--scene-bg) center / cover no-repeat; }
.map-screen-bg::before { content: ""; position: absolute; inset: 0; background: rgba(18,14,12,0.30); z-index: 0; }  /* 续104w：减淡蒙版让京城背景图透出（地点钮为不透明卡片·可读性不靠蒙版） */
.map-screen-bg > * { position: relative; z-index: 1; }
.map-screen-bg .map-head { justify-content: center; padding-top: 18px; }
.map-board { max-width: 860px; margin: 0 auto; padding: 8px 24px 0; }
.map-board .map-places { justify-content: center; }

/* 皇宫大地图：背景铺屏，地点入口改为按建筑位置锚定的竖向宫牌。 */
.palace-map-screen {
  position: relative;
  min-height: 100vh;
  /* 续104z2·Yan：皇宫大地图铺满全屏。此 <main> 同时带 .map-screen(max-width:820px·margin:auto)，
     而 .palace-map-stage 是绝对定位的满屏(100vw)背景 —— 若不解除 820px 上限，父级 overflow:hidden
     会把满屏 stage 裁成中央 820px 窄条(即"又变窄了")。故强制全宽。 */
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #16110c;   /* 兜底底色：实际背景由 .palace-map-stage 满屏铺出（续104w 去掉 104s 的模糊衬底/黑边，改 cover 满屏） */
}

.palace-map-screen .topbar {
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 5;
}

.palace-map-head {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  text-align: center;
}

.palace-map-head h1 {
  padding: 5px 16px 6px;
  border: 1px solid rgba(226, 198, 139, 0.48);
  border-radius: 5px;
  background: rgba(27, 22, 17, 0.72);
  color: #fff0c7;
  font-size: 18px;
  line-height: 1.2;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.palace-map-head .map-tabs {
  padding: 4px;
  border: 1px solid rgba(226, 198, 139, 0.34);
  border-radius: 6px;
  background: rgba(22, 18, 16, 0.5);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

.palace-map-head .topnav {
  min-width: 58px;
  padding: 6px 12px;
  border-radius: 4px;
  background: rgba(249, 239, 210, 0.9);
  color: #3d2e22;
}

.palace-map-stage {
  /* 续104w：满屏铺背景（cover）——尺寸取「恰好盖满视口、且保持 13/6 图比例」的图矩形，
     溢出视口的部分由 .palace-map-screen 的 overflow:hidden 裁掉 → 无黑边；
     标记按本元素百分比定位，故始终贴合图中建筑、不随视口比例漂移。 */
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: max(100vw, calc(100vh * 13 / 6));
  height: max(100vh, calc(100vw * 6 / 13));
  transform: translate(-50%, -50%);
  background: var(--scene-bg) center / 100% 100% no-repeat;
}

.palace-map-markers {
  position: absolute;
  inset: 0;
}

.palace-map-marker {
  --marker-bg: rgba(36, 31, 27, 0.9);
  --marker-border: rgba(238, 210, 150, 0.78);
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: clamp(30px, 2.35vw, 38px);
  min-height: clamp(96px, 9.6vw, 126px);
  padding: 15px 4px 16px;
  border: 1px solid var(--marker-border);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 245, 213, 0.08), rgba(255, 245, 213, 0)),
    linear-gradient(90deg, rgba(99, 132, 118, 0.18), rgba(88, 46, 38, 0.08)),
    var(--marker-bg);
  color: #fff4d7;
  text-align: center;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow:
    0 12px 22px rgba(30, 18, 12, 0.28),
    inset 0 0 0 1px rgba(255, 246, 221, 0.08);
  transition: transform .16s ease, filter .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.palace-map-marker::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(238, 210, 150, 0.78);
  background: rgba(40, 34, 28, 0.92);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: inset 0 0 0 2px rgba(150, 106, 58, 0.22);
}

.palace-map-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 26px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(236, 188, 94, 0.34);
  filter: blur(6px);
  pointer-events: none;
}

.palace-marker-name {
  display: inline-block;
  min-height: 66px;
  color: #fff1cf;
  font-size: clamp(14px, 1.12vw, 17px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.55);
}

.palace-map-marker:hover {
  border-color: #ffe7a6;
  filter: brightness(1.08);
  transform: translate(-50%, -54%);
  box-shadow:
    0 16px 28px rgba(30, 18, 12, 0.34),
    0 0 18px rgba(237, 198, 116, 0.22),
    inset 0 0 0 1px rgba(255, 246, 221, 0.13);
}

.palace-map-marker.current {
  --marker-bg: rgba(70, 40, 32, 0.94);
  --marker-border: rgba(255, 218, 139, 0.98);
  box-shadow:
    0 14px 30px rgba(45, 21, 13, 0.38),
    0 0 22px rgba(255, 210, 120, 0.28),
    inset 0 0 0 2px rgba(255, 231, 166, 0.18);
}

.palace-map-exit {
  --marker-bg: rgba(78, 48, 33, 0.92);
  min-height: clamp(82px, 8.4vw, 112px);
}

@media (max-width: 900px) {
  .palace-map-screen {
    min-width: 900px;
  }
}

/* ===== 续104zt-⑧：外出大地图（交接包 2026-07-03）——背景舞台 + 图集地点牌 =====
   三图统一：travel-map-screen(根·带 court-screen 继承全局顶栏) > travel-map-stage(cover 满屏)
   > travel-map-markers > travel-map-marker(图集切片·地名 DOM 渲染)。放在 .map-screen(1391) 之后·源序覆盖其 820px 上限。 */
.travel-map-screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #16110c;   /* 兜底底色·实际背景由 stage 满屏铺出 */
}
.travel-map-screen.is-palace { --map-w: 13; --map-h: 6; }
.travel-map-screen.is-city,
.travel-map-screen.is-suburbs { --map-w: 1672; --map-h: 941; }

.travel-map-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: max(100vw, calc(100vh * var(--map-w) / var(--map-h)));
  height: max(100vh, calc(100vw * var(--map-h) / var(--map-w)));
  transform: translate(-50%, -50%);
  background: var(--scene-bg) center / 100% 100% no-repeat;
}
.travel-map-markers { position: absolute; inset: 0; }

.travel-map-marker {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  background-color: transparent;
  background-image: url("./assets/ui/map-travel/map-location-ui-atlas-transparent.png");
  background-repeat: no-repeat;
  background-size: 600px 224px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 8px 12px rgba(20,14,8,0.42));
  transition: transform .16s ease, filter .16s ease;
}
.travel-map-marker__name {
  color: #f4ead0;
  font-family: var(--rs-font-kai);
  font-weight: 600;
  letter-spacing: 2px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.75);
  pointer-events: none;
  white-space: nowrap;
}
.travel-map-marker:hover { transform: translate(-50%, calc(-50% - 4px)); filter: drop-shadow(0 12px 16px rgba(20,14,8,0.5)) brightness(1.08); }
.travel-map-marker:active { transform: translate(-50%, calc(-50% - 1px)) scale(.98); }
.travel-map-marker:focus-visible { outline: 2px solid var(--rs-gold-text); outline-offset: 3px; }

/* —— 皇宫：竖排深牌（52×176）·当前/出宫用朱印态 —— */
.travel-map-marker--palace {
  width: 52px; height: 176px;
  background-position: -24px -24px;
}
.travel-map-marker--palace.current,
.travel-map-marker--palace.travel-map-exit {
  background-position: -96px -24px;
}
.travel-map-marker--palace .travel-map-marker__name {
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: clamp(14px, 1.15vw, 20px); letter-spacing: 3px;
}

/* —— 京城：横排米牌（184×64）·当前/回宫/京郊用朱点态 —— */
.travel-map-marker--city {
  width: 184px; height: 64px;
  background-position: -184px -24px;
}
.travel-map-marker--city.current,
.travel-map-marker--city.travel-map-exit {
  background-position: -184px -112px;
}
.travel-map-marker--city .travel-map-marker__name {
  color: #4a3722; text-shadow: 0 1px 0 rgba(255,252,244,0.5);
  font-size: clamp(15px, 1.2vw, 21px);
}

/* —— 京郊：横排青石牌（174×68）·当前/回城用朱印态 —— */
.travel-map-marker--suburbs {
  width: 174px; height: 68px;
  background-position: -392px -24px;
}
.travel-map-marker--suburbs.current,
.travel-map-marker--suburbs.travel-map-exit {
  background-position: -392px -112px;
}
.travel-map-marker--suburbs .travel-map-marker__name {
  color: #3a4a3a; text-shadow: 0 1px 0 rgba(255,255,250,0.45);
  font-size: clamp(15px, 1.2vw, 21px);
}

/* 窄桌面：地点牌整体缩小防重叠（不改相对坐标·只缩尺寸） */
@media (max-width: 1100px) {
  .travel-map-marker--palace { width: 44px; height: 150px; }
  .travel-map-marker--city { width: 156px; height: 54px; }
  .travel-map-marker--suburbs { width: 148px; height: 58px; }
  .travel-map-marker__name { letter-spacing: 1px; }
  .travel-map-marker--palace .travel-map-marker__name { font-size: 14px; }
  .travel-map-marker--city .travel-map-marker__name,
  .travel-map-marker--suburbs .travel-map-marker__name { font-size: 14px; }
}

/* ===== 通用对话框（占屏幕下方约 1/5，全游戏通用） ===== */
.dialog-screen { position: fixed; inset: 0; z-index: 49; cursor: pointer; }
/* 续104l：场景菜单二次确认（购置酒楼等）——全屏遮罩 + 居中确认框（复用 .consort-status 外观） */
.menu-confirm-mask { position: fixed; inset: 0; z-index: 50; background: rgba(8,6,5,0.55); }
.menu-confirm.consort-status { z-index: 51; }
.menu-confirm .menu-confirm-acts { display: flex; gap: 14px; justify-content: center; }
.dialog-box { position: fixed; left: 0; right: 0; bottom: 0; min-height: 20vh; box-sizing: border-box; padding: 26px 44px 30px; background: linear-gradient(180deg, rgba(15,12,10,0) 0%, rgba(15,12,10,0.82) 24%, rgba(15,12,10,0.95) 100%); color: var(--rs-deep-text); cursor: pointer; z-index: 50; display: flex; flex-direction: column; justify-content: center; gap: 12px; font-family: "PingFang SC", system-ui, sans-serif; }
.dialog-box p { margin: 0; font-size: 19px; line-height: 1.9; letter-spacing: 1px; max-width: 1040px; }
.dialog-hint { align-self: flex-end; font-size: 13px; color: #c9b88f; }
/* 剧情选项（底部弹出的选择框） */
.story-choice-box { position: fixed; left: 0; right: 0; bottom: 0; box-sizing: border-box; padding: 24px 44px 32px; background: linear-gradient(180deg, rgba(15,12,10,0) 0%, rgba(15,12,10,0.82) 22%, rgba(15,12,10,0.96) 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 50; font-family: "PingFang SC", system-ui, sans-serif; }
.story-prompt { margin: 0 0 6px; color: var(--rs-deep-text); font-size: 18px; letter-spacing: 1px; }
.story-choice { width: min(560px, 82%); padding: 13px 16px; border: 1px solid rgba(231,198,137,0.55); border-radius: 8px; background: rgba(22,18,16,0.86); color: var(--rs-deep-text); font-size: 17px; letter-spacing: 1px; cursor: pointer; transition: border-color .15s, background .15s; }
.story-choice:hover { border-color: var(--rs-gold-text); background: rgba(44,35,28,0.92); }

/* 州府总览（九州舆图，朴素功能版） */
.court-action[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.court-action[disabled]:hover { border-color: rgba(231,198,137,0.6); background: rgba(22,18,16,0.82); }
.pref-list { position: absolute; top: 13%; left: 50%; transform: translateX(-50%); z-index: 5; width: min(880px, 92%); display: grid; gap: 8px; padding: 4px; }
.pref-pager { position: absolute; bottom: 9%; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; justify-content: center; gap: 16px; color: #ffe9b8; font-size: 15px; letter-spacing: 2px; }
.pref-row { display: grid; grid-template-columns: 1.1fr 1.1fr 1.3fr 1fr 1fr 1.3fr; align-items: center; gap: 8px; padding: 11px 16px; border: 1px solid rgba(231,198,137,0.45); border-radius: 6px; background: rgba(22,18,16,0.82); color: var(--rs-deep-text); font-size: 14px; }
.pref-row .pref-name { font-size: 16px; letter-spacing: 2px; color: var(--rs-gold-hover); }
.pref-row .pref-world { color: #c9b88f; }
.pref-row .pref-stat { color: #e7dcc2; letter-spacing: 0.5px; }

/* 朝臣一览（吏部·查看官员） */
.roster { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); z-index: 5; width: min(940px, 95%); max-height: 56vh; overflow: hidden; display: grid; gap: 6px; padding: 2px; }
/* 续104m：朝臣一览 文官/武官 顶部 tab（标题在左上·tab 居中·照参考截图 朝臣/亲信位） */
.roster-tabs { position: absolute; top: 9.5%; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; gap: 12px; }
.roster-tab { padding: 6px 24px; border: 1px solid rgba(231,198,137,0.5); border-radius: 7px 7px 0 0; background: rgba(40,28,18,0.82); color: rgba(243,233,210,0.75); cursor: pointer; font-size: 15px; letter-spacing: 2px; }
.roster-tab.is-on { background: rgba(205,162,95,0.32); color: #fff7e6; border-color: var(--rs-gold-strong); }
.roster-row { display: grid; grid-template-columns: 1.5fr 1.2fr 0.7fr 0.9fr 0.85fr 0.85fr 0.85fr 0.85fr 0.95fr; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid rgba(231,198,137,0.4); border-radius: 6px; background: rgba(22,18,16,0.82); color: var(--rs-deep-text); font-size: 14px; text-align: center; }
.roster-row > span:first-child { text-align: left; }
/* 续104zt82f·Yan bug：州府任免只有 4 格(州府/疆域/知府/按钮)·却套用通用 9 列模板 → 内容挤在左半、右半空白。专给州府任免一套 4 列满宽模板(知府列加宽·免正五品换行)，不动其它用 .roster 的屏。 */
.roster--prefect .roster-row { grid-template-columns: 1fr 1.2fr 2.4fr auto; }
.roster--prefect .roster-row > span { text-align: left; }
.roster-row .rn { color: var(--rs-gold-hover); letter-spacing: 1px; }
.roster-head { position: sticky; top: 0; background: rgba(60,46,30,0.95); color: var(--rs-gold-hover); font-weight: 600; border-color: rgba(231,198,137,0.6); }
.roster-view { padding: 4px 10px; border: 1px solid rgba(231,198,137,0.7); border-radius: 5px; background: rgba(231,198,137,0.16); color: var(--rs-gold-hover); cursor: pointer; font-size: 13px; }
.roster-view:hover { background: rgba(231,198,137,0.32); }
.roster-pager { position: absolute; bottom: 14.5%; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 18px; color: var(--rs-deep-text); font-size: 15px; }
.roster-pager .court-action { min-width: 100px; padding: 10px 16px; }
/* 续104l：通用名册表 .rtbl（常规流·照朝臣一览外观；用于妃嫔一览/召见大臣拣选等·勿与绝对定位 .roster 混） */
.rtbl-wrap { width: 100%; }
.rtbl-count { text-align: center; font-size: 13px; color: rgba(243,233,210,0.72); margin: 0 0 8px; }
.rtbl { display: grid; gap: 6px; }
.rtbl-row { display: grid; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid rgba(231,198,137,0.4); border-radius: 6px; background: rgba(22,18,16,0.82); color: var(--rs-deep-text); font-size: 14px; text-align: center; }
.rtbl-row > span:first-child { text-align: left; }
.rtbl-name { color: var(--rs-gold-hover); letter-spacing: 1px; }
.rtbl-head { background: rgba(60,46,30,0.95); color: var(--rs-gold-hover); font-weight: 600; border-color: rgba(231,198,137,0.6); }
.rtbl-view { padding: 4px 10px; border: 1px solid rgba(231,198,137,0.7); border-radius: 5px; background: rgba(231,198,137,0.16); color: var(--rs-gold-hover); cursor: pointer; font-size: 13px; }
.rtbl-view:hover { background: rgba(231,198,137,0.32); }
.rtbl-empty { font-size: 13px; color: rgba(243,233,210,0.6); padding: 14px; text-align: center; border: 1px dashed rgba(231,198,137,0.25); border-radius: 6px; }
.rtbl-pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 12px; color: var(--rs-deep-text); font-size: 15px; }
.rtbl-pager .court-action { min-width: 92px; padding: 8px 14px; }

/* 官员详情卡 */
.official-card { position: absolute; top: 24%; left: 50%; transform: translateX(-50%); z-index: 5; width: min(680px, 90%); padding: 28px 34px; border: 1px solid rgba(231,198,137,0.5); border-radius: 10px; background: rgba(22,18,16,0.88); color: var(--rs-deep-text); }
.oc-name { font-size: 25px; color: var(--rs-gold-hover); letter-spacing: 2px; margin-bottom: 22px; }
.oc-name .oc-sub { font-size: 15px; color: #c9b88f; letter-spacing: 0.5px; }
.oc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 22px; font-size: 17px; letter-spacing: 1px; }

/* 东西六宫·子宫殿列表 */
.palace-list { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 5; width: min(820px, 94%); max-height: 76vh; overflow-y: hidden; display: flex; flex-direction: column; gap: 14px; padding: 4px; }
.palace-group { display: flex; flex-direction: column; gap: 8px; }
.palace-group-label { color: var(--rs-gold-hover); font-size: 15px; letter-spacing: 2px; border-left: 3px solid var(--rs-gold-mid); padding-left: 10px; }
.palace-group-label span { color: #c9b88f; font-size: 13px; margin-left: 10px; letter-spacing: 1px; }
.palace-row { display: flex; flex-wrap: wrap; gap: 10px; }
.palace-btn { padding: 11px 22px; border: 1px solid rgba(231,198,137,0.55); border-radius: 7px; background: rgba(34,26,22,0.85); color: var(--rs-deep-text); font-size: 16px; letter-spacing: 2px; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.3); text-align: center; }
.palace-btn:hover { border-color: var(--rs-gold-hover); background: rgba(60,44,32,0.92); }
.palace-special { border-color: rgba(150,200,210,0.5); color: #d6ebe9; }
.palace-special:hover { border-color: #9fd6da; background: rgba(30,50,52,0.9); }
/* 东西六宫：左侧竖排一列（贴近截图） */
.palace-col { left: 7%; transform: translateY(-50%); width: auto; align-items: flex-start; gap: 11px; }
.palace-col-btn { min-width: 196px; text-align: center; font-size: 17px; }
/* 续103c（被某次 Codex 美术合并回退·续104k 审计补回）：panelShell（.home-panel）里的 palace-col 改常规流居中——否则 .palace-list 的 position:absolute/transform 会与居中正文重叠。一条规则一次修好 圣裁/传位/荐知府/太后提要求/遗诏/皇陵/和亲/召幸/就寝 等所有 panelShell 面板（转月已在续104j·乙单独改 .month-confirm）。全屏场景菜单（不在 .home-panel 内）不受影响，仍绝对定位。 */
.home-panel .palace-list.palace-col { position: static; transform: none; left: auto; top: auto; width: auto; max-height: none; margin: 14px auto 0; align-items: center; }
/* 续104k（Yan 要底部对话框）：圣裁（宫闱风波）= 屏底对话框形态（.verdict-box·仿 .dialog-box·全宽渐变·含案情文字 + 七档处理钮）。 */
.verdict-box { position: fixed; left: 0; right: 0; bottom: 0; box-sizing: border-box; padding: 22px 44px 28px; background: linear-gradient(180deg, rgba(15,12,10,0) 0%, rgba(15,12,10,0.86) 22%, rgba(15,12,10,0.97) 100%); color: var(--rs-deep-text); z-index: 50; display: flex; flex-direction: column; gap: 11px; }
.verdict-name { color: var(--rs-gold-hover); font-size: 16px; letter-spacing: 3px; }
.verdict-name small { color: #c9b88f; font-size: 12px; letter-spacing: 1px; }
.verdict-desc { margin: 0; font-size: 18px; line-height: 1.85; letter-spacing: 1px; max-width: 1040px; }
.verdict-q { margin: 0; font-size: 14px; color: #c9b88f; letter-spacing: 1px; }
.verdict-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 4px; }
.verdict-btn { padding: 10px 18px; border: 1px solid rgba(231,198,137,0.5); border-radius: 7px; background: rgba(34,26,22,0.9); color: var(--rs-deep-text); font-size: 15px; letter-spacing: 1px; cursor: pointer; }
.verdict-btn:hover { border-color: var(--rs-gold-hover); background: rgba(60,44,32,0.95); }
.verdict-btn small { color: #c9b88f; font-size: 11px; letter-spacing: 0; margin-left: 2px; }

/* ===== 上朝 · 六部（朴素功能版，美术后续替换） ===== */
.court-screen { position: relative; min-height: 100vh; overflow: hidden; background: linear-gradient(0deg, rgba(20,16,14,0.22), rgba(255,255,255,0.03)), var(--scene-bg) center / cover no-repeat; font-family: "PingFang SC", system-ui, sans-serif; }
/* 六部/朝议界面顶栏：贴顶满宽（复用主视图 topbar） */
.court-screen .topbar { position: absolute; top: 0; left: 0; right: 0; width: 100%; border-radius: 0; z-index: 6; }
.court-screen .topbar .time-block { justify-items: start; text-align: left; }
.court-screen .topbar .resource-strip { justify-self: end; display: flex; gap: 14px; align-items: center; }
/* 储秀宫·选秀（脚手架） */
.xuanxiu-roster { position: absolute; top: 30%; left: 54%; transform: translateX(-50%); width: min(560px, 56%); padding: 28px 30px; background: rgba(22,18,16,0.66); border: 1px solid rgba(231,198,137,0.3); border-radius: 10px; z-index: 5; }
.xuanxiu-empty { margin: 0; color: #d9c9a4; font-size: 16px; line-height: 2; text-align: center; letter-spacing: 1px; }
.palace-col-btn.is-active { border-color: var(--rs-gold-text); background: rgba(60,48,38,0.95); color: #ffe9b8; }
/* 私宅坊巷界面 */
.residence-top { position: absolute; top: 0; left: 0; right: 0; height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 22px; z-index: 6; }
.residence-name { padding: 7px 20px; background: rgba(22,18,16,0.82); border: 1px solid rgba(231,198,137,0.5); border-radius: 8px; color: var(--rs-deep-text); font-size: 17px; letter-spacing: 2px; }
.residence-chron { padding: 6px 13px; background: rgba(40,32,26,0.82); border: 1px solid rgba(231,198,137,0.4); border-radius: 6px; color: var(--rs-gold-text); font-size: 13px; cursor: pointer; }
.residence-pager { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.residence-page { padding: 6px 15px; background: rgba(22,18,16,0.72); border: 1px solid rgba(231,198,137,0.35); border-radius: 6px; color: #d9c9a4; font-size: 13px; cursor: pointer; }
.residence-pageno { color: #c9b88f; font-size: 13px; }
.residence-back { width: 44px; height: 44px; margin-left: 8px; background: rgba(22,18,16,0.82); border: 1px solid rgba(231,198,137,0.5); border-radius: 8px; color: var(--rs-deep-text); font-size: 17px; cursor: pointer; }
.residence-grid { position: absolute; top: 78px; left: 22px; right: 128px; bottom: 22px; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(2, 1fr); gap: 13px; z-index: 4; }
.house-card { background: rgba(28,22,18,0.6); border: 1px solid rgba(231,198,137,0.26); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 10px; box-sizing: border-box; }
.house-empty { color: #b9a784; }
.house-lock { font-size: 24px; opacity: 0.65; }
.house-none { font-size: 14px; }
.house-portrait { width: 56px; height: 56px; border-radius: 6px; background: rgba(231,198,137,0.12); border: 1px solid rgba(231,198,137,0.25); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.house-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.house-info { display: flex; flex-direction: column; gap: 2px; color: var(--rs-deep-text); font-size: 12.5px; text-align: center; }
.house-occ { color: #d9c9a4; }
.house-acts { display: flex; gap: 8px; margin-top: 2px; }
.mini-btn { padding: 4px 12px; background: rgba(40,32,26,0.85); border: 1px solid rgba(231,198,137,0.4); border-radius: 5px; color: var(--rs-gold-text); font-size: 13px; cursor: pointer; text-align: center; }
.harem-actions { position: absolute; top: 16px; right: 20px; z-index: 6; display: flex; gap: 10px; }
.cere-wrap { max-width: 620px; margin: 8px auto; display: flex; flex-direction: column; gap: 12px; max-height: 78vh; }
.cere-intro { color: #cdb98f; font-size: 13px; line-height: 1.6; margin: 0; }
.cere-foot { border-top: 1px solid rgba(231,198,137,0.18); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.cere-sum { color: var(--rs-gold-text); font-size: 14px; line-height: 1.7; }
.cere-sum b { color: #ffd98a; }
.cere-warn { color: #e8857a; font-size: 13px; }
.cere-btns { display: flex; justify-content: flex-end; gap: 12px; }
.cere-go { background: rgba(120,42,30,0.9); border-color: rgba(231,170,120,0.6); color: #ffe0c0; padding: 7px 22px; }
.cere-go[disabled] { opacity: 0.4; cursor: default; }
.residence-side { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 14px; z-index: 5; }
.residence-side-btn { width: 92px; height: 88px; background: rgba(22,18,16,0.8); border: 1px solid rgba(231,198,137,0.45); border-radius: 10px; color: var(--rs-deep-text); font-size: 15px; letter-spacing: 1px; cursor: pointer; }
.residence-side-btn:hover { border-color: var(--rs-gold-text); background: rgba(40,32,26,0.92); }
.court-head { position: absolute; top: 4%; left: 50%; transform: translateX(-50%); z-index: 5; padding: 6px 18px; border: 1px solid rgba(231,198,137,0.5); border-radius: 6px; background: rgba(22,18,16,0.7); color: var(--rs-deep-text); font-size: 14px; letter-spacing: 2px; }
.court-ministries { position: absolute; left: 3%; top: 17%; display: grid; gap: 12px; z-index: 5; }
.court-ministry { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 152px; padding: 12px 0; border: 1px solid rgba(231,198,137,0.6); border-radius: 6px; background: rgba(22,18,16,0.82); color: var(--rs-deep-text); cursor: pointer; box-shadow: 0 6px 14px rgba(0,0,0,0.3); }
.court-ministry:hover { border-color: var(--rs-gold-hover); background: rgba(42,31,26,0.92); }
.court-ministry .cm-name { font-size: 19px; letter-spacing: 4px; }
.court-ministry .cm-py { font-size: 10px; color: #b89a6a; letter-spacing: 2px; }
/* 续104zt58·Yan：宣政殿六部总览 / 各部政务·居中竖排长签（复用 visit-entry-option 长签·较拜访页更紧凑以容 6-7 项不出滚动·无滚动条铁律） */
.court-entry-menu {
  position: absolute; left: 50%; top: 15%; transform: translateX(-50%);
  width: min(460px, 42%);
  display: flex; flex-direction: column; gap: clamp(8px, 1.5vh, 16px);
  align-items: center; z-index: 5;
}
.court-entry-menu .visit-entry-option { height: clamp(46px, 4.5vw, 74px); }
.court-entry-menu .visit-entry-option .veo-label { font-size: clamp(15px, 1.2vw, 21px); letter-spacing: 2px; }
.court-leave { position: absolute; right: 5%; bottom: 9%; z-index: 5; padding: 14px 32px; border: 1px solid var(--rs-gold-mid); border-radius: 8px; background: rgba(84,38,31,0.92); color: #f6ead1; font-size: 17px; letter-spacing: 4px; cursor: pointer; box-shadow: 0 8px 18px rgba(0,0,0,0.3); }
.court-leave:hover { filter: brightness(1.12); }

/* ===== 上朝 · 六部子菜单 / 税率面板（朴素功能版） ===== */
.court-speaker { position: absolute; left: 3%; top: 11%; z-index: 5; max-width: 42%; margin: 0; padding: 10px 16px; border: 1px solid rgba(231,198,137,0.5); border-radius: 6px; background: rgba(22,18,16,0.8); color: var(--rs-deep-text); font-size: 15px; letter-spacing: 1px; }
.court-actions { position: absolute; left: 50%; transform: translateX(-50%); top: 23%; display: grid; gap: 12px; z-index: 5; width: min(420px, 82%); justify-items: stretch; }
.court-action { padding: 14px 18px; border: 1px solid rgba(231,198,137,0.6); border-radius: 6px; background: rgba(22,18,16,0.82); color: var(--rs-deep-text); font-size: 16px; letter-spacing: 1px; cursor: pointer; box-shadow: 0 6px 14px rgba(0,0,0,0.3); text-align: center; }
.court-action:hover { border-color: var(--rs-gold-hover); background: rgba(42,31,26,0.92); }
.court-action.current { border-color: var(--rs-gold-mid); background: rgba(84,38,31,0.85); }
.court-back { background: rgba(40,32,28,0.66); color: #d8c8a0; }

/* 地点选择（顶栏「地点」）——左区域 Tab + 4 列分页网格 + 返回。沿用奶白按钮风格，美术延后 */
.loc-screen { position: relative; min-height: 100vh; padding: 28px 28px 96px; max-width: 980px; margin: 0 auto; color: var(--rs-paper-text); font-family: var(--rs-font-song); box-sizing: border-box; }
.loc-head { margin-bottom: 22px; }
.loc-head h1 { font-size: 24px; margin: 0; letter-spacing: 8px; font-family: var(--rs-font-kai); color: #f2e4be; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.loc-head h1::after { content: ""; display: block; width: 108px; height: 1px; margin-top: 10px; background: linear-gradient(90deg, var(--rs-gold-bright), transparent); }
.loc-body { display: flex; gap: 22px; align-items: flex-start; }
.loc-tabs { display: flex; flex-direction: column; gap: 12px; flex: 0 0 auto; }
.loc-tab { padding: 16px 22px; min-width: 96px; border: 1px solid rgba(224,195,132,.5); border-radius: var(--rs-r-s); background: linear-gradient(180deg, rgba(32,28,23,.88), rgba(24,21,17,.92)); box-shadow: inset 0 0 0 3px rgba(32,28,23,.9), inset 0 0 0 4px rgba(197,155,86,.3); color: var(--rs-paper-text); font-family: var(--rs-font-kai); font-size: 17px; letter-spacing: 3px; cursor: pointer; transition: border-color .15s ease; }
.loc-tab:hover { border-color: var(--rs-gold-bright); }
.loc-tab.is-active { background: linear-gradient(180deg, #c8a45e, #a8853f); color: #fff8e6; border-color: #e5c98b; cursor: default; box-shadow: inset 0 1px 0 rgba(255,248,230,.4), 0 4px 12px rgba(0,0,0,.3); text-shadow: 0 1px 2px rgba(90,64,20,.5); }
.loc-grid-wrap { flex: 1 1 auto; }
.loc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.loc-cell { padding: 15px 12px; border: 1px solid var(--rs-gold-dim); border-radius: var(--rs-r-s); background: linear-gradient(180deg, var(--rs-paper-bright), var(--rs-paper-deep)); box-shadow: inset 0 0 0 1px rgba(250,244,228,.7), 0 3px 10px rgba(0,0,0,.35); color: var(--rs-ink); font-family: var(--rs-font-kai); font-size: 16px; letter-spacing: 2px; cursor: pointer; text-align: center; transition: transform .12s ease, filter .12s ease, box-shadow .12s ease; }
.loc-cell:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(250,244,228,.7), 0 6px 14px rgba(0,0,0,.42); }
.loc-cell.current { border-color: var(--rs-jade-deep); box-shadow: inset 0 0 0 2px rgba(79,117,106,.45), 0 3px 10px rgba(0,0,0,.35); font-weight: 600; }
.loc-pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 22px; }
.loc-page-btn { padding: 8px 18px; border: 1px solid rgba(224,195,132,.5); border-radius: var(--rs-r-s); background: linear-gradient(180deg, rgba(32,28,23,.88), rgba(24,21,17,.92)); color: var(--rs-paper-text); font-family: var(--rs-font-kai); letter-spacing: 2px; cursor: pointer; transition: border-color .15s ease; }
.loc-page-btn:hover:not([disabled]) { border-color: var(--rs-gold-bright); }
.loc-page-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.loc-page-num { font-size: 15px; letter-spacing: 2px; color: #e3cf9f; }
.loc-back { position: absolute; right: 28px; bottom: 28px; padding: 12px 30px; border: 1px solid var(--rs-gold-mid); border-radius: 8px; background: rgba(84,38,31,0.92); color: #f6ead1; font-size: 16px; letter-spacing: 4px; cursor: pointer; box-shadow: 0 8px 18px rgba(0,0,0,0.3); }
.loc-back:hover { filter: brightness(1.12); }
@media (max-width: 620px) { .loc-grid { grid-template-columns: repeat(2, 1fr); } .loc-body { gap: 12px; } .loc-tab { min-width: 64px; padding: 12px 10px; font-size: 14px; } }

/* ===== 后宫 · 品级宫殿列表 / 殿列表 / 拜访妃嫔（朴素版，美术后续替换） ===== */
.harem-layout { position: relative; z-index: 4; display: flex; gap: 26px; padding: 16px 26px 0 26px; align-items: flex-start; }
.harem-side { display: flex; flex-direction: column; gap: 11px; flex: 0 0 auto; }
.harem-side .palace-col-btn { min-width: 130px; text-align: center; padding: 11px 14px; background: rgba(22,18,16,0.78); border: 1px solid rgba(231,198,137,0.4); border-radius: 8px; color: var(--rs-deep-text); font-size: 16px; letter-spacing: 1px; cursor: pointer; }
.harem-side .palace-col-btn:hover { border-color: var(--rs-gold-text); }
.harem-side .palace-col-btn.is-active { background: rgba(176,141,87,0.92); border-color: var(--rs-gold-text); color: #fff; }
.harem-cards { display: flex; flex-wrap: wrap; gap: 18px; flex: 1 1 auto; align-content: flex-start; max-height: calc(100vh - 118px); overflow-y: hidden; padding-bottom: 84px; }
.harem-cards-halls { padding: 16px 26px 0 26px; }
.harem-card { width: 166px; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 13px 11px; background: rgba(22,18,16,0.66); border: 1px solid rgba(231,198,137,0.35); border-radius: 12px; }
.harem-portrait { width: 100%; height: 176px; border-radius: 8px; background: linear-gradient(160deg, rgba(60,48,40,0.6), rgba(30,24,20,0.72)); border: 1px solid rgba(231,198,137,0.2); display: flex; align-items: center; justify-content: center; text-align: center; color: rgba(243,233,210,0.55); font-size: 14px; }
.harem-building { background: linear-gradient(160deg, rgba(48,60,72,0.55), rgba(24,30,38,0.72)); }
.harem-locked { color: rgba(243,233,210,0.5); filter: grayscale(0.4); }
/* 续104zt-⑫：空宫提示——比「无人居住」更明确·居中·次级说明小字 */
.harem-empty-note { display: grid; place-items: center; text-align: center; line-height: 1.5; }
.harem-empty-note i { font-style: normal; font-size: 0.82em; color: rgba(231,198,137,0.7); }
.hcard-meta { display: flex; justify-content: space-between; align-items: center; width: 100%; font-size: 12px; color: var(--rs-gold-strong); }
.hcard-rank { background: rgba(176,141,87,0.25); padding: 1px 8px; border-radius: 4px; }
.hcard-pname { letter-spacing: 1px; }
.hcard-title { font-size: 18px; color: var(--rs-deep-text); font-weight: 600; }
.hcard-name { font-size: 14px; color: rgba(243,233,210,0.8); }
.harem-card .mini-btn { margin-top: 2px; padding: 7px 18px; font-size: 14px; }
.harem-dress-btn { position: absolute; right: 4%; bottom: 12%; z-index: 6; width: 66px; height: 66px; border-radius: 50%; background: rgba(22,18,16,0.85); border: 1px solid rgba(231,198,137,0.5); color: var(--rs-gold-text); font-size: 15px; letter-spacing: 1px; cursor: pointer; }
.harem-pager { position: relative; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 22px; padding: 8px 0 2px; }
.harem-pager .mini-btn[disabled] { opacity: 0.4; cursor: default; }
.harem-page-ind { color: var(--rs-gold-strong); font-size: 14px; letter-spacing: 1px; }
/* 拜访 · 查看状态属性面板（八维属性，含黑化，面板可见） */
.consort-status { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 8; width: min(440px, 86vw); background: rgba(20,16,14,0.95); border: 1px solid rgba(231,198,137,0.5); border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.consort-status .cs-head { font-size: 21px; color: var(--rs-deep-text); font-weight: 600; display: flex; align-items: baseline; gap: 10px; }
.consort-status .cs-head small { font-size: 14px; color: rgba(243,233,210,0.7); font-weight: 400; }
.consort-status .cs-sub { font-size: 13px; color: var(--rs-gold-strong); }
.cs-attrs { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 14px; }
.cs-attrs li { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cs-attrs li span { font-size: 12px; color: rgba(243,233,210,0.65); }
.cs-attrs li strong { font-size: 17px; color: var(--rs-gold-text); }
.consort-status .mini-btn { align-self: center; padding: 7px 24px; }

/* ===== 开场流程：封面 / 主菜单 / 开场旁白（皇朝一览） ===== */
.title-screen, .menu-screen, .intro-screen {
  position: relative; width: 100vw; height: 100vh; min-height: 100vh; overflow: hidden; box-sizing: border-box;
  color: #263128; font-family: "Royal Kai","Songti SC","STSong","Noto Serif CJK SC",serif;
  background: var(--cover-bg, none) center / cover no-repeat, #dfe8df;
  isolation: isolate;
}
.title-screen::before, .menu-screen::before, .intro-screen::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(247,245,230,.76), rgba(247,245,230,.08) 48%, rgba(224,231,220,.16)), linear-gradient(0deg, rgba(54,72,65,.18), transparent 42%);
}

/* —— 封面 —— */
.title-screen { cursor: pointer; }
.title-screen::after { content:""; position:absolute; inset:-2%; pointer-events:none; background:linear-gradient(105deg, transparent 36%, rgba(255,255,231,.38) 50%, transparent 64%); mix-blend-mode:screen; animation: openingSun 15s ease-in-out infinite; }
.title-plate { position:absolute; left:7.6%; top:29%; z-index:1; width:min(47%, 660px); min-height:202px; box-sizing:border-box; padding:51px 86px 34px; background:url("./assets/ui/opening-title-plaque-v1.svg") center / 100% 100% no-repeat; transform:rotate(-1deg); }
.title-name { margin:0; color:#32413a; font-family:"Royal Kai","STKaiti","KaiTi",serif; font-size:clamp(56px, 7.2vw, 105px); font-weight:600; line-height:.95; letter-spacing:.14em; text-shadow:0 1px rgba(255,255,255,.65); white-space:nowrap; }
.title-plus { display:inline-block; margin-left:.3em; padding:.13em .28em; color:#f7e8cf; background:linear-gradient(160deg,#a03a30,var(--rs-cinnabar)); border-radius:3px; box-shadow:inset 0 0 0 1.5px rgba(247,232,207,.42), 0 2px 6px rgba(90,30,20,.3); font-family:"Songti SC",serif; font-size:.24em; font-weight:600; letter-spacing:.1em; vertical-align:middle; transform:rotate(-2deg) translateY(-.55em); }
.title-sub { margin:15px 5px 0; color:#62746b; font-size:14px; letter-spacing:.34em; }
.title-enter { position:absolute; left:10%; bottom:13%; z-index:1; color:#33453d; font-size:22px; letter-spacing:.38em; font-family:var(--rs-font-kai); cursor:pointer; animation:title-enter-breathe 3s ease-in-out infinite; transition:letter-spacing .3s ease; }
.title-enter:hover { letter-spacing:.5em; }
.title-enter::before { content:""; display:inline-block; width:9px; height:9px; margin-right:14px; border-radius:50%; border:1.5px solid #a4854b; background:rgba(164,133,75,.18); vertical-align:middle; box-sizing:border-box; }
.title-enter::after { content:""; display:inline-block; width:66px; height:1px; margin-left:16px; vertical-align:middle; background:linear-gradient(90deg,#a4854b,transparent); }
@keyframes title-enter-breathe { 0%, 100% { opacity:.72; } 50% { opacity:1; } }
.title-credit { position:absolute; left:10%; bottom:6%; z-index:1; margin:0; color:rgba(45,62,55,.7); font-family:"Songti SC",serif; font-size:12px; letter-spacing:.13em; }
@keyframes openingSun { 0%,100%{ transform:translateX(-19%); opacity:.2; } 50%{ transform:translateX(20%); opacity:.8; } }

/* —— 主菜单 —— */
.menu-corner { position:absolute; right:4.5%; bottom:7%; display:flex; gap:12px; z-index:2; }
.menu-corner-btn { padding:8px 7px; border:0; border-bottom:1px solid rgba(137,111,64,.62); background:transparent; color:#4c5e55; font-size:14px; letter-spacing:.25em; cursor:pointer; font-family:inherit; transition:color .18s,border-color .18s; }
.menu-corner-btn:hover { color:#9a573f; border-color:#9a573f; }
.menu-actions { position:absolute; left:9.5%; top:31%; z-index:2; display:grid; gap:14px; }
.menu-btn { position:relative; display:grid; gap:3px; justify-items:start; width:280px; padding:16px 38px 16px 32px; overflow:hidden; border:1px solid rgba(167,137,76,.58); border-radius:0; background:linear-gradient(100deg, rgba(255,250,228,.9), rgba(239,240,214,.7)); color:#33443b; cursor:pointer; box-shadow:0 10px 24px rgba(60,75,65,.13); transition:transform .18s ease, box-shadow .18s ease, background .18s ease; font-family:inherit; }
.menu-btn::before { content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:#9f513e; transform:scaleY(.45); transition:transform .18s ease; }
.menu-btn:hover { background:linear-gradient(100deg,rgba(255,254,237,.98),rgba(232,239,213,.88)); box-shadow:0 14px 28px rgba(56,76,63,.2); transform:translateX(7px); }
.menu-btn:hover::before { transform:scaleY(1); }
.menu-btn:active { transform:translateX(4px) scale(.985); }
.menu-btn b { font-size:25px; font-weight:600; letter-spacing:.28em; }
.menu-btn span { color:#748279; font-family:"Songti SC",serif; font-size:12px; letter-spacing:.21em; }
.menu-btn.is-disabled { opacity:.43; cursor:default; filter:grayscale(.25); }
.menu-btn.is-disabled:hover { background:linear-gradient(100deg,rgba(255,250,228,.9),rgba(239,240,214,.7)); box-shadow:0 10px 24px rgba(60,75,65,.13); transform:none; }
.menu-btn.is-disabled:hover::before { transform:scaleY(.45); }
.menu-panel { position:absolute; inset:0; z-index:10; display:flex; align-items:center; justify-content:center; background:rgba(222,230,218,.44); backdrop-filter:blur(4px); cursor:pointer; }
.menu-panel-box { width:min(560px,86%); padding:34px 42px; border:1px solid rgba(155,126,72,.58); background:linear-gradient(135deg,rgba(255,252,235,.97),rgba(229,234,210,.94)); box-shadow:0 24px 60px rgba(47,61,54,.24); cursor:default; }
.menu-panel-box h3 { margin:0 0 15px; color:#4a5c50; font-size:24px; font-weight:600; letter-spacing:.34em; }
.menu-panel-body { color:#49574f; font-family:"Songti SC",serif; font-size:15px; line-height:2; }

/* —— 开场旁白 —— */
.intro-screen { cursor:pointer; background:#e6eee8; }
.intro-screen::before { z-index:1; background:linear-gradient(90deg,rgba(246,247,233,.28),transparent 45%,rgba(246,247,233,.16)),linear-gradient(0deg,rgba(37,51,45,.34),transparent 47%); }
.intro-scene-bg { position:absolute; inset:0; z-index:0; background:center / cover no-repeat; opacity:0; transform:scale(1.026); transition:opacity .8s ease,transform 11s ease-out; }
.intro-scene-bg.is-visible { opacity:1; transform:scale(1); }
.intro-light { position:absolute; inset:0; z-index:2; pointer-events:none; background:linear-gradient(117deg,rgba(255,252,218,.19),transparent 47%); mix-blend-mode:screen; }
.intro-head { position:absolute; left:5.4%; top:6.3%; z-index:4; color:#2e3c35; font-size:16px; letter-spacing:.32em; text-shadow:0 1px 8px rgba(255,252,230,.85), 0 0 2px rgba(255,252,230,.6); }
.intro-head::after { content:""; display:block; width:76px; height:1px; margin-top:9px; background:linear-gradient(90deg,#ab8a4f,transparent); }
.intro-scroll { position:absolute; left:50%; top:50%; z-index:4; width:min(760px,73%); transform:translate(-50%,-50%); display:grid; gap:18px; align-content:start; text-align:center; padding:28px 36px; border-radius:14px; background:radial-gradient(ellipse at center, rgba(26,34,30,.36), rgba(26,34,30,.18) 55%, transparent 80%); }
.intro-line { margin:0; color:#fffdf0; font-family:"Royal Kai","Songti SC",serif; font-size:23px; line-height:1.72; letter-spacing:.13em; text-shadow:0 0 1px rgba(22,30,26,.9), 0 1px 2px rgba(22,30,26,.95), 0 2px 9px rgba(22,30,26,.7), 0 4px 24px rgba(22,30,26,.55); }
.intro-line span { opacity:0; transition:opacity .38s ease; }
.intro-enter { justify-self:center; margin-top:12px; padding:10px 31px; border:1px solid rgba(194,157,92,.78); border-radius:0; background:rgba(255,251,224,.82); color:#46584d; font-family:inherit; font-size:18px; letter-spacing:.28em; cursor:pointer; box-shadow:0 8px 21px rgba(40,57,48,.22); }
.intro-enter:hover { background:rgba(255,254,238,.96); }
.intro-skip { position:absolute; right:5.4%; bottom:7.2%; z-index:5; padding:8px 16px; border:1px solid rgba(255,249,222,.44); border-radius:3px; background:rgba(26,34,30,.46); color:#fff9dd; font-family:inherit; font-size:14px; letter-spacing:.22em; cursor:pointer; text-shadow:0 1px 4px rgba(22,30,26,.7); backdrop-filter:blur(2px); }
.intro-skip:hover { color:#fff; border-color:rgba(255,255,255,.85); background:rgba(26,34,30,.6); }
.intro-emperor-back { display:none; position:absolute; left:50%; bottom:-11%; z-index:3; width:min(38%,430px); max-height:89%; object-fit:contain; object-position:bottom center; transform:translateX(-50%) scaleX(-1); filter:brightness(0) saturate(.2) sepia(.16); opacity:.64; mix-blend-mode:multiply; pointer-events:none; }
.intro-screen[data-opening-scene="desk"] .intro-emperor-back { display:block; }
.intro-emperor-back--fallback { width:210px; height:420px; max-height:none; border-radius:48% 48% 7% 7%; background:linear-gradient(90deg,transparent 19%,rgba(37,45,39,.72) 20% 80%,transparent 81%); clip-path:polygon(41% 0,59% 0,68% 14%,78% 30%,88% 100%,12% 100%,22% 30%,32% 14%); }
@media (prefers-reduced-motion: reduce) {
  .title-screen::after { animation:none; }
  .intro-scene-bg, .intro-scene-bg.is-visible { transition:opacity .01s linear; transform:none; }
  .menu-btn { transition:none; }
}

/* ===== 开局预设（setup）===== */
.setup-screen {
  position: relative; width: 100%; height: 100%; overflow: hidden; box-sizing: border-box;
  color: #39291b; font-family: "Royal Kai","Songti SC","STSong","Noto Serif CJK SC",serif;
  display: block; padding: 0;
  background: url("./assets/backgrounds/opening/setup-morning-folio-master-v3.png") center / contain no-repeat #e6eee9;
}
.setup-screen::before {
  content: none;
}
.setup-screen > * { position: relative; z-index: 1; }
.setup-head {
  position: absolute; left: 7.2%; top: 4.6%; width: 25.5%; height: 10.8%; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; padding: 0 4% 1%;
  color: #60442f; background: none;
}
.setup-head strong { display: block; font-size: 29px; letter-spacing: 9px; font-weight: 600; color: #65472f; text-shadow: 0 1px rgba(255,255,244,.7); }
.setup-head em { display: block; font-style: normal; color: rgba(95,66,43,.72); font-size: 13px; letter-spacing: 4px; }
.setup-nav {
  position: absolute; left: 7.85%; top: 20.1%; width: 6.7%; height: 65.8%;
  display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 0; padding: 0;
}
.setup-nav-btn {
  position: relative; width: 100%; height: 18.4%; min-height: 0; display: grid; grid-template-columns: 1fr; grid-template-rows: 40% 34% 26%;
  align-items: center; justify-items: center; padding: 9% 4% 7%; box-sizing: border-box; border: 0; color: #73533a;
  background: none !important; font-family: var(--rs-font-kai); text-align: center; pointer-events: none; transition: color .16s, opacity .16s;
}
.setup-nav-order { font-size: 19px; line-height: 1; text-align: center; color: #816244; }
.setup-nav-label { align-self: end; font-size: 13px; letter-spacing: 1px; white-space: nowrap; }
.setup-nav-state { align-self: start; font-size: 9px; letter-spacing: 1px; color: rgba(104,79,56,.62); }
.setup-nav-btn.is-active {
  color: #533a27;
}
.setup-nav-btn.is-active::after {
  content: ""; position: absolute; right: 4%; top: 7%; width: 18px; height: 18px;
  background: url("./assets/ui/affairs-book/19_小印图标位.svg") center / contain no-repeat;
}
.setup-nav-btn.is-complete { color: #684834; }
.setup-nav-btn.is-complete .setup-nav-state { color: #8b3427; }
.setup-nav-btn.is-locked { color: rgba(93,78,75,.5); }
.setup-nav-arrow { display: none; }
.setup-folio {
  position: absolute; inset: 0; min-width: 0; min-height: 0; display: block; padding: 0;
  background: none; filter: none;
}
.setup-body {
  position: absolute; left: 20.1%; top: 21.7%; width: 50.2%; height: 66%; min-height: 0; overflow: hidden; padding: 0; border: 0;
  background: transparent; box-shadow: none;
}
.setup-body-scroll { height: 100%; overflow-y: auto; overflow-x: hidden; padding: 8px 12px 10px 8px; box-sizing: border-box; }
.setup-step-overview .setup-body-scroll,
.setup-step-rank .setup-body-scroll,
.setup-step-tag .setup-body-scroll,
.setup-step-role .setup-body-scroll { display: flex; align-items: center; }
.setup-step-overview .setup-body-scroll > *,
.setup-step-rank .setup-body-scroll > *,
.setup-step-tag .setup-body-scroll > *,
.setup-step-role .setup-body-scroll > * { width: 100%; }
.setup-body-scroll::-webkit-scrollbar, .setup-prefs-list::-webkit-scrollbar { width: 8px; }
.setup-body-scroll::-webkit-scrollbar-thumb, .setup-prefs-list::-webkit-scrollbar-thumb { background: rgba(113,76,39,0.45); border-radius: 99px; }
.setup-footer {
  position: absolute; left: 73.35%; top: 85.15%; width: 16.65%; height: 8.15%;
  display: flex; justify-content: center; align-items: center; padding: 0;
}
.setup-enter-btn {
  position: relative; width: 100%; height: 100%; min-height: 0; padding: 0 8%; border: 0; border-radius: 0;
  background: none; color: #fff0cf; font-size: 19px; letter-spacing: 4px; cursor: pointer; font-family: inherit; font-weight: 700;
  box-shadow: none;
}
.setup-enter-btn span { position: relative; z-index: 1; text-shadow: 0 1px 2px rgba(54,4,2,0.72); }
.setup-enter-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.setup-enter-btn:active { transform: translateY(1px); filter: brightness(0.96); }
.setup-note { margin: 0 0 18px; font-size: 16px; letter-spacing: 1px; color: #5b351f; line-height: 1.7; }
.setup-hint { margin: 18px 0 0; font-size: 12.5px; line-height: 1.75; color: rgba(91,53,31,0.72); }
.setup-summary {
  position: absolute; left: 73.55%; top: 20.1%; width: 15.55%; height: 62%;
  display: flex; flex-direction: column; min-height: 0; box-sizing: border-box;
  padding: 4px 13px 8px; border: 0; color: #644831; background: transparent; box-shadow: none;
}
.setup-summary-seal {
  display: none;
}
.setup-summary-kicker { height: 30px; display: grid; place-items: center; margin: 0; text-align: center; color: #7a6045; font-size: 12px; letter-spacing: 3px; }
.setup-summary h2 { margin: 8px 0 7px; text-align: center; color: #67472f; font-size: 20px; letter-spacing: 4px; font-weight: 500; }
.setup-summary-list { display: grid; gap: 0; min-height: 0; }
.setup-summary-row { min-height: 33px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px; border-bottom: 0; }
.setup-summary-row span { flex: 0 0 auto; color: rgba(102,75,50,.66); font-size: 12px; letter-spacing: 2px; }
.setup-summary-row b { color: #5b3d29; font-size: 13px; font-weight: 500; text-align: right; word-break: keep-all; }

/* 设定总览 */
.setup-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: 24px; align-items: start; }
.setup-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid rgba(111,72,35,0.16); }
.setup-row-label { font-size: 16px; letter-spacing: 3px; color: #6a371f; }
.setup-row-cur { font-size: 14px; color: rgba(70,45,25,0.72); }
.setup-row-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.setup-pill, .rank-tab {
  padding: 8px 17px; border: 1px solid rgba(121,83,43,0.35); border-radius: 999px;
  background: rgba(255,247,218,0.42); color: #5f3d22; font-size: 14px; letter-spacing: 1px; cursor: pointer; font-family: inherit; transition: all .14s;
}
.setup-pill:hover, .rank-tab:hover { background: rgba(255,246,216,0.74); border-color: rgba(132,35,23,0.45); }
.setup-pill.is-active, .rank-tab.on {
  background: rgba(126,43,32,.96); color: #fff1ce; border-color: rgba(159,57,40,0.82);
  box-shadow: 0 8px 18px rgba(92,34,19,0.22);
}
.setup-cards { display: flex; flex-direction: column; gap: 13px; }
.setup-card {
  position: relative; display: grid; gap: 7px; padding: 17px 18px 17px 20px; text-align: left; border: 1px solid rgba(121,83,43,0.28); border-radius: 6px;
  background: rgba(247,229,190,.42); color: #5f3d22; cursor: pointer; font-family: inherit; transition: all .14s;
  box-shadow: inset 0 0 18px rgba(255,255,230,0.2);
}
.setup-card:hover { transform: translateY(-2px); border-color: rgba(132,35,23,0.48); background: rgba(255,244,214,.7); }
.setup-card.is-active { border-color: rgba(132,35,23,0.72); box-shadow: inset 0 0 0 1px rgba(255,242,204,0.42), 0 10px 22px rgba(96,46,22,0.18); }
.setup-card.is-active::after { content: ""; position: absolute; right: 12px; top: 10px; width: 32px; height: 32px; background: url("./assets/ui/affairs-book/19_小印图标位.svg") center / contain no-repeat; }
.setup-card-name { padding-right: 34px; font-size: 20px; letter-spacing: 3px; color: #6a371f; font-weight: 700; }
.setup-card-blurb { font-size: 13px; line-height: 1.65; color: rgba(63,43,25,0.72); }

/* 世界设定 */
.setup-world { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.setup-field { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid rgba(111,72,35,0.16); }
.setup-field-label { font-size: 15px; letter-spacing: 3px; color: #6a371f; }
.setup-field-value { min-width: 0; font-size: 19px; color: #3d2617; letter-spacing: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setup-mini, .setup-action {
  padding: 7px 15px; border: 1px solid rgba(121,83,43,0.35); border-radius: 999px; background: rgba(255,247,218,0.5);
  color: #5f3d22; font-size: 14px; letter-spacing: 1px; cursor: pointer; font-family: inherit; transition: all .14s;
}
.setup-mini:hover, .setup-action:hover { background: rgba(255,248,220,0.82); border-color: rgba(132,35,23,0.5); }
.setup-mini:disabled, .rank-btn:disabled { opacity: 0.42; cursor: default; }
.setup-world-actions { grid-column: 1 / -1; margin-top: 1px; display: flex; justify-content: flex-start; }
.setup-action { padding: 8px 22px; color: #fff0c9; background: rgba(112,39,29,.96); border-color: rgba(143,54,39,0.72); }
.setup-realm, .setup-attrs {
  grid-column: span 1; min-width: 0; margin-top: 1px; padding: 8px 10px; border: 1px solid rgba(121,83,43,0.25); border-radius: 6px;
  background: rgba(255,247,218,0.38); box-shadow: inset 0 0 20px rgba(255,255,230,0.18);
}
.setup-attrs { grid-column: 1 / -1; }
.setup-realm-head, .setup-attrs-head { font-size: 14px; letter-spacing: 2px; color: #6a371f; margin-bottom: 6px; }
.setup-realm-diff, .setup-attrs-sub { color: rgba(91,53,31,0.62); letter-spacing: 1px; font-size: 12px; }
.setup-realm-stats { display: flex; flex-wrap: wrap; gap: 8px 10px; font-size: 13px; color: rgba(70,45,25,0.74); }
.setup-realm-stats b { color: #4a2918; font-size: 17px; margin-left: 2px; }
.setup-realm-actions, .setup-attrs-actions { margin-top: 6px; display: flex; gap: 7px; flex-wrap: wrap; }
.setup-attrs-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px 8px; }
.setup-attr-row { display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.setup-attr-name { min-width: 28px; color: #6a371f; font-size: 13px; letter-spacing: 0; }
.setup-attr-btn, .rank-btn {
  width: 23px; height: 23px; flex: 0 0 auto; border: 1px solid rgba(121,83,43,0.36); border-radius: 50%;
  background: rgba(255,248,220,0.52); color: #6d3a22; font-size: 13px; cursor: pointer; line-height: 1; font-family: inherit;
}
.setup-attr-btn:hover, .rank-btn:hover { background: rgba(255,248,220,0.85); border-color: rgba(132,35,23,0.54); }
.setup-attr-val { min-width: 29px; text-align: center; color: #3d2617; font-size: 14px; }
.setup-rank { max-width: 840px; }
.setup-rank h2 { margin: 0 0 12px; color: #6a371f; letter-spacing: 4px; font-size: 23px; font-weight: 500; }
.rank-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.rank-table, .noble-table { display: grid; gap: 6px; padding-right: 4px; }
.rank-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 4px 0 10px; }
.rank-pager-label { color: rgba(70,45,25,0.78); font-size: 14px; letter-spacing: 1px; }
.rank-head, .rank-head4, .rank-row { display: grid; align-items: center; gap: 10px; padding: 9px 12px; }
.rank-head { grid-template-columns: 1fr 1.5fr 1.7fr; }
.rank-head4, .rank-row { grid-template-columns: 0.9fr 1.4fr 1.5fr 0.6fr; }
.rank-head4 { color: #6a371f; font-size: 13px; letter-spacing: 1px; padding-bottom: 2px; }
.rank-del { justify-self: end; }
.rank-add-row { padding: 4px 0 10px; }
/* 续104zt73：位分编辑器·新增位分表单（官阶下拉 + 命名 + 添加） */
.rank-add-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 8px 12px; border: 1px dashed rgba(132,35,23,0.42); border-radius: 6px; background: rgba(255,247,218,0.28); }
.rank-add-bar .rank-add-label { color: #6a371f; font-size: 13px; letter-spacing: 1px; }
.rank-add-bar select.rank-add-rank, .rank-add-bar input.rank-add-name { font: inherit; color: #5d2f1b; padding: 5px 8px; border: 1px solid rgba(121,83,43,0.42); border-radius: 4px; background: rgba(255,252,240,0.9); }
.rank-add-bar input.rank-add-name { flex: 1 1 120px; min-width: 96px; }
.rank-add-bar input.rank-add-name::placeholder { color: rgba(93,47,27,0.42); }
.noble-head, .noble-row { display: grid; grid-template-columns: 1.1fr 2fr 2fr 1.7fr; align-items: center; gap: 8px; padding: 9px 12px; }
.rank-row, .noble-row { border: 1px solid rgba(121,83,43,0.2); border-radius: 4px; background: rgba(255,247,218,0.36); }
.rank-head, .noble-head { color: #6a371f; font-size: 13px; letter-spacing: 1px; padding-bottom: 2px; }
.rank-c1 { color: rgba(70,45,25,0.72); font-size: 14px; letter-spacing: 1px; }
.rank-c2 { color: #5d2f1b; font-size: 15px; letter-spacing: 1px; }
.rank-c3 { color: rgba(70,45,25,0.72); font-size: 13px; }
.rank-tag { margin-left: 8px; font-size: 11px; color: #8a321f; border: 1px solid rgba(138,50,31,0.36); border-radius: 4px; padding: 1px 5px; letter-spacing: 0; }
.noble-cost, .noble-cnt { display: flex; align-items: center; gap: 7px; }
.rank-num { min-width: 52px; text-align: center; font-size: 15px; color: #3d2617; }
.setup-clan-ctl { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid rgba(121,83,43,0.2); background: rgba(255,247,218,0.34); border-radius: 6px; }
.setup-clan-label { font-size: 15px; letter-spacing: 2px; color: #6a371f; }
.setup-clan-n { min-width: 34px; text-align: center; font-size: 18px; color: #3d2617; }
.clan-row { grid-template-columns: 1.4fr 0.6fr 1.4fr 1.5fr !important; }
.foreign-row { grid-template-columns: 1.4fr 1fr 1.3fr 1.2fr !important; }

.setup-prefs-panel { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: rgba(8,6,6,0.72); }
.setup-prefs-box {
  width: min(940px,92%); max-height: 84vh; display: flex; flex-direction: column; padding: 22px 26px; border: 1px solid rgba(220,185,120,0.5); border-radius: 6px;
  background: linear-gradient(180deg, rgba(246,224,179,0.98), rgba(225,193,132,0.98)); color: #39291b; box-shadow: 0 28px 80px rgba(0,0,0,0.58), inset 0 0 36px rgba(100,55,21,0.16);
}
.setup-prefs-box h3 { margin: 0 0 6px; font-size: 21px; letter-spacing: 3px; color: #6a371f; }
.setup-prefs-summary { font-size: 14px; color: rgba(70,45,25,0.74); margin-bottom: 14px; letter-spacing: 1px; }
.setup-prefs-list { overflow-y: auto; display: grid; gap: 8px; padding-right: 4px; }
.setup-prefs-actions { margin-top: 16px; display: flex; justify-content: flex-end; gap: 12px; }
.setup-prefs-list .pref-row {
  display: grid; grid-template-columns: 1.1fr 1.1fr 1.3fr 1fr 1fr 1.3fr; align-items: center; gap: 8px; padding: 10px 13px;
  border: 1px solid rgba(121,83,43,0.18); border-radius: 4px; background: rgba(255,247,218,0.36); color: #4d321d; font-size: 14px;
}
.setup-prefs-list .pref-row .pref-name { font-size: 16px; letter-spacing: 2px; color: #6a371f; }
.setup-prefs-list .pref-row .pref-world, .setup-prefs-list .pref-row .pref-stat { color: rgba(63,43,25,0.72); }

/* 占位页 */
.setup-placeholder { display: grid; gap: 14px; place-content: center; height: 100%; text-align: center; }
.setup-placeholder h2 { margin: 0; font-size: 26px; letter-spacing: 6px; color: #6a371f; }
.setup-placeholder p { margin: 0; font-size: 15px; line-height: 1.8; color: rgba(70,45,25,0.72); max-width: 420px; }

@media (max-width: 1180px) {
  .setup-world { grid-template-columns: 1fr; }
  .setup-realm, .setup-attrs { grid-column: 1; }
  .setup-attrs-grid { grid-template-columns: repeat(2, 1fr); }
  .setup-overview { grid-template-columns: 1fr; }
}
/* ===== 养心殿主界面 v2 ===== */
@font-face {
  font-family: "Royal Kai";
  src: local("方正楷体简体"), local("FZKai-Z03"),
    url("./assets/fonts/fangzheng-kaiti.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Royal Sans";
  src: local("思源黑体"), local("Source Han Sans SC"),
    url("./assets/fonts/source-han-sans.ttf") format("truetype");
  font-display: swap;
}

.yangxin-home-v2 {
  --royal-ink: #352f2a;
  --royal-paper: #f5edd8;
  --royal-gold: #c8a96a;
  --royal-deep: #282421;
  position: relative;
  width: 100vw;
  height: 100vh;
  min-width: 1180px;
  min-height: 680px;
  overflow: hidden;
  color: var(--royal-paper);
  background: var(--scene-bg) center / cover no-repeat;
  font-family: "Royal Kai", "Songti SC", "STSong", serif;
}

.yangxin-home-v2::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(245, 247, 239, 0.035);
}

.yangxin-home-v2.home-tone-night::after {
  background: rgba(13, 23, 34, 0.055);
}

.yangxin-home-v2 .topbar {
  display: none;
}

.home-topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 12;
  height: 132px;
  pointer-events: none;
}

.home-identity,
.home-date,
.home-resources {
  position: absolute;
  pointer-events: auto;
}

.home-identity {
  left: 18px;
  top: 12px;
  width: 260px;
  height: 118px;
}

.home-avatar {
  position: absolute;
  left: 0;
  top: 0;
  width: 104px;
  height: 104px;
  overflow: hidden;
  border: 2px solid rgba(219, 187, 120, 0.86);
  border-radius: 50%;
  background: rgba(37, 34, 31, 0.78);
  box-shadow: 0 0 0 3px rgba(55, 48, 42, 0.72), 0 0 0 5px rgba(239, 220, 175, 0.45), 0 10px 20px rgba(26, 22, 18, 0.24);
}

.home-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transform: scale(1.85);
  transform-origin: center top;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.24));
}

.home-energy {
  position: absolute;
  left: 90px;
  top: 76px;
  width: 154px;
  min-height: 34px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 5px 14px 6px 20px;
  color: #f7eccd;
  background: rgba(43, 39, 35, 0.76);
  border: 1px solid rgba(207, 177, 115, 0.42);
  box-shadow: 0 7px 14px rgba(31, 27, 23, 0.16);
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
}

.home-energy small {
  font-size: 14px;
  color: #dbc99d;
}

.home-energy strong {
  font-family: "Royal Sans", sans-serif;
  font-size: 18px;
  font-weight: 500;
}

.home-date {
  left: 132px;
  top: 18px;
  width: 430px;
  height: 72px;
  background: url("./assets/ui/home-time.webp") center / 100% 100% no-repeat;
  color: #423a33;
  text-shadow: 0 1px rgba(255, 255, 255, 0.45);
}

.home-date strong,
.home-date > span,
.home-date small {
  position: absolute;
  white-space: nowrap;
}

.home-date strong {
  left: 88px;
  top: 17px;
  font-family: "Royal Kai", serif;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 1px;
}

.home-date > span:nth-of-type(1) {
  left: 216px;
  top: 18px;
  font-family: "Royal Kai", serif;
  font-size: 20px;
  letter-spacing: 1px;
}

.home-date > span:nth-of-type(2) {
  left: 326px;
  top: 18px;
  font-family: "Royal Kai", serif;
  font-size: 20px;
  letter-spacing: 1px;
}

.home-date small {
  left: 118px;
  top: 46px;
  color: #705d49;
  font-size: 14px;
}

.home-resources {
  top: 22px;
  right: 150px;
  width: 266px;
  height: 70px;
  background: url("./assets/ui/home-money-single.webp") center / 100% 100% no-repeat;
  color: #fff2cf;
  font-family: "Royal Sans", sans-serif;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.48);
}

.home-resources > span {
  position: absolute;
  top: 15px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.home-resource-treasury {
  left: 112px;
}

.home-resources small {
  color: #d9c99f;
  font-size: 13px;
}

.home-resources strong {
  color: #fff5d5;
  font-size: 20px;
  font-weight: 500;
}

.yangxin-home-v2 .home-tabs {
  position: absolute;
  z-index: 13;
  top: 17px;
  left: 582px;
  display: flex;
  gap: 2px;
  transform: none;
}

.yangxin-home-v2 .home-tab {
  width: 58px;
  height: 104px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

.yangxin-home-v2 .home-tab img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.22));
}


.yangxin-home-v2 .home-tab:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.yangxin-home-v2 .home-tab:disabled {
  cursor: default;
  filter: saturate(0.76) brightness(1.03);
}

.yangxin-home-v2 .ruler-standee {
  position: absolute;
  z-index: 3;
  inset: 8px 216px 0 244px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.yangxin-home-v2 .ruler-standee img {
  width: auto;
  height: min(97vh, 860px);
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 24px 23px rgba(31, 25, 20, 0.3));
}

.yangxin-home-v2 .action-dock {
  position: absolute;
  z-index: 10;
  left: 34px;
  top: 145px;
  width: 254px;
  display: grid;
  grid-template-columns: repeat(2, 122px);
  grid-auto-rows: 140px;
  align-items: center;
  gap: 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.yangxin-home-v2 .home-control {
  position: relative;
  width: 122px;
  height: 138px;
  min-height: 0;
  padding: 0;
  border: 0;
  background-color: transparent;
  color: #f8edcb;
  cursor: pointer;
  font-family: "Royal Kai", serif;
  filter: drop-shadow(0 7px 7px rgba(25, 22, 18, 0.22));
  transition: transform 140ms ease, filter 140ms ease;
}

.yangxin-home-v2 .home-control-reference img {
  position: absolute;
  left: 7px;
  top: 0;
  width: 108px;
  height: 108px;
  object-fit: contain;
}

.yangxin-home-v2 .home-control-reference span {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 3px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #f6e8c2;
  background: url("./assets/ui/home-wide-button.webp") center / 100% 100% no-repeat;
  font-size: 16px;
  letter-spacing: 3px;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.yangxin-home-v2 .home-control-primary {
  width: 92px;
  height: 92px;
  filter: drop-shadow(0 8px 7px rgba(25, 22, 18, 0.24));
}

.yangxin-home-v2 .home-control-primary img {
  width: 82px;
  height: 84px;
  object-fit: contain;
}

.yangxin-home-v2 .home-control-primary span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.yangxin-home-v2 .home-control-utility {
  width: 108px;
  height: 42px;
  align-self: center;
  background: url("./assets/ui/home-wide-button.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 7px 7px rgba(25, 22, 18, 0.22));
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.6);
}

.yangxin-home-v2 .home-control-utility img {
  display: none;
}

.yangxin-home-v2 .home-control-utility span {
  position: static;
  min-height: 0;
  display: block;
  padding-top: 1px;
  border: 0;
  border-radius: 0;
  color: #f7e9c5;
  background: transparent;
  font-family: "Royal Kai", serif;
  font-size: 18px;
  letter-spacing: 3px;
}


.yangxin-home-v2 .home-control:active {
  transform: translateY(1px) scale(0.98);
}

.yangxin-home-v2 .side-stack {
  position: absolute;
  z-index: 14;
  top: 34px;
  right: 24px;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.yangxin-home-v2 .side-stack .icon-only {
  width: 66px;
  height: 66px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transition: transform 140ms ease, filter 140ms ease;
}

.yangxin-home-v2 .side-stack .icon-only img {
  width: 61px;
  height: 61px;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.25));
}

.yangxin-home-v2 .side-stack .icon-only:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.yangxin-home-v2 .side-stack .icon-only:active {
  transform: translateY(1px) scale(0.98);
}

.system-drawer {
  position: absolute;
  top: 0;
  right: 76px;
  width: 154px;
  display: grid;
  gap: 8px;
  padding: 10px;
  visibility: hidden;
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(32, 28, 23, 0.94), rgba(24, 21, 17, 0.96));
  border: 1px solid rgba(224, 195, 132, 0.55);
  border-radius: var(--rs-r-m);
  box-shadow:
    inset 0 0 0 3px rgba(32, 28, 23, 0.9),
    inset 0 0 0 4px rgba(197, 155, 86, 0.35),
    0 14px 34px rgba(0, 0, 0, 0.4);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.system-drawer.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.yangxin-home-v2 .system-drawer button {
  width: 138px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  color: #f6e8c2;
  background: url("./assets/ui/home-wide-button.webp") center / 100% 100% no-repeat;
  font-family: "Royal Kai", serif;
  font-size: 17px;
  letter-spacing: 3px;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.55);
}

.yangxin-home-v2 .system-drawer button:hover {
  background-image: url("./assets/ui/home-wide-button-active.webp");
  filter: brightness(1.08);
}

.home-agenda {
  position: absolute;
  z-index: 5;
  top: 190px;
  right: 108px;
  width: 310px;
  height: 86px;
  box-sizing: border-box;
  padding: 17px 30px 13px 42px;
  background: url("./assets/ui/home-agenda.png") center / 100% 100% no-repeat;
  color: #eee2c4;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.55);
}

.home-agenda span,
.home-agenda strong,
.home-agenda small {
  display: block;
}

.home-agenda span {
  color: #cdb47a;
  font-size: 13px;
  letter-spacing: 3px;
}

.home-agenda strong {
  margin-top: 3px;
  font-family: "Royal Kai", serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 5px;
}

.home-agenda small {
  position: absolute;
  right: 27px;
  bottom: 16px;
  color: #d8c9a6;
  font-size: 12px;
  letter-spacing: 1px;
}

.yangxin-home-v2 .home-goout {
  position: absolute;
  z-index: 11;
  right: 52px;
  bottom: 48px;
}

.yangxin-home-v2 .home-exit-button {
  position: relative;
  width: 132px;
  height: 132px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
}

.yangxin-home-v2 .home-exit-button img {
  width: 116px;
  height: 124px;
  object-fit: contain;
  filter: drop-shadow(0 10px 9px rgba(27, 23, 19, 0.26));
}

.yangxin-home-v2 .home-exit-button span {
  position: absolute;
  left: 27px;
  right: 27px;
  bottom: 2px;
  min-height: 28px;
  display: grid;
  place-items: center;
  color: #f6e8c3;
  background: rgba(43, 39, 35, 0.84);
  border: 1px solid rgba(210, 179, 114, 0.48);
  font-family: "Royal Kai", serif;
  font-size: 18px;
  letter-spacing: 4px;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.55);
}

.yangxin-home-v2 .home-exit-button:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
}

.yangxin-home-v2 .home-exit-button:active {
  transform: translateY(1px) scale(0.98);
}

.yangxin-home-v2 .imperial-note {
  position: absolute;
  z-index: 12;
  left: 292px;
  right: 306px;
  bottom: 18px;
  min-height: 68px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 58px 15px 66px;
  color: #f5e9ca;
  background: url("./assets/ui/home-dialogue.png") center / 100% 100% no-repeat;
  border: 0;
  box-shadow: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
}

.yangxin-home-v2 .imperial-note span {
  flex: 0 0 auto;
  color: #d6bb78;
  font-size: 19px;
}

.yangxin-home-v2 .imperial-note p {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: #f2e5c5;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: 15px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yangxin-home-v2 button:focus-visible {
  outline: 2px solid #f1d494;
  outline-offset: 3px;
}

.home-tone-night .home-date,
.home-tone-night .home-resources,
.home-tone-night .home-control,
.home-tone-night .home-tab,
.home-tone-night .home-agenda,
.home-tone-night .home-exit-button {
  filter: drop-shadow(0 0 7px rgba(226, 202, 150, 0.18));
}

@media (max-width: 1350px) {
  .home-date { left: 118px; }
  .home-resources { right: 116px; width: 266px; background-size: 100% 100%; }
  .home-resource-treasury { left: 112px; }
  .yangxin-home-v2 .home-tabs { left: 545px; }
  .yangxin-home-v2 .action-dock { left: 24px; transform: scale(0.88); transform-origin: left top; }
  .yangxin-home-v2 .ruler-standee { inset: 24px 190px 0 214px; }
  .home-agenda { right: 92px; width: 286px; padding-left: 38px; }
  .home-agenda small { display: none; }
  .yangxin-home-v2 .imperial-note { left: 258px; right: 276px; }
  .yangxin-home-v2 .home-goout { right: 38px; }
}

@media (max-height: 700px) {
  .yangxin-home-v2 .action-dock { top: 142px; transform: scale(0.88); transform-origin: left top; }
  .yangxin-home-v2 .ruler-standee img { height: 92vh; }
  .home-agenda { top: 174px; }
  .yangxin-home-v2 .imperial-note { bottom: 10px; min-height: 62px; }
  .yangxin-home-v2 .home-goout { bottom: 32px; }
}

/* ───────────── 统一人物面板 persona（主控/大臣/妃嫔/子嗣）·功能版（卷轴/字体套皮待 Codex）───────────── */
.persona-screen { display: flex; align-items: center; justify-content: center; padding: 4vh 3vw; }
.persona-frame { display: flex; gap: 0; width: min(1040px, 96vw); max-height: 90vh; background: rgba(24,19,16,0.94); border: 1px solid rgba(231,198,137,0.45); border-radius: 16px; box-shadow: 0 18px 56px rgba(0,0,0,0.5); overflow: hidden; }
/* 左栏书签：查看状态 / 查看心情 */
.persona-rail { display: flex; flex-direction: column; gap: 10px; padding: 22px 12px; background: linear-gradient(180deg, rgba(84,38,31,0.55), rgba(40,24,20,0.5)); border-right: 1px solid rgba(231,198,137,0.25); }
.persona-rail-btn:hover { filter: brightness(1.12); }
/* 中栏：tab + 正文 */
.persona-main { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 18px 22px; overflow-y: hidden; }
.persona-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.persona-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.persona-id { font-size: 21px; color: var(--rs-deep-text); font-weight: 600; padding-bottom: 6px; border-bottom: 1px solid rgba(231,198,137,0.2); }
.persona-id em { font-style: normal; color: var(--rs-gold-strong); font-size: 15px; }
/* 续95(Yan 2026-06-27)：汇总行(精力/心境/国库、国号/国运、国力/发展值/民心)此前无 CSS，inline span 之间无间距 → 「100心境80国库」连读。改成弹性行带间距。 */
.persona-vital, .home-panel-vital { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 6px 0; font-size: 14px; color: rgba(243,233,210,0.86); }
.persona-vital strong, .home-panel-vital strong { color: var(--rs-gold-text); margin-left: 4px; }
.persona-line { font-size: 14px; color: rgba(243,233,210,0.86); }

/* 2026-06-30：养心殿原创玉牌 UI。背景仍使用现有 yangxin-*，本层只承载从头生成的小 UI 元素。 */
.yangxin-home-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  background: none;
  filter: none;
}






.yangxin-home-v2 .home-energy small {
  color: rgba(232, 210, 157, 0.92);
  font-size: 15px;
}



.yangxin-home-v2 .home-date strong {
  left: 0;
  top: 0;
  font-size: 20px;
}

.yangxin-home-v2 .home-date > span:nth-of-type(1) {
  left: 124px;
  top: 1px;
  font-size: 19px;
}

.yangxin-home-v2 .home-date > span:nth-of-type(2) {
  left: 216px;
  top: 1px;
  font-size: 19px;
}






.yangxin-home-v2 .home-tabs {
  z-index: 17;
  top: 36px;
  left: 31.3%;
  gap: 14px;
}

.yangxin-home-v2 .home-tab {
  width: 66px;
  height: 180px;
  display: grid;
  place-items: start center;
  padding-top: 52px;
  color: #fff0c9;
  text-shadow: 0 2px 4px rgba(25, 21, 18, 0.68);
}

.yangxin-home-v2 .home-tab span {
  display: block;
  width: 1em;
  white-space: normal;
  word-break: break-all;
  font-size: 20px;
  line-height: 1.08;
  letter-spacing: 0;
  text-align: center;
  font-family: "Songti SC", "STSong", serif;
  font-style: normal;
  font-weight: 600;
}

.yangxin-home-v2 .home-tab:hover:not(:disabled) {
  transform: translateY(-4px);
  color: #fff8d9;
  filter: drop-shadow(0 0 10px rgba(224, 204, 144, 0.34));
}

.yangxin-home-v2 .action-dock {
  z-index: 17;
  inset: 0;
  width: auto;
  display: block;
  padding: 0;
  pointer-events: none;
}

.yangxin-home-v2 .home-control {
  position: absolute;
  top: 32.8%;
  width: 5.9%;
  height: 59%;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: none;
  pointer-events: auto;
}

.yangxin-home-v2 .home-control img {
  display: none;
}

.yangxin-home-v2 .home-control span {
  position: absolute;
  top: 41%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: 1em;
  height: auto;
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff0c8;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(16px, 1.45vw, 22px);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.16;
  text-shadow: 0 2px 4px rgba(28, 22, 18, 0.72);
  width: 1em;
  white-space: normal;
  word-break: break-all;
  text-align: center;
}


.yangxin-home-v2 .home-control:hover {
  transform: translateY(-5px);
  filter: drop-shadow(0 0 10px rgba(224, 204, 144, 0.38));
}

.yangxin-home-v2 .home-control:hover span,
.yangxin-home-v2 .home-exit-button:hover span,
.yangxin-home-v2 .side-stack .icon-only:hover span {
  color: #fff8da;
}

.yangxin-home-v2 .home-control:active,
.yangxin-home-v2 .home-exit-button:active,
.yangxin-home-v2 .side-stack .icon-only:active {
  transform: translateY(1px) scale(0.98);
}

.yangxin-home-v2 .home-goout {
  z-index: 17;
  right: 1.6%;
  bottom: 0.8%;
}

.yangxin-home-v2 .home-exit-button {
  width: 112px;
  height: 266px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.yangxin-home-v2 .home-exit-button img {
  display: none;
}

.yangxin-home-v2 .home-exit-button span {
  position: absolute;
  top: 45%;
  left: 73%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  min-height: 0;
  display: block;
  border: 0;
  background: transparent;
  color: #fff0c8;
  font-family: "Songti SC", "STSong", serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.16;
  white-space: normal;
  word-break: break-all;
  text-align: center;
}


.yangxin-home-v2 .side-stack .icon-only {
  width: 78px;
  height: 182px;
  display: grid;
  place-items: start center;
  padding-top: 50px;
  border: 0;
  background: transparent;
  box-shadow: none;
}


.yangxin-home-v2 .side-stack .icon-only img {
  display: none;
}

.yangxin-home-v2 .side-stack .icon-only span {
  color: #fff0c8;
  width: 1em;
  white-space: normal;
  word-break: break-all;
  text-align: center;
  font-family: "Songti SC", "STSong", serif;
  font-size: 21px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(28, 22, 18, 0.72);
}


.home-tone-night.yangxin-home-v2::before {
  filter: drop-shadow(0 0 11px rgba(226, 202, 150, 0.20));
}

@media (max-width: 1350px) {
  .yangxin-home-v2 .home-tabs { left: 31%; }
  .yangxin-home-v2 .home-tab { width: 60px; height: 160px; }
  .yangxin-home-v2 .home-control { width: 5.8%; }
  .yangxin-home-v2 .home-control span { font-size: 17px; }
  .yangxin-home-v2 .home-goout { right: 1.4%; bottom: 0; }
  .yangxin-home-v2 .home-exit-button { width: 96px; height: 238px; }
}

@media (max-height: 700px) {
  .yangxin-home-v2 .home-tab { height: 150px; }
  .yangxin-home-v2 .home-control { top: 32%; height: 58%; }
  .yangxin-home-v2 .home-control span { font-size: 16px; }
  .yangxin-home-v2 .home-exit-button { height: 226px; }
}
.persona-sec { margin: 8px 0 2px; font-size: 13px; letter-spacing: 3px; color: var(--rs-gold-strong); text-align: center; border-bottom: 1px dashed rgba(231,198,137,0.22); padding-bottom: 4px; }
.persona-attrs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 14px; }
.persona-attrs li { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.persona-attrs li span { font-size: 12px; color: rgba(243,233,210,0.62); }
.persona-attrs li strong { font-size: 18px; color: var(--rs-gold-text); }
.persona-derived { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 6px 0; font-size: 14px; color: rgba(243,233,210,0.82); }
.persona-derived span strong { color: var(--rs-gold-text); margin-left: 4px; }
.persona-acts { display: flex; gap: 10px; margin-top: 10px; }
.persona-tag { display: inline-block; padding: 1px 8px; margin-left: 4px; border: 1px solid rgba(231,198,137,0.4); border-radius: 5px; background: rgba(84,38,31,0.6); color: var(--rs-deep-text); font-size: 12px; cursor: pointer; vertical-align: middle; text-align: center; }
.persona-note { margin-top: 10px; font-size: 12px; color: rgba(243,233,210,0.5); line-height: 1.5; }
.persona-empty { padding: 28px 8px; text-align: center; color: rgba(243,233,210,0.65); font-size: 14px; line-height: 1.8; }
.persona-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.persona-list li { font-size: 15px; color: rgba(243,233,210,0.88); padding: 8px 12px; background: rgba(20,16,14,0.5); border: 1px solid rgba(231,198,137,0.2); border-radius: 8px; }
.persona-list li b { color: var(--rs-gold-text); }
.persona-list small { color: rgba(243,233,210,0.55); font-size: 12px; }
/* 续94：人生编年（记事）—— 时间戳 + 内容；要事醒目、日常淡化。Codex 可在此基础上美化卷轴质感。 */
.persona-lifelog { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.persona-lifelog-row { display: flex; gap: 10px; align-items: baseline; font-size: 14px; padding: 7px 12px; background: rgba(20,16,14,0.45); border: 1px solid rgba(231,198,137,0.16); border-left: 3px solid rgba(231,198,137,0.5); border-radius: 6px; }
.persona-lifelog-row .lifelog-when { flex: 0 0 auto; color: #c9a45e; font-size: 12.5px; min-width: 86px; }
.persona-lifelog-row .lifelog-text { flex: 1; color: rgba(243,233,210,0.9); line-height: 1.6; }
.persona-lifelog-row.lifelog-daily { border-left-color: rgba(231,198,137,0.22); background: rgba(20,16,14,0.3); }
.persona-lifelog-row.lifelog-daily .lifelog-text { color: rgba(243,233,210,0.66); }
.persona-mood { padding: 24px 10px; text-align: center; }
.persona-mood-line { font-size: 17px; color: var(--rs-deep-text); letter-spacing: 1px; }
/* 右栏：立绘 + 按钮 */
@media (max-width: 720px) {
  .persona-frame { flex-direction: column; max-height: 92vh; overflow-y: hidden; }
  .persona-rail { flex-direction: row; }
  .persona-rail-btn { writing-mode: horizontal-tb; letter-spacing: 2px; }
  .persona-portrait { width: 100%; border-left: none; border-top: 1px solid rgba(231,198,137,0.2); }
  .persona-standee { height: 200px; }
  .persona-attrs { grid-template-columns: repeat(3, 1fr); }
  .portrait-picker-body { grid-template-columns: 1fr; }
  .portrait-lib-list { max-height: 150px; border-right: none; border-bottom: 1px solid rgba(231,198,137,0.2); }
  .portrait-pick-main { grid-template-columns: 1fr; }
  .portrait-preview { height: 280px; }
  .consort-visit-standee { left: 50%; width: 94vw; height: 58vh; opacity: 0.92; }
}

/* 六尚局面板（功能性布局·美化可由 Codex 续作） */
/* 续103(Yan 2026-06-28)：单列垂直布局一律垂直居中（不再顶对齐）。.court-screen 基类 position:relative·无 flex，topbar/court-head/court-leave 皆 absolute(脱流)；故把 bureau-screen 改 flex 列 + justify-content:center 垂直居中正文，padding 让出顶栏(顶128px)与返回钮(底92px)·box-sizing:border-box·overflow:hidden 不溢出。 */
.court-screen.bureau-screen { display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; padding: 128px 0 92px; }
.bureau-body { flex: 0 1 auto; width: 100%; box-sizing: border-box; padding: 0 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: hidden; max-height: 100%; }
.bureau-sec { border: 1px solid rgba(231,198,137,0.18); border-radius: 8px; padding: 10px 12px; background: rgba(40,22,18,0.45); }
.bureau-sec-h { margin: 0 0 6px; font-size: 13px; letter-spacing: 2px; color: var(--rs-gold-strong); }
.bureau-line { font-size: 14px; color: rgba(243,233,210,0.9); line-height: 1.7; }
.bureau-line b { color: var(--rs-gold-text); }
.bureau-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bureau-note { margin-top: 6px; font-size: 12px; color: rgba(243,233,210,0.5); line-height: 1.5; }
.bureau-rank-list { display: flex; flex-direction: column; gap: 4px; }
.bureau-rank-row { display: flex; gap: 10px; font-size: 13px; color: rgba(243,233,210,0.88); padding: 3px 6px; border-bottom: 1px dashed rgba(231,198,137,0.12); }
.bureau-rank-row span:first-child { min-width: 28px; color: var(--rs-gold-strong); }
.bureau-rank-row span:nth-child(2) { flex: 1; }
.bureau-cand-list { display: flex; flex-direction: column; gap: 6px; }
.bureau-cand { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; color: var(--rs-deep-text); padding: 4px 8px; border: 1px solid rgba(231,198,137,0.18); border-radius: 6px; }
.bureau-roster-grp { margin-bottom: 10px; }
.roster-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.roster-chip { display: inline-block; padding: 2px 8px; border: 1px solid rgba(231,198,137,0.28); border-radius: 5px; background: rgba(84,38,31,0.45); color: rgba(243,233,210,0.9); font-size: 12px; }

/* 东西六宫·单处详情：住户卡 ew-card（复用 bureau-sec 容器） */
.ew-card { border: 1px solid rgba(231,198,137,0.22); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: rgba(40,22,18,0.4); }
.ew-card-h { font-size: 15px; color: var(--rs-deep-text); margin-bottom: 4px; }
.ew-card-sub { font-size: 12.5px; color: rgba(243,233,210,0.82); line-height: 1.7; }
.ew-card .persona-tag { margin-top: 6px; }

/* 东西六宫·多人临幸多选 */
.ew-pick-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.ew-pick-btn { flex: 0 1 auto; padding: 5px 10px; font-size: 13px; }
.ew-pick-btn.is-sel { background: rgba(205,162,95,0.32); border-color: var(--rs-gold-strong); color: #fff7e6; }
.ew-pick-btn:disabled { opacity: 0.4; }

/* 家族系统·族亲成员卡（华清宫族谱 / 族亲入宫） */
.clan-card { border: 1px solid rgba(231,198,137,0.18); border-radius: 6px; padding: 7px 10px; margin-bottom: 6px; background: rgba(40,22,18,0.4); }
.clan-card-h { font-size: 14px; color: var(--rs-deep-text); margin-bottom: 3px; }
.clan-card-h small { color: rgba(243,233,210,0.7); font-weight: normal; }
.clan-attr { font-size: 12px; color: rgba(243,233,210,0.82); line-height: 1.6; }

/* 通用名册详情面板 roster-panel（左名册列 + 中属性卡 + 右立绘）·照临帝阙华清宫/储秀宫·功能版(视觉精修归 Codex) */
.roster-panel { margin-top: 6px; }
.roster-body { display: flex; gap: 10px; align-items: stretch; }
.roster-list { flex: 0 0 132px; display: flex; flex-direction: column; gap: 5px; max-height: 360px; overflow-y: hidden; }
.roster-entry { text-align: left; padding: 7px 9px; font-size: 13px; border: 1px solid rgba(231,198,137,0.2); border-radius: 6px; background: rgba(40,22,18,0.4); color: var(--rs-deep-text); line-height: 1.3; }
.roster-entry small { display: block; font-size: 11px; color: rgba(243,233,210,0.65); margin-top: 2px; }
.roster-entry.is-on { background: rgba(205,162,95,0.3); border-color: var(--rs-gold-strong); color: #fff7e6; }
.roster-page { text-align: center; font-size: 12px; color: rgba(243,233,210,0.6); margin-top: auto; padding-top: 4px; }
.roster-empty { font-size: 13px; color: rgba(243,233,210,0.6); padding: 10px; }
.roster-main { flex: 1; display: flex; gap: 10px; }
.roster-detail { flex: 1; border: 1px solid rgba(231,198,137,0.18); border-radius: 8px; padding: 10px 12px; background: rgba(40,22,18,0.42); }
.roster-detail-empty { display: flex; align-items: center; justify-content: center; color: rgba(243,233,210,0.5); }
.roster-d-head { font-size: 15px; color: var(--rs-deep-text); margin-bottom: 6px; }
.roster-d-line { display: flex; gap: 8px; font-size: 13px; color: rgba(243,233,210,0.85); padding: 2px 0; }
.roster-d-line span { min-width: 42px; color: var(--rs-gold-strong); }
.roster-badge { background: rgba(205,162,95,0.22); border-radius: 4px; padding: 0 8px; }
.roster-d-sec { font-size: 12px; letter-spacing: 2px; color: var(--rs-gold-strong); margin: 8px 0 4px; }
.roster-d-attrs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.roster-attr { font-size: 13px; color: rgba(243,233,210,0.9); }
.roster-attr i { color: var(--rs-gold-strong); font-style: normal; margin-right: 4px; }
.roster-d-extra { font-size: 13px; color: rgba(243,233,210,0.85); margin-top: 5px; }
.roster-d-extra span { color: var(--rs-gold-strong); margin-right: 6px; }
.roster-portrait { flex: 0 0 120px; border: 1px solid rgba(231,198,137,0.2); border-radius: 8px; background: rgba(40,22,18,0.35); min-height: 200px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.roster-portrait img { width: 100%; height: 100%; min-height: 200px; object-fit: cover; object-position: top center; display: block; }
.roster-actions { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }

/* ───────── 私宅 / 外室（sizhai 屏）·功能性布局（美化留 Codex） ───────── */
.sz-screen { display: flex; flex-direction: column; justify-content: center; align-items: center; }   /* 续100：文字垂直居中（Yan：字放页面中间）·无滚动 */
.sz-body { max-width: 760px; width: 100%; box-sizing: border-box; margin: 0 auto; padding: 14px 16px; color: var(--rs-deep-text); }
.sz-actions, .sz-wrap { position: static; width: auto; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0; }
.sz-body .court-action { width: auto; min-width: 96px; padding: 10px 14px; font-size: 14px; }
/* 续104l：召见大臣互动页前景层（菜单/文案压在大臣立绘 standee 之上） */
.sz-body .mv-fore { position: relative; z-index: 3; }
/* 续104e Yan：重臣/近臣府邸「权贵」背景太杂、字看不清→盖一层深色遮罩，正文/标题浮于其上 */
.court-screen.nv-scrim::before { content: ""; position: absolute; inset: 0; background: rgba(16,12,10,0.62); z-index: 0; pointer-events: none; }
.court-screen.nv-scrim > .court-head, .court-screen.nv-scrim > .sz-body { position: relative; z-index: 1; }
.sz-manage-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0 6px; border-bottom: 1px solid rgba(231,198,137,0.3); margin-bottom: 12px; }
.sz-manage-head > span { color: var(--rs-gold-hover); font-size: 20px; letter-spacing: 2px; }
.sz-manage-head > small { color: #c9b890; font-size: 13px; }
.sz-rank-group { margin: 10px 0; }
.sz-rank-h { color: var(--rs-gold-hover); font-size: 15px; letter-spacing: 1px; margin: 8px 0 6px; border-left: 3px solid rgba(231,198,137,0.6); padding-left: 8px; }
.sz-rank-h small { color: #c9b890; font-size: 12px; letter-spacing: 0; }
.sz-roster { display: flex; flex-direction: column; gap: 8px; }
.sz-rrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 1px solid rgba(231,198,137,0.4); border-radius: 6px; background: rgba(22,18,16,0.82); color: var(--rs-deep-text); font-size: 14px; cursor: pointer; text-align: left; }
.sz-rrow:hover { border-color: var(--rs-gold-hover); background: rgba(42,31,26,0.92); }
.roster-name { color: var(--rs-gold-hover); letter-spacing: 1px; }
.roster-meta { color: #c9b890; font-size: 13px; }
.sz-kids { margin: 14px 0; padding: 10px 14px; border: 1px dashed rgba(231,198,137,0.35); border-radius: 6px; font-size: 13px; color: #d8c8a0; }
.hp-note { color: #b6a888; font-size: 13px; text-align: center; margin: 8px 0; }
.month-confirm { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 28px 0; }   /* 续104j：转月确认·正常流居中按钮组 */
.persona-attr-card { border: 1px solid rgba(231,198,137,0.4); border-radius: 8px; background: rgba(22,18,16,0.7); padding: 12px 16px; margin: 10px auto; max-width: 520px; }
.persona-attr-head { color: var(--rs-gold-hover); font-size: 14px; margin-bottom: 10px; letter-spacing: 1px; }
.persona-attr-row { display: flex; align-items: center; gap: 10px; margin: 5px 0; font-size: 13px; }
.persona-attr-row > span:first-child { width: 48px; color: #c9b890; }
.persona-attr-row > b { width: 44px; text-align: right; color: var(--rs-deep-text); }
.hp-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(231,198,137,0.18); overflow: hidden; }
.hp-bar-fill { display: block; height: 100%; background: linear-gradient(90deg,var(--rs-gold-mid),var(--rs-gold-hover)); }
.court-action.danger { border-color: rgba(196,96,80,0.7); color: #f0cfc6; background: rgba(60,26,22,0.82); }
.court-action.danger:hover { border-color: #d98a78; background: rgba(84,32,26,0.92); }
.court-action.is-on { border-color: var(--rs-gold-hover); background: rgba(84,62,30,0.9); }
.sz-cands { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 14px 0; }
.sz-cands-4 { display: grid; grid-template-columns: repeat(4, 158px); justify-content: center; }   /* 续104j·Yan：姻缘阁 4×2 等行网格 */
.sz-cand-acts-col { display: flex; flex-direction: column; gap: 6px; }
.sz-cand-acts-col .court-action { width: 100%; min-width: 0; }
.sz-detail-port { height: 220px; max-width: 320px; margin: 8px auto; border-radius: 8px; background: rgba(231,198,137,0.08); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.sz-detail-port img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.sz-cand { width: 158px; border: 1px solid rgba(231,198,137,0.4); border-radius: 8px; background: rgba(22,18,16,0.82); padding: 10px; text-align: center; }
.sz-cand-origin { color: #c9b890; font-size: 12px; }
.sz-cand-port { height: 80px; border-radius: 6px; background: rgba(231,198,137,0.08); margin: 6px 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.sz-cand-port img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.dress-portrait { overflow: hidden; display: flex; align-items: center; justify-content: center; }
.dress-portrait img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; display: block; }
.home-person-row { display: flex; align-items: flex-start; gap: 14px; width: 100%; }
.home-person-copy { min-width: 0; flex: 1 1 auto; }
.home-person-portrait { flex: 0 0 96px; width: 96px; height: 112px; border: 1px solid rgba(231,198,137,0.28); border-radius: 8px; background: rgba(231,198,137,0.1); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.home-person-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.portrait-choice-btn { display: flex; align-items: center; justify-content: flex-start; gap: 10px; text-align: left; }
.choice-portrait { flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid rgba(231,198,137,0.3); border-radius: 6px; background: rgba(231,198,137,0.1); overflow: hidden; display: inline-flex; align-items: center; justify-content: center; }
.choice-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.home-person-mini-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.sz-cand-name { color: var(--rs-gold-hover); font-size: 14px; margin-bottom: 4px; }
.sz-cand-acts { margin-top: 8px; }

/* ===== 续94-UI修复：home-panels(事务/属性/换装等)外壳与内容布局 =====
   此前 .home-panel-body / .home-affairs-grid / .home-panel-tabs 整套无 CSS →
   内容在 .court-screen(position:relative; overflow:hidden) 里从 top:0 起、被绝对定位顶栏(z-index6)盖住或被裁掉，表现为「空白」。
   下面把内容区绝对定位到标题下方、居中、可滚动；事务列表排成网格。对所有 home 面板统一生效。 */
.home-panel-tabs { position: absolute; top: 9.5%; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 10px; }
.home-panel-tab { padding: 8px 22px; font-size: 15px; }
.home-panel-tab.is-active { border-color: var(--rs-gold-text); background: rgba(60,48,38,0.95); color: #ffe9b8; }
.home-panel-body { position: absolute; top: 13.5%; left: 50%; transform: translateX(-50%); z-index: 4; width: min(900px, 94%); max-height: 72vh; overflow-y: hidden; padding: 4px 2px 14px; color: #f1e6cd; }
/* 续104w：统一跨类势力总览（纯展示样式·确定性双跑 无关） */
.faction-list { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.faction-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 5px 10px; font-size: 14px; }
.faction-row.uf-head { background: rgba(60,48,38,0.55); border-left: 3px solid #c79a55; border-radius: 4px; margin-top: 6px; }
.faction-row .fr-faction { font-weight: 700; color: #ffe9b8; font-size: 15px; }
.faction-row .uf-kind { font-size: 12px; color: #2a2018; background: #c79a55; border-radius: 3px; padding: 1px 7px; }
.faction-row .fr-leader { color: #e7d6ad; }
.faction-row.faction-agenda { padding: 2px 14px 6px; }
.faction-row .uf-members { color: #d8c79a; font-size: 13px; line-height: 1.6; }
.faction-row .uf-seg { margin-right: 4px; }
.faction-row .uf-seg b { color: #f0b95f; font-weight: 700; margin-right: 2px; }
.faction-row .fr-stage { color: #f0a86a; font-size: 13px; }
.uf-kind-mini { font-size: 11px; color: #c79a55; margin-left: 6px; }
.faction-row .uf-deputy { color: #d2bf8e; font-size: 13px; }
.faction-row .uf-deputy .uf-deputy-note { color: #9a8f78; font-style: normal; font-size: 12px; margin-left: 2px; }
.faction-row .uf-deputy.uf-noarmy { color: #8f8470; }
.faction-row .fr-stage.uf-brewing { color: #c79a55; }
.home-affairs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.home-affair-btn { width: 100%; text-align: center; }
.favor-cards-row { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.favor-card { width: 168px; min-height: 282px; padding: 12px; border: 1px solid rgba(226,198,139,0.38); border-radius: 8px; background: rgba(28,24,21,0.78); display: flex; flex-direction: column; align-items: center; gap: 8px; box-sizing: border-box; }

/* 朝堂最终覆盖：压住后段全局对话框 / 名册深色样式，文字不再额外套黑底。 */
.court-screen .dialog-screen {
  background: linear-gradient(180deg, rgba(15, 12, 9, 0.05), rgba(15, 12, 9, 0.18));
}

.court-screen .dialog-box {
  border-color: rgba(204, 164, 88, 0.58);
  background:
    linear-gradient(180deg, rgba(252, 247, 229, 0.96), rgba(232, 222, 198, 0.94)),
    linear-gradient(90deg, rgba(111, 150, 132, 0.10), rgba(174, 92, 66, 0.06));
  color: #37281e;
  box-shadow: 0 18px 40px rgba(28, 18, 10, 0.28), inset 0 0 0 1px rgba(255, 255, 242, 0.38);
}

.court-screen .dialog-box::before {
  border-color: rgba(184, 145, 73, 0.42);
  background: linear-gradient(180deg, rgba(207, 184, 121, 0.82), rgba(142, 111, 67, 0.78));
}

.court-screen .dialog-name {
  color: #fff5d8;
  text-shadow: 0 1px 3px rgba(66, 42, 24, 0.44);
}

.court-screen .dialog-box p {
  color: #37281e;
  text-shadow: none;
}

.court-screen .dialog-hint {
  color: #80603a;
}

.court-screen .roster-detail,
.court-screen .roster-entry,
.court-screen .roster-portrait {
  border-color: rgba(184, 145, 73, 0.34);
  background: rgba(255, 252, 236, 0.62);
  color: #3b2b1f;
}

/* ===== 2026-07-01 上朝美术重设：宣政殿玉牌 + 奏疏案牍 ===== */
.court-screen {
  --court-ink: #352a20;
  --court-muted: #705d48;
  --court-paper: rgba(244, 237, 216, 0.91);
  --court-paper-strong: rgba(250, 244, 226, 0.96);
  --court-jade: var(--rs-jade);
  --court-jade-deep: var(--rs-jade-deep);
  --court-gold: var(--rs-gold);
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 246, 212, 0.18), rgba(255, 246, 212, 0) 29%),
    linear-gradient(180deg, rgba(13, 10, 8, 0.20), rgba(13, 10, 8, 0.03) 34%, rgba(31, 19, 13, 0.33)),
    var(--scene-bg) center / cover no-repeat;
  color: var(--court-ink);
  font-family: "Royal Kai", "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}

.court-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(25, 18, 13, 0.32), rgba(25, 18, 13, 0.02) 21%, rgba(25, 18, 13, 0.02) 79%, rgba(25, 18, 13, 0.34)),
    linear-gradient(0deg, rgba(39, 24, 14, 0.36), rgba(39, 24, 14, 0) 36%);
}

.court-screen::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8vh;
  z-index: 2;
  width: min(1120px, 84vw);
  height: 30vh;
  transform: translateX(-50%);
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(65, 42, 25, 0.36), rgba(65, 42, 25, 0) 70%),
    linear-gradient(180deg, rgba(208, 173, 103, 0.04), rgba(81, 50, 28, 0.18));
  border-top: 1px solid rgba(218, 187, 118, 0.20);
  filter: blur(0.1px);
}

.court-screen .topbar,
.court-screen .topbar.has-resources {
  position: absolute;
  top: 14px;
  left: 18px;
  right: auto;
  z-index: 12;
  display: block;
  width: auto;
  max-width: calc(100vw - 36px);
  min-height: 128px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

.court-screen .topbar-core {
  position: relative;
  display: block;
  width: clamp(360px, 30vw, 480px);
  min-width: 350px;
  aspect-ratio: 1787 / 648;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/visit/status-plaque.png") left center / 100% 100% no-repeat;
  box-shadow: none;
  backdrop-filter: none;
  /* 只读显示牌·点击穿透到下方 Tab（续104zt-⑨修 bug 保留）。 */
  pointer-events: none;
  filter: drop-shadow(0 12px 16px rgba(24, 16, 9, 0.30));
}

.court-screen .imperial-status {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.court-screen .imperial-status img {
  position: absolute;
  left: 4.75%;
  top: 12.1%;
  width: 18.9%;
  height: 41.1%;
  border: 0;
  border-radius: 50%;
  background: rgba(228, 218, 194, 0.42);
  object-fit: cover;
  object-position: center center;
  box-shadow: inset 0 0 12px rgba(255, 246, 211, 0.22);
}

.court-screen .imperial-status .status-label,
.court-screen .imperial-status .status-value {
  position: absolute;
  white-space: nowrap;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.72),
    0 0 8px rgba(221, 194, 127, 0.18);
}

.court-screen .imperial-status .status-label {
  left: 31.5%;
  top: 45.5%;
  color: #d7c087;
  font-size: clamp(12px, 0.82vw, 14px);
  letter-spacing: 0;
}

.court-screen .imperial-status .status-value {
  left: 40.5%;
  top: 43.6%;
  color: #fff4d0;
  font-family: "Royal Sans", "PingFang SC", sans-serif;
  font-size: clamp(16px, 1.06vw, 19px);
  font-weight: 600;
}

.court-screen .time-block {
  position: absolute;
  left: 31.5%;
  top: 25%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px clamp(10px, 0.8vw, 16px);
  width: 58%;
  color: #f5e6bd;
  text-align: left;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.72),
    0 0 8px rgba(221, 194, 127, 0.14);
}

.court-screen .time-block span {
  color: #f8e9c2;
  font-size: clamp(15px, 1.02vw, 18px);
  font-weight: 600;
  letter-spacing: 0;
}

.court-screen .time-block small {
  flex-basis: 100%;
  color: rgba(215, 192, 135, 0.78);
  font-size: clamp(11px, 0.74vw, 13px);
}

.court-screen .topnav-banners {
  position: fixed;
  top: 0;
  right: 36px;
  z-index: 13;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  height: 236px;
  margin: 0;
  overflow: visible;
  pointer-events: auto;
}

/* 续104zt·⑦（Yan：三快捷牌全部顶到最顶）：普通/无银两屏 top:0 贴屏顶(far-right)。 */
.court-screen .topbar.has-resources .topnav-banners {
  top: 0;
  /* 有银两屏：牌排到「状态栏(荷花牌)右侧」——状态栏 left:18 右缘≈448，故牌 left:460 接其右·顶到最顶 */
  left: 460px;
  right: auto;
}

.court-screen .navban {
  width: 44px;
  height: 236px;
  margin-top: 0;
  background: url("./assets/ui/court-nav-jade-20260701.png") center top / 100% 100% no-repeat;
  filter: drop-shadow(0 10px 12px rgba(25, 16, 8, 0.34));
}

.court-screen .navban[aria-label="寝宫"] {
  height: 236px;
}

.court-screen .navban img {
  display: none;
}

.court-screen .navban span {
  position: absolute;
  left: 50%;
  top: 39%;
  width: 1em;
  height: auto;
  overflow: visible;
  clip: auto;
  transform: translate(-50%, -50%);
  white-space: normal;
  writing-mode: vertical-rl;
  text-orientation: upright;
  color: #22352c;
  font-family: "Royal Kai", "Songti SC", "STSong", serif;
  font-size: clamp(15px, 1.2vw, 19px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.1em;
  text-shadow:
    0 1px rgba(255, 255, 232, 0.75),
    0 0 6px rgba(232, 221, 166, 0.4);
}

.court-screen .resource-strip {
  position: fixed;
  top: 20px;
  right: 142px;
  z-index: 13;
  display: block;
  width: 266px;
  height: 70px;
  margin: 0;
  padding: 0;
  background: url("./assets/ui/home-money-single.webp") center / 100% 100% no-repeat;
  pointer-events: auto;
  filter: drop-shadow(0 10px 14px rgba(22, 15, 9, 0.28));
}

.court-screen .resource-pill {
  position: absolute;
  left: 108px;
  top: 13px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  color: #fff1c8;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.48);
}

.court-screen .resource-pill em {
  color: #d9c99f;
  font-size: 13px;
  font-style: normal;
}

.court-screen .resource-pill strong {
  max-width: 116px;
  overflow: hidden;
  color: #fff5d5;
  font-family: "Royal Sans", "PingFang SC", sans-serif;
  font-size: 20px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.court-title-plaque {
  position: absolute;
  left: 50%;
  top: 22px;
  z-index: 11;
  display: grid;
  place-items: center;
  min-width: 176px;
  padding: 8px 34px 10px;
  transform: translateX(-50%);
  border: 1px solid rgba(212, 179, 103, 0.56);
  border-radius: 5px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 246, 213, 0.34), rgba(255, 246, 213, 0) 48%),
    linear-gradient(180deg, rgba(232, 222, 191, 0.88), rgba(172, 188, 169, 0.92));
  color: #3b3026;
  box-shadow:
    0 12px 24px rgba(30, 19, 11, 0.22),
    inset 0 0 0 1px rgba(255, 252, 231, 0.42);
  text-align: center;
}

.court-title-plaque::before,
.court-title-plaque::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(196, 145, 72, 0.72);
  background: rgba(236, 219, 169, 0.85);
  transform: translateY(-50%) rotate(45deg);
  box-shadow: inset 0 0 0 2px rgba(104, 132, 117, 0.12);
}

.court-title-plaque::before { left: 9px; }
.court-title-plaque::after { right: 9px; }

.court-title-plaque span {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 3px;
}

.court-title-plaque small {
  margin-top: 2px;
  color: #705d48;
  font-size: 12px;
  letter-spacing: 2px;
}

.court-ministries {
  position: absolute;
  left: 50%;
  top: clamp(214px, 29vh, 252px);
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(6, minmax(70px, 1fr));
  gap: clamp(22px, 3.4vw, 48px);
  width: min(900px, 84vw);
  transform: translateX(-50%);
  justify-items: center;
  align-items: start;
}

.court-ministry {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  align-items: center;
  width: clamp(68px, 6vw, 86px);
  min-height: clamp(204px, 28vh, 280px);
  padding: 42px 10px 62px;
  border: 1px solid rgba(212, 179, 103, 0.78);
  border-radius: 22px 22px 16px 16px / 28px 28px 14px 14px;
  background:
    radial-gradient(circle at 50% 4%, rgba(255, 249, 220, 0.62), rgba(255, 249, 220, 0) 22%),
    linear-gradient(180deg, rgba(222, 229, 205, 0.97), rgba(165, 188, 171, 0.96) 49%, rgba(134, 168, 153, 0.98)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0));
  color: #31483f;
  cursor: pointer;
  box-shadow:
    0 18px 22px rgba(30, 18, 10, 0.26),
    inset 0 0 0 2px rgba(255, 252, 228, 0.30),
    inset 0 -18px 28px rgba(75, 107, 96, 0.12);
  text-align: center;
  text-shadow: 0 1px rgba(255, 255, 255, 0.45);
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}

.court-ministry::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(214, 178, 95, 0.82);
  border-radius: 50% 50% 44% 44%;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 244, 203, 0.95), rgba(194, 143, 68, 0.78) 62%, rgba(114, 139, 121, 0.72));
  transform: translateX(-50%);
  box-shadow: 0 4px 8px rgba(36, 23, 12, 0.24), 0 -18px 0 -14px rgba(205, 164, 82, 0.95);
}

.court-ministry::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -54px;
  width: 22px;
  height: 64px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 0, rgba(204, 232, 209, 0.95) 0 5px, transparent 6px),
    linear-gradient(90deg, transparent 0 8px, rgba(165, 116, 52, 0.88) 8px 13px, transparent 13px),
    linear-gradient(90deg, rgba(173, 113, 45, 0), rgba(189, 122, 48, 0.84), rgba(173, 113, 45, 0));
  clip-path: polygon(42% 0, 58% 0, 63% 22%, 86% 100%, 14% 100%, 37% 22%);
  filter: drop-shadow(0 5px 4px rgba(27, 18, 10, 0.22));
  opacity: 0.92;
}

.court-ministry:hover {
  filter: brightness(1.06);
  transform: translateY(-5px);
  box-shadow:
    0 23px 28px rgba(30, 18, 10, 0.30),
    0 0 20px rgba(229, 201, 132, 0.20),
    inset 0 0 0 2px rgba(255, 252, 228, 0.40);
}

.court-ministry:active {
  transform: translateY(1px) scale(0.985);
}

.court-ministry .cm-name {
  writing-mode: vertical-rl;
  text-orientation: upright;
  min-height: 70px;
  color: #294238;
  font-size: clamp(21px, 1.9vw, 27px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 2px;
}

.court-ministry .cm-py {
  margin-top: 10px;
  color: rgba(49, 72, 63, 0.58);
  font-family: "Royal Sans", "PingFang SC", sans-serif;
  font-size: 9px;
  letter-spacing: 1px;
}

.court-ministry .cm-minister {
  max-width: 100%;
  margin-top: 7px;
  color: rgba(54, 68, 56, 0.74);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0;
}

.court-actions {
  position: absolute;
  left: 50%;
  top: clamp(152px, 24vh, 210px);
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 12px 14px;
  width: min(700px, 84vw);
  transform: translateX(-50%);
  justify-items: stretch;
}

.court-action,
.court-screen .palace-btn,
.court-screen .mini-btn,
.roster-view,
.rtbl-view,
.est-btn,
.roster-pgbtn {
  border: 1px solid rgba(190, 150, 78, 0.58);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 250, 231, 0.98), rgba(218, 201, 159, 0.94)),
    linear-gradient(90deg, rgba(82, 124, 110, 0.18), rgba(147, 66, 53, 0.08));
  color: #3c2b1e;
  box-shadow:
    0 8px 16px rgba(33, 21, 12, 0.18),
    inset 0 0 0 1px rgba(255, 255, 242, 0.45);
  text-shadow: none;
}

.court-action {
  min-height: 48px;
  padding: 12px 18px;
  font-size: 15px;
  letter-spacing: 0;
}

.court-action:hover:not(:disabled):not([disabled]),
.court-screen .palace-btn:hover:not(:disabled):not([disabled]),
.court-screen .mini-btn:hover:not(:disabled):not([disabled]),
.roster-view:hover:not(:disabled):not([disabled]),
.rtbl-view:hover:not(:disabled):not([disabled]),
.est-btn:hover:not(:disabled):not([disabled]),
.roster-pgbtn:hover:not(:disabled):not([disabled]) {
  border-color: rgba(214, 165, 76, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 253, 237, 1), rgba(229, 210, 165, 0.98)),
    linear-gradient(90deg, rgba(93, 140, 123, 0.22), rgba(147, 66, 53, 0.10));
  filter: brightness(1.04);
}

.court-action.current,
.court-action.is-on,
.roster-tab.is-on,
.court-back {
  border-color: rgba(83, 121, 107, 0.70);
  background: linear-gradient(180deg, rgba(199, 219, 200, 0.98), rgba(124, 166, 149, 0.95));
  color: #253e35;
}

.court-action:disabled,
.court-action[disabled],
.court-screen .palace-btn:disabled,
.court-screen .palace-btn[disabled],
.roster-view:disabled,
.roster-view[disabled],
.est-btn:disabled,
.est-btn[disabled] {
  opacity: 0.48;
  color: rgba(67, 53, 37, 0.62);
  filter: grayscale(0.18);
  cursor: not-allowed;
}

.court-speaker {
  position: absolute;
  left: 50%;
  top: 112px;
  z-index: 5;
  max-width: min(700px, 82vw);
  margin: 0;
  padding: 10px 20px;
  transform: translateX(-50%);
  border: 1px solid rgba(193, 157, 88, 0.48);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(250, 244, 224, 0.94), rgba(229, 218, 189, 0.88));
  color: #3d2c20;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0;
  text-align: center;
  box-shadow: 0 10px 22px rgba(30, 19, 11, 0.18);
  text-shadow: none;
}

.court-board,
.diplo-list,
.est-board,
.official-card,
.sz-body,
.roster {
  border: 1px solid rgba(190, 150, 78, 0.50);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(251, 247, 231, 0.94), rgba(234, 226, 202, 0.90)),
    linear-gradient(90deg, rgba(88, 126, 112, 0.10), rgba(149, 80, 62, 0.06));
  color: var(--court-ink);
  box-shadow:
    0 20px 38px rgba(31, 20, 12, 0.24),
    inset 0 0 0 1px rgba(255, 255, 240, 0.42);
}

.court-board {
  top: clamp(126px, 16vh, 154px);
  width: min(880px, 92vw);
  max-height: 72vh;
  padding: 18px;
  overflow: hidden;
}

.court-board-intro,
.diplo-intro,
.court-board .punish-case,
.diplo-row,
.court-screen .est-list,
.est-add,
.roster-detail,
.roster-entry,
.punish-case {
  border: 1px solid rgba(184, 145, 73, 0.32);
  border-radius: 7px;
  background: rgba(255, 252, 236, 0.58);
  color: var(--court-ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 245, 0.36);
}

.court-board-intro,
.diplo-intro {
  color: #3e2f22;
  font-size: 14px;
  line-height: 1.72;
  text-align: center;
}

.court-board .court-speaker {
  position: static;
  max-width: none;
  padding: 0;
  transform: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--court-ink);
}



.roster {
  top: clamp(148px, 19vh, 182px);
  width: min(980px, 94vw);
  max-height: 58vh;
  padding: 12px;
}

.roster-row,
.rtbl-row,
.est-row {
  border: 1px solid rgba(184, 145, 73, 0.28);
  border-radius: 6px;
  background: rgba(255, 253, 240, 0.64);
  color: #3b2b1f;
}

.roster-head,
.rtbl-head {
  background: linear-gradient(180deg, rgba(213, 226, 204, 0.90), rgba(169, 194, 177, 0.88));
  color: #2e493f;
  border-color: rgba(94, 128, 112, 0.42);
}

.roster-row .rn,
.rtbl-name,
.oc-name,
.diplo-head b,
.est-rank-name,
.est-add-title,
.est-page-label,
.roster-pgnum {
  color: #7b4b27;
}

.roster-tabs,
.est-kind-tabs {
  top: 112px;
}

.roster-tab {
  border-color: rgba(185, 145, 72, 0.48);
  background: rgba(244, 237, 213, 0.84);
  color: #594533;
}

.roster-tab.is-on {
  color: #253e35;
}

.roster-pager {
  bottom: 10.5%;
  color: #3b2b1f;
}

.official-card {
  top: clamp(156px, 24vh, 210px);
}

.oc-name .oc-sub,
.oc-stats,
.oc-derived,
.diplo-head,
.diplo-head span,
.diplo-empty,
.diplo-note,
.est-stat,
.est-post,
.est-kind,
.court-note,
.rtbl-count,
.rtbl-empty,
.roster-entry small,
.roster-d-line,
.roster-d-extra,
.roster-attr,
.roster-page {
  color: rgba(56, 42, 29, 0.78);
}



.est-board {
  top: clamp(124px, 16vh, 154px);
  width: min(780px, 88vw);
  max-height: 72vh;
  padding: 14px;
}


.est-add select,
.est-add input,
.portrait-suit-input {
  border-color: rgba(184, 145, 73, 0.40);
  background: rgba(255, 252, 238, 0.76);
  color: #3b2b1f;
}

.sz-screen {
  justify-content: flex-start;
  padding-top: clamp(126px, 16vh, 154px);
}

.sz-body {
  position: relative;
  z-index: 5;
  width: min(820px, 92vw);
  max-width: none;
}

.court-leave {
  right: 5%;
  bottom: 8%;
  z-index: 7;
  min-width: 118px;
  padding: 12px 28px;
  border: 1px solid rgba(139, 73, 54, 0.62);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(169, 76, 58, 0.94), rgba(105, 45, 38, 0.95));
  color: #fff0d2;
  font-size: 16px;
  letter-spacing: 2px;
  box-shadow:
    0 12px 22px rgba(37, 15, 10, 0.28),
    inset 0 0 0 1px rgba(255, 218, 172, 0.18);
}

.court-leave:hover:not(:disabled):not([disabled]) {
  background:
    linear-gradient(180deg, rgba(184, 87, 66, 0.98), rgba(119, 50, 41, 0.98));
  filter: brightness(1.06);
}

.court-speak .dialog-box {
  border-color: rgba(204, 164, 88, 0.58);
  background:
    linear-gradient(180deg, rgba(250, 245, 227, 0.96), rgba(229, 219, 195, 0.94));
  color: #37281e;
  box-shadow: 0 20px 46px rgba(21, 12, 7, 0.36);
}

.court-speak .dialog-box p {
  color: #37281e;
}

.court-speak .dialog-hint {
  color: #80603a;
}

@media (max-width: 980px) {
  .court-screen .topnav-banners {
    top: 0;
    right: 18px;
    gap: 10px;
    height: 206px;
  }

  .court-screen .topbar.has-resources .topnav-banners {
    top: 0;
    left: 300px;
    right: auto;
  }

  .court-screen .navban,
  .court-screen .navban[aria-label="寝宫"] {
    width: 38px;
    height: 206px;
  }

  .court-title-plaque {
    top: 106px;
    min-width: 144px;
    padding: 6px 22px 8px;
  }

  .court-title-plaque span {
    font-size: 19px;
  }

  .court-ministries {
    top: 226px;
    grid-template-columns: repeat(3, minmax(70px, 1fr));
    gap: 52px 20px;
    width: min(520px, 88vw);
  }

  .court-ministry {
    min-height: 178px;
  }

  .court-actions,
  .court-board,
  .diplo-list,
  .est-board,
  .roster,
  .official-card {
    top: 174px;
  }

  .court-speaker,
  .roster-tabs,
  .est-kind-tabs {
    top: 132px;
  }

  .court-screen .resource-strip {
    right: 18px;
  }
}

@media (max-width: 720px) {
  .court-screen {
    overflow-y: auto;
  }

  .court-screen .topbar,
  .court-screen .topbar.has-resources {
    top: 10px;
    left: 10px;
    min-height: 136px;
  }

  .court-screen .topbar-core {
    width: min(360px, calc(100vw - 124px));
    min-width: 260px;
    transform-origin: left top;
  }

  .court-screen .imperial-status img {
    left: 4.75%;
    top: 12.1%;
    width: 18.9%;
    height: 41.1%;
  }

  .court-screen .imperial-status .status-label {
    left: 31.5%;
    top: 45.5%;
  }

  .court-screen .imperial-status .status-value {
    left: 40.5%;
    top: 43.6%;
  }

  .court-screen .time-block {
    left: 31.5%;
    top: 25%;
    width: 58%;
  }

  .court-screen .time-block span {
    font-size: 14px;
  }

  .court-screen .topnav-banners {
    top: 0;
    right: 8px;
    gap: 6px;
    height: 176px;
  }

  .court-screen .navban,
  .court-screen .navban[aria-label="寝宫"] {
    width: 32px;
    height: 176px;
  }

  .court-screen .navban span {
    font-size: 13px;
  }

  .court-screen .resource-strip {
    top: 94px;
    right: 10px;
    transform: scale(0.82);
    transform-origin: right top;
  }

  .court-title-plaque {
    top: 136px;
  }

  .court-ministries {
    top: 236px;
    grid-template-columns: repeat(2, minmax(70px, 1fr));
    gap: 54px 26px;
    padding-bottom: 120px;
  }

  .court-ministry {
    width: 76px;
    min-height: 168px;
    padding-top: 34px;
  }

  .court-actions,
  .court-board,
  .diplo-list,
  .est-board,
  .roster,
  .official-card {
    top: 184px;
    width: calc(100vw - 24px);
    max-height: none;
  }

  .court-actions {
    grid-template-columns: 1fr;
  }

  .court-leave {
    right: 14px;
    bottom: 18px;
  }
}
.favor-card-title { color: var(--rs-deep-text); font-weight: 600; font-size: 17px; }
.favor-card-name { color: rgba(243,233,210,0.78); font-size: 14px; }
.favor-cards-foot { display: flex; justify-content: center; gap: 16px; margin-top: 18px; }
@media (max-width: 640px) { .home-affairs-grid { grid-template-columns: repeat(2, 1fr); } .home-panel-body { top: 16%; max-height: 66vh; } .home-panel-tabs { top: 11%; } .court-speaker { top: 14%; } .roster { top: 20%; max-height: 52vh; } }

/* 续94-UI修复：寝宫 tab 牌匾（无「寝宫」webp → CSS 牌匾，匹配 地点/私宅 描金牌匾样式；尺寸继承 .home-tab 58×104） */
.yangxin-home-v2 .home-tab-text {
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(231,198,137,0.7);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(58,44,34,0.96), rgba(33,24,18,0.97));
  box-shadow: 0 6px 6px rgba(0,0,0,0.22), inset 0 0 0 1px rgba(231,198,137,0.16);
  padding: 0;
}
.yangxin-home-v2 .home-tab-text span {
  writing-mode: vertical-rl; text-orientation: upright;
  color: #f1dca5; font-size: 19px; letter-spacing: 6px; font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.yangxin-home-v2 .home-tab-text.active span,
.yangxin-home-v2 .home-tab-text:disabled span { color: #cdb888; }

/* 2026-07-01：养心殿三层版。层级：背景 -> 动态主控立绘 -> UI 前景。 */
.yangxin-home-v2 {
  background:
    linear-gradient(180deg, rgba(248, 255, 248, 0.12), rgba(12, 18, 18, 0.08)),
    var(--scene-bg) center / 100% 100% no-repeat;
}

.yangxin-home-v2::before,
.home-tone-night.yangxin-home-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  z-index: 24;
  pointer-events: none;
  background: url("./assets/ui/generated/yangxin-layered-ui-foreground-20260701.png") center / 100% 100% no-repeat;
  filter: none;
}

.yangxin-home-v2::after,
.yangxin-home-v2.home-tone-night::after {
  background: transparent;
}

.yangxin-home-v2 .hud,
.yangxin-home-v2 .scene-copy,
.yangxin-home-v2 .court-panel,
.yangxin-home-v2 .detail-panel,
.yangxin-home-v2 .log-panel,
.yangxin-home-v2 .imperial-note {
  display: none;
}


.yangxin-home-v2 .home-topbar {
  z-index: 30;
  height: 100%;
  pointer-events: none;
}



.yangxin-home-v2 .home-date {
  display: flex;
  left: 13%;
  top: 7.0%;
  width: 15%;
  height: 4.6%;
  min-height: 0;
  padding: 0 14px;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  border: 0;
  border-radius: 12px;
  background: rgba(22, 20, 16, 0.88);
  box-shadow: none;
  color: #f7e5ad;
  text-shadow: 0 2px 3px rgba(0,0,0,0.62);
}

.yangxin-home-v2 .home-date strong,
.yangxin-home-v2 .home-date > span {
  display: inline;
  position: static;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
  color: #f7e5ad;
}

.yangxin-home-v2 .home-date small {
  display: none;
}

.yangxin-home-v2 .home-energy {
  left: 17.35%;
  top: 13.9%;
  width: 8.3%;
  height: 3.9%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0 34px 0 12px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  color: #fff1c9;
  box-sizing: border-box;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.62);
}

.yangxin-home-v2 .home-energy small {
  display: none;
}

.yangxin-home-v2 .home-energy strong {
  display: block;
  color: #fff1c9;
  font-family: "Royal Kai", "Songti SC", "STSong", serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.yangxin-home-v2 .home-energy strong::before {
  content: "";
}

.yangxin-home-v2 .home-energy::after {
  content: none;
  position: absolute;
  right: 22px;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translateY(-50%);
  background:
    radial-gradient(circle at 34% 32%, rgba(255, 255, 238, 0.98) 0 16%, rgba(167, 216, 169, 0.96) 17% 58%, rgba(77, 143, 103, 0.96) 59% 100%);
  box-shadow: 0 0 0 2px rgba(235, 247, 213, 0.82), 0 2px 4px rgba(0, 0, 0, 0.34);
}

.yangxin-home-v2 .home-resources {
  display: flex;
  left: 80.0%;
  top: 7.0%;
  width: 8.0%;
  height: 5.8%;
  min-height: 0;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #f8e5ae;
  text-shadow: 0 2px 3px rgba(0,0,0,0.65);
}

.yangxin-home-v2 .home-resources > span {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.yangxin-home-v2 .home-resources strong {
  display: block;
  font-family: "Royal Kai", "Songti SC", "STSong", serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  color: #f8e5ae;
}

/* 续104z3-b·Yan：银两数字紧贴银锭左对齐。treasury 这个 span 是 position:absolute，
   老像素布局(见 2812 块)给它留了 left:112px，把数字推到牌子最右——三层版清零，
   让它落到 .home-resources 盒左(80%·银锭右缘)。上轮只改了父盒没动这个子偏移，故一直偏右。 */
.yangxin-home-v2 .home-resource-treasury {
  left: 0;
}

.yangxin-home-v2 .home-tabs,
.yangxin-home-v2 .action-dock,
.yangxin-home-v2 .home-goout,
.yangxin-home-v2 .side-stack {
  z-index: 34;
}

.yangxin-home-v2 .home-tabs {
  inset: 0;
  display: block;
  gap: 0;
  transform: none;
  pointer-events: none;
}

.yangxin-home-v2 .home-tab,
.yangxin-home-v2 .home-control,
.yangxin-home-v2 .home-exit-button,
.yangxin-home-v2 .side-stack .icon-only {
  position: absolute;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: transparent;
  filter: none;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 120ms ease, outline-color 120ms ease;
}

.yangxin-home-v2 .home-tab img,
.yangxin-home-v2 .home-control img,
.yangxin-home-v2 .home-exit-button img,
.yangxin-home-v2 .side-stack .icon-only img {
  display: none;
}

.yangxin-home-v2 .home-tab span,
.yangxin-home-v2 .home-control span,
.yangxin-home-v2 .home-exit-button span,
.yangxin-home-v2 .side-stack .icon-only span {
  opacity: 0;
}

.yangxin-home-v2 .home-tab:hover:not(:disabled),
.yangxin-home-v2 .side-stack .icon-only:hover {
  background-color: rgba(255, 232, 172, 0.07);
  outline: 1px solid rgba(236, 207, 145, 0.28);
  filter: none;
  transform: none;
}

.yangxin-home-v2 .home-tab:active:not(:disabled),
.yangxin-home-v2 .side-stack .icon-only:active {
  transform: none;
}

/* 续104z-2·Yan：底部八格控件 + 外出 —— 彻底取消点击交互（连柔和高亮也去掉）。
   透明热区浮在烘焙美术层之上，任何 hover/按下反馈都会与图标脱节发飘。此段位列最后，
   压过更早的 .yangxin-home-v2 .home-control:hover(2430/2929) 等块。地点/私宅/菜单不在此列。 */
.yangxin-home-v2 .home-control:hover,
.yangxin-home-v2 .home-control:active,
.yangxin-home-v2 .home-control:focus,
.yangxin-home-v2 .home-control:focus-visible,
.yangxin-home-v2 .home-exit-button:hover,
.yangxin-home-v2 .home-exit-button:active,
.yangxin-home-v2 .home-exit-button:focus,
.yangxin-home-v2 .home-exit-button:focus-visible {
  background: transparent;
  background-color: transparent;
  outline: none;
  filter: none;
  transform: none;
  box-shadow: none;
}



.yangxin-home-v2 .action-dock {
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}


/* 每格点击区对齐到「物件+牌匾」整格中心，宽度随右侧透视收窄；底边止于牌匾根部(≈91%)，不再溢到地面。 */

.yangxin-home-v2 .home-goout {
  right: 0;
  bottom: 1.2%;
  width: 18%;
  height: 42.6%;
  pointer-events: none;
}

.yangxin-home-v2 .home-exit-button {
  inset: 0;
  width: 100%;
  height: 100%;
}

.yangxin-home-v2 .side-stack {
  top: 5.25%;
  right: 2.55%;
  width: 4.9%;
  height: 25.6%;
  display: block;
  gap: 0;
  pointer-events: none;
}


.yangxin-home-v2 .side-stack .icon-only[aria-label="易次元"] {
  display: none;
}

.yangxin-home-v2 .system-drawer {
  top: 8px;
  right: 96px;
  pointer-events: none;
}

.yangxin-home-v2 .system-drawer.is-open {
  pointer-events: auto;
}

.yangxin-home-v2 .ruler-standee {
  inset: 0 12% 14.8% 12%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
  opacity: 1;
  z-index: 12;
  pointer-events: none;
}

.yangxin-home-v2 .ruler-standee img {
  width: min(72vw, 1080px);
  height: auto;
  max-height: 86vh;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.35));
}

.yangxin-home-v2 .home-avatar {
  display: block;
  left: 2.01%;
  top: 4.85%;
  width: 9.26%;
  height: 16.45%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, rgba(238, 232, 210, 0.95) 0 28%, rgba(204, 214, 198, 0.88) 72%, rgba(165, 181, 163, 0.82) 100%);
  box-shadow: none;
  overflow: hidden;
  pointer-events: none;
}

.yangxin-home-v2 .home-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.16);
  transform-origin: center center;
  filter: saturate(0.98) contrast(1.02);
}

@media (max-width: 1350px) {
  .yangxin-home-v2 .home-energy {
    width: 164px;
    height: 34px;
    padding-left: 10px;
    padding-right: 34px;
  }

  .yangxin-home-v2 .home-energy strong {
    font-size: 20px;
  }

  .yangxin-home-v2 .home-energy::after {
    right: 18px;
    width: 13px;
    height: 13px;
  }
}

/* ===== 续94-UI修复(Yan 2026-06-27)：可复用点击交互效果 =====
   Yan 称赞的「地点」按钮那个手感：hover 轻微上浮+提亮，按下回弹缩放。
   做成一套可复用 class —— 任意可点元素加 class="tap-fx" 即获得同一交互效果，无需各自写 CSS。 */
.tap-fx { transition: transform 140ms ease, filter 140ms ease; cursor: pointer; }
.tap-fx:hover:not(:disabled):not([disabled]) { transform: translateY(-2px); filter: brightness(1.1); }
.tap-fx:active:not(:disabled):not([disabled]) { transform: translateY(1px) scale(0.98); }
.tap-fx:disabled, .tap-fx[disabled] { cursor: default; }

/* ===== 续94-UI修复(Yan 2026-06-27)：点击交互「优先使用」可复用效果 =====
   把 .tap-fx 手感设为主要可点按钮类的默认行为（无需逐个加 class）。
   覆盖 palace-btn / court-action / mini-btn / cfg-tab / residence-side-btn / home-affair-btn 等常用钮。 */
.palace-btn, .court-action, .mini-btn, .cfg-tab, .residence-side-btn, .home-affair-btn, .residence-page, .court-leave, .court-action.danger {
  transition: transform 140ms ease, filter 140ms ease;
}
.palace-btn:hover:not(:disabled):not([disabled]),
.court-action:hover:not(:disabled):not([disabled]),
.mini-btn:hover:not(:disabled):not([disabled]),
.cfg-tab:hover:not(:disabled):not([disabled]),
.residence-side-btn:hover:not(:disabled):not([disabled]),
.home-affair-btn:hover:not(:disabled):not([disabled]),
.residence-page:hover:not(:disabled):not([disabled]),
.court-leave:hover:not(:disabled):not([disabled]) {
  transform: translateY(-2px); filter: brightness(1.1);
}
.palace-btn:active:not(:disabled):not([disabled]),
.court-action:active:not(:disabled):not([disabled]),
.mini-btn:active:not(:disabled):not([disabled]),
.cfg-tab:active:not(:disabled):not([disabled]),
.residence-side-btn:active:not(:disabled):not([disabled]),
.home-affair-btn:active:not(:disabled):not([disabled]),
.residence-page:active:not(:disabled):not([disabled]),
.court-leave:active:not(:disabled):not([disabled]) {
  transform: translateY(1px) scale(0.98);
}

/* ── 宣政殿·吏部官员编制（续94·Yan 2026-06-27：补全缺失样式——居中 + 可滚动，修"字挤左边/退不出"） ── */
.est-board { position: absolute; top: 15.5%; left: 50%; transform: translateX(-50%); width: min(720px, 86%); display: flex; flex-direction: column; gap: 10px; max-height: 66vh; z-index: 5; }
.court-screen .est-list { display: flex; flex-direction: column; gap: 8px; padding: 12px 20px; overflow: hidden; max-height: 42vh; background: rgba(22,18,16,0.74); border: 1px solid rgba(231,198,137,0.32); border-radius: 10px; }
.est-pager { display: flex; align-items: center; justify-content: center; gap: 18px; }
.est-page-label { color: #ffe9b8; font-size: 15px; letter-spacing: 3px; min-width: 80px; text-align: center; }
.est-rank { display: flex; flex-direction: column; gap: 8px; }
.est-rank-name { text-align: center; color: #ffe9b8; font-size: 15px; letter-spacing: 3px; border-bottom: 1px solid rgba(231,198,137,0.22); padding-bottom: 5px; }
.est-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 14px; background: rgba(40,32,26,0.6); border: 1px solid rgba(231,198,137,0.18); border-radius: 7px; }
.est-post { flex: 1; text-align: left; color: var(--rs-deep-text); font-size: 15px; letter-spacing: 1px; }
.est-kind { margin-left: 8px; padding: 1px 7px; font-size: 12px; color: #c9b58a; border: 1px solid rgba(231,198,137,0.3); border-radius: 4px; }
.est-stat { min-width: 132px; text-align: center; color: #d9c9a4; font-size: 14px; }
.est-cut { color: #e0a07a; }
.est-ctl { display: flex; gap: 6px; align-items: center; }
.est-btn { min-width: 34px; padding: 6px 11px; background: rgba(60,48,38,0.92); border: 1px solid var(--rs-gold-mid); border-radius: 6px; color: #f6ead1; font-size: 15px; cursor: pointer; }
.est-btn:hover { filter: brightness(1.12); }
.est-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.est-cut-btn { color: #f0c0a0; letter-spacing: 1px; }
.est-add { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; background: rgba(22,18,16,0.82); border: 1px solid rgba(231,198,137,0.3); border-radius: 9px; }
.est-add-title { color: #ffe9b8; font-size: 14px; letter-spacing: 2px; }
.est-add select, .est-add input { padding: 7px 10px; background: rgba(40,32,26,0.9); border: 1px solid rgba(231,198,137,0.4); border-radius: 6px; color: var(--rs-deep-text); font-size: 14px; }
.est-add input[data-est-post] { width: 120px; }
.est-add input[data-est-count] { width: 64px; }
/* 续104m·Yan：国家外交重排——居中宽松列表·每国一行（头部信息 + 邦交按钮行）·不再绝对挤左上 */
.diplo-list { position: absolute; top: 13%; left: 50%; transform: translateX(-50%); width: min(900px, 92%); max-height: 74vh; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 6px 4px; z-index: 5; }
.diplo-intro { margin: 0 0 2px; padding: 8px 14px; background: rgba(22,18,16,0.72); border: 1px solid rgba(231,198,137,0.26); border-radius: 8px; color: #ecd9b0; font-size: 13.5px; line-height: 1.7; letter-spacing: 1px; }
.diplo-row { background: rgba(22,18,16,0.8); border: 1px solid rgba(231,198,137,0.32); border-radius: 10px; padding: 12px 18px; display: flex; flex-direction: column; gap: 9px; }
.diplo-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; color: var(--rs-deep-text); font-size: 14px; }
.diplo-head b { color: #ffe9b8; font-size: 17px; letter-spacing: 2px; margin-right: 4px; }
.diplo-head span { opacity: 0.82; }
.diplo-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.diplo-empty, .diplo-note { margin: 4px 0 0; padding: 10px 14px; color: #ecd9b0; font-size: 14px; opacity: 0.9; text-align: center; }
.diplo-pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 4px; }

/* ── 多案件面板（刑部·朋党/处置官员、后宫求情）：居中流式容器，内部台词/按钮回到块内正常排布，修"多条 court-speaker 绝对定位堆叠在左上看不清"（续94·Yan 2026-06-27） ── */
.court-board { position: absolute; top: 12.5%; left: 50%; transform: translateX(-50%); z-index: 5; width: min(840px, 92%); display: flex; flex-direction: column; gap: 14px; }
.court-board-intro { margin: 0; padding: 11px 18px; background: rgba(22,18,16,0.82); border: 1px solid rgba(231,198,137,0.42); border-radius: 8px; color: #e9dcc0; font-size: 14px; line-height: 1.7; text-align: center; letter-spacing: 1px; }
.court-board .punish-case { background: rgba(22,18,16,0.78); border: 1px solid rgba(231,198,137,0.3); border-radius: 10px; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.court-board .court-speaker { position: static; transform: none; left: auto; top: auto; max-width: none; margin: 0; background: none; border: none; padding: 0; text-align: center; }
.court-board .court-actions { position: static; transform: none; left: auto; top: auto; width: auto; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ── 通用名册面板（renderRosterPanel）左列翻页条（续94·替代滚动） ── */
.roster-pgnav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 10px; padding-top: 8px; }
.roster-pgbtn { padding: 8px 18px; background: rgba(60,48,38,0.92); border: 1px solid var(--rs-gold-mid); border-radius: 6px; color: #f6ead1; font-size: 14px; letter-spacing: 1px; cursor: pointer; }
.roster-pgbtn:hover { filter: brightness(1.12); }
.roster-pgbtn:disabled { opacity: 0.4; cursor: not-allowed; }
.roster-pgnum { color: #ffe9b8; font-size: 14px; letter-spacing: 2px; min-width: 56px; text-align: center; }

/* 续95 宿世之缘候选标记（选秀小选卡片） */

/* 续104b：选秀殿选＝2 行 × 5 列卡网格（照「选秀殿选界面」参考图）。
   原 `.xuanxiu-grid/.xuanxiu-card/.xuanxiu-portrait/.xuanxiu-origin/.xuanxiu-name` 全无 CSS →
   10 张卡塞进窄盒 .xuanxiu-roster(560px) 挤成一团；改用宽容器 .xuanxiu-select + grid 五列。overflow:hidden 守无滚动。 */
.xuanxiu-select {
  position: absolute; top: 10%; left: 50%; transform: translateX(-50%);
  width: min(1320px, 95%); max-height: 84vh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 5;
}
.xuanxiu-select .court-speaker { margin: 0; text-align: center; }
.xuanxiu-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; width: 100%; }
.xuanxiu-card {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px;
  border: 1px solid rgba(231,198,137,0.3); border-radius: 8px;
  background: linear-gradient(180deg, rgba(40,27,22,0.62), rgba(22,18,16,0.74));
}
.xuanxiu-portrait {
  width: 100%; height: 150px; border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(231,198,137,0.18);
  background: linear-gradient(160deg, rgba(60,48,40,0.6), rgba(30,24,20,0.72));
  display: flex; align-items: center; justify-content: center;
  color: rgba(243,233,210,0.45); font-size: 12px;
}
.xuanxiu-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.xuanxiu-origin {
  width: 100%; box-sizing: border-box; text-align: center; padding: 4px 6px; border-radius: 5px;
  background: rgba(20,16,14,0.5); color: rgba(243,233,210,0.85); font-size: 13px; letter-spacing: 1px;
}
.xuanxiu-origin.is-fated { color: var(--rs-gold-text); font-weight: 600; letter-spacing: 2px; background: rgba(115,72,45,0.42); }
.xuanxiu-name { color: var(--rs-deep-text); font-size: 14px; letter-spacing: 1px; }
.xuanxiu-card-actions { display: flex; gap: 6px; width: 100%; justify-content: center; }
.xuanxiu-card-actions .court-action { padding: 5px 0; font-size: 13px; flex: 1; min-width: 0; }
.xuanxiu-card-state { color: var(--rs-gold-strong); font-size: 13px; padding: 5px 0; }
@media (max-width: 900px) {
  .xuanxiu-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .xuanxiu-portrait { height: 104px; }
  .xuanxiu-card { padding: 6px; gap: 4px; }
  .xuanxiu-origin, .xuanxiu-name { font-size: 12px; }
}

/* 续95b 多档存档面板 */
.save-list { display: flex; flex-direction: column; gap: 10px; max-width: 720px; margin: 0 auto; }
.save-slot { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid rgba(201,160,74,.35); border-radius: 8px; background: rgba(0,0,0,.18); }
.save-slot.is-filled { border-color: rgba(201,160,74,.6); }
.save-slot.is-quick { border-style: dashed; }
.save-slot-no { flex: 0 0 68px; font-weight: 600; color: #c9a04a; }
.save-slot-info { flex: 1 1 auto; font-size: 13px; opacity: .9; }
.save-slot-acts { flex: 0 0 auto; display: flex; gap: 6px; }
.save-slot-acts .court-action { padding: 4px 10px; font-size: 13px; }
.save-slot-acts .save-del { opacity: .8; }
.save-empty { opacity: .5; font-size: 13px; }

/* ② 续96：储秀宫候选名册分类列（秀女 / 良家子）——照临帝阙储秀宫左侧分类列 */
.xiu-layout{display:flex;gap:14px;align-items:flex-start}
.xiu-cats{display:flex;flex-direction:column;gap:10px;flex:0 0 auto}
.xiu-cat{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:68px;padding:12px 10px;border-radius:12px;border:1px solid rgba(160,120,60,.35);background:rgba(40,28,18,.45);color:#e8d9bf;cursor:pointer;font-size:15px;transition:border-color .15s,background .15s}
.xiu-cat small{font-size:11px;opacity:.65;font-weight:normal}
.xiu-cat:hover{border-color:rgba(200,160,90,.6);background:rgba(60,42,26,.6)}
.xiu-cat.on{border-color:#c9a24b;background:rgba(120,84,40,.55);color:#fff;box-shadow:inset 0 0 0 1px rgba(201,162,75,.5)}
.xiu-main{flex:1 1 auto;min-width:0}
/* 续104t：储秀宫·进殿拜访视图（立绘 + 动作列·居中·无滚动）。美术质感归 Codex，本块给可用功能布局。 */
.xiu-visit{display:flex;gap:24px;align-items:center;justify-content:center;flex-wrap:wrap;max-width:760px;margin:0 auto}
.xiu-visit-main{display:flex;flex-direction:column;gap:12px;min-width:240px;max-width:380px;flex:1 1 280px}
.xiu-visit-status{font-size:13px;opacity:.82;line-height:1.6;margin:0}
.xiu-visit-acts{display:flex;flex-direction:column;gap:10px}
.xiu-visit-subh{font-size:15px;color:#e8d9bf;margin-bottom:2px;text-align:center}

/* ① 续96d：AI 台词设置面板（续102：padding-top 让出绝对定位顶栏+标题，修字被遮） */
.court-screen.ai-set-screen { display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; padding: 128px 0 92px; }
.ai-set-body{max-width:680px;width:100%;margin:0 auto;padding:0 16px;display:flex;flex-direction:column;gap:14px;overflow-y:hidden;box-sizing:border-box;max-height:100%}
.ai-set-sec{background:rgba(30,22,14,.4);border:1px solid rgba(160,120,60,.28);border-radius:12px;padding:12px 14px}
.ai-set-warn{background:rgba(90,40,20,.32);border-color:rgba(200,120,70,.4)}
.ai-set-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ai-set-h{font-size:14px;color:#e8d9bf;margin:0 0 8px;font-weight:600}
.ai-set-h b{color:#c9a24b;font-weight:600}
.ai-set-note{font-size:12px;line-height:1.6;color:#bda988;margin:8px 0 0}
.ai-set-keys,.ai-set-model{width:100%;box-sizing:border-box;background:rgba(20,14,8,.6);border:1px solid rgba(160,120,60,.4);border-radius:8px;color:#f0e6d2;padding:8px 10px;font-size:13px;font-family:inherit;resize:vertical}
.ai-set-keys{min-height:90px;line-height:1.5}
.ai-set-keys:focus,.ai-set-model:focus{outline:none;border-color:#c9a24b}
/* 续104j item1：AI 设置屏的 .court-actions 误用了全屏菜单的绝对定位(top:23%)而盖住密钥框。此处归回正常流，作 body 底部居中按钮行。 */
.ai-set-screen .court-actions{position:static;transform:none;left:auto;top:auto;width:auto;display:flex;flex-wrap:wrap;gap:12px;justify-content:center;z-index:auto;margin-top:4px}
/* 续104j item2：存档面板编号档分页器（快速档恒置顶·全局禁滚动→翻页） */
.saves-pager{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:6px}
.saves-page-ind{font-size:13px;color:#bda988}
/* 续104j item4：人物详情·查看家族（出生家庭+子女+配偶·翻页） */
.persona-family{display:flex;flex-direction:column;gap:8px}
.fam-group{font-size:13px;color:#c9a04a;font-weight:600;margin-top:6px;border-bottom:1px solid rgba(201,160,74,.28);padding-bottom:4px}
.fam-group:first-child{margin-top:0}
.fam-group small{color:#bda988;font-weight:400}
.fam-row{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;padding:6px 10px;border:1px solid rgba(201,160,74,.22);border-radius:8px;background:rgba(0,0,0,.16)}
.fam-rel{flex:0 0 40px;color:#c9a04a;font-weight:600}
.fam-name{flex:0 0 auto;color:#f0e6d2;font-weight:600}
.fam-meta{flex:1 1 auto;font-size:13px;color:#cdbb98}
.fam-attrs{flex:1 1 100%;font-size:12px;color:#a99b7d}
.fam-pager{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:6px}
.fam-page-ind{font-size:13px;color:#bda988}
.ai-toggle.on{background:rgba(120,84,40,.6);color:#fff;border-color:#c9a24b}

/* ===== 2026-06-28 全局 UI 美术第一批：顶栏 / 按钮 / 对话框 / 后宫 ===== */
.topbar {
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
  width: max-content;
  max-width: calc(100vw - 48px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f6ecd2;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

.topbar.has-resources {
  width: 100%;
  justify-content: space-between;
}

.topbar-core {
  pointer-events: none;
  position: relative;
  display: block;
  width: clamp(360px, 30vw, 480px);
  max-width: min(480px, calc(100vw - 48px));
  aspect-ratio: 1787 / 648;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/visit/status-plaque.png") left center / 100% 100% no-repeat;
  box-shadow: none;
  backdrop-filter: none;
  filter: drop-shadow(0 10px 14px rgba(24, 16, 9, 0.28));
}
/* 荷花状态牌·安全文本区（沿用拜访页 visit-status-text 定位·续104zt58） */
.topbar-core .sph-text {
  position: absolute; left: 32%; right: 20%; top: 16%; bottom: 56%;
  display: flex; flex-direction: column; justify-content: space-between; text-align: left;
}
.topbar-core .sph-date { color: #6b4a20; font-size: clamp(11px, 0.95vw, 16px); letter-spacing: 0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; display: block; }
.topbar-core .sph-energy { color: #8a5a24; font-size: clamp(11px, 0.88vw, 15px); font-weight: 600; white-space: nowrap; line-height: 1.15; display: block; }

.court-screen .topbar {
  top: 18px;
  left: 22px;
  right: 22px;
  width: auto;
  z-index: 6;
}

.court-screen .topbar + .court-head {
  top: 86px;
}

.imperial-status {
  min-width: 100px;
  padding: 3px 9px 3px 4px;
  border: 1px solid rgba(226, 198, 139, 0.28);
  border-radius: 6px;
  background: rgba(255, 246, 220, 0.08);
}

.brand-block img {
  width: 38px;
  height: 38px;
  border-color: rgba(226, 198, 139, 0.62);
  background: rgba(30, 25, 21, 0.72);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}

.status-label,
.brand-block span,
.time-block small,
.resource-pill em {
  color: rgba(232, 204, 148, 0.9);
  font-size: 12px;
  letter-spacing: 0;
  font-style: normal;
}

.status-value,
.time-block span,
.resource-pill strong {
  color: #fff4d9;
  font-weight: 700;
  letter-spacing: 0;
}

.status-value {
  font-size: 18px;
}

.time-block {
  gap: 2px 10px;
}

.time-block span {
  font-size: 16px;
}

.time-block small {
  flex-basis: 100%;
  color: rgba(232, 204, 148, 0.72);
}

.resource-strip {
  pointer-events: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.resource-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 38px;
  padding: 7px 13px 7px 12px;
  border: 1px solid rgba(226, 198, 139, 0.48);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(42, 31, 22, 0.78), rgba(21, 16, 13, 0.86)),
    linear-gradient(90deg, rgba(196, 157, 76, 0.18), rgba(80, 106, 98, 0.08));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 241, 196, 0.08);
  backdrop-filter: blur(10px);
}

@media (max-width: 720px) {
  .topbar,
  .topbar.has-resources {
    max-width: calc(100vw - 24px);
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .topbar-core {
    max-width: calc(100vw - 24px);
  }

  .court-screen .topbar {
    top: 12px;
    left: 12px;
    right: 12px;
  }

  .court-screen .topbar + .court-head {
    top: 110px;
  }
}

.palace-btn,
.court-action,
.mini-btn,
.cfg-tab,
.residence-side-btn,
.home-affair-btn,
.residence-page {
  border: 1px solid rgba(219, 191, 130, 0.76);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(250, 240, 210, 0.96), rgba(185, 150, 88, 0.91)),
    linear-gradient(90deg, rgba(39, 73, 68, 0.12), rgba(119, 43, 38, 0.1));
  color: #37261b;
  box-shadow: 0 7px 14px rgba(20, 16, 13, 0.24), inset 0 0 0 1px rgba(255, 252, 232, 0.42);
  text-shadow: none;
}

.palace-btn:hover:not(:disabled):not([disabled]),
.court-action:hover:not(:disabled):not([disabled]),
.mini-btn:hover:not(:disabled):not([disabled]),
.cfg-tab:hover:not(:disabled):not([disabled]),
.residence-side-btn:hover:not(:disabled):not([disabled]),
.home-affair-btn:hover:not(:disabled):not([disabled]),
.residence-page:hover:not(:disabled):not([disabled]) {
  border-color: #f2d38e;
  background:
    linear-gradient(180deg, rgba(255, 246, 220, 0.98), rgba(205, 169, 99, 0.95)),
    linear-gradient(90deg, rgba(45, 88, 80, 0.14), rgba(133, 48, 40, 0.12));
}

.palace-btn:disabled,
.palace-btn[disabled],
.court-action:disabled,
.court-action[disabled],
.mini-btn:disabled,
.mini-btn[disabled] {
  opacity: 0.48;
  color: rgba(58, 44, 30, 0.66);
  filter: grayscale(0.18);
  cursor: not-allowed;
}

.palace-btn small,
.court-action small {
  color: rgba(67, 48, 31, 0.7);
  font-size: 12px;
}

.palace-btn-danger,
.pb-danger,
.court-action.danger {
  border-color: rgba(168, 74, 62, 0.78);
  background: linear-gradient(180deg, rgba(116, 43, 38, 0.96), rgba(74, 29, 27, 0.95));
  color: #ffe6d5;
  box-shadow: 0 7px 16px rgba(38, 10, 8, 0.34), inset 0 0 0 1px rgba(240, 165, 135, 0.22);
}

.court-leave,
.loc-back {
  border-radius: 8px;
  border-color: rgba(74, 97, 88, 0.68);
  background: linear-gradient(180deg, rgba(42, 75, 68, 0.96), rgba(24, 43, 41, 0.96));
  color: #f7ead0;
}

.palace-list.palace-col {
  padding: 12px;
  border: 1px solid rgba(225, 199, 143, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 39, 37, 0.5), rgba(51, 31, 24, 0.46));
  box-shadow: 0 14px 30px rgba(10, 8, 6, 0.22);
}

.dialog-screen {
  background: linear-gradient(180deg, rgba(10, 8, 7, 0.08), rgba(10, 8, 7, 0.34));
}

.dialog-box {
  left: 50%;
  right: auto;
  bottom: 28px;
  width: min(1080px, calc(100vw - 56px));
  min-height: 148px;
  transform: translateX(-50%);
  padding: 24px 34px 22px 118px;
  border: 1px solid rgba(229, 202, 142, 0.74);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(37, 34, 31, 0.94), rgba(22, 26, 24, 0.96)),
    linear-gradient(90deg, rgba(76, 38, 34, 0.22), rgba(42, 81, 74, 0.18));
  color: #f6ecd5;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.48), inset 0 0 0 1px rgba(255, 246, 210, 0.1);
  font-family: "Songti SC", "STSong", "PingFang SC", serif;
}

.dialog-box::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 24px;
  bottom: 24px;
  width: 58px;
  border-radius: 8px;
  border: 1px solid rgba(223, 193, 124, 0.5);
  background: linear-gradient(180deg, rgba(180, 142, 72, 0.82), rgba(74, 47, 31, 0.86));
}

.dialog-name {
  position: absolute;
  left: 28px;
  top: 50%;
  width: 58px;
  transform: translateY(-50%);
  color: #fff3cf;
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0;
}

.dialog-box p {
  max-width: none;
  font-size: 19px;
  line-height: 1.82;
  letter-spacing: 0;
}

.dialog-hint {
  color: #d9bd7b;
  letter-spacing: 0;
}

.dialog-verdict {
  border-color: rgba(238, 202, 120, 0.88);
}

.dialog-danger {
  border-color: rgba(190, 88, 72, 0.82);
}

.harem-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(18, 22, 21, 0.5), rgba(18, 22, 21, 0.14) 38%, rgba(18, 22, 21, 0.42)),
    linear-gradient(0deg, rgba(16, 12, 10, 0.58), rgba(16, 12, 10, 0.08) 55%, rgba(16, 12, 10, 0.34));
}

.harem-screen .harem-layout {
  padding: 156px 30px 0;
}

.harem-screen .harem-actions {
  top: 100px;
  right: 28px;
}

.harem-screen > .harem-cards {
  position: relative;
  z-index: 4;
  max-height: none;
  padding: 156px 30px 92px;
  /* 续104zt42（Yan）：紧挨左侧品级列的宫殿框改为居中——每行框在填充区内水平居中，
     不再从左侧起排。align-content 居中让整体框组在垂直方向也不贴顶。 */
  justify-content: center;
  align-content: center;
}

/* 续104zt65（Yan 纠偏 + 纵向居中）：后宫总览(renderHarem)的宫殿卡在 `.harem-layout` 里·非 `.harem-screen` 直子，
   故 zt42 的 `.harem-screen > .harem-cards` 一直没命中它（只命中单宫殿列表屏的殿卡）→ 总览卡区仍靠左靠上。
   这里命中总览卡区：justify-content 水平居中 + align-content 纵向居中；.court-screen 是 min-height:100vh 块级、
   卡区默认不撑满纵向 → 补 min-height:calc(100vh - 156px)〈156px=.harem-layout 顶栏留白·底部由卡区自带 padding-bottom〉
   让卡区撑满视口下半、纵向有空间可居中（min < 基类 max-height calc(100vh-118px)·不冲突）。 */
.harem-screen .harem-layout > .harem-cards {
  justify-content: center;
  align-content: center;
  min-height: calc(100vh - 156px);
  box-sizing: border-box;
}

.harem-screen .harem-cards-halls {
  padding-top: 156px;
}

.harem-screen .harem-pager {
  padding-top: 150px;
}

.harem-screen .cere-wrap {
  padding-top: 154px;
}

.harem-side {
  padding: 10px;
  border: 1px solid rgba(228, 199, 140, 0.24);
  border-radius: 8px;
  background: rgba(23, 42, 39, 0.46);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.harem-side .palace-col-btn {
  border-color: rgba(219, 191, 130, 0.76);
  background:
    linear-gradient(180deg, rgba(250, 240, 210, 0.96), rgba(185, 150, 88, 0.91)),
    linear-gradient(90deg, rgba(39, 73, 68, 0.12), rgba(119, 43, 38, 0.1));
  color: #37261b;
  box-shadow: 0 7px 14px rgba(20, 16, 13, 0.24), inset 0 0 0 1px rgba(255, 252, 232, 0.42);
}

.harem-side .palace-col-btn.is-active {
  background: linear-gradient(180deg, rgba(47, 88, 78, 0.96), rgba(29, 54, 50, 0.96));
  color: #f8ecd2;
  border-color: rgba(236, 207, 145, 0.82);
}

.harem-card {
  width: 178px;
  min-height: 286px;
  padding: 12px;
  border-radius: 8px;
  border-color: rgba(225, 199, 143, 0.44);
  background:
    linear-gradient(180deg, rgba(247, 239, 216, 0.92), rgba(192, 162, 105, 0.84)),
    linear-gradient(90deg, rgba(43, 91, 82, 0.12), rgba(125, 48, 42, 0.1));
  color: #38281c;
  box-shadow: 0 14px 26px rgba(15, 12, 9, 0.26), inset 0 0 0 1px rgba(255, 252, 232, 0.38);
}

.harem-portrait {
  height: 168px;
  border-radius: 8px;
  border-color: rgba(124, 91, 48, 0.28);
  background:
    linear-gradient(160deg, rgba(225, 213, 182, 0.86), rgba(105, 132, 121, 0.52)),
    linear-gradient(0deg, rgba(56, 38, 28, 0.16), rgba(255, 249, 230, 0.18));
  color: rgba(64, 46, 31, 0.62);
  overflow: hidden;
  position: relative;
}

.harem-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  filter: drop-shadow(0 8px 10px rgba(42, 28, 18, 0.24));
}

.harem-building {
  background:
    linear-gradient(160deg, rgba(202, 220, 206, 0.85), rgba(86, 119, 116, 0.56)),
    linear-gradient(0deg, rgba(41, 62, 59, 0.14), rgba(255, 250, 228, 0.18));
}

.hcard-meta,
.hcard-name {
  color: rgba(60, 44, 29, 0.78);
}

.hcard-rank {
  background: rgba(73, 103, 92, 0.16);
  border-radius: 6px;
}

.hcard-title {
  color: #38281c;
}

.consort-status,
.bureau-sec,
.roster-detail,
.roster-entry,
.ew-card,
.sz-rrow,
.sz-cand {
  border-radius: 8px;
  border-color: rgba(226, 198, 139, 0.34);
  background: rgba(30, 34, 30, 0.76);
}

.xiu-cat {
  border-radius: 8px;
  background: rgba(247, 238, 212, 0.85);
  color: #3c2a1d;
}

.xiu-cat.on {
  background: linear-gradient(180deg, rgba(46, 83, 75, 0.95), rgba(30, 52, 48, 0.96));
  color: #f8ecd2;
}

.xiu-enfeoff-btn,
.xiu-title-btn {
  border-color: rgba(70, 110, 98, 0.72);
}

/* 品级 redo (续97c)：储秀宫册封·择位分（照妃嫔品级权威表：品级/门槛/用度/人数） */
.xiu-rank-list{display:flex;flex-direction:column;gap:6px;max-height:46vh;overflow-y:hidden;padding:2px}
.xiu-rank-pick{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:8px 12px;border-radius:8px;border:1px solid rgba(160,120,60,.35);background:rgba(40,28,18,.5);color:#f0e6d2;cursor:pointer}
.xiu-rank-pick:hover:not(:disabled){border-color:#c9a24b;background:rgba(70,48,28,.6)}
.xiu-rank-pick:disabled{opacity:.42;cursor:not-allowed}
.xiu-rank-pager{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:8px;color:#f0e6d2;font-size:14px}
.xiu-rank-pin{flex:0 0 auto;min-width:50px;text-align:center;font-size:12px;padding:2px 6px;border-radius:6px;background:rgba(120,84,40,.45);color:#e8d2a6}
.xiu-rank-name{flex:0 0 auto;min-width:46px;font-size:16px}
.xiu-rank-meta{flex:1 1 auto;text-align:right;font-size:12px;color:#bda988}

/* ===== 续104 立绘集成（取自 Yan 立绘版·persona 立绘选择器 UI / 妃嫔互动立绘 / 召幸卡立绘）===== */
/* 右栏：立绘 + 按钮 */
.persona-portrait { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px; background: rgba(20,16,14,0.4); border-left: 1px solid rgba(231,198,137,0.2); align-items: center; }
.persona-standee { width: 184px; height: 300px; border: 1px solid rgba(231,198,137,0.3); border-radius: 10px; background: linear-gradient(160deg, rgba(60,46,38,0.6), rgba(30,22,18,0.6)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.persona-standee img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; display: block; }
.persona-standee-empty { align-self: center; color: rgba(243,233,210,0.48); font-size: 13px; }
.persona-portrait .palace-btn { width: 100%; }
.persona-back { letter-spacing: 0; }
.portrait-picker { position: fixed; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(10,8,7,0.56); box-sizing: border-box; }
.portrait-picker-panel { width: min(920px, 94vw); max-height: 88vh; border: 1px solid var(--rs-gold-dim); border-radius: var(--rs-r-m); background: linear-gradient(180deg, var(--rs-paper-bright), var(--rs-paper-deep)); box-shadow: inset 0 0 0 3px rgba(250,244,228,.9), inset 0 0 0 4px rgba(197,155,86,.5), var(--rs-shadow-pop); overflow: hidden; }
.portrait-picker-head { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid rgba(154,123,79,.4); color: var(--rs-ink); }
.portrait-picker-head b { color: var(--rs-ink-strong); font-family: var(--rs-font-kai); letter-spacing: 3px; }
.portrait-picker-head span { color: var(--rs-ink-faint); font-size: 14px; }
.portrait-picker-body { display: grid; grid-template-columns: 230px 1fr; min-height: 440px; max-height: calc(88vh - 54px); }
.portrait-lib-list { display: flex; flex-direction: column; gap: 8px; padding: 14px; overflow-y: auto; border-right: 1px solid rgba(154,123,79,.35); background: rgba(228,211,174,.38); }
.portrait-lib-btn { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid rgba(154,123,79,.45); border-radius: var(--rs-r-s); background: rgba(250,244,228,.72); color: var(--rs-ink-soft); cursor: pointer; text-align: left; transition: border-color .12s ease, background .12s ease; }
.portrait-lib-btn:hover { border-color: var(--rs-gold); background: rgba(250,244,228,.95); }
.portrait-lib-btn.is-active { border-color: var(--rs-jade-deep); background: rgba(255,253,244,.96); color: var(--rs-ink); box-shadow: inset 0 0 0 1px rgba(79,117,106,.4); }
.portrait-lib-btn small { color: var(--rs-ink-faint); white-space: nowrap; }
.portrait-pick-main { display: grid; grid-template-columns: minmax(230px, 300px) 1fr; gap: 18px; padding: 18px; align-items: center; }
.portrait-preview { height: 390px; border: 1px solid var(--rs-gold-dim); border-radius: var(--rs-r-s); background: radial-gradient(circle at center 30%, rgba(64,74,66,0.5), rgba(24,26,22,0.92)); box-shadow: inset 0 0 0 1px rgba(224,195,132,.22); display: flex; align-items: center; justify-content: center; overflow: hidden; color: rgba(243,233,210,0.54); }
.portrait-preview img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; display: block; }
.portrait-meta { display: flex; flex-direction: column; gap: 10px; color: var(--rs-ink-soft); font-size: 14px; }
.portrait-meta b { color: var(--rs-cinnabar); }
.portrait-controls, .portrait-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.portrait-controls label { display: inline-flex; align-items: center; gap: 8px; color: var(--rs-ink-soft); }
.portrait-suit-input { width: 88px; padding: 10px 8px; border: 1px solid var(--rs-gold-dim); border-radius: var(--rs-r-s); background: rgba(255,253,244,.92); color: var(--rs-ink); font-size: 15px; }
.consort-visit-standee { position: absolute; left: 50%; right: auto; bottom: 0; transform: translateX(-50%); width: min(72vw, 940px); height: calc(100vh - 116px); display: flex; align-items: flex-end; justify-content: center; pointer-events: none; z-index: 1; }
.consort-visit-standee img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 18px 24px rgba(0,0,0,0.48)); }
.consort-visit-standee.is-empty span { align-self: center; padding: 10px 14px; border: 1px solid rgba(231,198,137,0.3); border-radius: 7px; color: rgba(243,233,210,0.56); background: rgba(20,16,14,0.55); }
@media (max-width: 720px) {
  .persona-frame { flex-direction: column; max-height: 92vh; overflow-y: hidden; }
  .persona-rail { flex-direction: row; }
  .persona-rail-btn { writing-mode: horizontal-tb; letter-spacing: 2px; }
  .persona-portrait { width: 100%; border-left: none; border-top: 1px solid rgba(231,198,137,0.2); }
  .persona-standee { height: 200px; }
  .persona-attrs { grid-template-columns: repeat(3, 1fr); }
  .portrait-picker-body { grid-template-columns: 1fr; }
  .portrait-lib-list { max-height: 150px; border-right: none; border-bottom: 1px solid rgba(231,198,137,0.2); }
  .portrait-pick-main { grid-template-columns: 1fr; }
  .portrait-preview { height: 280px; }
  .consort-visit-standee { left: 50%; width: 94vw; height: 58vh; opacity: 0.92; }
}

.favor-card-portrait { width: 100%; height: 168px; border-radius: 8px; border: 1px solid rgba(231,198,137,0.22); background: linear-gradient(160deg, rgba(225,213,182,0.42), rgba(105,132,121,0.28)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.favor-card-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center center; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.28)); }

/* ═══ 续104z9（Yan）：查看皇室/家族·一排立绘卡片信息屏（照参考图排版）。皇室/家族共用。全局禁滚动→定高卡片行·满5张翻页 ═══ */
.court-screen.member-info-screen { display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; padding: 120px 3% 92px; }
.member-info { display: flex; flex-direction: column; align-items: center; gap: 1.8vh; width: 100%; }
.member-info-title { padding: 9px 46px; background: linear-gradient(180deg, rgba(233,225,199,0.97), rgba(214,204,172,0.97)); border: 1px solid var(--rs-gold-mid); border-radius: 7px; color: #5a3d1a; letter-spacing: 6px; font-size: clamp(15px, 2.1vh, 21px); box-shadow: 0 4px 12px rgba(0,0,0,0.28), inset 0 0 0 1px rgba(157,184,159,0.5); }
.member-card-row { display: flex; justify-content: center; align-items: stretch; gap: clamp(10px, 1.3vw, 22px); width: 100%; height: min(64vh, 640px); }
.member-card { flex: 0 1 min(19%, 246px); min-width: 0; display: flex; flex-direction: column; background: linear-gradient(170deg, rgba(58,44,36,0.55), rgba(26,19,16,0.6)); border: 1px solid rgba(176,141,87,0.5); border-radius: 9px; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.member-card-label { flex: 0 0 auto; text-align: center; padding: 7px 4px; background: linear-gradient(180deg, #6b2f26, #532620); color: #f6ead1; letter-spacing: 2px; font-size: clamp(13px, 1.7vh, 17px); border-bottom: 1px solid var(--rs-gold-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-card-portrait { position: relative; flex: 1 1 auto; min-height: 0; background: linear-gradient(180deg, #23324a 0%, #1a1410 100%); overflow: hidden; }
.member-card-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.member-portrait-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(243,233,210,0.45); font-size: 13px; }
.member-card-name { flex: 0 0 auto; text-align: center; padding: 8px 5px; background: rgba(28,20,16,0.94); border-top: 1px solid rgba(176,141,87,0.4); color: #f4e8c5; font-size: clamp(13px, 1.7vh, 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 续104zt63·Yan：加入选秀——每名适龄闺秀卡片内一颗（按钮复用 .mini-btn·此处仅卡内定位·贴名字行下方作卡脚） */
.member-card-enlist { flex: 0 0 auto; text-align: center; padding: 6px 5px 8px; background: rgba(28,20,16,0.94); border-top: 1px solid rgba(176,141,87,0.3); }
.member-card-enlist .mini-btn { padding: 5px 14px; font-size: 13px; letter-spacing: 1px; }
.member-info-empty { color: rgba(243,233,210,0.55); font-size: 15px; padding: 6vh 0; }
.member-info-pager { display: flex; align-items: center; gap: 16px; }
.member-info-navbtn { padding: 9px 26px; border: 1px solid var(--rs-gold-mid); border-radius: 6px; background: linear-gradient(180deg, rgba(226,218,192,0.96), rgba(202,192,160,0.96)); color: #5a3d1a; letter-spacing: 3px; font-size: 15px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(157,184,159,0.45); }
.member-info-navbtn:hover:not(:disabled) { filter: brightness(1.12); }
.member-info-navbtn:disabled { opacity: 0.4; cursor: default; }
.member-info-pageind { color: var(--rs-gold-text); font-size: 14px; letter-spacing: 1px; }
.member-info-foot { display: flex; justify-content: center; }
.member-info-footbtn { padding: 11px 32px; border: 1px solid var(--rs-gold-mid); border-radius: 6px; background: linear-gradient(180deg, rgba(226,218,192,0.96), rgba(202,192,160,0.96)); color: #5a3d1a; letter-spacing: 3px; font-size: 16px; cursor: pointer; box-shadow: 0 6px 14px rgba(0,0,0,0.24), inset 0 0 0 1px rgba(157,184,159,0.45); }
.member-info-footbtn:hover { filter: brightness(1.12); }

/* 续104za：查看家族卡片·本人高亮（该妃嫔/秀女在自家名册中的那张卡） */
.member-card.is-self { box-shadow: 0 0 0 2px var(--rs-gold-text), 0 8px 22px rgba(0,0,0,0.4); }

/* ============================================================================
   续104zo · 拜访系统统一 UI（visit-*）——一套系统·两态。
   基准 1600×900，全部换算为 vw/vh 百分比（按坐标 ÷1600 / ÷900）。
   素材 assets/ui/visit/ 为透明青瓷金饰件，box 宽高比＝素材比，background-size:100% 100% 不失真。
   全局禁滚动：动作签靠数量自适应(中置/压缩)绝不出滚动条。DOM 只出文本压在美术上。
   ============================================================================ */

.visit-screen {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;                 /* 铁律：拜访屏一律不滚动 */
  background: var(--scene-bg) center/cover no-repeat, #1a1410;
}
/* 背景时辰光影层（--scene-bg 已在 main 背景；此层供压暗/提亮·仅换光影不移按钮） */
.visit-screen .visit-bg {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(10,8,6,0.10) 0%, rgba(10,8,6,0.02) 40%, rgba(10,8,6,0.28) 100%);
  pointer-events: none;
}

/* —— 中央立绘 —— 立绘 PNG 多为 1280×720 透明画布；人物本体不一定在画布正中。
   拜访页最终由文件末尾 NPC 填框规则覆盖为整屏人物层，并按人物脸部重心微调到画面中轴线。 */
.visit-screen .visit-standee {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0; top: auto;
  width: min(64vw, 900px); height: calc(100vh - 96px);
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none; z-index: 1;
}
.visit-screen .visit-standee img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 18px 26px rgba(0,0,0,0.5));
}
.visit-screen .visit-standee.is-empty { align-items: center; }
.visit-screen .visit-standee.is-empty span {
  padding: 10px 16px; border: 1px solid rgba(231,198,137,0.32); border-radius: 8px;
  color: rgba(243,233,210,0.6); background: rgba(20,16,14,0.55); font-size: 15px;
}

/* —— 左上状态牌（x24 y20 w360 h130 → 1.5% / 2.2% / 22.5% / 14.4%；素材比 2.758→box 高≈w×0.363） —— */
.visit-status-plaque {
  position: absolute; left: 1.5%; top: 2.2%;
  width: 23%; height: 8.35vw;            /* 23vw × 0.363 ≈ 8.35vw；用 vw 锁比防拉伸 */
  min-height: 76px; max-height: 132px;
  background: url("./assets/ui/visit/status-plaque.png") left center/100% 100% no-repeat;
  z-index: 6;
}
/* 续104zt·返工⑤（Yan：两行字中轴分别对齐两颗实心菱形中轴）：素材实测两颗◆竖直中心在牌高 23% / 37%。
   盒中心置 30%（top:18% bottom:58% → 跨18~42%·中心30%），两行用 grid 上下留白撑开·行距调到使
   两行中心分别落 23% / 37%（≈牌高14% 间距）。左右仍 32%/20%（让开菱形·日期不截断）。 */
.visit-status-plaque .visit-status-text {
  position: absolute;
  left: 32%; right: 20%; top: 16%; bottom: 56%;
  display: flex; flex-direction: column; justify-content: space-between;
  text-align: left;
}
.visit-status-plaque .visit-status-text .vsp-date,
.visit-status-plaque .visit-status-text .vsp-energy { display: block; }
.visit-status-plaque .vsp-date { color: #6b4a20; font-size: clamp(11px,0.95vw,16px); letter-spacing: 0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.visit-status-plaque .vsp-energy { color: #8a5a24; font-size: clamp(11px,0.88vw,15px); font-weight: 600; white-space: nowrap; line-height: 1.15; }

/* 三快捷牌 + 资源签：状态牌右侧顺放（保留全局导航） */
.visit-topnav {
  position: absolute; left: 26%; top: 2.2%;
  display: flex; align-items: center; gap: 10px; z-index: 6;
}
/* 续104zt·⑦：三快捷牌全局顶到最顶已由 .court-screen 基规则(top:0)统一处理·拜访屏无需再单独覆盖。 */
.visit-topnav .topnav-banners { display: flex; gap: 8px; }
.visit-topnav .resource-strip { display: flex; gap: 8px; }

/* —— 左侧动作栏空框（x24 y146 w280 h714 → 1.5% / 16.2% / 17.5% / 79.3%；素材比 0.392→h=w×2.548） —— */
.visit-action-panel {
  position: absolute; left: 1.5%; top: 16.2%;
  width: 17.5%; height: 44.6vw;          /* 17.5vw × 2.548 ≈ 44.6vw；vw 锁比 */
  max-height: 83vh;
  background: url("./assets/ui/visit/action-panel-empty.png") center/100% 100% no-repeat;
  z-index: 5;
}
/* 续104zt·返工：动作签落在「青瓷内框」——inset 百分比相对框自身解析(旧 vw padding 异比会飘)，
   顶让荷花冠·左让穗带·右底让内框。列表在此区内相对排版，动作少时居中·不补空签。 */
.visit-action-list {
  position: absolute;
  left: 16%; right: 8%; top: 15%; bottom: 8%;
  display: flex; flex-direction: column; align-items: stretch;
  gap: clamp(6px,0.7vh,12px);
  justify-content: flex-start;
}
.visit-action-list.is-centered { justify-content: center; }   /* 1-4 个：竖向居中·不补空签 */
.visit-action-list.is-dense { gap: clamp(2px,0.28vh,6px); justify-content: space-between; }    /* 8+：压缩·单页放得下 */
.visit-action-list.is-dense .visit-action { height: clamp(28px, 4.6vh, 46px); }                /* 密排行高更矮·防溢出 */

/* —— 单枚动作签（素材比 4.680；文本居中·左让菱形·右让木兰） —— */
.visit-action {
  position: relative; width: 100%; flex: 0 0 auto;
  height: clamp(34px, 6.9vh, 62px);      /* 固定行高·不靠 aspect-ratio 防宽度塌成0 */
  background: url("./assets/ui/visit/action-tag.png") left center/100% 100% no-repeat;
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0 12% 0 18%;                  /* 右让木兰饰·左让菱形饰 */
  box-sizing: border-box;
  transition: filter 120ms ease, transform 90ms ease;
}
.visit-action .va-label {
  color: #45351c; font-size: clamp(13px,1.02vw,19px); font-weight: 600;
  letter-spacing: 1px; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  text-shadow: 0 1px 0 rgba(255,252,244,0.5);
}
.visit-action-list.is-dense .va-label { font-size: clamp(11px,0.85vw,15px); }
/* 交互态：悬停玉边轻亮 / 按下轻压暗 / 禁用低透灰化 / 当前子菜单朱批高亮 / 危险朱调 */
.visit-action:hover { filter: brightness(1.07) saturate(1.05); }
.visit-action:active { transform: translateY(1px); filter: brightness(0.94); }
.visit-action:focus-visible { outline: 2px solid var(--rs-gold-text); outline-offset: 2px; }
.visit-action[disabled], .visit-action.is-disabled {
  filter: grayscale(0.7) opacity(0.5); cursor: not-allowed; pointer-events: none;
}
.visit-action.is-active { filter: brightness(1.1); }
.visit-action.is-active .va-label { color: #7a1f14; }
.visit-action.is-active::after {
  content: ""; position: absolute; right: 13%; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: #b3271a; box-shadow: 0 0 6px rgba(179,39,26,0.6);
}
.visit-action.is-danger .va-label { color: #7a2018; }

/* —— 右侧工具牌 rail（x1488 y230 w88 → 93% / 25.6% / 5.5%；素材比 0.292→h=w×3.42） —— */
.visit-tool-rail {
  position: absolute; right: 1.2%; top: 25.6%;
  width: 5.5%;
  display: flex; flex-direction: column; gap: 14px; align-items: center; z-index: 5;
}
.visit-tool {
  position: relative; width: 100%; flex: 0 0 auto;
  height: clamp(150px, 20vw, 300px);
  background: url("./assets/ui/visit/tool-plaque.png") center/100% 100% no-repeat;
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 12% 0 34% 0;                  /* 底部让荷花+穗带 */
  box-sizing: border-box;
  transition: filter 120ms ease, transform 90ms ease;
}
.visit-tool .vt-label {
  writing-mode: vertical-rl; text-orientation: upright;
  color: #4a3a1e; font-size: clamp(13px,1.0vw,18px); font-weight: 600; letter-spacing: 3px;
  text-shadow: 0 1px 0 rgba(255,252,244,0.5);
}
.visit-tool:hover { filter: brightness(1.07); }
.visit-tool:active { transform: translateY(1px); filter: brightness(0.94); }
.visit-tool:focus-visible { outline: 2px solid var(--rs-gold-text); outline-offset: 2px; }
.visit-tool.is-disabled, .visit-tool[disabled] { filter: grayscale(0.7) opacity(0.5); cursor: not-allowed; pointer-events: none; }

/* —— 底部对话框（默认隐藏；出现 x360 y600 w880 h270 → 22.5% / 66.7% / 55% / 30%；素材比 3.247） —— */
.visit-dialog {
  position: absolute; left: 22.5%; top: 66.7%;
  width: 55%; height: 16.9vw;            /* 55vw × 0.308 ≈ 16.9vw */
  max-height: 30vh;
  background: url("./assets/ui/visit/dialog-box.png") center/100% 100% no-repeat;
  z-index: 7;
}
/* 续104zt·返工：对白文字落在纸面安全区(inset 相对框)，左让樱花穗带·四周让边框；不再 vw padding 硬缩。 */
.visit-dialog .visit-dialog-text {
  position: absolute;
  left: 9%; right: 6%; top: 18%; bottom: 18%;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  color: #4a3a20; overflow: hidden;
}
.visit-dialog .court-speaker,
.visit-dialog p { color: #4a3a20; font-size: clamp(13px,1.0vw,18px); line-height: 1.5; margin: 0; }
.visit-dialog .mini-btn { align-self: center; }

/* —— 二级/确认面板（居中 x490 y140 w620 h474 → 30.6% / 15.6% / 38.75% / 52.7%；素材比 1.308） —— */
.visit-subpanel-mask {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(16,12,8,0.34);        /* 轻压暗·非黑底弹窗 */
  display: flex; align-items: center; justify-content: center;
}
.visit-subpanel {
  /* 续104zt-⑲（Codex 三段式可伸缩菜单册页）：top(150)固定头 + middle(96)沿 y 平铺自适应任意高 + bottom(130)固定尾。
     宽 720 基准·按视口缩放。middle 用 repeat-y→内容多少自动铺多高(等效「不断加 middle」)。 */
  position: relative; box-sizing: border-box;
  width: min(56vw, 720px);
  max-height: 94vh;
  display: flex; flex-direction: column; align-items: stretch;
  background: none;                          /* 背景改由 头/身/尾 三段承载 */
  color: #45351c;
}
/* 头：荷花冠饰 + 标题区(720:150·不缩) */
.visit-subpanel::before {
  content: ""; display: block; flex: 0 0 auto;
  width: 100%; aspect-ratio: 720 / 150;
  background: url("./assets/ui/visit/menu-sheet/menu-sheet-top.svg") center top / 100% 100% no-repeat;
}
/* 尾：荷花底收口(720:130·不缩) */
.visit-subpanel::after {
  content: ""; display: block; flex: 0 0 auto;
  width: 100%; aspect-ratio: 720 / 130;
  background: url("./assets/ui/visit/menu-sheet/menu-sheet-bottom.svg") center bottom / 100% 100% no-repeat;
}
/* 身：middle 沿 y 平铺·内容撑高 */
.visit-subpanel .consort-status {
  position: static; transform: none; inset: auto;
  flex: 1 1 auto; width: 100%; max-width: none; height: auto;
  box-sizing: border-box;
  background: url("./assets/ui/visit/menu-sheet/menu-sheet-middle.svg") top center / 100% auto repeat-y;
  border: 0; box-shadow: none; border-radius: 0;
  padding: 2px 9% 6px;
  display: flex; flex-direction: column; align-items: center; gap: clamp(9px, 1.5vh, 16px);
  margin-top: -2px; margin-bottom: -2px;     /* 与头/尾无缝咬合 */
  overflow: hidden;
}
.visit-subpanel .cs-head {
  font-size: clamp(17px,1.35vw,25px); color: #5a3f1a; font-weight: 700; text-align: center;
  margin-top: -4px;
}
.visit-subpanel .cs-sub, .visit-subpanel p { font-size: clamp(13px,1.0vw,17px); color: #6b4a20; text-align: center; line-height: 1.55; margin: 0; }
/* 选项条＝Codex menu-sheet-row.svg(560×72·玉牌+金菱端饰)·复用旧钩子·只换观感 */
.visit-subpanel .palace-btn,
.visit-subpanel .palace-col-btn {
  position: relative; width: min(94%, 560px); min-width: 0;
  aspect-ratio: 560 / 72; max-height: clamp(50px, 5.6vh, 72px);
  background: url("./assets/ui/visit/menu-sheet/menu-sheet-row.svg") center / 100% 100% no-repeat;
  border: 0; border-radius: 0; box-shadow: none;
  color: #45351c; font-size: clamp(15px, 1.15vw, 19px); font-weight: 600; letter-spacing: 2px;
  text-shadow: 0 1px 0 rgba(255,252,244,0.5);
  display: flex; align-items: center; justify-content: center; padding: 0 13%;
  transition: filter 120ms ease, transform 90ms ease;
}
.visit-subpanel .palace-btn:hover,
.visit-subpanel .palace-col-btn:hover { filter: brightness(1.06) saturate(1.05); }
.visit-subpanel .palace-btn:active,
.visit-subpanel .palace-col-btn:active { transform: translateY(1px); filter: brightness(0.94); }
.visit-subpanel .palace-btn[disabled],
.visit-subpanel .palace-col-btn[disabled] { filter: grayscale(0.7) opacity(0.5); cursor: not-allowed; }
.visit-subpanel .palace-btn b, .visit-subpanel .palace-col-btn b { font-weight: 700; }
.visit-subpanel .palace-btn small, .visit-subpanel .palace-col-btn small { font-size: 0.78em; color: #6b4a20; font-weight: 400; }
/* 返回：同用 row 条(Codex 预览里返回也是一条·朱字区分) */
.visit-subpanel .mini-btn {
  width: min(94%, 560px); aspect-ratio: 560 / 72; max-height: clamp(50px, 5.6vh, 72px);
  margin-top: clamp(2px, 0.6vh, 6px);
  background: url("./assets/ui/visit/menu-sheet/menu-sheet-row.svg") center / 100% 100% no-repeat;
  border: 0; border-radius: 0; box-shadow: none;
  color: #7a2018; font-weight: 700; font-size: clamp(15px, 1.15vw, 19px); letter-spacing: 2px;
  display: flex; align-items: center; justify-content: center;
}
.visit-subpanel .mini-btn:hover { filter: brightness(1.06); }
.visit-subpanel .mini-btn:active { transform: translateY(1px); }
.visit-subpanel .court-action {
  min-width: 40%; text-align: center;
}
.visit-subpanel .cs-attrs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 14px; width: 100%; }
.visit-subpanel .cs-attrs li { display: flex; justify-content: space-between; font-size: clamp(12px,0.92vw,15px); color: #5a4526; border-bottom: 1px dashed rgba(90,63,26,0.3); padding-bottom: 2px; }
.visit-subpanel .cs-attrs strong { color: #7a2018; }
.visit-subpanel .sz-rank-group { width: 100%; }
.visit-subpanel .sz-rank-h { color: #5a3f1a; font-weight: 600; font-size: clamp(12px,0.92vw,15px); margin: 4px 0 2px; }
.visit-subpanel .sz-actions.sz-wrap { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }

/* 续104zt-⑲：旧 zt-⑳「确认框中和」块已删——三段式菜单册页(上方 .visit-subpanel 定义)统一承载
   菜单与确认框：.consort-status 用 middle 平铺背景、按钮用 menu-sheet-row 条。此处不再中和/改小药丸。 */
.visit-subpanel .danger { color: #7a1f14; }

/* 二元确认框(visit-confirm)：标题/正文 + 两枚 row 条(意已决/再想想)·常规流居中(不再绝对定位到旧烘焙牌位) */
.visit-subpanel .visit-confirm-btns {
  display: flex; flex-direction: column; align-items: center; gap: clamp(8px,1.4vh,14px); width: 100%;
}
.visit-subpanel .visit-confirm-btns .palace-col-btn,
.visit-subpanel .visit-confirm-btns .mini-btn {
  min-width: 26%; max-width: 27%; text-align: center;
  background: transparent; border: 0; box-shadow: none;   /* 直接落在烘焙牌上·不再画自有底 */
  color: #45351c; font-weight: 600; letter-spacing: 2px; padding: 12px 0;
}
.visit-subpanel .visit-confirm-btns .mini-btn { color: #6b4a20; }
.visit-subpanel .visit-confirm-btns .palace-col-btn:hover,
.visit-subpanel .visit-confirm-btns .mini-btn:hover { filter: brightness(1.12); background: rgba(255,252,244,0.18); }

/* 续104zt42（Yan）：养心殿「就寝(休息)」「转月」两菜单复用拜访三段式奶油菜单册页(.visit-subpanel)。
   它们内嵌在 panelShell 的 .home-panel-body（绝对定位·居中·max-height:72vh）里、不在 .visit-subpanel-mask 中，
   故这里把册页在册板内水平居中、给短菜单(仅两条)一个更紧凑的宽度上限，并让 middle 身段自适应两条的高度。
   仅换观感·data-* 钩子/绑定不变·纯 CSS·不改 DOM·不动 确定性双跑。 */
.home-panel-body .home-menu-sheet.visit-subpanel {
  margin: 0 auto;
  width: min(56cqw, 560px);
  max-height: 72vh;
}
.home-panel-body .home-menu-sheet.visit-subpanel .consort-status {
  justify-content: center;
  padding-top: clamp(6px, 1.6vh, 16px);
  padding-bottom: clamp(6px, 1.6vh, 16px);
}

/* —— 地点入口态：中置长签菜单（x470 y245 w680 → 29.4% / 27.2% / 42.5%；整体竖向居中） —— */
.visit-screen--entry .visit-entry-menu {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 42.5%; max-width: 720px;
  display: flex; flex-direction: column; gap: clamp(14px,2.9vh,30px);
  align-items: center; z-index: 4;
}
.visit-entry-option {
  position: relative; width: 100%; flex: 0 0 auto;
  height: clamp(64px, 6.5vw, 118px);
  background: url("./assets/ui/visit/entry-option.png") center/100% 100% no-repeat;
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0 9%;
  box-sizing: border-box;
  transition: filter 120ms ease, transform 90ms ease;
}
.visit-entry-option .veo-label {
  color: #45351c; font-size: clamp(16px,1.35vw,24px); font-weight: 600; letter-spacing: 2px;
  text-shadow: 0 1px 0 rgba(255,252,244,0.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.visit-entry-option:hover { filter: brightness(1.07) saturate(1.05); }
.visit-entry-option:active { transform: translateY(1px); filter: brightness(0.94); }
.visit-entry-option:focus-visible { outline: 2px solid var(--rs-gold-text); outline-offset: 2px; }
.visit-entry-option[disabled] { filter: grayscale(0.7) opacity(0.5); cursor: not-allowed; pointer-events: none; }
/* 入口态可选顶部辅助入口（如「查看太后状态」）：状态牌下方顺放 */
.visit-entry-top { position: absolute; left: 50%; top: 14.5%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 5px; z-index: 4; width: 56%; text-align: center; }
.visit-entry-note { color: #f2e6ca; font-size: clamp(11px,0.9vw,15px); line-height: 1.5; text-shadow: 0 2px 6px rgba(0,0,0,0.75); letter-spacing: 0.3px; }

/* 返回钮（沿用 .court-leave·各屏原有钩子）在 visit 屏统一落右下 */
.visit-screen .court-leave { z-index: 8; }

/* —— 窄桌面 / 移动端回退：立绘压小·动作栏与对话框收窄·仍不滚动 —— */
@media (max-width: 900px) {
  .visit-screen .visit-standee { left: 50%; transform: translateX(-50%); width: 62%; height: 66vh; opacity: 0.94; }
  .visit-action-panel { width: 30%; height: 74vw; }
  .visit-action .va-label { font-size: clamp(12px,2.6vw,16px); }
  .visit-status-plaque { width: 44%; height: 16vw; }
  .visit-topnav { left: 46%; }
  .visit-dialog { left: 34%; width: 62%; }
  .visit-subpanel { width: 76%; }
  .visit-screen--entry .visit-entry-menu { width: 82%; }
}

/* 续104zo：人物拜访态「离开」钮（落右下·沿用各屏原钩子·统一为长签体轻量版） */
.visit-screen--person .visit-leave-btn {
  position: absolute; right: 1.5%; bottom: 3%; z-index: 8;
  min-width: 130px; text-align: center; padding: 10px 22px;
  background: rgba(84,38,31,0.9); border: 1px solid var(--rs-gold-mid); border-radius: 8px;
  color: #f6ead1; letter-spacing: 3px; font-size: 16px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.visit-screen--person .visit-leave-btn:hover { filter: brightness(1.1); }
.visit-screen--person .visit-leave-btn:active { transform: translateY(1px); }

/* 续104zo：人物拜访态·人物奏对/状态说明行（落在立绘上方居中·不压动作栏·半透卷底衬字） */
.visit-screen--person .visit-speaker-line {
  position: absolute; left: 22%; top: 15%; width: 56%; z-index: 3;
  text-align: center; pointer-events: none;
}
.visit-screen--person .visit-speaker-line .court-speaker { color: var(--rs-deep-text); font-size: clamp(14px,1.1vw,19px); text-shadow: 0 2px 6px rgba(0,0,0,0.7); margin: 0 0 4px; }
.visit-screen--person .visit-speaker-line .cs-sub { color: #f0e2c4; font-size: clamp(12px,0.92vw,15px); text-shadow: 0 1px 4px rgba(0,0,0,0.75); }

/* ===== 续104zt-⑩：事务册簿管理页「御案总务册」（交接包 2026-07-03·相对布局 grid/flex/%/clamp） ===== */
/* 御案暗木底——事务页不复用养心殿背景。整屏铺满。 */
.affairs-book-screen {
  --affairs-ink: #382918; --affairs-muted: #775d39; --affairs-paper: #f5e4bd;
  --affairs-gold: #cba45b; --affairs-jade: #9ab8aa; --affairs-red: var(--rs-cinnabar);
  position: relative; width: 100%; min-height: 100vh; max-width: none; margin: 0; padding: 0;
  overflow: hidden;
  background: #201712 url("./assets/ui/affairs-book/01_御案暗木底.svg") center / cover no-repeat;
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
}
.affairs-book-body { width: 100%; height: 100%; padding: 0; }

/* 三栏 grid：左玉签 / 中清单 / 右说明 + 底部提示。返回钮由 .court-leave 固定右下。 */
.affairs-book {
  box-sizing: border-box;
  display: grid;
  grid-template-areas:
    "title  title  title"
    "groups ledger aside"
    "groups notice aside";
  grid-template-columns: minmax(136px, 15%) minmax(480px, 1fr) minmax(280px, 25%);
  grid-template-rows: minmax(56px, 9%) 1fr minmax(60px, 10%);
  gap: clamp(14px, 1.6vw, 28px);
  width: min(100vw, 1600px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(20px, 2.6vw, 44px) clamp(30px, 3.6vw, 60px) clamp(26px, 3.4vw, 52px);
  color: var(--affairs-ink);
}
.affairs-book button { font: inherit; }

.affairs-book__title {
  grid-area: title; align-self: center; justify-self: center;
  color: #f8e7b8; font-size: clamp(28px, 2.3vw, 38px); line-height: 1.1;
  text-shadow: 0 3px 8px rgba(0,0,0,.6); letter-spacing: 4px;
}

/* 左：7 组玉签 */
.affairs-book__groups {
  grid-area: groups; align-self: start;
  display: grid; gap: clamp(9px, 1.7vh, 16px); width: min(100%, 168px);
}
.affairs-book__group {
  width: min(100%, 150px); height: clamp(60px, 7.8vh, 74px);
  border: 0; color: #273b35; font-size: clamp(16px, 1.2vw, 19px); letter-spacing: 2px;
  background: url("./assets/ui/affairs-book/02_分组玉签_普通.svg") center / contain no-repeat;
  cursor: pointer; transition: transform .16s ease, filter .16s ease;
}
.affairs-book__group:hover { transform: translateY(-2px); filter: brightness(1.08); }
.affairs-book__group--active {
  width: min(100%, 160px); height: clamp(66px, 8.6vh, 80px);
  background-image: url("./assets/ui/affairs-book/03_分组玉签_选中.svg");
  filter: drop-shadow(0 0 8px rgba(226,191,104,.28));
}

/* 中：册页清单 */
.affairs-book__ledger {
  grid-area: ledger; align-self: start; justify-self: center;
  display: grid; gap: clamp(12px, 1.9vh, 18px); width: min(100%, 860px);
}
.affairs-book__entry {
  position: relative; display: grid;
  grid-template-columns: minmax(48px, 9%) 1fr minmax(104px, 15%);
  align-items: center; gap: clamp(10px, 1.2vw, 18px);
  width: 100%; min-height: clamp(76px, 9.4vh, 90px);
  padding: 0 clamp(16px, 2vw, 28px) 0 clamp(14px, 1.6vw, 20px);
  border: 0; box-sizing: border-box; color: var(--affairs-ink); text-align: left;
  background: url("./assets/ui/affairs-book/04_册页入口行_普通.svg") center / 100% 100% no-repeat;
  cursor: pointer; transition: transform .14s ease, filter .14s ease;
}
.affairs-book__entry:hover,
.affairs-book__entry--selected {
  background-image: url("./assets/ui/affairs-book/05_册页入口行_悬停选中.svg");
  transform: translateY(-2px); filter: brightness(1.04);
}
.affairs-book__entry--danger { background-image: url("./assets/ui/affairs-book/06_册页入口行_高风险.svg"); }
.affairs-book__entry--disabled { cursor: not-allowed; filter: grayscale(.55) opacity(.62); }
.affairs-book__seal {
  width: clamp(34px, 3.2vw, 46px); aspect-ratio: 1;
  background: url("./assets/ui/affairs-book/19_小印图标位.svg") center / contain no-repeat;
}
.affairs-book__entry-main { min-width: 0; }
.affairs-book__entry-title { display: block; font-size: clamp(20px, 1.6vw, 25px); line-height: 1.15; letter-spacing: 1px; }
.affairs-book__entry-desc { display: block; margin-top: 7px; color: var(--affairs-muted); font-size: clamp(14px, 1.05vw, 17px); line-height: 1.2; }
.affairs-book__entry-tag {
  display: grid; place-items: center; justify-self: end;
  width: clamp(100px, 7.8vw, 116px); height: clamp(36px, 4.6vh, 44px);
  color: #273b35; font-size: clamp(14px, 1.05vw, 17px); letter-spacing: 1px;
  background: url("./assets/ui/affairs-book/08_状态签_普通.svg") center / contain no-repeat;
}
.affairs-book__entry-tag--cost { color: #442c13; background-image: url("./assets/ui/affairs-book/09_状态签_耗银.svg"); }
.affairs-book__entry-tag--danger {
  width: clamp(106px, 8.2vw, 124px); height: clamp(38px, 4.8vh, 46px);
  color: #f8e0bd; background-image: url("./assets/ui/affairs-book/10_状态签_高风险.svg");
}

/* 右：案由说明板 */
.affairs-book__aside {
  grid-area: aside; align-self: start; justify-self: end; box-sizing: border-box;
  width: min(100%, 370px); min-height: clamp(440px, 60vh, 560px);
  padding: clamp(60px, 8vh, 84px) clamp(30px, 3.4vw, 54px) clamp(36px, 4.6vh, 52px);
  background: url("./assets/ui/affairs-book/07_案由说明板.svg") center / 100% 100% no-repeat;
}
.affairs-book__aside-title { margin: 0 0 clamp(20px, 3.4vh, 36px); font-size: clamp(22px, 1.7vw, 28px); color: var(--affairs-ink); letter-spacing: 2px; }
.affairs-book__aside-row { margin: 0 0 clamp(14px, 2.3vh, 22px); color: var(--affairs-muted); font-size: clamp(15px, 1.15vw, 18px); line-height: 1.4; }
.affairs-book__aside-row em { font-style: normal; margin-right: 12px; color: var(--affairs-ink); }
.affairs-book__aside-row b { font-weight: 600; color: var(--affairs-ink); }

/* 底部提示条 */
.affairs-book__notice {
  grid-area: notice; align-self: end; justify-self: center;
  display: grid; place-items: center; width: min(100%, 640px); height: clamp(48px, 6.6vh, 60px);
  color: #4d3922; font-size: clamp(15px, 1.15vw, 19px); letter-spacing: 2px;
  background: url("./assets/ui/affairs-book/12_底部提示条.svg") center / 100% 100% no-repeat;
}

/* 事务册簿返回玉钮（复用 .court-leave 的右下固定·换玉钮皮肤） */
.affairs-book-screen .affairs-book__return.court-leave {
  display: grid; place-items: center; box-sizing: border-box;
  width: clamp(150px, 11vw, 178px); height: clamp(54px, 7.2vh, 64px);
  padding: 0 0 0 clamp(20px, 2vw, 28px);
  border: 0; color: #2c413a; font-size: clamp(15px, 1.1vw, 18px); letter-spacing: 1px;
  background: url("./assets/ui/affairs-book/11_返回玉钮.svg") center / contain no-repeat;
}

/* 1280×720 收缩：略缩玉签/清单/说明 */
@media (max-width: 1360px) {
  .affairs-book { grid-template-columns: minmax(124px, 15%) minmax(420px, 1fr) minmax(250px, 25%); gap: clamp(12px, 1.4vw, 22px); }
  .affairs-book__entry-title { font-size: clamp(18px, 1.5vw, 22px); }
  .affairs-book__entry { min-height: clamp(70px, 9vh, 84px); }
}

/* ═══════════════ 续104zt-⑭ P0：人物档案面板·统一美术皮肤（整改包 2026-07-03） ═══════════════
   四类人物(主控/妃嫔/朝臣/皇嗣宗亲)共用同一套外壳皮肤——古风宫廷·浅青玉白墨灰旧金朱红·
   替换旧的黑色半透明后台面板观感。仅重皮：结构/tab/立绘框/data-* 钩子全不动(统一逻辑不拆四套)。
   规则：非后台卡片·按钮五态·立绘 contain center bottom·返回回原处。 */
:root {
  --persona-jade: var(--rs-jade); --persona-jade-deep: var(--rs-jade-deep); --persona-gold: var(--rs-gold);
  --persona-ink: var(--rs-ink); --persona-paper: var(--rs-paper); --persona-paper-2: var(--rs-paper-deep); --persona-red: var(--rs-cinnabar);
}
.persona-screen { padding: 4vh 3vw; }
/* 外框：玉白纸底 + 青玉描边 + 旧金细线·非黑半透明 */
.persona-frame {
  background:
    linear-gradient(180deg, rgba(245,236,214,0.98), rgba(239,227,198,0.98));
  border: 3px solid var(--persona-jade-deep);
  border-radius: 18px;
  box-shadow: 0 0 0 2px var(--persona-gold) inset, 0 20px 56px rgba(20,14,8,0.42);
  overflow: hidden;
}
/* 左竖栏：青玉长签底 */
.persona-rail {
  background: linear-gradient(180deg, rgba(79,117,106,0.92), rgba(58,88,79,0.92));
  border-right: 2px solid var(--persona-gold);
  padding: 24px 14px;
}
.persona-rail-btn {
  writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 8px;
  padding: 20px 10px; border: 1.5px solid rgba(231,220,180,0.6); border-radius: 10px;
  background: linear-gradient(180deg, rgba(245,236,214,0.14), rgba(245,236,214,0.06));
  color: #f4ead0; font-size: 19px; cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease, transform .12s ease;
}
.persona-rail-btn:hover { background: rgba(245,236,214,0.2); transform: translateY(-1px); }
.persona-rail-btn:active { transform: translateY(1px); }
.persona-rail-btn.is-active {
  background: linear-gradient(180deg, rgba(197,155,86,0.55), rgba(160,120,60,0.5));
  border-color: #f4ead0; color: #fff7e6; box-shadow: 0 0 12px rgba(197,155,86,0.4);
}
/* 中栏 tab：门额牌形(上宽下收)·青玉普通 / 旧金选中 */
.persona-main { padding: 20px 26px; }
.persona-tabs { gap: 10px; margin-bottom: 16px; }
.persona-tab {
  padding: 10px 22px; border: 1.5px solid var(--persona-jade-deep); border-bottom: none;
  border-radius: 12px 12px 4px 4px; color: #2f4a42; font-size: 16px; letter-spacing: 2px;
  background: linear-gradient(180deg, var(--persona-jade), #a7bda9); cursor: pointer;
  transition: filter .14s ease, transform .12s ease;
}
.persona-tab:hover { filter: brightness(1.06); transform: translateY(-1px); }
.persona-tab.is-active {
  color: #4a3417; border-color: var(--persona-gold);
  background: linear-gradient(180deg, #f0dbb0, #e3c890);
  box-shadow: 0 -2px 8px rgba(197,155,86,0.3);
}
/* 正文：暖色文字·分节标题描金 */
.persona-body { gap: 10px; }
.persona-id { color: var(--persona-ink); font-weight: 700; border-bottom: 2px solid rgba(197,155,86,0.5); }
.persona-id em { color: var(--persona-red); }
.persona-vital, .home-panel-vital { color: #5a4426; }
.persona-vital strong, .home-panel-vital strong { color: var(--persona-red); }
.persona-sec {
  text-align: center; color: #4a3417; letter-spacing: 3px; margin: 6px 0 2px;
  background: linear-gradient(90deg, transparent, rgba(197,155,86,0.22), transparent); padding: 4px 0;
}
.persona-attrs { color: var(--persona-ink); }
.persona-attrs li span { color: #6a5230; }
.persona-attrs li strong { color: var(--persona-red); }
.persona-derived span, .persona-derived b { color: #4a3417; }
/* 续104zt-⑮修：P0 重皮遗漏——以下文字类原为深底浅字，换玉白纸底后浅字看不见，全改墨/朱深色。 */
.persona-line { color: var(--persona-ink); }
.persona-line b { color: var(--persona-red); }
.persona-derived { color: #4a3417; }
.persona-derived span strong { color: var(--persona-red); }
.persona-note { color: #6a5230; }
.persona-empty { color: #6a5230; }
.persona-mood-line { color: var(--persona-ink); }
.persona-attrs li span { color: #6a5230; }
/* 小标签「改/赐名/索要/赏赐/详情/更换」等 persona-tag：换朱漆玉牌·深底浅字(牌本身是深色→字保持浅色可见) */
.persona-tag {
  border: 1px solid var(--persona-gold);
  background: linear-gradient(180deg, rgba(139,44,36,0.92), rgba(110,32,26,0.92));
  color: #f7e6cd;
}
.persona-tag:hover { filter: brightness(1.12); }
/* 立绘框内「昵称」条等右侧信息(member-info 底部条)若浅字也一并深色兜底 */
.persona-portrait .persona-line,
.persona-portrait .persona-line b { color: var(--persona-ink); }
/* 中栏正文里的动作钮(遍惠六宫等)：朱漆玉钮观感·五态 */
.persona-acts .palace-btn, .persona-body .palace-btn {
  border: 1.5px solid var(--persona-jade-deep); border-radius: 999px;
  background: linear-gradient(180deg, rgba(185,200,180,0.9), rgba(150,175,160,0.85)); color: #2f4a42;
}
.persona-acts .palace-btn:hover, .persona-body .palace-btn:hover { filter: brightness(1.08); }
.persona-acts .palace-btn:active, .persona-body .palace-btn:active { transform: translateY(1px); }
/* 右立绘区：玉白框 + 青玉描边·立绘 contain center bottom(不裁头冠/袖摆) */
.persona-portrait {
  background: linear-gradient(180deg, rgba(245,236,214,0.5), rgba(239,227,198,0.4));
  border-left: 2px solid var(--persona-gold); padding: 20px;
}
.persona-standee {
  border: 2px solid var(--persona-jade-deep); border-radius: 12px;
  background: linear-gradient(160deg, #efe6cf, #e2d4b3);
  box-shadow: 0 0 0 1px var(--persona-gold) inset;
}
.persona-standee img { object-fit: contain; object-position: center bottom; }
.persona-standee-empty { color: rgba(90,68,38,0.6); }
.persona-portrait .palace-btn {
  border: 1.5px solid var(--persona-jade-deep); border-radius: 999px;
  background: linear-gradient(180deg, rgba(197,155,86,0.5), rgba(160,120,60,0.42)); color: #4a3417;
}
.persona-portrait .palace-btn:hover { filter: brightness(1.08); }
.persona-portrait .palace-btn:active { transform: translateY(1px); }
/* 右下返回：朱漆圆钮 */
.persona-back {
  border: 2px solid var(--persona-gold); border-radius: 999px;
  background: linear-gradient(180deg, rgba(139,44,36,0.9), rgba(110,32,26,0.9)); color: #f7e6cd;
}
.persona-back:hover { filter: brightness(1.1); }

/* ═══════════════ 续104zt-⑯ P1：后宫 hub / 宫殿卡 / 宫签（整改包 2026-07-03·纯 CSS 重皮） ═══════════════
   旧观感＝黑半透明后台卡→改宫殿册页/宫门卡片(浅青玉白旧金)。有人宫殿 vs 空宫殿视觉不同。
   位分筛选改宫签。不复用养心殿背景(后宫本有自己背景)。结构/data-* 钩子不动。 */
/* 左侧位分筛选：宫签(青玉长牌·选中旧金) */
.harem-side .palace-col-btn {
  background: linear-gradient(180deg, var(--persona-jade), #a7bda9);
  border: 1.5px solid var(--persona-jade-deep); border-radius: 10px;
  color: #2f4a42; font-weight: 600;
  box-shadow: 0 3px 8px rgba(20,14,8,0.25);
}
.harem-side .palace-col-btn:hover { filter: brightness(1.06); border-color: var(--persona-gold); }
.harem-side .palace-col-btn.is-active {
  /* 2026-07-27 选中态统一：金黄跳色→青瓷点亮+朱砂左条（H1·与御案/弹窗同语言） */
  border-color: rgba(79, 117, 106, 0.65);
  background: linear-gradient(180deg, #eff4ec, #d8e2d4);
  color: #24382f;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #a74a3a, inset 0 0 0 1.5px rgba(197, 155, 86, 0.3), 0 0 10px rgba(140, 170, 158, 0.35);
}
/* 宫殿卡：玉白册页 + 青玉描边 + 旧金门额条 */
.harem-card {
  background: linear-gradient(180deg, rgba(245,236,214,0.97), rgba(239,227,198,0.97));
  border: 2px solid var(--persona-jade-deep); border-radius: 12px;
  box-shadow: 0 0 0 1px var(--persona-gold) inset, 0 8px 20px rgba(20,14,8,0.3);
}
/* 门额条(品级+宫名)：旧金描金横匾 */
.hcard-meta {
  color: #4a3417; padding: 3px 8px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(197,155,86,0.28), rgba(197,155,86,0.14));
}
.hcard-rank { background: rgba(139,44,36,0.85); color: #f7e6cd; padding: 1px 8px; border-radius: 4px; }
.hcard-pname { color: #4a3417; font-weight: 600; }
.hcard-title { color: var(--persona-ink); font-weight: 700; }
.hcard-name { color: #6a5230; }
/* 住客立绘位：暖玉底(有人) */
.harem-portrait {
  background: linear-gradient(160deg, #efe6cf, #e2d4b3);
  border: 1.5px solid var(--persona-jade-deep); color: #6a5230;
}
/* 多殿宫「宫门」块：青玉门扉感(与住客位区分) */
.harem-building {
  background: linear-gradient(160deg, #cdd8c8, #aebfae);
  border-color: var(--persona-jade-deep);
}
/* 空宫殿：灰玉·低饱和·与有人明显不同 */
.harem-locked {
  background: linear-gradient(160deg, #e8e2d2, #d8d0bd);
  color: rgba(74,52,23,0.55); filter: none;
}
.harem-empty-note i { color: rgba(139,44,36,0.6); }
/* 卡内进入钮：朱漆玉钮 */
.harem-card .mini-btn {
  border: 1.5px solid var(--persona-jade-deep); border-radius: 999px;
  background: linear-gradient(180deg, rgba(197,155,86,0.5), rgba(160,120,60,0.42)); color: #4a3417;
}
.harem-card .mini-btn:hover { filter: brightness(1.08); }
.harem-card .mini-btn:active { transform: translateY(1px); }

/* 续104zt-⑯ P1续：储秀宫候选→秀女名册卡(玉白·状态明确·非黑底) */
.xuanxiu-card {
  background: linear-gradient(180deg, rgba(245,236,214,0.97), rgba(239,227,198,0.97));
  border: 1.5px solid var(--persona-jade-deep); border-radius: 10px;
  box-shadow: 0 0 0 1px var(--persona-gold) inset, 0 4px 12px rgba(20,14,8,0.24);
}
.xuanxiu-card.is-done { opacity: 0.5; }
.xuanxiu-card.is-xuanshi { border-color: var(--persona-gold); box-shadow: 0 0 0 1px var(--persona-gold) inset, 0 0 14px rgba(197,155,86,0.35); }
.xuanxiu-portrait {
  background: linear-gradient(160deg, #efe6cf, #e2d4b3);
  border: 1px solid var(--persona-jade-deep); color: #6a5230;
}
.xuanxiu-origin {
  background: linear-gradient(90deg, rgba(197,155,86,0.24), rgba(197,155,86,0.12));
  color: #4a3417; font-weight: 500;
}
.xuanxiu-origin.is-fated { color: var(--persona-red); font-weight: 700; background: rgba(197,155,86,0.3); }
.xuanxiu-name { color: var(--persona-ink); font-weight: 600; }
.xuanxiu-card-state { color: var(--persona-jade-deep); font-weight: 600; }
.xuanxiu-card-actions .court-action {
  border: 1.5px solid var(--persona-jade-deep); border-radius: 8px;
  background: linear-gradient(180deg, var(--persona-jade), #a7bda9); color: #2f4a42;
}
.xuanxiu-card-actions .court-action:hover { filter: brightness(1.06); }

/* ═══════════════ 续104zt-⑰ P2：通用名册/榜册组件（整改包 2026-07-03·纯 CSS 重皮） ═══════════════
   覆盖官员名册/科举榜/储秀宫/宫侍/族亲/乐姬等密集列表：黑底表格→玉白名册册页·青玉表头·旧金描线。
   行＝浅玉纸条·名字描金/朱·查看钮五态。结构/data-* 钩子不动。 */
.roster-row, .rtbl-row {
  background: linear-gradient(180deg, rgba(245,236,214,0.96), rgba(239,227,198,0.96));
  border: 1px solid var(--persona-jade-deep); border-radius: 7px; color: var(--persona-ink);
}
.roster-row > span, .rtbl-row > span { color: var(--persona-ink); }
.roster-row .rn, .rtbl-name { color: var(--persona-red); font-weight: 600; }
.roster-head, .rtbl-head {
  background: linear-gradient(180deg, var(--persona-jade-deep), #3f5f54);
  color: #f4ead0; font-weight: 700; border-color: var(--persona-gold);
}
.roster-head > span, .rtbl-head > span { color: #f4ead0; }
/* 查看钮：青玉小牌·五态 */
.roster-view, .rtbl-view {
  border: 1.5px solid var(--persona-jade-deep); border-radius: 6px;
  background: linear-gradient(180deg, var(--persona-jade), #a7bda9); color: #2f4a42; font-weight: 600;
}
.roster-view:hover, .rtbl-view:hover { filter: brightness(1.08); background: linear-gradient(180deg, #f0dbb0, #e3c890); }
.roster-view:active, .rtbl-view:active { transform: translateY(1px); }
.rtbl-count { color: #6a5230; }
.roster-pager { color: var(--persona-ink); }
/* 名册详情面板左列(roster-list)：玉白列·选中旧金 */
.roster-list .roster-list-btn, .roster-list button {
  border: 1.5px solid var(--persona-jade-deep); border-radius: 8px;
  background: linear-gradient(180deg, var(--persona-jade), #a7bda9); color: #2f4a42;
}
.roster-list .is-active, .roster-list button.is-active {
  background: linear-gradient(180deg, #f0dbb0, #e3c890); border-color: var(--persona-gold); color: #4a3417;
}

/* ═══════════════ 续104zt-⑳ P3：深层场景语义分区（御花园/御书房/东殿/西殿·纯 CSS+分组渲染） ═══════════════
   旧＝一屏同款按钮墙→按语义分组(组名小标题 + 该组按钮)·危险动作(慎刑司)红态。结构/data-* 钩子不动。 */
.scene-grouped-screen .scene-groups {
  position: absolute; top: 12%; left: 50%; transform: translateX(-50%);
  z-index: 5; width: min(920px, 92%); max-height: 80vh; overflow: hidden;
  display: flex; flex-wrap: wrap; gap: clamp(14px, 2vw, 30px);
  align-content: flex-start; justify-content: center;
}
.scene-group {
  flex: 0 1 auto; min-width: 220px;
  display: flex; flex-direction: column; gap: clamp(8px, 1.2vh, 14px);
  padding: clamp(12px, 1.4vw, 20px);
  background: linear-gradient(180deg, rgba(245,236,214,0.14), rgba(239,227,198,0.08));
  border: 1px solid rgba(197,155,86,0.4); border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,252,244,0.12);
}
.scene-group-h {
  /* 2026-07-27 M1：米金字在亮背景场景（市集/花街的天空）褪色难读——加深色半透明底签，深浅背景通吃 */
  text-align: center; color: #f4ead0; font-size: clamp(15px, 1.15vw, 19px);
  font-weight: 700; letter-spacing: 4px; padding: 3px 12px 5px;
  background: linear-gradient(180deg, rgba(44, 54, 47, 0.78), rgba(33, 42, 36, 0.7));
  border: 1px solid rgba(197, 155, 86, 0.5); border-radius: 8px;
  margin-bottom: 4px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.scene-group-btns { display: flex; flex-direction: column; gap: clamp(7px, 1vh, 12px); }
.scene-group .palace-btn, .scene-group .palace-col-btn {
  width: 100%; min-width: 180px;
  /* 2026-07-27 M5：朴素米条→纳入玉签组件语言（玉白渐变+金边+内衬白线·与钱庄/名录一致） */
  background: linear-gradient(180deg, #f7f0dc, #e9dcbc);
  border: 1px solid rgba(155, 119, 66, 0.55); border-radius: 8px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 248, 0.7), 0 2px 8px rgba(30, 40, 34, 0.18);
  color: #43301b;
}
/* 危险态(慎刑司等)：朱漆调·警示 */
.scene-btn-danger {
  border-color: rgba(139,44,36,0.85) !important;
  background:
    linear-gradient(180deg, rgba(255,250,231,0.96), rgba(224,196,180,0.92)),
    linear-gradient(90deg, rgba(139,44,36,0.22), rgba(110,32,26,0.12)) !important;
  color: #7a1f14 !important; font-weight: 700;
}
.scene-btn-danger:hover { filter: brightness(1.05); border-color: var(--rs-cinnabar) !important; }

/* 续zt265：口谕接不住时的近侍回话（等待态 + 回话）。只作叙事层，不承载任何操作。 */
.decree-eunuch {
  margin: 10px auto 0;
  max-width: 34em;
  color: #4a3b28;
  font-size: .95em;
  line-height: 1.7;
  text-align: center;
}
.decree-eunuch--wait { opacity: .62; font-style: italic; }

/* 续zt266：赏赐子菜单里的自定义赏银一行（输入框 + 按钮同排） */
.reward-silver-row { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 4px; }
.reward-silver-row input { width: 9em; }

/* 续zt266：户部三面板 / 扩充禁军 的金额输入一行（输入框 + 快捷填充钮同排·可换行） */
.pf-amount-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 8px 0; }
.pf-amount-row input { width: 11em; }
/* ═══════════════ 续104zt-㉑：查看家族·成员卡换青玉卷轴册页框（Yan 指定 atlas 中间偏右下四连框之一） ═══════════════
   旧＝深色后台框(丑)→改 member-card-frame.png(青玉描边+花冠+朱印+米纸山水)。立绘落上部纸面·姓名落下部名牌。
   结构/portraitFor 链路不动·纯重皮。 */
.member-card-row { align-items: flex-start; height: auto; }
.member-card {
  position: relative; flex: 0 1 min(20%, 230px); min-width: 150px;
  aspect-ratio: 180 / 255;                    /* 贴合框素材比例 */
  background: url("./assets/ui/rework2/family/member-card-frame.png") center / 100% 100% no-repeat;
  border: 0; border-radius: 0; box-shadow: none; overflow: visible;
  display: block;                              /* 改由内部绝对定位对齐框内区域 */
}
.member-card.is-self { filter: drop-shadow(0 0 8px rgba(231,198,137,0.55)); }
/* 续104zt-㉒（Yan）：家族卡去掉姓名·身份标签移到下部名牌区(家君/正妻/大小姐…落名牌) */
/* 身份标签：落框内下部名牌区(朱印上方) */
.member-card-label {
  position: absolute; left: 14%; right: 14%; top: 73%; bottom: 11.5%;   /* 锚定框内名牌区(约73%~88.5%) */
  display: flex; align-items: center; justify-content: center;          /* 文字在名牌 UI 内垂直+水平居中 */
  background: none; border: 0; padding: 0;
  color: #7a2018; font-weight: 700; letter-spacing: 2px;
  font-size: clamp(11px, 1.5vh, 15px); line-height: 1.1; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255,252,244,0.55);
}
/* 本人：名牌区淡金托底(卡片本已有描金光晕标识)·深墨字 */
.member-card.is-self .member-card-label {
  background: linear-gradient(180deg, rgba(214,176,96,0.42), rgba(184,144,74,0.28));
  border-radius: 6px; color: #6b3f14;
  box-shadow: inset 0 0 0 1px rgba(176,141,87,0.4);
}
/* 可点击成员卡：手型 + 轻微悬浮/聚焦描金 */
.member-card--clickable { cursor: pointer; transition: transform 140ms ease, filter 140ms ease; }
.member-card--clickable:hover { transform: translateY(-3px); filter: brightness(1.04); }
.member-card--clickable:focus-visible { outline: 2px solid #c9a86a; outline-offset: 2px; }
/* 立绘：落框内上部纸面区(避开花冠·下部名牌) */
.member-card-portrait {
  position: absolute; left: 12%; right: 12%; top: 13%; bottom: 27%;
  background: none; border-radius: 4px; overflow: hidden;
}
/* 姓名：隐藏(Yan：家族卡不要姓名·只留身份标签) */
.member-card-name { display: none; }
.member-card-portrait img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.member-portrait-empty { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(74,52,23,0.5); font-size: 12px; }
/* 姓名：落框内下部名牌区(朱印上方) */
.member-card-name {
  position: absolute; left: 12%; right: 12%; bottom: 9%;
  background: none; border: 0; padding: 0;
  color: #4a3417; font-weight: 600; font-size: clamp(12px, 1.5vh, 15px); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.member-card-name b { color: #7a2018; }
.member-card-age { color: rgba(74,52,23,0.65); margin-left: 1px; }
.member-card-note { display: block; margin-top: 1px; font-size: 11px; color: #6a5230; }

/* ============================================================================
   续104zt-㉚·Yan：养心殿 v2 换皮
   - 新前景整图（撤旧 20260701）；左上头像取消；精力只显示「数字」（标签已烘入前景，允许负数）
   - 主控立绘保留动态渲染（v2 三层：背景→立绘→前景/透明热区）
   - 热区按 component-metadata.json 百分比重排（旧版为左上 2×4 网格→v2 底部一排）
   - 定位全部相对（%），透明热区叠在前景上；前景 pointer-events:none，点击落到热区
   ============================================================================ */
.yangxin-home-v2::before,
.home-tone-night.yangxin-home-v2::before {
  background: url("./assets/ui/generated/yangxin-v2-foreground-20260704.png") center / 100% 100% no-repeat;
}
/* 撤左上头像；保留动态主控立绘 */
.yangxin-home-v2 .home-avatar { display: none; }
.yangxin-home-v2 .ruler-standee { opacity: 1; }
/* 顶栏文字：标签/标题已烘入前景，DOM 只留动态数字与日期，深墨落浅纸 */
.yangxin-home-v2 .home-identity { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.yangxin-home-v2 .home-topbar,
.yangxin-home-v2 .home-date,
.yangxin-home-v2 .home-resources,
.yangxin-home-v2 .home-energy { pointer-events: none; }
/* 精力：只显示数字（在前景「精力：」之后） */
.yangxin-home-v2 .home-energy {
  position: absolute; left: 15.2%; top: 11.4%; width: auto; min-height: 0;
  padding: 0; gap: 0; background: transparent; border: 0; box-shadow: none; text-shadow: none;
  justify-content: flex-start; color: #3b322a;
}
.yangxin-home-v2 .home-energy strong { color: #3b322a; font-size: clamp(13px, 1.45vw, 19px); font-weight: 600; }
/* 日期：顶行牌面 */
.yangxin-home-v2 .home-date {
  position: absolute; left: 4.4%; top: 5.9%; width: 21%; height: auto;
  display: flex; align-items: baseline; gap: 6px; color: #3b322a;
}
.yangxin-home-v2 .home-date strong,
.yangxin-home-v2 .home-date > span {
  position: static; left: auto; top: auto; color: #3b322a; text-shadow: none;
  font-size: clamp(12px, 1.3vw, 17px); font-weight: 500;
}
/* 银两：右上牌面 */
.yangxin-home-v2 .home-resources {
  position: absolute; left: auto; right: 24.6%; top: 6%; width: 10%; height: auto; text-align: center;
}
.yangxin-home-v2 .home-resources > span { position: static; top: auto; left: auto; }
.yangxin-home-v2 .home-resources strong { color: #3b322a; text-shadow: none; font-size: clamp(13px, 1.4vw, 18px); font-weight: 600; }
/* 各按钮标签视觉隐藏（图案已烘入前景），保留无障碍名 */
.yangxin-home-v2 .home-tab span,
.yangxin-home-v2 .home-control span,
.yangxin-home-v2 .home-exit-button span,
.yangxin-home-v2 .side-stack .icon-only span {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.yangxin-home-v2 .home-control img,
.yangxin-home-v2 .home-tab img,
.yangxin-home-v2 .side-stack .icon-only img { display: none; }
/* —— 透明热区容器：铺满·click-through；仅按钮本身接收点击 —— */
.yangxin-home-v2 .home-tabs,
.yangxin-home-v2 .action-dock,
.yangxin-home-v2 .home-goout {
  position: absolute; inset: 0; left: 0; top: 0; width: 100%; height: 100%;
  transform: none; display: block; padding: 0; margin: 0; gap: 0; grid-template-columns: none;
  background: transparent; border: 0; box-shadow: none; backdrop-filter: none; pointer-events: none; z-index: 26;
}
/* 通用热区按钮外观（透明·悬停浅高亮·按下加深） */
.yangxin-home-v2 [data-teleport-open],
.yangxin-home-v2 [data-residence-open],
.yangxin-home-v2 [data-home-control],
.yangxin-home-v2 [data-map-open] {
  position: absolute; min-width: 0; min-height: 0; margin: 0; padding: 0;
  background: transparent; border: 0; border-radius: 10px; box-shadow: none; cursor: pointer;
  pointer-events: auto; z-index: 27; transition: background .12s ease;
}
.yangxin-home-v2 [data-teleport-open]:hover,
.yangxin-home-v2 [data-residence-open]:hover,
.yangxin-home-v2 [data-home-control]:hover,
.yangxin-home-v2 [data-map-open]:hover { background: rgba(255,246,214,0.16); }
.yangxin-home-v2 [data-teleport-open]:active,
.yangxin-home-v2 [data-residence-open]:active,
.yangxin-home-v2 [data-home-control]:active,
.yangxin-home-v2 [data-map-open]:active { background: rgba(90,60,30,0.16); }
/* 顶部：地点 / 私宅 */
/* 底部一排八钮 */
/* 外出（右下大钮） */
/* 菜单（右侧竖牌）：side-stack 直接落在热区，抽屉相对其弹出 */
.yangxin-home-v2 .side-stack {
  position: absolute; left: auto; right: 2.55%; top: 5.25%; width: 4.9%; height: 25.6%;
  display: block; padding: 0; margin: 0; gap: 0; background: transparent; border: 0; box-shadow: none; z-index: 27;
}
.yangxin-home-v2 .side-stack .icon-only[data-system-menu] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  background: transparent; border: 0; box-shadow: none; cursor: pointer; transition: background .12s ease;
}
.yangxin-home-v2 .side-stack .icon-only[data-system-menu]:hover { background: rgba(255,246,214,0.16); }
.yangxin-home-v2 .side-stack .icon-only:not([data-system-menu]) { display: none; }

/* ============================================================================
   续104zt-㉛·整改包 P0（Yan 2026-07-04 授权从 P0 开始·⚠ 养心殿排除·像素对齐待 Yan Mac 验）
   全相对定位·纯 CSS 不碰按钮接线（功能完整性靠 jsdom 结构验 + 确定性双跑 不变）
   ============================================================================ */

/* —— P0-02 开局·世界设定：稳态三段栅格 + 正文压缩，防 1280×720 底部裁切 —— */
.setup-screen { grid-template-rows: auto minmax(0, 1fr) auto; }   /* 1fr→minmax(0,1fr)：正文可缩·footer 钤印开局恒在 */
.setup-world { gap: 8px 16px; }
.setup-field { padding: 6px 0; }
.setup-attrs, .setup-realm { padding: 10px 12px; }
.setup-attrs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 12px; }   /* 3→4 列：八属性两行·更矮 */
.setup-attrs-head, .setup-realm-head { margin-bottom: 6px; }
.setup-attrs-actions, .setup-realm-actions { margin-top: 8px; }
.setup-realm { }

/* —— P0-03 开局·角色生成：三张规模卡由竖排改横排（竖排过高→宗亲条/翻阅玉牒被挤下屏）—— */
.setup-role .setup-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.setup-role .setup-card { min-height: 0; }
.setup-role .setup-clan-ctl { margin-top: 12px; }

/* —— P0-04 存档管理：正文顶对齐（不居中·避免上下双向裁切）+ 压缩档格 + 案册纸底 —— */
.save-screen.bureau-screen { justify-content: flex-start; padding: 92px 0 104px; }
.save-screen .bureau-body { width: 100%; overflow: hidden; }
.save-list { gap: 7px; }
.save-slot { padding: 7px 12px; gap: 10px; }
.save-slot-info { font-size: 12px; }
.saves-pager { margin-top: 8px; }
.save-screen::after {   /* 案册纸底纹（轻·置于正文之下） */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background: url("./assets/ui/skins/save-ledger-background.svg") center / cover no-repeat;
}
.save-screen > * { position: relative; z-index: 1; }

/* —— P0-01 通用顶栏头像框（后宫/宫殿/拜访等通用顶栏；养心殿已在 v2 撤头像·不含）—— */
.imperial-status img {
  border-radius: 50%; object-fit: cover; object-position: center top;
  border: 2px solid rgba(201,168,106,0.9);
  box-shadow: 0 0 0 3px rgba(45,40,33,0.6), 0 0 0 5px rgba(201,168,106,0.5), 0 6px 14px rgba(26,22,18,0.28);
}

/* —— P0-05 私宅坊巷：院落卡由暗底改暖纸（语义已修 zt-㉗；此处统一为整改暖玉风）—— */
.residence-screen .house-card {
  background: rgba(247,242,222,0.92); border: 1px solid rgba(120,90,45,0.44);
  box-shadow: 0 4px 10px rgba(40,30,18,0.16);
}
.residence-screen .house-card .house-info span,
.residence-screen .house-card .house-occ { color: #3f3324; }
.residence-screen .house-card.house-empty { background: rgba(206,201,181,0.55); border-style: dashed; }
.residence-screen .house-card.house-empty .house-none,
.residence-screen .house-card.house-empty .house-lock { color: #6a5c44; }

/* ============================================================================
   续104zt-㉜·整改包 P1-04（深层管理页：三枚垂牌撤出正文安全区·Yan 授权·纯 CSS）
   宫侍管理/宫殿修建/诰命调整/皇朝纪事(=.home-panel) 及六尚局/奏折/教坊/储秀宫(=.bureau-screen)
   顶栏「寝宫/地点/私宅」三快捷牌悬挂下探压住表头/输入框/按钮；管理页有独立「返回」不需地点快捷入口→隐藏。
   （无垂牌的页如存档面板本就不挂→此规则于其上为空操作·无害）
   ============================================================================ */
.home-panel .topnav-banners,
.bureau-screen .topnav-banners { display: none; }

/* ============================================================================
   续104zt-㉝·养心殿 v2 热区/文字「实测校正」（据前景 PNG 逐像素实测·修 Yan Mac 反馈：
   精力数字上歪 / 时辰被黑条挡 / 银两位置歪 / 菜单及所有热区歪）
   —— 原 zt-㉚ 用了 Codex metadata 百分比·与实际烘入位置不符(尤其纵向)·此处全部改实测值 ——
   ============================================================================ */
/* 日期：顶行牌面·去黑底黑框（黑条=旧 .home-date 背景）·深墨落浅纸 */
.yangxin-home-v2 .home-date {
  background: transparent; border: 0; box-shadow: none;
  left: 4.6%; top: 6.0%; width: 24%;
}
/* 精力：只显数字·下移进「精力行」·紧随烘入「精力：」之后 */
/* 银两：移入右上银牌（实测 x75.7–85.3 / y4.6–11.8）·牌内居中 */
.yangxin-home-v2 .home-resources { left: 77.3%; right: auto; top: 5.4%; width: 7.5%; text-align: center; }
/* —— 热区实测值（PNG 逐像素）—— */
/* 顶部 地点 / 私宅 */
.yangxin-home-v2 [data-teleport-open]  { left: 32.6%;  top: 4.8%;  width: 4.1%;  height: 23.3%; }
.yangxin-home-v2 [data-residence-open] { left: 38.0%;  top: 4.8%;  width: 4.1%;  height: 23.3%; }
/* 底部一排八钮（row y 76.5–94.8·height 18.3）*/
.yangxin-home-v2 [data-home-control="profile"] { left: 6.70%;  top: 76.5%; width: 9.15%; height: 18.3%; }
.yangxin-home-v2 [data-home-control="dress"]   { left: 16.33%; top: 76.5%; width: 9.15%; height: 18.3%; }
.yangxin-home-v2 [data-home-control="affairs"] { left: 25.96%; top: 76.5%; width: 9.15%; height: 18.3%; }
.yangxin-home-v2 [data-home-control="rest"]    { left: 35.59%; top: 76.5%; width: 9.15%; height: 18.3%; }
.yangxin-home-v2 [data-home-control="harem"]   { left: 45.22%; top: 76.5%; width: 9.15%; height: 18.3%; }
.yangxin-home-v2 [data-home-control="month"]   { left: 54.84%; top: 76.5%; width: 9.16%; height: 18.3%; }
.yangxin-home-v2 [data-home-control="heirs"]   { left: 64.47%; top: 76.5%; width: 9.15%; height: 18.3%; }
.yangxin-home-v2 [data-home-control="save"]    { left: 74.10%; top: 76.5%; width: 9.33%; height: 18.3%; }
/* 外出（右下·实测 x86.7–96.8 / y75.7–99.9）*/
.yangxin-home-v2 [data-map-open] { left: 86.7%; right: auto; top: 75.7%; bottom: auto; width: 10.1%; height: 24.2%; }
/* 菜单（右侧竖牌·实测 x90.4–94.9 / y16.0–49.5）*/

/* ============================================================================
   续104zt-㉞·养心殿 v2「权威定位」总覆写（根因＝旧分层块 4442–4806 用 .home-control[data-...]
   等高特异度选择器 + Codex 错误 metadata%，压过了我 zt-㉝ 的 [data-...]（低一级特异度）→ 热区/文字一直歪。
   此块用「同级/更高特异度 + 更靠后」把全部实测值坐实，并彻底重置文字盒的遗留 padding/子偏移/伪元素。）
   ============================================================================ */
/* —— 底部八钮：匹配 .home-control[data-...] 特异度（实测 top76.5 h18.3）—— */
.yangxin-home-v2 .home-control { top: 76.5%; height: 18.3%; bottom: auto; }
.yangxin-home-v2 .home-control[data-home-control="profile"] { left: 6.70%;  width: 9.15%; }
.yangxin-home-v2 .home-control[data-home-control="dress"]   { left: 16.33%; width: 9.15%; }
.yangxin-home-v2 .home-control[data-home-control="affairs"] { left: 25.96%; width: 9.15%; }
.yangxin-home-v2 .home-control[data-home-control="rest"]    { left: 35.59%; width: 9.15%; }
.yangxin-home-v2 .home-control[data-home-control="harem"]   { left: 45.22%; width: 9.15%; }
.yangxin-home-v2 .home-control[data-home-control="month"]   { left: 54.84%; width: 9.16%; }
.yangxin-home-v2 .home-control[data-home-control="heirs"]   { left: 64.47%; width: 9.15%; }
.yangxin-home-v2 .home-control[data-home-control="save"]    { left: 74.10%; width: 9.33%; }
/* —— 地点/私宅：匹配 .home-tabs .home-tab[data-...] 特异度（实测）—— */
.yangxin-home-v2 .home-tabs .home-tab[data-teleport-open]  { left: 32.6%; top: 4.8%; width: 4.1%; height: 23.3%; }
.yangxin-home-v2 .home-tabs .home-tab[data-residence-open] { left: 38.0%; top: 4.8%; width: 4.1%; height: 23.3%; }
/* —— 外出：定位其容器 .home-goout（实测），按钮填满 —— */
.yangxin-home-v2 .home-goout { left: 86.7%; right: auto; top: 75.7%; bottom: auto; width: 10.1%; height: 24.2%; }
.yangxin-home-v2 .home-exit-button { left: 0; top: 0; width: 100%; height: 100%; }
/* —— 菜单：定位 .side-stack（实测）—— */
.yangxin-home-v2 .side-stack { left: 90.4%; right: auto; top: 16.0%; bottom: auto; width: 4.6%; height: 33.5%; }
/* —— 三处动态文字：彻底重置（清旧 padding/宽高/对齐/子偏移/伪元素）+ 干净定位 —— */
.yangxin-home-v2 .home-date,
.yangxin-home-v2 .home-energy,
.yangxin-home-v2 .home-resources {
  position: absolute; display: flex; align-items: center; justify-content: flex-start;
  width: auto; height: auto; min-height: 0; max-width: none; padding: 0; margin: 0;
  border: 0; box-shadow: none; background: transparent; text-shadow: none; transform: none;
  right: auto; bottom: auto; pointer-events: none; z-index: 40; gap: 4px; color: #3b322a;
}
.yangxin-home-v2 .home-energy::after,
.yangxin-home-v2 .home-energy strong::before { content: none; display: none; }
.yangxin-home-v2 .home-resources > span,
.yangxin-home-v2 .home-resource-treasury { position: static; left: auto; top: auto; padding: 0; margin: 0; transform: none; background: transparent; }
.yangxin-home-v2 .home-energy small,
.yangxin-home-v2 .home-date small { display: none; }
.yangxin-home-v2 .home-date       { left: 4.6%;  top: 6.0%; }
.yangxin-home-v2 .home-energy     { left: 19.5%; top: 13.6%; }
.yangxin-home-v2 .home-resources  { left: 78.5%; top: 5.8%; }
.yangxin-home-v2 .home-date strong, .yangxin-home-v2 .home-date > span,
.yangxin-home-v2 .home-energy strong, .yangxin-home-v2 .home-resources strong {
  position: static; color: #3b322a; text-shadow: none; font-weight: 600;
  font-size: clamp(13px, 1.45vw, 19px); line-height: 1.1;
}

/* ============================================================================
   续104zt-㉟·P1-05/06 深层页「案卷奶油纸」reskin（奏折/州府/天牢/书信/献女/慎刑/太庙/教坊
   + 召见族亲/储秀宫位分页）：把生硬近黑卡片(rgba(22,18,16,.82)/rgba(40,28,18,.5) 等)统一换成
   暖奶油纸卡 + 描金边 + 深墨字，与妃嫔面板/对话框/家书卡同一套暖色，去掉「黑底白框」。
   sz-screen(召见族亲/书信等)补隐顶部垂牌(储秀宫 bureau-screen 已在 zt32 隐)。
   纯 CSS·不改 DOM·不动 确定性双跑。内层浅金/浅褐文字→深色(court.js 内联 #2a7/#b33/#b8860b 在奶油上仍可读)。
   ============================================================================ */
.court-screen.sz-screen .topnav-banners { display: none; }
/* 卡片/行：近黑 → 暖奶油纸 + 金边 + 软投影 */
.court-screen .pref-row,
.court-screen .sz-rrow,
.court-screen .roster-row,
.court-screen .xiu-rank-pick {
  background: linear-gradient(180deg, rgba(249,242,225,0.95), rgba(241,231,207,0.95));
  border: 1px solid rgba(178,142,84,0.55);
  box-shadow: inset 0 1px 0 rgba(255,252,244,0.7), 0 2px 7px rgba(70,48,22,0.16);
  color: #4a3520;
}
.court-screen .pref-row:hover,
.court-screen .sz-rrow:hover,
.court-screen .xiu-rank-pick:hover:not(:disabled) {
  border-color: #b08d47;
  background: linear-gradient(180deg, rgba(252,246,232,0.98), rgba(244,235,213,0.98));
}
/* 头牌 / 详情面板同奶油 */
.court-screen .court-head { background: rgba(249,242,225,0.95); border: 1px solid rgba(178,142,84,0.6); color: #4a3520; }
.court-screen .roster-detail { background: rgba(249,242,225,0.9); border: 1px solid rgba(178,142,84,0.4); color: #4a3520; }
/* 内层文字重上深色（原深底浅金/浅褐）*/
.court-screen .pref-name,
.court-screen .roster-name,
.court-screen .sz-rank-h,
.court-screen .sz-cand-name,
.court-screen .xiu-rank-name { color: #6a4420; }
.court-screen .pref-stat { color: #4a3820; }
.court-screen .pref-world,
.court-screen .roster-meta,
.court-screen .sz-cand-origin,
.court-screen .xiu-rank-meta,
.court-screen .sz-rank-h small,
.court-screen .roster-d-line { color: #6a5636; }
.court-screen .roster-d-line span,
.court-screen .roster-d-extra span { color: #8a6420; }
.court-screen .sz-kids { color: #5a4526; border-color: rgba(178,142,84,0.4); }
.court-screen .roster-entry small { color: rgba(74,52,32,0.7); }
.court-screen .xiu-rank-pager,
.court-screen .roster-pager { color: #4a3520; }
/* 位分品级小牌：暖金牌 + 深字 */
.court-screen .xiu-rank-pin { background: rgba(196,158,86,0.55); color: #4a3210; }
/* 名册「查看」钮：描金边深字 */
.court-screen .roster-view { background: rgba(196,158,86,0.22); border-color: rgba(178,142,84,0.7); color: #6a4a1a; }

/* ============================================================================
   续104zt-㊱·P1-03 事务深层页「卷宗化」（属性/册命诰命/皇朝纪事等 panelShell→.home-panel-body
   + 宫侍管理等 .bureau-sec）：把光字浮暗木底的简陋内容→暖奶油卷宗卡 + 深墨字 + 危险区(遣散/下毒/
   嫁祸等破坏性动作醒目警示) + 空态/说明提对比 + 固定返回(已有 .court-leave)。与 zt35 同一套暖色。
   纯 CSS·不改 DOM·scoped 在 .home-panel-body / .bureau-screen（不碰拜访/人物面板）·细节留 Codex。
   ============================================================================ */
/* 内容分区 → 奶油卷宗卡 */
.home-panel-body .home-panel-id,
.home-panel-body .home-panel-vital,
.home-panel-body .home-panel-attrs,
.home-panel-body .home-panel-harem,
.home-panel-body .home-panel-acts,
.home-panel-body .cfg-table,
.home-panel-body .cfg-head,
.court-screen .bureau-sec {
  background: linear-gradient(180deg, rgba(249,242,225,0.95), rgba(241,231,207,0.95));
  border: 1px solid rgba(178,142,84,0.5);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255,252,244,0.6), 0 2px 7px rgba(70,48,22,0.14);
  padding: 10px 14px; margin: 8px 0; color: #4a3520;
}
/* 内容文字重上深色 */
.home-panel-body,
.home-panel-body .home-panel-vital,
.home-panel-body .hp-name,
.home-panel-body .hp-sub,
.home-panel-body .cfg-name,
.home-panel-body .cfg-rank,
.home-panel-body .mini-stats span { color: #4a3520; }
.home-panel-body .hp-section-title,
.home-panel-body .mini-stats strong { color: #6a4420; font-weight: 600; }
.home-panel-body .hp-note { color: #6a5636; }   /* 空态/说明提对比 */
/* 危险区：破坏性动作（遣散/下毒/嫁祸/嫡杀等）醒目警示 */
.home-panel-body .danger,
.court-screen .court-action.danger,
.court-screen .palace-btn.danger,
.court-screen .mini-btn.danger {
  background: linear-gradient(180deg, rgba(158,58,44,0.96), rgba(122,36,26,0.96));
  border: 1px solid rgba(196,96,80,0.85); color: #ffe6de;
  box-shadow: 0 2px 7px rgba(80,20,12,0.32);
}
.court-screen .court-action.danger:hover,
.court-screen .palace-btn.danger:hover,
.home-panel-body .danger:hover {
  background: linear-gradient(180deg, rgba(178,70,54,0.98), rgba(140,44,32,0.98));
  border-color: #e0a090;
}

/* 续104zt-㊲·姻缘阁候选详情复用 persona-frame：约束其在 sz-body(760px) 内自适应（不溢出）。视觉细节留 Codex。 */
.persona-frame--recruit { width: 100%; max-width: 720px; max-height: none; margin: 0 auto; }

/* ============================================================================
   2026-07-05 · Codex stage-layout authority
   统一坐标系：浏览器视口只承载 #app.game-stage；页面、背景、人物、前景 UI 都相对
   game-stage 定位。文字仍保留在各自组件的 label/title/value 槽位中，不再用 fixed/vw
   脱离组件单独漂浮。
   ============================================================================ */
#app.game-stage > .game-shell,
#app.game-stage > .court-screen,
#app.game-stage > .map-screen,
#app.game-stage > .title-screen,
#app.game-stage > .menu-screen,
#app.game-stage > .intro-screen,
#app.game-stage > .setup-screen,
#app.game-stage > .dialog-screen,
#app.game-stage > .loc-screen {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  margin: 0;
  overflow: hidden;
}

#app.game-stage .dialog-screen,
#app.game-stage .menu-confirm-mask,
#app.game-stage .dialog-box,
#app.game-stage .story-choice-box,
#app.game-stage .verdict-box,
#app.game-stage .setup-prefs-panel,
#app.game-stage .portrait-picker {
  position: absolute;
}

#app.game-stage .dialog-box {
  width: min(1080px, calc(100cqw - 56px));
}

#app.game-stage .story-choice-box,
#app.game-stage .verdict-box {
  left: 0;
  right: 0;
  bottom: 0;
}

/* 通用场景 HUD：相对舞台，不再 fixed 到浏览器右上。 */
#app.game-stage .court-screen .topbar,
#app.game-stage .court-screen .topbar.has-resources {
  max-width: calc(100cqw - 36px);
}

#app.game-stage .court-screen .topbar-core {
  width: clamp(360px, 30cqw, 480px);
  max-width: min(480px, calc(100cqw - 48px));
}

#app.game-stage .court-screen .imperial-status .status-label {
  font-size: clamp(12px, 0.82cqw, 14px);
}

#app.game-stage .court-screen .imperial-status .status-value {
  font-size: clamp(16px, 1.06cqw, 19px);
}

#app.game-stage .court-screen .time-block {
  gap: 3px clamp(10px, 0.8cqw, 16px);
}

#app.game-stage .court-screen .time-block span {
  font-size: clamp(15px, 1.02cqw, 18px);
}

#app.game-stage .court-screen .time-block small {
  font-size: clamp(11px, 0.74cqw, 13px);
}

#app.game-stage .court-screen > .topbar .topnav-banners {
  position: absolute;
  top: 0;
  right: 2.5%;
  left: auto;
  height: 30.5cqh;
  gap: clamp(10px, 0.95cqw, 14px);
}

#app.game-stage .court-screen > .topbar.has-resources .topnav-banners {
  left: min(460px, 31.5cqw);
  right: auto;
}

#app.game-stage .court-screen .navban,
#app.game-stage .court-screen .navban[aria-label="寝宫"] {
  width: clamp(36px, 3cqw, 44px);
  height: 100%;
}

#app.game-stage .court-screen .navban span {
  font-size: clamp(14px, 1cqw, 17px);
}

#app.game-stage .court-screen > .topbar .resource-strip {
  position: absolute;
  top: 2.6cqh;
  right: 9.7cqw;
  width: clamp(220px, 18cqw, 266px);
  height: clamp(58px, 9cqh, 70px);
}

/* 养心殿 v2：背景 / 动态主控 / 前景热区全部落在 stage。 */
#app.game-stage .yangxin-home-v2 {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

#app.game-stage .yangxin-home-v2 .ruler-standee img {
  width: min(72cqw, 1080px);
  max-height: 86cqh;
}

#app.game-stage .yangxin-home-v2 .home-date strong,
#app.game-stage .yangxin-home-v2 .home-date > span,
#app.game-stage .yangxin-home-v2 .home-energy strong,
#app.game-stage .yangxin-home-v2 .home-resources strong {
  font-size: clamp(13px, 1.45cqw, 19px);
}

/* 2026-07-05：养心殿左上状态牌槽位校准。
   以前 date/energy 是 auto 文字盒，文字中心线会飘离前景图横线。
   这里把年月时辰与精力数值落到状态牌内部槽位，槽位中心线按前景图实测坐标对齐。 */
#app.game-stage .yangxin-home-v2 .home-date {
  left: 7.4%;   /* 2026-07-27 Yan「时间歪了」：原 4.6% 起点落进烘焙图莲花座、首字被压——右移避开（预览实测对齐牌面横线） */
  top: 6.28%;
  width: 21%;
  height: 4.45%;
  display: grid;
  grid-template-columns: max-content max-content minmax(3.6cqw, max-content);
  column-gap: 0.48cqw;
  align-items: center;
  justify-content: start;
  padding: 0;
  line-height: 1;
}

#app.game-stage .yangxin-home-v2 .home-date-era,
#app.game-stage .yangxin-home-v2 .home-date-month,
#app.game-stage .yangxin-home-v2 .home-date-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  line-height: 1;
}

#app.game-stage .yangxin-home-v2 .home-date-slot {
  text-align: center;
}

#app.game-stage .yangxin-home-v2 .home-energy {
  left: 18.9%;
  top: 11.95%;
  width: 7.3%;
  height: 4.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

#app.game-stage .yangxin-home-v2 .home-energy-value {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  line-height: 1;
  text-align: center;
}

/* 外出大地图：地图 cover 尺寸相对舞台计算，地点牌仍跟随地图图层。 */
#app.game-stage .palace-map-screen,
#app.game-stage .travel-map-screen {
  width: 100%;
  height: 100%;
  min-height: 0;
}

#app.game-stage .palace-map-stage {
  width: max(100cqw, calc(100cqh * 2.16666667));
  height: max(100cqh, calc(100cqw * 0.46153846));
}

#app.game-stage .travel-map-screen.is-palace { --stage-map-ratio: 2.16666667; --stage-map-inverse: 0.46153846; }
#app.game-stage .travel-map-screen.is-city,
#app.game-stage .travel-map-screen.is-suburbs { --stage-map-ratio: 1.77683316; --stage-map-inverse: 0.56279904; }

#app.game-stage .travel-map-stage {
  width: max(100cqw, calc(100cqh * var(--stage-map-ratio)));
  height: max(100cqh, calc(100cqw * var(--stage-map-inverse)));
}

#app.game-stage .travel-map-marker--palace {
  width: 52px;
  height: 176px;
  min-height: 0;
}

#app.game-stage .travel-map-marker--palace .travel-map-marker__label {
  font-size: clamp(14px, 1.12cqw, 17px);
}

#app.game-stage .travel-map-marker[data-goto="dongxiliugong"] {
  left: 77.4% !important;
  top: 25% !important;
}

#app.game-stage .travel-map-marker[data-map-to="city"] {
  top: 88% !important;
}

#app.game-stage .travel-map-marker--city .travel-map-marker__label,
#app.game-stage .travel-map-marker--suburbs .travel-map-marker__label {
  font-size: clamp(15px, 1.2cqw, 21px);
}

/* 拜访系统：两态统一用 stage 查询单位；文字仍在牌/签内部槽位。 */
#app.game-stage .visit-screen {
  width: 100%;
  height: 100%;
  min-height: 0;
}

#app.game-stage .visit-screen .visit-standee {
  width: min(64cqw, 900px);
  height: calc(100cqh - 96px);
}

#app.game-stage .visit-status-plaque {
  height: 8.35cqw;
}

#app.game-stage .visit-status-plaque .vsp-date {
  font-size: clamp(11px, 0.95cqw, 16px);
}

#app.game-stage .visit-status-plaque .vsp-energy {
  font-size: clamp(11px, 0.88cqw, 15px);
}

#app.game-stage .visit-topnav {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: block;
  pointer-events: none;
}

#app.game-stage .visit-topnav .topnav-banners {
  position: absolute;
  top: 0;
  right: 2.45%;
  left: auto;
  height: 30.5cqh;
  display: flex;
  gap: clamp(8px, 0.8cqw, 12px);
  pointer-events: auto;
}

#app.game-stage .visit-topnav .resource-strip {
  position: absolute;
  top: 2.6%;
  right: 12.5%;
  width: clamp(220px, 18cqw, 266px);
  height: clamp(58px, 9cqh, 70px);
  pointer-events: auto;
}

#app.game-stage .visit-action-panel {
  height: 44.6cqw;
  max-height: 83cqh;
}

#app.game-stage .visit-action-list {
  gap: clamp(6px, 0.7cqh, 12px);
}

#app.game-stage .visit-action-list.is-dense {
  gap: clamp(2px, 0.28cqh, 6px);
}

#app.game-stage .visit-action-list.is-dense .visit-action {
  height: clamp(28px, 4.6cqh, 46px);
}

#app.game-stage .visit-action {
  height: clamp(34px, 6.9cqh, 62px);
}

#app.game-stage .visit-action .va-label {
  font-size: clamp(13px, 1.02cqw, 19px);
}

#app.game-stage .visit-action-list.is-dense .va-label {
  font-size: clamp(11px, 0.85cqw, 15px);
}

#app.game-stage .visit-tool {
  height: clamp(150px, 20cqw, 300px);
}

#app.game-stage .visit-tool .vt-label {
  font-size: clamp(13px, 1cqw, 18px);
}

#app.game-stage .visit-dialog {
  height: 16.9cqw;
  max-height: 30cqh;
}

#app.game-stage .visit-dialog .court-speaker,
#app.game-stage .visit-dialog p {
  font-size: clamp(13px, 1cqw, 18px);
}

#app.game-stage .visit-subpanel {
  width: min(56cqw, 720px);
  max-height: 94cqh;
}

#app.game-stage .visit-subpanel .consort-status {
  gap: clamp(9px, 1.5cqh, 16px);
}

#app.game-stage .visit-subpanel .cs-head {
  font-size: clamp(17px, 1.35cqw, 25px);
}

#app.game-stage .visit-subpanel .cs-sub,
#app.game-stage .visit-subpanel p {
  font-size: clamp(13px, 1cqw, 17px);
}

#app.game-stage .visit-subpanel .palace-btn,
#app.game-stage .visit-subpanel .palace-col-btn,
#app.game-stage .visit-subpanel .mini-btn {
  max-height: clamp(50px, 5.6cqh, 72px);
  font-size: clamp(15px, 1.15cqw, 19px);
}

#app.game-stage .visit-subpanel .cs-attrs li,
#app.game-stage .visit-subpanel .sz-rank-h {
  font-size: clamp(12px, 0.92cqw, 15px);
}

#app.game-stage .visit-entry-menu {
  gap: clamp(14px, 2.9cqh, 30px);
}

#app.game-stage .visit-entry-option {
  height: clamp(64px, 6.5cqw, 118px);
}

#app.game-stage .visit-entry-option .veo-label {
  font-size: clamp(16px, 1.35cqw, 24px);
}

#app.game-stage .visit-entry-note {
  font-size: clamp(11px, 0.9cqw, 15px);
}

/* 事务册簿：主体高度吃满舞台，页内 grid 自己分配安全区，不再靠 hidden 裁掉底部。 */
#app.game-stage .affairs-book-screen {
  width: 100%;
  height: 100%;
  min-height: 0;
}

#app.game-stage .affairs-book-screen .home-panel-body.affairs-book-body {
  position: absolute;
  inset: 0;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  transform: none;
  padding: 0;
}

#app.game-stage .affairs-book {
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(48px, 8%) minmax(0, 1fr) minmax(48px, 8%);
  gap: clamp(12px, 1.5cqw, 24px);
  padding: clamp(96px, 14.2cqh, 116px) clamp(30px, 3.6cqw, 60px) clamp(28px, 4cqh, 48px);
}


#app.game-stage .affairs-book__groups {
  gap: clamp(9px, 1.7cqh, 16px);
}

#app.game-stage .affairs-book__group {
  height: clamp(60px, 7.8cqh, 74px);
  font-size: clamp(16px, 1.2cqw, 19px);
}

#app.game-stage .affairs-book__group--active {
  height: clamp(66px, 8.6cqh, 80px);
}

#app.game-stage .affairs-book__ledger {
  gap: clamp(12px, 1.9cqh, 18px);
}

#app.game-stage .affairs-book__entry {
  gap: clamp(10px, 1.2cqw, 18px);
  min-height: clamp(70px, 9cqh, 86px);
  padding: 0 clamp(16px, 2cqw, 28px) 0 clamp(14px, 1.6cqw, 20px);
}

#app.game-stage .affairs-book__seal {
  width: clamp(34px, 3.2cqw, 46px);
}



#app.game-stage .affairs-book__entry-tag {
  width: clamp(100px, 7.8cqw, 116px);
  height: clamp(36px, 4.6cqh, 44px);
  font-size: clamp(14px, 1.05cqw, 17px);
}

#app.game-stage .affairs-book__entry-tag--danger {
  width: clamp(106px, 8.2cqw, 124px);
  height: clamp(38px, 4.8cqh, 46px);
}

#app.game-stage .affairs-book__aside {
  min-height: clamp(380px, 58cqh, 520px);
  padding: clamp(58px, 7.6cqh, 78px) clamp(28px, 3.2cqw, 48px) clamp(32px, 4.2cqh, 46px);
}

#app.game-stage .affairs-book__aside-title {
  margin-bottom: clamp(18px, 3cqh, 32px);
  font-size: clamp(22px, 1.7cqw, 28px);
}

#app.game-stage .affairs-book__aside-row {
  margin-bottom: clamp(12px, 2cqh, 20px);
  font-size: clamp(15px, 1.15cqw, 18px);
}

#app.game-stage .affairs-book__notice {
  height: clamp(46px, 6.2cqh, 58px);
  font-size: clamp(15px, 1.15cqw, 19px);
}

#app.game-stage .affairs-book-screen .affairs-book__return.court-leave {
  width: clamp(150px, 11cqw, 178px);
  height: clamp(54px, 7.2cqh, 64px);
  padding-left: clamp(20px, 2cqw, 28px);
  font-size: clamp(15px, 1.1cqw, 18px);
}

/* 2026-07-05 NPC 立绘统一填框：小头像已取消，所有 NPC 显示入口按大立绘铺满处理。 */
.persona-standee,
.portrait-preview,
.harem-portrait,
.member-card-portrait,
.favor-card-portrait,
.home-person-portrait,
.choice-portrait,
.house-portrait,
.roster-portrait,
.sz-detail-port,
.sz-cand-port,
.xuanxiu-portrait,
.dress-portrait {
  overflow: hidden;
}

.persona-standee img,
.portrait-preview img,
.harem-portrait img,
.member-card-portrait img,
.favor-card-portrait img,
.home-person-portrait img,
.choice-portrait img,
.house-portrait img,
.roster-portrait img,
.sz-detail-port img,
.sz-cand-port img,
.xuanxiu-portrait img,
.dress-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.persona-standee img,
.portrait-preview img,
.member-card-portrait img,
.harem-portrait img,
.favor-card-portrait img,
.home-person-portrait img {
  object-position: center top;
}

#app.game-stage .visit-screen .visit-standee,
.visit-screen .visit-standee {
  left: 50%;
  bottom: 0;
  width: 100cqw;
  height: 100cqh;
  transform: translateX(-50%);
  overflow: hidden;
}

.visit-screen .visit-standee img,
.consort-visit-standee img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center bottom;
  transform: translateX(3.5%);
  transform-origin: center bottom;
}

/* ============================================================================
   续104zt44·「一句话下旨」(口谕/edict) 界面样式。
   奶油纸卷宗风（与人物面板/事务卷宗同一套暖色）·居中·全局禁滚。纯展示。
   ============================================================================ */
.edict-screen .decree-body {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 4; width: min(720px, 92%); max-height: 76vh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
}
.decree-card {
  width: 100%; box-sizing: border-box;
  background: linear-gradient(180deg, rgba(249,242,225,0.96), rgba(241,231,207,0.96));
  border: 1px solid rgba(178,142,84,0.55); border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,252,244,0.7), 0 6px 20px rgba(70,48,22,0.24);
  padding: 20px 24px; color: #4a3520;
  display: flex; flex-direction: column; gap: 12px;
}
.decree-lead { margin: 0; font-size: 15px; color: #5a4526; line-height: 1.7; letter-spacing: 0.5px; }
.decree-said { margin: 0; font-size: 16px; color: #6a4420; font-weight: 600; letter-spacing: 0.5px; }
.decree-input {
  width: 100%; box-sizing: border-box; resize: none;
  background: rgba(255,252,244,0.82); border: 1px solid rgba(178,142,84,0.5); border-radius: 8px;
  padding: 12px 14px; font-size: 16px; color: #3a2a18; line-height: 1.6;
  font-family: "PingFang SC", system-ui, sans-serif;
}
.decree-input:focus { outline: none; border-color: #b08d47; background: #fffdf6; }
.decree-parsed {
  background: rgba(196,158,86,0.14); border: 1px solid rgba(178,142,84,0.4); border-radius: 8px;
  padding: 12px 16px; text-align: center;
}
.decree-parsed-h { margin: 0 0 6px; font-size: 13px; color: #8a6a34; letter-spacing: 2px; }
.decree-parsed-tool { margin: 0 0 4px; font-size: 20px; color: #6a4420; font-weight: 700; letter-spacing: 1px; }
.decree-parsed-preview { margin: 0; font-size: 16px; color: #4a3520; line-height: 1.6; }
.decree-danger-tag { color: var(--rs-cinnabar); font-size: 13px; font-weight: 700; margin-left: 8px; letter-spacing: 1px; }
.decree-result {
  background: rgba(255,252,244,0.7); border: 1px solid rgba(178,142,84,0.45); border-radius: 8px;
  padding: 14px 16px; font-size: 16px; color: #4a3520; line-height: 1.8; text-align: center;
}
.decree-result.is-fail { background: rgba(139,44,36,0.08); border-color: rgba(139,44,36,0.35); color: #7a2018; }
.decree-reject {
  background: rgba(139,44,36,0.08); border: 1px solid rgba(139,44,36,0.3); border-radius: 8px;
  padding: 14px 16px; font-size: 16px; color: #7a2018; line-height: 1.7; text-align: center;
}
.decree-hint { margin: 0; font-size: 14px; color: #6a5636; text-align: center; }
.decree-note { margin: 4px 0 0; font-size: 12px; color: #8a7350; line-height: 1.6; text-align: center; }
.decree-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
.decree-acts .decree-entry-btn { width: min(320px, 80%); height: clamp(48px, 4.4vw, 72px); flex: 0 0 auto; }
.decree-acts .decree-entry-btn .veo-label { font-size: clamp(16px, 1.3vw, 22px); letter-spacing: 4px; }
.decree-acts .palace-col-btn { min-width: 140px; }
.decree-inline-back { position: static; margin: 0; }
.decree-parsing .decree-hint { font-size: 16px; color: #6a4420; margin-top: 8px; }
/* 朝会六部总览·口谕下旨条：置于六部与退朝之间 */
.court-edict-bar { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 6; }
.court-edict-bar .court-action { min-width: 220px; }

/* ============================================================================
   2026-07-06 Codex：事务深层 / 名册召见 / 储秀宫批量重设
   目标页：妃嫔一览、皇嗣一览、召见大臣、宫殿修建、宫侍管理、位分/爵位/诰命调整、一键晋位、储秀宫三类名册。
   不改数据钩子，只换页面家族、背景安全区和返回语义。
   ============================================================================ */
#app.game-stage .home-panel.affairs-subscreen,
#app.game-stage .heir-ledger-screen,
#app.game-stage .minister-ledger-screen,
#app.game-stage .storexiu-ledger-screen {
  --ledger-ink: #33281f;
  --ledger-muted: #6d5a41;
  --ledger-paper: rgba(249, 244, 226, 0.96);
  --ledger-paper-soft: rgba(239, 231, 205, 0.92);
  --ledger-jade: #aebfac;
  --ledger-jade-deep: #466b5d;
  --ledger-gold: #b88a43;
  --ledger-red: var(--rs-cinnabar);
}

#app.game-stage .home-panel.affairs-subscreen::before,
#app.game-stage .heir-ledger-screen::before,
#app.game-stage .minister-ledger-screen::before,
#app.game-stage .storexiu-ledger-screen::before {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 246, 214, 0.24), transparent 34%),
    linear-gradient(90deg, rgba(24, 18, 13, 0.34), rgba(24, 18, 13, 0.06) 22%, rgba(24, 18, 13, 0.06) 78%, rgba(24, 18, 13, 0.34)),
    linear-gradient(0deg, rgba(36, 24, 14, 0.34), transparent 48%);
}

#app.game-stage .home-panel.affairs-subscreen .topnav-banners,
#app.game-stage .heir-ledger-screen .topnav-banners,
#app.game-stage .minister-ledger-screen .topnav-banners,
#app.game-stage .storexiu-ledger-screen .topnav-banners {
  display: none;
}

#app.game-stage .home-panel.affairs-subscreen .court-head {
  top: clamp(28px, 4.8cqh, 42px);
  left: 50%;
  z-index: 8;
  min-width: clamp(190px, 16cqw, 260px);
  padding: clamp(8px, 1.2cqh, 12px) clamp(32px, 3cqw, 44px);
  transform: translateX(-50%);
  border: 1px solid rgba(184, 138, 67, 0.7);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(246, 237, 205, 0.96), rgba(190, 204, 179, 0.94)),
    linear-gradient(90deg, rgba(139, 44, 36, 0.10), rgba(70, 107, 93, 0.12));
  color: var(--ledger-ink);
  box-shadow: 0 12px 22px rgba(30, 19, 11, 0.22), inset 0 0 0 1px rgba(255, 252, 235, 0.48);
}

#app.game-stage .home-panel.affairs-subscreen .court-head span {
  color: var(--ledger-ink);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
}

#app.game-stage .home-panel.affairs-subscreen .home-panel-body {
  top: clamp(106px, 15cqh, 132px);
  bottom: clamp(78px, 10.5cqh, 104px);
  width: min(1120px, 88cqw);
  max-height: none;
  height: auto;
  box-sizing: border-box;
  overflow: hidden;
  padding: clamp(16px, 2cqh, 24px) clamp(18px, 2.2cqw, 32px);
  border: 1px solid rgba(184, 138, 67, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 251, 235, 0.95), rgba(238, 229, 202, 0.94)),
    linear-gradient(90deg, rgba(78, 111, 96, 0.08), rgba(139, 44, 36, 0.05));
  color: var(--ledger-ink);
  box-shadow:
    0 22px 44px rgba(30, 20, 12, 0.25),
    inset 0 0 0 1px rgba(255, 255, 244, 0.52),
    inset 0 12px 0 rgba(184, 138, 67, 0.08);
}

#app.game-stage .home-panel.affairs-subscreen .cfg-tabs {
  position: relative;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: clamp(8px, 1cqw, 14px);
  margin: 0 0 clamp(10px, 1.5cqh, 16px);
  padding-bottom: 8px;
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 251, 235, 0.76));
}

#app.game-stage .home-panel.affairs-subscreen .cfg-tab,
#app.game-stage .home-panel.affairs-subscreen .palace-btn,
#app.game-stage .home-panel.affairs-subscreen .court-action {
  border-radius: 6px;
  border-color: rgba(70, 107, 93, 0.62);
  background: linear-gradient(180deg, rgba(214, 227, 205, 0.96), rgba(166, 190, 171, 0.94));
  color: #263f35;
  font-weight: 600;
  letter-spacing: 0;
  white-space: normal;
}

#app.game-stage .home-panel.affairs-subscreen .cfg-tab.on,
#app.game-stage .home-panel.affairs-subscreen .cfg-tab.is-active {
  border-color: rgba(184, 138, 67, 0.84);
  background: linear-gradient(180deg, #f2ddae, #dec28a);
  color: #4b3217;
}

#app.game-stage .home-panel.affairs-subscreen .hp-note,
#app.game-stage .home-panel.affairs-subscreen .hp-sub,
#app.game-stage .home-panel.affairs-subscreen .rtbl-count {
  color: var(--ledger-muted);
  line-height: 1.65;
}

#app.game-stage .home-panel.affairs-subscreen .home-panel-id,
#app.game-stage .home-panel.affairs-subscreen .home-panel-vital,
#app.game-stage .home-panel.affairs-subscreen .home-panel-attrs,
#app.game-stage .home-panel.affairs-subscreen .cfg-table,
#app.game-stage .home-panel.affairs-subscreen .sv-block {
  border-radius: 7px;
  border: 1px solid rgba(184, 138, 67, 0.42);
  background: rgba(255, 253, 240, 0.64);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 246, 0.42);
}

#app.game-stage .home-panel.affairs-subscreen .cfg-table {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 0.9cqh, 9px);
  margin-top: clamp(8px, 1.2cqh, 12px);
  padding: clamp(10px, 1.4cqh, 14px);
  overflow: visible;
}

#app.game-stage .home-panel.affairs-subscreen .cfg-row {
  display: grid;
  align-items: center;
  gap: clamp(8px, 1cqw, 14px);
  min-height: clamp(38px, 5.3cqh, 48px);
  padding: 8px clamp(10px, 1.2cqw, 16px);
  border: 1px solid rgba(70, 107, 93, 0.24);
  border-radius: 6px;
  background: rgba(255, 253, 241, 0.72);
  color: var(--ledger-ink);
  text-align: center;
}

#app.game-stage .home-panel.affairs-subscreen .cfg-head {
  position: relative;
  top: auto;
  z-index: 1;
  border-color: rgba(70, 107, 93, 0.52);
  background: linear-gradient(180deg, rgba(89, 130, 112, 0.96), rgba(61, 93, 81, 0.96));
  color: #f7ecd3;
  font-weight: 700;
}

#app.game-stage .home-panel.affairs-subscreen .cfg-head span,
#app.game-stage .home-panel.affairs-subscreen .cfg-rank,
#app.game-stage .home-panel.affairs-subscreen .cfg-name {
  color: inherit;
}

#app.game-stage .rank-ledger-screen .cfg-row {
  grid-template-columns: 0.82fr 1fr 0.78fr 1fr 0.82fr minmax(82px, auto);
}

#app.game-stage .peerage-ledger-screen .cfg-row {
  grid-template-columns: 0.85fr 1.3fr 0.9fr 0.78fr minmax(88px, auto);
}

#app.game-stage .gaoming-ledger-screen .cfg-row-gm {
  grid-template-columns: 0.72fr 1.08fr 0.86fr 0.72fr 0.66fr 0.66fr minmax(82px, auto);
}

#app.game-stage .palace-build-screen .pb-table .cfg-row {
  grid-template-columns: 0.68fr 1fr minmax(220px, 1.9fr) 0.75fr 0.88fr 0.7fr;
}

#app.game-stage .batch-promote-screen .home-panel-id {
  display: grid;
  grid-template-columns: minmax(180px, auto) 1fr;
  gap: 12px;
  align-items: center;
}

#app.game-stage .batch-promote-screen .hp-col-actions,
#app.game-stage .palace-build-screen .hp-col-actions {
  display: flex;
  justify-content: center;
  margin-top: clamp(14px, 2cqh, 22px);
}

#app.game-stage .batch-promote-screen [data-batchpromote-go] {
  min-width: min(380px, 82%);
  min-height: clamp(52px, 6.8cqh, 66px);
  border-color: rgba(139, 44, 36, 0.52);
  background: linear-gradient(180deg, rgba(244, 218, 174, 0.98), rgba(188, 133, 82, 0.96));
  color: #4f251c;
}

#app.game-stage .servants-admin-screen .sv-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding: clamp(12px, 1.6cqh, 16px);
}

#app.game-stage .servants-admin-screen .sv-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(92px, auto) minmax(118px, auto) minmax(96px, auto);
  gap: 10px;
  align-items: center;
  min-height: clamp(40px, 5.3cqh, 50px);
  padding: 8px 12px;
  border: 1px solid rgba(70, 107, 93, 0.24);
  border-radius: 6px;
  background: rgba(255, 253, 241, 0.68);
}

#app.game-stage .servants-admin-screen .sv-label,
#app.game-stage .servants-admin-screen .sv-val {
  color: var(--ledger-ink);
}

#app.game-stage .servants-admin-screen .sv-val {
  font-weight: 700;
  color: #7b4b27;
}

#app.game-stage .affairs-roster-screen .rtbl-wrap {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

#app.game-stage .affairs-roster-screen .rtbl {
  gap: clamp(7px, 1cqh, 10px);
}

#app.game-stage .affairs-roster-screen .rtbl-row {
  min-height: clamp(42px, 5.8cqh, 54px);
  padding: 8px clamp(10px, 1.4cqw, 16px);
  border-color: rgba(70, 107, 93, 0.28);
  background: rgba(255, 253, 241, 0.72);
}

#app.game-stage .affairs-roster-screen .rtbl-head {
  background: linear-gradient(180deg, rgba(89, 130, 112, 0.96), rgba(61, 93, 81, 0.96));
}

#app.game-stage .affairs-roster-screen .rtbl-view {
  min-height: 34px;
}

/* 妃嫔一览：固定视口名册。分页与页内返回共同占位，不靠裁切或滚动容纳超出行。 */
#app.game-stage .home-panel.affairs-subscreen.consort-ledger-screen .home-panel-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(8px, 1.2cqh, 12px);
  overflow: visible;
}

#app.game-stage .consort-ledger-screen .cfg-tabs {
  margin: 0;
  padding-bottom: clamp(5px, 0.8cqh, 8px);
}

#app.game-stage .consort-ledger-screen .rtbl-wrap {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#app.game-stage .consort-ledger-screen .rtbl {
  grid-auto-rows: clamp(38px, 5.1cqh, 48px);
  align-content: start;
  gap: clamp(5px, 0.8cqh, 8px);
}

#app.game-stage .consort-ledger-screen .rtbl-row {
  min-height: 0;
  height: clamp(38px, 5.1cqh, 48px);
  padding: 4px clamp(8px, 1.1cqw, 14px);
  font-size: clamp(12px, 1.7cqh, 14px);
}

#app.game-stage .consort-ledger-screen .rtbl-view {
  min-height: clamp(26px, 3.8cqh, 32px);
  padding: 3px 10px;
}

#app.game-stage .consort-ledger-screen .rtbl-pager {
  min-height: clamp(30px, 4.5cqh, 38px);
  margin-top: clamp(6px, 0.9cqh, 10px);
}

#app.game-stage .consort-ledger-screen .ledger-screen-footer {
  display: flex;
  justify-content: flex-end;
}

#app.game-stage .consort-ledger-screen .ledger-screen-footer .court-leave {
  position: static;
  min-width: clamp(104px, 10cqw, 132px);
  min-height: clamp(32px, 4.8cqh, 42px);
  padding: 6px 18px;
  font-size: clamp(13px, 1.9cqh, 16px);
}

@container (max-height: 460px) {
  #app.game-stage .consort-ledger-screen .home-panel-body {
    gap: 5px;
    padding: 9px 12px;
  }

  #app.game-stage .consort-ledger-screen .rtbl {
    grid-auto-rows: 24px;
    gap: 3px;
  }

  #app.game-stage .consort-ledger-screen .rtbl-row {
    height: 24px;
    padding: 2px 7px;
    font-size: 10px;
  }

  #app.game-stage .consort-ledger-screen .rtbl-view {
    min-height: 19px;
    padding: 1px 7px;
    font-size: 10px;
  }

  #app.game-stage .consort-ledger-screen .rtbl-pager {
    min-height: 22px;
    margin-top: 3px;
    font-size: 11px;
  }

  #app.game-stage .consort-ledger-screen .rtbl-pager .court-action {
    min-width: 66px;
    min-height: 22px;
    padding: 2px 8px;
    font-size: 10px;
  }

  #app.game-stage .consort-ledger-screen .ledger-screen-footer .court-leave {
    min-width: 76px;
    min-height: 24px;
    padding: 3px 12px;
    font-size: 11px;
  }
}

/* 皇嗣一览：皇室玉牒册 */
#app.game-stage .heir-ledger {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: clamp(104px, 14.2cqh, 128px);
  bottom: clamp(78px, 10.5cqh, 104px);
  width: min(1120px, 88cqw);
  transform: translateX(-50%);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.8cqh, 18px);
  padding: clamp(18px, 2.3cqh, 26px) clamp(20px, 2.6cqw, 34px);
  border: 1px solid rgba(184, 138, 67, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 251, 235, 0.95), rgba(238, 229, 202, 0.93)),
    linear-gradient(90deg, rgba(78, 111, 96, 0.08), rgba(139, 44, 36, 0.05));
  box-shadow: 0 22px 44px rgba(30, 20, 12, 0.25), inset 0 0 0 1px rgba(255, 255, 244, 0.52);
}

#app.game-stage .heir-ledger__head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(184, 138, 67, 0.34);
  color: var(--ledger-ink);
}

#app.game-stage .heir-ledger__head span {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
}

#app.game-stage .heir-ledger__head small {
  color: var(--ledger-muted);
  font-size: 15px;
}

#app.game-stage .heir-ledger__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(138px, 12cqw, 178px), 1fr));
  gap: clamp(12px, 1.4cqw, 18px);
  align-content: start;
  flex: 1 1 auto;
  max-height: none;
  overflow: hidden;
  padding: 2px 2px 8px;
}

#app.game-stage .heir-ledger-screen .harem-card {
  width: auto;
  min-width: 0;
  min-height: clamp(238px, 32cqh, 292px);
  border-radius: 8px;
  border-color: rgba(70, 107, 93, 0.62);
  background: linear-gradient(180deg, rgba(255, 253, 241, 0.92), rgba(235, 225, 199, 0.92));
}

#app.game-stage .heir-ledger-screen .harem-portrait {
  width: 100%;
  height: clamp(142px, 20cqh, 182px);
  border-radius: 7px;
}

#app.game-stage .heir-ledger__empty {
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 220px;
  border: 1px dashed rgba(184, 138, 67, 0.46);
  border-radius: 8px;
  background: rgba(255, 253, 241, 0.58);
  color: var(--ledger-muted);
}

/* 召见大臣：御书房召见册 */
#app.game-stage .minister-ledger-screen .sz-body {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: clamp(104px, 14.2cqh, 128px);
  bottom: clamp(78px, 10.5cqh, 104px);
  width: min(1120px, 88cqw);
  max-width: none;
  transform: translateX(-50%);
  box-sizing: border-box;
  /* ★★续zt263·Yan 截图实证「召见大臣没有返回按钮」——按钮其实渲染了，是被这个面板**硬裁**掉了：
     原为定高 absolute + `overflow: hidden`，而内容是 表头 + 8 行 + 翻页条 + 返回钮，
     在 1280×720 一屏里塞不下 → 翻页条被切一半、返回钮整个落在面板外，玩家看起来就是「没有返回」。
     这正违反 2026-07-28 定下的内容可达性硬规则：**动态内容容器不可只靠 overflow:hidden 裁切**。
     修法：面板改纵向 flex——表格区 `min-height:0` 可压缩并在**有界范围内滚读**（2026-07-18 起允许有界滚动），
     翻页条与返回钮作为页脚 `flex-shrink:0` **永远钉在可视区内**。不改任何业务钩子。 */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(18px, 2.3cqh, 26px) clamp(20px, 2.6cqw, 34px);
  border: 1px solid rgba(184, 138, 67, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 251, 235, 0.95), rgba(238, 229, 202, 0.93)),
    linear-gradient(90deg, rgba(78, 111, 96, 0.08), rgba(139, 44, 36, 0.05));
  color: var(--ledger-ink);
  box-shadow: 0 22px 44px rgba(30, 20, 12, 0.25), inset 0 0 0 1px rgba(255, 255, 244, 0.52);
}

/* 名册外壳同样纵向 flex，好让内部表格区吸收剩余高度 */
#app.game-stage .minister-ledger-screen .sz-body .rtbl-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* 表格区：可压缩 + 有界滚动（内容多时滚读，不再被裁） */
#app.game-stage .minister-ledger-screen .sz-body .rtbl-wrap > .rtbl {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* 页脚：说明行 / 翻页条 / 返回钮 恒在可视区内，绝不被裁 */
#app.game-stage .minister-ledger-screen .sz-body .rtbl-count,
#app.game-stage .minister-ledger-screen .sz-body .rtbl-pager,
#app.game-stage .minister-ledger-screen .sz-body .sz-actions {
  flex: 0 0 auto;
}

#app.game-stage .minister-ledger-screen .court-speaker {
  position: static;
  left: auto;
  top: auto;
  max-width: none;
  margin: 0 0 clamp(12px, 1.7cqh, 18px);
  transform: none;
  border-color: rgba(70, 107, 93, 0.34);
  background: rgba(255, 253, 241, 0.62);
  color: var(--ledger-ink);
}

#app.game-stage .minister-ledger-screen .rtbl-row {
  min-height: clamp(42px, 5.8cqh, 54px);
  background: rgba(255, 253, 241, 0.72);
}

#app.game-stage .minister-ledger-screen .rtbl-head {
  background: linear-gradient(180deg, rgba(89, 130, 112, 0.96), rgba(61, 93, 81, 0.96));
}

#app.game-stage .minister-ledger-screen .sz-actions {
  margin-top: clamp(14px, 2cqh, 22px);
}

/* 储秀宫：秀女 / 良家子 / 剧情妃花名册 */
#app.game-stage .storexiu-ledger-screen.bureau-screen {
  justify-content: center;
  padding: clamp(100px, 13.6cqh, 124px) 0 clamp(82px, 10.8cqh, 104px);
}

#app.game-stage .storexiu-ledger-screen .bureau-body.storexiu-ledger {
  width: min(1180px, 90cqw);
  max-height: 100%;
  padding: 0;
  margin: 0 auto;
}

#app.game-stage .storexiu-ledger-screen .storexiu-ledger__panel {
  box-sizing: border-box;
  max-height: calc(100cqh - clamp(188px, 25cqh, 228px));
  overflow: hidden;
  padding: clamp(18px, 2.4cqh, 26px) clamp(18px, 2.5cqw, 32px);
  border: 1px solid rgba(184, 138, 67, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 246, 232, 0.92), rgba(239, 224, 204, 0.9)),
    linear-gradient(90deg, rgba(152, 70, 82, 0.06), rgba(78, 111, 96, 0.08));
  color: var(--ledger-ink);
  box-shadow: 0 22px 44px rgba(42, 22, 18, 0.22), inset 0 0 0 1px rgba(255, 255, 244, 0.48);
}

#app.game-stage .storexiu-ledger-screen .xiu-layout {
  display: grid;
  grid-template-columns: clamp(104px, 9.5cqw, 132px) minmax(0, 1fr);
  gap: clamp(16px, 2cqw, 26px);
  align-items: stretch;
}

#app.game-stage .storexiu-ledger-screen .xiu-cats {
  gap: clamp(10px, 1.6cqh, 16px);
}

#app.game-stage .storexiu-ledger-screen .xiu-cat {
  min-width: 0;
  min-height: clamp(68px, 9cqh, 84px);
  border-radius: 6px;
  border-color: rgba(70, 107, 93, 0.5);
  background: linear-gradient(180deg, rgba(214, 227, 205, 0.96), rgba(166, 190, 171, 0.94));
  color: #263f35;
  box-shadow: 0 8px 15px rgba(39, 23, 14, 0.18), inset 0 0 0 1px rgba(255, 255, 240, 0.35);
}

#app.game-stage .storexiu-ledger-screen .xiu-cat.on {
  border-color: rgba(184, 138, 67, 0.86);
  background: linear-gradient(180deg, #f3dcad, #dfbf82);
  color: #4c3218;
}

#app.game-stage .storexiu-ledger-screen .xiu-cat--story {
  border-color: rgba(139, 44, 36, 0.42);
}

#app.game-stage .storexiu-ledger-screen .bureau-sec-h {
  margin: 0 0 clamp(12px, 1.7cqh, 18px);
  color: #743f27;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}

#app.game-stage .storexiu-ledger-screen .roster-body {
  display: grid;
  grid-template-columns: clamp(150px, 15cqw, 210px) minmax(0, 1fr);
  gap: clamp(12px, 1.6cqw, 20px);
  align-items: stretch;
}

#app.game-stage .storexiu-ledger-screen .roster-list {
  max-height: none;
  min-height: 0;
  flex-basis: auto;
  overflow: hidden;
}

#app.game-stage .storexiu-ledger-screen .roster-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(132px, 13cqw, 180px);
  gap: clamp(12px, 1.6cqw, 20px);
  min-width: 0;
}

#app.game-stage .storexiu-ledger-screen .roster-entry,
#app.game-stage .storexiu-ledger-screen .roster-detail,
#app.game-stage .storexiu-ledger-screen .roster-portrait {
  border-color: rgba(70, 107, 93, 0.34);
  background: rgba(255, 253, 241, 0.72);
  color: var(--ledger-ink);
}

#app.game-stage .storexiu-ledger-screen .roster-entry.is-on {
  border-color: rgba(184, 138, 67, 0.84);
  background: linear-gradient(180deg, rgba(243, 220, 173, 0.96), rgba(224, 194, 138, 0.94));
}

#app.game-stage .storexiu-ledger-screen .roster-d-head,
#app.game-stage .storexiu-ledger-screen .roster-name,
#app.game-stage .storexiu-ledger-screen .roster-d-sec {
  color: #743f27;
}

#app.game-stage .storexiu-ledger-screen .xiu-rank-list {
  max-height: min(58cqh, 470px);
  overflow: hidden;
  gap: 8px;
}

#app.game-stage .storexiu-ledger-screen .xiu-rank-pick {
  min-height: clamp(50px, 6.5cqh, 62px);
  border-color: rgba(70, 107, 93, 0.34);
  background: rgba(255, 253, 241, 0.74);
  color: var(--ledger-ink);
}

#app.game-stage .storexiu-ledger-screen .xiu-rank-pick:hover:not(:disabled) {
  border-color: rgba(184, 138, 67, 0.82);
  background: rgba(255, 249, 226, 0.92);
}

#app.game-stage .storexiu-ledger-screen .xiu-rank-pin {
  background: rgba(184, 138, 67, 0.28);
  color: #5b391b;
}

#app.game-stage .storexiu-ledger-screen .xiu-rank-meta,
#app.game-stage .storexiu-ledger-screen .roster-entry small,
#app.game-stage .storexiu-ledger-screen .roster-d-line,
#app.game-stage .storexiu-ledger-screen .roster-attr {
  color: var(--ledger-muted);
}

#app.game-stage .storyclaim-ledger-screen .xiu-layout {
  display: block;
}

/* ============================================================================
   2026-07-06 Codex：事务无滚动铁律 + 剩余事务页重设
   所有事务/名册超出内容统一翻页，不使用鼠标滚动。
   ============================================================================ */
#app.game-stage .ledger-pager,
#app.game-stage .rtbl-pager,
#app.game-stage .merit-pager,
#app.game-stage .chron-pager,
#app.game-stage .xiu-rank-pager,
#app.game-stage .roster-pgnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 38px;
  margin-top: 10px;
  color: #5a4324;
}

#app.game-stage .ledger-page-num,
#app.game-stage .chron-pageno,
#app.game-stage .rtbl-pager span,
#app.game-stage .xiu-rank-pager span,
#app.game-stage .roster-pageno {
  min-width: 58px;
  text-align: center;
  color: #704b21;
  font-size: 14px;
}

#app.game-stage .ledger-page-btn,
#app.game-stage .rtbl-pager .court-action,
#app.game-stage .merit-pager .palace-btn,
#app.game-stage .chron-pager .palace-btn,
#app.game-stage .xiu-rank-pager .court-action,
#app.game-stage .roster-pgbtn {
  min-width: 92px;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid rgba(92, 126, 105, 0.58);
  background: linear-gradient(180deg, rgba(222, 231, 210, 0.96), rgba(171, 194, 176, 0.94));
  color: #263f35;
  font-size: 14px;
}

#app.game-stage .ledger-page-btn:disabled,
#app.game-stage .rtbl-pager .court-action:disabled,
#app.game-stage .merit-pager .palace-btn:disabled,
#app.game-stage .chron-pager .palace-btn:disabled,
#app.game-stage .xiu-rank-pager .court-action:disabled,
#app.game-stage .roster-pgbtn:disabled {
  opacity: 0.42;
  cursor: default;
}

#app.game-stage .affairs-book-screen {
  background:
    linear-gradient(90deg, rgba(24, 17, 12, 0.68), rgba(24, 17, 12, 0.16) 22%, rgba(24, 17, 12, 0.2) 78%, rgba(24, 17, 12, 0.7)),
    url("./assets/backgrounds/ui-persona-v2.png") center / cover no-repeat;
}

#app.game-stage .affairs-book {
  grid-template-columns: minmax(126px, 14%) minmax(430px, 1fr) minmax(270px, 24%);
  gap: 18px;
  padding: 26px 30px 56px;
  border: 1px solid rgba(183, 139, 74, 0.48);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 232, 0.92), rgba(226, 213, 182, 0.9)),
    linear-gradient(90deg, rgba(87, 124, 105, 0.1), rgba(135, 62, 45, 0.06));
  box-shadow: 0 24px 52px rgba(28, 18, 10, 0.36), inset 0 0 0 1px rgba(255, 255, 242, 0.45);
}

#app.game-stage .affairs-book__groups,
#app.game-stage .affairs-book__ledger,
#app.game-stage .affairs-book__aside {
  overflow: hidden;
}

#app.game-stage .affairs-book__title {
  color: #4a3218;
  font-size: 30px;
  letter-spacing: 0;
}

#app.game-stage .affairs-book__group {
  min-height: 46px;
  border: 1px solid rgba(74, 112, 94, 0.42);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(216, 228, 205, 0.95), rgba(168, 190, 171, 0.93));
  color: #263f35;
  letter-spacing: 0;
}

#app.game-stage .affairs-book__group--active {
  /* 2026-07-27 选中态统一：金黄跳色→青瓷点亮+朱砂左条（H1·与弹窗按钮同语言） */
  border-color: rgba(79, 117, 106, 0.65);
  background: linear-gradient(180deg, #eff4ec, #d8e2d4);
  color: #24382f;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #a74a3a, inset 0 0 0 1.5px rgba(197, 155, 86, 0.3), 0 0 10px rgba(140, 170, 158, 0.35);
}

#app.game-stage .affairs-book__entry {
  min-height: 68px;
  border: 1px solid rgba(74, 112, 94, 0.34);
  border-radius: 7px;
  background: rgba(255, 253, 240, 0.78);
}

#app.game-stage .affairs-book__entry-title,
#app.game-stage .affairs-book__entry-desc,
#app.game-stage .affairs-book__aside-title,
#app.game-stage .affairs-book__aside-row,
#app.game-stage .affairs-book__notice {
  letter-spacing: 0;
}

#app.game-stage .affairs-book__entry-title {
  font-size: 21px;
  color: #503819;
}

#app.game-stage .affairs-book__entry-desc {
  font-size: 14px;
  color: #6d5a41;
}

#app.game-stage .affairs-book__aside {
  border: 1px solid rgba(184, 138, 67, 0.38);
  border-radius: 8px;
  background: rgba(255, 253, 239, 0.68);
}

#app.game-stage .report-ledger-screen .home-panel-body {
  background:
    linear-gradient(180deg, rgba(253, 250, 232, 0.95), rgba(229, 221, 195, 0.94)),
    linear-gradient(90deg, rgba(78, 112, 96, 0.12), rgba(194, 155, 86, 0.08));
}

#app.game-stage .governance-ledger-screen .home-panel-body {
  background:
    linear-gradient(180deg, rgba(252, 249, 232, 0.96), rgba(230, 222, 196, 0.94)),
    linear-gradient(90deg, rgba(65, 100, 96, 0.13), rgba(90, 58, 34, 0.07));
}

#app.game-stage .risk-ledger-screen .home-panel-body {
  border-color: rgba(139, 44, 36, 0.42);
  background:
    linear-gradient(180deg, rgba(253, 246, 232, 0.96), rgba(229, 210, 194, 0.94)),
    linear-gradient(90deg, rgba(139, 44, 36, 0.11), rgba(78, 111, 96, 0.06));
}

#app.game-stage .custom-ledger-screen .home-panel-body {
  background:
    linear-gradient(180deg, rgba(255, 250, 235, 0.96), rgba(231, 223, 200, 0.94)),
    linear-gradient(90deg, rgba(116, 82, 132, 0.08), rgba(78, 111, 96, 0.08));
}

#app.game-stage .lineage-ledger-screen .home-panel-body {
  background:
    linear-gradient(180deg, rgba(253, 250, 232, 0.96), rgba(229, 222, 196, 0.94)),
    linear-gradient(90deg, rgba(184, 138, 67, 0.1), rgba(94, 125, 108, 0.08));
}

#app.game-stage .home-panel.affairs-subscreen .faction-list,
#app.game-stage .home-panel.affairs-subscreen .chron-list,
#app.game-stage .home-panel.affairs-subscreen .cs-saved,
#app.game-stage .home-panel.affairs-subscreen .poison-list,
#app.game-stage .home-panel.affairs-subscreen .poison-targets,
#app.game-stage .home-panel.affairs-subscreen .poison-frames {
  overflow: hidden;
}

#app.game-stage .home-panel.affairs-subscreen .poison-targets,
#app.game-stage .home-panel.affairs-subscreen .poison-frames,
#app.game-stage .home-panel.affairs-subscreen .poison-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#app.game-stage .home-panel.affairs-subscreen .poison-pick,
#app.game-stage .home-panel.affairs-subscreen .poison-target,
#app.game-stage .home-panel.affairs-subscreen .poison-frame {
  min-height: 38px;
  padding: 7px 10px;
}

#app.game-stage .custom-story-screen .cs-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 14px;
}

#app.game-stage .custom-story-screen .cs-choice,
#app.game-stage .custom-story-screen .cc-field {
  min-width: 0;
}

#app.game-stage .custom-story-screen .cs-saved {
  display: grid;
  gap: 8px;
}

#app.game-stage .custom-story-screen .cs-saved-row,
#app.game-stage .chronicle-ledger-screen .chron-row {
  min-height: 38px;
  border: 1px solid rgba(74, 112, 94, 0.24);
  border-radius: 6px;
  background: rgba(255, 253, 241, 0.68);
}

#app.game-stage .heir-ledger__pager {
  margin-top: 4px;
}

/* 2026-07-10：事务四项概览重排。只显示名称、状态、数值与命令，不以浅字或说明长文填空。 */
#app.game-stage .nation-report-screen .home-panel-body {
  overflow: visible;
  padding: clamp(18px, 2.4cqh, 28px) clamp(20px, 2.8cqw, 36px);
}

#app.game-stage .nation-ledger {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(18px, 2.6cqh, 28px);
}

#app.game-stage .nation-ledger__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 clamp(10px, 1.4cqw, 18px) clamp(12px, 1.8cqh, 18px);
  border-bottom: 1px solid rgba(184, 138, 67, 0.44);
}

#app.game-stage .nation-ledger__head span {
  color: #4a3219;
  font-size: clamp(24px, 3.3cqh, 32px);
  font-weight: 700;
}

#app.game-stage .nation-ledger__head b {
  color: #785526;
  font-size: clamp(14px, 2cqh, 18px);
  font-weight: 600;
}

#app.game-stage .nation-ledger__body {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(18px, 2.6cqw, 34px);
  min-height: 0;
}

#app.game-stage .nation-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: clamp(10px, 1.5cqh, 14px);
}

#app.game-stage .nation-stats > div,
#app.game-stage .nation-diplomacy {
  border: 1px solid rgba(84, 119, 101, 0.38);
  border-radius: 7px;
  background: rgba(255, 252, 237, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 249, 0.48);
}

#app.game-stage .nation-stats > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: clamp(76px, 11cqh, 102px);
  padding: clamp(12px, 1.8cqh, 18px);
}

#app.game-stage .nation-stats span,
#app.game-stage .nation-diplomacy__item span {
  color: #5e4930;
  font-size: clamp(14px, 2cqh, 18px);
}

#app.game-stage .nation-stats strong {
  color: #743f27;
  font-size: clamp(24px, 3.7cqh, 36px);
  font-weight: 700;
}

#app.game-stage .nation-diplomacy {
  min-width: 0;
  padding: clamp(14px, 2cqh, 20px);
}

#app.game-stage .nation-diplomacy h2 {
  margin: 0 0 clamp(10px, 1.5cqh, 14px);
  color: #4a3219;
  font-size: clamp(19px, 2.8cqh, 26px);
  letter-spacing: 0;
}

#app.game-stage .nation-diplomacy__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(7px, 1cqh, 10px);
}

#app.game-stage .nation-diplomacy__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: clamp(8px, 1.2cqh, 11px) clamp(9px, 1.2cqw, 12px);
  border-bottom: 1px solid rgba(184, 138, 67, 0.28);
  background: rgba(242, 233, 207, 0.48);
}

#app.game-stage .nation-diplomacy__item strong {
  flex: 0 0 auto;
  color: #763f28;
  font-size: clamp(17px, 2.5cqh, 23px);
}

#app.game-stage .nation-diplomacy__empty {
  color: #5e4930;
  font-size: clamp(15px, 2.1cqh, 19px);
}

#app.game-stage .harem-report-screen .home-panel-body {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5cqh, 16px);
  overflow: visible;
}

#app.game-stage .harem-report-screen .cfg-tabs {
  flex: 0 0 auto;
  margin: 0;
}

#app.game-stage .harem-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.8cqw, 32px);
  min-height: clamp(38px, 5.4cqh, 50px);
  padding: 7px 16px;
  border-top: 1px solid rgba(184, 138, 67, 0.32);
  border-bottom: 1px solid rgba(184, 138, 67, 0.32);
  color: #5d472d;
  font-size: clamp(15px, 2.1cqh, 19px);
}

#app.game-stage .harem-summary b {
  margin-left: 8px;
  color: #763f27;
  font-size: clamp(21px, 3cqh, 28px);
}

#app.game-stage .harem-report-screen .harem-table {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: clamp(6px, 0.9cqh, 9px);
  min-height: 0;
  margin: 0;
}

#app.game-stage .harem-report-screen .harem-table .cfg-row {
  grid-template-columns: minmax(90px, 0.7fr) minmax(0, 2.5fr) minmax(78px, 0.7fr) minmax(78px, 0.7fr);
  min-height: clamp(43px, 5.9cqh, 54px);
}

#app.game-stage .harem-report-screen .harem-table .cfg-row > span {
  min-width: 0;
  color: inherit;
  overflow-wrap: anywhere;
}

#app.game-stage .harem-report-screen .harem-table .cfg-head > span {
  color: #f7ecd3;
}

#app.game-stage .harem-offspring {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.8cqw, 20px);
  padding-top: clamp(12px, 2cqh, 20px);
}

#app.game-stage .harem-offspring > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(126px, 21cqh, 178px);
  border: 1px solid rgba(84, 119, 101, 0.4);
  border-radius: 7px;
  background: rgba(255, 252, 237, 0.8);
}

#app.game-stage .harem-offspring span {
  color: #5e4930;
  font-size: clamp(17px, 2.5cqh, 23px);
}

#app.game-stage .harem-offspring strong {
  margin-top: 8px;
  color: #743f27;
  font-size: clamp(36px, 6cqh, 56px);
}

#app.game-stage .faction-ledger-screen .home-panel-body {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.8cqh, 18px);
  overflow: visible;
}

#app.game-stage .faction-ledger-screen .faction-list {
  flex: 1 1 auto;
  margin: 0;
  overflow: visible;
}

#app.game-stage .faction-card,
#app.game-stage .faction-empty {
  border: 1px solid rgba(84, 119, 101, 0.46);
  border-radius: 8px;
  background: rgba(255, 252, 237, 0.84);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 249, 0.48);
}

#app.game-stage .faction-card {
  overflow: hidden;
}

#app.game-stage .faction-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(13px, 2cqh, 20px) clamp(16px, 2.3cqw, 26px);
  background: linear-gradient(180deg, #5d8877, #3e6658);
}

#app.game-stage .faction-card__title {
  color: #fff4d7;
  font-size: clamp(24px, 3.5cqh, 32px);
  font-weight: 700;
}

#app.game-stage .faction-card__kind,
#app.game-stage .faction-card__stage {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-left: 12px;
  padding: 3px 10px;
  border: 1px solid rgba(255, 241, 205, 0.68);
  border-radius: 4px;
  color: #fff8e6;
  font-size: clamp(13px, 1.9cqh, 17px);
}

#app.game-stage .faction-card__stage {
  margin-left: 0;
  border-color: rgba(184, 138, 67, 0.72);
  background: rgba(255, 244, 214, 0.92);
  color: #513317;
}

#app.game-stage .faction-card__stage.is-alert {
  border-color: var(--rs-cinnabar);
  background: var(--rs-cinnabar);
  color: #fff1df;
}

#app.game-stage .faction-card__metrics {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, minmax(0, 0.8fr));
  border-bottom: 1px solid rgba(184, 138, 67, 0.34);
}

#app.game-stage .faction-card__metrics > span {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: clamp(12px, 1.8cqh, 18px) clamp(12px, 1.8cqw, 18px);
  border-right: 1px solid rgba(184, 138, 67, 0.26);
}

#app.game-stage .faction-card__metrics > span:last-child {
  border-right: 0;
}

#app.game-stage .faction-card__metrics i,
#app.game-stage .faction-card__members dt {
  color: #76522a;
  font-size: clamp(13px, 1.8cqh, 16px);
  font-style: normal;
  font-weight: 700;
}

#app.game-stage .faction-card__metrics b {
  color: #fff0c8;
  font-size: clamp(16px, 2.3cqh, 21px);
  font-weight: 700;
  overflow-wrap: anywhere;
}

#app.game-stage .faction-card__members {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

#app.game-stage .faction-card__members > div {
  display: grid;
  grid-template-columns: clamp(64px, 6cqw, 82px) minmax(0, 1fr);
  gap: 12px;
  padding: clamp(14px, 2cqh, 20px) clamp(16px, 2.3cqw, 24px);
  border-right: 1px solid rgba(184, 138, 67, 0.24);
  border-bottom: 1px solid rgba(184, 138, 67, 0.24);
}

#app.game-stage .faction-card__members > div:nth-child(2n) {
  border-right: 0;
}

#app.game-stage .faction-card__members > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

#app.game-stage .faction-card__members dd {
  margin: 0;
  color: #3f3022;
  font-size: clamp(15px, 2.1cqh, 19px);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

#app.game-stage .faction-empty {
  display: grid;
  min-height: clamp(180px, 31cqh, 270px);
  place-items: center;
  color: #5e4930;
  font-size: clamp(18px, 2.7cqh, 25px);
}

#app.game-stage .chronicle-ledger-screen .home-panel-body {
  display: flex;
  flex-direction: column;
  gap: clamp(9px, 1.3cqh, 14px);
  overflow: visible;
}

#app.game-stage .chronicle-ledger-screen .chronicle-tabs {
  margin: 0;
}

#app.game-stage .chronicle-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 clamp(10px, 1.4cqw, 18px) clamp(9px, 1.3cqh, 13px);
  border-bottom: 1px solid rgba(184, 138, 67, 0.42);
}

#app.game-stage .chronicle-heading span {
  color: #4b3219;
  font-size: clamp(22px, 3.2cqh, 30px);
  font-weight: 700;
}

#app.game-stage .chronicle-heading b {
  color: #7a5426;
  font-size: clamp(14px, 2cqh, 18px);
}

#app.game-stage .chronicle-ledger-screen .chron-add {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

#app.game-stage .chronicle-ledger-screen .chron-add input {
  width: min(360px, 45%);
  min-height: 36px;
  border: 1px solid rgba(84, 119, 101, 0.5);
  border-radius: 5px;
  background: rgba(255, 253, 241, 0.86);
  color: #3c2d20;
  font: inherit;
  padding: 6px 10px;
}

#app.game-stage .chronicle-ledger-screen .chron-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: clamp(6px, 0.9cqh, 9px);
  min-height: 0;
  margin: 0;
  overflow: visible;
}

#app.game-stage .chronicle-ledger-screen .chron-row {
  display: grid;
  grid-template-columns: clamp(135px, 13cqw, 178px) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 1.8cqw, 22px);
  min-height: clamp(47px, 6.5cqh, 60px);
  padding: clamp(9px, 1.3cqh, 13px) clamp(14px, 1.9cqw, 20px);
  border-color: rgba(84, 119, 101, 0.36);
  background: rgba(255, 252, 237, 0.82);
}

#app.game-stage .chronicle-ledger-screen .chron-time {
  color: #775126;
  font-size: clamp(14px, 2cqh, 18px);
  font-weight: 700;
}

#app.game-stage .chronicle-ledger-screen .chron-text {
  color: #35281d;
  font-size: clamp(15px, 2.1cqh, 19px);
  line-height: 1.5;
}

#app.game-stage .chronicle-ledger-screen .chron-row .palace-btn {
  min-width: 42px;
  min-height: 30px;
  padding: 4px 10px;
}

#app.game-stage .chronicle-empty {
  display: grid;
  min-height: clamp(180px, 29cqh, 250px);
  place-items: center;
  border: 1px dashed rgba(184, 138, 67, 0.48);
  border-radius: 7px;
  color: #654a2c;
  font-size: clamp(18px, 2.6cqh, 24px);
}

#app.game-stage .chronicle-ledger-screen .chron-pager {
  margin-top: 0;
}

/* ============================================================================
   2026-07-06 Codex：姻缘阁 / 东西六宫 / 御书房 / 紫宸殿专项重设
   硬规则：不使用鼠标滚动；超出内容以翻页承载。
   ============================================================================ */
#app.game-stage .scene-menu-screen::before,
#app.game-stage .agent-screen::before,
#app.game-stage .yinyuan-sizhai-screen::before,
#app.game-stage .zichen-screen::before {
  background:
    linear-gradient(90deg, rgba(16, 18, 18, 0.72), rgba(16, 18, 18, 0.16) 28%, rgba(16, 18, 18, 0.2) 72%, rgba(16, 18, 18, 0.68)),
    linear-gradient(180deg, rgba(11, 18, 22, 0.22), rgba(66, 36, 24, 0.18));
}

#app.game-stage .petition-ledger-screen::before,
#app.game-stage .dongxiliugong-screen::before,
#app.game-stage .sixpalace-detail-screen::before {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 246, 216, 0.2), transparent 36%),
    linear-gradient(90deg, rgba(34, 26, 18, 0.2), rgba(34, 26, 18, 0.03) 25%, rgba(34, 26, 18, 0.04) 75%, rgba(34, 26, 18, 0.22)),
    linear-gradient(0deg, rgba(48, 28, 16, 0.18), transparent 48%);
}

#app.game-stage .scene-menu-panel {
  position: absolute;
  left: 8%;
  top: 18%;
  z-index: 5;
  width: min(420px, 38vw);
  padding: 22px;
  border: 1px solid rgba(218, 176, 105, 0.48);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 251, 232, 0.92), rgba(221, 214, 186, 0.88)),
    linear-gradient(90deg, rgba(70, 109, 96, 0.12), rgba(151, 60, 48, 0.08));
  box-shadow: 0 24px 52px rgba(22, 15, 10, 0.42), inset 0 0 0 1px rgba(255, 255, 241, 0.4);
  overflow: hidden;
}

#app.game-stage .scene-menu-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  color: #4a3219;
}

#app.game-stage .scene-menu-title span {
  font-size: 30px;
  letter-spacing: 0;
}

#app.game-stage .scene-menu-title small {
  color: #6b583d;
  font-size: 13px;
  letter-spacing: 0;
}

#app.game-stage .scene-menu-screen .palace-list,
#app.game-stage .scene-menu-screen .scene-groups {
  position: static;
  transform: none;
  width: 100%;
  display: grid;
  gap: 10px;
}

#app.game-stage .scene-menu-screen .scene-group {
  padding: 10px;
  border: 1px solid rgba(75, 113, 96, 0.3);
  border-radius: 7px;
  background: rgba(255, 253, 241, 0.56);
}

#app.game-stage .scene-menu-screen .scene-group-h {
  color: #4b715f;
  letter-spacing: 0;
}

#app.game-stage .scene-menu-screen .scene-group-btns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#app.game-stage .scene-menu-screen .palace-btn {
  min-height: 44px;
  border-radius: 6px;
  border-color: rgba(75, 113, 96, 0.48);
  background: linear-gradient(180deg, rgba(234, 239, 222, 0.96), rgba(178, 201, 181, 0.94));
  color: #263f35;
  letter-spacing: 0;
}

#app.game-stage .scene-menu-yinyuan .scene-menu-panel {
  left: auto;
  right: 8%;
  background:
    linear-gradient(180deg, rgba(255, 245, 236, 0.93), rgba(234, 210, 194, 0.88)),
    linear-gradient(90deg, rgba(180, 70, 72, 0.08), rgba(76, 112, 96, 0.1));
}

#app.game-stage .petition-desk {
  width: min(980px, 88vw);
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
}

#app.game-stage .petition-side,
#app.game-stage .petition-main {
  overflow: hidden;
}

#app.game-stage .petition-side {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px 16px;
  border: 1px solid rgba(72, 111, 95, 0.42);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(239, 244, 226, 0.92), rgba(174, 198, 181, 0.9));
  color: #263f35;
}

#app.game-stage .petition-side b {
  font-size: 28px;
  color: #3f2b19;
  letter-spacing: 0;
}

#app.game-stage .petition-side span {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(255, 253, 241, 0.68);
  font-size: 14px;
}

#app.game-stage .petition-main {
  min-height: 476px;
  padding: 16px;
  border-color: rgba(183, 139, 74, 0.44);
  background: linear-gradient(180deg, rgba(255, 252, 238, 0.96), rgba(235, 226, 202, 0.94));
}

#app.game-stage .petition-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

#app.game-stage .petition-toolbar .palace-btn,
#app.game-stage .petition-main .palace-btn {
  border-color: rgba(75, 113, 96, 0.46);
  background: linear-gradient(180deg, rgba(231, 239, 222, 0.96), rgba(172, 198, 179, 0.94));
  color: #263f35;
  letter-spacing: 0;
}

#app.game-stage .petition-main .pet-list {
  display: grid;
  gap: 8px;
  overflow: hidden;
}

#app.game-stage .petition-main .pet-card {
  min-height: 68px;
  border: 1px solid rgba(75, 113, 96, 0.28);
  border-radius: 7px;
  background: rgba(255, 253, 241, 0.86);
  color: #3d2d1c;
}

#app.game-stage .petition-main .pet-card-open {
  min-height: 352px;
  padding: 14px 16px;
}

#app.game-stage .petition-main .pet-card-body {
  max-height: 220px;
  overflow: hidden;
  color: #513b25;
  line-height: 1.7;
}

#app.game-stage .petition-ledger-screen .bureau-note {
  color: #4f3c28;
}

#app.game-stage .agent-screen .sz-body {
  width: min(1120px, 90vw);
  max-width: none;
  padding: 0;
}

#app.game-stage .agent-brief {
  width: min(420px, 86vw);
  margin: 0 auto;
  display: grid;
  gap: 14px;
  padding: 26px;
  border: 1px solid rgba(178, 139, 75, 0.5);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(245, 238, 216, 0.92), rgba(205, 216, 198, 0.88));
  color: #2c3f37;
  text-align: center;
}

#app.game-stage .agent-brief b {
  color: #4a3219;
  font-size: 26px;
  letter-spacing: 0;
}

#app.game-stage .agent-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  overflow: hidden;
}

#app.game-stage .agent-panel {
  min-height: 394px;
  padding: 14px;
  border: 1px solid rgba(178, 139, 75, 0.42);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(247, 241, 219, 0.9), rgba(208, 219, 202, 0.86));
  overflow: hidden;
}

#app.game-stage .agent-panel-h {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 10px;
  color: #4a3219;
  font-size: 18px;
}

#app.game-stage .agent-panel-h small {
  color: #587265;
  font-size: 12px;
  letter-spacing: 0;
}

#app.game-stage .agent-panel .sz-row-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  min-height: 260px;
  overflow: hidden;
}

#app.game-stage .agent-panel .court-action,
#app.game-stage .agent-screen .sz-actions .court-action {
  min-height: 36px;
  border-color: rgba(75, 113, 96, 0.46);
  background: linear-gradient(180deg, rgba(231, 239, 222, 0.95), rgba(174, 199, 181, 0.93));
  color: #263f35;
  letter-spacing: 0;
}

#app.game-stage .yinyuan-sizhai-screen .sz-body {
  width: min(900px, 84cqw);
  max-width: none;
  max-height: 76cqh;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(179, 78, 76, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 246, 237, 0.9), rgba(235, 215, 198, 0.86)),
    linear-gradient(90deg, rgba(180, 70, 72, 0.08), rgba(71, 112, 96, 0.08));
  box-shadow: 0 22px 48px rgba(34, 19, 14, 0.36), inset 0 0 0 1px rgba(255, 255, 242, 0.38);
  overflow: hidden;
}

#app.game-stage .sz-screen-children.yinyuan-sizhai-screen .sz-body {
  width: min(760px, 76cqw);
}

#app.game-stage .sz-screen-recruit.yinyuan-sizhai-screen .sz-body {
  width: min(910px, 86cqw);
}

#app.game-stage .yinyuan-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 4px;
  color: #4d2f25;
}

#app.game-stage .yinyuan-panel-head b {
  font-size: 24px;
  letter-spacing: 0;
}

#app.game-stage .yinyuan-panel-head span {
  color: #6a6550;
  font-size: 14px;
}

#app.game-stage .yinyuan-cards {
  margin: 6px 0;
}

#app.game-stage .yinyuan-sizhai-screen .sz-cands-4 {
  grid-template-columns: repeat(4, minmax(126px, 1fr));
  gap: 9px;
}

#app.game-stage .yinyuan-sizhai-screen .sz-cand,
#app.game-stage .yinyuan-sizhai-screen .sz-rrow {
  border-color: rgba(76, 112, 96, 0.34);
  background: rgba(255, 253, 241, 0.72);
  color: #4a3219;
}

#app.game-stage .yinyuan-sizhai-screen .sz-cand-name,
#app.game-stage .yinyuan-sizhai-screen .roster-name {
  color: #6a322a;
}

#app.game-stage .yinyuan-sizhai-screen .hp-note,
#app.game-stage .yinyuan-sizhai-screen .court-speaker,
#app.game-stage .yinyuan-sizhai-screen .roster-meta {
  color: #665843;
}

#app.game-stage .yinyuan-sizhai-screen .court-action {
  border-color: rgba(179, 78, 76, 0.42);
  background: linear-gradient(180deg, rgba(247, 227, 218, 0.96), rgba(223, 185, 176, 0.94));
  color: #5a2e28;
  letter-spacing: 0;
}

#app.game-stage .yinyuan-sizhai-screen .sz-cand {
  width: auto;
  min-width: 0;
  padding: 8px;
}

#app.game-stage .yinyuan-sizhai-screen .sz-cand-port {
  height: 66px;
}

#app.game-stage .yinyuan-sizhai-screen .sz-cand-origin,
#app.game-stage .yinyuan-sizhai-screen .hp-note {
  font-size: 12px;
  margin: 4px 0;
}

#app.game-stage .yinyuan-sizhai-screen .sz-cand-name {
  font-size: 13px;
  margin-bottom: 2px;
}

#app.game-stage .yinyuan-sizhai-screen .sz-cand-acts {
  margin-top: 5px;
}

#app.game-stage .yinyuan-sizhai-screen .sz-cand-acts-col {
  gap: 5px;
}

#app.game-stage .yinyuan-sizhai-screen .sz-cand-acts .court-action {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}

#app.game-stage .yinyuan-sizhai-screen .sz-actions {
  margin: 6px 0 0;
  gap: 8px;
}

#app.game-stage .yinyuan-sizhai-screen .sz-roster {
  gap: 6px;
}

#app.game-stage .yinyuan-sizhai-screen .sz-rrow {
  min-height: 42px;
  padding: 7px 10px;
}

#app.game-stage .yinyuan-sizhai-screen .sz-pager {
  margin: 3px 0;
}

#app.game-stage .yinyuan-fixed-actions {
  flex: 0 0 auto;
  padding-top: 2px;
}

#app.game-stage .yinyuan-assign-card,
#app.game-stage .yinyuan-empty-state,
#app.game-stage .yinyuan-assign-pill {
  border: 1px solid rgba(76, 112, 96, 0.32);
  border-radius: 7px;
  background: rgba(255, 253, 241, 0.76);
  color: #4a3219;
  text-align: center;
}

#app.game-stage .yinyuan-assign-card {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
}

#app.game-stage .yinyuan-assign-card b {
  color: #6a322a;
  font-size: 20px;
}

#app.game-stage .yinyuan-assign-card span,
#app.game-stage .yinyuan-assign-label {
  color: #665843;
  font-size: 13px;
}

#app.game-stage .yinyuan-assign-label {
  text-align: center;
  margin-top: 2px;
}

#app.game-stage .yinyuan-empty-state,
#app.game-stage .yinyuan-assign-pill {
  padding: 12px 14px;
}

#app.game-stage .yinyuan-lane-grid,
#app.game-stage .yinyuan-rank-grid {
  display: grid;
  gap: 8px;
  overflow: hidden;
}

#app.game-stage .yinyuan-lane-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#app.game-stage .yinyuan-rank-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#app.game-stage .yinyuan-rank-btn {
  min-height: 44px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

#app.game-stage .yinyuan-rank-btn span {
  font-size: 14px;
}

#app.game-stage .yinyuan-rank-btn small {
  color: rgba(90, 46, 40, 0.72);
  font-size: 11px;
  letter-spacing: 0;
}

#app.game-stage .dongxiliugong-list .palace-btn {
  border-color: rgba(218, 176, 105, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 249, 231, 0.92), rgba(223, 229, 210, 0.9)),
    linear-gradient(90deg, rgba(76, 112, 96, 0.08), rgba(176, 82, 63, 0.06));
  color: #46321f;
  box-shadow: 0 10px 24px rgba(24, 17, 12, 0.22);
}

#app.game-stage .dongxiliugong-list .palace-btn:hover {
  border-color: rgba(177, 84, 65, 0.72);
  background: linear-gradient(180deg, rgba(255, 245, 224, 0.96), rgba(231, 214, 190, 0.93));
}

#app.game-stage .sixpalace-board {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 9%;
  z-index: 5;
  padding: 18px 20px;
  border: 1px solid rgba(214, 173, 103, 0.42);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 250, 231, 0.86), rgba(215, 225, 208, 0.82));
  box-shadow: 0 24px 56px rgba(15, 13, 10, 0.4);
  overflow: hidden;
}

#app.game-stage .sixpalace-head,
#app.game-stage .ew-panel-title,
#app.game-stage .zichen-board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  color: #4a3219;
}

#app.game-stage .sixpalace-head b,
#app.game-stage .ew-panel-title b,
#app.game-stage .zichen-board-head b {
  font-size: 28px;
  letter-spacing: 0;
}

#app.game-stage .sixpalace-head span,
#app.game-stage .ew-panel-title span,
#app.game-stage .zichen-board-head span {
  color: #526d60;
  font-size: 14px;
}

#app.game-stage .sixpalace-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

#app.game-stage .sixpalace-card {
  min-height: 92px;
  padding: 10px 8px;
  border: 1px solid rgba(75, 113, 96, 0.38);
  border-radius: 7px;
  background: rgba(255, 253, 241, 0.68);
  color: #3a3022;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

#app.game-stage .sixpalace-card span {
  color: #563622;
  font-size: 18px;
}

#app.game-stage .sixpalace-card small {
  color: #607366;
  font-size: 12px;
  line-height: 1.35;
}

#app.game-stage .sixpalace-card:hover {
  border-color: rgba(177, 84, 65, 0.56);
  background: rgba(255, 244, 228, 0.82);
}

/* 续104zt65·御花园宫斗风声旁白（园景背景上的低调耳语条） */
#app.game-stage .garden-gossip {
  max-width: min(680px, 86vw);
  margin: 10px auto 4px;
  padding: 9px 16px;
  border-left: 2px solid rgba(199, 168, 116, 0.6);
  background: rgba(28, 24, 18, 0.42);
  border-radius: 5px;
  text-align: left;
  backdrop-filter: blur(1.5px);
}
#app.game-stage .garden-gossip .garden-gossip-label {
  display: block;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(214, 196, 150, 0.88);
  margin-bottom: 4px;
}
#app.game-stage .garden-gossip p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(242, 234, 216, 0.92);
  font-style: italic;
}

/* 续104zt67·事件叙事化：事件描述前插入的一句 AI 场景旁白（衬托事件情境·纯展示） */
.event-panel .event-narration {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.7;
  font-style: italic;
  color: rgba(214, 196, 150, 0.9);
  padding-left: 12px;
  border-left: 2px solid rgba(199, 168, 116, 0.55);
}
/* 续104zt67·转月月度旁白：平静月转月提示里附的一句宫闱风声（纯展示） */
.monthly-gossip {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
  font-style: italic;
  color: rgba(214, 196, 150, 0.85);
}

#app.game-stage .sixpalace-qingyan .bureau-body,
#app.game-stage .sixpalace-tanxiang .bureau-body {
  width: min(920px, 84cqw);
  margin: 0 auto;
}

#app.game-stage .ew-function-panel {
  padding: 14px 16px;
  border-color: rgba(183, 139, 74, 0.42);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(232, 229, 205, 0.94));
  overflow: hidden;
}

#app.game-stage .qingyan-panel .ew-pick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-height: 92px;
  overflow: hidden;
}

#app.game-stage .qingyan-panel .ew-pick-btn {
  min-height: 38px;
  padding: 7px 8px;
  border-color: rgba(75, 113, 96, 0.38);
  background: rgba(255, 253, 241, 0.72);
  color: #344d41;
}

#app.game-stage .qingyan-panel .bureau-acts,
#app.game-stage .tanxiang-panel .bureau-acts {
  margin: 7px 0;
}

#app.game-stage .qingyan-panel .ew-pick-btn.is-sel {
  border-color: rgba(177, 84, 65, 0.72);
  background: rgba(239, 210, 188, 0.9);
  color: #5b2f27;
}

#app.game-stage .tanxiang-panel .roster-panel,
#app.game-stage .tanxiang-panel .roster-body,
#app.game-stage .tanxiang-panel .roster-list,
#app.game-stage .tanxiang-panel .roster-main,
#app.game-stage .tanxiang-panel .roster-detail {
  overflow: hidden;
}

#app.game-stage .tanxiang-panel .roster-list {
  max-height: 250px;
}

#app.game-stage .tanxiang-panel .roster-entry,
#app.game-stage .tanxiang-panel .roster-detail,
#app.game-stage .tanxiang-panel .roster-portrait {
  border-color: rgba(75, 113, 96, 0.32);
  background: rgba(255, 253, 241, 0.68);
  color: #3d3022;
}

#app.game-stage .tanxiang-panel .roster-entry {
  padding: 6px 8px;
}

#app.game-stage .tanxiang-panel .roster-detail {
  padding: 8px 10px;
}

#app.game-stage .tanxiang-panel .roster-portrait,
#app.game-stage .tanxiang-panel .roster-portrait img {
  min-height: 180px;
}

#app.game-stage .tanxiang-subtitle {
  margin-top: 12px;
  color: #5a3226;
}

#app.game-stage .tanxiang-panel .xuanxiu-empty {
  color: #4f3c28;
}

#app.game-stage .zichen-screen .zichen-board {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  z-index: 5;
  width: min(1040px, 88vw);
  padding: 18px 20px;
  border: 1px solid rgba(184, 138, 67, 0.44);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 232, 0.9), rgba(219, 226, 207, 0.86)),
    linear-gradient(90deg, rgba(75, 113, 96, 0.1), rgba(126, 56, 42, 0.06));
  box-shadow: 0 24px 56px rgba(24, 17, 12, 0.38);
  overflow: hidden;
}

#app.game-stage .zichen-screen .pref-list {
  position: static;
  transform: none;
  width: 100%;
  max-height: none;
  display: grid;
  gap: 8px;
  overflow: hidden;
}

#app.game-stage .zichen-screen .pref-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 1.2fr 1.2fr repeat(4, minmax(72px, 1fr)) minmax(116px, auto);
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(75, 113, 96, 0.28);
  border-radius: 7px;
  background: rgba(255, 253, 241, 0.72);
  color: #3c2c1c;
}

#app.game-stage .zichen-screen .pref-name {
  color: #5a3226;
  font-size: 18px;
}

#app.game-stage .zichen-screen .pref-world,
#app.game-stage .zichen-screen .pref-stat {
  color: #4f6257;
  font-size: 13px;
}

#app.game-stage .zichen-screen .pref-pager,
#app.game-stage .zichen-screen .ledger-pager {
  position: static;   /* 续104zt70·Yan：覆盖 .pref-pager 基础的 absolute/bottom:9%，让翻页器跟在列表后面(框底·行下方)而非浮在框中央 */
  inset: auto;
  transform: none;
  padding-top: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  color: #4a3219;
}

@media (max-width: 980px) {
  #app.game-stage .scene-menu-panel {
    width: min(420px, 84vw);
    left: 50%;
    right: auto;
    top: 17%;
    transform: translateX(-50%);
  }
  #app.game-stage .petition-desk,
  #app.game-stage .agent-board {
    grid-template-columns: 1fr;
  }
  #app.game-stage .petition-side {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  #app.game-stage .sixpalace-board {
    left: 4%;
    right: 4%;
  }
  #app.game-stage .sixpalace-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #app.game-stage .zichen-screen .pref-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================================
   2026-07-07 Codex 返修：八类共用名册真正换成同一套册簿视觉。
   覆盖旧储秀宫大雾面面板，保留原 data-* 行为与翻页。
   ============================================================================ */
#app.game-stage .shared-roster-ledger-screen.bureau-screen {
  justify-content: center;
  padding: clamp(86px, 11.8cqh, 108px) 0 clamp(70px, 9.4cqh, 90px);
}

#app.game-stage .shared-roster-ledger-screen .shared-ledger-body {
  width: min(1060px, 82cqw);
  max-height: 100%;
  padding: 0;
}

#app.game-stage .shared-roster-ledger-screen .shared-ledger-panel,
#app.game-stage .shared-roster-ledger-screen .storexiu-ledger__panel,
#app.game-stage .shared-roster-ledger-screen .bureau-ledger-panel,
#app.game-stage .shared-roster-ledger-screen .heir-ledger {
  position: relative;
  min-height: clamp(430px, 63cqh, 498px);
  max-height: calc(100cqh - clamp(158px, 21cqh, 196px));
  padding: clamp(14px, 1.9cqh, 19px) clamp(16px, 2cqw, 24px) clamp(16px, 2.2cqh, 22px);
  border: 1px solid rgba(176, 132, 65, 0.68);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(61, 94, 81, 0.96) 0 10px, transparent 10px),
    linear-gradient(90deg, rgba(255, 251, 232, 0.96), rgba(235, 228, 203, 0.95) 52%, rgba(218, 228, 211, 0.92)),
    linear-gradient(180deg, rgba(255, 255, 246, 0.7), rgba(190, 145, 76, 0.1));
  color: #302416;
  box-shadow:
    0 24px 46px rgba(24, 17, 12, 0.34),
    inset 0 0 0 1px rgba(255, 255, 244, 0.55),
    inset 0 18px 0 rgba(176, 132, 65, 0.06);
}

#app.game-stage .shared-roster-ledger-screen .shared-ledger-panel::before,
#app.game-stage .shared-roster-ledger-screen .storexiu-ledger__panel::before,
#app.game-stage .shared-roster-ledger-screen .bureau-ledger-panel::before,
#app.game-stage .shared-roster-ledger-screen .heir-ledger::before {
  content: "";
  position: absolute;
  inset: 10px 10px 10px 20px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(176, 132, 65, 0.24);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(176, 132, 65, 0.18) 0 1px, transparent 1px) 0 0 / 34px 100%,
    linear-gradient(180deg, rgba(75, 113, 96, 0.08), transparent 32%);
}

#app.game-stage .shared-roster-ledger-screen .shared-ledger-panel > *,
#app.game-stage .shared-roster-ledger-screen .storexiu-ledger__panel > *,
#app.game-stage .shared-roster-ledger-screen .bureau-ledger-panel > *,
#app.game-stage .shared-roster-ledger-screen .heir-ledger > * {
  position: relative;
  z-index: 1;
}

#app.game-stage .shared-roster-ledger-screen .shared-ledger-head,
#app.game-stage .shared-roster-ledger-screen .heir-ledger__head {
  min-height: clamp(38px, 5.6cqh, 48px);
  margin: 0 0 clamp(10px, 1.5cqh, 14px);
  padding: 0 clamp(18px, 2.2cqw, 26px) clamp(8px, 1.1cqh, 10px);
  justify-content: flex-start;
  border-bottom: 1px solid rgba(176, 132, 65, 0.34);
  background: linear-gradient(90deg, rgba(255, 255, 246, 0.72), rgba(255, 255, 246, 0));
}

#app.game-stage .shared-roster-ledger-screen .shared-ledger-head span,
#app.game-stage .shared-roster-ledger-screen .heir-ledger__head span {
  color: #442c17;
  font-size: clamp(24px, 3.6cqh, 31px);
  font-weight: 800;
}

#app.game-stage .shared-roster-ledger-screen .shared-ledger-head small,
#app.game-stage .shared-roster-ledger-screen .heir-ledger__head small {
  color: #5b715f;
  font-size: clamp(12px, 1.8cqh, 15px);
  font-weight: 700;
}

#app.game-stage .shared-roster-ledger-screen .xiu-layout {
  display: flex;
  min-height: 0;
  height: calc(100% - clamp(48px, 7cqh, 62px));
  flex-direction: column;
  gap: clamp(10px, 1.4cqh, 14px);
}

#app.game-stage .shared-roster-ledger-screen .xiu-cats,
#app.game-stage .shared-roster-ledger-screen .sz-tabs {
  display: flex;
  width: 100%;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 0 clamp(8px, 1.1cqh, 10px);
  border-bottom: 1px solid rgba(75, 113, 96, 0.18);
}

#app.game-stage .shared-roster-ledger-screen .xiu-cat,
#app.game-stage .shared-roster-ledger-screen .sz-tab {
  width: auto;
  min-width: clamp(112px, 10cqw, 138px);
  min-height: clamp(38px, 5.2cqh, 46px);
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid rgba(75, 113, 96, 0.52);
  background: linear-gradient(180deg, rgba(230, 237, 221, 0.98), rgba(171, 197, 177, 0.96));
  color: #243d33;
  box-shadow: none;
}

#app.game-stage .shared-roster-ledger-screen .xiu-cat b,
#app.game-stage .shared-roster-ledger-screen .xiu-cat small {
  display: inline;
  margin: 0;
}

#app.game-stage .shared-roster-ledger-screen .xiu-cat small {
  padding-left: 8px;
  color: rgba(36, 61, 51, 0.72);
  font-size: 12px;
}

#app.game-stage .shared-roster-ledger-screen .xiu-cat.on,
#app.game-stage .shared-roster-ledger-screen .sz-tab.is-on {
  border-color: rgba(176, 132, 65, 0.88);
  background: linear-gradient(180deg, #f4dbab, #d7b56f);
  color: #462a13;
}

#app.game-stage .shared-roster-ledger-screen .xiu-main {
  min-height: 0;
  flex: 1 1 auto;
}

#app.game-stage .shared-roster-ledger-screen .bureau-sec:not(.shared-ledger-panel) {
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#app.game-stage .shared-roster-ledger-screen .bureau-sec-h {
  margin: 0 0 clamp(8px, 1.1cqh, 12px);
  color: #713c22;
  font-size: clamp(18px, 2.5cqh, 22px);
  text-align: left;
}

#app.game-stage .shared-roster-ledger-screen .roster-panel {
  display: flex;
  min-height: 0;
  height: calc(100% - clamp(32px, 4.8cqh, 44px));
  flex-direction: column;
}

#app.game-stage .shared-roster-ledger-screen .roster-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(190px, 18cqw, 238px) minmax(0, 1fr);
  gap: clamp(12px, 1.5cqw, 18px);
}

#app.game-stage .shared-roster-ledger-screen .roster-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(75, 113, 96, 0.26);
  border-radius: 5px;
  background: rgba(255, 253, 241, 0.58);
}

#app.game-stage .shared-roster-ledger-screen .roster-main {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) clamp(150px, 15cqw, 198px);
  gap: clamp(12px, 1.5cqw, 18px);
}

#app.game-stage .shared-roster-ledger-screen .roster-entry,
#app.game-stage .shared-roster-ledger-screen .roster-detail,
#app.game-stage .shared-roster-ledger-screen .roster-portrait,
#app.game-stage .shared-roster-ledger-screen .roster-empty {
  border-radius: 5px;
  border: 1px solid rgba(75, 113, 96, 0.28);
  background: rgba(255, 254, 244, 0.78);
  color: #302416;
}

#app.game-stage .shared-roster-ledger-screen .roster-entry {
  min-height: clamp(40px, 5.5cqh, 50px);
  padding: 8px 10px;
  text-align: left;
}

#app.game-stage .shared-roster-ledger-screen .roster-entry.is-on {
  border-color: rgba(176, 132, 65, 0.82);
  background: linear-gradient(180deg, rgba(247, 224, 177, 0.98), rgba(220, 190, 132, 0.96));
}

#app.game-stage .shared-roster-ledger-screen .roster-detail {
  min-width: 0;
  padding: clamp(12px, 1.7cqh, 17px) clamp(14px, 1.6cqw, 20px);
  background:
    linear-gradient(180deg, rgba(255, 254, 244, 0.82), rgba(244, 239, 218, 0.78)),
    linear-gradient(90deg, rgba(75, 113, 96, 0.08), transparent 38%);
}

#app.game-stage .shared-roster-ledger-screen .roster-detail-empty,
#app.game-stage .shared-roster-ledger-screen .roster-empty {
  display: grid;
  place-items: center;
  color: #6b5a40;
  font-size: clamp(14px, 2cqh, 17px);
}

#app.game-stage .shared-roster-ledger-screen .roster-empty-slim {
  min-height: 100%;
  font-size: 13px;
  color: rgba(75, 93, 82, 0.72);
}

#app.game-stage .shared-roster-ledger-screen .roster-portrait {
  min-height: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 252, 232, 0.82), rgba(219, 228, 211, 0.58) 58%, rgba(75, 113, 96, 0.16)),
    rgba(255, 253, 241, 0.72);
}

#app.game-stage .shared-roster-ledger-screen .roster-portrait img {
  object-fit: contain;
  object-position: center bottom;
  padding: 6px;
}

#app.game-stage .shared-roster-ledger-screen .roster-actions,
#app.game-stage .shared-roster-ledger-screen .roster-pgnav,
#app.game-stage .shared-roster-ledger-screen .xiu-rank-pager {
  margin-top: clamp(8px, 1.2cqh, 12px);
}

#app.game-stage .shared-roster-ledger-screen .palace-btn,
#app.game-stage .shared-roster-ledger-screen .court-action,
#app.game-stage .shared-roster-ledger-screen .persona-tag,
#app.game-stage .shared-roster-ledger-screen .roster-pgbtn {
  min-height: clamp(34px, 4.7cqh, 42px);
  border-radius: 4px;
  border-color: rgba(75, 113, 96, 0.56);
  background: linear-gradient(180deg, rgba(229, 236, 220, 0.98), rgba(170, 196, 176, 0.96));
  color: #243d33;
  font-weight: 700;
}

#app.game-stage .shared-roster-ledger-screen .court-leave {
  right: clamp(36px, 4.5cqw, 60px);
  bottom: clamp(24px, 3.8cqh, 36px);
  width: clamp(126px, 11cqw, 158px);
  height: clamp(44px, 6.2cqh, 54px);
  border-radius: 6px;
}

#app.game-stage .shared-roster-ledger-screen.storyclaim-ledger-screen .xiu-layout,
#app.game-stage .shared-roster-ledger-screen.jiaofang-ledger-screen .xiu-layout {
  display: block;
  height: auto;
}

/* 剧情妃名册的专属立绘是 16:9 透明横幅；不能继续塞进狭长右栏。
   详情改为上方信息、下方立绘台：按整张原图的高度展示，保留发饰与衣袖。 */
#app.game-stage .storyclaim-ledger-screen .roster-main {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(168px, 0.42fr) minmax(214px, 0.58fr);
  gap: clamp(10px, 1.3cqh, 12px);
}

#app.game-stage .storyclaim-ledger-screen .roster-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  column-gap: clamp(22px, 3cqw, 34px);
  row-gap: 2px;
  padding: clamp(10px, 1.3cqh, 12px) clamp(14px, 1.6cqw, 20px);
}

#app.game-stage .storyclaim-ledger-screen .roster-d-head,
#app.game-stage .storyclaim-ledger-screen .roster-d-sec,
#app.game-stage .storyclaim-ledger-screen .roster-d-attrs {
  grid-column: 1 / -1;
}

#app.game-stage .storyclaim-ledger-screen .roster-d-head {
  margin: 0 0 2px;
}

#app.game-stage .storyclaim-ledger-screen .roster-d-line {
  min-width: 0;
  padding: 0;
  line-height: 1.45;
}

#app.game-stage .storyclaim-ledger-screen .roster-d-line b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .storyclaim-ledger-screen .roster-d-sec {
  margin: 3px 0 0;
}

#app.game-stage .storyclaim-ledger-screen .roster-d-attrs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px clamp(8px, 1.2cqw, 14px);
}

#app.game-stage .storyclaim-ledger-screen .roster-attr {
  min-width: 0;
  white-space: nowrap;
}

#app.game-stage .storyclaim-ledger-screen .roster-portrait {
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 72%, rgba(255, 252, 232, 0.86), rgba(223, 233, 218, 0.66) 54%, rgba(75, 113, 96, 0.18)),
    rgba(255, 253, 241, 0.78);
}

#app.game-stage .storyclaim-ledger-screen .roster-portrait img {
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: contain;
  object-position: center bottom;
}

/* 2026-07-10：传位与剧情妃领取均为高优先级选择页。
   固定行动区与分页区，不能再由名册内容把按钮挤出舞台。 */
#app.game-stage .abdication-ledger-screen {
  --ledger-ink: #33281f;
  --ledger-muted: #6a5636;
}

#app.game-stage .abdication-ledger-screen .topnav-banners {
  display: none;
}

#app.game-stage .abdication-ledger-screen .court-head {
  top: clamp(28px, 4.8cqh, 42px);
  left: 50%;
  z-index: 8;
  min-width: clamp(180px, 16cqw, 236px);
  padding: clamp(8px, 1.2cqh, 12px) clamp(30px, 3cqw, 42px);
  transform: translateX(-50%);
  border: 1px solid rgba(184, 138, 67, 0.7);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(246, 237, 205, 0.96), rgba(190, 204, 179, 0.94));
  color: var(--ledger-ink);
  box-shadow: 0 12px 22px rgba(30, 19, 11, 0.22), inset 0 0 0 1px rgba(255, 252, 235, 0.48);
}

#app.game-stage .abdication-ledger-screen .court-head span {
  color: var(--ledger-ink);
  font-size: clamp(22px, 3cqh, 28px);
  font-weight: 700;
  letter-spacing: 0;
}

#app.game-stage .abdication-ledger-screen .home-panel-body {
  top: clamp(104px, 14.6cqh, 126px);
  bottom: clamp(72px, 9.8cqh, 94px);
  width: min(920px, 80cqw);
  max-height: none;
  height: auto;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: clamp(8px, 1.2cqh, 12px);
  overflow: visible;
  padding: clamp(16px, 2cqh, 22px) clamp(18px, 2.2cqw, 30px);
  border: 1px solid rgba(184, 138, 67, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(238, 229, 202, 0.94)),
    linear-gradient(90deg, rgba(78, 111, 96, 0.09), rgba(139, 44, 36, 0.05));
  color: var(--ledger-ink);
  box-shadow: 0 22px 44px rgba(30, 20, 12, 0.25), inset 0 0 0 1px rgba(255, 255, 244, 0.52);
}

#app.game-stage .abdication-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 clamp(6px, 0.8cqw, 10px) clamp(7px, 1cqh, 10px);
  border-bottom: 1px solid rgba(184, 138, 67, 0.34);
  color: #743f27;
}

#app.game-stage .abdication-heading span {
  font-size: clamp(19px, 2.6cqh, 23px);
  font-weight: 700;
}

#app.game-stage .abdication-heading b {
  color: #5a725f;
  font-size: clamp(13px, 1.8cqh, 15px);
}

#app.game-stage .abdication-list {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.1cqh, 11px);
}

#app.game-stage .abdication-candidate {
  min-width: 0;
  min-height: clamp(72px, 11cqh, 88px);
  display: grid;
  grid-template-columns: clamp(50px, 6.6cqh, 60px) minmax(0, 1fr) minmax(86px, auto);
  align-items: center;
  gap: clamp(9px, 1.1cqw, 12px);
  padding: clamp(8px, 1.1cqh, 10px) clamp(10px, 1.3cqw, 14px);
  border: 1px solid rgba(75, 113, 96, 0.36);
  border-radius: 6px;
  background: rgba(255, 253, 241, 0.78);
  color: #35291d;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 246, 0.42);
}

#app.game-stage .abdication-candidate:hover {
  border-color: rgba(184, 138, 67, 0.9);
  background: linear-gradient(180deg, rgba(255, 246, 220, 0.98), rgba(237, 215, 172, 0.94));
  transform: translateY(-1px);
}

#app.game-stage .abdication-candidate:active {
  transform: translateY(1px);
}

#app.game-stage .abdication-candidate.is-default {
  border-color: rgba(166, 112, 44, 0.88);
  background: linear-gradient(180deg, rgba(249, 230, 187, 0.98), rgba(225, 196, 135, 0.95));
}

#app.game-stage .abdication-candidate__portrait {
  width: clamp(50px, 6.6cqh, 60px);
  height: clamp(50px, 6.6cqh, 60px);
  overflow: hidden;
  border: 1px solid rgba(184, 138, 67, 0.36);
  border-radius: 5px;
  background: radial-gradient(circle at 50% 20%, #fffdf1, #dbe5d7 70%);
}

#app.game-stage .abdication-candidate__portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

#app.game-stage .abdication-candidate__identity {
  min-width: 0;
  display: grid;
  gap: 3px;
}

#app.game-stage .abdication-candidate__identity b {
  min-width: 0;
  overflow: hidden;
  color: #4d2f1c;
  font-size: clamp(17px, 2.4cqh, 21px);
  letter-spacing: 1px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .abdication-candidate__identity small {
  color: #6d5a3c;
  font-size: clamp(12px, 1.7cqh, 14px);
}

#app.game-stage .abdication-candidate em {
  max-width: clamp(76px, 10cqw, 108px);
  overflow: hidden;
  color: #4c6656;
  font-size: clamp(13px, 1.8cqh, 15px);
  font-style: normal;
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .abdication-ledger-screen .ledger-pager,
#app.game-stage .abdication-ledger-screen .abdication-actions,
#app.game-stage .abdication-ledger-screen .ledger-screen-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: clamp(34px, 4.7cqh, 42px);
  margin: 0;
}

#app.game-stage .abdication-ledger-screen .abdication-actions {
  display: none;
}

#app.game-stage .abdication-ledger-screen .ledger-screen-footer .court-leave {
  position: static;
  width: clamp(116px, 10cqw, 148px);
  height: clamp(38px, 5.2cqh, 46px);
  margin: 0;
  transform: none;
}

#app.game-stage .abdication-empty {
  display: grid;
  min-height: 100%;
  place-items: center;
  color: #6d5a3c;
  font-size: clamp(16px, 2.2cqh, 20px);
}

/* 剧情妃领取：固定高度的册页。名册、领取、分页各有独立行，不再彼此挤压。 */
#app.game-stage .storyclaim-ledger-screen .storexiu-ledger__panel {
  height: calc(100cqh - clamp(158px, 21cqh, 196px));
  max-height: none;
}

#app.game-stage .storyclaim-ledger-screen--list .storexiu-ledger__panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: clamp(8px, 1.2cqh, 12px);
}

#app.game-stage .storyclaim-ledger-screen--rank .storexiu-ledger__panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: clamp(8px, 1.1cqh, 11px);
}

#app.game-stage .storyclaim-ledger-screen .shared-ledger-head,
#app.game-stage .storyclaim-ledger-screen .bureau-sec-h,
#app.game-stage .storyclaim-ledger-screen .xiu-rank-pager,
#app.game-stage .storyclaim-ledger-screen .court-actions {
  margin: 0;
}

#app.game-stage .storyclaim-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 clamp(6px, 0.8cqw, 10px) clamp(7px, 1cqh, 10px);
  border-bottom: 1px solid rgba(184, 138, 67, 0.34);
  color: #743f27;
}

#app.game-stage .storyclaim-heading span {
  font-size: clamp(19px, 2.6cqh, 23px);
  font-weight: 700;
}

#app.game-stage .storyclaim-heading b {
  color: #5a725f;
  font-size: clamp(13px, 1.8cqh, 15px);
}

#app.game-stage .storyclaim-ledger-screen--list .roster-panel {
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: clamp(7px, 1cqh, 10px);
}

#app.game-stage .storyclaim-ledger-screen--list .roster-body {
  min-height: 0;
  grid-template-columns: clamp(182px, 16cqw, 214px) minmax(0, 650px);
  justify-content: center;
}

#app.game-stage .storyclaim-ledger-screen--list .roster-list {
  min-height: 0;
  overflow: hidden;
}

#app.game-stage .storyclaim-ledger-screen--list .roster-main {
  grid-template-rows: minmax(156px, 0.4fr) minmax(190px, 0.6fr);
}

#app.game-stage .storyclaim-ledger-screen--list .roster-actions,
#app.game-stage .storyclaim-ledger-screen--list .roster-pgnav {
  min-height: clamp(34px, 4.7cqh, 42px);
  margin: 0;
}

#app.game-stage .storyclaim-ledger-screen--list .roster-actions {
  display: flex;
  justify-content: center;
}

#app.game-stage .storyclaim-ledger-screen--list .xiu-enfeoff-btn {
  min-width: clamp(166px, 15cqw, 210px);
  border-color: rgba(139, 44, 36, 0.72);
  background: linear-gradient(180deg, #b75843, #7f3026);
  color: #fff0d0;
  font-size: clamp(15px, 2cqh, 18px);
  letter-spacing: 2px;
  box-shadow: 0 6px 12px rgba(91, 31, 22, 0.22);
}

#app.game-stage .storyclaim-ledger-screen--list .xiu-enfeoff-btn:hover {
  background: linear-gradient(180deg, #c6674f, #91382b);
  transform: translateY(-1px);
}

#app.game-stage .storyclaim-ledger-screen--list .xiu-enfeoff-btn:active {
  transform: translateY(1px);
}

#app.game-stage .storyclaim-ledger-screen--rank .xiu-rank-list {
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

#app.game-stage .storyclaim-ledger-screen--rank .court-actions {
  position: static;
  top: auto;
  left: auto;
  width: auto;
  transform: none;
  display: flex;
  justify-content: center;
}

/* 2026-07-10：宣政殿共用命令钮改为现成花纹令签。
   文字仍由 DOM 承载，原有 data-* 交互不动；normal / active 使用同组实材。 */
#app.game-stage .court-action {
  min-height: 46px;
  padding: 9px 24px;
  border: 0 !important;
  border-radius: 0 !important;
  background: url("./assets/ui/floral/court-action-normal.png") center / 100% 100% no-repeat !important;
  color: #fff0c8;
  font-family: "Royal Kai", "Songti SC", "STSong", serif;
  font-size: clamp(14px, 2cqh, 17px);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.18;
  text-shadow: 0 1px 1px rgba(46, 27, 13, 0.96), 0 0 3px rgba(46, 27, 13, 0.72);
  box-shadow: none !important;
}

#app.game-stage .court-action:hover:not(:disabled):not([disabled]),
#app.game-stage .court-action.current,
#app.game-stage .court-action.is-on {
  background-image: url("./assets/ui/floral/court-action-active.png") !important;
  color: #fff5d6;
  filter: brightness(1.045);
}

#app.game-stage .court-action:active:not(:disabled):not([disabled]) {
  background-image: url("./assets/ui/floral/court-action-active.png") !important;
  transform: translateY(1px) scale(0.985);
}

#app.game-stage .court-action:disabled,
#app.game-stage .court-action[disabled] {
  background-image: url("./assets/ui/floral/court-action-normal.png") !important;
  opacity: 0.42;
  color: rgba(255, 240, 200, 0.6);
  filter: grayscale(0.7);
}

/* 剧情妃领取：单人见礼页。人物立绘是主体，档案与名签只是辅助；不再使用名册详情的横幅构图。 */
#app.game-stage .storyclaim-intake-screen .storyclaim-intake__panel {
  height: calc(100cqh - clamp(158px, 21cqh, 196px));
  min-height: 0;
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(8px, 1.2cqh, 12px);
  padding: clamp(14px, 1.9cqh, 19px) clamp(18px, 2.3cqw, 28px) clamp(14px, 1.9cqh, 18px);
}

#app.game-stage .storyclaim-intake-screen .storyclaim-intake__head {
  min-height: clamp(34px, 4.8cqh, 42px);
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  padding: 0 clamp(8px, 1cqw, 12px) clamp(8px, 1.1cqh, 10px);
  border-bottom: 1px solid rgba(176, 132, 65, 0.38);
  color: #6d5230;
}

#app.game-stage .storyclaim-intake-screen .storyclaim-intake__head span {
  color: #442c17;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(24px, 3.4cqh, 30px);
  font-weight: 800;
  letter-spacing: 2px;
}

#app.game-stage .storyclaim-intake-screen .storyclaim-intake__head small {
  color: #766040;
  font-size: clamp(13px, 1.8cqh, 15px);
}

#app.game-stage .storyclaim-intake-screen .storyclaim-intake__head b {
  margin-left: auto;
  color: #557362;
  font-size: clamp(14px, 2cqh, 17px);
}

#app.game-stage .storyclaim-intake__body {
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(190px, 18cqw, 236px) minmax(360px, 1fr) clamp(184px, 17.5cqw, 218px);
  gap: clamp(12px, 1.8cqw, 22px);
  align-items: stretch;
}

#app.game-stage .storyclaim-profile,
#app.game-stage .storyclaim-candidates {
  min-width: 0;
  border: 1px solid rgba(106, 135, 113, 0.42);
  background: rgba(255, 253, 240, 0.65);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 246, 0.44);
}

#app.game-stage .storyclaim-profile {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: clamp(12px, 1.7cqh, 16px);
}

#app.game-stage .storyclaim-profile__identity {
  display: grid;
  gap: 2px;
  padding-bottom: clamp(9px, 1.2cqh, 11px);
  border-bottom: 1px solid rgba(176, 132, 65, 0.3);
}

#app.game-stage .storyclaim-profile__identity i {
  color: #9a6b34;
  font-size: clamp(12px, 1.7cqh, 14px);
  font-style: normal;
  letter-spacing: 3px;
}

#app.game-stage .storyclaim-profile__identity h2 {
  margin: 0;
  color: #422a18;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(25px, 3.6cqh, 32px);
  line-height: 1.08;
  letter-spacing: 3px;
}

#app.game-stage .storyclaim-profile__identity span {
  color: #6d593c;
  font-size: clamp(13px, 1.8cqh, 15px);
}

#app.game-stage .storyclaim-profile__fields {
  display: grid;
  align-content: center;
  gap: clamp(7px, 1cqh, 9px);
  margin: 0;
}

#app.game-stage .storyclaim-profile__fields > div {
  display: grid;
  gap: 2px;
  padding: 0 0 clamp(6px, 0.8cqh, 8px);
  border-bottom: 1px solid rgba(116, 91, 52, 0.16);
}

#app.game-stage .storyclaim-profile__fields dt {
  color: #8a6b40;
  font-size: clamp(12px, 1.65cqh, 14px);
}

#app.game-stage .storyclaim-profile__fields dd {
  overflow: hidden;
  margin: 0;
  color: #443323;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(14px, 1.9cqh, 16px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .storyclaim-profile__attrs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding-top: clamp(9px, 1.2cqh, 11px);
}

#app.game-stage .storyclaim-profile__attrs span {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  color: #6d593c;
  font-size: clamp(11px, 1.55cqh, 13px);
}

#app.game-stage .storyclaim-profile__attrs i {
  font-style: normal;
}

#app.game-stage .storyclaim-profile__attrs b {
  color: #6d3c23;
  font-size: clamp(13px, 1.75cqh, 15px);
}

#app.game-stage .storyclaim-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  border-right: 1px solid rgba(176, 132, 65, 0.36);
  border-left: 1px solid rgba(176, 132, 65, 0.36);
  background:
    radial-gradient(ellipse at 50% 60%, rgba(214, 229, 215, 0.68), rgba(255, 252, 237, 0.18) 64%),
    linear-gradient(90deg, rgba(176, 132, 65, 0.1), transparent 12%, transparent 88%, rgba(176, 132, 65, 0.1));
  isolation: isolate;
}

#app.game-stage .storyclaim-stage::before,
#app.game-stage .storyclaim-stage::after {
  content: "";
  position: absolute;
  top: clamp(14px, 2cqh, 20px);
  bottom: clamp(14px, 2cqh, 20px);
  width: 1px;
  background: rgba(176, 132, 65, 0.28);
}

#app.game-stage .storyclaim-stage::before { left: clamp(12px, 1.4cqw, 18px); }
#app.game-stage .storyclaim-stage::after { right: clamp(12px, 1.4cqw, 18px); }

#app.game-stage .storyclaim-stage__plaque {
  position: absolute;
  z-index: 3;
  top: clamp(10px, 1.5cqh, 14px);
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 15px 4px;
  border-bottom: 1px solid rgba(138, 102, 53, 0.46);
  color: #76512a;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(14px, 2cqh, 17px);
  letter-spacing: 4px;
}

#app.game-stage .storyclaim-stage__portrait {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

#app.game-stage .storyclaim-stage__portrait img {
  display: block;
  width: clamp(610px, 50cqw, 740px);
  max-width: none;
  height: auto;
  filter: drop-shadow(0 14px 12px rgba(62, 43, 25, 0.2));
}

#app.game-stage .storyclaim-stage figcaption {
  position: absolute;
  z-index: 3;
  right: clamp(16px, 2cqw, 26px);
  bottom: clamp(12px, 1.6cqh, 16px);
  display: grid;
  justify-items: end;
  gap: 1px;
  padding: 6px 10px;
  border-left: 2px solid rgba(133, 84, 44, 0.64);
  background: rgba(255, 250, 234, 0.66);
}

#app.game-stage .storyclaim-stage figcaption span {
  color: #3f2b1c;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(18px, 2.7cqh, 23px);
  font-weight: 700;
  letter-spacing: 2px;
}

#app.game-stage .storyclaim-stage figcaption b {
  color: #8a6b40;
  font-size: clamp(11px, 1.6cqh, 13px);
  font-weight: 600;
  letter-spacing: 2px;
}

#app.game-stage .storyclaim-candidates {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(8px, 1.1cqh, 10px);
  padding: clamp(10px, 1.4cqh, 13px);
}

#app.game-stage .storyclaim-candidates header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 4px clamp(6px, 0.9cqh, 8px);
  border-bottom: 1px solid rgba(176, 132, 65, 0.3);
}

#app.game-stage .storyclaim-candidates header span {
  color: #5a4324;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(15px, 2.1cqh, 18px);
  font-weight: 700;
}

#app.game-stage .storyclaim-candidates header b {
  color: #557362;
  font-size: clamp(14px, 1.9cqh, 16px);
}

#app.game-stage .storyclaim-name-slips {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: clamp(5px, 0.75cqh, 7px);
}

#app.game-stage .storyclaim-name-slip {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px clamp(8px, 1cqw, 10px);
  border: 1px solid rgba(100, 132, 111, 0.3);
  border-radius: 2px;
  background: rgba(255, 253, 241, 0.72);
  color: #493522;
  cursor: pointer;
  text-align: left;
}

#app.game-stage .storyclaim-name-slip:hover:not(.is-on) {
  border-color: rgba(176, 132, 65, 0.66);
  background: rgba(249, 239, 209, 0.78);
}

#app.game-stage .storyclaim-name-slip.is-on {
  border-color: rgba(148, 92, 47, 0.76);
  background: linear-gradient(90deg, rgba(230, 203, 142, 0.9), rgba(251, 242, 210, 0.84));
  box-shadow: inset 3px 0 0 rgba(139, 76, 39, 0.72);
}

#app.game-stage .storyclaim-name-slip span {
  overflow: hidden;
  color: inherit;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(14px, 2cqh, 17px);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .storyclaim-name-slip small {
  flex: 0 0 auto;
  color: #7b6441;
  font-size: clamp(11px, 1.55cqh, 13px);
}

#app.game-stage .storyclaim-claim {
  min-height: clamp(46px, 6cqh, 52px);
  padding: 7px 18px;
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/floral/court-action-active.png") center / 100% 100% no-repeat;
  color: #fff0cd;
  cursor: pointer;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(16px, 2.2cqh, 19px);
  font-weight: 800;
  letter-spacing: 3px;
  text-shadow: 0 1px 1px rgba(46, 27, 13, 0.96), 0 0 3px rgba(46, 27, 13, 0.72);
}

#app.game-stage .storyclaim-claim:hover { filter: brightness(1.06); transform: translateY(-1px); }
#app.game-stage .storyclaim-claim:active { transform: translateY(1px) scale(0.985); }

#app.game-stage .storyclaim-pager,
#app.game-stage .storyclaim-rank-foot,
#app.game-stage .storyclaim-rank-foot .xiu-rank-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.5cqw, 16px);
  min-height: clamp(38px, 5cqh, 42px);
  margin: 0;
}

#app.game-stage .storyclaim-pager span,
#app.game-stage .storyclaim-rank-foot .xiu-rank-pager span {
  min-width: 54px;
  color: #6d502c;
  font-size: clamp(13px, 1.8cqh, 15px);
  text-align: center;
}

#app.game-stage .storyclaim-pager .court-action,
#app.game-stage .storyclaim-rank-foot .court-action {
  min-width: clamp(94px, 9cqw, 112px);
  min-height: clamp(36px, 4.8cqh, 40px);
  padding: 6px 16px;
}

#app.game-stage .storyclaim-empty {
  display: grid;
  min-height: 0;
  place-items: center;
  color: #6e5636;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(18px, 2.6cqh, 22px);
}

/* 剧情妃择位分沿用同一册页，四行双列，翻页与返回固定留在页脚。 */
#app.game-stage .storyclaim-intake-screen--rank .storyclaim-intake__panel {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

#app.game-stage .storyclaim-rank-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 clamp(8px, 1cqw, 12px) clamp(8px, 1.1cqh, 10px);
  border-bottom: 1px solid rgba(176, 132, 65, 0.3);
}

#app.game-stage .storyclaim-rank-head span {
  color: #49301b;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(19px, 2.7cqh, 23px);
  font-weight: 700;
}

#app.game-stage .storyclaim-rank-head b {
  color: #557362;
  font-size: clamp(14px, 1.9cqh, 16px);
}

#app.game-stage .storyclaim-intake-screen--rank .xiu-rank-list {
  min-height: 0;
  max-height: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 0.9cqh, 8px) clamp(9px, 1.2cqw, 12px);
  padding: 0;
  overflow: hidden;
}

#app.game-stage .storyclaim-intake-screen--rank .xiu-rank-pick {
  min-height: 0;
  padding: clamp(7px, 1cqh, 9px) clamp(9px, 1.3cqw, 13px);
  border-color: rgba(105, 135, 115, 0.4);
  border-radius: 3px;
  background: rgba(255, 253, 241, 0.68);
  color: #453322;
}

#app.game-stage .storyclaim-intake-screen--rank .xiu-rank-pick:hover:not(:disabled) {
  border-color: rgba(176, 132, 65, 0.74);
  background: rgba(248, 236, 203, 0.82);
}

#app.game-stage .storyclaim-intake-screen--rank .xiu-rank-pin { color: #6f4a25; background: rgba(222, 197, 142, 0.48); }
#app.game-stage .storyclaim-intake-screen--rank .xiu-rank-meta { color: #746044; }

#app.game-stage .storyclaim-rank-foot {
  justify-content: space-between;
  padding: 0 clamp(6px, 0.8cqw, 10px);
}

/* 礼部·国家外交：保留三国一页与原命令，只重建可读的数据行与字体层级。 */
#app.game-stage .diplo-screen .diplo-list {
  top: clamp(104px, 13.8cqh, 118px);
  width: min(950px, 86cqw);
  max-height: calc(100cqh - clamp(182px, 24cqh, 214px));
  gap: clamp(8px, 1.1cqh, 10px);
  padding: clamp(12px, 1.6cqh, 15px);
  border-color: rgba(181, 140, 75, 0.64);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.95), rgba(235, 227, 202, 0.93));
}

#app.game-stage .diplo-screen .diplo-intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  padding: 0 clamp(8px, 1.1cqw, 12px) clamp(8px, 1.1cqh, 10px);
  border: 0;
  border-bottom: 1px solid rgba(176, 132, 65, 0.42);
  border-radius: 0;
  background: transparent;
  color: #48321d;
  box-shadow: none;
}

#app.game-stage .diplo-screen .diplo-intro span {
  color: #3f2a18;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(23px, 3.2cqh, 28px);
  font-weight: 800;
  letter-spacing: 3px;
}

#app.game-stage .diplo-screen .diplo-intro b {
  color: #557362;
  font-size: clamp(13px, 1.8cqh, 15px);
}

#app.game-stage .diplo-screen .diplo-row {
  gap: clamp(7px, 1cqh, 9px);
  padding: clamp(10px, 1.45cqh, 13px) clamp(12px, 1.7cqw, 18px);
  border-color: rgba(105, 135, 115, 0.38);
  border-radius: 4px;
  background: rgba(255, 253, 241, 0.74);
  box-shadow: inset 3px 0 0 rgba(96, 134, 114, 0.66), inset 0 0 0 1px rgba(255, 255, 246, 0.5);
}

#app.game-stage .diplo-screen .diplo-head {
  display: grid;
  grid-template-columns: minmax(112px, 1.2fr) repeat(4, max-content);
  align-items: center;
  gap: clamp(8px, 1.2cqw, 14px);
  min-height: 30px;
  color: #5d472d;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(13px, 1.8cqh, 15px);
}

#app.game-stage .diplo-screen .diplo-head b {
  color: #4c2f1b;
  font-size: clamp(20px, 2.8cqh, 24px);
  font-weight: 800;
  letter-spacing: 3px;
}

#app.game-stage .diplo-screen .diplo-head span {
  padding-left: clamp(8px, 1cqw, 11px);
  border-left: 1px solid rgba(160, 121, 62, 0.3);
  color: #6a5638;
  opacity: 1;
  white-space: nowrap;
}

#app.game-stage .diplo-screen .diplo-head__friendly strong { color: #8a4f28; font-size: 1.16em; }



#app.game-stage .diplo-screen .diplo-pager {
  min-height: clamp(40px, 5.3cqh, 46px);
  margin: 0;
}

#app.game-stage .diplo-screen .diplo-pager span {
  color: #6b4e2b;
  font-size: clamp(13px, 1.8cqh, 15px);
}

/* 2026-07-12：礼部·国家外交实机返修。
   有银两时全局三枚快捷牌原本贴在状态牌右缘，会压住首国按钮并截获点击；
   本页把它们移到舞台右上安全区，同时把小字号数据改成高对比正文。 */
#app.game-stage .diplo-screen > .topbar.has-resources .topnav-banners {
  left: calc(100cqw - 190px);
  right: auto;
}

#app.game-stage .diplo-screen .diplo-list {
  top: clamp(156px, 21.5cqh, 174px);
  width: min(920px, calc(100cqw - 300px));
  max-height: calc(100cqh - clamp(210px, 28cqh, 246px));
  background: linear-gradient(180deg, rgba(255, 252, 239, 0.975), rgba(235, 226, 201, 0.965));
  box-shadow: 0 22px 48px rgba(30, 18, 9, 0.32), inset 0 0 0 1px rgba(255, 255, 244, 0.58);
}

#app.game-stage .diplo-screen .diplo-row {
  background: rgba(255, 253, 242, 0.91);
}

#app.game-stage .diplo-screen .diplo-head {
  grid-template-columns: minmax(118px, 1.25fr) repeat(4, max-content);
  gap: clamp(7px, 0.95cqw, 12px);
  color: #382d20;
  font-family: "Royal Sans", "PingFang SC", sans-serif;
  font-size: clamp(14px, 1.9cqh, 16px);
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

#app.game-stage .diplo-screen .diplo-head b {
  color: #402617;
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(21px, 2.9cqh, 25px);
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255, 255, 244, 0.76);
}

#app.game-stage .diplo-screen .diplo-head span {
  color: #443526;
  font-weight: 600;
}

#app.game-stage .diplo-screen .diplo-head__friendly strong {
  color: #8d3f26;
  font-weight: 800;
}

#app.game-stage .diplo-screen .diplo-head__status { color: #355b4b; }
#app.game-stage .diplo-screen .diplo-head__good { color: #674522; }

#app.game-stage .diplo-screen .diplo-acts {
  gap: clamp(6px, 0.75cqw, 8px);
}

#app.game-stage .diplo-screen .diplo-acts .court-action {
  flex: 0 0 clamp(122px, 9.7cqw, 132px);
  width: clamp(122px, 9.7cqw, 132px);
  min-width: 0;
  min-height: clamp(40px, 5.3cqh, 44px);
  padding: 7px 10px;
  color: #fff2cd;
  font-family: "Royal Sans", "PingFang SC", sans-serif;
  font-size: clamp(13px, 1.8cqh, 14.5px);
  font-weight: 700;
  letter-spacing: 0.45px;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(20, 37, 31, 0.98), 0 0 4px rgba(20, 37, 31, 0.72);
}

#app.game-stage .diplo-screen .diplo-acts .court-action[data-foreign-gift-amt] {
  flex: 1 1 0;
  width: auto;
}

/* ============================================================================
   2026-07-11 Codex：地点底景 + 存档阁 + AI 灵机台 + 尚宫献女 + 丹鼎阁
   + 居宁宫宗亲玉牒 + 三档私宅。均为固定舞台，无滚动、无教程文字。
   ============================================================================ */

/* 地点快捷页只换背景，不改现有标题 / 页签 / 网格 / 分页 / 返回布局。 */
#app.game-stage > .loc-screen {
  background:
    linear-gradient(180deg, rgba(4, 15, 16, 0.1), rgba(2, 10, 11, 0.28)),
    url("./assets/backgrounds/teleport-quick-20260711.png") center / cover no-repeat;
}

/* 本批新页命令统一复用既有花纹令签实材，避免再造一套无来源按钮。 */
#app.game-stage :is(.save-command, .ai-oracle-command, .xianmei-command, .xianmei-exit,
  .danding-small, .danding-exit, .juning-command, .juning-small, .estate-command, .estate-small) {
  min-height: 42px;
  padding: 7px 22px;
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/floral/court-action-normal.png") center / 100% 100% no-repeat;
  color: #fff1ca;
  font-family: "Royal Kai", "Songti SC", "STSong", serif;
  font-size: clamp(13px, 1.9cqh, 16px);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(43, 22, 11, 0.95);
  cursor: pointer;
}

#app.game-stage :is(.save-command, .ai-oracle-command, .xianmei-command, .xianmei-exit,
  .danding-small, .danding-exit, .juning-command, .juning-small, .estate-command, .estate-small):hover:not(:disabled) {
  background-image: url("./assets/ui/floral/court-action-active.png");
  color: #fff8df;
  filter: brightness(1.06);
}

#app.game-stage :is(.save-command, .ai-oracle-command, .xianmei-command, .xianmei-exit,
  .danding-small, .danding-exit, .juning-command, .juning-small, .estate-command, .estate-small):active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}

#app.game-stage :is(.save-command, .ai-oracle-command, .xianmei-command, .xianmei-exit,
  .danding-small, .danding-exit, .juning-command, .juning-small, .estate-command, .estate-small):disabled {
  opacity: 0.4;
  filter: grayscale(0.65);
  cursor: default;
}

/* —— 存档阁：快速档为左侧独立案匣，六个编号档为 2×3 固定格。—— */
#app.game-stage > .save-archive-screen {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(24, 8, 3, 0.18), rgba(18, 5, 2, 0.48)),
    var(--scene-bg) center / cover no-repeat;
  color: #3d2819;
  font-family: "Royal Kai", "Songti SC", "STSong", serif;
}

#app.game-stage .save-archive-ledger {
  position: absolute;
  inset: clamp(42px, 6.3cqh, 58px) clamp(74px, 7cqw, 104px) clamp(38px, 5.5cqh, 52px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(10px, 1.5cqh, 14px);
  box-sizing: border-box;
  padding: clamp(16px, 2.2cqh, 22px) clamp(18px, 2.3cqw, 28px);
  border: 1px solid rgba(210, 164, 84, 0.66);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 247, 220, 0.95), rgba(224, 203, 157, 0.93));
  box-shadow: 0 24px 56px rgba(22, 5, 1, 0.48), inset 0 0 0 2px rgba(255, 252, 228, 0.48);
}

#app.game-stage .save-archive-head {
  min-height: clamp(42px, 6cqh, 50px);
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 0 8px clamp(8px, 1.1cqh, 10px);
  border-bottom: 1px solid rgba(133, 83, 35, 0.3);
}

#app.game-stage .save-archive-head span {
  color: #4a2818;
  font-size: clamp(25px, 3.5cqh, 32px);
  font-weight: 800;
  letter-spacing: 4px;
}

#app.game-stage .save-archive-head small {
  color: #86603c;
  font-size: clamp(13px, 1.8cqh, 15px);
  letter-spacing: 2px;
}

#app.game-stage .save-archive-head b {
  margin-left: auto;
  color: #7f382b;
  font-size: clamp(14px, 2cqh, 17px);
}

#app.game-stage .save-archive-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(218px, 19cqw, 270px) minmax(0, 1fr);
  gap: clamp(12px, 1.6cqw, 20px);
}

#app.game-stage .save-archive-quick,
#app.game-stage .save-archive-grid {
  min-width: 0;
  min-height: 0;
}

#app.game-stage .save-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.1cqh, 11px) clamp(10px, 1.1cqw, 14px);
}

#app.game-stage .save-archive-slot {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 5px;
  box-sizing: border-box;
  padding: clamp(9px, 1.25cqh, 12px) clamp(10px, 1.15cqw, 15px);
  border: 1px solid rgba(112, 73, 38, 0.28);
  border-radius: 6px;
  background: rgba(255, 250, 228, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 242, 0.36);
}

#app.game-stage .save-archive-slot.is-filled {
  border-color: rgba(139, 66, 43, 0.54);
  background: linear-gradient(180deg, rgba(255, 238, 197, 0.9), rgba(230, 200, 145, 0.82));
}

#app.game-stage .save-archive-slot.is-quick {
  height: 100%;
  padding: clamp(16px, 2.2cqh, 22px);
  border-color: rgba(139, 66, 43, 0.6);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 242, 191, 0.76), transparent 42%),
    linear-gradient(180deg, rgba(117, 49, 32, 0.92), rgba(63, 29, 23, 0.94));
  color: #fff1ca;
}

#app.game-stage .save-archive-slot header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(125, 79, 38, 0.2);
}

#app.game-stage .save-archive-slot header span {
  color: #673620;
  font-size: clamp(16px, 2.2cqh, 19px);
  font-weight: 800;
  letter-spacing: 2px;
}

#app.game-stage .save-archive-slot header i {
  color: #8e6e48;
  font-size: 11px;
  font-style: normal;
}

#app.game-stage .save-archive-slot.is-quick header {
  border-color: rgba(255, 225, 169, 0.24);
}

#app.game-stage .save-archive-slot.is-quick header span,
#app.game-stage .save-archive-slot.is-quick header i {
  color: #ffe6ad;
}

#app.game-stage .save-archive-slot p {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: #5f4a32;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(11px, 1.55cqh, 13px);
  line-height: 1.45;
  text-overflow: ellipsis;
}

#app.game-stage .save-archive-slot.is-quick p {
  align-self: center;
  color: #f4dfbd;
  font-size: clamp(13px, 1.85cqh, 15px);
  line-height: 1.7;
}

#app.game-stage .save-archive-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

#app.game-stage .save-archive-actions .save-command {
  min-width: 68px;
  min-height: 34px;
  padding: 5px 12px;
  font-size: 13px;
}

#app.game-stage .save-archive-actions .save-del { color: #ffd5c2; }

#app.game-stage .save-archive-foot {
  min-height: 44px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

#app.game-stage .save-archive-pager {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

#app.game-stage .save-archive-pager span {
  min-width: 84px;
  color: #704628;
  font-size: 14px;
  text-align: center;
}

#app.game-stage .save-archive-foot .save-command {
  min-height: 38px;
}

#app.game-stage .save-archive-back {
  grid-column: 3;
  justify-self: end;
  min-width: 112px;
}

/* —— AI 设置：灵机台，不再承载教程段落，只有状态、密钥、模型与命令。—— */
#app.game-stage > .ai-oracle-screen {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(2, 10, 26, 0.1), rgba(2, 8, 22, 0.34)),
    var(--scene-bg) center / cover no-repeat;
  color: #e7dec2;
  font-family: "Royal Kai", "Songti SC", "STSong", serif;
}

#app.game-stage .ai-oracle-console {
  position: absolute;
  inset: clamp(66px, 9.5cqh, 82px) clamp(118px, 12cqw, 180px) clamp(54px, 7.5cqh, 68px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(12px, 1.8cqh, 18px);
  box-sizing: border-box;
  padding: clamp(18px, 2.5cqh, 26px) clamp(22px, 2.8cqw, 34px);
  border: 1px solid rgba(193, 157, 82, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 23, 40, 0.92), rgba(18, 39, 51, 0.88)),
    radial-gradient(circle at 80% 10%, rgba(120, 183, 167, 0.16), transparent 42%);
  box-shadow: 0 28px 60px rgba(0, 4, 13, 0.58), inset 0 0 0 1px rgba(221, 207, 147, 0.18);
}

#app.game-stage .ai-oracle-head {
  min-height: clamp(42px, 6cqh, 50px);
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 0 8px clamp(8px, 1.1cqh, 11px);
  border-bottom: 1px solid rgba(213, 186, 117, 0.28);
}

#app.game-stage .ai-oracle-head span {
  color: #f4e5b7;
  font-size: clamp(25px, 3.5cqh, 32px);
  font-weight: 800;
  letter-spacing: 4px;
}

#app.game-stage .ai-oracle-head small {
  color: #91b9ae;
  font-size: clamp(13px, 1.8cqh, 15px);
  letter-spacing: 2px;
}

#app.game-stage .ai-oracle-head b {
  margin-left: auto;
  color: #d8bb72;
  font-size: clamp(13px, 1.9cqh, 16px);
}

#app.game-stage .ai-oracle-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(190px, 18cqw, 240px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(12px, 1.6cqh, 16px) clamp(14px, 1.8cqw, 22px);
}

#app.game-stage .ai-oracle-switch,
#app.game-stage .ai-oracle-keys,
#app.game-stage .ai-oracle-model {
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid rgba(123, 166, 154, 0.34);
  background: rgba(3, 16, 29, 0.56);
  box-shadow: inset 0 0 0 1px rgba(233, 216, 158, 0.07);
}

#app.game-stage .ai-oracle-switch {
  grid-row: 1 / 3;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: clamp(12px, 1.8cqh, 18px);
  padding: clamp(18px, 2.5cqh, 26px);
}

#app.game-stage .ai-oracle-switch > i,
#app.game-stage :is(.ai-oracle-keys, .ai-oracle-model) > span {
  color: #cdb77c;
  font-size: clamp(14px, 2cqh, 17px);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 2px;
}

#app.game-stage .ai-oracle-toggle {
  width: 100%;
  min-height: clamp(74px, 10cqh, 92px);
  display: grid;
  place-content: center;
  gap: 5px;
  border: 0;
  background: url("./assets/ui/floral/court-action-normal.png") center / 100% 100% no-repeat;
  color: #aec7bd;
  cursor: pointer;
}

#app.game-stage .ai-oracle-toggle.is-on {
  background-image: url("./assets/ui/floral/court-action-active.png");
  color: #e9ffea;
}

#app.game-stage .ai-oracle-toggle span {
  font-family: "Royal Kai", "Songti SC", serif;
  font-size: clamp(17px, 2.5cqh, 22px);
  font-weight: 800;
  letter-spacing: 2px;
}

#app.game-stage .ai-oracle-toggle b {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 3px;
}

#app.game-stage .ai-oracle-switch dl {
  display: grid;
  align-content: end;
  gap: 8px;
  margin: 0;
}

#app.game-stage .ai-oracle-switch dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(179, 155, 91, 0.16);
  font-size: 13px;
}

#app.game-stage .ai-oracle-switch dt { color: #739b94; }
#app.game-stage .ai-oracle-switch dd { margin: 0; color: #e1cf9a; }

#app.game-stage .ai-oracle-keys,
#app.game-stage .ai-oracle-model {
  display: grid;
  gap: 8px;
  padding: clamp(14px, 2cqh, 20px);
}

#app.game-stage .ai-oracle-keys { grid-template-rows: auto minmax(0, 1fr); }

#app.game-stage .ai-oracle-keys textarea,
#app.game-stage .ai-oracle-model input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid rgba(197, 170, 96, 0.38);
  border-radius: 4px;
  outline: none;
  background: rgba(2, 10, 21, 0.72);
  color: #e9e2c8;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: clamp(12px, 1.7cqh, 14px);
}

#app.game-stage .ai-oracle-keys textarea {
  min-height: 0;
  resize: none;
  padding: 12px 14px;
  line-height: 1.55;
}

#app.game-stage .ai-oracle-model input {
  height: 42px;
  padding: 0 14px;
}

#app.game-stage .ai-oracle-keys textarea:focus,
#app.game-stage .ai-oracle-model input:focus {
  border-color: rgba(130, 210, 181, 0.72);
  box-shadow: 0 0 0 2px rgba(106, 201, 170, 0.12);
}

#app.game-stage .ai-oracle-actions {
  min-height: 44px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

#app.game-stage .ai-oracle-actions .ai-oracle-command { min-width: 132px; }
#app.game-stage .ai-oracle-actions .is-primary { min-width: 166px; }

/* —— 尚宫局·朝臣献女：候呈态与单人名帖态分开，不再塞入通用 sz 白框。—— */
#app.game-stage > .xianmei-stage-screen {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(251, 245, 218, 0.06), rgba(54, 35, 24, 0.2)),
    var(--scene-bg) center / cover no-repeat;
  color: #47301e;
  font-family: "Royal Kai", "Songti SC", "STSong", serif;
}

#app.game-stage .xianmei-summon-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(520px, 42cqw);
  min-height: clamp(286px, 40cqh, 334px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-sizing: border-box;
  padding: clamp(24px, 3.2cqh, 34px) clamp(28px, 3.2cqw, 42px);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(153, 103, 49, 0.56);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 251, 233, 0.96), rgba(224, 232, 214, 0.93));
  box-shadow: 0 24px 50px rgba(57, 35, 20, 0.3), inset 0 0 0 1px rgba(255, 255, 244, 0.6);
  text-align: center;
}

#app.game-stage .xianmei-summon-card header {
  display: grid;
  justify-items: center;
  gap: 3px;
}

#app.game-stage .xianmei-summon-card header i {
  color: #557563;
  font-size: 13px;
  font-style: normal;
  letter-spacing: 5px;
}

#app.game-stage .xianmei-summon-card h1 {
  margin: 0;
  color: #5d2e20;
  font-size: clamp(30px, 4.4cqh, 40px);
  letter-spacing: 6px;
}

#app.game-stage .xianmei-summon-card header span {
  color: #887052;
  font-size: 14px;
  letter-spacing: 3px;
}

#app.game-stage .xianmei-summon-seal {
  align-self: center;
  justify-self: center;
  width: clamp(66px, 9cqh, 82px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px double rgba(139, 56, 38, 0.65);
  color: #9a4a35;
  font-size: clamp(28px, 4cqh, 36px);
  font-weight: 800;
  transform: rotate(-4deg);
}

#app.game-stage .xianmei-summon-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

#app.game-stage .xianmei-summon-actions .xianmei-command { min-width: 146px; }
#app.game-stage .xianmei-summon-actions .is-primary { min-width: 184px; }

#app.game-stage .xianmei-stage-head {
  position: absolute;
  z-index: 4;
  top: clamp(26px, 4cqh, 38px);
  left: 50%;
  min-width: clamp(360px, 35cqw, 500px);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  padding: 9px 30px 10px;
  transform: translateX(-50%);
  border: 1px solid rgba(151, 103, 51, 0.6);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 251, 232, 0.96), rgba(210, 226, 207, 0.94));
  box-shadow: 0 12px 26px rgba(68, 42, 25, 0.24);
}

#app.game-stage .xianmei-stage-head span {
  color: #4e2d1d;
  font-size: clamp(24px, 3.4cqh, 31px);
  font-weight: 800;
  letter-spacing: 4px;
}

#app.game-stage .xianmei-stage-head small { color: #5f7d6b; font-size: 14px; }
#app.game-stage .xianmei-stage-head b { color: #8c5533; font-size: 13px; }

#app.game-stage .xianmei-stage-layout {
  position: absolute;
  inset: clamp(94px, 13.2cqh, 112px) clamp(72px, 6.5cqw, 96px) clamp(68px, 9.2cqh, 84px);
  display: grid;
  grid-template-columns: clamp(250px, 23cqw, 310px) minmax(360px, 1fr) clamp(205px, 18cqw, 244px);
  gap: clamp(14px, 1.8cqw, 24px);
  min-height: 0;
}

#app.game-stage .xianmei-dossier,
#app.game-stage .xianmei-rank-board {
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  border: 1px solid rgba(134, 103, 58, 0.42);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 252, 237, 0.9), rgba(225, 232, 214, 0.84));
  box-shadow: 0 16px 34px rgba(66, 43, 27, 0.2), inset 0 0 0 1px rgba(255, 255, 247, 0.46);
}

#app.game-stage .xianmei-dossier {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: clamp(12px, 1.7cqh, 17px);
  padding: clamp(16px, 2.2cqh, 22px);
}

#app.game-stage .xianmei-dossier-house {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 9px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(141, 96, 52, 0.28);
}

#app.game-stage .xianmei-dossier-house i {
  grid-row: 1 / 3;
  align-self: center;
  color: #9b6b3f;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 2px;
}

#app.game-stage .xianmei-dossier-house b { color: #57321f; font-size: 18px; }
#app.game-stage .xianmei-dossier-house span { color: #756044; font-size: 12px; }

#app.game-stage .xianmei-dossier-name { display: grid; gap: 2px; }
#app.game-stage .xianmei-dossier-name small { color: #a45d3a; letter-spacing: 4px; }
#app.game-stage .xianmei-dossier-name h1 { margin: 0; color: #4a291a; font-size: clamp(28px, 4cqh, 36px); letter-spacing: 4px; }
#app.game-stage .xianmei-dossier-name span { color: #725b3d; font-size: 14px; }

#app.game-stage .xianmei-dossier-attrs {
  display: grid;
  align-content: center;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

#app.game-stage .xianmei-dossier-attrs div {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border: 1px solid rgba(91, 126, 105, 0.25);
  background: rgba(255, 253, 241, 0.6);
}

#app.game-stage .xianmei-dossier-attrs dt { color: #7f6b4a; font-size: 12px; }
#app.game-stage .xianmei-dossier-attrs dd { margin: 0; color: #6b3822; font-size: 19px; font-weight: 800; }

#app.game-stage .xianmei-portrait-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-right: 1px solid rgba(145, 94, 50, 0.24);
  border-left: 1px solid rgba(145, 94, 50, 0.24);
  background: radial-gradient(ellipse at 50% 72%, rgba(255, 248, 218, 0.72), rgba(255, 255, 245, 0.06) 66%);
}

#app.game-stage .xianmei-portrait-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

#app.game-stage .xianmei-portrait-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 14px 13px rgba(68, 42, 28, 0.22));
}

#app.game-stage .xianmei-portrait-stage figcaption {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 14px;
  display: grid;
  justify-items: end;
  padding: 6px 10px;
  border-left: 2px solid rgba(141, 73, 43, 0.64);
  background: rgba(255, 250, 232, 0.72);
}

#app.game-stage .xianmei-portrait-stage figcaption span { color: #4e2d1d; font-size: 20px; font-weight: 800; letter-spacing: 2px; }
#app.game-stage .xianmei-portrait-stage figcaption small { color: #8a6a42; }

#app.game-stage .xianmei-rank-board {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: clamp(14px, 2cqh, 20px);
}

#app.game-stage .xianmei-rank-board header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(141, 96, 52, 0.28);
}

#app.game-stage .xianmei-rank-board header span { color: #572d1f; font-size: 20px; font-weight: 800; letter-spacing: 3px; }
#app.game-stage .xianmei-rank-board header small { color: #7a6750; font-size: 12px; }
#app.game-stage .xianmei-rank-board > div { display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 8px; }

#app.game-stage .xianmei-rank-command {
  min-height: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(81, 118, 96, 0.42);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(233, 241, 223, 0.96), rgba(181, 207, 183, 0.94));
  color: #2f4d3f;
  cursor: pointer;
}

#app.game-stage .xianmei-rank-command:hover { border-color: rgba(157, 104, 51, 0.72); background: linear-gradient(180deg, #f7e4b6, #dfbd7e); color: #57331c; }
#app.game-stage .xianmei-rank-command small { color: #8a7251; font-size: 11px; }
#app.game-stage .xianmei-rank-command span { font-size: clamp(17px, 2.4cqh, 21px); font-weight: 800; letter-spacing: 2px; }
#app.game-stage .xianmei-exit { position: absolute; right: clamp(42px, 4.6cqw, 62px); bottom: clamp(22px, 3.5cqh, 34px); min-width: 140px; z-index: 5; }

#app.game-stage .xianmei-stage-screen:has(.dialog-screen) .xianmei-stage-layout { bottom: clamp(146px, 20cqh, 166px); }
#app.game-stage .xianmei-stage-screen .dialog-screen { z-index: 20; }

/* —— 丹鼎阁：丹方与库房同屏，目标和丹药过量时分别翻页。—— */
#app.game-stage .danding-alchemy-screen {
  background:
    linear-gradient(180deg, rgba(2, 13, 17, 0.1), rgba(8, 3, 2, 0.3)),
    var(--scene-bg) center / cover no-repeat;
}

#app.game-stage .danding-alchemy-screen::before { background: linear-gradient(90deg, rgba(5, 12, 13, 0.34), transparent 25%, transparent 75%, rgba(5, 8, 9, 0.34)); }
#app.game-stage .danding-alchemy-screen .topnav-banners { display: none; }

#app.game-stage .danding-console {
  position: absolute;
  z-index: 4;
  inset: clamp(102px, 14.5cqh, 118px) clamp(60px, 6cqw, 86px) clamp(66px, 9cqh, 82px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(12px, 1.7cqh, 16px);
  box-sizing: border-box;
  padding: clamp(16px, 2.2cqh, 22px) clamp(18px, 2.2cqw, 28px);
  border: 1px solid rgba(190, 138, 65, 0.58);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(246, 236, 204, 0.94), rgba(204, 219, 202, 0.9));
  box-shadow: 0 24px 52px rgba(11, 4, 2, 0.46), inset 0 0 0 1px rgba(255, 255, 235, 0.48);
}

#app.game-stage .danding-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 0 8px 10px;
  border-bottom: 1px solid rgba(118, 72, 34, 0.3);
}

#app.game-stage .danding-head span { color: #4c2b19; font-size: clamp(25px, 3.6cqh, 32px); font-weight: 800; letter-spacing: 4px; }
#app.game-stage .danding-head small { color: #5b7967; font-size: 14px; letter-spacing: 2px; }
#app.game-stage .danding-head b { margin-left: auto; color: #83452b; font-size: clamp(13px, 1.9cqh, 16px); }

#app.game-stage .danding-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(250px, 0.8fr);
  gap: clamp(14px, 1.8cqw, 22px);
}

#app.game-stage .danding-recipes,
#app.game-stage .danding-inventory {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  box-sizing: border-box;
  padding: clamp(13px, 1.8cqh, 18px);
  border: 1px solid rgba(82, 111, 91, 0.32);
  background: rgba(255, 252, 233, 0.64);
}

#app.game-stage :is(.danding-recipes, .danding-inventory) > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(121, 76, 36, 0.24);
}

#app.game-stage :is(.danding-recipes, .danding-inventory) > header span { color: #6b3420; font-size: 18px; font-weight: 800; letter-spacing: 2px; }
#app.game-stage :is(.danding-recipes, .danding-inventory) > header small { max-width: 70%; overflow: hidden; color: #6d664e; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

#app.game-stage .danding-recipe-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 7px 9px;
}

#app.game-stage .danding-recipe {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(93, 116, 92, 0.35);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(238, 240, 216, 0.94), rgba(190, 207, 181, 0.9));
  color: #33483b;
  text-align: left;
  cursor: pointer;
}

#app.game-stage .danding-recipe:hover:not(:disabled) { border-color: rgba(151, 80, 43, 0.65); background: linear-gradient(180deg, #f6dfad, #dbae67); color: #5a2c1d; }
#app.game-stage .danding-recipe:disabled { opacity: 0.48; cursor: default; }
#app.game-stage .danding-recipe span { font-size: clamp(13px, 1.8cqh, 15px); font-weight: 800; white-space: nowrap; }
#app.game-stage .danding-recipe small { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .danding-recipe b { color: #8c4a2e; font-size: 11px; white-space: nowrap; }

#app.game-stage .danding-inventory { grid-template-rows: auto minmax(0, 1fr); }
#app.game-stage .danding-inventory > :not(header) { min-height: 0; }

#app.game-stage .danding-medicine-grid,
#app.game-stage .danding-target-grid {
  align-content: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#app.game-stage .danding-pill {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(86, 116, 93, 0.4);
  border-radius: 4px;
  background: rgba(237, 242, 221, 0.9);
  color: #334d3d;
  font-family: "Royal Kai", "Songti SC", serif;
  font-weight: 700;
  cursor: pointer;
}

#app.game-stage .danding-pill:hover { border-color: rgba(148, 77, 41, 0.7); background: #f3ddb0; color: #5b2c1b; }
#app.game-stage .danding-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .danding-pill b { color: #87472a; white-space: nowrap; }

#app.game-stage .danding-use-head { display: grid; gap: 3px; margin-bottom: 9px; }
#app.game-stage .danding-use-head span { color: #60301e; font-size: 20px; font-weight: 800; }
#app.game-stage .danding-use-head small { color: #6d654c; }

#app.game-stage .danding-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 9px;
}

#app.game-stage .danding-pager span { color: #6f4b2e; font-size: 12px; }
#app.game-stage .danding-small { min-width: 92px; min-height: 34px; padding: 4px 13px; font-size: 12px; }
#app.game-stage .danding-inventory > .danding-small { display: block; min-width: 112px; margin: 10px auto 0; }

#app.game-stage .danding-empty {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  color: #74684d;
}

#app.game-stage .danding-empty span { font-size: 34px; color: #8b5534; }
#app.game-stage .danding-exit { position: absolute; z-index: 8; right: clamp(38px, 4.5cqw, 58px); bottom: clamp(20px, 3.3cqh, 32px); min-width: 142px; }
#app.game-stage .danding-alchemy-screen .dialog-screen { z-index: 20; }

/* —— 居宁宫·宗亲玉牒：妃嫔房支、族亲详情、纳妃位分三态独立。—— */
#app.game-stage > .juning-kin-screen {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 238, 191, 0.04), rgba(35, 43, 29, 0.2)),
    var(--scene-bg) center / cover no-repeat;
  color: #3c301f;
  font-family: "Royal Kai", "Songti SC", "STSong", serif;
}

#app.game-stage .juning-consort-ledger,
#app.game-stage .juning-kin-ledger,
#app.game-stage .juning-rank-ledger {
  position: absolute;
  top: 50%;
  left: 50%;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(153, 112, 52, 0.56);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 249, 222, 0.94), rgba(211, 225, 203, 0.91));
  box-shadow: 0 26px 58px rgba(46, 36, 21, 0.34), inset 0 0 0 1px rgba(255, 255, 242, 0.5);
}

#app.game-stage .juning-consort-ledger {
  width: min(920px, 76cqw);
  height: min(570px, 76cqh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(12px, 1.8cqh, 18px);
  padding: clamp(20px, 2.8cqh, 28px) clamp(24px, 3cqw, 36px);
}

#app.game-stage :is(.juning-consort-ledger, .juning-rank-ledger) > header,
#app.game-stage .juning-kin-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 0 8px 10px;
  border-bottom: 1px solid rgba(125, 86, 37, 0.28);
}

#app.game-stage :is(.juning-consort-ledger, .juning-rank-ledger) > header span,
#app.game-stage .juning-kin-head span {
  color: #49301d;
  font-size: clamp(25px, 3.6cqh, 32px);
  font-weight: 800;
  letter-spacing: 4px;
}

#app.game-stage :is(.juning-consort-ledger, .juning-rank-ledger) > header small,
#app.game-stage .juning-kin-head small { color: #577461; font-size: 14px; letter-spacing: 2px; }
#app.game-stage :is(.juning-consort-ledger, .juning-rank-ledger) > header b,
#app.game-stage .juning-kin-head b { margin-left: auto; color: #8b5730; font-size: 14px; }

#app.game-stage .juning-consort-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4cqh, 14px) clamp(12px, 1.5cqw, 18px);
}

#app.game-stage .juning-consort-slip {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 9px;
  padding: clamp(10px, 1.4cqh, 13px) clamp(11px, 1.2cqw, 15px);
  border: 1px solid rgba(80, 116, 93, 0.32);
  border-radius: 5px;
  background: rgba(255, 253, 237, 0.68);
}

#app.game-stage .juning-star,
#app.game-stage .juning-open {
  border: 1px solid rgba(99, 124, 98, 0.42);
  border-radius: 4px;
  background: rgba(194, 216, 190, 0.74);
  color: #42604e;
  cursor: pointer;
}

#app.game-stage .juning-star { width: 34px; height: 34px; padding: 0; }
#app.game-stage .juning-star.is-on { background: #b66a49; border-color: #8c432f; color: #fff0cf; }
#app.game-stage .juning-open { min-height: 36px; font-family: inherit; font-weight: 700; }
#app.game-stage .juning-open:hover { border-color: rgba(148, 91, 43, 0.72); background: #e6c88c; color: #5b321d; }

#app.game-stage .juning-consort-slip > div { min-width: 0; display: grid; gap: 3px; }
#app.game-stage .juning-consort-slip > div span { overflow: hidden; color: #4d2d1d; font-size: clamp(17px, 2.3cqh, 20px); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .juning-consort-slip > div small { color: #766148; font-size: 12px; }

#app.game-stage .juning-consort-ledger > footer,
#app.game-stage .juning-rank-ledger > footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#app.game-stage .juning-consort-ledger > footer > span { min-width: 70px; color: #6b4b2d; text-align: center; }

#app.game-stage .juning-kin-ledger {
  width: min(1180px, 88cqw);
  height: min(620px, 82cqh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(12px, 1.6cqh, 16px);
  padding: clamp(16px, 2.2cqh, 22px) clamp(18px, 2.2cqw, 28px);
}

#app.game-stage .juning-kin-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(188px, 17cqw, 224px) minmax(260px, 1fr) clamp(275px, 24cqw, 330px);
  gap: clamp(12px, 1.5cqw, 18px);
}

#app.game-stage .juning-member-list,
#app.game-stage .juning-member-detail {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(81, 115, 91, 0.3);
  background: rgba(255, 253, 237, 0.65);
}

#app.game-stage .juning-member-list {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 9px;
  padding: 11px;
}

#app.game-stage .juning-member-list > div {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

#app.game-stage .juning-member-slip {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid rgba(91, 119, 92, 0.28);
  border-radius: 4px;
  background: rgba(239, 243, 219, 0.72);
  color: #3f4f3e;
  text-align: left;
  cursor: pointer;
}

#app.game-stage .juning-member-slip.is-on { border-color: rgba(155, 91, 43, 0.75); background: linear-gradient(180deg, #f3dca4, #d8b56c); color: #56301c; }
#app.game-stage .juning-member-slip span { overflow: hidden; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .juning-member-slip small { color: #75654c; font-size: 11px; }
#app.game-stage .juning-member-list footer { display: flex; align-items: center; justify-content: center; gap: 5px; }
#app.game-stage .juning-member-list footer span { color: #6c5134; font-size: 11px; }
#app.game-stage .juning-small { min-width: 68px; min-height: 30px; padding: 3px 8px; font-size: 11px; }

#app.game-stage .juning-portrait-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-right: 1px solid rgba(141, 94, 45, 0.28);
  border-left: 1px solid rgba(141, 94, 45, 0.28);
  background: radial-gradient(ellipse at 50% 72%, rgba(255, 248, 218, 0.76), rgba(255, 255, 246, 0.08) 67%);
}

/* 宗亲玉牒属于固定展示框：人物随框铺满、顶部对齐，允许两侧及下缘裁切。 */
#app.game-stage .juning-portrait-stage img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center top; filter: drop-shadow(0 14px 12px rgba(62, 44, 27, 0.2)); }
#app.game-stage .juning-portrait-stage figcaption { position: absolute; right: 12px; bottom: 12px; padding: 5px 9px; border-left: 2px solid #8e5a35; background: rgba(255, 249, 225, 0.74); color: #4e321f; font-weight: 800; }

#app.game-stage .juning-member-detail {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 9px;
  padding: clamp(13px, 1.8cqh, 18px);
}

#app.game-stage .juning-detail-name { display: grid; gap: 2px; padding-bottom: 9px; border-bottom: 1px solid rgba(133, 88, 41, 0.24); }
#app.game-stage .juning-detail-name small { color: #976039; letter-spacing: 3px; }
#app.game-stage .juning-detail-name h1 { margin: 0; color: #4c2b1b; font-size: clamp(24px, 3.5cqh, 31px); letter-spacing: 3px; }
#app.game-stage .juning-detail-name span { color: #756248; font-size: 13px; }

#app.game-stage .juning-detail-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; margin: 0; }
#app.game-stage .juning-detail-lines div { display: flex; justify-content: space-between; gap: 7px; padding-bottom: 4px; border-bottom: 1px solid rgba(113, 87, 48, 0.13); }
#app.game-stage .juning-detail-lines dt { color: #806c4c; font-size: 11px; }
#app.game-stage .juning-detail-lines dd { overflow: hidden; margin: 0; color: #4b3928; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

#app.game-stage .juning-detail-attrs { align-content: center; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
#app.game-stage .juning-detail-attrs p { grid-column: 1 / -1; margin: 0; color: #765138; font-size: 12px; font-weight: 800; letter-spacing: 2px; }
#app.game-stage .juning-detail-attrs span { display: flex; justify-content: space-between; padding: 6px 8px; border: 1px solid rgba(81, 115, 91, 0.2); background: rgba(239, 244, 223, 0.64); }
#app.game-stage .juning-detail-attrs i,
#app.game-stage .juning-detail-extra i { color: #766647; font-size: 11px; font-style: normal; }
#app.game-stage .juning-detail-attrs b { color: #703b24; }
#app.game-stage .juning-detail-extra { display: grid; gap: 4px; }
#app.game-stage .juning-detail-extra span { display: flex; justify-content: space-between; gap: 7px; color: #51412e; font-size: 12px; }
#app.game-stage .juning-detail-extra b { font-weight: 700; }
#app.game-stage .juning-detail-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
#app.game-stage .juning-detail-actions .juning-command { min-width: 104px; min-height: 36px; padding: 5px 12px; font-size: 12px; }

#app.game-stage .juning-rank-ledger {
  width: min(850px, 70cqw);
  height: min(540px, 72cqh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: clamp(20px, 2.8cqh, 28px) clamp(24px, 3cqw, 36px);
}

#app.game-stage .juning-rank-grid { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
#app.game-stage .juning-rank-slip { min-height: 0; display: grid; grid-template-columns: 74px 1fr; align-items: center; border: 1px solid rgba(81, 115, 91, 0.34); border-radius: 5px; background: rgba(240, 244, 220, 0.76); color: #3d513f; cursor: pointer; }
#app.game-stage .juning-rank-slip:hover { border-color: rgba(151, 89, 42, 0.72); background: #edcf91; color: #5a301b; }
#app.game-stage .juning-rank-slip small { padding: 9px; border-right: 1px solid rgba(100, 89, 53, 0.2); color: #806849; }
#app.game-stage .juning-rank-slip span { padding: 9px 13px; font-size: 19px; font-weight: 800; letter-spacing: 2px; }
#app.game-stage .juning-empty { min-height: 100%; display: grid; place-content: center; color: #786a4e; text-align: center; }
#app.game-stage .juning-kin-screen .dialog-screen { z-index: 20; }

/* —— 三档私宅：同一宅契结构，背景与色调随坊巷分级。—— */
#app.game-stage .residence-estate-screen {
  --estate-accent: #8a522f;
  --estate-jade: #53715f;
  --estate-paper: rgba(255, 248, 220, 0.94);
  justify-content: center;
  padding: 0;
  background: linear-gradient(180deg, rgba(40, 27, 15, 0.06), rgba(29, 19, 12, 0.22)), var(--scene-bg) center / cover no-repeat;
}

#app.game-stage .residence-estate-screen.sz-lane-qianmo { --estate-accent: #76583a; --estate-jade: #5d7861; --estate-paper: rgba(247, 244, 220, 0.94); }
#app.game-stage .residence-estate-screen.sz-lane-jipin { --estate-accent: #74482f; --estate-jade: #6b7156; --estate-paper: rgba(239, 224, 190, 0.94); }
#app.game-stage .residence-estate-screen::after { display: none; }

#app.game-stage .residence-estate-screen > .sz-body {
  position: relative;
  z-index: 3;
  width: min(1100px, 86cqw);
  height: min(610px, 80cqh);
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#app.game-stage .estate-deed {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--estate-accent) 72%, #d8b66e);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--estate-paper), color-mix(in srgb, var(--estate-paper) 78%, #b5c6ae));
  color: #473422;
  box-shadow: 0 26px 58px rgba(44, 30, 18, 0.34), inset 0 0 0 1px rgba(255, 255, 241, 0.5);
}

#app.game-stage .estate-deed--vacant { grid-template-rows: auto minmax(0, 1fr) auto; gap: 18px; padding: clamp(24px, 3.2cqh, 34px) clamp(30px, 3.4cqw, 44px); }
#app.game-stage .estate-deed--owned { grid-template-rows: auto auto minmax(0, 1fr) auto; gap: clamp(10px, 1.4cqh, 14px); padding: clamp(16px, 2.2cqh, 22px) clamp(20px, 2.5cqw, 30px); }

#app.game-stage .estate-deed-head { display: flex; align-items: baseline; gap: 14px; padding: 0 8px 10px; border-bottom: 1px solid color-mix(in srgb, var(--estate-accent) 34%, transparent); }
#app.game-stage .estate-deed-head span { color: var(--estate-accent); font-size: clamp(25px, 3.6cqh, 32px); font-weight: 800; letter-spacing: 4px; }
#app.game-stage .estate-deed-head small { color: var(--estate-jade); font-size: 14px; letter-spacing: 2px; }
#app.game-stage .estate-deed-head b { margin-left: auto; color: #765131; font-size: 14px; }

#app.game-stage .estate-vacant-body { align-self: center; justify-self: center; width: min(520px, 48cqw); display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 24px; align-items: center; padding: 22px 30px; border: 1px solid color-mix(in srgb, var(--estate-jade) 44%, transparent); background: rgba(255, 253, 239, 0.62); }
#app.game-stage .estate-vacant-body > i { grid-row: 1 / 3; width: 90px; aspect-ratio: 1; display: grid; place-items: center; border: 2px double var(--estate-accent); color: var(--estate-accent); font-size: 38px; font-style: normal; transform: rotate(-3deg); }
#app.game-stage .estate-vacant-body h1 { margin: 0; color: #51301f; font-size: clamp(28px, 4cqh, 36px); letter-spacing: 4px; }
#app.game-stage .estate-vacant-body dl { display: grid; gap: 6px; margin: 0; }
#app.game-stage .estate-vacant-body dl div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 5px; border-bottom: 1px solid rgba(112, 88, 54, 0.14); }
#app.game-stage .estate-vacant-body dt { color: #80694b; }
#app.game-stage .estate-vacant-body dd { margin: 0; color: #4c3929; font-weight: 700; }

#app.game-stage .estate-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#app.game-stage .estate-status-grid article { min-width: 0; display: grid; gap: 2px; padding: 9px 11px; border: 1px solid color-mix(in srgb, var(--estate-jade) 36%, transparent); background: rgba(255, 253, 239, 0.58); }
#app.game-stage .estate-status-grid i { color: #806a4b; font-size: 11px; font-style: normal; }
#app.game-stage .estate-status-grid span { color: var(--estate-accent); font-size: 18px; font-weight: 800; }
#app.game-stage .estate-status-grid small { overflow: hidden; color: #63533f; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

#app.game-stage .estate-roster { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; padding: 11px 13px; border: 1px solid color-mix(in srgb, var(--estate-jade) 38%, transparent); background: rgba(255, 253, 239, 0.55); }
#app.game-stage .estate-roster > header { display: flex; justify-content: space-between; padding-bottom: 7px; border-bottom: 1px solid rgba(111, 85, 49, 0.16); }
#app.game-stage .estate-roster > header span { color: var(--estate-accent); font-size: 17px; font-weight: 800; letter-spacing: 2px; }
#app.game-stage .estate-roster > header small { color: #756147; }
#app.game-stage .estate-roster-grid { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 7px 10px; }
#app.game-stage .estate-outside-slip { min-width: 0; min-height: 0; display: grid; align-content: center; gap: 3px; padding: 6px 10px; border: 1px solid color-mix(in srgb, var(--estate-jade) 38%, transparent); border-radius: 4px; background: rgba(239, 243, 220, 0.72); color: #3e513f; text-align: left; cursor: pointer; }
#app.game-stage .estate-outside-slip:hover { border-color: color-mix(in srgb, var(--estate-accent) 76%, #cda568); background: #ead09a; color: #55301e; }
#app.game-stage .estate-outside-slip span { font-size: 15px; font-weight: 800; }
#app.game-stage .estate-outside-slip small { overflow: hidden; color: #6c5b43; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .estate-roster > footer { display: flex; justify-content: center; gap: 6px; }
#app.game-stage .estate-small { min-width: 84px; min-height: 30px; padding: 3px 10px; font-size: 11px; }
#app.game-stage .estate-empty { grid-column: 1 / -1; grid-row: 1 / -1; display: grid; place-content: center; justify-items: center; color: #75654b; }
#app.game-stage .estate-empty span { color: var(--estate-accent); font-size: 22px; font-weight: 800; letter-spacing: 3px; }

#app.game-stage .estate-deed-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
#app.game-stage .estate-deed-actions .estate-command { min-width: 128px; }
#app.game-stage .estate-deed-actions .is-primary { min-width: 158px; }
#app.game-stage .residence-estate-screen .dialog-screen { z-index: 20; }

/* —— 宣政殿·工部营造簿：七项工程按 4×2 卡位排布，名称、级别、收益、造价分层。—— */
#app.game-stage .build-works-screen .topnav-banners { display: none; }
#app.game-stage .build-works-ledger { position: absolute; z-index: 4; inset: clamp(108px, 15cqh, 126px) clamp(62px, 6cqw, 90px) clamp(58px, 8cqh, 72px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(12px, 1.7cqh, 16px); box-sizing: border-box; padding: clamp(16px, 2.2cqh, 22px) clamp(18px, 2.3cqw, 28px); border: 1px solid rgba(172, 128, 64, 0.58); border-radius: 8px; background: linear-gradient(180deg, rgba(255, 249, 226, 0.94), rgba(218, 227, 206, 0.9)); box-shadow: 0 24px 52px rgba(38, 24, 14, 0.3), inset 0 0 0 1px rgba(255, 255, 241, 0.5); }
#app.game-stage .build-works-ledger > header { display: flex; align-items: baseline; gap: 14px; padding: 0 8px 10px; border-bottom: 1px solid rgba(137, 91, 44, 0.28); }
#app.game-stage .build-works-ledger > header span { color: #4b2d1b; font-size: clamp(25px, 3.6cqh, 32px); font-weight: 800; letter-spacing: 4px; }
#app.game-stage .build-works-ledger > header small { color: #557361; font-size: 14px; letter-spacing: 2px; }
#app.game-stage .build-works-ledger > header b { margin-left: auto; color: #85452b; font-size: 14px; }
#app.game-stage .build-works-grid { min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.4cqh, 14px) clamp(11px, 1.2cqw, 16px); }
#app.game-stage .build-work-card { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; align-content: center; gap: 4px; padding: clamp(12px, 1.7cqh, 18px); border: 1px solid rgba(80, 112, 89, 0.34); border-radius: 6px; background: linear-gradient(180deg, rgba(255, 253, 239, 0.86), rgba(221, 232, 208, 0.82)); color: #3d4d3e; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 246, 0.35); }
#app.game-stage .build-work-card:hover:not(:disabled) { border-color: rgba(154, 89, 42, 0.76); background: linear-gradient(180deg, #f7e5bb, #dfbf7d); color: #56301c; transform: translateY(-1px); }
#app.game-stage .build-work-card i { color: #8b6b45; font-size: 11px; font-style: normal; letter-spacing: 3px; }
#app.game-stage .build-work-card strong { overflow: hidden; color: #4f2c1a; font-size: clamp(20px, 2.9cqh, 25px); letter-spacing: 2px; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .build-work-card span { color: #557160; font-size: 13px; font-weight: 700; }
#app.game-stage .build-work-card small { align-self: center; color: #6f6049; font-size: 12px; }
#app.game-stage .build-work-card b { justify-self: end; color: #8a482c; font-size: clamp(14px, 2cqh, 17px); }
#app.game-stage .build-work-card.is-done { border-color: rgba(135, 112, 65, 0.35); background: rgba(226, 222, 194, 0.72); cursor: default; }
#app.game-stage .build-work-card.is-done strong,
#app.game-stage .build-work-card.is-done span,
#app.game-stage .build-work-card.is-done small { color: #706b58; }
#app.game-stage .build-work-card.is-done b { color: #7c4831; }
#app.game-stage .build-works-ledger > footer { display: flex; justify-content: center; }
#app.game-stage .build-works-ledger > footer .court-action { min-width: 144px; }
/* ============================================================================
   2026-07-11：温泉行宫 / 方壶胜境 / 华清宫重设
   方案 1「汤泉花笺」：场景完整露出，名单、分页与全部命令固定在低位花笺内。
   ============================================================================ */
#app.game-stage > .venue-intimacy-screen,
#app.game-stage > .huaqing-audience-screen {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--scene-bg) center / cover no-repeat;
  color: #4c3424;
  font-family: "Royal Kai", "Songti SC", "STSong", serif;
}

#app.game-stage .venue-intimacy-screen::before,
#app.game-stage .huaqing-audience-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(27, 31, 28, 0.08);
}

#app.game-stage .venue-intimacy-screen--fanghu::before { background: rgba(28, 52, 50, 0.05); }

#app.game-stage .venue-intimacy-screen::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 35%;
  left: 0;
  width: 100%;
  height: 65%;
  pointer-events: none;
  background: url("./assets/ui/venues/venue-ledger-frame-20260711.png") center / 100% 100% no-repeat;
  filter: none;
  transform: none;
}

#app.game-stage .venue-ledger {
  position: absolute;
  z-index: 4;
  top: 62.7%;
  right: 8.4%;
  bottom: 4.1%;
  left: 8.4%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: clamp(34px, 5.1cqh, 41px) minmax(0, 1fr) clamp(40px, 6.2cqh, 48px);
  padding: 0 clamp(12px, 1.5cqw, 22px);
  box-sizing: border-box;
  overflow: hidden;
}

#app.game-stage .venue-ledger__head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(9px, 1.1cqw, 16px);
  color: #604125;
  text-align: center;
  white-space: nowrap;
}

#app.game-stage .venue-ledger__head h1 {
  margin: 0;
  color: #563621;
  font-size: clamp(19px, 2.9cqh, 25px);
  font-weight: 800;
  letter-spacing: 3px;
}

#app.game-stage .venue-ledger__head span {
  color: #617b6d;
  font-size: clamp(12px, 1.8cqh, 14px);
  letter-spacing: 3px;
}

#app.game-stage .venue-ledger__head b {
  color: #9a6a42;
  font-size: clamp(11px, 1.6cqh, 13px);
  font-weight: 600;
}

#app.game-stage .venue-choice-grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(2, clamp(47px, 6.8cqh, 56px));
  align-content: center;
  gap: clamp(5px, 0.8cqh, 8px) clamp(5px, 0.55cqw, 9px);
  padding: clamp(6px, 0.8cqh, 9px) 0;
  overflow: hidden;
}

#app.game-stage .venue-choice,
#app.game-stage .venue-page-btn,
#app.game-stage .venue-command,
#app.game-stage .huaqing-return,
#app.game-stage .huaqing-pager button,
#app.game-stage .huaqing-mini-pager button {
  border: 0;
  outline: 0;
  background: url("./assets/ui/visit/entry-option.png") center / 100% 100% no-repeat;
  color: #4a3425;
  font-family: inherit;
  cursor: pointer;
}

#app.game-stage .venue-choice {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: clamp(12px, 1.9cqh, 15px);
  line-height: 1.1;
  white-space: nowrap;
}

#app.game-stage .venue-choice span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#app.game-stage .venue-choice i {
  flex: 0 0 auto;
  color: #a04636;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

#app.game-stage .venue-choice:hover:not(:disabled),
#app.game-stage .venue-choice.is-selected {
  color: #773d2d;
  filter: brightness(1.03) saturate(1.12);
  transform: translateY(-1px);
}

#app.game-stage .venue-choice:active:not(:disabled) { transform: translateY(1px); }
#app.game-stage .venue-choice:disabled { opacity: 0.38; cursor: not-allowed; }
#app.game-stage .venue-choice--empty { opacity: 0.26; pointer-events: none; }

#app.game-stage .venue-ledger__empty {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  display: grid;
  place-items: center;
  color: #77624a;
  font-size: clamp(15px, 2.2cqh, 18px);
  letter-spacing: 3px;
}

#app.game-stage .venue-ledger__foot {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) auto minmax(410px, 1.45fr);
  align-items: center;
  gap: clamp(8px, 1.1cqw, 17px);
}

#app.game-stage .venue-pager,
#app.game-stage .venue-ledger__commands {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.65cqw, 10px);
}

#app.game-stage .venue-pager { justify-content: flex-start; }
#app.game-stage .venue-ledger__commands { justify-content: flex-end; }

#app.game-stage .venue-page-btn {
  width: clamp(76px, 7.2cqw, 104px);
  height: clamp(32px, 4.7cqh, 38px);
  padding: 0 10px;
  font-size: clamp(12px, 1.7cqh, 14px);
}

#app.game-stage .venue-pager > span,
#app.game-stage .venue-picked {
  color: #694b32;
  font-size: clamp(12px, 1.8cqh, 14px);
  white-space: nowrap;
}

#app.game-stage .venue-picked {
  min-width: clamp(92px, 8.5cqw, 126px);
  text-align: center;
  letter-spacing: 2px;
}

#app.game-stage .venue-picked b {
  color: #954e37;
  font-size: clamp(17px, 2.6cqh, 22px);
}

#app.game-stage .venue-command {
  min-width: clamp(82px, 7.8cqw, 112px);
  height: clamp(34px, 5.1cqh, 41px);
  padding: 0 15px;
  font-size: clamp(13px, 1.9cqh, 16px);
  letter-spacing: 2px;
}

#app.game-stage .venue-command--primary,
#app.game-stage .huaqing-primary,
#app.game-stage .huaqing-action {
  border: 0;
  outline: 0;
  background: url("./assets/ui/venues/venue-primary-command-20260711.png") center / 100% 100% no-repeat;
  color: #f6e9bd;
  font-family: inherit;
  text-shadow: 0 1px 2px rgba(23, 36, 31, 0.85);
  cursor: pointer;
}

#app.game-stage .venue-command--primary {
  min-width: clamp(168px, 14.8cqw, 214px);
  color: #f8df9d;
  font-size: clamp(16px, 2.4cqh, 20px);
  font-weight: 800;
}

#app.game-stage .venue-page-btn:hover:not(:disabled),
#app.game-stage .venue-command:hover:not(:disabled),
#app.game-stage .huaqing-return:hover:not(:disabled),
#app.game-stage .huaqing-pager button:hover:not(:disabled),
#app.game-stage .huaqing-mini-pager button:hover:not(:disabled) {
  filter: brightness(1.06) saturate(1.08);
  transform: translateY(-1px);
}

#app.game-stage .venue-command--primary:hover:not(:disabled),
#app.game-stage .huaqing-primary:hover:not(:disabled),
#app.game-stage .huaqing-action:hover:not(:disabled) {
  background-image: url("./assets/ui/venues/venue-primary-command-20260711.png");
  filter: brightness(1.08);
  transform: translateY(-1px);
}

#app.game-stage .venue-page-btn:active:not(:disabled),
#app.game-stage .venue-command:active:not(:disabled),
#app.game-stage .huaqing-primary:active:not(:disabled),
#app.game-stage .huaqing-action:active:not(:disabled),
#app.game-stage .huaqing-return:active:not(:disabled) { transform: translateY(1px) scale(0.985); }

#app.game-stage .venue-page-btn:disabled,
#app.game-stage .venue-command:disabled,
#app.game-stage .huaqing-pager button:disabled,
#app.game-stage .huaqing-mini-pager button:disabled { opacity: 0.36; cursor: not-allowed; }

#app.game-stage .venue-choice:focus-visible,
#app.game-stage .venue-page-btn:focus-visible,
#app.game-stage .venue-command:focus-visible,
#app.game-stage .huaqing-audience-screen button:focus-visible {
  outline: 2px solid #9e5a3e;
  outline-offset: 1px;
}

/* 华清宫：保留适合的原场景，重做宾宫名帖与家眷详情，不沿用旧通用名册。 */
#app.game-stage .huaqing-hub,
#app.game-stage .huaqing-minister-book,
#app.game-stage .huaqing-audience {
  position: absolute;
  z-index: 4;
  box-sizing: border-box;
  background: url("./assets/ui/skins/palace-paper-panel.svg") center / 100% 100% no-repeat;
  overflow: hidden;
}

#app.game-stage .huaqing-minister-book,
#app.game-stage .huaqing-audience {
  background-size: 115% 118%;
}

#app.game-stage .huaqing-hub {
  top: 51%;
  left: 50%;
  width: clamp(440px, 39cqw, 560px);
  height: clamp(236px, 34cqh, 286px);
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  gap: 10px;
  padding: clamp(38px, 5.4cqh, 50px) clamp(58px, 5.4cqw, 78px) clamp(30px, 4.3cqh, 40px);
  transform: translate(-50%, -50%);
}

#app.game-stage .huaqing-hub header {
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 3px;
}

#app.game-stage .huaqing-hub header small,
#app.game-stage .huaqing-head small {
  color: #6e8a77;
  font-size: clamp(11px, 1.6cqh, 13px);
  letter-spacing: 4px;
}

#app.game-stage .huaqing-hub h1 {
  margin: 0;
  color: #5c3722;
  font-size: clamp(31px, 4.8cqh, 40px);
  letter-spacing: 7px;
}

#app.game-stage .huaqing-hub header span {
  color: #8e6d45;
  font-size: clamp(13px, 1.9cqh, 16px);
  letter-spacing: 4px;
}

#app.game-stage .huaqing-primary {
  width: clamp(190px, 17cqw, 236px);
  height: clamp(39px, 5.6cqh, 46px);
  font-size: clamp(16px, 2.2cqh, 19px);
  font-weight: 800;
  letter-spacing: 3px;
}

#app.game-stage .huaqing-return {
  min-width: clamp(118px, 10cqw, 146px);
  height: clamp(34px, 4.8cqh, 40px);
  padding: 0 18px;
  font-size: clamp(13px, 1.8cqh, 15px);
  letter-spacing: 2px;
}

#app.game-stage .huaqing-minister-book {
  top: clamp(80px, 11cqh, 94px);
  bottom: clamp(9px, 1.5cqh, 15px);
  left: 50%;
  width: clamp(740px, 65cqw, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(9px, 1.2cqh, 13px);
  padding: clamp(62px, 9.2cqh, 72px) clamp(56px, 5.1cqw, 74px) clamp(46px, 7cqh, 56px);
  transform: translateX(-50%);
}

#app.game-stage .huaqing-head {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: #553721;
}

#app.game-stage .huaqing-head > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

#app.game-stage .huaqing-head h1 {
  margin: 0;
  color: #58341f;
  font-size: clamp(26px, 3.9cqh, 34px);
  letter-spacing: 4px;
}

#app.game-stage .huaqing-head > span {
  margin-left: auto;
  color: #6e7e6d;
  font-size: clamp(12px, 1.8cqh, 15px);
  white-space: nowrap;
}

#app.game-stage .huaqing-audience > .huaqing-head > span { margin-left: 0; }

#app.game-stage .huaqing-head > b {
  max-width: 34%;
  overflow: hidden;
  color: #8e6a4b;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .huaqing-minister-grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.1cqh, 12px) clamp(10px, 1cqw, 15px);
  overflow: hidden;
}

#app.game-stage .huaqing-minister-card,
#app.game-stage .huaqing-member {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 0;
  outline: 0;
  background: url("./assets/ui/visit/entry-option.png") center / 100% 100% no-repeat;
  color: #4a3425;
  font-family: inherit;
  cursor: pointer;
}

#app.game-stage .huaqing-minister-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  align-content: center;
  column-gap: 8px;
  padding: clamp(13px, 1.8cqh, 18px) clamp(26px, 2.3cqw, 34px);
  text-align: left;
}

#app.game-stage .huaqing-minister-card small {
  grid-column: 1;
  color: #718579;
  font-size: clamp(10px, 1.45cqh, 12px);
  letter-spacing: 2px;
}

#app.game-stage .huaqing-minister-card b {
  grid-column: 1;
  color: #5a3622;
  font-size: clamp(18px, 2.7cqh, 23px);
  letter-spacing: 3px;
}

#app.game-stage .huaqing-minister-card span {
  grid-column: 1;
  color: #7a6247;
  font-size: clamp(11px, 1.6cqh, 13px);
}

#app.game-stage .huaqing-minister-card i {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  color: #9a4c37;
  font-size: 13px;
  font-style: normal;
  letter-spacing: 2px;
}

#app.game-stage .huaqing-minister-card:hover,
#app.game-stage .huaqing-member:hover,
#app.game-stage .huaqing-member.is-selected {
  color: #773d2d;
  filter: brightness(1.04) saturate(1.08);
  transform: translateY(-1px);
}

#app.game-stage .huaqing-minister-foot,
#app.game-stage .huaqing-foot {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

#app.game-stage .huaqing-pager,
#app.game-stage .huaqing-mini-pager {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #6c5036;
  font-size: clamp(12px, 1.7cqh, 14px);
}

#app.game-stage .huaqing-pager button,
#app.game-stage .huaqing-mini-pager button {
  width: clamp(76px, 7.5cqw, 106px);
  height: clamp(31px, 4.4cqh, 37px);
  padding: 0 9px;
  font-size: clamp(11px, 1.6cqh, 13px);
}

#app.game-stage .huaqing-audience {
  top: clamp(80px, 11cqh, 94px);
  right: clamp(42px, 4.2cqw, 62px);
  bottom: clamp(9px, 1.5cqh, 15px);
  left: clamp(42px, 4.2cqw, 62px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(8px, 1.15cqh, 12px);
  padding: clamp(62px, 9.2cqh, 72px) clamp(70px, 5.9cqw, 82px) clamp(46px, 7cqh, 56px);
}

#app.game-stage .huaqing-audience__grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(205px, 18cqw, 246px) minmax(360px, 1fr) clamp(262px, 24cqw, 326px);
  gap: clamp(10px, 1.2cqw, 18px);
  overflow: hidden;
}

#app.game-stage .huaqing-family-list,
#app.game-stage .huaqing-dossier,
#app.game-stage .huaqing-portrait {
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  border: 1px solid rgba(126, 107, 73, 0.26);
  background-color: rgba(255, 253, 242, 0.52);
  overflow: hidden;
}

#app.game-stage .huaqing-family-list {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: clamp(11px, 1.7cqh, 15px);
}

#app.game-stage .huaqing-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: #58341f;
}

#app.game-stage .huaqing-section-title b { font-size: clamp(17px, 2.3cqh, 20px); letter-spacing: 2px; }
#app.game-stage .huaqing-section-title span { color: #718274; font-size: 12px; }

#app.game-stage .huaqing-member-list {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: clamp(4px, 0.65cqh, 7px);
  overflow: hidden;
}

#app.game-stage .huaqing-member {
  display: grid;
  align-content: center;
  gap: 1px;
  padding: 5px clamp(14px, 1.4cqw, 20px);
  text-align: left;
}

#app.game-stage .huaqing-member b {
  min-width: 0;
  overflow: hidden;
  color: #583522;
  font-size: clamp(12px, 1.75cqh, 14px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .huaqing-member span { color: #77634b; font-size: clamp(10px, 1.4cqh, 12px); }

#app.game-stage .huaqing-mini-pager { gap: 4px; }
#app.game-stage .huaqing-mini-pager button { width: auto; min-width: 62px; height: 29px; padding: 0 8px; font-size: 11px; }

#app.game-stage .huaqing-dossier {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: clamp(7px, 1cqh, 10px);
  padding: clamp(14px, 2cqh, 19px);
}

#app.game-stage .huaqing-dossier > header {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(139, 98, 53, 0.26);
}

#app.game-stage .huaqing-dossier > header small { color: #8a5b39; font-size: 12px; letter-spacing: 2px; }
#app.game-stage .huaqing-dossier > header h2 { margin: 0; color: #55301d; font-size: clamp(24px, 3.5cqh, 30px); letter-spacing: 3px; }
#app.game-stage .huaqing-dossier > header span { margin-left: auto; color: #718274; font-size: 13px; }

#app.game-stage .huaqing-vitals,
#app.game-stage .huaqing-attrs {
  min-width: 0;
  display: grid;
  gap: clamp(5px, 0.7cqh, 8px);
}

#app.game-stage .huaqing-vitals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#app.game-stage .huaqing-attrs { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }

#app.game-stage .huaqing-vitals > span,
#app.game-stage .huaqing-attrs > span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: clamp(5px, 0.7cqh, 8px) clamp(7px, 0.7cqw, 10px);
  border: 1px solid rgba(102, 132, 111, 0.23);
  background-color: rgba(255, 253, 241, 0.58);
  color: #76634b;
  font-size: clamp(10px, 1.45cqh, 12px);
}

#app.game-stage .huaqing-vitals b,
#app.game-stage .huaqing-attrs b { color: #633a24; font-size: clamp(12px, 1.8cqh, 15px); white-space: nowrap; }
#app.game-stage .huaqing-attrs i { font-style: normal; }

#app.game-stage .huaqing-extras {
  min-width: 0;
  display: grid;
  gap: 3px;
  color: #6e5941;
  font-size: clamp(10px, 1.45cqh, 12px);
  overflow: hidden;
}

#app.game-stage .huaqing-extras span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .huaqing-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

#app.game-stage .huaqing-action {
  min-width: 0;
  height: clamp(31px, 4.4cqh, 37px);
  padding: 0 10px;
  font-size: clamp(12px, 1.7cqh, 14px);
  letter-spacing: 2px;
}

#app.game-stage .huaqing-portrait {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0;
  background-color: rgba(226, 238, 223, 0.42);
}

#app.game-stage .huaqing-portrait img {
  display: block;
  flex: 0 0 auto;
  width: auto;
  min-width: 100%;
  max-width: none;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 12px 10px rgba(56, 43, 30, 0.18));
}

#app.game-stage .huaqing-empty {
  display: grid;
  place-items: center;
  color: #765d42;
  font-size: clamp(14px, 2cqh, 17px);
  letter-spacing: 2px;
  text-align: center;
}

#app.game-stage .huaqing-empty--grid { grid-column: 1 / -1; grid-row: 1 / -1; }
#app.game-stage .huaqing-empty--wide { grid-column: 2 / 4; }
#app.game-stage .huaqing-foot { justify-content: flex-end; }

@container (max-width: 1320px) {
  #app.game-stage .venue-ledger { right: 7.8%; left: 7.8%; }
  #app.game-stage .venue-ledger__foot { grid-template-columns: minmax(205px, 0.8fr) 100px minmax(390px, 1.45fr); }
  #app.game-stage .venue-choice { padding-inline: 6px; font-size: 12px; }
  #app.game-stage .huaqing-audience__grid { grid-template-columns: 196px minmax(330px, 1fr) 260px; }
  #app.game-stage .huaqing-audience { right: 34px; left: 34px; padding-right: 42px; padding-left: 42px; }
}
#app.game-stage .build-works-screen .dialog-screen { z-index: 20; }

/* 续104zt87·剧情妃重领区（已拥有·可重领）——嵌入 codex 新版 storyclaim-intake 屏底部 */
#app.game-stage .storyclaim-intake-screen .storyclaim-reclaim { margin-top: 10px; padding: 8px 12px; border: 1px solid rgba(180,140,90,0.28); border-radius: 10px; background: rgba(40,30,22,0.32); }
#app.game-stage .storyclaim-intake-screen .storyclaim-reclaim > header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
#app.game-stage .storyclaim-intake-screen .storyclaim-reclaim > header span { font-size: 14px; color: #e8d8bf; letter-spacing: 0.08em; }
#app.game-stage .storyclaim-intake-screen .storyclaim-reclaim > header b { font-size: 13px; color: #d8b98a; }
#app.game-stage .storyclaim-intake-screen .storyclaim-reclaim-list { display: flex; flex-wrap: wrap; gap: 6px; }
#app.game-stage .storyclaim-intake-screen .storyclaim-reclaim-row { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid rgba(180,140,90,0.24); border-radius: 8px; background: rgba(60,44,30,0.30); }
#app.game-stage .storyclaim-intake-screen .storyclaim-reclaim-name { font-size: 13px; color: #e8d8bf; letter-spacing: 0.05em; }
#app.game-stage .storyclaim-intake-screen .storyclaim-reclaim-btn { flex: none; }
#app.game-stage .storyclaim-intake-screen .storyclaim-reclaim-btn.is-armed { background: rgba(150,60,50,0.62); border-color: rgba(210,120,90,0.82); color: #ffe8d8; }

/* ============================================================================
   2026-07-12：宣政殿·朝会六部安全区重排
   六部由超屏七条竖列改为 2×3 签牌阵列，口谕独立居中；不滚动、不裁切、不改原有按钮钩子。
   ============================================================================ */
#app.game-stage .court-screen > .court-entry-menu[aria-label="六部"] {
  top: clamp(132px, 21.5cqh, 184px);
  width: min(66cqw, 880px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(10px, 1.55cqh, 16px) clamp(22px, 2.6cqw, 40px);
}

#app.game-stage .court-screen > .court-entry-menu[aria-label="六部"] .visit-entry-option {
  width: 100%;
  height: clamp(62px, 8.4cqh, 76px);
}

#app.game-stage .court-screen > .court-entry-menu[aria-label="六部"] .court-edict-option {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(460px, 58%);
  height: clamp(58px, 7.7cqh, 70px);
  margin-top: clamp(2px, 0.6cqh, 6px);
}

#app.game-stage .court-screen > .court-entry-menu[aria-label="六部"] .veo-label {
  font-size: clamp(16px, 1.26cqw, 20px);
  letter-spacing: clamp(2px, 0.28cqw, 4px);
}

#app.game-stage .court-screen > .court-entry-menu.court-entry-menu--dense {
  top: clamp(132px, 21.5cqh, 184px);
  width: min(66cqw, 880px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(10px, 1.55cqh, 16px) clamp(22px, 2.6cqw, 40px);
}

#app.game-stage .court-screen > .court-entry-menu.court-entry-menu--dense .visit-entry-option {
  width: 100%;
  height: clamp(62px, 8.4cqh, 76px);
}

#app.game-stage .court-screen > .court-entry-menu.court-entry-menu--dense .court-back-option {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(460px, 58%);
  height: clamp(58px, 7.7cqh, 70px);
}

/* ============================================================================
   2026-07-12：西殿·藏珍阁·翻阅背包（选定方案 1：百宝格巡检）
   背景 / 百宝柜 / 档案纸均为独立图像资产；DOM 只承载真实库存、交互文字与热区。
   ============================================================================ */
#app.game-stage .cangzhen-screen {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--scene-bg) center / cover no-repeat;
  color: #f3ead7;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
}

#app.game-stage .cangzhen-foreground {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

#app.game-stage .cangzhen-title {
  position: absolute;
  left: 3.3%;
  top: 4.8%;
  z-index: 4;
  width: 20.7%;
  margin: 0;
  color: #4d351f;
  font-size: clamp(18px, 2.25cqh, 27px);
  font-weight: 700;
  letter-spacing: clamp(2px, 0.3cqw, 5px);
  line-height: 1.8;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 244, 0.62);
}

#app.game-stage .cangzhen-kinds {
  position: absolute;
  left: 11.7%;
  top: 18.1%;
  z-index: 4;
  width: 4.8%;
  height: 66.4%;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 3.4%;
}

#app.game-stage .cangzhen-kind {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 0.7cqh, 8px);
  padding: 16% 8%;
  border: 1px solid transparent;
  background-color: transparent;
  color: #44331f;
  cursor: pointer;
  transition: filter 130ms ease, box-shadow 130ms ease, transform 90ms ease;
}

#app.game-stage .cangzhen-kind span {
  writing-mode: vertical-rl;
  text-orientation: upright;
  color: inherit;
  font-size: clamp(17px, 2.45cqh, 24px);
  font-weight: 700;
  letter-spacing: 0.23em;
  line-height: 1;
}

#app.game-stage .cangzhen-kind small {
  color: #765b33;
  font-size: clamp(10px, 1.45cqh, 13px);
  line-height: 1;
}

#app.game-stage .cangzhen-kind:hover:not(:disabled) {
  box-shadow: inset 0 0 22px rgba(255, 239, 167, 0.28), 0 0 12px rgba(218, 178, 88, 0.34);
  filter: brightness(1.08);
}

#app.game-stage .cangzhen-kind:active:not(:disabled) { transform: translateY(1px); filter: brightness(0.96); }
#app.game-stage .cangzhen-kind.is-selected {
  border-color: rgba(239, 205, 119, 0.72);
  box-shadow: inset 0 0 24px rgba(255, 242, 183, 0.34), 0 0 16px rgba(225, 179, 77, 0.44);
  color: #6d351e;
}
#app.game-stage .cangzhen-kind:focus-visible { outline: 2px solid #f0cf83; outline-offset: 2px; }

#app.game-stage .cangzhen-grid {
  position: absolute;
  left: 19.25%;
  top: 12.35%;
  z-index: 4;
  width: 53.55%;
  height: 46.9%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  column-gap: 1.5%;
  row-gap: 4.1%;
}

#app.game-stage .cangzhen-item {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  padding: 3% 5% 2.5%;
  border: 1px solid transparent;
  background-color: transparent;
  color: #f5e4bd;
  cursor: pointer;
  overflow: hidden;
  transition: filter 130ms ease, box-shadow 130ms ease, transform 90ms ease;
}

#app.game-stage .cangzhen-item img {
  display: block;
  width: min(78%, 190px);
  height: min(74%, 135px);
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 8px 7px rgba(0, 0, 0, 0.48));
  pointer-events: none;
}

#app.game-stage .cangzhen-item span {
  align-self: end;
  width: 92%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, 0.75cqw, 13px);
  padding: clamp(4px, 0.7cqh, 7px) 4%;
  border-top: 1px solid rgba(202, 159, 84, 0.52);
  background-color: rgba(14, 10, 7, 0.72);
  box-sizing: border-box;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.82);
}

#app.game-stage .cangzhen-item b {
  min-width: 0;
  overflow: hidden;
  color: #f5e4bd;
  font-size: clamp(12px, 1.95cqh, 17px);
  font-weight: 600;
  letter-spacing: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .cangzhen-item em {
  flex: none;
  color: #e4bd70;
  font-size: clamp(11px, 1.65cqh, 14px);
  font-style: normal;
  white-space: nowrap;
}

#app.game-stage .cangzhen-item:hover:not(:disabled) {
  border-color: rgba(239, 200, 108, 0.54);
  box-shadow: inset 0 0 24px rgba(244, 194, 82, 0.12);
  filter: brightness(1.1);
}

#app.game-stage .cangzhen-item:active:not(:disabled) { transform: translateY(1px); filter: brightness(0.96); }
#app.game-stage .cangzhen-item.is-selected {
  border-color: #efc96f;
  outline: 2px solid rgba(255, 218, 122, 0.86);
  outline-offset: -5px;
  box-shadow: inset 0 0 34px rgba(255, 196, 72, 0.24), 0 0 18px rgba(225, 168, 64, 0.58);
}
#app.game-stage .cangzhen-item:focus-visible { outline: 2px solid #f3d38b; outline-offset: -3px; }

#app.game-stage .cangzhen-dossier {
  position: absolute;
  left: 76.05%;
  top: 9.2%;
  z-index: 4;
  width: 21.2%;
  height: 75.8%;
  display: grid;
  grid-template-rows: 8.5% 5.5% 8% 5.5% minmax(0, 1fr) 10%;
  align-items: center;
  justify-items: center;
  padding: 3% 2.3% 2.2%;
  box-sizing: border-box;
  color: #523a26;
  text-align: center;
  overflow: hidden;
}

#app.game-stage .cangzhen-dossier header {
  align-self: center;
  width: 76%;
  color: #4b3420;
  font-size: clamp(13px, 1.9cqh, 17px);
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1.5;
}

#app.game-stage .cangzhen-detail-kind {
  align-self: end;
  color: #8a6c45;
  font-size: clamp(10px, 1.4cqh, 12px);
  letter-spacing: 3px;
}

#app.game-stage .cangzhen-dossier h2 {
  max-width: 92%;
  margin: 0;
  overflow: hidden;
  color: #56381e;
  font-size: clamp(19px, 3.05cqh, 29px);
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .cangzhen-detail-count {
  color: #9a7746;
  font-size: clamp(13px, 2cqh, 18px);
  font-weight: 500;
  letter-spacing: 2px;
}

#app.game-stage .cangzhen-detail-art {
  display: block;
  width: min(85%, 270px);
  height: min(88%, 310px);
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 12px 9px rgba(82, 54, 30, 0.18));
}

#app.game-stage .cangzhen-dossier p {
  align-self: start;
  max-width: 88%;
  margin: 0;
  overflow: hidden;
  color: #74563a;
  font-size: clamp(11px, 1.7cqh, 15px);
  letter-spacing: 2px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .cangzhen-footer {
  position: absolute;
  left: 21.2%;
  right: 1.7%;
  bottom: 1.3%;
  z-index: 5;
  height: 8.2%;
  display: grid;
  grid-template-columns: minmax(440px, 1.45fr) minmax(185px, 0.62fr) minmax(175px, 0.54fr);
  align-items: center;
  gap: clamp(12px, 1.5cqw, 24px);
}

#app.game-stage .cangzhen-pager {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(74px, 0.48fr) minmax(140px, 1fr);
  align-items: center;
  gap: clamp(10px, 1cqw, 18px);
}

#app.game-stage .cangzhen-pager > span {
  color: #5f452b;
  font-size: clamp(14px, 2.05cqh, 18px);
  letter-spacing: 3px;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 252, 230, 0.62);
}

#app.game-stage .cangzhen-command {
  min-width: 0;
  width: 100%;
  height: clamp(48px, 6.7cqh, 62px);
  padding: 0 12%;
  border: 0;
  background: url("./assets/ui/affairs-book/02_分组玉签_普通.svg") center / 100% 100% no-repeat;
  color: #4a3520;
  font: 700 clamp(13px, 1.95cqh, 17px)/1 "Royal Kai", "STKaiti", "KaiTi", serif;
  letter-spacing: 3px;
  text-shadow: 0 1px 0 rgba(255, 255, 240, 0.62);
  cursor: pointer;
  transition: filter 130ms ease, transform 90ms ease;
}

#app.game-stage .cangzhen-command--primary {
  background-image: url("./assets/ui/venues/venue-primary-command-20260711.png");
  color: #ffe7a6;
  text-shadow: 0 2px 3px rgba(18, 39, 34, 0.72);
}

#app.game-stage .cangzhen-command:hover:not(:disabled) { filter: brightness(1.1) saturate(1.06); }
#app.game-stage .cangzhen-command:active:not(:disabled) { transform: translateY(1px); filter: brightness(0.95); }
#app.game-stage .cangzhen-command:focus-visible { outline: 2px solid #f0d48e; outline-offset: 2px; }
#app.game-stage .cangzhen-command:disabled { filter: grayscale(0.66) opacity(0.46); cursor: not-allowed; }

#app.game-stage .cangzhen-screen .dialog-screen { z-index: 20; }

/* ============================================================================
   2026-07-13：宣政殿·兵部国力 / 刑部审案
   三页共用高对比奏牍：旧 .court-board 的深色旧底覆盖了深墨正文，
   使国力数值与刑部案情在实际画面中几近不可读。固定为同屏案卷，超量分页。
   ============================================================================ */
#app.game-stage .court-screen--guoli .court-board,
#app.game-stage .court-screen--punish .court-board,
#app.game-stage .court-screen--cabal .court-board {
  position: absolute;
  top: clamp(104px, 14.4cqh, 122px);
  right: auto;
  bottom: clamp(18px, 2.6cqh, 28px);
  left: 50%;
  z-index: 6;
  width: min(91.5cqw, 1220px);
  max-height: none;
  min-height: 0;
  margin: 0;
  padding: clamp(12px, 1.8cqh, 18px) clamp(14px, 1.8cqw, 24px);
  box-sizing: border-box;
  transform: translateX(-50%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 0.95cqh, 10px);
  border: 1px solid rgba(174, 132, 67, 0.72);
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(104, 129, 110, 0.12), transparent 11%, transparent 89%, rgba(126, 74, 57, 0.10)),
    linear-gradient(180deg, rgba(255, 253, 240, 0.985), rgba(238, 228, 199, 0.975));
  color: #4a3120;
  box-shadow: 0 17px 34px rgba(25, 17, 11, 0.32), inset 0 0 0 2px rgba(255, 255, 245, 0.78);
}

#app.game-stage .court-dossier-head {
  flex: 0 0 auto;
  min-height: clamp(42px, 6.15cqh, 52px);
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto minmax(130px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 clamp(13px, 1.5cqw, 20px);
  border: 1px solid rgba(197, 162, 95, 0.72);
  border-radius: 3px;
  background: linear-gradient(90deg, #293a32, #3b4e42 50%, #293a32);
  color: #fff0c8;
  box-shadow: inset 0 0 0 1px rgba(255, 235, 182, 0.18), 0 2px 0 rgba(112, 77, 40, 0.3);
}

#app.game-stage .court-dossier-head span,
#app.game-stage .court-dossier-head small {
  min-width: 0;
  color: #e8d09a;
  font-size: clamp(11px, 1.58cqh, 14px);
  font-weight: 600;
  letter-spacing: clamp(1px, 0.18cqw, 3px);
  line-height: 1.2;
  white-space: nowrap;
}

#app.game-stage .court-dossier-head small { text-align: right; }

#app.game-stage .court-dossier-head h1 {
  margin: 0;
  color: #fff3d0;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(19px, 2.8cqh, 26px);
  font-weight: 700;
  letter-spacing: clamp(3px, 0.48cqw, 6px);
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(25, 17, 9, 0.78);
  white-space: nowrap;
}

#app.game-stage .court-case-list {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-auto-flow: row;
  grid-auto-rows: max-content;
  align-content: center;
  gap: clamp(7px, 1cqh, 10px);
}

/* 一案、两案不能把案条强行拉满整本秋审簿；三案才均分可用高度。 */
#app.game-stage .court-case-list--1 {
  grid-template-rows: clamp(150px, 23cqh, 180px);
}

#app.game-stage .court-case-list--2 {
  grid-template-rows: repeat(2, clamp(136px, 20cqh, 160px));
}

#app.game-stage .court-case-list--3 {
  grid-template-rows: repeat(3, minmax(0, 1fr));
  align-content: stretch;
}

#app.game-stage .court-board--case .punish-case.court-case {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: clamp(8px, 1.05cqh, 11px) clamp(12px, 1.3cqw, 17px);
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: clamp(4px, 0.55cqh, 6px);
  border: 1px solid rgba(151, 109, 57, 0.48);
  border-radius: 3px;
  background: rgba(255, 251, 235, 0.92);
  color: #4b3020;
  box-shadow: inset 3px 0 0 rgba(70, 111, 93, 0.78), inset 0 0 0 1px rgba(255, 255, 248, 0.84);
}

#app.game-stage .court-case--coalition { box-shadow: inset 3px 0 0 rgba(144, 65, 48, 0.85), inset 0 0 0 1px rgba(255, 255, 248, 0.84) !important; }

#app.game-stage .court-case-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  color: #617767;
  font-size: clamp(11px, 1.48cqh, 13px);
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.1;
}

#app.game-stage .court-case-meta b {
  flex: 0 0 auto;
  color: #86502e;
  font-size: inherit;
  font-weight: 700;
  letter-spacing: 1px;
}

#app.game-stage .court-board--case .court-speaker {
  position: static;
  max-width: none;
  margin: 0;
  padding: 0;
  transform: none;
  border: 0;
  background: transparent;
  color: #493020;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(13px, 1.95cqh, 17px);
  font-weight: 600;
  letter-spacing: clamp(0.4px, 0.08cqw, 1px);
  line-height: 1.34;
  text-align: center;
  text-shadow: none;
  box-shadow: none;
}

#app.game-stage .court-board--case .court-speaker b { color: #8c442c; }

#app.game-stage .court-case-subject {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 0.7cqh, 8px) clamp(10px, 1.15cqw, 16px);
  color: #493020;
  font-family: "Royal Sans", "PingFang SC", sans-serif;
  font-size: clamp(12px, 1.72cqh, 15px);
  font-weight: 600;
  line-height: 1.18;
}

#app.game-stage .court-case-subject strong {
  color: #442b1d;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(18px, 2.55cqh, 23px);
  font-weight: 700;
  letter-spacing: 2px;
}

#app.game-stage .court-case-subject span {
  padding-left: clamp(10px, 1.1cqw, 15px);
  border-left: 1px solid rgba(151, 109, 57, 0.34);
  color: #614b36;
  white-space: nowrap;
}

#app.game-stage .court-case-subject em,
#app.game-stage .court-case-subject i {
  padding: 3px 10px;
  border: 1px solid rgba(142, 73, 47, 0.34);
  background: rgba(151, 72, 45, 0.08);
  color: #7f412d;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}

#app.game-stage .court-case-subject i {
  border-color: rgba(91, 119, 99, 0.34);
  background: rgba(76, 117, 96, 0.09);
  color: #536f5d;
}

#app.game-stage .court-case-subject b { color: #9a3f2c; }

#app.game-stage .court-board--case .court-case-actions {
  position: static;
  left: auto;
  top: auto;
  width: 100%;
  max-width: 940px;
  min-width: 0;
  margin: 0;
  transform: none;
  display: grid;
  align-self: center;
  justify-self: center;
  align-items: center;
  gap: clamp(5px, 0.7cqw, 9px);
}

#app.game-stage .court-screen--punish .court-case-actions {
  grid-template-columns: repeat(5, minmax(112px, 1fr));
}

#app.game-stage .court-screen--cabal .court-case-actions {
  max-width: 780px;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

#app.game-stage .court-board--case .court-case-actions:empty { display: none; }

#app.game-stage .court-board--case .court-case-actions .court-action,
#app.game-stage .court-ledger-pager .court-action,
#app.game-stage .court-ledger-return {
  min-width: 0;
  min-height: clamp(34px, 5.05cqh, 42px);
  height: clamp(34px, 5.05cqh, 42px);
  padding: clamp(5px, 0.7cqh, 7px) clamp(8px, 1cqw, 14px);
  font-size: clamp(12px, 1.72cqh, 15px);
  letter-spacing: clamp(1px, 0.15cqw, 2px);
}

#app.game-stage .court-ledger-pager {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(108px, 142px) minmax(60px, 80px) minmax(108px, 142px);
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.1cqw, 15px);
}

#app.game-stage .court-ledger-pager > span {
  color: #5b412b;
  font-size: clamp(12px, 1.72cqh, 15px);
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
}

#app.game-stage .court-ledger-footer {
  flex: 0 0 auto;
  min-height: clamp(34px, 5.05cqh, 42px);
  display: flex;
  align-items: center;
  justify-content: center;
}

#app.game-stage .court-ledger-return { width: clamp(124px, 12cqw, 154px); }

#app.game-stage .court-board--guoli { gap: clamp(6px, 0.75cqh, 8px); }

#app.game-stage .guoli-stat-grid {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(5px, 0.72cqh, 8px);
}

#app.game-stage .guoli-stat {
  min-width: 0;
  min-height: clamp(44px, 6.35cqh, 54px);
  padding: clamp(6px, 0.85cqh, 8px) clamp(9px, 0.85cqw, 12px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(93, 126, 105, 0.42);
  background: linear-gradient(180deg, rgba(239, 244, 224, 0.9), rgba(222, 231, 206, 0.78));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 245, 0.64);
}

#app.game-stage .guoli-stat span {
  overflow: hidden;
  color: #5f7564;
  font-size: clamp(10px, 1.42cqh, 12px);
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .guoli-stat b {
  overflow: hidden;
  color: #4a3020;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(14px, 2.05cqh, 18px);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .guoli-stat b i { color: #6d563d; font-size: 0.74em; font-style: normal; }
#app.game-stage .guoli-stat b.is-ready { color: #356750; }
#app.game-stage .guoli-stat b.is-spent { color: #9a4933; }

#app.game-stage .guoli-neighbors {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.6cqh, 6px);
  padding: clamp(8px, 0.95cqh, 10px) clamp(10px, 1.1cqw, 14px);
  border: 1px solid rgba(169, 128, 72, 0.45);
  background: rgba(255, 252, 238, 0.66);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 245, 0.72);
}

#app.game-stage .guoli-neighbors > header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: clamp(4px, 0.55cqh, 6px);
  border-bottom: 1px solid rgba(169, 128, 72, 0.32);
  color: #5e4330;
  font-size: clamp(12px, 1.66cqh, 14px);
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.15;
}

#app.game-stage .guoli-neighbors > header b { color: #7c4b2c; font-size: inherit; }

#app.game-stage .guoli-neighbor-list {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: clamp(4px, 0.55cqh, 6px) clamp(8px, 1.15cqw, 16px);
  overflow: hidden;
}

#app.game-stage .guoli-neighbor-row {
  min-width: 0;
  min-height: clamp(29px, 4.15cqh, 35px);
  display: grid;
  grid-template-columns: minmax(54px, 0.9fr) minmax(82px, 1.25fr) minmax(55px, 0.8fr) minmax(55px, 0.9fr);
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-left: 2px solid rgba(76, 116, 96, 0.6);
  background: rgba(227, 237, 219, 0.58);
  color: #5a4531;
  font-size: clamp(10px, 1.45cqh, 12px);
  line-height: 1.12;
}

#app.game-stage .guoli-neighbor-row b,
#app.game-stage .guoli-neighbor-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .guoli-neighbor-row b {
  color: #4a3020;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(12px, 1.68cqh, 14px);
  letter-spacing: 1px;
}

#app.game-stage .guoli-neighbor-row span { color: #66503a; }
#app.game-stage .guoli-empty { margin: auto; color: #6e5944; font-size: clamp(13px, 1.8cqh, 15px); letter-spacing: 2px; text-align: center; }

@container (max-width: 1280px) {
  #app.game-stage .court-screen--guoli .court-board,
  #app.game-stage .court-screen--punish .court-board,
  #app.game-stage .court-screen--cabal .court-board { width: min(94cqw, 1180px); }
  #app.game-stage .court-case-meta { font-size: 11px; }
  #app.game-stage .guoli-neighbor-row { grid-template-columns: minmax(48px, 0.85fr) minmax(70px, 1.2fr) minmax(48px, 0.75fr) minmax(46px, 0.75fr); gap: 4px; padding-inline: 6px; }
}

/*
   2026-08-19：兵部·国力一览接入国家外交排版原型。
   这是只读国力册，不是礼部邦交操作页：保留 7 个动态摘要字段、每页 5 国、
   data-guoli-page 与 data-court-back；只收紧内容边界和分页层级，避免固定白板吞掉下半屏。
*/
#app.game-stage .court-screen--guoli .court-board {
  top: clamp(104px, 14.4cqh, 122px);
  bottom: auto;
  width: min(91.5cqw, 1220px);
  padding: clamp(12px, 1.7cqh, 18px) clamp(14px, 1.8cqw, 24px) clamp(13px, 1.55cqh, 17px);
  overflow: visible;
}

#app.game-stage .court-screen--guoli .guoli-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) repeat(2, minmax(0, 1fr));
  gap: clamp(7px, 0.9cqw, 12px);
}

#app.game-stage .court-screen--guoli .guoli-summary-group {
  min-width: 0;
  padding: clamp(8px, 1.1cqh, 12px) clamp(10px, 1.15cqw, 15px) clamp(7px, 0.9cqh, 10px);
  border: 1px solid rgba(146, 153, 122, 0.58);
  background: linear-gradient(110deg, rgba(232, 237, 218, 0.94), rgba(245, 240, 220, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

#app.game-stage .court-screen--guoli .guoli-summary-group::before {
  content: "";
  display: block;
  width: clamp(26px, 3.5cqw, 48px);
  margin: calc(clamp(8px, 1.1cqh, 12px) * -1) 0 clamp(5px, 0.7cqh, 8px);
  border-top: 3px solid #a7834b;
}

#app.game-stage .court-screen--guoli .guoli-summary-label {
  margin-bottom: clamp(4px, 0.65cqh, 7px);
  color: #315a4c;
  font-size: clamp(11px, 1.55cqh, 14px);
  font-weight: 700;
  letter-spacing: clamp(2px, 0.24cqw, 4px);
  line-height: 1.1;
}

#app.game-stage .court-screen--guoli .guoli-summary-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(7px, 1cqw, 14px);
}

#app.game-stage .court-screen--guoli .guoli-summary-values--triple { grid-template-columns: repeat(3, minmax(0, 1fr)); }

#app.game-stage .court-screen--guoli .guoli-summary-values .guoli-stat {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#app.game-stage .court-screen--guoli .guoli-summary-values .guoli-stat + .guoli-stat {
  padding-left: clamp(7px, 1cqw, 14px);
  border-left: 1px solid rgba(149, 132, 89, 0.35);
}

#app.game-stage .court-screen--guoli .guoli-summary-values .guoli-stat span {
  color: #6b5a46;
  font-size: clamp(9px, 1.35cqh, 12px);
  letter-spacing: clamp(.5px, 0.12cqw, 2px);
}

#app.game-stage .court-screen--guoli .guoli-summary-values .guoli-stat b {
  color: #4b352b;
  font-size: clamp(14px, 2.15cqh, 19px);
  letter-spacing: 0;
}

#app.game-stage .court-screen--guoli .guoli-neighbors {
  flex: 0 0 auto;
  gap: clamp(5px, 0.7cqh, 8px);
  padding: clamp(8px, 1.05cqh, 12px) clamp(10px, 1.15cqw, 16px);
}

#app.game-stage .court-screen--guoli .guoli-neighbor-list {
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(5px, 0.7cqh, 8px);
  overflow: visible;
}

#app.game-stage .court-screen--guoli .guoli-neighbor-row {
  min-height: clamp(36px, 5.1cqh, 48px);
  grid-template-columns: minmax(150px, 1.05fr) minmax(135px, 0.9fr) minmax(105px, 0.7fr) minmax(145px, 1fr);
  gap: clamp(7px, 1cqw, 14px);
  padding: 4px clamp(10px, 1.25cqw, 20px);
  border-left-width: 3px;
  background: linear-gradient(90deg, rgba(237, 241, 228, 0.96), rgba(239, 242, 228, 0.72));
  font-size: clamp(11px, 1.62cqh, 15px);
}

#app.game-stage .court-screen--guoli .guoli-neighbor-row:nth-child(even) {
  background: linear-gradient(90deg, rgba(229, 235, 221, 0.96), rgba(234, 238, 221, 0.74));
}

#app.game-stage .court-screen--guoli .guoli-neighbor-row b { font-size: clamp(14px, 2.05cqh, 19px); }

#app.game-stage .court-screen--guoli .guoli-neighbor-row .guoli-relation {
  justify-self: start;
  padding: 3px 9px 4px;
  border: 1px solid rgba(117, 143, 124, 0.65);
  color: #315c4e;
  background: rgba(217, 230, 211, 0.64);
  font-size: clamp(10px, 1.45cqh, 13px);
  letter-spacing: 1px;
}

#app.game-stage .court-screen--guoli .guoli-pager { margin-top: clamp(2px, 0.35cqh, 4px); }

#app.game-stage .court-screen--guoli > .court-leave--guoli {
  right: 3.5%;
  bottom: 2.4%;
  z-index: 8;
  min-width: clamp(150px, 12cqw, 190px);
  height: clamp(42px, 5.8cqh, 54px);
  padding: 0 clamp(24px, 2.4cqw, 34px);
  border: 0;
  border-radius: 0;
  color: #2c413a;
  font-size: clamp(13px, 1.8cqh, 16px);
  letter-spacing: 2px;
  background: url("./assets/ui/buttons/return-frame-jade-luxe-20260813.svg") center / 100% 100% no-repeat;
  box-shadow: none;
}

#app.game-stage .court-screen--guoli > .court-leave--guoli:hover:not(:disabled):not([disabled]) {
  filter: brightness(1.08) saturate(1.05);
}

@container (max-width: 1280px) {
  #app.game-stage .court-screen--guoli .guoli-neighbor-row {
    grid-template-columns: minmax(132px, 1fr) minmax(120px, 0.9fr) minmax(96px, 0.72fr) minmax(130px, 0.95fr);
    gap: 8px;
    padding-inline: 10px;
  }
}
/* ============================================================================
   2026-07-13：强制决策事件（太后、荐举、圣裁、遗诏、皇陵、凯旋）
   旧 home-panel 是透明内容层；其深墨文案直接落在场景和暗遮罩上，导致太后寿宴、
   知府荐举等无法阅读。统一为固定视口的御前决策簿，保留原事件与 data-* 钩子。
   ============================================================================ */
#app.game-stage .home-panel.decision-ledger-screen .home-panel-body {
  position: absolute;
  top: clamp(96px, 13.5cqh, 114px);
  right: auto;
  bottom: clamp(18px, 2.6cqh, 28px);
  left: 50%;
  z-index: 6;
  width: min(84cqw, 1080px);
  max-height: none;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: clamp(12px, 1.8cqh, 18px) clamp(15px, 2cqw, 25px);
  box-sizing: border-box;
  transform: translateX(-50%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1cqh, 11px);
  border: 1px solid rgba(178, 139, 76, 0.72);
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(68, 105, 90, 0.11), transparent 13%, transparent 87%, rgba(129, 71, 54, 0.1)),
    linear-gradient(180deg, rgba(255, 253, 240, 0.985), rgba(239, 228, 198, 0.975));
  color: #493020;
  box-shadow: 0 18px 36px rgba(23, 15, 10, 0.36), inset 0 0 0 2px rgba(255, 255, 245, 0.78);
}

#app.game-stage .home-panel.decision-ledger-screen .home-panel-id {
  flex: 0 0 auto;
  min-height: clamp(37px, 5.4cqh, 46px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 clamp(12px, 1.5cqw, 18px);
  border: 1px solid rgba(199, 161, 91, 0.72);
  border-radius: 3px;
  background: linear-gradient(90deg, #293a32, #3e5245 50%, #293a32);
  color: #fff0c8;
  box-shadow: inset 0 0 0 1px rgba(255, 235, 182, 0.18);
}

#app.game-stage .home-panel.decision-ledger-screen .home-panel-id .hp-name {
  color: #fff1c9;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(17px, 2.45cqh, 23px);
  font-weight: 700;
  letter-spacing: clamp(2px, 0.36cqw, 5px);
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(20, 13, 8, 0.78);
}

#app.game-stage .home-panel.decision-ledger-screen .elders-card {
  flex: 0 0 auto;
  min-width: 0;
  margin: 0;
  padding: clamp(9px, 1.2cqh, 13px) clamp(11px, 1.25cqw, 16px);
  border: 1px solid rgba(127, 157, 131, 0.48);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(239, 246, 228, 0.92), rgba(226, 237, 214, 0.84));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 247, 0.72);
}

#app.game-stage .home-panel.decision-ledger-screen .home-person-row {
  align-items: center;
  gap: clamp(10px, 1.5cqw, 17px);
}

#app.game-stage .home-panel.decision-ledger-screen .home-person-portrait {
  flex-basis: clamp(76px, 8.8cqw, 104px);
  width: clamp(76px, 8.8cqw, 104px);
  height: clamp(92px, 13.2cqh, 112px);
  border-color: rgba(153, 118, 66, 0.48);
  border-radius: 3px;
  background: rgba(255, 252, 235, 0.5);
}

#app.game-stage .home-panel.decision-ledger-screen .elders-card-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-bottom: clamp(5px, 0.75cqh, 8px);
  padding-bottom: clamp(5px, 0.7cqh, 7px);
  border-bottom: 1px solid rgba(143, 112, 66, 0.28);
  text-align: center;
}

#app.game-stage .home-panel.decision-ledger-screen .elders-title,
#app.game-stage .home-panel.decision-ledger-screen .elders-name {
  color: #5e3a24;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(14px, 2.05cqh, 18px);
  font-weight: 700;
  letter-spacing: 2px;
}

#app.game-stage .home-panel.decision-ledger-screen .elders-note {
  margin: 0;
  color: #463020;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(14px, 2.02cqh, 18px);
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.58;
  text-align: center;
  text-shadow: none;
}

#app.game-stage .home-panel.decision-ledger-screen .elders-note b,
#app.game-stage .home-panel.decision-ledger-screen .hp-note b { color: #8a432b; }

#app.game-stage .home-panel.decision-ledger-screen .hp-note {
  flex: 0 0 auto;
  min-width: 0;
  margin: 0;
  padding: clamp(7px, 0.95cqh, 10px) clamp(11px, 1.3cqw, 16px);
  border-left: 3px solid rgba(117, 149, 121, 0.82);
  background: rgba(255, 251, 234, 0.76);
  color: #59412d;
  font-size: clamp(12px, 1.7cqh, 15px);
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.52;
  text-align: center;
}

#app.game-stage .home-panel.decision-ledger-screen .palace-list.palace-col {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(7px, 0.9cqh, 10px) clamp(10px, 1.2cqw, 14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(5px, 0.7cqh, 8px);
  border: 1px solid rgba(129, 158, 132, 0.42);
  border-radius: 3px;
  background: rgba(225, 236, 216, 0.64);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 246, 0.68);
}

#app.game-stage .home-panel.decision-ledger-screen .palace-list.palace-col:has(> .palace-col-btn:nth-child(4)) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#app.game-stage .home-panel.decision-ledger-screen .palace-col-btn {
  width: min(100%, 620px);
  min-width: 0;
  min-height: clamp(36px, 5.25cqh, 44px);
  padding: clamp(6px, 0.8cqh, 8px) clamp(10px, 1.4cqw, 16px);
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/floral/court-action-normal.png") center / 100% 100% no-repeat;
  color: #fff1ca;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(12px, 1.8cqh, 16px);
  font-weight: 700;
  letter-spacing: clamp(0.7px, 0.13cqw, 2px);
  line-height: 1.22;
  text-align: center;
  text-shadow: 0 1px 2px rgba(31, 19, 10, 0.92), 0 0 3px rgba(31, 19, 10, 0.72);
  box-shadow: none;
}

#app.game-stage .home-panel.decision-ledger-screen .palace-col-btn:hover:not(:disabled) {
  background-image: url("./assets/ui/floral/court-action-active.png");
  color: #fff6dc;
  filter: brightness(1.06);
}

#app.game-stage .home-panel.decision-ledger-screen .palace-col-btn:active:not(:disabled) {
  background-image: url("./assets/ui/floral/court-action-active.png");
  transform: translateY(1px) scale(0.987);
}

#app.game-stage .home-panel.decision-ledger-screen .palace-col-btn:disabled {
  color: rgba(255, 241, 202, 0.58);
  filter: grayscale(0.72) opacity(0.48);
}

@container (max-width: 1280px) {
  #app.game-stage .home-panel.decision-ledger-screen .home-panel-body { width: min(91.5cqw, 1080px); }
  #app.game-stage .home-panel.decision-ledger-screen .palace-col-btn { font-size: clamp(11px, 1.7cqh, 15px); letter-spacing: 0.5px; }
}

/* ============================================================================
   2026-07-13：通用对白 / 剧情裁择 / 场景确认 / 突发事件统一为「宫廷传报」。
   事件层必须高过养心殿透明热区（其 z-index 为 26-27），且独占点击。
   2026-08-08：全游戏弹窗层不再压暗底层场景；仅保留实体面板自身底色。
   ============================================================================ */
#app.game-stage .palace-modal-screen,
#app.game-stage .event-backdrop {
  position: absolute;
  inset: 0;
  z-index: 80;
  box-sizing: border-box;
  pointer-events: auto;
  isolation: isolate;
  background: transparent;
  animation: palace-modal-fade 170ms ease-out both;
}

#app.game-stage .palace-modal-screen--event,
#app.game-stage .palace-modal-screen--choice,
#app.game-stage .palace-modal-screen--confirm {
  display: grid;
  place-items: center;
  padding: clamp(58px, 8.5cqh, 76px) clamp(26px, 5.5cqw, 80px) clamp(34px, 5cqh, 52px);
}

/* 事件图只承载环境：直接显示原图，不叠加压暗渐变。 */
#app.game-stage .event-backdrop.has-event-scene {
  background-image: var(--event-scene-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

#app.game-stage .palace-modal-screen--message { display: block; cursor: pointer; }

/* 临幸诗句 / 建成宫苑多人结果才换入场景图；无蒙层、无滤镜，关闭后恢复原页。 */
#app.game-stage .dialog-screen--intimacy-poem,
#app.game-stage .dialog-screen--venue-group {
  background-image: var(--dialog-scene-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

#app.game-stage .palace-modal,
#app.game-stage .palace-message {
  box-sizing: border-box;
  border: 1px solid rgba(147, 109, 57, 0.74);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(94, 123, 105, 0.08), transparent 16%, transparent 84%, rgba(143, 75, 50, 0.07)),
    linear-gradient(180deg, rgba(255, 252, 235, 0.98), rgba(237, 228, 199, 0.98));
  color: #3d2b1d;
  box-shadow: 0 24px 54px rgba(15, 11, 7, 0.46), inset 0 0 0 1px rgba(255, 255, 248, 0.78);
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
}

#app.game-stage .palace-modal::before,
#app.game-stage .palace-message::before {
  content: "";
  position: absolute;
  inset: clamp(6px, 0.9cqh, 9px);
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(135, 104, 59, 0.38);
}

#app.game-stage .palace-modal > *,
#app.game-stage .dialog-box > * { position: relative; z-index: 1; }

#app.game-stage .palace-modal-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 0.7cqh, 7px);
  margin: 0;
  text-align: center;
}

#app.game-stage .palace-modal-kicker {
  min-width: clamp(108px, 13cqw, 156px);
  padding: clamp(4px, 0.62cqh, 6px) clamp(14px, 1.8cqw, 20px);
  border: 1px solid rgba(188, 155, 87, 0.72);
  border-radius: 2px;
  background: linear-gradient(180deg, #365f59, #203f3b);
  color: #fff0c9;
  font-size: clamp(12px, 1.65cqh, 15px);
  font-weight: 700;
  letter-spacing: clamp(1.5px, 0.21cqw, 3px);
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(24, 15, 9, 0.7);
}

#app.game-stage .event-panel {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: min(840px, 100%);
  min-height: 0;
  margin: 0;
  padding: clamp(22px, 3.2cqh, 30px) clamp(24px, 4cqw, 48px) clamp(20px, 2.9cqh, 28px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(10px, 1.4cqh, 14px);
  border-radius: 4px;
  backdrop-filter: none;
}

#app.game-stage .event-panel h2 {
  margin: 0;
  color: #54351f;
  font-size: clamp(24px, 3.5cqh, 32px);
  font-weight: 700;
  letter-spacing: clamp(2px, 0.35cqw, 5px);
  line-height: 1.18;
}

#app.game-stage .event-panel > p[data-event-text] {
  margin: 0;
  padding: clamp(10px, 1.45cqh, 14px) clamp(12px, 1.8cqw, 18px);
  border-top: 1px solid rgba(136, 102, 57, 0.28);
  border-bottom: 1px solid rgba(136, 102, 57, 0.28);
  color: #422d1d;
  font-size: clamp(15px, 2.15cqh, 19px);
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.68;
  text-align: center;
  text-shadow: none;
}

#app.game-stage .event-actions {
  width: min(100%, 680px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(7px, 1cqh, 10px);
}

#app.game-stage .event-actions:has(> :only-child) { grid-template-columns: minmax(0, 360px); justify-content: center; }

#app.game-stage .palace-command,
#app.game-stage .story-choice {
  min-width: 0;
  min-height: clamp(40px, 5.8cqh, 48px);
  margin: 0;
  padding: clamp(7px, 1cqh, 9px) clamp(10px, 1.4cqw, 16px);
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/floral/court-action-normal.png") center / 100% 100% no-repeat;
  color: #fff1ca;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(14px, 1.9cqh, 17px);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.26;
  text-align: center;
  text-shadow: 0 1px 2px rgba(30, 18, 9, 0.9), 0 0 3px rgba(30, 18, 9, 0.72);
  box-shadow: none;
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms ease;
}

#app.game-stage .palace-command:hover,
#app.game-stage .story-choice:hover {
  border: 0;
  background-image: url("./assets/ui/floral/court-action-active.png");
  color: #fff7df;
  filter: brightness(1.07);
}

#app.game-stage .palace-command:active,
#app.game-stage .story-choice:active {
  transform: translateY(1px) scale(0.988);
  background-image: url("./assets/ui/floral/court-action-active.png");
}

#app.game-stage .dialog-screen { z-index: 80; }

#app.game-stage .dialog-screen .dialog-box {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: clamp(18px, 3.2cqh, 30px);
  width: min(1020px, calc(100cqw - 64px));
  min-height: clamp(126px, 18cqh, 160px);
  margin: 0;
  padding: clamp(30px, 4.2cqh, 38px) clamp(52px, 6.8cqw, 88px) clamp(18px, 2.5cqh, 24px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(8px, 1.15cqh, 11px);
  cursor: pointer;
}

#app.game-stage .dialog-screen .dialog-box::before {
  inset: clamp(6px, 0.85cqh, 8px);
  width: auto;
  height: auto;
  border-color: rgba(140, 105, 58, 0.42);
  border-radius: 2px;
  background: none;
}

#app.game-stage .dialog-screen .dialog-box::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("./assets/ui/dialog/dialog-floral-frame.png") center / 100% 100% no-repeat;
}

#app.game-stage .dialog-screen .dialog-name {
  position: static;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  min-width: clamp(116px, 11cqw, 148px);
  padding: clamp(5px, 0.68cqh, 7px) clamp(24px, 2.6cqw, 34px);
  transform: none;
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/floral/court-action-normal.png") center / 100% 100% no-repeat;
  color: #fff0c9;
  font-size: clamp(13px, 1.75cqh, 16px);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-orientation: mixed;
  writing-mode: horizontal-tb;
  letter-spacing: clamp(1px, 0.16cqw, 2px);
  text-shadow: 0 1px 2px rgba(24, 15, 9, 0.7);
}

#app.game-stage .dialog-screen .dialog-box p {
  width: min(100%, 820px);
  margin: 0 auto;
  color: #422d1d;
  font-size: clamp(15px, 2.1cqh, 19px);
  font-weight: 600;
  letter-spacing: 0.4px;
  line-height: 1.65;
  text-align: center;
  text-shadow: none;
}

#app.game-stage .dialog-screen .dialog-hint {
  align-self: center;
  color: #87663c;
  font-size: clamp(11px, 1.45cqh, 13px);
  letter-spacing: 1px;
}

#app.game-stage .palace-message--danger { border-color: rgba(151, 66, 49, 0.82); }
#app.game-stage .palace-message--verdict { border-color: rgba(177, 125, 44, 0.85); }

#app.game-stage .story-choice-box {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: min(720px, 100%);
  margin: 0;
  padding: clamp(24px, 3.5cqh, 32px) clamp(26px, 4cqw, 46px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(8px, 1.2cqh, 12px);
}

#app.game-stage .story-prompt {
  width: min(100%, 600px);
  margin: 0 auto clamp(4px, 0.7cqh, 7px);
  color: #422d1d;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(16px, 2.25cqh, 20px);
  font-weight: 600;
  line-height: 1.65;
  text-align: center;
  text-shadow: none;
}

#app.game-stage .story-choice { width: min(100%, 530px); align-self: center; }

#app.game-stage .menu-confirm-mask { z-index: 80; }

#app.game-stage .menu-confirm.consort-status {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  margin: 0;
  padding: clamp(24px, 3.5cqh, 32px) clamp(28px, 4cqw, 44px);
  border: 1px solid rgba(147, 109, 57, 0.74);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(94, 123, 105, 0.08), transparent 16%, transparent 84%, rgba(143, 75, 50, 0.07)),
    linear-gradient(180deg, rgba(255, 252, 235, 0.98), rgba(237, 228, 199, 0.98));
  color: #3d2b1d;
  box-shadow: 0 24px 54px rgba(15, 11, 7, 0.46), inset 0 0 0 1px rgba(255, 255, 248, 0.78);
  text-align: center;
}

#app.game-stage .menu-confirm .cs-head { color: #54351f; font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif; font-size: clamp(22px, 3.1cqh, 28px); font-weight: 700; letter-spacing: 3px; }
#app.game-stage .menu-confirm .cs-sub { margin: clamp(12px, 1.7cqh, 16px) 0; color: #422d1d; font-size: clamp(15px, 2cqh, 18px); font-weight: 600; line-height: 1.62; }
#app.game-stage .menu-confirm .menu-confirm-acts { justify-content: center; gap: clamp(10px, 1.5cqw, 16px); }

#app.game-stage .visit-dialog.palace-message--visit {
  box-sizing: border-box;
  border: 1px solid rgba(147, 109, 57, 0.74);
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(94, 123, 105, 0.08), transparent 16%, transparent 84%, rgba(143, 75, 50, 0.07)),
    linear-gradient(180deg, rgba(255, 252, 235, 0.97), rgba(237, 228, 199, 0.97));
  box-shadow: 0 16px 34px rgba(15, 11, 7, 0.38), inset 0 0 0 1px rgba(255, 255, 248, 0.7);
}

#app.game-stage .visit-dialog.palace-message--visit::before { inset: clamp(5px, 0.7cqh, 7px); border-radius: 1px; }
#app.game-stage .visit-dialog.palace-message--visit .visit-dialog-text { color: #422d1d; }
#app.game-stage .visit-dialog.palace-message--visit .court-speaker,
#app.game-stage .visit-dialog.palace-message--visit p { color: #422d1d; font-weight: 600; }

#app.game-stage .palace-inline-report {
  position: relative;
  width: min(100%, 900px);
  margin: 0 auto;
  padding: clamp(13px, 1.8cqh, 17px) clamp(18px, 2.4cqw, 26px);
  box-sizing: border-box;
  border: 1px solid rgba(151, 115, 63, 0.48);
  border-radius: 3px;
  background: rgba(255, 252, 237, 0.88);
  color: #493220;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 250, 0.72);
}

#app.game-stage .palace-inline-report p { margin: 0; color: inherit; font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif; font-size: clamp(13px, 1.8cqh, 16px); font-weight: 600; line-height: 1.62; text-align: center; }

#app.game-stage .verdict-box {
  z-index: 80;
  border: 1px solid rgba(147, 109, 57, 0.74);
  background:
    linear-gradient(90deg, rgba(94, 123, 105, 0.08), transparent 16%, transparent 84%, rgba(143, 75, 50, 0.07)),
    linear-gradient(180deg, rgba(255, 252, 235, 0.98), rgba(237, 228, 199, 0.98));
  color: #422d1d;
  box-shadow: 0 20px 44px rgba(15, 11, 7, 0.42);
}

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

@media (prefers-reduced-motion: reduce) {
  #app.game-stage .palace-modal-screen { animation: none; }
  #app.game-stage .palace-command,
  #app.game-stage .story-choice { transition: none; }
}

/* 2026-07-13：共享人物名册重设为「人物宫籍」。
   旧版把档案与方形立绘台上下拆开，选中人物没有视觉重心；现在由同一张册页承载
   左侧名签与右侧人物档。剧情妃领取是独立见礼页，明确不接入本规则。 */
#app.game-stage .servant-ledger-screen .shared-ledger-panel:has(.roster-panel),
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .shared-ledger-panel:has(.roster-panel) {
  overflow: hidden;
  padding: clamp(18px, 2.45cqh, 24px) clamp(24px, 3.1cqw, 34px) clamp(20px, 2.65cqh, 27px);
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/skins/palace-paper-panel.svg") center / 100% 100% no-repeat;
  box-shadow: 0 24px 46px rgba(24, 17, 12, 0.35);
}

#app.game-stage .servant-ledger-screen .shared-ledger-panel:has(.roster-panel)::before,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .shared-ledger-panel:has(.roster-panel)::before {
  display: none;
}

#app.game-stage .servant-ledger-screen .shared-ledger-head,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .shared-ledger-head {
  min-height: clamp(34px, 4.6cqh, 42px);
  margin: 0 0 clamp(9px, 1.2cqh, 12px);
  padding: 0 clamp(12px, 1.5cqw, 18px) clamp(7px, 1cqh, 9px);
  border-bottom: 1px solid rgba(133, 96, 44, 0.38);
  background: transparent;
}

#app.game-stage .servant-ledger-screen .shared-ledger-head span,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .shared-ledger-head span {
  color: #4a2f1c;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(24px, 3.45cqh, 30px);
  letter-spacing: 0.12em;
}

#app.game-stage .servant-ledger-screen .shared-ledger-head small,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .shared-ledger-head small {
  color: #6a7d68;
  font-size: clamp(12px, 1.7cqh, 15px);
  font-weight: 700;
}

#app.game-stage .servant-ledger-screen .xiu-cats,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-cats {
  gap: clamp(7px, 0.9cqw, 10px);
  margin: 0 0 clamp(8px, 1.1cqh, 10px);
  padding: 0 clamp(2px, 0.35cqw, 5px) clamp(8px, 1.1cqh, 10px);
  border-bottom: 1px solid rgba(133, 96, 44, 0.24);
}

#app.game-stage .servant-ledger-screen .xiu-cat,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-cat {
  min-width: clamp(128px, 11.3cqw, 158px);
  min-height: clamp(36px, 4.9cqh, 42px);
  padding: 6px clamp(12px, 1.45cqw, 17px);
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/visit/menu-sheet/menu-sheet-middle.svg") center / 100% 100% no-repeat;
  color: #4d3924;
  box-shadow: 0 3px 7px rgba(67, 43, 21, 0.12);
  transition: transform 140ms ease, filter 140ms ease;
}

#app.game-stage .servant-ledger-screen .xiu-cat:hover:not(:disabled),
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-cat:hover:not(:disabled) {
  filter: brightness(1.04) saturate(1.07);
  transform: translateY(-1px);
}

#app.game-stage .servant-ledger-screen .xiu-cat.on,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-cat.on {
  color: #562f18;
  box-shadow: inset 0 0 0 2px rgba(156, 107, 42, 0.7), 0 3px 7px rgba(67, 43, 21, 0.16);
  filter: sepia(0.16) saturate(1.12);
}

#app.game-stage .servant-ledger-screen .xiu-cat small,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-cat small {
  color: rgba(78, 56, 32, 0.73);
}

#app.game-stage .servant-ledger-screen .bureau-sec-h,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .bureau-sec-h {
  margin: 0 0 clamp(6px, 0.9cqh, 9px);
  color: #7a4729;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(17px, 2.35cqh, 21px);
  letter-spacing: 0.08em;
  text-align: left;
}

#app.game-stage .servant-ledger-screen .roster-panel,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-panel {
  display: grid;
  min-height: 0;
  height: calc(100% - clamp(32px, 4.7cqh, 40px));
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: clamp(6px, 0.85cqh, 9px);
}

#app.game-stage .servant-ledger-screen .roster-body,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-body {
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(178px, 17.4cqw, 218px) minmax(0, 1fr);
  gap: clamp(18px, 2.15cqw, 27px);
}

#app.game-stage .servant-ledger-screen .roster-list,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-list {
  position: relative;
  min-height: 0;
  padding: clamp(9px, 1.2cqh, 12px) clamp(9px, 1.15cqw, 12px);
  border: 0;
  border-right: 1px solid rgba(133, 96, 44, 0.34);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(115, 139, 117, 0.12), rgba(255, 250, 233, 0.14));
}

#app.game-stage .servant-ledger-screen .roster-list::before,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-list::before {
  content: "";
  position: absolute;
  top: clamp(8px, 1.1cqh, 11px);
  bottom: clamp(8px, 1.1cqh, 11px);
  right: -2px;
  width: 3px;
  background: linear-gradient(180deg, transparent, rgba(116, 79, 40, 0.54) 16%, rgba(116, 79, 40, 0.54) 84%, transparent);
}

#app.game-stage .servant-ledger-screen .roster-entry,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-entry {
  position: relative;
  min-height: clamp(39px, 5.15cqh, 46px);
  padding: clamp(6px, 0.85cqh, 8px) clamp(13px, 1.45cqw, 17px);
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/visit/menu-sheet/menu-sheet-middle.svg") center / 100% 100% no-repeat;
  color: #493521;
  box-shadow: 0 3px 7px rgba(62, 42, 22, 0.11);
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

#app.game-stage .servant-ledger-screen .roster-entry:hover:not(.is-on),
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-entry:hover:not(.is-on) {
  filter: brightness(1.045) saturate(1.06);
  transform: translateX(2px);
}

#app.game-stage .servant-ledger-screen .roster-entry.is-on,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-entry.is-on {
  border: 0;
  background: url("./assets/ui/visit/menu-sheet/menu-sheet-middle.svg") center / 100% 100% no-repeat;
  color: #542e18;
  box-shadow: inset 0 0 0 2px rgba(153, 104, 40, 0.74), 0 4px 9px rgba(62, 42, 22, 0.17);
  filter: sepia(0.15) saturate(1.13);
}

#app.game-stage .servant-ledger-screen .roster-entry small,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-entry small {
  margin-top: 1px;
  color: rgba(80, 62, 38, 0.72);
  font-size: clamp(10px, 1.38cqh, 12px);
}

#app.game-stage .servant-ledger-screen .roster-main,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(238px, 0.92fr);
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(16px, 2.1cqw, 28px);
  align-items: stretch;
}

#app.game-stage .servant-ledger-screen .roster-detail,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-detail {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  align-items: start;
  gap: clamp(2px, 0.35cqh, 4px) clamp(14px, 1.65cqw, 20px);
  padding: clamp(6px, 0.8cqh, 8px) clamp(2px, 0.35cqw, 4px);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #4c3927;
}

#app.game-stage .servant-ledger-screen .roster-d-head,
#app.game-stage .servant-ledger-screen .roster-d-sec,
#app.game-stage .servant-ledger-screen .roster-d-attrs,
#app.game-stage .servant-ledger-screen .roster-d-extra:last-child,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-head,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-sec,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-attrs,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-extra:last-child {
  grid-column: 1 / -1;
}

#app.game-stage .servant-ledger-screen .roster-d-head,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-head {
  margin: 0 0 clamp(5px, 0.7cqh, 7px);
  padding: 0 0 clamp(7px, 0.9cqh, 9px);
  border-bottom: 1px solid rgba(133, 96, 44, 0.38);
  color: #522f1d;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(20px, 2.8cqh, 25px);
  font-weight: 700;
  letter-spacing: 0.05em;
}

#app.game-stage .servant-ledger-screen .roster-d-line,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-line {
  min-width: 0;
  min-height: clamp(20px, 2.7cqh, 24px);
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
  gap: 0.3em;
  align-items: baseline;
  padding: 0 0 2px;
  border-bottom: 1px solid rgba(133, 96, 44, 0.13);
  color: #5d4934;
  line-height: 1.36;
}

#app.game-stage .servant-ledger-screen .roster-d-line span,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-line span {
  color: #7c4a2a;
  font-weight: 700;
}

#app.game-stage .servant-ledger-screen .roster-d-line b,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-line b {
  min-width: 0;
  overflow: hidden;
  color: #4e3a28;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .servant-ledger-screen .roster-d-sec,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-sec {
  margin: clamp(5px, 0.75cqh, 7px) 0 0;
  color: #7c4a2a;
  font-size: clamp(14px, 1.85cqh, 16px);
  font-weight: 700;
  letter-spacing: 0.1em;
}

#app.game-stage .servant-ledger-screen .roster-d-attrs,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-attrs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(3px, 0.5cqh, 5px) clamp(8px, 1.05cqw, 12px);
}

#app.game-stage .servant-ledger-screen .roster-attr,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-attr {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  color: #5e4932;
  font-size: clamp(11px, 1.5cqh, 13px);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .servant-ledger-screen .roster-attr i,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-attr i {
  color: #7c4a2a;
  font-style: normal;
  font-weight: 700;
}

#app.game-stage .servant-ledger-screen .roster-d-extra,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-extra {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #5f4c37;
  font-size: clamp(11px, 1.48cqh, 13px);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.game-stage .servant-ledger-screen .roster-d-extra span,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-extra span {
  color: #7c4a2a;
  font-weight: 700;
}

#app.game-stage .servant-ledger-screen .roster-portrait,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-portrait {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  max-width: none;
  align-self: stretch;
  justify-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid rgba(111, 128, 104, 0.42);
  border-radius: 0;
  background:
    radial-gradient(ellipse at 50% 67%, rgba(245, 237, 209, 0.68), rgba(195, 210, 193, 0.38) 54%, rgba(91, 120, 102, 0.1) 78%),
    linear-gradient(90deg, rgba(255, 252, 237, 0.24), rgba(224, 235, 221, 0.42), rgba(255, 252, 237, 0.24));
}

#app.game-stage .servant-ledger-screen .roster-portrait::before,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-portrait::before {
  content: "";
  position: absolute;
  right: clamp(8px, 1.2cqw, 14px);
  bottom: clamp(10px, 1.5cqh, 15px);
  left: clamp(8px, 1.2cqw, 14px);
  height: 1px;
  background: rgba(126, 93, 48, 0.34);
}

#app.game-stage .servant-ledger-screen .roster-portrait img,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  object-fit: contain;
  object-position: center bottom;
}

#app.game-stage .servant-ledger-screen .roster-main:has(.roster-detail-empty),
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-main:has(.roster-detail-empty) {
  grid-template-columns: minmax(0, 1fr);
}

#app.game-stage .servant-ledger-screen .roster-detail-empty,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-detail-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: clamp(22px, 3.2cqh, 34px);
  border: 1px solid rgba(132, 98, 51, 0.22);
  background:
    linear-gradient(90deg, rgba(255, 252, 236, 0.62), rgba(230, 238, 224, 0.34), rgba(255, 252, 236, 0.62)),
    url("./assets/ui/visit/menu-sheet/menu-sheet-middle.svg") center / min(82%, 520px) clamp(42px, 5.6cqh, 50px) no-repeat;
  color: #735037;
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(16px, 2.2cqh, 20px);
  letter-spacing: 0.08em;
}

#app.game-stage .servant-ledger-screen .roster-actions,
#app.game-stage .servant-ledger-screen .roster-pgnav,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-actions,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-pgnav {
  min-height: clamp(34px, 4.7cqh, 42px);
  margin: 0;
}

#app.game-stage .servant-ledger-screen .palace-btn,
#app.game-stage .servant-ledger-screen .roster-pgbtn,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .palace-btn,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-pgbtn {
  min-width: clamp(104px, 9.3cqw, 132px);
  min-height: clamp(34px, 4.7cqh, 42px);
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/floral/court-action-normal.png") center / 100% 100% no-repeat;
  color: #fff1ca;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 1px rgba(41, 26, 17, 0.72);
  box-shadow: none;
}

#app.game-stage .servant-ledger-screen .palace-btn:hover:not(:disabled),
#app.game-stage .servant-ledger-screen .roster-pgbtn:hover:not(:disabled),
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .palace-btn:hover:not(:disabled),
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-pgbtn:hover:not(:disabled) {
  background-image: url("./assets/ui/floral/court-action-active.png");
  filter: brightness(1.06);
}

/* 八枚名签、分页与命令同屏：紧凑的是名签行距，不是靠裁切隐藏名单。 */
#app.game-stage .servant-ledger-screen .xiu-cats,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-cats {
  height: clamp(40px, 5.45cqh, 44px);
  min-height: 0;
  padding-bottom: clamp(4px, 0.6cqh, 5px);
}

#app.game-stage .servant-ledger-screen .xiu-cat,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-cat {
  min-height: clamp(32px, 4.35cqh, 36px);
  padding-block: 4px;
}

#app.game-stage .servant-ledger-screen .roster-panel,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-panel {
  gap: clamp(3px, 0.45cqh, 4px);
}

#app.game-stage .servant-ledger-screen .roster-list,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-list {
  gap: 2px;
  padding-block: clamp(6px, 0.85cqh, 8px);
}

#app.game-stage .servant-ledger-screen .roster-entry,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-entry {
  min-height: clamp(29px, 4cqh, 32px);
  padding-block: 3px;
  font-size: clamp(11px, 1.6cqh, 13px);
  line-height: 1.14;
}

#app.game-stage .servant-ledger-screen .roster-entry small,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-entry small {
  font-size: clamp(9px, 1.25cqh, 11px);
  line-height: 1.1;
}

#app.game-stage .servant-ledger-screen .roster-actions,
#app.game-stage .servant-ledger-screen .roster-pgnav,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-actions,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-pgnav {
  min-height: clamp(30px, 4.15cqh, 34px);
}

#app.game-stage .servant-ledger-screen .palace-btn,
#app.game-stage .servant-ledger-screen .roster-pgbtn,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .palace-btn,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-pgbtn {
  min-height: clamp(30px, 4.15cqh, 34px);
}

/* 空名册不再保留一整块无意义白栏：左页只作窄书脊，右页完整承接状态。 */
#app.game-stage .servant-ledger-screen .roster-body:has(.roster-list .roster-empty),
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-body:has(.roster-list .roster-empty) {
  grid-template-columns: clamp(104px, 10.8cqw, 132px) minmax(0, 1fr);
  gap: clamp(14px, 1.7cqw, 20px);
}

#app.game-stage .servant-ledger-screen .roster-list:has(.roster-empty),
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-list:has(.roster-empty) {
  display: grid;
  place-items: center;
  padding: clamp(8px, 1.1cqh, 10px) clamp(5px, 0.6cqw, 7px);
  background: linear-gradient(90deg, rgba(115, 139, 117, 0.13), rgba(255, 250, 233, 0.08));
}

#app.game-stage .servant-ledger-screen .roster-list .roster-empty-slim,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-list .roster-empty-slim {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(111, 82, 50, 0.72);
  font-family: "Royal Kai", "FZKai-Z03", "STKaiti", "KaiTi", serif;
  font-size: clamp(12px, 1.6cqh, 14px);
}

#app.game-stage .servant-ledger-screen .roster-detail-empty,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-detail-empty {
  align-content: stretch;
  align-items: center;
  justify-items: center;
  background:
    linear-gradient(90deg, rgba(255, 252, 236, 0.62), rgba(230, 238, 224, 0.34), rgba(255, 252, 236, 0.62));
}

#app.game-stage .servant-ledger-screen .roster-empty-message,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-empty-message {
  width: min(82%, 520px);
  min-height: clamp(42px, 5.6cqh, 50px);
  display: grid;
  place-items: center;
  padding: 0 clamp(18px, 2cqw, 28px);
  box-sizing: border-box;
  background: url("./assets/ui/visit/menu-sheet/menu-sheet-middle.svg") center / 100% 100% no-repeat;
  color: #735037;
}

/* 2026-08-09：整页右下角返回命令。
   只由布局判定器给真正位于整页右下角的返回 / 离开按钮加类；局部返回沿用所属页面或弹窗的按钮样式。 */
#app.game-stage button.return-command {
  box-sizing: border-box !important;
  width: clamp(170px, 14cqw, 190px) !important;
  min-width: clamp(170px, 14cqw, 190px) !important;
  max-width: clamp(170px, 14cqw, 190px) !important;
  height: clamp(52px, 7cqh, 60px) !important;
  min-height: clamp(52px, 7cqh, 60px) !important;
  max-height: clamp(52px, 7cqh, 60px) !important;
  padding: 0 clamp(7px, .7cqw, 10px) 0 clamp(32px, 2.8cqw, 38px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: url("./assets/ui/navigation/return-jade-plaque-20260713.svg") center / 100% 100% no-repeat !important;
  color: #2d3c34 !important;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 1px rgba(255, 255, 247, 0.72);
  box-shadow: 0 5px 10px rgba(38, 25, 14, 0.22);
  font-size: clamp(13px, 1.05cqw, 15px) !important;
  line-height: 1.15 !important;
  white-space: nowrap;
  overflow: hidden !important;
  text-overflow: ellipsis;
}

#app.game-stage button.return-command:hover:not(:disabled):not([disabled]) {
  filter: brightness(1.08) saturate(1.04) !important;
}

#app.game-stage button.return-command:active:not(:disabled):not([disabled]) {
  filter: brightness(0.95) saturate(0.98) !important;
}

#app.game-stage button.return-command:disabled,
#app.game-stage button.return-command[disabled] {
  filter: grayscale(0.35) !important;
}

@container (max-width: 1280px) {
  #app.game-stage .palace-modal-screen--event,
  #app.game-stage .palace-modal-screen--choice,
  #app.game-stage .palace-modal-screen--confirm { padding-inline: clamp(20px, 3.5cqw, 44px); }
  #app.game-stage .dialog-screen .dialog-box { width: min(1010px, calc(100cqw - 42px)); }
  #app.game-stage .event-panel { width: min(800px, 100%); }
}

/* 随机事件三态：纯文字传报保持原页面人物；确有事件人物时，改用与养心殿主控相同的中央大立绘层。 */
#app.game-stage .event-backdrop--report,
#app.game-stage .event-backdrop--decision { align-content: center; }

#app.game-stage .event-backdrop--with-portrait {
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  justify-items: center;
}

#app.game-stage .event-panel--report { width: min(620px, 100%); }
#app.game-stage .event-panel--decision { width: min(760px, 100%); }

#app.game-stage .event-panel--with-portrait {
  grid-column: 1;
  width: min(760px, 100%);
  align-self: end;
  justify-self: center;
  z-index: 2;
}

/* 主控与事件人物共用一套几何，避免再次漂回右侧小框或产生两套裁切口径。 */
#app.game-stage .standee-geom {
  position: absolute;
  inset: 0 12% 14.8% 12%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

#app.game-stage .standee-geom img {
  width: min(72cqw, 1080px);
  height: auto;
  max-height: 86cqh;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.42));
}

#app.game-stage .event-character-layer {
  z-index: 1;
}

/* 事件人物出现时占用全局唯一的大立绘槽；无人物事件没有 has-event-character，原页面人物完全不受影响。 */
#app.game-stage.has-event-character .ruler-standee,
#app.game-stage.has-event-character .visit-standee,
#app.game-stage.has-event-character .consort-visit-standee {
  visibility: hidden;
}

#app.game-stage.has-event-character .event-character-layer {
  visibility: visible;
}

#app.game-stage .event-actions--single { width: min(360px, 100%); }
#app.game-stage .event-actions--paired { width: min(600px, 100%); }
#app.game-stage .event-actions--grid { width: min(680px, 100%); }

#app.game-stage .event-narration-portrait {
  position: absolute;
  inset: 0;
  z-index: 78;
  pointer-events: none;
}

/* 赈灾等多幕环境事件在底部剧情对话框阶段也保留事件场景；原图直出，层级低于人物与通用对话框。 */
#app.game-stage .event-narration-scene {
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background-image: var(--event-scene-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  animation: palace-modal-fade 170ms ease-out both;
}

/* 环境分镜位于页面外层时，打开当前页面的独立堆叠上下文，让 z=80 的实体对话框
   越过 z=70 的场景图；页面其余 UI 仍留在场景图下方。 */
#app.game-stage:has(> .event-narration-scene) > :has(.palace-modal-screen--message) {
  isolation: auto;
}

@container (max-width: 1000px) {
  #app.game-stage .event-panel--with-portrait { padding-inline: clamp(18px, 2.5cqw, 26px); }
}

/* 2026-07-13：私宅名分 / 官考 / 宫苑营建。三页锁定 16:9 首屏，主命令不依赖滚动。 */
#app.game-stage .residence-rank-ledger-screen .home-panel-body,
#app.game-stage .merit-ledger-screen .home-panel-body,
#app.game-stage .palace-build-screen .home-panel-body {
  min-height: 0 !important;
  overflow: hidden !important;
}

/* 私宅 · 名分册 */
#app.game-stage .residence-rank-ledger-screen .home-panel-body { padding: clamp(8px,1.55cqh,12px) clamp(12px,1.9cqw,24px) !important; }
#app.game-stage .residence-rank-ledger { height:100%; min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr) auto auto; gap:clamp(3px,.72cqh,6px); }
#app.game-stage .residence-rank-ledger__head { min-height:clamp(34px,4.5cqh,44px); padding:0 clamp(10px,1.6cqw,16px); display:flex; align-items:center; justify-content:space-between; color:#4e3224; border:1px solid rgba(118,82,42,.42); border-radius:5px; background:linear-gradient(90deg,rgba(218,196,144,.66),rgba(255,251,232,.7)); }
#app.game-stage .residence-rank-ledger__head span { font-family:"Royal Kai","STKaiti",serif; font-size:clamp(17px,2cqw,23px); font-weight:700; letter-spacing:.13em; }
#app.game-stage .residence-rank-ledger__head b { color:#87562c; font-size:clamp(12px,1.15cqw,15px); }
#app.game-stage .residence-rank-table { min-height:0; display:grid; align-content:start; gap:clamp(2px,.4cqh,4px); }
#app.game-stage .residence-rank-row { min-height:clamp(31px,4.12cqh,40px); padding:0 clamp(5px,.8cqw,10px); display:grid; grid-template-columns:.72fr 1.15fr .9fr .95fr .66fr minmax(94px,1.55fr); gap:clamp(3px,.48cqw,7px); align-items:center; color:#4f3b2b; border:1px solid rgba(92,106,83,.34); border-radius:4px; background:rgba(255,252,234,.82); }
#app.game-stage .residence-rank-row > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#app.game-stage .residence-rank-row .cfg-rank { color:#8b5c31; font-weight:700; }
#app.game-stage .residence-rank-row .cfg-name { font-family:"Royal Kai","STKaiti",serif; font-size:clamp(15px,1.42cqw,18px); font-weight:700; }
#app.game-stage .residence-rank-head { min-height:clamp(27px,3.45cqh,34px); color:#765a3a; border-color:rgba(131,93,46,.45); background:rgba(213,187,126,.52); font-size:clamp(10px,1.05cqw,13px); letter-spacing:.06em; }
#app.game-stage .residence-rank-head > span { overflow:visible; text-overflow:clip; }
#app.game-stage .residence-rank-actions { display:flex; justify-content:flex-end; gap:clamp(3px,.48cqw,6px); overflow:visible; flex-wrap:nowrap; }
#app.game-stage .residence-rank-actions .palace-btn { min-width:clamp(30px,3.3cqw,42px); min-height:clamp(25px,2.8cqh,30px); padding:1px 4px; font-size:clamp(10px,1.02cqw,12px); white-space:nowrap; }
#app.game-stage .residence-rank-add { min-height:clamp(34px,4cqh,42px); display:grid; grid-template-columns:1.05fr .78fr 1fr .92fr 1.12fr 1.08fr .84fr; gap:clamp(3px,.52cqw,6px); align-items:center; padding:clamp(3px,.5cqh,5px) clamp(5px,.82cqw,9px); border:1px dashed rgba(119,89,45,.52); border-radius:4px; background:rgba(244,235,207,.56); }
#app.game-stage .residence-rank-add .rank-add-label { white-space:nowrap; color:#725434; font-weight:700; font-size:clamp(10px,1.05cqw,13px); }
#app.game-stage .residence-rank-add input,#app.game-stage .residence-rank-add select { min-width:0; width:100%; height:clamp(25px,2.9cqh,30px); padding:1px 4px; border:1px solid rgba(99,77,48,.38); border-radius:3px; color:#4b3727; background:rgba(255,253,240,.96); font:inherit; font-size:clamp(10px,.98cqw,12px); }
#app.game-stage .residence-rank-add .setup-mini { min-width:0; height:clamp(25px,2.9cqh,30px); padding:1px 4px; font-size:clamp(10px,.98cqw,12px); }

/* 养心殿 · 官考簿 */
#app.game-stage .merit-ledger-screen .home-panel-body { padding:clamp(9px,1.7cqh,14px) clamp(14px,2.2cqw,28px) !important; }
#app.game-stage .merit-ledger { height:100%; min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:clamp(4px,.95cqh,8px); }
#app.game-stage .merit-ledger__head { display:flex; justify-content:space-between; align-items:center; min-height:clamp(34px,4.65cqh,46px); padding:0 clamp(11px,1.8cqw,19px); color:#4d3527; border-top:2px solid rgba(133,84,44,.7); border-bottom:1px solid rgba(133,84,44,.5); background:linear-gradient(90deg,rgba(205,178,119,.5),rgba(255,251,232,.32)); font-size:clamp(12px,1.24cqw,15px); letter-spacing:.08em; }
#app.game-stage .merit-ledger__head b { color:#8f572c; font-size:clamp(16px,1.72cqw,21px); }
#app.game-stage .merit-list { min-height:0; display:grid; grid-auto-rows:minmax(0,1fr); gap:clamp(2px,.48cqh,4px); }
#app.game-stage .merit-row { min-height:0; display:grid; grid-template-columns:minmax(0,1.55fr) minmax(51px,.72fr) minmax(35px,.5fr) minmax(45px,.58fr) minmax(200px,1.45fr); gap:clamp(4px,.72cqw,9px); align-items:center; padding:0 clamp(6px,1cqw,11px); color:#4c3829; border:1px solid rgba(103,87,61,.3); border-radius:4px; background:rgba(255,252,238,.78); font-size:clamp(11px,1.17cqw,14px); }
#app.game-stage .merit-row > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#app.game-stage .merit-row .mr-name { font-family:"Royal Kai","STKaiti",serif; font-size:clamp(15px,1.47cqw,18px); font-weight:700; }
#app.game-stage .merit-row .mr-merit { color:#86542f; font-weight:700; }
#app.game-stage .merit-row.merit-head { min-height:clamp(27px,3.4cqh,34px); color:#705033; border-color:rgba(125,85,44,.45); background:rgba(209,182,124,.5); font-size:clamp(10px,1.04cqw,13px); letter-spacing:.08em; }
#app.game-stage .merit-acts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(2px,.44cqw,5px); overflow:visible !important; }
#app.game-stage .merit-acts .palace-btn { min-width:0; min-height:clamp(24px,2.88cqh,30px); padding:1px 3px; font-size:clamp(10px,.98cqw,12px); }
#app.game-stage .merit-pager { display:flex; justify-content:center; align-items:center; gap:clamp(8px,1.25cqw,15px); color:#6e4c30; font-size:clamp(11px,1.12cqw,14px); }
#app.game-stage .merit-pager .palace-btn { min-width:clamp(54px,7.7cqw,78px); min-height:clamp(27px,3.12cqh,33px); padding:1px 6px; font-size:clamp(10px,1cqw,12px); }

/* 养心殿 · 宫苑营造案 */
#app.game-stage .palace-build-screen .home-panel-body { padding:clamp(8px,1.45cqh,12px) clamp(12px,2cqw,22px) !important; }
#app.game-stage .palace-build-ledger { height:100%; min-height:0; display:grid; grid-template-rows:minmax(0,.94fr) minmax(0,1.06fr); gap:clamp(4px,1cqh,8px); }
#app.game-stage .palace-build-summary { min-height:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(6px,1.15cqw,12px); }
#app.game-stage .palace-build-card { min-height:0; display:grid; grid-template-rows:auto auto minmax(0,1fr) auto auto; align-content:start; gap:clamp(2px,.43cqh,4px); padding:clamp(7px,1.18cqh,10px) clamp(9px,1.45cqw,15px); color:#503827; border:1px solid rgba(111,78,38,.5); border-radius:5px; background:linear-gradient(135deg,rgba(253,248,226,.94),rgba(224,207,164,.68)); box-shadow:inset 0 0 0 1px rgba(255,255,255,.3); }
#app.game-stage .palace-build-card > span { color:#82603a; font-size:clamp(10px,1.02cqw,13px); letter-spacing:.1em; }
#app.game-stage .palace-build-card h2 { margin:0; color:#553927; font-family:"Royal Kai","STKaiti",serif; font-size:clamp(19px,2.08cqw,26px); line-height:1.12; letter-spacing:.09em; }
#app.game-stage .palace-build-card p { margin:0; min-height:0; color:#73533a; font-size:clamp(10px,1.05cqw,13px); line-height:1.35; overflow:hidden; }
#app.game-stage .palace-build-next { border-color:rgba(139,86,35,.74); background:linear-gradient(135deg,rgba(255,250,226,.98),rgba(218,183,111,.7)); }
#app.game-stage .palace-build-next:not(.is-complete) h2 { color:#8a4f25; }
#app.game-stage .palace-build-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(2px,.46cqw,5px); }
#app.game-stage .palace-build-metrics span { min-width:0; padding:clamp(2px,.38cqh,4px); display:flex; flex-direction:column; gap:1px; color:#806044; border-top:1px solid rgba(119,85,47,.27); font-size:clamp(9px,.91cqw,11px); }
#app.game-stage .palace-build-metrics b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#4b3527; font-size:clamp(11px,1.13cqw,14px); }
#app.game-stage .palace-build-go { width:100%; min-height:clamp(25px,3.08cqh,32px); margin-top:1px; padding:1px 6px; color:#fff4d3; border-color:#75451f; background:linear-gradient(#b77436,#7d461f); font-size:clamp(10px,1.05cqw,13px); }
#app.game-stage .palace-build-next small { color:#974f30; font-size:clamp(9px,.92cqw,11px); text-align:center; }
#app.game-stage .palace-build-next.is-complete { grid-template-rows:auto auto minmax(0,1fr) auto; border-color:rgba(71,101,83,.58); background:linear-gradient(135deg,rgba(237,244,222,.9),rgba(180,203,174,.5)); }
#app.game-stage .palace-build-plan { min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:clamp(3px,.58cqh,5px); padding:clamp(4px,.8cqh,7px) clamp(6px,1cqw,9px); border:1px solid rgba(110,83,48,.35); border-radius:5px; background:rgba(250,246,224,.62); }
#app.game-stage .palace-build-plan > header { display:flex; justify-content:space-between; align-items:center; color:#543b2a; font-family:"Royal Kai","STKaiti",serif; font-size:clamp(14px,1.5cqw,18px); letter-spacing:.1em; }
#app.game-stage .palace-build-plan > header b { color:#875b31; font-family:inherit; font-size:clamp(10px,1.02cqw,13px); }
#app.game-stage .palace-stage-list { min-height:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(4px,.82cqw,8px); }
#app.game-stage .palace-stage-card { min-height:0; display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; gap:clamp(1px,.28cqh,3px); padding:clamp(4px,.67cqh,6px) clamp(5px,.88cqw,8px); color:#574130; border:1px solid rgba(104,88,60,.33); border-radius:4px; background:rgba(255,253,240,.82); }
#app.game-stage .palace-stage-card.is-next { border-color:rgba(152,91,35,.72); background:rgba(249,232,181,.74); }
#app.game-stage .palace-stage-card > span { color:#8b6640; font-size:clamp(8px,.88cqw,11px); }
#app.game-stage .palace-stage-card h3 { margin:0; color:#563927; font-family:"Royal Kai","STKaiti",serif; font-size:clamp(11px,1.27cqw,16px); letter-spacing:.06em; }
#app.game-stage .palace-stage-card p { margin:0; color:#72543d; overflow:hidden; font-size:clamp(8px,.87cqw,11px); line-height:1.28; }
#app.game-stage .palace-stage-card div { display:flex; flex-wrap:wrap; gap:clamp(1px,.36cqw,4px); color:#7e5a38; font-size:clamp(8px,.78cqw,10px); }
#app.game-stage .palace-build-plan .ledger-pager { margin:0; min-height:clamp(25px,2.9cqh,30px); }
#app.game-stage .palace-build-plan .ledger-page-btn { min-width:clamp(48px,6.4cqw,66px); min-height:clamp(23px,2.64cqh,28px); padding:1px 4px; font-size:clamp(9px,.9cqw,11px); }
#app.game-stage .palace-build-complete { grid-column:1/-1; display:grid; place-items:center; color:#587260; border:1px dashed rgba(70,105,79,.45); border-radius:4px; background:rgba(232,244,226,.58); font-family:"Royal Kai","STKaiti",serif; }

/* 2026-07-13：册命档案 / 吏部知府补任。固定册页，不以说明段或滚动承载操作。 */
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen, .cfg-edit-ledger-screen) .home-panel-body {
  min-height:0 !important;
  overflow:hidden !important;
  padding:clamp(9px,1.45cqh,14px) clamp(12px,1.9cqw,24px) !important;
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book {
  height:100%;
  min-height:0;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  gap:clamp(5px,.85cqh,8px);
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-domain-tabs {
  min-height:clamp(32px,4.35cqh,42px);
  margin:0;
  padding:0 0 clamp(4px,.55cqh,6px);
  border-bottom:1px solid rgba(126,90,45,.28);
  background:transparent;
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-domain-tabs .cfg-tab {
  min-width:clamp(84px,9.5cqw,120px);
  min-height:clamp(28px,3.7cqh,36px);
  padding:2px clamp(10px,1.25cqw,16px);
  font-family:"Royal Kai","STKaiti",serif;
  font-size:clamp(12px,1.25cqw,15px);
  letter-spacing:.1em;
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book__body {
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) clamp(236px,23cqw,292px);
  gap:clamp(9px,1.25cqw,16px);
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book__list {
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:clamp(4px,.7cqh,7px);
  padding:clamp(5px,.82cqh,8px);
  border:1px solid rgba(123,92,49,.34);
  border-radius:5px;
  background:rgba(255,252,234,.48);
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book__heading {
  min-height:clamp(27px,3.65cqh,34px);
  display:flex;
  align-items:center;
  gap:clamp(6px,.8cqw,10px);
  padding:0 clamp(7px,1cqw,11px);
  color:#523724;
  border-bottom:1px solid rgba(128,91,45,.36);
  background:linear-gradient(90deg,rgba(205,178,119,.42),rgba(255,251,232,.08));
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book__heading > span {
  font-family:"Royal Kai","STKaiti",serif;
  font-size:clamp(15px,1.6cqw,20px);
  font-weight:700;
  letter-spacing:.12em;
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book__heading > b {
  margin-left:auto;
  color:#8b5b30;
  font-size:clamp(10px,1.02cqw,13px);
  letter-spacing:.08em;
  white-space:nowrap;
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-branch-tabs {
  display:flex;
  gap:clamp(3px,.46cqw,6px);
  margin-left:clamp(6px,.9cqw,10px);
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-branch-tabs .cfg-tab {
  min-width:clamp(48px,5.2cqw,65px);
  min-height:clamp(23px,3.05cqh,29px);
  padding:1px 5px;
  font-size:clamp(10px,1cqw,12px);
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book__table {
  min-height:0;
  margin:0 !important;
  padding:clamp(4px,.68cqh,7px) !important;
  gap:clamp(3px,.48cqh,5px) !important;
  justify-content:flex-start;
  overflow:hidden !important;
  background:rgba(255,253,240,.54) !important;
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book__table .cfg-row {
  grid-template-columns:minmax(54px,.72fr) minmax(92px,1.12fr) minmax(64px,.84fr) minmax(76px,.95fr) minmax(54px,.66fr) minmax(96px,1.03fr) !important;
  min-height:clamp(34px,4.5cqh,44px);
  gap:clamp(3px,.52cqw,7px);
  padding:clamp(3px,.48cqh,5px) clamp(5px,.78cqw,9px);
  font-size:clamp(10px,1.04cqw,13px);
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book__table .cfg-head {
  min-height:clamp(26px,3.4cqh,32px);
  font-size:clamp(9px,.93cqw,11px);
  letter-spacing:.05em;
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book__table .cfg-row > span {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book__table .cfg-row > span:last-child {
  display:flex;
  justify-content:center;
  gap:clamp(2px,.35cqw,4px);
  overflow:visible;
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book__table .palace-btn {
  min-width:clamp(34px,3.6cqw,46px);
  min-height:clamp(23px,2.92cqh,28px);
  padding:1px 4px;
  font-size:clamp(9px,.94cqw,11px);
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book__list .ledger-pager {
  min-height:clamp(27px,3.45cqh,33px);
  margin:0;
}
#app.game-stage :is(.rank-ledger-screen, .peerage-ledger-screen, .gaoming-ledger-screen) .cfg-book__list .ledger-page-btn {
  min-width:clamp(54px,6.8cqw,74px);
  min-height:clamp(24px,3.05cqh,29px);
  padding:1px 5px;
  font-size:clamp(9px,.95cqw,11px);
}
#app.game-stage .cfg-new-entry {
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:clamp(5px,.7cqh,7px);
  padding:clamp(8px,1.15cqh,11px) clamp(9px,1.2cqw,14px);
  color:#503625;
  border:1px solid rgba(117,88,46,.5);
  border-radius:5px;
  background:linear-gradient(145deg,rgba(247,235,199,.72),rgba(251,248,227,.72));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.38);
}
#app.game-stage .cfg-new-entry > header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-bottom:clamp(4px,.55cqh,6px);
  border-bottom:1px solid rgba(127,91,46,.32);
  font-family:"Royal Kai","STKaiti",serif;
}
#app.game-stage .cfg-new-entry > header span { font-size:clamp(15px,1.48cqw,18px); font-weight:700; letter-spacing:.12em; }
#app.game-stage .cfg-new-entry > header b { color:#8a562d; font-size:clamp(10px,.98cqw,12px); letter-spacing:.12em; }
#app.game-stage .cfg-new-fields { min-height:0; display:grid; align-content:start; gap:clamp(5px,.7cqh,7px); }
#app.game-stage .cfg-new-field { min-width:0; display:grid; grid-template-columns:clamp(42px,4.45cqw,57px) minmax(0,1fr); align-items:center; gap:clamp(5px,.72cqw,8px); color:#705137; font-size:clamp(10px,1.02cqw,12px); }
#app.game-stage .cfg-new-field span { white-space:nowrap; }
#app.game-stage .cfg-new-field input,
#app.game-stage .cfg-new-field select { min-width:0; width:100%; height:clamp(25px,3.12cqh,31px); box-sizing:border-box; padding:1px 6px; color:#493423; border:1px solid rgba(104,80,47,.38); border-radius:3px; background:rgba(255,253,240,.93); font:inherit; font-size:clamp(10px,.98cqw,12px); }
#app.game-stage .cfg-new-entry .setup-mini { width:100%; min-height:clamp(28px,3.55cqh,34px); padding:2px 6px; color:#fff1ca; border-color:#765127; background:linear-gradient(180deg,#8e6941,#624324); font-family:"Royal Kai","STKaiti",serif; font-size:clamp(11px,1.08cqw,13px); letter-spacing:.1em; }

/* 册命修订 */
#app.game-stage .cfg-edit-ledger-screen .home-panel-body { display:grid; place-items:center; }
#app.game-stage .cfg-edit-card { width:min(650px,82cqw); min-height:min(380px,58cqh); display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:clamp(11px,1.6cqh,15px); padding:clamp(18px,2.8cqh,26px) clamp(20px,3cqw,36px); color:#4e3525; border:1px solid rgba(121,85,41,.58); border-radius:6px; background:linear-gradient(145deg,rgba(255,252,233,.96),rgba(232,218,177,.92)); box-shadow:inset 0 0 0 2px rgba(255,255,247,.5),0 14px 26px rgba(49,31,15,.16); }
#app.game-stage .cfg-edit-card > header { display:flex; align-items:center; justify-content:space-between; padding-bottom:clamp(8px,1.15cqh,11px); border-bottom:1px solid rgba(120,84,42,.42); font-family:"Royal Kai","STKaiti",serif; }
#app.game-stage .cfg-edit-card > header span { font-size:clamp(18px,2cqw,24px); font-weight:700; letter-spacing:.1em; }
#app.game-stage .cfg-edit-card > header b { color:#8a562d; font-size:clamp(11px,1.1cqw,14px); letter-spacing:.14em; }
#app.game-stage .cfg-edit-fields { display:grid; align-content:center; gap:clamp(9px,1.25cqh,12px); }
#app.game-stage .cfg-edit-field { display:grid; grid-template-columns:minmax(128px,.82fr) minmax(0,1.18fr); align-items:center; gap:clamp(12px,1.8cqw,20px); padding:clamp(5px,.72cqh,7px) 0; border-bottom:1px solid rgba(123,92,52,.18); color:#71533a; font-size:clamp(12px,1.22cqw,15px); }
#app.game-stage .cfg-edit-field input { min-width:0; width:100%; height:clamp(32px,4cqh,39px); box-sizing:border-box; padding:3px 9px; color:#443122; border:1px solid rgba(103,77,43,.48); border-radius:3px; background:rgba(255,253,242,.92); font:inherit; font-size:clamp(13px,1.32cqw,16px); text-align:center; }
#app.game-stage .cfg-edit-actions { display:flex; justify-content:center; }
#app.game-stage .cfg-edit-actions .palace-col-btn { min-width:clamp(160px,17cqw,210px); min-height:clamp(36px,4.7cqh,46px); }

/* 吏部 · 知府补任 */
#app.game-stage .prefect-batch-screen .home-panel-body { width:min(88cqw,1160px); padding:clamp(10px,1.55cqh,15px) clamp(13px,1.9cqw,23px); }
#app.game-stage .prefrec-court { flex:1 1 auto; min-height:0; display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; gap:clamp(6px,.88cqh,9px); }
#app.game-stage .prefect-batch-screen .home-panel-id { min-height:clamp(34px,4.35cqh,42px); }
#app.game-stage .prefrec-summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:clamp(4px,.68cqw,8px); }
#app.game-stage .prefrec-summary span { min-height:clamp(34px,4.45cqh,43px); display:flex; align-items:center; justify-content:center; gap:clamp(5px,.62cqw,8px); color:#715037; border:1px solid rgba(113,139,112,.38); border-radius:3px; background:rgba(235,242,224,.62); font-size:clamp(10px,1.02cqw,12px); letter-spacing:.05em; }
#app.game-stage .prefrec-summary b { color:#7c4927; font-family:"Royal Kai","STKaiti",serif; font-size:clamp(17px,1.7cqw,21px); }
#app.game-stage .prefrec-workspace { min-height:0; display:grid; grid-template-columns:minmax(210px,.72fr) minmax(0,1.82fr); gap:clamp(9px,1.2cqw,15px); }
#app.game-stage .prefrec-rail { min-height:0; display:grid; grid-auto-rows:minmax(0,1fr); align-content:start; gap:clamp(4px,.6cqh,6px); padding:clamp(5px,.72cqh,7px); border:1px solid rgba(111,82,42,.39); border-radius:4px; background:linear-gradient(180deg,rgba(232,218,178,.72),rgba(249,245,223,.72)); }
#app.game-stage .prefrec-rail > header { min-height:clamp(25px,3.15cqh,30px); display:flex; align-items:center; justify-content:space-between; padding:0 clamp(6px,.82cqw,9px); color:#563a28; border-bottom:1px solid rgba(112,78,38,.32); font-family:"Royal Kai","STKaiti",serif; }
#app.game-stage .prefrec-rail > header span { font-size:clamp(13px,1.25cqw,16px); font-weight:700; letter-spacing:.12em; }
#app.game-stage .prefrec-rail > header b { color:#8c5a30; font-size:clamp(9px,.94cqw,11px); }
#app.game-stage .prefrec-candidate { min-width:0; min-height:clamp(42px,5.35cqh,52px); display:grid; grid-template-columns:clamp(22px,2.3cqw,29px) minmax(0,.82fr) minmax(0,1fr) auto; align-items:center; gap:clamp(4px,.48cqw,6px); padding:clamp(4px,.62cqh,6px) clamp(5px,.7cqw,8px); color:#55402d; border:1px solid rgba(111,92,62,.29); border-radius:3px; background:rgba(255,253,241,.78); text-align:left; font:inherit; cursor:pointer; }
#app.game-stage .prefrec-candidate:hover { border-color:rgba(124,87,40,.6); background:rgba(249,239,207,.86); }
#app.game-stage .prefrec-candidate.is-selected { color:#4a3020; border-color:rgba(146,96,42,.72); background:linear-gradient(90deg,rgba(239,211,149,.8),rgba(255,250,226,.9)); box-shadow:inset 3px 0 0 #8c562d; }
#app.game-stage .prefrec-candidate.is-approved { box-shadow:inset 3px 0 0 #4d8067; }
#app.game-stage .prefrec-candidate.is-rejected { box-shadow:inset 3px 0 0 #9b4937; }
#app.game-stage .prefrec-candidate__no { color:#997047; font-size:clamp(10px,.96cqw,12px); }
#app.game-stage .prefrec-candidate__place { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family:"Royal Kai","STKaiti",serif; font-size:clamp(12px,1.18cqw,15px); font-weight:700; }
#app.game-stage .prefrec-candidate b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:inherit; font-size:clamp(10px,1.05cqw,13px); }
#app.game-stage .prefrec-candidate em { color:#86522e; font-size:clamp(9px,.9cqw,11px); font-style:normal; white-space:nowrap; }
#app.game-stage .prefrec-candidate.is-approved em { color:#346a54; }
#app.game-stage .prefrec-candidate.is-rejected em { color:#963c2f; }
#app.game-stage .prefrec-dossier { min-height:0; display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; gap:clamp(7px,.9cqh,9px); padding:clamp(9px,1.4cqh,13px) clamp(11px,1.6cqw,17px); color:#4d3424; border:1px solid rgba(110,82,43,.47); border-radius:4px; background:linear-gradient(135deg,rgba(255,253,239,.94),rgba(237,228,200,.9)); box-shadow:inset 0 0 0 1px rgba(255,255,247,.62); }
#app.game-stage .prefrec-dossier.is-approved { border-color:rgba(65,113,89,.63); }
#app.game-stage .prefrec-dossier.is-rejected { border-color:rgba(139,57,43,.58); }
#app.game-stage .prefrec-dossier__head { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:clamp(2px,.42cqw,5px) clamp(8px,1.2cqw,14px); padding-bottom:clamp(6px,.82cqh,8px); border-bottom:1px solid rgba(117,84,43,.3); }
#app.game-stage .prefrec-dossier__head span { color:#8c5a30; font-size:clamp(10px,1.05cqw,13px); letter-spacing:.08em; }
#app.game-stage .prefrec-dossier__head b { color:#4b3020; font-family:"Royal Kai","STKaiti",serif; font-size:clamp(22px,2.4cqw,29px); font-weight:700; letter-spacing:.18em; }
#app.game-stage .prefrec-dossier__head small { color:#73523a; font-size:clamp(10px,1cqw,12px); white-space:nowrap; }
#app.game-stage .prefrec-dossier__origin { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(5px,.7cqw,8px); margin:0; }
#app.game-stage .prefrec-dossier__origin div { min-width:0; padding:clamp(4px,.62cqh,6px) clamp(5px,.72cqw,8px); border-left:2px solid rgba(112,147,120,.55); background:rgba(228,239,219,.45); }
#app.game-stage .prefrec-dossier__origin dt { color:#806042; font-size:clamp(9px,.88cqw,11px); }
#app.game-stage .prefrec-dossier__origin dd { margin:1px 0 0; overflow:hidden; color:#4d3626; font-size:clamp(11px,1.12cqw,14px); font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
#app.game-stage .prefrec-attr-groups { min-height:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(7px,.95cqw,11px); }
#app.game-stage .prefrec-attr-groups section { min-height:0; padding:clamp(6px,.9cqh,9px); border:1px solid rgba(111,88,56,.27); border-radius:3px; background:rgba(255,252,237,.6); }
#app.game-stage .prefrec-attr-groups header { margin-bottom:clamp(5px,.65cqh,7px); padding-bottom:clamp(3px,.43cqh,5px); color:#765035; border-bottom:1px solid rgba(119,86,44,.22); font-family:"Royal Kai","STKaiti",serif; font-size:clamp(12px,1.18cqw,15px); font-weight:700; letter-spacing:.1em; }
#app.game-stage .prefrec-attr-groups section > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(4px,.55cqh,6px) clamp(7px,.86cqw,10px); }
#app.game-stage .prefrec-attr-groups span { min-width:0; display:flex; align-items:baseline; justify-content:space-between; gap:5px; color:#73553e; font-size:clamp(10px,.98cqw,12px); }
#app.game-stage .prefrec-attr-groups i { font-style:normal; white-space:nowrap; }
#app.game-stage .prefrec-attr-groups b { color:#4f3423; font-family:"Royal Kai","STKaiti",serif; font-size:clamp(13px,1.3cqw,16px); }
#app.game-stage .prefrec-verdict { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(8px,1.1cqw,13px); }
#app.game-stage .prefrec-verdict button { min-height:clamp(31px,4.15cqh,40px); border:0; background:url("./assets/ui/floral/court-action-normal.png") center/100% 100% no-repeat; color:#fff2ca; font-family:"Royal Kai","STKaiti",serif; font-size:clamp(13px,1.3cqw,16px); font-weight:700; letter-spacing:.16em; text-shadow:0 1px 2px rgba(27,16,8,.9); }
#app.game-stage .prefrec-verdict button:hover { background-image:url("./assets/ui/floral/court-action-active.png"); }
#app.game-stage .prefrec-verdict button:last-child { filter:hue-rotate(319deg) saturate(.72); }
#app.game-stage .prefrec-verdict button.is-active { transform:translateY(1px); filter:brightness(1.12) saturate(1.08); }
#app.game-stage .prefrec-verdict button:last-child.is-active { filter:hue-rotate(319deg) saturate(.8) brightness(1.12); }
#app.game-stage .prefrec-footer { min-height:clamp(32px,4.2cqh,41px); display:grid; grid-template-columns:minmax(0,.9fr) minmax(190px,1.1fr); align-items:center; gap:clamp(10px,1.25cqw,15px); }
#app.game-stage .prefrec-footer .ledger-pager { min-height:0; margin:0; }
#app.game-stage .prefrec-footer .ledger-page-btn { min-width:clamp(52px,6.5cqw,72px); min-height:clamp(24px,3.05cqh,30px); padding:1px 5px; font-size:clamp(9px,.94cqw,11px); }
#app.game-stage .prefrec-footer > .palace-btn { width:100%; min-height:clamp(30px,3.95cqh,38px); }
#app.game-stage .prefrec-empty { display:grid; place-items:center; min-height:0; color:#765336; border:1px dashed rgba(120,88,46,.42); border-radius:3px; font-family:"Royal Kai","STKaiti",serif; font-size:clamp(13px,1.32cqw,16px); }

/* 2026-07-15：吏部 / 户部 / 属性修习 / 内廷名册 / 万寿节批量重设。
   统一固定 16:9 舞台；不以解释段、绝对叠压或滚动承载主要操作。 */

/* 吏部 · 朝臣名录与任命重臣：标题、页签和表头进入同一份官簿，彻底隔离顶栏。 */
#app.game-stage .court-screen--official-ledger .topnav-banners,
#app.game-stage .court-screen--official-appoint .topnav-banners,
#app.game-stage .court-screen--fiscal .topnav-banners {
  display: none;
}

#app.game-stage .official-ledger,
#app.game-stage .official-appoint-ledger,
#app.game-stage .fiscal-ledger {
  position: absolute;
  z-index: 6;
  left: 50%;
  width: min(1160px, 90cqw);
  box-sizing: border-box;
  transform: translateX(-50%);
  color: #3d2c1d;
  background:
    linear-gradient(180deg, rgba(255, 252, 238, 0.97), rgba(235, 225, 196, 0.96)),
    linear-gradient(90deg, rgba(87, 120, 101, 0.08), rgba(151, 87, 60, 0.07));
  border: 1px solid rgba(163, 119, 55, 0.64);
  box-shadow: 0 20px 40px rgba(35, 21, 11, 0.34), inset 0 0 0 1px rgba(255, 255, 245, 0.64);
}

#app.game-stage .official-ledger {
  top: clamp(82px, 11.5cqh, 104px);
  bottom: clamp(48px, 7.2cqh, 68px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(7px, 1cqh, 11px);
  padding: clamp(14px, 2cqh, 20px) clamp(17px, 2.25cqw, 27px) clamp(12px, 1.65cqh, 16px);
}

#app.game-stage .official-ledger__head,
#app.game-stage .official-appoint-ledger > header,
#app.game-stage .fiscal-ledger__head {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  min-height: clamp(42px, 5.9cqh, 54px);
  padding: 0 clamp(8px, 1.1cqw, 14px) clamp(7px, .9cqh, 9px);
  border-bottom: 1px solid rgba(129, 91, 43, 0.38);
}

#app.game-stage .official-ledger__head > span,
#app.game-stage .official-appoint-ledger > header > span,
#app.game-stage .fiscal-ledger__head > span {
  color: #84603a;
  font-size: clamp(12px, 1.25cqw, 16px);
  font-weight: 700;
  letter-spacing: .14em;
}

#app.game-stage .official-ledger__head h1,
#app.game-stage .official-appoint-ledger > header h1,
#app.game-stage .fiscal-ledger__head h1 {
  margin: 0;
  color: #4a2d1b;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(25px, 3.2cqh, 31px);
  font-weight: 700;
  letter-spacing: .18em;
  text-align: center;
}

#app.game-stage .official-ledger__tabs {
  justify-self: end;
  display: flex;
  gap: clamp(5px, .65cqw, 8px);
}

#app.game-stage .official-ledger__tab {
  min-width: clamp(58px, 5.8cqw, 78px);
  min-height: clamp(27px, 3.7cqh, 34px);
  border: 1px solid rgba(82, 116, 97, 0.5);
  border-radius: 2px;
  background: rgba(226, 235, 217, 0.82);
  color: #3d5c4d;
  cursor: pointer;
  font-family: "Royal Kai", "STKaiti", serif;
  font-size: clamp(12px, 1.25cqw, 15px);
  font-weight: 700;
  letter-spacing: .12em;
}

#app.game-stage .official-ledger__tab.is-on {
  border-color: rgba(163, 116, 49, 0.74);
  background: linear-gradient(180deg, #f4dfad, #dfbd7e);
  color: #523019;
  box-shadow: inset 0 0 0 1px rgba(255, 246, 213, 0.52);
}

#app.game-stage .official-ledger__table {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: clamp(4px, .65cqh, 7px);
  overflow: hidden;
}

#app.game-stage .official-ledger__row {
  display: grid;
  grid-template-columns: 1.45fr 1.05fr .55fr .82fr repeat(4, .62fr) minmax(64px, .76fr);
  align-items: center;
  gap: clamp(4px, .6cqw, 7px);
  min-height: clamp(32px, 4.45cqh, 42px);
  padding: clamp(3px, .6cqh, 6px) clamp(8px, 1.05cqw, 12px);
  border: 1px solid rgba(150, 113, 62, 0.34);
  background: rgba(255, 251, 235, 0.7);
  color: #463120;
  font-size: clamp(11px, 1.28cqw, 15px);
  text-align: center;
}

#app.game-stage .official-ledger__row > span:first-child { text-align: left; }
#app.game-stage .official-ledger__row .rn { color: #8b3727; font-family: "Royal Kai", "STKaiti", serif; font-size: 1.08em; font-weight: 700; letter-spacing: .08em; }

#app.game-stage .official-ledger__row--head {
  min-height: clamp(29px, 3.9cqh, 36px);
  border-color: rgba(71, 108, 91, 0.58);
  background: linear-gradient(180deg, #668a76, #466c5a);
  color: #fff3d5;
  font-size: clamp(10px, 1.08cqw, 13px);
  font-weight: 700;
  letter-spacing: .06em;
}

#app.game-stage .official-ledger .roster-view,
#app.game-stage .official-appoint-ledger .roster-view {
  min-height: clamp(24px, 3.3cqh, 31px);
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/floral/court-action-normal.png") center / 100% 100% no-repeat;
  color: #fff1c8;
  cursor: pointer;
  font-family: "Royal Kai", "STKaiti", serif;
  font-size: clamp(10px, 1.12cqw, 13px);
  font-weight: 700;
  letter-spacing: .11em;
  text-shadow: 0 1px 1px rgba(31, 20, 10, .76);
}

#app.game-stage .official-ledger .roster-view:hover,
#app.game-stage .official-appoint-ledger .roster-view:hover { background-image: url("./assets/ui/floral/court-action-active.png"); }

#app.game-stage .official-ledger__empty {
  min-height: 0;
  display: grid;
  place-items: center;
  color: #765137;
  border: 1px dashed rgba(138, 99, 49, .42);
  font-family: "Royal Kai", "STKaiti", serif;
}

#app.game-stage .official-ledger__footer,
#app.game-stage .official-appoint-ledger > footer,
#app.game-stage .fiscal-ledger__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(9px, 1.15cqw, 14px);
  min-height: clamp(30px, 4.1cqh, 38px);
  color: #6d5036;
  font-size: clamp(11px, 1.15cqw, 14px);
}

#app.game-stage .official-ledger__footer .court-action,
#app.game-stage .official-appoint-ledger > footer .court-action,
#app.game-stage .fiscal-ledger__footer .court-action {
  position: static;
  min-width: clamp(76px, 8.7cqw, 106px);
  min-height: clamp(25px, 3.35cqh, 32px);
  padding: 2px 10px;
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/floral/court-action-normal.png") center / 100% 100% no-repeat;
  color: #fff1cc;
  font-size: clamp(10px, 1.08cqw, 13px);
  font-weight: 700;
  letter-spacing: .1em;
  text-shadow: 0 1px 1px rgba(31, 20, 10, .76);
  box-shadow: none;
}

#app.game-stage .official-ledger__footer .court-action:hover:not(:disabled),
#app.game-stage .official-appoint-ledger > footer .court-action:hover,
#app.game-stage .fiscal-ledger__footer .court-action:hover { background-image: url("./assets/ui/floral/court-action-active.png"); }

#app.game-stage .official-ledger__footer .official-ledger__back { margin-left: clamp(7px, .9cqw, 11px); }

#app.game-stage .official-appoint-ledger {
  top: clamp(86px, 12cqh, 108px);
  bottom: clamp(52px, 7.5cqh, 70px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(9px, 1.2cqh, 13px);
  padding: clamp(15px, 2.1cqh, 22px) clamp(18px, 2.45cqw, 30px) clamp(12px, 1.65cqh, 17px);
}

#app.game-stage .official-appoint-ledger > header > b,
#app.game-stage .fiscal-ledger__head > b {
  justify-self: end;
  color: #775132;
  font-size: clamp(11px, 1.2cqw, 15px);
  font-weight: 700;
  white-space: nowrap;
}

#app.game-stage .official-appoint-slots {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: clamp(9px, 1.2cqw, 15px);
  overflow: hidden;
}

#app.game-stage .official-appoint-slot {
  min-height: 0;
  display: grid;
  align-content: start;
  border: 1px solid rgba(139, 104, 59, .35);
  background: rgba(255, 252, 237, .7);
}

#app.game-stage .official-appoint-slot > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: clamp(31px, 4.1cqh, 38px);
  align-items: center;
  padding: 0 clamp(8px, 1cqw, 12px);
  background: linear-gradient(180deg, rgba(224, 234, 218, .94), rgba(191, 209, 192, .9));
  color: #3d5e4f;
  font-family: "Royal Kai", "STKaiti", serif;
  font-size: clamp(12px, 1.25cqw, 15px);
  font-weight: 700;
}

#app.game-stage .official-appoint-slot > header b { color: #8a4e2d; font-size: .85em; white-space: nowrap; }
#app.game-stage .official-appoint-slot > div { display: grid; align-content: start; gap: 5px; padding: clamp(6px, .8cqh, 9px); }

#app.game-stage .official-appoint-candidate {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 7px;
  min-height: clamp(51px, 7cqh, 64px);
  padding: clamp(5px, .75cqh, 8px) clamp(7px, .9cqw, 10px);
  border-left: 2px solid rgba(139, 82, 48, .46);
  background: rgba(246, 238, 215, .62);
}

#app.game-stage .official-appoint-candidate strong { color: #693323; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(14px, 1.45cqw, 18px); letter-spacing: .08em; }
#app.game-stage .official-appoint-candidate span,
#app.game-stage .official-appoint-candidate small { color: #6d5239; font-size: clamp(9px, .95cqw, 12px); }
#app.game-stage .official-appoint-candidate .roster-view { grid-column: 2; grid-row: 1 / span 3; min-width: clamp(74px, 7.8cqw, 92px); }

#app.game-stage .official-appoint-ledger--empty { grid-template-rows: auto minmax(0, 1fr) auto; }
#app.game-stage .official-appoint-ledger--empty > div { display: grid; place-items: center; color: #70543b; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(16px, 2.2cqh, 21px); }

/* 户部：税制与兴业均是可核对的财政决议簿，状态与效果不再堆成一行长签。 */
#app.game-stage .fiscal-ledger {
  top: clamp(86px, 12cqh, 108px);
  bottom: clamp(52px, 7.5cqh, 70px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: clamp(9px, 1.25cqh, 14px);
  padding: clamp(15px, 2.1cqh, 22px) clamp(18px, 2.45cqw, 30px) clamp(12px, 1.65cqh, 17px);
}

#app.game-stage .fiscal-current {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: clamp(8px, 1cqw, 13px);
  min-height: clamp(39px, 5.2cqh, 48px);
  padding: 0 clamp(12px, 1.5cqw, 18px);
  border-left: 3px solid rgba(73, 112, 92, .72);
  background: linear-gradient(90deg, rgba(214, 229, 214, .77), rgba(255, 249, 228, .5));
}

#app.game-stage .fiscal-current span { color: #557261; font-size: clamp(11px, 1.15cqw, 14px); font-weight: 700; letter-spacing: .1em; }
#app.game-stage .fiscal-current strong { color: #4a2d1c; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(19px, 2.55cqh, 25px); letter-spacing: .12em; }
#app.game-stage .fiscal-current b { color: #873f28; font-size: clamp(14px, 1.55cqw, 18px); }
#app.game-stage .fiscal-current small { color: #72543b; font-size: clamp(10px, 1.1cqw, 13px); white-space: nowrap; }

#app.game-stage .fiscal-option-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(clamp(62px, 9.1cqh, 84px), 1fr);
  align-content: center;
  gap: clamp(8px, 1.1cqw, 14px);
}

#app.game-stage .fiscal-option {
  display: grid;
  align-content: center;
  gap: clamp(2px, .35cqh, 4px);
  min-height: 0;
  padding: clamp(7px, 1cqh, 11px) clamp(9px, 1.2cqw, 14px);
  border: 1px solid rgba(124, 90, 46, .42);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(255, 252, 239, .88), rgba(231, 238, 222, .77));
  color: #4d3725;
  cursor: pointer;
  text-align: left;
  transition: transform 140ms ease, filter 140ms ease, border-color 140ms ease;
}

#app.game-stage .fiscal-option:hover:not(:disabled) { border-color: rgba(165, 111, 46, .78); filter: brightness(1.035); transform: translateY(-1px); }
#app.game-stage .fiscal-option.is-current { border: 2px solid rgba(151, 102, 40, .78); background: linear-gradient(180deg, #f5dfac, #e5c78d); box-shadow: 0 6px 12px rgba(78, 49, 22, .14); }
#app.game-stage .fiscal-option span { color: #7a522f; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(14px, 1.5cqw, 18px); font-weight: 700; letter-spacing: .09em; }
#app.game-stage .fiscal-option strong { color: #3f594b; font-size: clamp(16px, 1.85cqw, 22px); }
#app.game-stage .fiscal-option small { color: #72563f; font-size: clamp(10px, 1.05cqw, 13px); }

#app.game-stage .fiscal-option-grid--work { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(clamp(76px, 11.3cqh, 106px), 1fr); }
#app.game-stage .fiscal-option--work strong { color: #86462b; }

/* 养心殿属性分配：御前修习案。六项数值有稳定两列，不保留空白大纸面和教学段。 */
#app.game-stage .home-panel.attr-cultivation-screen::before {
  background: linear-gradient(90deg, rgba(13, 14, 11, .5), rgba(17, 22, 16, .14) 24%, rgba(17, 22, 16, .14) 76%, rgba(13, 14, 11, .52)), linear-gradient(0deg, rgba(11, 13, 10, .38), transparent 55%);
}

#app.game-stage .home-panel.attr-cultivation-screen .topnav-banners { display: none; }

#app.game-stage .home-panel.attr-cultivation-screen .court-head {
  top: clamp(28px, 4.7cqh, 42px);
  background: linear-gradient(180deg, rgba(239, 237, 218, .96), rgba(178, 199, 181, .95));
  border-color: rgba(149, 112, 61, .72);
}

#app.game-stage .home-panel.attr-cultivation-screen .home-panel-body {
  top: clamp(98px, 14cqh, 124px);
  bottom: clamp(72px, 10cqh, 96px);
  width: min(900px, 75cqw);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(11px, 1.6cqh, 16px);
  padding: clamp(18px, 2.5cqh, 26px) clamp(22px, 2.8cqw, 34px);
  overflow: hidden;
  border: 1px solid rgba(176, 139, 81, .65);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(248, 244, 225, .96), rgba(224, 230, 214, .94));
  box-shadow: 0 22px 46px rgba(8, 11, 8, .42), inset 0 0 0 1px rgba(255, 255, 245, .58);
}

#app.game-stage .attr-cultivation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: clamp(35px, 4.8cqh, 44px);
  padding: 0 clamp(8px, 1.1cqw, 13px) clamp(7px, .9cqh, 9px);
  border-bottom: 1px solid rgba(107, 91, 56, .37);
}

#app.game-stage .attr-cultivation-head span { color: #4c6355; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(20px, 2.6cqh, 26px); font-weight: 700; letter-spacing: .17em; }
#app.game-stage .attr-cultivation-head b { color: #7c4e2d; font-size: clamp(12px, 1.25cqw, 15px); }

#app.game-stage .attr-cultivation-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4cqw, 17px) clamp(13px, 1.8cqw, 22px);
}

#app.game-stage .attr-cultivation-row {
  display: grid;
  grid-template-columns: minmax(3.4em, .7fr) 1fr minmax(142px, 1.35fr);
  align-items: center;
  gap: clamp(7px, .9cqw, 11px);
  min-height: 0;
  padding: clamp(8px, 1.1cqh, 12px) clamp(10px, 1.25cqw, 15px);
  border-left: 3px solid rgba(71, 112, 92, .62);
  background: linear-gradient(90deg, rgba(217, 230, 216, .74), rgba(255, 252, 239, .58));
}

#app.game-stage .attr-cultivation-row__name { color: #4f674f; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(17px, 2.2cqh, 22px); font-weight: 700; letter-spacing: .12em; }
#app.game-stage .attr-cultivation-row__value { color: #4a2d1d; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(23px, 3.2cqh, 31px); text-align: center; }
#app.game-stage .attr-cultivation-row__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(6px, .75cqw, 9px); }

#app.game-stage .attr-cultivation-row__actions .palace-btn {
  min-width: 0;
  min-height: clamp(31px, 4.2cqh, 40px);
  padding: 2px 7px;
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/floral/court-action-normal.png") center / 100% 100% no-repeat;
  color: #fff1c8;
  font-size: clamp(12px, 1.25cqw, 15px);
  font-weight: 700;
  letter-spacing: .08em;
  text-shadow: 0 1px 1px rgba(31, 20, 10, .78);
  box-shadow: none;
}

#app.game-stage .attr-cultivation-row__actions .palace-btn:hover { background-image: url("./assets/ui/floral/court-action-active.png"); }

/* 储秀宫及同骨架名单：拆掉双层半透明面板，回归一套不透纸册、分类脊与连续人物档。 */
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .topnav-banners { display: none; }

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .shared-ledger-body,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .bureau-body.shared-ledger-body.storexiu-ledger {
  position: absolute;
  z-index: 6;
  top: clamp(84px, 11.8cqh, 108px);
  right: 5.4%;
  bottom: clamp(62px, 8.8cqh, 82px);
  left: 5.4%;
  width: auto;
  max-width: none;
  max-height: none;
  min-height: 0;
  padding: 0;
  margin: 0;
}

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .shared-ledger-panel,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .storexiu-ledger__panel {
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(8px, 1.1cqh, 12px);
  box-sizing: border-box;
  overflow: hidden;
  padding: clamp(16px, 2.2cqh, 22px) clamp(20px, 2.65cqw, 31px) clamp(14px, 1.8cqh, 18px);
  border: 1px solid rgba(154, 112, 56, .66);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(252, 247, 229, .98), rgba(235, 225, 198, .97));
  box-shadow: 0 24px 44px rgba(42, 24, 14, .35), inset 0 0 0 1px rgba(255, 255, 246, .7);
}

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .shared-ledger-head {
  min-height: clamp(37px, 5.1cqh, 46px);
  margin: 0;
  padding: 0 clamp(8px, 1cqw, 12px) clamp(7px, .9cqh, 9px);
  border-bottom: 1px solid rgba(131, 92, 45, .41);
}

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .shared-ledger-head span { color: #4c2e1b; font-size: clamp(22px, 3cqh, 29px); }
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .shared-ledger-head small { color: #587462; font-size: clamp(11px, 1.2cqw, 14px); }

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(118px, 11.5cqw, 150px) minmax(0, 1fr);
  gap: clamp(15px, 2cqw, 24px);
}

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-cats {
  height: auto;
  display: grid;
  grid-auto-rows: minmax(clamp(54px, 7.5cqh, 66px), auto);
  align-content: start;
  gap: clamp(8px, 1.1cqh, 12px);
  margin: 0;
  padding: clamp(8px, 1.1cqh, 11px) clamp(6px, .8cqw, 9px);
  border-right: 1px solid rgba(128, 91, 46, .36);
  border-bottom: 0;
  background: linear-gradient(90deg, rgba(108, 139, 116, .16), rgba(255, 251, 234, .08));
}

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-cat {
  min-width: 0;
  min-height: 0;
  padding: 5px 8px;
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/visit/menu-sheet/menu-sheet-middle.svg") center / 100% 100% no-repeat;
  color: #4d3924;
  box-shadow: 0 3px 7px rgba(55, 36, 18, .11);
}

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-cat.on { background: linear-gradient(180deg, #f3ddad, #dfbd7c); box-shadow: inset 0 0 0 1px rgba(141, 89, 35, .62), 0 3px 7px rgba(55, 36, 18, .15); color: #592e17; }
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-cat b { font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(15px, 1.7cqw, 19px); letter-spacing: .1em; }
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-cat small { color: inherit; opacity: .72; font-size: clamp(10px, 1.05cqw, 12px); }

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .xiu-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: clamp(5px, .7cqh, 8px); }
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .bureau-sec-h { margin: 0; color: #724025; font-size: clamp(16px, 2.15cqh, 21px); text-align: left; }

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-panel {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: clamp(6px, .8cqh, 9px);
}

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-body { min-height: 0; grid-template-columns: clamp(156px, 15.5cqw, 196px) minmax(0, 1fr); gap: clamp(14px, 1.8cqw, 22px); }
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-list { padding: clamp(7px, .95cqh, 10px); background: linear-gradient(90deg, rgba(109, 137, 112, .15), rgba(255, 252, 237, .12)); }
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-entry { min-height: clamp(34px, 4.55cqh, 42px); padding: 4px clamp(11px, 1.25cqw, 15px); font-size: clamp(11px, 1.38cqw, 14px); }
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-entry.is-on { background: linear-gradient(180deg, #f5dfad, #e2c486); box-shadow: inset 0 0 0 1px rgba(142, 91, 37, .64), 0 3px 7px rgba(55, 36, 18, .15); }

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-main { grid-template-columns: minmax(0, 1fr) minmax(245px, .88fr); gap: clamp(14px, 1.8cqw, 22px); }
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-detail { padding: clamp(7px, .9cqh, 10px) clamp(4px, .5cqw, 6px); background: transparent; }
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-head { font-size: clamp(19px, 2.55cqh, 25px); }
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-d-attrs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(4px, .55cqh, 6px) clamp(9px, 1.15cqw, 13px); }
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-attr { font-size: clamp(11px, 1.25cqw, 14px); }

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-portrait { background: radial-gradient(ellipse at 50% 66%, rgba(245, 234, 203, .85), rgba(187, 207, 189, .55) 56%, rgba(87, 120, 102, .16) 82%); }
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-portrait img { width: 112%; height: 106%; max-width: none; }

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-actions,
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-pgnav { min-height: clamp(32px, 4.35cqh, 40px); }

#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-body:has(.roster-list .roster-empty) { grid-template-columns: clamp(76px, 7.3cqw, 96px) minmax(0, 1fr); }
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-detail-empty { min-height: 100%; background: linear-gradient(90deg, rgba(255, 252, 237, .72), rgba(225, 235, 222, .46), rgba(255, 252, 237, .72)); }

/* 储秀宫：不再借 bureau-body / shared-ledger-panel 两层壳。
   待选册本身就是唯一可见册页；空池收为短册，避免大块空白纸面伪装成内容。 */
#app.game-stage .storexiu-ledger-screen.bureau-screen { display: block; padding: 0; }

#app.game-stage .storexiu-ledger-screen .storexiu-register {
  position: absolute;
  z-index: 6;
  top: clamp(116px, 15.5cqh, 146px);
  right: clamp(92px, 8.6cqw, 142px);
  bottom: clamp(70px, 9.6cqh, 90px);
  left: clamp(92px, 8.6cqw, 142px);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(10px, 1.35cqh, 14px);
  padding: clamp(18px, 2.4cqh, 27px) clamp(22px, 2.85cqw, 34px) clamp(16px, 2.15cqh, 23px);
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(142, 99, 43, .78);
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(105, 136, 112, .18) 0 9px, transparent 9px),
    linear-gradient(180deg, rgba(255, 252, 237, .99), rgba(239, 228, 199, .99));
  box-shadow: 0 22px 46px rgba(39, 20, 11, .38), inset 0 0 0 1px rgba(255, 255, 249, .76);
}

#app.game-stage .storexiu-ledger-screen .storexiu-register::before {
  content: "";
  position: absolute;
  inset: clamp(10px, 1.35cqh, 13px) clamp(10px, 1.35cqw, 15px) clamp(10px, 1.35cqh, 13px) clamp(18px, 2.1cqw, 25px);
  pointer-events: none;
  border: 1px solid rgba(142, 99, 43, .35);
  background: linear-gradient(90deg, rgba(126, 159, 130, .09), transparent 24%, transparent 76%, rgba(163, 112, 58, .06));
}

#app.game-stage .storexiu-ledger-screen .storexiu-register > * { position: relative; z-index: 1; }
#app.game-stage .storexiu-ledger-screen .storexiu-register .shared-ledger-head { min-height: clamp(39px, 5.35cqh, 49px); margin: 0; padding: 0 clamp(12px, 1.45cqw, 17px) clamp(8px, 1.1cqh, 10px); border-bottom-color: rgba(127, 86, 39, .5); }
#app.game-stage .storexiu-ledger-screen .storexiu-register .shared-ledger-head span { color: #442816; font-size: clamp(25px, 3.45cqh, 33px); letter-spacing: .18em; }
#app.game-stage .storexiu-ledger-screen .storexiu-register .shared-ledger-head small { color: #4d725d; font-size: clamp(12px, 1.45cqw, 15px); }

#app.game-stage .storexiu-ledger-screen .storexiu-register .xiu-layout { min-height: 0; }
#app.game-stage .storexiu-ledger-screen .storexiu-register .xiu-cats { border-right-color: rgba(127, 86, 39, .43); background: linear-gradient(90deg, rgba(106, 138, 113, .2), rgba(255, 252, 236, .04)); }
#app.game-stage .storexiu-ledger-screen .storexiu-register .xiu-cat { min-height: clamp(58px, 7.9cqh, 70px); background: linear-gradient(180deg, #f6eed9, #dce5d6); box-shadow: inset 0 0 0 1px rgba(84, 120, 94, .32), 0 3px 7px rgba(67, 43, 21, .1); }
#app.game-stage .storexiu-ledger-screen .storexiu-register .xiu-cat.on { background: linear-gradient(180deg, #efd59b, #d8b36c); box-shadow: inset 0 0 0 1px rgba(135, 80, 31, .7), 0 3px 7px rgba(67, 43, 21, .12); }
#app.game-stage .storexiu-ledger-screen .storexiu-register .roster-list { background: rgba(245, 239, 218, .72); }
#app.game-stage .storexiu-ledger-screen .storexiu-register .roster-detail-empty { border: 0; background: radial-gradient(ellipse at 50% 45%, rgba(255, 253, 244, .92), rgba(229, 237, 221, .48) 58%, rgba(255, 252, 237, .06) 80%); }
#app.game-stage .storexiu-ledger-screen .storexiu-register .roster-empty-message {
  /* 2026-07-27 M3：原限宽 74% 实测被压到 96px、「暂无待选秀女」三字一行竖排——改按内容自适应单行 */
  width: max-content; max-width: 94%; white-space: nowrap;
  min-height: clamp(48px, 6.4cqh, 57px); font-size: clamp(17px, 2.25cqh, 21px); padding: 0 24px;
}

#app.game-stage .storexiu-ledger-screen .storexiu-register:has(.roster-empty) {
  top: clamp(190px, 25cqh, 238px);
  right: min(22%, 360px);
  bottom: auto;
  left: min(22%, 360px);
  height: min(420px, 47cqh);
}

#app.game-stage .storexiu-ledger-screen .storexiu-register:has(.roster-empty) .xiu-layout { grid-template-columns: clamp(115px, 11.5cqw, 145px) minmax(0, 1fr); }
#app.game-stage .storexiu-ledger-screen .storexiu-register:has(.roster-empty) .xiu-main { align-content: center; }
#app.game-stage .storexiu-ledger-screen .storexiu-register:has(.roster-empty) .roster-body { grid-template-columns: clamp(78px, 7.6cqw, 96px) minmax(0, 1fr); }
#app.game-stage .storexiu-ledger-screen .storexiu-register:has(.roster-empty) .roster-list { background: rgba(106, 138, 113, .12); }

/* 同一问题不只在储秀宫：所有「名单 + 档案 + 立绘」共享页都脱离 bureau-body。
   功能型六尚、事件账簿与剧情妃见礼页不属于此族，仍保留各自的容器。 */
#app.game-stage .shared-roster-ledger-screen .roster-register:not(.storexiu-register),
#app.game-stage .servant-ledger-screen .roster-register,
#app.game-stage .shenxing-ledger-screen .roster-register {
  position: absolute;
  z-index: 6;
  top: clamp(116px, 15.5cqh, 146px);
  right: clamp(92px, 8.6cqw, 142px);
  bottom: clamp(70px, 9.6cqh, 90px);
  left: clamp(92px, 8.6cqw, 142px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(7px, .95cqh, 10px);
  padding: clamp(18px, 2.4cqh, 27px) clamp(22px, 2.85cqw, 34px) clamp(16px, 2.15cqh, 23px);
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(142, 99, 43, .78);
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(105, 136, 112, .18) 0 9px, transparent 9px),
    linear-gradient(180deg, rgba(255, 252, 237, .99), rgba(239, 228, 199, .99));
  box-shadow: 0 22px 46px rgba(39, 20, 11, .38), inset 0 0 0 1px rgba(255, 255, 249, .76);
}

#app.game-stage .shared-roster-ledger-screen .roster-register:not(.storexiu-register)::before,
#app.game-stage .servant-ledger-screen .roster-register::before,
#app.game-stage .shenxing-ledger-screen .roster-register::before {
  content: "";
  position: absolute;
  inset: clamp(10px, 1.35cqh, 13px) clamp(10px, 1.35cqw, 15px) clamp(10px, 1.35cqh, 13px) clamp(18px, 2.1cqw, 25px);
  pointer-events: none;
  border: 1px solid rgba(142, 99, 43, .35);
  background: linear-gradient(90deg, rgba(126, 159, 130, .09), transparent 24%, transparent 76%, rgba(163, 112, 58, .06));
}

#app.game-stage .roster-register > * { position: relative; z-index: 1; }
#app.game-stage .roster-register > .shared-ledger-head { flex: 0 0 auto; min-height: clamp(39px, 5.35cqh, 49px); margin: 0; padding: 0 clamp(12px, 1.45cqw, 17px) clamp(8px, 1.1cqh, 10px); border-bottom-color: rgba(127, 86, 39, .5); }
#app.game-stage .roster-register > .shared-ledger-head span { color: #442816; font-size: clamp(25px, 3.45cqh, 33px); letter-spacing: .18em; }
#app.game-stage .roster-register > .shared-ledger-head small { color: #4d725d; font-size: clamp(12px, 1.45cqw, 15px); }
#app.game-stage .roster-register > .heir-ledger__head { flex: 0 0 auto; min-height: clamp(39px, 5.35cqh, 49px); margin: 0; padding: 0 clamp(12px, 1.45cqw, 17px) clamp(8px, 1.1cqh, 10px); border-bottom-color: rgba(127, 86, 39, .5); }
#app.game-stage .roster-register > .sz-tabs,
#app.game-stage .roster-register > .bureau-sec-h { flex: 0 0 auto; margin: 0; }
#app.game-stage .roster-register > .xiu-layout,
#app.game-stage .roster-register > .roster-panel,
#app.game-stage .roster-register > .heir-ledger__cards { flex: 1 1 auto; min-height: 0; height: auto; }
#app.game-stage .roster-register > .xiu-layout { min-height: 0; }
#app.game-stage .roster-register > .roster-panel { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; }

#app.game-stage .shared-roster-ledger-screen .roster-register:not(.storexiu-register):has(.roster-empty),
#app.game-stage .servant-ledger-screen .roster-register:has(.roster-empty),
#app.game-stage .shenxing-ledger-screen .roster-register:has(.roster-empty),
#app.game-stage .heir-ledger-screen .heir-register:has(.heir-ledger__empty) {
  top: clamp(190px, 25cqh, 238px);
  right: min(22%, 360px);
  bottom: auto;
  left: min(22%, 360px);
  height: min(420px, 47cqh);
}

#app.game-stage .roster-register:has(.roster-empty) > .roster-panel { min-height: 0; }
#app.game-stage .roster-register:has(.roster-empty) .roster-detail-empty { background: radial-gradient(ellipse at 50% 45%, rgba(255, 253, 244, .92), rgba(229, 237, 221, .48) 58%, rgba(255, 252, 237, .06) 80%); }

/* 共享人物宫籍二次排版：少量人物也要像一册正在翻阅的档案，不能只把内容堆在页首。 */
#app.game-stage .storexiu-ledger-screen .storexiu-register:has(.roster-panel),
#app.game-stage .shared-roster-ledger-screen:not(.storyclaim-ledger-screen) .roster-register:has(.roster-panel),
#app.game-stage .servant-ledger-screen .roster-register:has(.roster-panel),
#app.game-stage .shenxing-ledger-screen .roster-register:has(.roster-panel) {
  top: clamp(94px, 12.4cqh, 126px);
  right: clamp(108px, 9.1cqw, 164px);
  bottom: clamp(62px, 8.2cqh, 82px);
  left: clamp(108px, 9.1cqw, 164px);
  padding: clamp(17px, 2.25cqh, 25px) clamp(23px, 2.9cqw, 35px) clamp(15px, 2cqh, 22px);
}

#app.game-stage .roster-register .roster-panel--filled .roster-body {
  grid-template-columns: clamp(205px, 18.4cqw, 286px) minmax(0, 1fr);
  gap: clamp(17px, 2.15cqw, 28px);
}

#app.game-stage .roster-register .roster-panel--filled .roster-list {
  position: relative;
  justify-content: space-between;
  gap: clamp(8px, 1.05cqh, 12px);
  padding: clamp(16px, 2.1cqh, 23px) clamp(13px, 1.45cqw, 18px) clamp(13px, 1.75cqh, 18px);
  overflow: hidden;
  border: 1px solid rgba(117, 84, 43, .32);
  border-left: clamp(5px, .55cqw, 8px) solid rgba(102, 139, 113, .62);
  background:
    linear-gradient(90deg, rgba(92, 128, 105, .12), transparent 20%),
    repeating-linear-gradient(180deg, transparent 0, transparent clamp(52px, 7.2cqh, 64px), rgba(139, 101, 56, .11) calc(clamp(52px, 7.2cqh, 64px) + 1px)),
    linear-gradient(180deg, rgba(251, 247, 230, .92), rgba(231, 235, 218, .67));
}

#app.game-stage .roster-register .roster-panel--filled .roster-list::before,
#app.game-stage .roster-register .roster-panel--filled .roster-list::after {
  content: "";
  position: absolute;
  right: clamp(10px, 1.25cqw, 15px);
  left: clamp(10px, 1.25cqw, 15px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(144, 98, 48, .5), transparent);
  pointer-events: none;
}
#app.game-stage .roster-register .roster-panel--filled .roster-list::before { top: clamp(8px, 1cqh, 11px); }
#app.game-stage .roster-register .roster-panel--filled .roster-list::after { bottom: clamp(8px, 1cqh, 11px); }

#app.game-stage .roster-register .roster-panel--filled .roster-entry {
  position: relative;
  flex: 0 0 auto;
  min-height: clamp(49px, 6.45cqh, 61px);
  padding: clamp(8px, 1.05cqh, 11px) clamp(16px, 1.65cqw, 21px) clamp(7px, .95cqh, 10px);
  overflow: hidden;
  border: 0;
  border-left: 2px solid rgba(188, 145, 66, .72);
  border-right: 2px solid rgba(120, 157, 131, .48);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(255, 252, 240, .94), rgba(247, 240, 216, .76));
  box-shadow: 0 4px 9px rgba(68, 43, 20, .1);
  color: #442a1b;
  font-family: "Royal Kai", "STKaiti", serif;
  font-size: clamp(15px, 1.72cqw, 19px);
  font-weight: 700;
}
#app.game-stage .roster-register .roster-panel--filled .roster-entry::after {
  content: "";
  position: absolute;
  top: 50%;
  right: clamp(7px, .8cqw, 10px);
  width: clamp(5px, .6cqw, 7px);
  height: clamp(5px, .6cqw, 7px);
  transform: translateY(-50%) rotate(45deg);
  border: 1px solid rgba(143, 99, 49, .54);
  background: rgba(249, 238, 201, .8);
}
#app.game-stage .roster-register .roster-panel--filled .roster-entry small { margin-top: 2px; color: #6b5a43; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(11px, 1.12cqw, 13px); font-weight: 500; }
#app.game-stage .roster-register .roster-panel--filled .roster-entry.is-on { border-left-color: #8a4b25; border-right-color: #7b9d79; background: linear-gradient(90deg, #f7e7b8, #ead09a); box-shadow: inset 0 0 0 1px rgba(136, 79, 28, .52), 0 5px 10px rgba(75, 43, 18, .16); }
#app.game-stage .roster-register .roster-panel--filled .roster-page { margin-top: 0; padding-top: 0; color: #6d5134; font-size: clamp(13px, 1.35cqw, 15px); }

#app.game-stage .roster-register .roster-panel--filled .roster-main {
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, .92fr);
  gap: clamp(19px, 2.35cqw, 31px);
}

#app.game-stage .roster-register .roster-panel--filled .roster-detail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: clamp(7px, .95cqh, 10px) clamp(16px, 1.9cqw, 24px);
  padding: clamp(18px, 2.35cqh, 26px) clamp(17px, 2.05cqw, 25px) clamp(16px, 2.1cqh, 23px);
  overflow: hidden;
  border: 1px solid rgba(144, 104, 57, .32);
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(112, 149, 119, .11) 0 1px, transparent 1px) 0 0 / clamp(62px, 7.7cqw, 94px) 100%,
    repeating-linear-gradient(180deg, transparent 0, transparent clamp(40px, 5.45cqh, 49px), rgba(135, 99, 53, .09) calc(clamp(40px, 5.45cqh, 49px) + 1px)),
    linear-gradient(180deg, rgba(255, 252, 239, .94), rgba(245, 237, 215, .85));
}
#app.game-stage .roster-register .roster-panel--filled .roster-detail > * { position: relative; z-index: 1; }
#app.game-stage .roster-register .roster-panel--filled .roster-d-head,
#app.game-stage .roster-register .roster-panel--filled .roster-d-sec,
#app.game-stage .roster-register .roster-panel--filled .roster-d-attrs,
#app.game-stage .roster-register .roster-panel--filled .roster-d-extra { grid-column: 1 / -1; }
#app.game-stage .roster-register .roster-panel--filled .roster-d-head { margin: 0 0 clamp(4px, .55cqh, 6px); padding: 0 0 clamp(8px, 1.05cqh, 11px); border-bottom: 1px solid rgba(132, 91, 42, .46); color: #482818; font-size: clamp(24px, 3.15cqh, 32px); letter-spacing: .08em; }
#app.game-stage .roster-register .roster-panel--filled .roster-d-line { display: grid; grid-template-columns: minmax(3em, .42fr) 1fr; align-items: center; min-height: clamp(27px, 3.55cqh, 34px); padding: 0; border-bottom: 1px solid rgba(141, 103, 60, .17); color: #58402b; font-size: clamp(14px, 1.55cqw, 17px); }
#app.game-stage .roster-register .roster-panel--filled .roster-d-line span { min-width: 0; color: #7c482a; font-weight: 700; }
#app.game-stage .roster-register .roster-panel--filled .roster-d-line b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4e3927; font-weight: 700; }
#app.game-stage .roster-register .roster-panel--filled .roster-badge { padding: 3px clamp(8px, 1cqw, 11px); background: linear-gradient(90deg, rgba(226, 196, 135, .65), rgba(246, 236, 206, .65)); color: #59341f; }
#app.game-stage .roster-register .roster-panel--filled .roster-d-sec { margin: clamp(4px, .55cqh, 6px) 0 0; padding-left: clamp(9px, 1.05cqw, 12px); border-left: 3px solid rgba(126, 159, 130, .78); color: #714127; font-size: clamp(16px, 2.05cqh, 21px); font-weight: 800; letter-spacing: .12em; }
#app.game-stage .roster-register .roster-panel--filled .roster-d-attrs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(6px, .8cqh, 9px) clamp(16px, 1.9cqw, 23px); padding: clamp(10px, 1.3cqh, 14px) 0; border-bottom: 1px solid rgba(141, 103, 60, .2); }
#app.game-stage .roster-register .roster-panel--filled .roster-attr { padding: 0; color: #62462f; font-size: clamp(14px, 1.48cqw, 16px); line-height: 1.45; }
#app.game-stage .roster-register .roster-panel--filled .roster-attr i { color: #7c482a; }
#app.game-stage .roster-register .roster-panel--filled .roster-d-extra:last-child { min-height: clamp(66px, 9.1cqh, 88px); padding: clamp(10px, 1.25cqh, 14px) clamp(12px, 1.35cqw, 16px); border-left: 3px solid rgba(173, 114, 63, .55); background: linear-gradient(90deg, rgba(247, 236, 204, .92), rgba(236, 241, 225, .54)); color: #613d28; font-size: clamp(14px, 1.45cqw, 16px); line-height: 1.75; white-space: normal; }

#app.game-stage .roster-register .roster-panel--filled .roster-portrait {
  isolation: isolate;
  border: 1px solid rgba(115, 142, 115, .35);
  border-bottom-color: rgba(140, 98, 48, .55);
  background:
    repeating-radial-gradient(ellipse at 50% 108%, transparent 0 12%, rgba(118, 150, 124, .15) 12.4% 12.8%, transparent 13.2% 18%),
    radial-gradient(ellipse at 50% 102%, rgba(251, 243, 217, .88), rgba(212, 225, 206, .68) 58%, rgba(111, 143, 119, .22) 100%);
}
#app.game-stage .roster-register .roster-panel--filled .roster-portrait::before { z-index: -1; right: clamp(15px, 1.7cqw, 22px); bottom: clamp(15px, 2cqh, 22px); left: clamp(15px, 1.7cqw, 22px); height: auto; top: clamp(15px, 2cqh, 22px); border: 1px solid rgba(139, 99, 49, .26); background: linear-gradient(90deg, transparent 49.7%, rgba(139, 99, 49, .18) 50%, transparent 50.3%); }
#app.game-stage .roster-register .roster-panel--filled .roster-portrait::after { content: ""; position: absolute; z-index: 2; top: clamp(14px, 1.85cqh, 20px); left: 50%; width: clamp(34px, 4.2cqw, 52px); height: clamp(34px, 4.2cqw, 52px); transform: translateX(-50%) rotate(45deg); border: 1px solid rgba(139, 99, 49, .34); background: radial-gradient(circle, rgba(255, 251, 232, .82) 0 28%, rgba(193, 214, 194, .35) 30% 52%, transparent 54%); pointer-events: none; }
#app.game-stage .roster-register .roster-panel--filled .roster-portrait img { width: 100%; height: 100%; max-width: none; object-position: center bottom; }

#app.game-stage .roster-register .roster-panel--empty { align-self: center; height: auto; min-height: 0; }
#app.game-stage .roster-register .roster-panel--empty .roster-body { min-height: clamp(122px, 16.5cqh, 158px); height: auto; align-items: stretch; }
#app.game-stage .roster-register .roster-panel--empty .roster-list { min-height: 0; padding: clamp(12px, 1.55cqh, 16px); border-left: 4px solid rgba(107, 143, 114, .52); background: linear-gradient(180deg, rgba(224, 234, 218, .62), rgba(255, 252, 238, .42)); }
#app.game-stage .roster-register .roster-panel--empty .roster-detail-empty { min-height: 0; padding: clamp(20px, 2.8cqh, 29px); border: 1px solid rgba(141, 101, 53, .24); background: radial-gradient(ellipse at 50% 48%, rgba(255, 253, 243, .96), rgba(225, 235, 220, .55) 48%, rgba(255, 252, 237, .08) 72%); }

/* 万寿节：可复用节庆点名簿。名单固定八人一页，三轮选择与钦点共用同一外壳。 */
#app.game-stage .wanshou-screen::before { background: linear-gradient(90deg, rgba(20, 11, 7, .5), rgba(35, 13, 7, .08) 25%, rgba(35, 13, 7, .08) 75%, rgba(20, 11, 7, .5)), linear-gradient(0deg, rgba(18, 9, 5, .42), transparent 58%); }
#app.game-stage .wanshou-screen .topnav-banners { display: none; }

#app.game-stage .festival-ledger {
  position: absolute;
  z-index: 6;
  top: clamp(82px, 11.4cqh, 104px);
  bottom: clamp(56px, 8cqh, 74px);
  left: 50%;
  width: min(1040px, 83cqw);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: clamp(8px, 1.1cqh, 12px);
  padding: clamp(16px, 2.2cqh, 23px) clamp(20px, 2.6cqw, 31px) clamp(13px, 1.8cqh, 18px);
  box-sizing: border-box;
  transform: translateX(-50%);
  border: 1px solid rgba(202, 159, 80, .78);
  background: linear-gradient(180deg, rgba(71, 34, 23, .91), rgba(47, 26, 20, .93));
  box-shadow: 0 24px 48px rgba(20, 8, 3, .5), inset 0 0 0 1px rgba(255, 222, 149, .2);
}

/* 2026-07-16：购置后的三档私宅改为府邸实景地图；购置前的宅契购置页保持原样。 */
#app.game-stage .residence-estate-screen {
  display: block;
  min-height: 100%;
  padding: 0;
  background: linear-gradient(90deg, rgba(22, 17, 11, .28), transparent 27%, transparent 73%, rgba(22, 17, 11, .28)), var(--scene-bg) center / cover no-repeat;
}
#app.game-stage .residence-estate-screen::before { background: linear-gradient(0deg, rgba(18, 12, 8, .35), transparent 48%); }
#app.game-stage .residence-estate-screen > .sz-body {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#app.game-stage .residence-map { position: absolute; inset: 0; color: #fff5d9; }
#app.game-stage .residence-map-title {
  position: absolute;
  top: clamp(92px, 13cqh, 124px);
  left: 50%;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 20px 8px;
  transform: translateX(-50%);
  border-top: 1px solid rgba(239, 203, 127, .72);
  border-bottom: 1px solid rgba(239, 203, 127, .72);
  background: linear-gradient(90deg, transparent, rgba(41, 27, 14, .58) 14%, rgba(41, 27, 14, .58) 86%, transparent);
  text-shadow: 0 2px 4px rgba(17, 10, 6, .85);
  white-space: nowrap;
}
#app.game-stage .residence-map-title span { color: #fff3d1; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(23px, 3.15cqh, 31px); font-weight: 800; letter-spacing: .22em; }
#app.game-stage .residence-map-title small { color: #e9c984; font-size: clamp(11px, 1.25cqw, 14px); letter-spacing: .16em; }
#app.game-stage .residence-map-place,
#app.game-stage .residence-map-record {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  justify-items: center;
  width: clamp(120px, 10.8cqw, 156px);
  min-width: 0;
  height: clamp(43px, 5.9cqh, 52px);
  min-height: 0;
  padding: clamp(8px, 1.05cqh, 11px) clamp(17px, 1.7cqw, 22px);
  border: 0;
  border-radius: 0;
  background: url("./assets/ui/residence/residence-location-tag-folio-v1.png") center / 100% 100% no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 5px 5px rgba(25, 23, 19, .3));
  color: #303b39;
  font-family: "Royal Kai", "STKaiti", serif;
  text-shadow: 0 1px rgba(255, 255, 255, .92);
  cursor: pointer;
  transition: filter 140ms ease, transform 140ms ease;
  box-sizing: border-box;
}
#app.game-stage .residence-map-place::before { content: none; }
#app.game-stage .residence-map-place span { font-size: clamp(16px, 2.15cqh, 21px); font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
#app.game-stage .residence-map-place small { color: #5d6964; font-size: 11px; }
#app.game-stage .residence-map-place:hover,
#app.game-stage .residence-map-record:hover {
  filter: brightness(1.06) drop-shadow(0 7px 7px rgba(25, 23, 19, .36));
  transform: translateY(-2px);
}
#app.game-stage .residence-map-place:active,
#app.game-stage .residence-map-record:active {
  filter: brightness(.98) drop-shadow(0 3px 3px rgba(25, 23, 19, .28));
  transform: translateY(1px);
}
#app.game-stage .residence-map-place:focus-visible,
#app.game-stage .residence-map-record:focus-visible {
  outline: 2px solid rgba(54, 70, 66, .82);
  outline-offset: 2px;
}
#app.game-stage .residence-map-place:disabled,
#app.game-stage .residence-map-record:disabled { opacity: .52; filter: grayscale(.32); cursor: default; }
#app.game-stage .residence-map-place--exit { left: 47.5%; top: 74%; }
#app.game-stage .residence-map-place--hall { left: 47.5%; top: 50%; }
#app.game-stage .residence-map-place--outside { left: 22%; top: 49%; }
#app.game-stage .residence-map-place--children { left: 69%; top: 47%; }
#app.game-stage .residence-map-place--servants { left: 69%; top: 67%; }
#app.game-stage .residence-map-place--garden { left: 23%; top: 33%; }
#app.game-stage .residence-map-place--bath { left: 18%; top: 68%; }
#app.game-stage .residence-map-record {
  right: clamp(25px, 3.5cqw, 54px);
  bottom: clamp(26px, 3.6cqh, 44px);
  width: clamp(116px, 9.6cqw, 138px);
  height: clamp(38px, 5.2cqh, 46px);
  padding: 7px 16px;
  color: #303b39;
  font-size: clamp(11px, 1.15cqw, 13px);
  font-weight: 800;
  letter-spacing: .1em;
  white-space: nowrap;
}

/* 正堂：旧菜单的行为保持不变，改为能一眼看清的府务令签。 */
#app.game-stage .sz-screen-hall,
#app.game-stage .sz-screen-garden,
#app.game-stage .sz-screen-bath { display: block; padding: 0; background: var(--scene-bg) center / cover no-repeat; }
#app.game-stage .sz-screen-hall::before,
#app.game-stage .sz-screen-garden::before,
#app.game-stage .sz-screen-bath::before { background: linear-gradient(90deg, rgba(16, 10, 6, .4), transparent 28%, transparent 72%, rgba(16, 10, 6, .4)), linear-gradient(0deg, rgba(18, 11, 7, .32), transparent 54%); }
#app.game-stage .sz-screen-hall > .sz-body,
#app.game-stage .sz-screen-garden > .sz-body,
#app.game-stage .sz-screen-bath > .sz-body { position: absolute; z-index: 4; inset: 0; width: auto; max-width: none; height: auto; max-height: none; margin: 0; padding: 0; color: #452e1c; }
#app.game-stage .residence-hall { position: absolute; top: clamp(112px, 15.5cqh, 148px); right: clamp(54px, 7cqw, 112px); bottom: clamp(42px, 5.8cqh, 64px); width: min(620px, 46cqw); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(12px, 1.8cqh, 18px); padding: clamp(18px, 2.6cqh, 27px) clamp(20px, 2.7cqw, 30px); border: 1px solid rgba(203, 157, 82, .72); border-radius: 8px; background: linear-gradient(180deg, rgba(255, 249, 226, .94), rgba(233, 225, 194, .89)); box-shadow: 0 24px 52px rgba(28, 16, 8, .42), inset 0 0 0 2px rgba(255, 255, 246, .42); }
#app.game-stage .residence-hall__head { display: flex; align-items: baseline; gap: 10px; padding: 0 4px 10px; border-bottom: 1px solid rgba(127, 83, 38, .32); }
#app.game-stage .residence-hall__head span { color: #657b68; font-size: 13px; letter-spacing: .12em; }
#app.game-stage .residence-hall__head h1 { flex: 1; margin: 0; color: #562f1d; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(27px, 3.7cqh, 36px); letter-spacing: .2em; text-align: center; }
#app.game-stage .residence-hall__head small { color: #866544; font-size: 12px; }
#app.game-stage .residence-hall__commands { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1.3cqh, 12px); align-content: center; }
#app.game-stage .residence-hall-command { min-height: clamp(48px, 7.2cqh, 66px); border: 1px solid rgba(80, 111, 89, .52); border-radius: 5px; background: linear-gradient(180deg, rgba(240, 244, 223, .96), rgba(184, 206, 184, .94)); color: #304d40; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(15px, 1.8cqw, 19px); font-weight: 700; letter-spacing: .1em; cursor: pointer; }
#app.game-stage .residence-hall-command:hover { border-color: rgba(145, 78, 37, .86); background: linear-gradient(180deg, #f4dfad, #d8b66e); color: #592e1c; }
#app.game-stage .residence-hall-command.is-primary { border-color: rgba(149, 88, 38, .72); background: linear-gradient(180deg, #f3dfad, #dcb96f); color: #5a301c; }
#app.game-stage .residence-hall__leave,
#app.game-stage .private-resident-return,
#app.game-stage .residence-coming-soon button { justify-self: center; min-width: clamp(120px, 12cqw, 158px); min-height: 34px; border: 1px solid rgba(79, 110, 90, .58); border-radius: 4px; background: linear-gradient(180deg, #eff1dc, #b9d0bb); color: #315044; font-family: "Royal Kai", "STKaiti", serif; font-size: 14px; font-weight: 700; letter-spacing: .14em; cursor: pointer; }

/* 后宅 / 子嗣居 / 下人房：同一页签名册，固定四张立绘卡，不依赖滚动。 */
#app.game-stage .sz-screen-residents { display: block; padding: 0; background: linear-gradient(90deg, rgba(19, 14, 9, .38), transparent 27%, transparent 73%, rgba(19, 14, 9, .38)), var(--scene-bg) center / cover no-repeat; }
#app.game-stage .sz-screen-residents::before { background: rgba(23, 16, 10, .22); }
#app.game-stage .sz-screen-residents > .sz-body { position: absolute; z-index: 4; inset: 0; width: auto; max-width: none; height: auto; max-height: none; margin: 0; padding: 0; color: #442d1b; }
#app.game-stage .private-resident-ledger { position: absolute; top: clamp(82px, 11cqh, 104px); right: clamp(42px, 5cqw, 68px); bottom: clamp(36px, 4.5cqh, 52px); left: clamp(42px, 5cqw, 68px); display: grid; grid-template-columns: clamp(128px, 13.5cqw, 176px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(10px, 1.3cqh, 14px) clamp(14px, 1.6cqw, 20px); padding: clamp(14px, 2cqh, 20px); border: 1px solid rgba(194, 150, 79, .7); border-radius: 8px; background: linear-gradient(180deg, rgba(255, 251, 233, .95), rgba(226, 232, 215, .9)); box-shadow: 0 25px 56px rgba(25, 15, 8, .46), inset 0 0 0 2px rgba(255, 255, 246, .45); }
#app.game-stage .private-resident-tabs { grid-row: 1 / -1; display: grid; align-content: center; gap: clamp(12px, 2cqh, 18px); padding: 0 clamp(6px, .8cqw, 10px); border-right: 1px solid rgba(123, 87, 43, .25); }
#app.game-stage .private-resident-tab { min-height: clamp(78px, 12cqh, 108px); border: 1px solid rgba(88, 119, 96, .45); border-radius: 50% 50% 44% 44%; background: radial-gradient(circle at 48% 38%, #fff9df, #d9e1c4); color: #4c3928; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(18px, 2.35cqh, 23px); font-weight: 800; letter-spacing: .18em; cursor: pointer; box-shadow: 0 4px 9px rgba(68, 45, 25, .14); }
#app.game-stage .private-resident-tab.is-on { border-color: rgba(150, 88, 43, .85); background: radial-gradient(circle at 48% 38%, #fff3c6, #dcad65); color: #5a301c; transform: translateX(5px); }
#app.game-stage .private-resident-head { display: flex; align-items: baseline; justify-content: center; gap: 12px; padding: 0 10px 9px; border-bottom: 1px solid rgba(130, 89, 42, .27); }
#app.game-stage .private-resident-head span { color: #638071; font-size: 12px; letter-spacing: .13em; }
#app.game-stage .private-resident-head h1 { margin: 0; color: #582f1d; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(25px, 3.25cqh, 32px); letter-spacing: .24em; }
#app.game-stage .private-resident-grid { min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.2cqw, 14px); }
#app.game-stage .private-resident-card { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto auto auto auto; align-content: start; overflow: hidden; border: 1px solid rgba(88, 118, 94, .42); border-radius: 5px; background: linear-gradient(180deg, rgba(255, 253, 241, .94), rgba(221, 231, 211, .83)); color: #493524; text-align: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 246, .42); }
#app.game-stage .private-resident-card__portrait { min-height: 0; overflow: hidden; border-bottom: 1px solid rgba(123, 87, 43, .28); background: radial-gradient(ellipse at 50% 90%, rgba(252, 242, 204, .86), rgba(189, 210, 192, .65) 64%, rgba(84, 119, 99, .18)); }
#app.game-stage .private-resident-card__portrait img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center top; }
#app.game-stage .private-resident-card__ribbon { position: absolute; z-index: 2; top: 8px; left: 0; padding: 4px 10px; background: rgba(83, 58, 34, .78); color: #fff1c9; font-size: 11px; letter-spacing: .12em; }
#app.game-stage .private-resident-card h2 { min-width: 0; margin: 7px 7px 2px; overflow: hidden; color: #63331e; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(17px, 1.8cqw, 21px); letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .private-resident-card p { min-width: 0; margin: 2px 7px; overflow: hidden; color: #66543f; font-size: clamp(10px, 1.02cqw, 12px); text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .private-resident-card button { align-self: end; min-height: 29px; margin: 7px; border: 1px solid rgba(143, 89, 41, .55); border-radius: 3px; background: linear-gradient(180deg, #f4dfaf, #d7b16b); color: #5a321e; font-family: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
#app.game-stage .private-resident-card__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 0 4px; }
#app.game-stage .private-resident-card__actions button { min-width: 0; margin: 3px; }
#app.game-stage .private-resident-card--vacant { place-content: center; min-height: 100%; border-style: dashed; background: rgba(245, 238, 211, .72); }
#app.game-stage .private-resident-card--vacant > * { align-self: auto; }
#app.game-stage .private-resident-card__vacant-mark { width: clamp(48px, 5.4cqw, 68px); aspect-ratio: 1; display: grid; place-items: center; justify-self: center; border: 1px solid rgba(118, 90, 50, .48); transform: rotate(45deg); color: #786344; font-family: "Royal Kai", "STKaiti", serif; font-size: 13px; }
#app.game-stage .private-resident-card__vacant-mark + h2 { margin-top: 16px; }
#app.game-stage .private-resident-empty { grid-column: 1 / -1; display: grid; place-items: center; border: 1px dashed rgba(122, 93, 53, .46); color: #775c3b; font-size: 16px; }
#app.game-stage .private-resident-pager { grid-column: 2; display: flex; align-items: center; justify-content: center; gap: 8px; }
#app.game-stage .private-resident-pager button { min-width: 82px; min-height: 30px; border: 1px solid rgba(80, 112, 89, .5); border-radius: 3px; background: linear-gradient(180deg, #edf1de, #bed4bc); color: #315044; font: inherit; font-size: 12px; cursor: pointer; }
#app.game-stage .private-resident-pager span { color: #765438; font-size: 12px; }
#app.game-stage .private-resident-return { position: absolute; right: 16px; bottom: 14px; min-width: 110px; }

#app.game-stage .residence-coming-soon { position: absolute; top: 50%; left: 50%; width: min(440px, 40cqw); display: grid; justify-items: center; gap: 16px; padding: 28px; transform: translate(-50%, -50%); border: 1px solid rgba(218, 180, 105, .68); border-radius: 8px; background: linear-gradient(180deg, rgba(255, 250, 227, .9), rgba(220, 230, 212, .86)); box-shadow: 0 24px 52px rgba(22, 15, 10, .42); }
#app.game-stage .residence-coming-soon header { display: flex; align-items: baseline; gap: 12px; }
#app.game-stage .residence-coming-soon header span { color: #5e7b69; font-size: 13px; }
#app.game-stage .residence-coming-soon h1 { margin: 0; color: #5a301d; font-family: "Royal Kai", "STKaiti", serif; font-size: 32px; letter-spacing: .2em; }
#app.game-stage .residence-coming-soon p { margin: 12px 0; color: #5e4730; font-family: "Royal Kai", "STKaiti", serif; font-size: 18px; letter-spacing: .12em; }

/* 固定人物框：人物透明边已在 render 后裁掉，图片以顶部对齐的 cover 填满画框。 */
#app.game-stage .roster-portrait img,
#app.game-stage .private-resident-card__portrait img {
  width: 100%;
  height: 100%;
  max-width: none;
  padding: 0;
  object-fit: cover !important;
  object-position: center top !important;
}

/* 战事的选择、谏阻、胜后处置与战败急报共用边关画面，不再落回养心殿底图。 */
#app.game-stage .war-event-screen::before { background: linear-gradient(90deg, rgba(14, 10, 8, .62), rgba(26, 13, 9, .12) 28%, rgba(26, 13, 9, .12) 72%, rgba(14, 10, 8, .62)), linear-gradient(0deg, rgba(16, 8, 6, .52), transparent 56%); }
#app.game-stage .war-event-screen .topnav-banners { display: none; }
#app.game-stage .war-event-screen .home-panel-body,
#app.game-stage .war-event-screen .court-board { border: 1px solid rgba(211, 174, 104, .62); border-radius: 7px; background: linear-gradient(180deg, rgba(255, 248, 220, .93), rgba(232, 220, 190, .87)); box-shadow: 0 22px 48px rgba(24, 12, 8, .42); }
#app.game-stage .war-event-screen .home-panel-body { width: min(760px, 68cqw); max-height: none; padding: clamp(18px, 2.5cqh, 25px) clamp(22px, 2.6cqw, 30px); color: #4a311e; }
#app.game-stage .war-event-screen .home-panel-body .hp-note { color: #5b4029; font-size: clamp(14px, 1.6cqw, 17px); line-height: 1.85; }
#app.game-stage .war-event-screen .court-board { width: min(820px, 72cqw); margin: clamp(120px, 16cqh, 145px) auto 0; padding: clamp(18px, 2.5cqh, 25px); color: #4b321e; }
#app.game-stage .war-event-screen .court-board-intro,
#app.game-stage .war-event-screen .court-speaker { color: #543a25; }

#app.game-stage .festival-ledger:has(.festival-honor-grid) {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

#app.game-stage .festival-ledger__head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: clamp(38px, 5.25cqh, 47px); padding: 0 clamp(9px, 1.1cqw, 13px) clamp(7px, .9cqh, 9px); border-bottom: 1px solid rgba(231, 188, 106, .43); }
#app.game-stage .festival-ledger__head span { color: #e7c379; font-size: clamp(11px, 1.15cqw, 14px); font-weight: 700; letter-spacing: .16em; }
#app.game-stage .festival-ledger__head h1 { margin: 0; color: #ffe5ac; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(25px, 3.2cqh, 31px); letter-spacing: .2em; }
#app.game-stage .festival-ledger__head b { justify-self: end; color: #efc773; font-size: clamp(11px, 1.15cqw, 14px); white-space: nowrap; }

#app.game-stage .festival-selection-count { justify-self: center; min-width: clamp(130px, 13.5cqw, 170px); padding: clamp(4px, .6cqh, 6px) 13px; border: 1px solid rgba(228, 190, 112, .47); background: rgba(138, 65, 38, .5); color: #f8dfaa; font-size: clamp(12px, 1.28cqw, 15px); text-align: center; }
#app.game-stage .festival-selection-count b { color: #fff0c9; font-size: 1.28em; }


#app.game-stage .festival-guest-slip,
#app.game-stage .festival-honor-slip {
  position: relative;
  min-height: 0;
  display: grid;
  align-content: center;
  gap: clamp(3px, .45cqh, 5px);
  padding: clamp(9px, 1.25cqh, 13px) clamp(10px, 1.2cqw, 14px);
  border: 1px solid rgba(224, 182, 102, .55);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(116, 53, 34, .89), rgba(76, 38, 29, .9));
  color: #ffe9b6;
  cursor: pointer;
  text-align: center;
  transition: transform 140ms ease, filter 140ms ease, border-color 140ms ease;
}

#app.game-stage .festival-guest-slip:hover:not(:disabled),
#app.game-stage .festival-honor-slip:hover { border-color: #ffe29b; filter: brightness(1.07); transform: translateY(-1px); }
#app.game-stage .festival-guest-slip:disabled { cursor: default; opacity: .5; }
#app.game-stage .festival-guest-slip strong,
#app.game-stage .festival-honor-slip strong { color: #fff0c7; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(17px, 1.95cqw, 23px); letter-spacing: .12em; }
#app.game-stage .festival-guest-slip small,
#app.game-stage .festival-honor-slip small { color: #e1bd7b; font-size: clamp(10px, 1.08cqw, 13px); }
#app.game-stage .festival-guest-slip i { position: absolute; top: clamp(5px, .6cqh, 7px); right: clamp(6px, .7cqw, 8px); min-width: 2em; color: #ffeaa9; font-size: clamp(10px, 1.05cqw, 12px); font-style: normal; }

#app.game-stage .festival-pager { display: flex; align-items: center; justify-content: center; gap: clamp(9px, 1.15cqw, 14px); min-height: clamp(28px, 3.8cqh, 34px); color: #f1d39b; font-size: clamp(11px, 1.1cqw, 13px); }
#app.game-stage .festival-ledger__footer { display: flex; justify-content: center; gap: clamp(12px, 1.6cqw, 20px); min-height: clamp(31px, 4.2cqh, 39px); }
#app.game-stage .festival-ledger .palace-btn { min-width: clamp(126px, 13.2cqw, 168px); min-height: clamp(29px, 4cqh, 37px); padding: 2px 11px; border: 0; border-radius: 0; background: url("./assets/ui/floral/court-action-normal.png") center / 100% 100% no-repeat; color: #fff1c9; font-size: clamp(11px, 1.15cqw, 14px); font-weight: 700; letter-spacing: .1em; text-shadow: 0 1px 1px rgba(31, 12, 5, .82); box-shadow: none; }
#app.game-stage .festival-ledger .palace-btn:hover:not(:disabled) { background-image: url("./assets/ui/floral/court-action-active.png"); }

#app.game-stage .festival-ledger--decision { top: clamp(134px, 19cqh, 168px); bottom: auto; width: min(760px, 64cqw); grid-template-rows: auto minmax(0, 1fr); min-height: clamp(240px, 34cqh, 300px); }
#app.game-stage .festival-decision-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.8cqw, 22px); align-items: stretch; }
#app.game-stage .festival-decision { display: grid; align-content: center; gap: clamp(6px, .9cqh, 9px); border: 1px solid rgba(229, 190, 111, .59); background: linear-gradient(180deg, rgba(96, 48, 31, .94), rgba(62, 32, 25, .94)); color: #fff0c5; cursor: pointer; }
#app.game-stage .festival-decision--hold { border-color: rgba(255, 218, 139, .84); background: linear-gradient(180deg, rgba(173, 91, 42, .96), rgba(107, 48, 28, .96)); }
#app.game-stage .festival-decision:hover { filter: brightness(1.08); transform: translateY(-1px); }
#app.game-stage .festival-decision strong { font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(21px, 2.8cqh, 27px); letter-spacing: .14em; }
#app.game-stage .festival-decision small { color: #e9c98a; font-size: clamp(11px, 1.15cqw, 14px); }
#app.game-stage .festival-empty { display: grid; place-items: center; color: #e6c98e; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(16px, 2.1cqh, 21px); }

/* 节庆叙事层：剧情正文以半透纸笺承接，保留底图气氛而不让文字散落在场景上。 */
#app.game-stage .chuxi-screen::before,
#app.game-stage .wanshou-screen::before {
  background:
    linear-gradient(90deg, rgba(22, 15, 10, .34), rgba(22, 15, 10, .04) 22%, rgba(22, 15, 10, .04) 78%, rgba(22, 15, 10, .34)),
    linear-gradient(0deg, rgba(28, 16, 9, .30), transparent 54%);
}
#app.game-stage .chuxi-screen .topnav-banners,
#app.game-stage .wanshou-screen .topnav-banners { display: none; }

#app.game-stage .festival-narrative {
  --festival-ink: #38271a;
  --festival-muted: #76543b;
  --festival-accent: #8d3d28;
  --festival-gold: #b88a48;
  --festival-paper-top: rgba(255, 250, 232, .91);
  --festival-paper-bottom: rgba(230, 218, 182, .79);
  position: absolute;
  z-index: 6;
  top: clamp(78px, 10.8cqh, 100px);
  right: clamp(42px, 5.3cqw, 72px);
  bottom: clamp(38px, 5.1cqh, 58px);
  left: clamp(42px, 5.3cqw, 72px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(9px, 1.15cqh, 13px);
  padding: clamp(13px, 1.8cqh, 19px) clamp(18px, 2.25cqw, 28px) clamp(14px, 1.85cqh, 20px);
  overflow: hidden;
  border: 1px solid rgba(201, 158, 84, .76);
  background:
    linear-gradient(90deg, rgba(100, 73, 40, .22) 0 1px, transparent 1px) 50% 0 / clamp(84px, 9cqw, 112px) 100%,
    linear-gradient(180deg, rgba(61, 36, 24, .54), rgba(48, 30, 21, .43));
  box-shadow: 0 20px 45px rgba(21, 12, 7, .35), inset 0 0 0 1px rgba(255, 236, 180, .20);
}
#app.game-stage .festival-narrative::before,
#app.game-stage .festival-narrative::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: clamp(11px, 1.4cqh, 15px);
  bottom: clamp(11px, 1.4cqh, 15px);
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(233, 197, 122, .62) 11%, rgba(233, 197, 122, .62) 89%, transparent);
}
#app.game-stage .festival-narrative::before { left: clamp(10px, 1.25cqw, 15px); }
#app.game-stage .festival-narrative::after { right: clamp(10px, 1.25cqw, 15px); }
#app.game-stage .festival-narrative .festival-ledger__head {
  min-height: clamp(44px, 5.7cqh, 53px);
  padding: 0 clamp(12px, 1.45cqw, 17px) clamp(8px, 1cqh, 10px);
  border-color: rgba(230, 190, 112, .68);
  background: linear-gradient(90deg, transparent, rgba(44, 25, 16, .45) 18%, rgba(44, 25, 16, .45) 82%, transparent);
}
#app.game-stage .festival-narrative .festival-ledger__head span,
#app.game-stage .festival-narrative .festival-ledger__head b { color: #f2d99d; text-shadow: 0 1px 2px rgba(25, 13, 7, .78); }
#app.game-stage .festival-narrative .festival-ledger__head h1 {
  color: #fff1c9;
  font-family: "Royal Kai", "STKaiti", "KaiTi", "Songti SC", "STSong", serif;
  font-size: clamp(27px, 3.55cqh, 35px);
  font-weight: 700;
  text-shadow: 0 2px 5px rgba(25, 12, 6, .75);
}

#app.game-stage .festival-narrative .chuxi-prose,
#app.game-stage .festival-ledger--narrative .chuxi-prose {
  min-height: 0;
  width: min(100%, 56em);
  margin: 0 auto;
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(16px, 2.15cqh, 24px) clamp(22px, 2.9cqw, 36px);
  border: 1px solid rgba(133, 96, 51, .48);
  border-top-color: rgba(255, 251, 229, .86);
  border-bottom-color: rgba(112, 78, 43, .54);
  background:
    linear-gradient(90deg, rgba(115, 83, 47, .10) 0 1px, transparent 1px) 0 0 / clamp(62px, 7cqw, 82px) 100%,
    repeating-linear-gradient(180deg, transparent 0, transparent 2.1em, rgba(112, 77, 42, .09) calc(2.1em + 1px)),
    linear-gradient(180deg, var(--festival-paper-top), var(--festival-paper-bottom));
  box-shadow: inset 0 0 22px rgba(112, 76, 37, .11), 0 9px 20px rgba(17, 10, 5, .18);
  color: var(--festival-ink);
  font-family: "Royal Kai", "STKaiti", "KaiTi", "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: clamp(15px, 1.42cqw, 18px);
  font-weight: 600;
  line-height: 2.08;
  letter-spacing: .045em;
  text-shadow: 0 1px 0 rgba(255, 253, 239, .68);
  scrollbar-color: rgba(129, 84, 42, .76) rgba(120, 86, 48, .13);
}
#app.game-stage .festival-narrative .chuxi-prose p,
#app.game-stage .festival-ledger--narrative .chuxi-prose p {
  max-width: 43em;
  margin: 0 auto clamp(10px, 1.35cqh, 14px);
  text-align: justify;
  text-indent: 2em;
}
#app.game-stage .festival-narrative .chuxi-prose p:last-child,
#app.game-stage .festival-ledger--narrative .chuxi-prose p:last-child { margin-bottom: 0; }

#app.game-stage .festival-narrative .chuxi-guannian-events,
#app.game-stage .festival-narrative .chuxi-honors,
#app.game-stage .festival-narrative .chuxi-shousui-pick {
  width: min(100%, 56em);
  min-height: 0;
  margin: 0 auto;
  padding: clamp(11px, 1.45cqh, 15px) clamp(16px, 2cqw, 23px);
  overflow: auto;
  border: 1px solid rgba(185, 140, 75, .54);
  background: linear-gradient(180deg, rgba(255, 248, 222, .88), rgba(226, 215, 181, .77));
  color: var(--festival-ink);
  box-shadow: 0 7px 16px rgba(19, 11, 6, .16);
  font-family: "Royal Kai", "STKaiti", "KaiTi", "Songti SC", "STSong", serif;
}
#app.game-stage .festival-narrative .chuxi-honors { display: grid; align-content: start; gap: clamp(7px, .9cqh, 10px); }
#app.game-stage .festival-narrative .chuxi-honors h2 { margin: 0; padding-bottom: 6px; border-bottom: 1px solid rgba(137, 87, 43, .38); color: #6b3420; font-size: clamp(18px, 2.35cqh, 23px); letter-spacing: .16em; text-align: center; }
#app.game-stage .festival-narrative .chuxi-honor-group { display: grid; gap: 5px; }
#app.game-stage .festival-narrative .chuxi-honor-group > b { color: var(--festival-muted); font-size: clamp(12px, 1.25cqw, 14px); letter-spacing: .13em; }
#app.game-stage .festival-narrative .chuxi-honor-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(130, 90, 50, .18); color: var(--festival-ink); font-size: clamp(14px, 1.35cqw, 16px); }
#app.game-stage .festival-narrative .chuxi-honor-acts,
#app.game-stage .festival-narrative .chuxi-gn-acts,
#app.game-stage .festival-narrative .chuxi-pick-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
#app.game-stage .festival-narrative .chuxi-guannian,
#app.game-stage .festival-narrative .chuxi-gn-choice > p,
#app.game-stage .festival-narrative .chuxi-vignette,
#app.game-stage .festival-narrative .chuxi-shousui-pick > p { margin: 0; color: var(--festival-ink); font-size: clamp(14px, 1.35cqw, 16px); line-height: 1.75; }
#app.game-stage .festival-narrative .chuxi-vignette { padding: 9px 12px; border-left: 3px solid rgba(143, 63, 39, .58); background: rgba(255, 251, 232, .55); text-indent: 2em; }
#app.game-stage .festival-narrative .chuxi-gn-choice { display: grid; gap: 8px; }

#app.game-stage .festival-narrative .festival-ledger__footer,
#app.game-stage .festival-ledger--narrative .festival-ledger__footer { min-height: clamp(37px, 4.75cqh, 43px); padding-top: 2px; }
#app.game-stage .festival-narrative .festival-ledger__footer .palace-btn--primary,
#app.game-stage .festival-ledger--narrative .festival-ledger__footer .palace-btn {
  min-width: clamp(172px, 17.5cqw, 218px);
  min-height: clamp(36px, 4.75cqh, 44px);
  border: 1px solid rgba(244, 211, 137, .82);
  border-radius: 2px;
  background:
    linear-gradient(90deg, transparent 0 9%, rgba(255, 231, 165, .30) 9% 9.6%, transparent 9.6% 90.4%, rgba(255, 231, 165, .30) 90.4% 91%, transparent 91%),
    linear-gradient(180deg, #a84c31, #692719);
  color: #fff3d0;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(13px, 1.35cqw, 16px);
  font-weight: 800;
  letter-spacing: .15em;
  text-shadow: 0 1px 2px rgba(35, 9, 4, .95);
  box-shadow: inset 0 0 0 1px rgba(255, 239, 186, .18), 0 4px 10px rgba(18, 8, 4, .32);
  filter: drop-shadow(0 3px 3px rgba(16, 8, 4, .32));
}
#app.game-stage .festival-narrative .festival-ledger__footer .palace-btn--primary:hover:not(:disabled),
#app.game-stage .festival-ledger--narrative .festival-ledger__footer .palace-btn:hover:not(:disabled) {
  background:
    linear-gradient(90deg, transparent 0 9%, rgba(255, 241, 192, .38) 9% 9.6%, transparent 9.6% 90.4%, rgba(255, 241, 192, .38) 90.4% 91%, transparent 91%),
    linear-gradient(180deg, #bf623c, #7e3120);
  color: #fff9df;
  transform: translateY(-1px);
}
#app.game-stage .festival-narrative.chuxi-jisi .chuxi-prose { align-self: stretch; min-height: clamp(190px, 31cqh, 270px); }

/* 万寿节保留青瓷、古金气质；同一阅读骨架下不与除夕的暖红夜宴混同。 */
#app.game-stage .wanshou-screen .festival-ledger--narrative {
  --festival-ink: #2d4038;
  --festival-muted: #547467;
  --festival-accent: #496d61;
  --festival-paper-top: rgba(246, 247, 229, .91);
  --festival-paper-bottom: rgba(210, 226, 207, .78);
  background: linear-gradient(180deg, rgba(34, 62, 54, .76), rgba(30, 46, 39, .73));
}
#app.game-stage .festival-ledger--narrative .chuxi-prose { border-color: rgba(84, 117, 96, .56); }
#app.game-stage .festival-ledger--narrative .chuxi-prose p { max-width: 43em; }

/* 节庆功能页：剧情仍走既有对话框；名单、褒赏、抉择单独作为浅青名册与礼案操作层。 */
#app.game-stage .festival-ledger:not(.festival-ledger--narrative) {
  --festival-ui-ink: #29463d;
  --festival-ui-muted: #64786d;
  --festival-ui-jade: #8fb8ad;
  --festival-ui-jade-deep: #4e776c;
  --festival-ui-paper: rgba(252, 250, 235, .94);
  --festival-ui-paper-soft: rgba(231, 239, 220, .89);
  top: clamp(72px, 9.8cqh, 92px);
  bottom: clamp(34px, 4.6cqh, 48px);
  width: min(1120px, 88cqw);
  padding: clamp(14px, 1.85cqh, 19px) clamp(18px, 2.25cqw, 28px) clamp(12px, 1.6cqh, 16px);
  border: 1px solid rgba(108, 145, 123, .64);
  border-radius: 0;
  background:
    linear-gradient(90deg, transparent 0 3.2%, rgba(112, 150, 132, .16) 3.2% calc(3.2% + 1px), transparent calc(3.2% + 1px) 96.8%, rgba(112, 150, 132, .16) 96.8% calc(96.8% + 1px), transparent calc(96.8% + 1px)),
    linear-gradient(180deg, rgba(250, 249, 232, .94), rgba(221, 234, 216, .88));
  box-shadow: 0 18px 40px rgba(33, 48, 38, .25), inset 0 0 0 1px rgba(255, 255, 245, .72);
}

#app.game-stage .festival-ledger:not(.festival-ledger--narrative)::before,
#app.game-stage .festival-ledger:not(.festival-ledger--narrative)::after {
  content: "";
  position: absolute;
  width: clamp(12px, 1.3cqw, 17px);
  aspect-ratio: 1;
  border: 1px solid rgba(165, 127, 68, .66);
  background: linear-gradient(135deg, rgba(250, 247, 218, .92), rgba(155, 189, 171, .82));
  transform: rotate(45deg);
}
#app.game-stage .festival-ledger:not(.festival-ledger--narrative)::before { top: -7px; left: -7px; }
#app.game-stage .festival-ledger:not(.festival-ledger--narrative)::after { right: -7px; bottom: -7px; }

#app.game-stage .festival-ledger:not(.festival-ledger--narrative) .festival-ledger__head {
  min-height: clamp(42px, 5.5cqh, 50px);
  padding: 0 clamp(10px, 1.25cqw, 15px) clamp(7px, .85cqh, 9px);
  border-bottom-color: rgba(81, 117, 100, .38);
}
#app.game-stage .festival-ledger:not(.festival-ledger--narrative) .festival-ledger__head span,
#app.game-stage .festival-ledger:not(.festival-ledger--narrative) .festival-ledger__head b { color: var(--festival-ui-muted); text-shadow: none; }
#app.game-stage .festival-ledger:not(.festival-ledger--narrative) .festival-ledger__head h1 { color: var(--festival-ui-ink); font-size: clamp(24px, 3.15cqh, 30px); text-shadow: none; }

#app.game-stage .festival-ledger--decision {
  top: clamp(158px, 21.5cqh, 192px) !important;
  bottom: auto !important;
  width: min(740px, 60cqw) !important;
  min-height: clamp(218px, 30cqh, 258px);
  grid-template-rows: auto minmax(0, 1fr) !important;
}
#app.game-stage .festival-ledger--decision .festival-decision-grid { gap: clamp(12px, 1.5cqw, 18px); }
#app.game-stage .festival-ledger--decision .festival-decision {
  position: relative;
  min-height: 0;
  align-content: center;
  gap: clamp(4px, .65cqh, 7px);
  padding: 12px 16px;
  overflow: hidden;
  border: 1px solid rgba(87, 123, 104, .55);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(246, 247, 227, .98), rgba(194, 218, 198, .94));
  color: var(--festival-ui-ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 247, .72);
}
#app.game-stage .festival-ledger--decision .festival-decision::before { content: ""; position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border: 1px solid rgba(169, 122, 59, .75); transform: rotate(45deg); }
#app.game-stage .festival-ledger--decision .festival-decision--hold { border-color: rgba(143, 101, 48, .82); background: linear-gradient(180deg, rgba(252, 246, 213, .98), rgba(220, 199, 142, .93)); }
#app.game-stage .festival-ledger--decision .festival-decision:hover { border-color: rgba(136, 89, 43, .88); background: linear-gradient(180deg, #fff9dc, #d8c18a); filter: none; transform: translateY(-1px); }
#app.game-stage .festival-ledger--decision .festival-decision strong { color: #3f4e3e; font-size: clamp(19px, 2.5cqh, 25px); }
#app.game-stage .festival-ledger--decision .festival-decision small { color: #6d6854; }

#app.game-stage .festival-selection-count {
  justify-self: center;
  min-width: clamp(122px, 12.5cqw, 156px);
  padding: clamp(4px, .55cqh, 6px) 13px;
  border-color: rgba(83, 119, 102, .5);
  border-radius: 999px;
  background: rgba(210, 230, 211, .82);
  color: var(--festival-ui-muted);
}
#app.game-stage .festival-selection-count b { color: var(--festival-ui-ink); }

#app.game-stage .festival-roster-table {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-top: 1px solid rgba(89, 122, 105, .52);
  border-bottom: 1px solid rgba(89, 122, 105, .38);
  background: rgba(255, 254, 243, .46);
}
#app.game-stage .festival-roster-table__head,
#app.game-stage .festival-guest-slip {
  display: grid;
  grid-template-columns: minmax(105px, 1.2fr) minmax(116px, 1.25fr) minmax(100px, 1fr) minmax(76px, .68fr) minmax(82px, .72fr);
  align-items: center;
  column-gap: clamp(8px, 1cqw, 13px);
}
#app.game-stage .festival-roster-table__head {
  min-height: clamp(31px, 4.05cqh, 37px);
  padding: 0 clamp(12px, 1.55cqw, 18px);
  background: linear-gradient(90deg, rgba(113, 148, 127, .72), rgba(83, 121, 104, .82));
  color: #fff9e7;
  font-size: clamp(11px, 1.1cqw, 13px);
  font-weight: 700;
  letter-spacing: .15em;
}
#app.game-stage .festival-roster-table__head span:last-child { text-align: center; }
#app.game-stage .festival-guest-grid,
#app.game-stage .festival-honor-grid {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(8, minmax(0, 1fr));
  gap: 0;
}
#app.game-stage .festival-guest-slip {
  width: 100%;
  min-height: 0;
  padding: 0 clamp(12px, 1.55cqw, 18px);
  border: 0;
  border-bottom: 1px solid rgba(103, 125, 100, .17);
  border-radius: 0;
  background: rgba(255, 254, 245, .68);
  color: var(--festival-ui-ink);
  text-align: left;
  box-shadow: none;
}
#app.game-stage .festival-guest-slip:nth-child(even) { background: rgba(231, 240, 222, .54); }
#app.game-stage .festival-guest-slip strong,
#app.game-stage .festival-guest-slip small,
#app.game-stage .festival-guest-slip .festival-row-cell { min-width: 0; color: var(--festival-ui-ink); font-family: inherit; font-size: clamp(12px, 1.22cqw, 15px); font-weight: 600; letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
#app.game-stage .festival-guest-slip small,
#app.game-stage .festival-guest-slip .festival-row-cell--age { color: var(--festival-ui-muted); font-size: clamp(11px, 1.08cqw, 13px); font-weight: 500; }
#app.game-stage .festival-guest-slip .festival-row-action {
  position: static;
  justify-self: stretch;
  min-width: 0;
  padding: clamp(4px, .55cqh, 6px) 8px;
  border: 1px solid rgba(85, 122, 105, .52);
  border-radius: 0;
  background: linear-gradient(180deg, #edf3df, #bdd7c0);
  color: #34574a;
  font-size: clamp(10px, 1.02cqw, 12px);
  font-style: normal;
  font-weight: 800;
  letter-spacing: .12em;
  text-align: center;
}
#app.game-stage .festival-guest-slip:hover:not(:disabled) { border-color: rgba(125, 91, 45, .42); background: rgba(255, 252, 226, .9); filter: none; transform: none; }
#app.game-stage .festival-guest-slip:hover:not(:disabled) .festival-row-action { border-color: rgba(137, 91, 45, .72); background: linear-gradient(180deg, #f8e8b7, #d9b875); color: #51351f; }
#app.game-stage .festival-guest-slip.is-selected { border: 0; border-bottom: 1px solid rgba(132, 105, 55, .3); background: linear-gradient(90deg, rgba(238, 224, 176, .82), rgba(229, 240, 217, .8)); box-shadow: inset 4px 0 0 #a8773e; }
#app.game-stage .festival-guest-slip.is-selected .festival-row-action { border-color: rgba(150, 99, 43, .78); background: linear-gradient(180deg, #f6dda0, #d3a65c); color: #54311b; }
#app.game-stage .festival-guest-slip:disabled { opacity: .56; }

#app.game-stage .festival-roster-table--honor .festival-roster-table__head,
#app.game-stage .festival-honor-slip {
  display: grid;
  grid-template-columns: minmax(70px, .55fr) minmax(150px, 1.25fr) minmax(155px, 1.25fr) minmax(82px, .72fr);
  align-items: center;
  column-gap: clamp(8px, 1cqw, 13px);
}
#app.game-stage .festival-honor-grid { grid-template-rows: repeat(8, minmax(0, 1fr)); }
#app.game-stage .festival-honor-slip {
  width: 100%;
  min-height: 0;
  padding: 0 clamp(12px, 1.55cqw, 18px);
  border: 0;
  border-bottom: 1px solid rgba(103, 125, 100, .17);
  border-radius: 0;
  background: rgba(255, 254, 245, .7);
  color: var(--festival-ui-ink);
  text-align: left;
}
#app.game-stage .festival-honor-slip:nth-child(even) { background: rgba(232, 241, 224, .52); }
#app.game-stage .festival-honor-slip strong { color: var(--festival-ui-ink); font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(15px, 1.52cqw, 18px); letter-spacing: .1em; }
#app.game-stage .festival-honor-slip small { color: var(--festival-ui-muted); font-size: clamp(11px, 1.08cqw, 13px); }
#app.game-stage .festival-honor-slip .festival-row-cell--index { color: #8d704a; font-size: clamp(10px, 1.04cqw, 12px); font-variant-numeric: tabular-nums; }
#app.game-stage .festival-honor-slip .festival-row-action { padding: clamp(4px, .55cqh, 6px) 8px; border: 1px solid rgba(159, 110, 49, .66); background: linear-gradient(180deg, #f8e8b7, #d8b56f); color: #50311d; font-size: clamp(10px, 1.02cqw, 12px); font-weight: 800; letter-spacing: .12em; text-align: center; }
#app.game-stage .festival-honor-slip:hover { border-color: rgba(145, 96, 43, .55); background: #fff9df; filter: none; transform: none; }

#app.game-stage .festival-pager { min-height: clamp(28px, 3.7cqh, 33px); color: var(--festival-ui-muted); }
#app.game-stage .festival-ledger:not(.festival-ledger--narrative) .festival-pager .palace-btn,
#app.game-stage .festival-ledger:not(.festival-ledger--narrative) .festival-ledger__footer .palace-btn,
#app.game-stage .festival-narrative .chuxi-honor-acts .palace-btn,
#app.game-stage .festival-narrative .chuxi-gn-acts .palace-btn,
#app.game-stage .festival-narrative .chuxi-pick-list .palace-btn {
  min-width: clamp(96px, 9.6cqw, 122px);
  min-height: clamp(27px, 3.55cqh, 33px);
  padding: 2px 10px;
  border: 1px solid rgba(83, 119, 102, .58);
  border-radius: 0;
  background: linear-gradient(180deg, #f0f3dc, #b9d3b9);
  color: #355348;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(11px, 1.08cqw, 13px);
  font-weight: 800;
  letter-spacing: .11em;
  text-shadow: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 247, .42);
}
#app.game-stage .festival-ledger:not(.festival-ledger--narrative) .festival-pager .palace-btn:hover:not(:disabled),
#app.game-stage .festival-ledger:not(.festival-ledger--narrative) .festival-ledger__footer .palace-btn:hover:not(:disabled),
#app.game-stage .festival-narrative .chuxi-honor-acts .palace-btn:hover:not(:disabled),
#app.game-stage .festival-narrative .chuxi-gn-acts .palace-btn:hover:not(:disabled),
#app.game-stage .festival-narrative .chuxi-pick-list .palace-btn:hover:not(:disabled) { border-color: rgba(146, 94, 43, .78); background: linear-gradient(180deg, #f8eac0, #d9b66f); color: #50321d; transform: translateY(-1px); }
#app.game-stage .festival-ledger:not(.festival-ledger--narrative) .festival-ledger__footer .palace-btn--primary { border-color: rgba(142, 95, 45, .8); background: linear-gradient(180deg, #f5e7bb, #d7b16a); color: #50301a; }

/* 除夕的剧情仍是原对话区域；下方褒赏与临时决断改为独立、可扫读的礼簿操作区。 */
#app.game-stage .festival-narrative .chuxi-honors,
#app.game-stage .festival-narrative .chuxi-guannian-events,
#app.game-stage .festival-narrative .chuxi-shousui-pick {
  width: min(100%, 58em);
  padding: clamp(6px, .85cqh, 9px) clamp(11px, 1.45cqw, 16px);
  border-color: rgba(80, 117, 98, .52);
  background: linear-gradient(180deg, rgba(250, 250, 234, .94), rgba(221, 235, 216, .88));
  color: #30483e;
}
#app.game-stage .festival-narrative .chuxi-honors h2 { display: none; }
#app.game-stage .festival-narrative.chuxi-yan .chuxi-prose { padding: 3px clamp(9px, 1.2cqw, 13px); font-size: clamp(10px, 1.02cqw, 12px); line-height: 1.42; }
#app.game-stage .festival-narrative .chuxi-honor-table__head,
#app.game-stage .festival-narrative .chuxi-honor-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(105px, 1.1fr) minmax(78px, .8fr) minmax(178px, 1.55fr);
  align-items: center;
  gap: clamp(7px, .9cqw, 11px);
}
#app.game-stage .festival-narrative .chuxi-honor-table__head { min-height: 24px; padding: 0 8px; background: rgba(99, 137, 117, .72); color: #fff9e8; font-size: clamp(10px, 1.02cqw, 12px); font-weight: 800; letter-spacing: .12em; }
#app.game-stage .festival-narrative .chuxi-honor-table__head span:last-child { text-align: center; }
#app.game-stage .festival-narrative .chuxi-honor-group { gap: 0; }
#app.game-stage .festival-narrative .chuxi-honor-row { min-height: clamp(15px, 2.05cqh, 18px); padding: 0 8px; border-bottom-color: rgba(95, 117, 94, .18); color: #3d5146; font-size: clamp(10px, 1.02cqw, 12px); }
#app.game-stage .festival-narrative .chuxi-honor-row:nth-child(even) { background: rgba(238, 244, 229, .56); }
#app.game-stage .festival-narrative .chuxi-honor-row b { color: #2e493d; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(12px, 1.16cqw, 14px); letter-spacing: .09em; }
#app.game-stage .festival-narrative .chuxi-honor-role,
#app.game-stage .festival-narrative .chuxi-honor-rank { color: #617a6b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .festival-narrative .chuxi-honor-acts { justify-content: flex-end; flex-wrap: nowrap; }
#app.game-stage .festival-narrative .chuxi-honor-acts .palace-btn { min-width: clamp(67px, 6.7cqw, 84px); min-height: clamp(14px, 1.85cqh, 17px); font-size: clamp(9px, .92cqw, 11px); }
#app.game-stage .festival-narrative .chuxi-guannian,
#app.game-stage .festival-narrative .chuxi-gn-choice > p,
#app.game-stage .festival-narrative .chuxi-vignette,
#app.game-stage .festival-narrative .chuxi-shousui-pick > p { color: #40564a; }
#app.game-stage .festival-narrative .chuxi-vignette { border-left-color: rgba(143, 96, 46, .62); background: rgba(255, 251, 230, .56); }
#app.game-stage .festival-narrative .chuxi-pick-list { justify-content: flex-start; }

@media (max-width: 900px) {
  #app.game-stage .festival-narrative { right: 3cqw; left: 3cqw; }
  #app.game-stage .festival-narrative .festival-ledger__head { grid-template-columns: 1fr auto 1fr; }
  #app.game-stage .festival-narrative .festival-ledger__head span,
  #app.game-stage .festival-narrative .festival-ledger__head b { font-size: clamp(9px, 1.15cqw, 12px); }
}


/* ═══ 2026-07-27 选中态统一（H1）：xiu-cat.on 历史上散落 8 处定义（02/06/09/11/16 段）——
   此条以最高特定性统一压制为青瓷点亮语言（同御案/后宫殿阁签）。后续清理死定义时以此为准。 ═══ */
#app.game-stage .shared-roster-ledger-screen .xiu-cat.on,
#app.game-stage .storexiu-ledger-screen .xiu-cat.on,
#app.game-stage .storexiu-ledger-screen .storexiu-register .xiu-cat.on,
#app.game-stage .servant-ledger-screen .xiu-cat.on {
  border-color: rgba(79, 117, 106, 0.65);
  background: linear-gradient(180deg, #eff4ec, #d8e2d4);
  color: #24382f;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #a74a3a, inset 0 0 0 1.5px rgba(197, 155, 86, 0.3), 0 0 10px rgba(140, 170, 158, 0.35);
  filter: none;
}

/* ★续zt270：事件期间由 #app 承载事件底图——它跨渲染不销毁，故剧情逐句推进时底图恒定、不再闪回场景图。
   放在场景层之上、内容之下；事件结束即摘类，普通场景完全不受影响。 */
#app.game-stage.has-event-scene-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--event-scene-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
/* 事件自身的 backdrop 不必再各自铺一层（否则同图叠两次·且它才是会闪的那层） */
#app.game-stage.has-event-scene-bg .event-backdrop.has-event-scene { background-image: none; }
/* ═══════ 皇陵·皇室族谱（太庙玉牒）══════════════════════════════════════
   仅重塑展示层：历代节点仍由 imperial-tree.js 的原有数据 / 类名生成。 */
#app.game-stage .iltree-screen {
  --iltree-ink: #2c2519;
  --iltree-paper: #e6d9b6;
  --iltree-paper-deep: #bda77a;
  --iltree-jade: #506b5c;
  --iltree-jade-dark: #192720;
  --iltree-gold: #d2ac61;
  --iltree-gold-dim: #96703a;
  display: block;
  min-height: 100%; height: 100%; overflow: hidden;
  color: var(--iltree-paper);
  background:
    radial-gradient(ellipse at 50% 43%, rgba(244, 217, 151, .13), transparent 35%),
    linear-gradient(90deg, rgba(6, 10, 8, .68), rgba(6, 10, 8, .08) 23%, rgba(6, 10, 8, .08) 77%, rgba(6, 10, 8, .68)),
    url("./assets/backgrounds/imperial-tree-ancestral-hall-20260718.png") center / cover no-repeat;
}
#app.game-stage .iltree-screen::before {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(3, 7, 6, .78), rgba(3, 7, 6, .08) 22%, rgba(3, 7, 6, .34)),
    repeating-linear-gradient(90deg, transparent 0 12.8%, rgba(214, 177, 98, .045) 12.9% 13%, transparent 13.1% 25%);
}
#app.game-stage .iltree-screen::after { display: none; }

/* 题签化标题与退回命令，避免沿用朝堂通用奶白牌。 */
#app.game-stage .iltree-screen > .court-head {
  z-index: 5; top: clamp(8px, 2.3cqh, 24px); padding: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none;
}
#app.game-stage .iltree-screen > .court-head span {
  display: block; min-width: clamp(150px, 20cqw, 250px); padding: clamp(5px, 1.1cqh, 12px) clamp(22px, 3.2cqw, 44px);
  color: #f4dfab; font-size: clamp(15px, 2.7cqh, 27px); line-height: 1; letter-spacing: .36em; text-indent: .36em; text-align: center;
  background:
    linear-gradient(90deg, transparent 0 3%, rgba(26, 40, 31, .97) 3% 97%, transparent 97%),
    linear-gradient(180deg, #7d6438, #b99755 48%, #5e492b 51%, #927542);
  clip-path: polygon(0 50%, 4% 0, 96% 0, 100% 50%, 96% 100%, 4% 100%);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .5), inset 0 1px rgba(255, 235, 178, .28), inset 0 -1px rgba(0, 0, 0, .6);
  text-shadow: 0 1px 1px #17231c, 0 0 11px rgba(240, 195, 93, .28);
}
#app.game-stage .iltree-screen > .sz-actions {
  position: absolute; z-index: 5; right: clamp(12px, 3.2cqw, 52px); bottom: clamp(8px, 2.4cqh, 28px); margin: 0;
}
#app.game-stage .iltree-screen > .sz-actions .court-action {
  min-width: clamp(96px, 12.8cqw, 156px); padding: clamp(5px, 1.15cqh, 11px) 14px;
  border: 1px solid rgba(223, 184, 103, .76); border-radius: 0;
  background: linear-gradient(180deg, rgba(39, 55, 43, .98), rgba(20, 31, 25, .98));
  color: #eddaab; font-family: inherit; letter-spacing: .18em; box-shadow: 0 4px 0 rgba(0, 0, 0, .4), inset 0 0 0 2px rgba(9, 15, 11, .5), inset 0 1px rgba(255, 234, 170, .2);
}
#app.game-stage .iltree-screen > .sz-actions .court-action:hover { color: #fff2c9; border-color: #f0cf81; background: linear-gradient(180deg, #526b55, #24392c); }
#app.game-stage .iltree-screen > .sz-actions .court-action:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .4), inset 0 0 0 2px rgba(9, 15, 11, .5); }

/* 玉牒正文可随朝代自然延展；只正文纵向阅览，标题与返回保持在画面内。 */
#app.game-stage .iltree-body {
  position: absolute; z-index: 3; top: clamp(55px, 8.2cqh, 84px); right: max(1.5cqw, 10px); bottom: clamp(36px, 5.5cqh, 60px); left: max(1.5cqw, 10px);
  width: auto; max-width: none; margin: 0; padding: clamp(8px, 1.7cqh, 18px) clamp(7px, 1.8cqw, 24px) clamp(18px, 2.8cqh, 34px);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(202, 164, 88, .72) rgba(7, 13, 10, .5);
  background: linear-gradient(90deg, rgba(10, 17, 13, .64), rgba(19, 29, 22, .13) 17%, rgba(19, 29, 22, .13) 83%, rgba(10, 17, 13, .64));
  border: 1px solid rgba(206, 170, 96, .35); border-top-color: rgba(226, 195, 124, .58); border-bottom-color: rgba(66, 87, 65, .72);
  box-shadow: inset 0 0 42px rgba(0, 0, 0, .52), 0 16px 36px rgba(0, 0, 0, .23);
}
#app.game-stage .iltree-body::-webkit-scrollbar { width: 8px; }
#app.game-stage .iltree-body::-webkit-scrollbar-track { background: rgba(5, 10, 7, .46); }
#app.game-stage .iltree-body::-webkit-scrollbar-thumb { background: linear-gradient(#c5a05c, #715427); border: 2px solid rgba(7, 12, 8, .8); border-radius: 8px; }
#app.game-stage .iltree-chain { position: relative; display: flex; flex-direction: column; align-items: center; min-width: min-content; padding: 0 max(2px, .4cqw); }
/* 贯穿整卷的玉线让读到第十代时仍能一眼认出正统脊梁。 */
#app.game-stage .iltree-chain::before { content: ""; position: absolute; z-index: 0; top: 20px; bottom: 20px; left: 50%; width: 1px; transform: translateX(-50%); background: linear-gradient(180deg, transparent, rgba(232, 197, 113, .24) 4%, rgba(232, 197, 113, .24) 96%, transparent); }

/* 每一代是一方玉牒神龛；竖向的金线承接其间。 */
#app.game-stage .iltree-gen {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1.15cqh, 12px);
  z-index: 1; width: fit-content; min-width: min(100%, 220px); max-width: min(100%, 660px); box-sizing: border-box; padding: clamp(5px, 1.65cqh, 17px) clamp(10px, 2.6cqw, 32px) clamp(5px, 1.45cqh, 15px);
  border: 1px solid rgba(216, 181, 102, .68); border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(31, 49, 39, .94), rgba(47, 61, 46, .83) 9%, rgba(233, 217, 172, .91) 22%, rgba(239, 226, 186, .94) 50%, rgba(233, 217, 172, .91) 78%, rgba(47, 61, 46, .83) 91%, rgba(31, 49, 39, .94)),
    repeating-linear-gradient(0deg, rgba(104, 75, 37, .05) 0 1px, transparent 1px 5px);
  box-shadow: 0 10px 21px rgba(0, 0, 0, .38), inset 0 0 0 3px rgba(52, 69, 51, .52), inset 0 0 22px rgba(111, 82, 37, .28);
}
#app.game-stage .iltree-gen::before,
#app.game-stage .iltree-gen::after { content: ""; position: absolute; width: 7px; height: 7px; border: 1px solid rgba(235, 205, 131, .85); background: #294135; transform: rotate(45deg); }
#app.game-stage .iltree-gen::before { top: -5px; left: -5px; box-shadow: calc(100cqw - 38px) 0 0 -1px #294135, calc(100cqw - 38px) 0 0 0 rgba(235, 205, 131, .85); }
#app.game-stage .iltree-gen::after { bottom: -5px; right: -5px; box-shadow: calc(-100cqw + 38px) 0 0 -1px #294135, calc(-100cqw + 38px) 0 0 0 rgba(235, 205, 131, .85); }
#app.game-stage .iltree-link {
  position: relative; z-index: 1; width: 32px; height: clamp(18px, 3.2cqh, 34px); flex: 0 0 auto;
  background:
    linear-gradient(90deg, transparent 0 43%, rgba(106, 77, 34, .72) 43% 46%, #e4c173 46% 54%, rgba(106, 77, 34, .72) 54% 57%, transparent 57%),
    radial-gradient(ellipse at 50% 50%, rgba(245, 215, 137, .44), transparent 43%);
}
#app.game-stage .iltree-link::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; transform: translate(-50%, -50%) rotate(45deg); background: #d1aa58; border: 2px solid #53654e; box-shadow: 0 0 0 1px #d9bd7b, 0 0 12px rgba(237, 195, 96, .5); }

/* 帝、后、皇嗣共用人物卡，但在玉牒中重新落为木框与题签。 */
#app.game-stage .iltree-screen .member-card {
  position: relative; flex: 0 0 auto; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  width: clamp(74px, 11.3cqw, 136px); min-width: 0; height: clamp(86px, 21.5cqh, 206px); aspect-ratio: auto;
  overflow: hidden; border: 2px solid #4a3922; border-radius: 0;
  background: linear-gradient(90deg, #503b20, #a88241 10%, #e6d39e 15%, #e6d39e 85%, #a88241 90%, #503b20);
  box-shadow: 0 5px 12px rgba(22, 14, 7, .46), inset 0 0 0 1px rgba(250, 232, 173, .45);
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}
#app.game-stage .iltree-screen .member-card::before { content: ""; position: absolute; z-index: 3; inset: 4px; border: 1px solid rgba(96, 66, 27, .55); pointer-events: none; }
#app.game-stage .iltree-screen .member-card-label {
  position: relative; z-index: 2; inset: auto; display: grid; place-items: center; min-height: 17px; padding: 2px 4px; border: 0; border-bottom: 1px solid rgba(225, 194, 118, .62); border-radius: 0;
  background: linear-gradient(180deg, #4b684f, #21392c); color: #f8e9bd; font-size: clamp(8px, 1.65cqh, 16px); font-weight: 600; letter-spacing: .16em; text-shadow: 0 1px #152218;
}
#app.game-stage .iltree-screen .member-card-portrait { position: relative; inset: auto; min-height: 0; border-radius: 0; background: linear-gradient(180deg, #34483b, #1f2d25); overflow: hidden; }
#app.game-stage .iltree-screen .member-card-portrait::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255, 232, 170, .09), transparent 36%, rgba(7, 17, 12, .33)); }
#app.game-stage .iltree-screen .member-card-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
#app.game-stage .iltree-screen .member-card-name {
  position: relative; z-index: 2; inset: auto; display: block; min-height: 17px; padding: 2px 3px 3px; border: 0; border-top: 1px solid rgba(91, 62, 28, .48); border-radius: 0;
  background: rgba(236, 222, 178, .98); color: #372717; font-size: clamp(8px, 1.55cqh, 15px); font-weight: 500; line-height: 1.2; text-shadow: none;
}
#app.game-stage .iltree-screen .member-card-name b { color: #512d19; }
#app.game-stage .iltree-screen .member-card-age { color: #715736; }
#app.game-stage .iltree-screen .member-card-note { margin-top: 1px; color: #715631; font-size: clamp(6px, 1.15cqh, 11px); line-height: 1.15; white-space: normal; }
#app.game-stage .iltree-screen .member-card--clickable:hover { transform: translateY(-4px); filter: brightness(1.05); box-shadow: 0 9px 18px rgba(10, 8, 4, .5), 0 0 0 1px rgba(245, 213, 132, .8); }
#app.game-stage .iltree-screen .member-card--clickable:focus-visible { outline: 2px solid var(--rs-gold-hover); outline-offset: 3px; }

/* 首张恒为本代帝王，额外加碑座与金边；当朝再加御用金辉。 */
#app.game-stage .iltree-row { display: flex; align-items: flex-start; justify-content: center; gap: clamp(7px, 2.1cqw, 25px); width: 100%; flex-wrap: wrap; }
#app.game-stage .iltree-row .member-card:first-child { width: clamp(84px, 13.2cqw, 158px); height: clamp(98px, 24.5cqh, 230px); border-color: #6b4a22; box-shadow: 0 7px 16px rgba(15, 9, 4, .55), inset 0 0 0 2px rgba(231, 193, 107, .7); }
#app.game-stage .iltree-row .member-card:first-child .member-card-label { min-height: 19px; background: linear-gradient(180deg, #805d29, #493617); color: #ffe9ad; font-size: clamp(9px, 1.9cqh, 18px); }
#app.game-stage .iltree-row .member-card.is-self { transform: translateY(-2px); border-color: #edcc7f; box-shadow: 0 0 0 2px rgba(236, 202, 116, .35), 0 0 22px rgba(234, 192, 91, .55), 0 9px 18px rgba(10, 8, 4, .52); filter: none; }
#app.game-stage .iltree-row .member-card.is-self .member-card-label { background: linear-gradient(180deg, #a3742d, #654517); color: #fff1be; }

/* 本纪像镶入玉牒的碑刻题跋；皇嗣做成横向附页，代数再多仍不会挤坏本代主位。 */
#app.game-stage .iltree-benji {
  position: relative; width: min(92%, 760px); max-width: none; margin: 0; padding: clamp(9px, 1.35cqh, 13px) clamp(17px, 2.3cqw, 25px) clamp(9px, 1.35cqh, 13px) clamp(46px, 5.2cqw, 64px);
  border: 1px solid rgba(100, 75, 39, .56); border-left: 0; border-radius: 0;
  background: linear-gradient(90deg, rgba(69, 91, 70, .92), rgba(236, 222, 180, .96) 13%, rgba(244, 231, 194, .96) 87%, rgba(69, 91, 70, .92));
  color: #43311e; box-shadow: inset 0 0 16px rgba(100, 72, 31, .18), 0 3px 8px rgba(24, 15, 7, .24);
}
#app.game-stage .iltree-benji::before { content: ""; position: absolute; left: clamp(12px, 1.8cqw, 19px); top: 50%; width: 19px; height: 19px; transform: translateY(-50%) rotate(45deg); border: 1px solid #d5b66f; background: #354d3d; box-shadow: inset 0 0 0 3px #233528; }
#app.game-stage .iltree-benji span { display: block; margin: 0 0 3px; color: #59401e; font-size: clamp(11px, 1.45cqh, 14px); font-weight: 700; letter-spacing: .28em; }
#app.game-stage .iltree-benji p { margin: 0; font-size: clamp(12px, 1.55cqh, 15px); line-height: 1.65; text-align: justify; text-shadow: 0 1px rgba(255, 249, 222, .6); }
#app.game-stage .iltree-heirs { width: min(100%, 880px); padding-top: 2px; border-top: 1px solid rgba(99, 75, 39, .34); }
#app.game-stage .iltree-heirs-label { width: fit-content; margin: -1px auto 7px; padding: 3px 14px 4px; color: #e9d49f; background: #304a3a; border: 1px solid rgba(213, 178, 101, .66); font-size: clamp(10px, 1.35cqh, 13px); font-weight: 600; letter-spacing: .28em; line-height: 1; }
#app.game-stage .iltree-heirs-cards { display: flex; align-items: flex-start; justify-content: center; gap: clamp(7px, 1.1cqw, 12px); flex-wrap: wrap; }
#app.game-stage .iltree-heirs .member-card { width: clamp(60px, 9.1cqw, 108px); height: clamp(74px, 16.8cqh, 160px); border-width: 1px; }
#app.game-stage .iltree-heirs .member-card-label { min-height: 14px; padding: 2px 3px; font-size: clamp(7px, 1.3cqh, 13px); }
#app.game-stage .iltree-heirs .member-card-name { min-height: 15px; padding: 2px; font-size: clamp(7px, 1.28cqh, 13px); }
#app.game-stage .iltree-heirs .member-card-note { display: none; }
@media (max-width: 760px) {
  #app.game-stage .iltree-body { right: 10px; left: 10px; padding-right: 8px; padding-left: 8px; }
  #app.game-stage .iltree-gen { padding-right: 10px; padding-left: 10px; }
  #app.game-stage .iltree-gen::before, #app.game-stage .iltree-gen::after { display: none; }
  #app.game-stage .iltree-benji { width: 96%; padding-left: 40px; }
}

/* ═══════ 华清宫·大臣家族谱系（续zt189·功能布局·背景/美术留 Codex 打磨）═══════ */
#app.game-stage .hqtree-screen .hqtree-body { overflow-y: auto; }
#app.game-stage .hqtree-chain { display: flex; flex-direction: column; gap: 20px; padding: 10px 6px 24px; }
#app.game-stage .hqtree-tier { display: flex; flex-direction: column; gap: 10px; }
#app.game-stage .hqtree-tier-label { font-size: 13px; letter-spacing: 3px; color: #8a7a5c; border-left: 3px solid #b89b6a; padding-left: 10px; }
#app.game-stage .hqtree-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
#app.game-stage .hqtree-row--kids { gap: 18px; }
#app.game-stage .hqtree-subhouse { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid rgba(184,155,106,.30); border-radius: 10px; background: rgba(184,155,106,.06); }
#app.game-stage .hqtree-couple { display: flex; gap: 8px; }
#app.game-stage .hqtree-grand { display: flex; flex-wrap: wrap; gap: 8px; margin-left: 16px; padding-left: 12px; border-left: 2px dashed rgba(184,155,106,.45); }
#app.game-stage .hqtree-leaf { display: flex; }

/* ══════════ 续zt192·花楼 UI[重构]（最小功能布局·复用 .visit-★ / .consort-status / .palace-btn / .xiu-rank-★·背景/立绘视觉留 Codex 打磨） ══════════ */
/* ↑ 2026-07-26 修：原注释文字「.visit-*∕」含 *∕ 序列把注释提前闭合，泄漏文字污染其后选择器，致 .hualou-topbar 整条规则被浏览器丢弃（花楼顶栏样式一直未生效）。 */
#app.game-stage .visit-screen--person .hualou-topbar {
  /* 2026-07-27 Yan「挤」：本面板自注释 bug 修活后首次真正显形——原坐标 top:18px 从未实摆过，
     恰与通用顶栏时间纸卷撞位 → 下移到纸卷之下（容器相对单位·各窗口一致） */
  position: absolute; top: 13.5cqh; left: 1.6cqw; z-index: 6;
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 16px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(38, 18, 22, 0.82), rgba(60, 30, 34, 0.72));
  border: 1px solid rgba(206, 160, 120, 0.45); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  color: #f4e6d4; max-width: 340px;
}
#app.game-stage .hualou-topbar .hl-vip { display: flex; align-items: baseline; gap: 6px; }
#app.game-stage .hualou-topbar .hl-vip small { font-size: 12px; opacity: 0.75; }
#app.game-stage .hualou-topbar .hl-vip b { font-size: 18px; color: #f0c98a; letter-spacing: 1px; }
#app.game-stage .hualou-topbar .hl-pts { font-size: 13px; opacity: 0.92; }
#app.game-stage .hualou-topbar .hl-pts b { color: #f0c98a; }
#app.game-stage .hualou-topbar .hl-tonext { display: block; font-size: 11px; opacity: 0.6; margin-top: 2px; }
#app.game-stage .hualou-topbar .mini-btn { align-self: flex-start; margin-top: 4px; }
#app.game-stage .visit-screen--person .hl-housename {
  /* 2026-07-27 H3：楼名曾被楼主立绘头饰遮住下半（立绘层 z:6 高于原 z:5）→ 提到立绘之上 */
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 8; pointer-events: none;
  font-size: 26px; letter-spacing: 6px; color: #f4e6d4; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  writing-mode: initial; font-family: "STKaiti", "KaiTi", serif;
}
#app.game-stage .hualou-hy .hl-flavor,
#app.game-stage .consort-status .hl-flavor {
  margin: 6px 0 10px; padding: 8px 10px; border-radius: 8px;
  background: rgba(120, 72, 40, 0.18); border-left: 3px solid rgba(206, 160, 120, 0.6);
  font-size: 13px; line-height: 1.7; color: #efe0cc;
}
#app.game-stage .consort-status .hl-row-meta { float: right; opacity: 0.7; font-size: 12px; }
#app.game-stage .consort-status .palace-col-btn.is-disabled { opacity: 0.5; cursor: not-allowed; }
#app.game-stage .hl-tier-list { list-style: none; margin: 8px 0; padding: 0; }
#app.game-stage .hl-tier-list li {
  display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 6px;
  font-size: 13px; color: #e6d6c2;
}
#app.game-stage .hl-tier-list li span { opacity: 0.65; font-size: 12px; }
#app.game-stage .hl-tier-list li.is-cur { background: rgba(206, 160, 120, 0.22); color: #f0c98a; font-weight: 600; }

/* ── 续zt192 新增：面板屏（新侍批/等级图鉴/对饮/选美） + 红颜卡 + 表格 + 花女初绽 ── */
#app.game-stage .hl-panel {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 8;
  width: min(760px, 88%); max-height: 82%; display: flex; flex-direction: column;
  padding: 18px 22px 16px; border-radius: 14px;
  background: linear-gradient(150deg, rgba(40, 22, 24, 0.94), rgba(58, 32, 30, 0.9));
  border: 1px solid rgba(206, 160, 120, 0.5); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55); color: #f4e6d4;
}
#app.game-stage .hl-panel-head { font-size: 20px; letter-spacing: 3px; color: #f0c98a; text-align: center; margin-bottom: 12px; font-family: "STKaiti", "KaiTi", serif; }
#app.game-stage .hl-panel-body { overflow-y: auto; flex: 1; }
#app.game-stage .hl-panel-back { margin: 12px auto 0; }
#app.game-stage .hl-empty { text-align: center; opacity: 0.7; padding: 24px 0; font-size: 14px; }
#app.game-stage .hl-hy-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
#app.game-stage .hl-hy-card {
  width: 128px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.24); border: 1px solid rgba(206, 160, 120, 0.28);
}
#app.game-stage .hl-hy-card.is-locked { opacity: 0.55; filter: grayscale(0.4); }
#app.game-stage .hl-hy-portrait { width: 104px; height: 128px; overflow: hidden; border-radius: 8px; background: rgba(0,0,0,.3); }
#app.game-stage .hl-hy-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
#app.game-stage .hl-hy-name { text-align: center; line-height: 1.4; }
#app.game-stage .hl-hy-name b { display: block; font-size: 15px; color: #f4e6d4; }
#app.game-stage .hl-hy-tier { font-size: 11px; opacity: 0.7; color: #f0c98a; }
#app.game-stage .hl-hy-card .palace-btn { font-size: 12px; padding: 5px 8px; width: 100%; }
#app.game-stage .hl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
#app.game-stage .hl-table th { color: #f0c98a; font-weight: 600; text-align: left; padding: 6px 10px; border-bottom: 1px solid rgba(206, 160, 120, 0.4); }
#app.game-stage .hl-table td { padding: 6px 10px; border-bottom: 1px solid rgba(206, 160, 120, 0.15); color: #e6d6c2; }
#app.game-stage .hl-table td small { opacity: 0.6; margin-left: 4px; }
#app.game-stage .hl-table tr.is-locked td { opacity: 0.45; }
#app.game-stage .hl-table tr.is-sel td { background: rgba(206, 160, 120, 0.18); }
#app.game-stage .hl-table .hl-lock { opacity: 0.6; font-size: 12px; }
#app.game-stage .hl-table .mini-btn { padding: 3px 10px; font-size: 12px; }
#app.game-stage .consort-status.hl-wine { max-width: 540px; }
/* 花女初绽事件屏 */
#app.game-stage .hl-cz-standee { z-index: 4; }
#app.game-stage .hl-cz-msg {
  position: absolute; top: 84px; left: 50%; transform: translateX(-50%); z-index: 9; width: min(560px, 84%);
  text-align: center; padding: 10px 16px; border-radius: 10px; font-size: 14px; line-height: 1.7; color: #f4e6d4;
  background: rgba(40, 22, 24, 0.9); border: 1px solid rgba(206, 160, 120, 0.5);
}
#app.game-stage .hl-cz-choices {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 9; width: min(420px, 84%);
  display: flex; flex-direction: column; gap: 10px; align-items: stretch;
}
#app.game-stage .hl-cz-tip { text-align: center; color: #f0c98a; font-size: 14px; margin: 0 0 4px; }
#app.game-stage .hl-cz-btn { width: 100%; }
#app.game-stage .hl-cz-choices .xiu-rank-list { max-height: 240px; overflow-y: auto; }

/* 2026-07-24：全局宫签选择器 + 人物编辑案牍。
   原生 select 仍在 DOM 内承担旧业务值；这里仅替换浏览器白底下拉的可见层。 */
#app.game-stage .palace-select {
  position: relative;
  display: inline-grid;
  min-width: clamp(82px, 8.4cqw, 118px);
  vertical-align: middle;
  font: inherit;
  isolation: isolate;
}
#app.game-stage .palace-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
#app.game-stage .palace-select-trigger {
  position: relative;
  z-index: 2;
  min-width: 100%;
  min-height: clamp(27px, 3.35cqh, 33px);
  padding: 2px clamp(23px, 2.2cqw, 30px) 2px clamp(8px, .9cqw, 12px);
  overflow: hidden;
  color: #f8e7b5;
  border: 1px solid rgba(198, 159, 89, .76);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(75, 55, 37, .98), rgba(39, 29, 22, .98));
  box-shadow: inset 0 0 0 1px rgba(255, 239, 187, .12), 0 2px 4px rgba(20, 12, 7, .2);
  font: inherit;
  font-family: "Royal Kai", "STKaiti", serif;
  font-size: clamp(11px, 1.1cqw, 14px);
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.15;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
#app.game-stage .palace-select-trigger::after {
  position: absolute;
  top: 50%;
  right: clamp(7px, .75cqw, 10px);
  width: 0;
  height: 0;
  border-top: 6px solid #d9bd79;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
  transform: translateY(-28%);
}
#app.game-stage .palace-select.is-open .palace-select-trigger,
#app.game-stage .palace-select-trigger:hover,
#app.game-stage .palace-select-trigger:focus-visible {
  color: #fff4cf;
  border-color: #efd18f;
  background: linear-gradient(180deg, rgba(107, 76, 43, .99), rgba(53, 37, 24, .99));
  outline: none;
}
#app.game-stage .palace-select-menu {
  position: absolute;
  z-index: 45;
  top: calc(100% + 4px);
  left: 0;
  display: none;
  width: max-content;
  min-width: 100%;
  max-width: min(280px, 32cqw);
  max-height: min(280px, 34cqh);
  padding: 4px;
  overflow-y: auto;
  border: 1px solid rgba(209, 174, 102, .88);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(43, 31, 22, .99), rgba(25, 19, 15, .99));
  box-shadow: 0 13px 24px rgba(10, 7, 5, .48), inset 0 0 0 1px rgba(255, 239, 190, .1);
}
#app.game-stage .palace-select.is-open .palace-select-menu { display: grid; }
#app.game-stage .palace-select-option {
  min-height: clamp(26px, 3.05cqh, 31px);
  padding: 3px clamp(9px, 1cqw, 13px);
  color: #f1dfb1;
  border: 0;
  border-bottom: 1px solid rgba(213, 180, 111, .15);
  background: transparent;
  font: inherit;
  font-family: "Royal Kai", "STKaiti", serif;
  font-size: clamp(11px, 1.08cqw, 14px);
  font-weight: 700;
  letter-spacing: .08em;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
#app.game-stage .palace-select-option:last-child { border-bottom: 0; }
#app.game-stage .palace-select-option:hover,
#app.game-stage .palace-select-option:focus-visible,
#app.game-stage .palace-select-option.is-selected { color: #fff5d5; background: linear-gradient(90deg, rgba(124, 79, 43, .85), rgba(83, 55, 31, .6)); outline: none; }
#app.game-stage .palace-select-option.is-selected::before { margin-right: 6px; color: #d8b96e; content: "◆"; }

/* 主控更名、赐名、改家世、改性格统一为居中小案牍，主操作永远收在底部。 */
#app.game-stage .persona-edit-modal .persona-edit-panel {
  width: min(650px, 68cqw);
  max-height: min(560px, 67cqh);
  border-color: rgba(210, 172, 94, .76);
  border-radius: 5px;
  background: linear-gradient(145deg, rgba(43, 31, 22, .985), rgba(24, 18, 14, .99));
  box-shadow: 0 24px 55px rgba(0, 0, 0, .62), inset 0 0 0 1px rgba(255, 239, 187, .09);
}
#app.game-stage .persona-edit-panel .portrait-picker-head {
  min-height: clamp(45px, 5.9cqh, 58px);
  padding: 0 clamp(18px, 2.1cqw, 28px);
  align-items: center;
  border-bottom-color: rgba(214, 175, 97, .38);
}
#app.game-stage .persona-edit-panel .portrait-picker-head b { font-size: clamp(20px, 2.25cqw, 28px); }
#app.game-stage .persona-edit-panel .portrait-picker-head span { color: #d8c093; font-size: clamp(13px, 1.25cqw, 16px); }
#app.game-stage .persona-edit-form {
  display: grid;
  gap: clamp(14px, 1.7cqh, 19px);
  padding: clamp(22px, 3.1cqh, 31px) clamp(34px, 4cqw, 54px);
}
#app.game-stage .persona-edit-form .cc-field {
  grid-template-columns: clamp(48px, 5cqw, 64px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(10px, 1.25cqw, 17px);
}
#app.game-stage .persona-edit-form .cc-field > span:first-child {
  color: #ead5a1;
  font-family: "Royal Kai", "STKaiti", serif;
  font-size: clamp(16px, 1.7cqw, 21px);
  font-weight: 700;
  letter-spacing: .14em;
  text-align: justify;
  text-align-last: justify;
}
#app.game-stage .persona-edit-form input {
  min-height: clamp(32px, 4.15cqh, 40px);
  padding: 3px 12px;
  color: #f9edca;
  border: 1px solid rgba(202, 163, 88, .7);
  border-radius: 3px;
  background: rgba(14, 12, 11, .66);
  box-shadow: inset 0 1px 5px rgba(0, 0, 0, .35);
  font-family: "Royal Kai", "STKaiti", serif;
  font-size: clamp(17px, 1.7cqw, 22px);
  text-align: center;
}
#app.game-stage .persona-edit-form input::placeholder { color: rgba(242, 222, 174, .42); }
#app.game-stage .persona-edit-panel .portrait-actions {
  justify-content: center;
  margin: 0;
  padding: 0 clamp(30px, 3.5cqw, 48px) clamp(22px, 2.7cqh, 28px);
}
#app.game-stage .persona-edit-panel .portrait-actions .palace-btn { min-width: clamp(120px, 12cqw, 156px); min-height: clamp(34px, 4.3cqh, 42px); font-size: clamp(16px, 1.6cqw, 20px); }
#app.game-stage .persona-origin-list { display: grid; gap: 8px; }
#app.game-stage .persona-origin-row { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr); align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid rgba(204, 164, 86, .28); background: rgba(92, 61, 34, .2); }
#app.game-stage .persona-origin-name { color: #f0ddae; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(15px, 1.45cqw, 18px); font-weight: 700; }
#app.game-stage .persona-origin-name small { display: block; margin-top: 3px; color: rgba(236, 214, 166, .65); font-size: clamp(10px, .95cqw, 12px); font-weight: 400; }
#app.game-stage .persona-origin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
#app.game-stage .persona-origin-actions .palace-btn { min-width: auto; padding-inline: 11px; font-size: clamp(12px, 1.1cqw, 14px); }
#app.game-stage .persona-origin-commoner { display: flex; justify-content: center; padding-top: 4px; }
#app.game-stage .persona-origin-commoner .palace-btn { min-width: clamp(150px, 15cqw, 188px); }
#app.game-stage .persona-edit-empty { margin: 4px 0 8px; color: #cbb27f; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(15px, 1.5cqw, 18px); text-align: center; }

/* 主控改名是场景页，不走人物详情的 fixed 蒙层；单独把案牍锁在舞台正中。 */
#app.game-stage .home-panel.rename-emperor-screen .court-head {
  top: clamp(158px, 20.5cqh, 192px);
  left: 50%;
  z-index: 8;
  min-width: clamp(170px, 17cqw, 224px);
  padding: clamp(8px, 1.1cqh, 11px) clamp(28px, 3cqw, 38px);
  transform: translateX(-50%);
  border: 1px solid rgba(207, 169, 94, .76);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 249, 229, .98), rgba(227, 213, 176, .96));
  box-shadow: 0 8px 18px rgba(34, 20, 10, .28), inset 0 0 0 1px rgba(255, 255, 245, .55);
}
#app.game-stage .home-panel.rename-emperor-screen .court-head span { color: #4d3523; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(19px, 1.85cqw, 23px); font-weight: 700; letter-spacing: .26em; }
#app.game-stage .home-panel.rename-emperor-screen .home-panel-body {
  top: 50%;
  left: 50%;
  width: min(620px, 58cqw);
  max-height: none;
  padding: clamp(27px, 3.5cqh, 35px) clamp(38px, 4.4cqw, 58px) clamp(24px, 3cqh, 30px);
  transform: translate(-50%, -34%);
  color: #f5e4b7;
  border: 1px solid rgba(205, 165, 89, .74);
  border-radius: 5px;
  background: linear-gradient(145deg, rgba(46, 32, 22, .985), rgba(24, 18, 14, .99));
  box-shadow: 0 22px 48px rgba(0, 0, 0, .54), inset 0 0 0 1px rgba(255, 239, 187, .08);
}
#app.game-stage .rename-emperor-form { display: grid; gap: clamp(16px, 2cqh, 21px); }
#app.game-stage .rename-emperor-form .cc-field { display: grid; grid-template-columns: clamp(48px, 5cqw, 64px) minmax(0, 1fr); align-items: center; gap: clamp(11px, 1.4cqw, 18px); }
#app.game-stage .rename-emperor-form .cc-field > span { color: #ead5a1; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(17px, 1.75cqw, 22px); font-weight: 700; letter-spacing: .18em; text-align: justify; text-align-last: justify; }
#app.game-stage .rename-emperor-form input { min-height: clamp(34px, 4.25cqh, 41px); padding: 3px 12px; color: #f8e9c3; border: 1px solid rgba(202, 163, 88, .7); border-radius: 3px; background: rgba(12, 10, 9, .68); box-shadow: inset 0 1px 5px rgba(0,0,0,.35); font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(18px, 1.8cqw, 23px); text-align: center; }
#app.game-stage .rename-emperor-actions { display: grid; grid-template-columns: 1fr; justify-items: center; margin: clamp(23px, 3cqh, 30px) 0 0; }
#app.game-stage .rename-emperor-actions .palace-btn { min-width: clamp(138px, 14cqw, 178px); min-height: clamp(35px, 4.35cqh, 43px); font-size: clamp(17px, 1.65cqw, 21px); }
#app.game-stage .rename-emperor-screen .ledger-screen-footer { display: flex; justify-content: center; margin-top: 9px; }
#app.game-stage .rename-emperor-screen .ledger-screen-footer .court-leave { min-width: clamp(118px, 12cqw, 152px); min-height: clamp(31px, 3.9cqh, 39px); }

/* 立绘更换：预览、资料、翻套和确认收为同一张画轴，不再留下大片空黑。 */
#app.game-stage .portrait-picker-panel--art { width: min(890px, 82cqw); max-height: min(670px, 82cqh); border-color: rgba(210, 172, 94, .76); border-radius: 5px; background: linear-gradient(145deg, rgba(42, 30, 21, .99), rgba(23, 17, 13, .99)); }
#app.game-stage .portrait-picker-panel--art .portrait-picker-body { grid-template-columns: clamp(155px, 17cqw, 205px) minmax(0, 1fr); min-height: clamp(420px, 58cqh, 520px); max-height: min(610px, 74cqh); }
#app.game-stage .portrait-picker-panel--art .portrait-lib-list { padding: 12px; gap: 6px; border-right-color: rgba(209, 171, 93, .25); background: rgba(12, 10, 8, .3); }
#app.game-stage .portrait-picker-panel--art .portrait-lib-btn { padding: 8px 9px; border-radius: 3px; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(12px, 1.15cqw, 14px); }
#app.game-stage .portrait-picker-panel--art .portrait-pick-main { grid-template-columns: minmax(245px, .9fr) minmax(220px, .8fr); gap: clamp(16px, 1.9cqw, 24px); height: 100%; padding: clamp(17px, 2.2cqh, 23px); align-items: stretch; }
#app.game-stage .portrait-picker-panel--art .portrait-preview { height: auto; min-height: 0; border-color: rgba(214, 176, 99, .45); border-radius: 3px; background: radial-gradient(ellipse at 50% 24%, rgba(128, 90, 52, .48), rgba(37, 26, 19, .96)); }
#app.game-stage .portrait-picker-panel--art .portrait-preview img { object-position: center bottom; }
#app.game-stage .portrait-picker-panel--art .portrait-side { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
#app.game-stage .portrait-picker-panel--art .portrait-meta { gap: 9px; padding: 13px; border-top: 1px solid rgba(214, 176, 99, .35); border-bottom: 1px solid rgba(214, 176, 99, .35); color: #e4d1a5; font-size: clamp(13px, 1.2cqw, 15px); line-height: 1.55; }
#app.game-stage .portrait-picker-panel--art .portrait-meta b { color: #f6d991; }
#app.game-stage .portrait-picker-panel--art .portrait-controls { display: grid; grid-template-columns: 1fr minmax(90px, .75fr) 1fr; gap: 7px; margin-top: 16px; }
#app.game-stage .portrait-picker-panel--art .portrait-controls label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px; align-items: center; color: #e9d3a0; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(12px, 1.08cqw, 14px); white-space: nowrap; }
#app.game-stage .portrait-picker-panel--art .portrait-suit-input { min-width: 0; height: clamp(30px, 3.8cqh, 36px); color: #f8e8bd; border-color: rgba(204, 165, 88, .7); background: rgba(12, 10, 9, .72); font: inherit; text-align: center; }
#app.game-stage .portrait-picker-panel--art .portrait-actions { justify-content: stretch; display: grid; grid-template-columns: 1.25fr .75fr; gap: 8px; margin-top: 14px; }
#app.game-stage .portrait-picker-panel--art .portrait-actions .palace-btn { min-width: 0; }

/* 家族名册：入选秀改为小姐姓名栏内的朱印命令，不再额外长出黑色卡脚。 */
#app.game-stage .member-card-enlist { display: flex; justify-content: center; padding: 0 5px 8px; border: 0; background: transparent; }
#app.game-stage .member-card-enlist .mini-btn { min-width: 82px; padding: 4px 10px; color: #fff0c6; border: 1px solid rgba(186, 139, 68, .85); border-radius: 2px; background: linear-gradient(180deg, #833e2b, #56231c); box-shadow: inset 0 0 0 1px rgba(255, 221, 157, .16), 0 2px 3px rgba(39, 14, 9, .25); font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(11px, 1.05cqw, 13px); letter-spacing: .12em; }
#app.game-stage .member-card-enlist .mini-btn:hover { filter: brightness(1.15); transform: translateY(-1px); }

/* 双节庆的功能页不共享一张大框：万寿是青瓷礼簿，岁除是暖金仪程；剧情继续由通用对白承担。 */
#app.game-stage .festival-decision-sheet {
  position: absolute; z-index: 3; top: clamp(155px, 20.5cqh, 188px); right: 50%; width: min(760px, 62cqw); min-height: clamp(228px, 31cqh, 268px); transform: translateX(50%);
  display: grid; grid-template-rows: auto minmax(0, 1fr); padding: clamp(14px, 1.8cqh, 18px) clamp(18px, 2.25cqw, 28px); border: 1px solid rgba(115, 147, 125, .66); background: linear-gradient(180deg, rgba(250, 251, 235, .95), rgba(216, 233, 215, .9)); box-shadow: 0 18px 42px rgba(25, 47, 34, .26), inset 0 0 0 1px rgba(255, 255, 247, .72); color: #304a40;
}
#app.game-stage .festival-decision-sheet--chuxi { border-color: rgba(185, 145, 76, .7); background: linear-gradient(180deg, rgba(255, 249, 228, .94), rgba(236, 221, 183, .87)); color: #5a4225; }
#app.game-stage .festival-decision-sheet::before,
#app.game-stage .festival-decision-sheet::after { content: ""; position: absolute; width: 10px; aspect-ratio: 1; border: 1px solid rgba(168, 129, 66, .74); background: rgba(251, 246, 214, .85); transform: rotate(45deg); }
#app.game-stage .festival-decision-sheet::before { top: -6px; left: -6px; }
#app.game-stage .festival-decision-sheet::after { right: -6px; bottom: -6px; }
#app.game-stage .festival-decision-sheet__head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; min-height: clamp(42px, 5.5cqh, 50px); padding: 0 8px clamp(8px, 1cqh, 10px); border-bottom: 1px solid rgba(91, 126, 105, .38); }
#app.game-stage .festival-decision-sheet--chuxi .festival-decision-sheet__head { border-bottom-color: rgba(157, 118, 61, .4); }
#app.game-stage .festival-decision-sheet__head span,
#app.game-stage .festival-decision-sheet__head b { color: #677d70; font-size: clamp(11px, 1.08cqw, 13px); letter-spacing: .14em; }
#app.game-stage .festival-decision-sheet--chuxi .festival-decision-sheet__head span,
#app.game-stage .festival-decision-sheet--chuxi .festival-decision-sheet__head b { color: #8b714d; }
#app.game-stage .festival-decision-sheet__head b { justify-self: end; }
#app.game-stage .festival-decision-sheet__head h1 { margin: 0; color: #315348; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(25px, 3.1cqh, 31px); letter-spacing: .24em; text-indent: .24em; }
#app.game-stage .festival-decision-sheet--chuxi .festival-decision-sheet__head h1 { color: #6b4e2d; }
#app.game-stage .festival-decision-sheet__body { min-height: 0; display: grid; grid-template-columns: clamp(82px, 9.5cqw, 112px) minmax(0, 1fr); gap: clamp(18px, 2.25cqw, 28px); align-items: center; padding: clamp(13px, 1.75cqh, 17px) clamp(5px, .65cqw, 8px) 0; }
#app.game-stage .festival-decision-sheet__mark { align-self: stretch; display: grid; place-items: center; align-content: center; gap: 3px; border-right: 1px solid rgba(91, 126, 105, .3); color: #496b5d; }
#app.game-stage .festival-decision-sheet--chuxi .festival-decision-sheet__mark { border-color: rgba(157, 118, 61, .3); color: #8d6837; }
#app.game-stage .festival-decision-sheet__mark span { font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(34px, 4.7cqh, 43px); line-height: 1; }
#app.game-stage .festival-decision-sheet__mark i { font-size: clamp(12px, 1.2cqw, 14px); font-style: normal; letter-spacing: .28em; text-indent: .28em; }
#app.game-stage .festival-decision-sheet .festival-decision-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(11px, 1.4cqw, 16px); }
#app.game-stage .festival-decision-sheet .festival-decision { position: relative; min-height: clamp(102px, 14cqh, 120px); display: grid; place-content: center; gap: 8px; padding: 10px; overflow: hidden; border: 1px solid rgba(91, 126, 105, .54); border-radius: 0; background: linear-gradient(180deg, rgba(245, 249, 231, .98), rgba(193, 219, 200, .93)); color: #345448; box-shadow: inset 0 0 0 1px rgba(255,255,247,.64); }
#app.game-stage .festival-decision-sheet--chuxi .festival-decision { border-color: rgba(168, 128, 69, .52); background: linear-gradient(180deg, rgba(255, 248, 221, .97), rgba(233, 207, 148, .9)); color: #684824; }
#app.game-stage .festival-decision-sheet .festival-decision--hold { border-color: rgba(146, 105, 48, .78); background: linear-gradient(180deg, rgba(255, 248, 214, .99), rgba(220, 190, 121, .95)); }
#app.game-stage .festival-decision-sheet .festival-decision::after { content: ""; position: absolute; right: 8px; bottom: 8px; width: 8px; aspect-ratio: 1; border: 1px solid rgba(160, 116, 53, .65); transform: rotate(45deg); }
#app.game-stage .festival-decision-sheet .festival-decision strong { font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(19px, 2.45cqh, 24px); letter-spacing: .16em; }
#app.game-stage .festival-decision-sheet .festival-decision small { color: inherit; opacity: .78; font-size: clamp(10px, 1.02cqw, 12px); letter-spacing: .1em; }
#app.game-stage .festival-decision-sheet .festival-decision:hover:not(:disabled) { filter: none; transform: translateY(-1px); border-color: rgba(132, 86, 36, .9); background: linear-gradient(180deg, #fff9d8, #dfbd77); }

#app.game-stage .wanshou-invite-screen,
#app.game-stage .wanshou-honor-screen { position: absolute; z-index: 3; top: clamp(73px, 9.9cqh, 93px); right: 50%; bottom: clamp(31px, 4.3cqh, 45px); width: min(1110px, 86cqw); transform: translateX(50%); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: clamp(7px, .95cqh, 10px); padding: clamp(12px, 1.55cqh, 16px) clamp(15px, 1.9cqw, 23px); overflow: hidden; border: 1px solid rgba(102, 143, 121, .62); background: linear-gradient(180deg, rgba(249, 251, 234, .93), rgba(217, 235, 215, .87)); box-shadow: 0 17px 38px rgba(25, 48, 35, .24), inset 0 0 0 1px rgba(255,255,245,.75); color: #314d42; }
#app.game-stage .wanshou-honor-screen { border-color: rgba(171, 132, 67, .65); background: linear-gradient(180deg, rgba(255, 251, 230, .94), rgba(224, 237, 214, .89)); }
#app.game-stage .wanshou-invite-screen::before,
#app.game-stage .wanshou-honor-screen::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(93, 132, 112, .16); pointer-events: none; }
#app.game-stage .wanshou-honor-screen::before { border-color: rgba(167, 126, 62, .18); }
#app.game-stage .wanshou-invite-screen .festival-function__head,
#app.game-stage .wanshou-honor-screen .festival-function__head { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; min-height: clamp(39px, 5.15cqh, 47px); padding: 0 10px 7px; border-bottom: 1px solid rgba(90, 128, 107, .36); }
#app.game-stage .wanshou-honor-screen .festival-function__head { border-bottom-color: rgba(165, 126, 66, .38); }
#app.game-stage .wanshou-invite-screen .festival-function__head span,
#app.game-stage .wanshou-invite-screen .festival-function__head b,
#app.game-stage .wanshou-honor-screen .festival-function__head span,
#app.game-stage .wanshou-honor-screen .festival-function__head b { color: #667d70; font-size: clamp(11px, 1.08cqw, 13px); letter-spacing: .13em; }
#app.game-stage .wanshou-honor-screen .festival-function__head span,
#app.game-stage .wanshou-honor-screen .festival-function__head b { color: #85724e; }
#app.game-stage .wanshou-invite-screen .festival-function__head b,
#app.game-stage .wanshou-honor-screen .festival-function__head b { justify-self: end; }
#app.game-stage .wanshou-invite-screen .festival-function__head h1,
#app.game-stage .wanshou-honor-screen .festival-function__head h1 { margin: 0; color: #315447; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(24px, 3cqh, 30px); letter-spacing: .22em; text-indent: .22em; }
#app.game-stage .wanshou-honor-screen .festival-function__head h1 { color: #6e542f; }
#app.game-stage .wanshou-invite-meta,
#app.game-stage .wanshou-honor-meta { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: clamp(24px, 3.1cqh, 29px); padding: 0 11px; border-top: 1px solid rgba(101, 137, 116, .22); border-bottom: 1px solid rgba(101, 137, 116, .22); color: #668071; font-size: clamp(10px, 1.02cqw, 12px); letter-spacing: .12em; }
#app.game-stage .wanshou-honor-meta { border-color: rgba(167, 126, 62, .22); color: #88724b; }
#app.game-stage .wanshou-invite-meta b,
#app.game-stage .wanshou-honor-meta b { color: #395b4d; font-size: clamp(12px, 1.18cqw, 14px); letter-spacing: .08em; }
#app.game-stage .wanshou-honor-meta b { color: #73562f; }
#app.game-stage .wanshou-invite-meta i,
#app.game-stage .wanshou-honor-meta i { justify-self: end; font-style: normal; }
#app.game-stage .wanshou-invite-register,
#app.game-stage .wanshou-honor-register { position: relative; z-index: 1; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); border-top: 1px solid rgba(79, 119, 98, .52); border-bottom: 1px solid rgba(79, 119, 98, .35); background: rgba(255,255,247,.47); }
#app.game-stage .wanshou-honor-register { border-color: rgba(161, 123, 65, .48); }
#app.game-stage .wanshou-invite-register__head,
#app.game-stage .wanshou-invite-row { display: grid; grid-template-columns: minmax(110px, 1.16fr) minmax(135px, 1.25fr) minmax(96px, .92fr) minmax(72px, .62fr) minmax(80px, .72fr); align-items: center; column-gap: clamp(7px, .9cqw, 11px); padding: 0 clamp(11px, 1.35cqw, 16px); }
#app.game-stage .wanshou-invite-register__head { min-height: clamp(29px, 3.8cqh, 35px); background: linear-gradient(90deg, rgba(105, 144, 122, .78), rgba(75, 113, 95, .83)); color: #fff9e7; font-size: clamp(10px, 1.03cqw, 12px); font-weight: 800; letter-spacing: .14em; }
#app.game-stage .wanshou-invite-register__head span:last-child { text-align: center; }
#app.game-stage .wanshou-invite-list,
#app.game-stage .wanshou-honor-list { min-height: 0; display: grid; grid-template-rows: repeat(8, minmax(0, 1fr)); }
#app.game-stage .wanshou-invite-row { min-height: 0; border: 0; border-bottom: 1px solid rgba(99, 126, 100, .17); border-radius: 0; background: rgba(255,254,246,.7); color: #466256; text-align: left; }
#app.game-stage .wanshou-invite-row:nth-child(even) { background: rgba(231, 242, 222, .54); }
#app.game-stage .wanshou-invite-row strong { overflow: hidden; color: #315347; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(14px, 1.45cqw, 17px); letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .wanshou-invite-row span,
#app.game-stage .wanshou-invite-row small { overflow: hidden; color: inherit; font-size: clamp(11px, 1.08cqw, 13px); text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .wanshou-invite-row i { justify-self: stretch; padding: 4px 6px; border: 1px solid rgba(81, 119, 102, .52); background: linear-gradient(180deg, #eef4df, #bed7c0); color: #345548; font-size: clamp(10px, .98cqw, 12px); font-style: normal; font-weight: 800; letter-spacing: .1em; text-align: center; }
#app.game-stage .wanshou-invite-row:hover:not(:disabled) { filter: none; transform: none; background: rgba(255,252,226,.94); box-shadow: inset 3px 0 0 #b88b48; }
#app.game-stage .wanshou-invite-row.is-selected { background: linear-gradient(90deg, rgba(238,223,176,.84), rgba(229,241,217,.82)); box-shadow: inset 4px 0 0 #a8793e; }
#app.game-stage .wanshou-invite-row.is-selected i { border-color: rgba(151,101,44,.72); background: linear-gradient(180deg, #f6dfa3, #d3a65e); color: #55341d; }
#app.game-stage .wanshou-invite-row:disabled { opacity: .55; }
#app.game-stage .wanshou-honor-register__head,
#app.game-stage .wanshou-honor-row { display: grid; grid-template-columns: minmax(62px, .54fr) minmax(155px, 1.3fr) minmax(150px, 1.2fr) minmax(76px, .64fr); align-items: center; column-gap: clamp(8px, 1cqw, 13px); padding: 0 clamp(12px, 1.5cqw, 18px); }
#app.game-stage .wanshou-honor-register__head { min-height: clamp(30px, 3.85cqh, 35px); background: linear-gradient(90deg, rgba(177, 145, 81, .76), rgba(139, 105, 55, .82)); color: #fff8e6; font-size: clamp(10px, 1.02cqw, 12px); font-weight: 800; letter-spacing: .14em; }
#app.game-stage .wanshou-honor-register__head span:last-child { text-align: center; }
#app.game-stage .wanshou-honor-row { min-height: 0; border: 0; border-bottom: 1px solid rgba(132, 111, 69, .18); border-radius: 0; background: rgba(255,254,244,.72); color: #786345; text-align: left; }
#app.game-stage .wanshou-honor-row:nth-child(even) { background: rgba(242,238,214,.65); }
#app.game-stage .wanshou-honor-row strong { color: #5a4328; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(15px, 1.55cqw, 18px); letter-spacing: .1em; }
#app.game-stage .wanshou-honor-row small { color: #806842; font-size: clamp(11px, 1.08cqw, 13px); }
#app.game-stage .wanshou-honor-row i { justify-self: stretch; padding: 4px 6px; border: 1px solid rgba(156, 106, 47, .66); background: linear-gradient(180deg, #f9e9ba, #d8b36b); color: #52331d; font-size: clamp(10px, .98cqw, 12px); font-style: normal; font-weight: 800; letter-spacing: .1em; text-align: center; }
#app.game-stage .wanshou-honor-row:hover { filter: none; transform: none; background: #fff7d8; box-shadow: inset 3px 0 0 #a9793c; }
#app.game-stage .wanshou-invite-screen .festival-pager,
#app.game-stage .wanshou-invite-screen .festival-ledger__footer,
#app.game-stage .wanshou-honor-screen .festival-ledger__footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: clamp(28px, 3.7cqh, 34px); color: #64796c; font-size: clamp(11px, 1.06cqw, 13px); }
#app.game-stage .wanshou-invite-screen .palace-btn,
#app.game-stage .wanshou-honor-screen .palace-btn { min-width: clamp(112px, 11.5cqw, 146px); min-height: clamp(28px, 3.65cqh, 34px); padding: 2px 10px; border: 1px solid rgba(83, 119, 102, .61); border-radius: 0; background: linear-gradient(180deg, #eef4df, #bdd6bf); color: #355448; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(11px, 1.08cqw, 13px); font-weight: 800; letter-spacing: .1em; text-shadow: none; }
#app.game-stage .wanshou-honor-screen .palace-btn { border-color: rgba(155, 106, 49, .7); background: linear-gradient(180deg, #f7e8bb, #d7b36d); color: #53341d; }
#app.game-stage .wanshou-invite-screen .palace-btn:hover:not(:disabled),
#app.game-stage .wanshou-honor-screen .palace-btn:hover:not(:disabled) { filter: none; transform: translateY(-1px); border-color: rgba(140, 92, 40, .84); background: linear-gradient(180deg, #fff5ce, #d9b66e); color: #54331b; }

/* 除夕·朝臣宴：剧情先进入既有对白，操作页只保留固定六席的岁除褒赏簿。 */
#app.game-stage .chuxi-commend-screen {
  --commend-ink: #29463d;
  --commend-muted: #63796d;
  position: absolute;
  z-index: 3;
  top: clamp(76px, 10.4cqh, 96px);
  right: 50%;
  bottom: clamp(30px, 4.2cqh, 43px);
  width: min(1130px, 86cqw);
  transform: translateX(50%);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: clamp(8px, 1.05cqh, 11px);
  padding: clamp(12px, 1.6cqh, 17px) clamp(14px, 1.85cqw, 22px) clamp(11px, 1.45cqh, 15px);
  color: var(--commend-ink);
  border: 1px solid rgba(184, 157, 95, .72);
  background:
    linear-gradient(90deg, transparent 0 2.5%, rgba(100, 142, 122, .2) 2.5% calc(2.5% + 1px), transparent calc(2.5% + 1px) 97.5%, rgba(100, 142, 122, .2) 97.5% calc(97.5% + 1px), transparent calc(97.5% + 1px)),
    linear-gradient(180deg, rgba(253, 251, 232, .94), rgba(223, 235, 216, .88));
  box-shadow: 0 16px 34px rgba(24, 35, 26, .25), inset 0 0 0 1px rgba(255, 255, 247, .76);
}
#app.game-stage .chuxi-commend-screen::before,
#app.game-stage .chuxi-commend-screen::after { content: ""; position: absolute; top: 5px; bottom: 5px; width: 3px; background: linear-gradient(180deg, transparent, rgba(180, 142, 75, .58) 12% 88%, transparent); }
#app.game-stage .chuxi-commend-screen::before { left: 6px; }
#app.game-stage .chuxi-commend-screen::after { right: 6px; }
#app.game-stage .chuxi-commend-screen .festival-function__head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; min-height: clamp(38px, 5.1cqh, 46px); padding: 0 clamp(8px, 1cqw, 12px) clamp(6px, .8cqh, 8px); border-bottom: 1px solid rgba(103, 139, 119, .38); }
#app.game-stage .chuxi-commend-screen .festival-function__head span,
#app.game-stage .chuxi-commend-screen .festival-function__head b { color: var(--commend-muted); font-size: clamp(11px, 1.12cqw, 13px); letter-spacing: .14em; }
#app.game-stage .chuxi-commend-screen .festival-function__head b { justify-self: end; }
#app.game-stage .chuxi-commend-screen .festival-function__head h1 { margin: 0; color: var(--commend-ink); font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(25px, 3.15cqh, 31px); font-weight: 700; letter-spacing: .24em; text-indent: .24em; }
#app.game-stage .chuxi-commend-books { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(13px, 1.8cqw, 22px); }
#app.game-stage .chuxi-commend-book { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); border: 1px solid rgba(97, 132, 111, .52); background: rgba(255, 254, 244, .62); box-shadow: inset 0 0 0 1px rgba(255, 255, 247, .58); }
#app.game-stage .chuxi-commend-book > header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: clamp(42px, 5.6cqh, 48px); padding: 0 clamp(10px, 1.25cqw, 14px); border-bottom: 1px solid rgba(108, 144, 122, .34); background: linear-gradient(90deg, rgba(217, 230, 211, .85), rgba(244, 242, 219, .8)); }
#app.game-stage .chuxi-commend-book > header span,
#app.game-stage .chuxi-commend-book > header i { color: var(--commend-muted); font-size: clamp(10px, 1.04cqw, 12px); font-style: normal; letter-spacing: .13em; }
#app.game-stage .chuxi-commend-book > header i { justify-self: end; color: #8c6c37; }
#app.game-stage .chuxi-commend-book > header h2 { margin: 0; color: #355247; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(18px, 2.35cqh, 23px); letter-spacing: .16em; }
#app.game-stage .chuxi-commend-book--loyal { border-color: rgba(171, 139, 77, .6); }
#app.game-stage .chuxi-commend-book--loyal > header { background: linear-gradient(90deg, rgba(238, 226, 189, .82), rgba(244, 242, 219, .8)); }
#app.game-stage .chuxi-commend-table__head,
#app.game-stage .chuxi-commend-row { display: grid; grid-template-columns: minmax(84px, 1.12fr) minmax(92px, 1.1fr) minmax(62px, .72fr) minmax(52px, .54fr) minmax(64px, .68fr); align-items: center; column-gap: clamp(5px, .75cqw, 9px); padding: 0 clamp(9px, 1.1cqw, 12px); }
#app.game-stage .chuxi-commend-table__head { min-height: clamp(25px, 3.25cqh, 29px); background: rgba(89, 126, 107, .76); color: #fff9e8; font-size: clamp(9px, .96cqw, 11px); font-weight: 800; letter-spacing: .11em; }
#app.game-stage .chuxi-commend-book--loyal .chuxi-commend-table__head { background: rgba(151, 123, 71, .75); }
#app.game-stage .chuxi-commend-table__head span:last-child { text-align: center; }
#app.game-stage .chuxi-commend-list { min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); }
#app.game-stage .chuxi-commend-row { min-height: 0; border-bottom: 1px solid rgba(101, 125, 99, .16); color: #5d7367; font-size: clamp(10px, 1.03cqw, 12px); }
#app.game-stage .chuxi-commend-row:nth-child(even) { background: rgba(232, 241, 224, .52); }
#app.game-stage .chuxi-commend-row b { overflow: hidden; color: #2d493d; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(14px, 1.42cqw, 17px); letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .chuxi-commend-row strong { color: #8b6936; font-size: clamp(11px, 1.05cqw, 13px); font-variant-numeric: tabular-nums; }
#app.game-stage .chuxi-commend-row .palace-btn { min-width: 0; min-height: clamp(25px, 3.35cqh, 30px); padding: 1px 5px; border: 1px solid rgba(151, 102, 45, .68); border-radius: 0; background: linear-gradient(180deg, #f7ebc4, #d7b36c); color: #51351d; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(10px, 1cqw, 12px); font-weight: 800; letter-spacing: .1em; text-shadow: none; box-shadow: inset 0 0 0 1px rgba(255, 253, 229, .5); }
#app.game-stage .chuxi-commend-row .palace-btn:hover:not(:disabled) { border-color: rgba(115, 76, 35, .82); background: linear-gradient(180deg, #fff4cb, #d8ab5e); transform: translateY(-1px); }
#app.game-stage .chuxi-commend-row em { justify-self: center; color: #80775b; font-size: clamp(10px, 1cqw, 12px); font-style: normal; letter-spacing: .1em; }
#app.game-stage .chuxi-commend-row.is-awarded { background: linear-gradient(90deg, rgba(239, 226, 183, .62), rgba(235, 243, 222, .55)); }
#app.game-stage .chuxi-commend-incident { display: grid; gap: 6px; padding: clamp(7px, .9cqh, 9px) clamp(11px, 1.45cqw, 16px); border: 1px solid rgba(174, 136, 73, .5); background: rgba(255, 248, 224, .78); color: #495a4d; }
#app.game-stage .chuxi-commend-incident .chuxi-gn-choice { display: grid; gap: 6px; }
#app.game-stage .chuxi-commend-incident .chuxi-gn-choice > p { margin: 0; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(12px, 1.2cqw, 14px); line-height: 1.45; }
#app.game-stage .chuxi-commend-incident .chuxi-gn-acts { display: flex; justify-content: center; gap: 9px; }
#app.game-stage .chuxi-commend-incident .palace-btn,
#app.game-stage .chuxi-commend-screen .festival-ledger__footer .palace-btn { min-width: clamp(134px, 13cqw, 162px); min-height: clamp(29px, 3.75cqh, 34px); border: 1px solid rgba(86, 123, 105, .63); border-radius: 0; background: linear-gradient(180deg, #edf3df, #b9d2ba); color: #355348; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(11px, 1.08cqw, 13px); font-weight: 800; letter-spacing: .12em; text-shadow: none; }
#app.game-stage .chuxi-commend-screen .festival-ledger__footer { display: flex; justify-content: center; min-height: clamp(32px, 4.15cqh, 38px); }
#app.game-stage .chuxi-commend-screen .festival-ledger__footer .palace-btn--primary { border-color: rgba(145, 96, 43, .78); background: linear-gradient(180deg, #f5e8bd, #d5af69); color: #51331c; }
#app.game-stage .chuxi-commend-result { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; min-height: 16px; color: #6b7663; font-size: clamp(10px, .98cqw, 12px); letter-spacing: .08em; }
#app.game-stage .chuxi-commend-result span::before { content: "◇ "; color: #ae8749; }

/* 除夕·内廷褒仪：暖金簿册，不与进场叙事同框。 */
#app.game-stage .chuxi-harem-honor-screen,
#app.game-stage .chuxi-shousui-screen { position: absolute; z-index: 3; top: clamp(76px, 10.4cqh, 96px); right: 50%; bottom: clamp(30px, 4.2cqh, 43px); width: min(970px, 78cqw); transform: translateX(50%); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: clamp(7px, .95cqh, 10px); padding: clamp(12px, 1.6cqh, 16px) clamp(15px, 1.9cqw, 22px); overflow: hidden; color: #63482b; border: 1px solid rgba(180, 134, 68, .72); background: linear-gradient(180deg, rgba(255, 248, 226, .94), rgba(241, 223, 187, .87)); box-shadow: 0 17px 38px rgba(52, 31, 16, .28), inset 0 0 0 1px rgba(255, 253, 235, .78); }
#app.game-stage .chuxi-harem-honor-screen::before,
#app.game-stage .chuxi-shousui-screen::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(163, 111, 54, .2); pointer-events: none; }
#app.game-stage .chuxi-harem-honor-screen .festival-function__head,
#app.game-stage .chuxi-shousui-screen .festival-function__head { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; min-height: clamp(39px, 5.1cqh, 46px); padding: 0 10px 7px; border-bottom: 1px solid rgba(158, 115, 59, .36); }
#app.game-stage .chuxi-harem-honor-screen .festival-function__head span,
#app.game-stage .chuxi-harem-honor-screen .festival-function__head b,
#app.game-stage .chuxi-shousui-screen .festival-function__head span,
#app.game-stage .chuxi-shousui-screen .festival-function__head b { color: #8e7049; font-size: clamp(11px, 1.08cqw, 13px); letter-spacing: .13em; }
#app.game-stage .chuxi-harem-honor-screen .festival-function__head b,
#app.game-stage .chuxi-shousui-screen .festival-function__head b { justify-self: end; }
#app.game-stage .chuxi-harem-honor-screen .festival-function__head h1,
#app.game-stage .chuxi-shousui-screen .festival-function__head h1 { margin: 0; color: #744a2f; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(25px, 3.1cqh, 31px); letter-spacing: .23em; text-indent: .23em; }
#app.game-stage .chuxi-harem-meta,
#app.game-stage .chuxi-shousui-meta { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: clamp(24px, 3.1cqh, 29px); padding: 0 11px; border-top: 1px solid rgba(169, 119, 57, .2); border-bottom: 1px solid rgba(169, 119, 57, .22); color: #96744b; font-size: clamp(10px, 1.02cqw, 12px); letter-spacing: .12em; }
#app.game-stage .chuxi-harem-meta b,
#app.game-stage .chuxi-shousui-meta b { color: #764d2e; font-size: clamp(12px, 1.18cqw, 14px); letter-spacing: .09em; }
#app.game-stage .chuxi-harem-meta i,
#app.game-stage .chuxi-shousui-meta i { justify-self: end; font-style: normal; }
#app.game-stage .chuxi-harem-register,
#app.game-stage .chuxi-shousui-register { position: relative; z-index: 1; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border-top: 1px solid rgba(153, 99, 45, .52); border-bottom: 1px solid rgba(153, 99, 45, .37); background: rgba(255, 254, 244, .5); }
#app.game-stage .chuxi-harem-table__head,
#app.game-stage .chuxi-harem-row { display: grid; grid-template-columns: minmax(105px, 1.1fr) minmax(148px, 1.3fr) minmax(96px, .85fr) minmax(68px, .62fr) minmax(76px, .7fr); align-items: center; column-gap: clamp(7px, .9cqw, 11px); padding: 0 clamp(12px, 1.5cqw, 17px); }
#app.game-stage .chuxi-harem-table__head { min-height: clamp(30px, 3.85cqh, 35px); background: linear-gradient(90deg, rgba(177, 126, 70, .83), rgba(128, 78, 45, .84)); color: #fff7e3; font-size: clamp(10px, 1.02cqw, 12px); font-weight: 800; letter-spacing: .14em; }
#app.game-stage .chuxi-harem-table__head span:last-child { text-align: center; }
#app.game-stage .chuxi-harem-list { min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); }
#app.game-stage .chuxi-harem-row { min-height: 0; border-bottom: 1px solid rgba(142, 99, 57, .17); color: #806a4d; font-size: clamp(11px, 1.06cqw, 13px); }
#app.game-stage .chuxi-harem-row:nth-child(even) { background: rgba(247, 235, 211, .63); }
#app.game-stage .chuxi-harem-row b { overflow: hidden; color: #70492f; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(15px, 1.55cqw, 18px); letter-spacing: .1em; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .chuxi-harem-row strong { color: #9b733d; font-size: clamp(11px, 1.06cqw, 13px); font-variant-numeric: tabular-nums; }
#app.game-stage .chuxi-harem-row .palace-btn,
#app.game-stage .chuxi-harem-honor-screen .festival-ledger__footer .palace-btn { min-width: 0; min-height: clamp(26px, 3.35cqh, 30px); padding: 1px 7px; border: 1px solid rgba(151, 91, 48, .7); border-radius: 0; background: linear-gradient(180deg, #f8e6bf, #d6a663); color: #5b351f; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(10px, 1cqw, 12px); font-weight: 800; letter-spacing: .1em; text-shadow: none; }
#app.game-stage .chuxi-harem-row .palace-btn:hover:not(:disabled) { transform: translateY(-1px); filter: none; border-color: #845025; background: linear-gradient(180deg, #fff2c7, #d89f55); }
#app.game-stage .chuxi-harem-row em { justify-self: center; color: #85745b; font-size: clamp(10px, 1cqw, 12px); font-style: normal; letter-spacing: .1em; }
#app.game-stage .chuxi-harem-row.is-awarded { background: linear-gradient(90deg, rgba(244, 223, 169, .66), rgba(255, 246, 220, .58)); }
#app.game-stage .chuxi-harem-incident { position: relative; z-index: 1; display: grid; gap: 6px; padding: clamp(7px, .9cqh, 9px) clamp(11px, 1.45cqw, 16px); border: 1px solid rgba(167, 106, 54, .47); background: rgba(255, 244, 214, .76); color: #644e35; }
#app.game-stage .chuxi-harem-incident .chuxi-gn-choice { display: grid; gap: 6px; }
#app.game-stage .chuxi-harem-incident .chuxi-gn-choice > p { margin: 0; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(12px, 1.2cqw, 14px); line-height: 1.45; }
#app.game-stage .chuxi-harem-incident .chuxi-gn-acts { display: flex; justify-content: center; gap: 9px; }
#app.game-stage .chuxi-harem-incident .palace-btn { min-width: clamp(126px, 12.6cqw, 155px); min-height: clamp(27px, 3.5cqh, 32px); border: 1px solid rgba(143, 89, 45, .66); border-radius: 0; background: linear-gradient(180deg, #fae9bf, #d6a560); color: #59331e; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(10px, 1.02cqw, 12px); font-weight: 800; letter-spacing: .1em; }
#app.game-stage .chuxi-harem-result { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; min-height: 16px; color: #897354; font-size: clamp(10px, .98cqw, 12px); letter-spacing: .08em; }
#app.game-stage .chuxi-harem-result span::before { content: "◇ "; color: #b07a3e; }
#app.game-stage .chuxi-harem-honor-screen .festival-ledger__footer,
#app.game-stage .chuxi-shousui-screen .festival-ledger__footer { position: relative; z-index: 1; display: flex; justify-content: center; min-height: clamp(32px, 4.1cqh, 38px); }

/* 除夕·守岁：夜色仍在背景中，操作层收束为一页守岁名签。 */
#app.game-stage .chuxi-shousui-screen { width: min(860px, 72cqw); color: #d9d3ad; border-color: rgba(196, 167, 91, .68); background: linear-gradient(180deg, rgba(25, 53, 52, .91), rgba(16, 35, 38, .88)); box-shadow: 0 18px 44px rgba(3, 14, 18, .46), inset 0 0 0 1px rgba(239, 223, 153, .18); }
#app.game-stage .chuxi-shousui-screen::before { border-color: rgba(224, 194, 112, .18); }
#app.game-stage .chuxi-shousui-screen .festival-function__head { border-bottom-color: rgba(218, 191, 110, .32); }
#app.game-stage .chuxi-shousui-screen .festival-function__head span,
#app.game-stage .chuxi-shousui-screen .festival-function__head b,
#app.game-stage .chuxi-shousui-meta { color: #c7bd92; }
#app.game-stage .chuxi-shousui-screen .festival-function__head h1,
#app.game-stage .chuxi-shousui-meta b { color: #f0dfab; }
#app.game-stage .chuxi-shousui-meta { border-color: rgba(225, 196, 116, .18); }
#app.game-stage .chuxi-shousui-register { border-color: rgba(216, 184, 95, .46); background: rgba(244, 239, 205, .08); }
#app.game-stage .chuxi-shousui-table__head,
#app.game-stage .chuxi-shousui-row { display: grid; grid-template-columns: minmax(92px, 1fr) minmax(142px, 1.35fr) minmax(76px, .72fr) minmax(64px, .62fr) minmax(74px, .68fr); align-items: center; column-gap: clamp(7px, .9cqw, 11px); padding: 0 clamp(12px, 1.5cqw, 17px); }
#app.game-stage .chuxi-shousui-table__head { min-height: clamp(30px, 3.85cqh, 35px); background: linear-gradient(90deg, rgba(113, 133, 102, .78), rgba(61, 91, 86, .88)); color: #fff3c6; font-size: clamp(10px, 1.02cqw, 12px); font-weight: 800; letter-spacing: .14em; }
#app.game-stage .chuxi-shousui-table__head span:last-child { text-align: center; }
#app.game-stage .chuxi-shousui-list { min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); }
#app.game-stage .chuxi-shousui-row { min-height: 0; border-bottom: 1px solid rgba(222, 195, 111, .12); color: #c7c3a5; font-size: clamp(11px, 1.06cqw, 13px); }
#app.game-stage .chuxi-shousui-row:nth-child(even) { background: rgba(217, 222, 180, .06); }
#app.game-stage .chuxi-shousui-row b { overflow: hidden; color: #f1e4ba; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(15px, 1.55cqw, 18px); letter-spacing: .1em; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .chuxi-shousui-row strong { color: #e3c778; font-size: clamp(11px, 1.06cqw, 13px); font-variant-numeric: tabular-nums; }
#app.game-stage .chuxi-shousui-row .palace-btn,
#app.game-stage .chuxi-shousui-screen .festival-ledger__footer .palace-btn { min-width: 0; min-height: clamp(26px, 3.35cqh, 30px); padding: 1px 7px; border: 1px solid rgba(218, 178, 82, .66); border-radius: 0; background: linear-gradient(180deg, #e9d28b, #9a7543); color: #243c36; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(10px, 1cqw, 12px); font-weight: 800; letter-spacing: .1em; text-shadow: none; }
#app.game-stage .chuxi-shousui-row .palace-btn:hover:not(:disabled) { transform: translateY(-1px); filter: none; border-color: #ffe6a0; background: linear-gradient(180deg, #ffecaa, #a87c42); }
#app.game-stage .chuxi-shousui-pager { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: clamp(28px, 3.65cqh, 34px); color: #d8c99d; font-size: clamp(10px, 1cqw, 12px); letter-spacing: .12em; }
#app.game-stage .chuxi-shousui-pager .palace-btn { min-width: 72px; min-height: 25px; padding: 1px 7px; border: 1px solid rgba(217, 182, 91, .55); border-radius: 0; background: rgba(211, 194, 131, .15); color: #ead99f; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(10px, .98cqw, 12px); }
#app.game-stage .chuxi-shousui-pager .palace-btn:disabled { opacity: .35; }
#app.game-stage .chuxi-shousui-chosen { position: relative; z-index: 1; min-height: 0; display: grid; place-content: center; align-content: center; gap: 10px; border-top: 1px solid rgba(221, 192, 111, .37); border-bottom: 1px solid rgba(221, 192, 111, .28); background: radial-gradient(ellipse at center, rgba(209, 180, 92, .18), transparent 67%); color: #cfc49a; text-align: center; letter-spacing: .16em; }
#app.game-stage .chuxi-shousui-chosen b { color: #f5df9f; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(28px, 4cqh, 38px); letter-spacing: .28em; text-indent: .28em; }
#app.game-stage .chuxi-shousui-chosen i { color: #bfb78d; font-size: clamp(11px, 1.08cqw, 13px); font-style: normal; }

@media (max-width: 900px) {
  #app.game-stage .chuxi-commend-screen { width: 92cqw; }
  #app.game-stage .chuxi-commend-books { gap: 9px; }
  #app.game-stage .chuxi-commend-table__head,
  #app.game-stage .chuxi-commend-row { grid-template-columns: minmax(56px, 1fr) minmax(72px, 1.05fr) minmax(42px, .56fr) 40px 52px; padding: 0 6px; }
}

@media (max-width: 860px) {
  #app.game-stage .portrait-picker-panel--art .portrait-pick-main { grid-template-columns: minmax(190px, .9fr) minmax(180px, .8fr); gap: 12px; }
  #app.game-stage .persona-edit-modal .persona-edit-panel { width: min(690px, 86cqw); }
}

/* ═══════════════ 后宫·六宫宫籍（品级 → 宫 → 殿 → 居者） ═══════════════
   高位单宫保留仪典感；一至无品先读宫籍，入宫后才用殿签选择单人。
   不以并排人物卡代替宫、殿的真实层级。 */
#app.game-stage .harem-screen::after {
  background:
    linear-gradient(90deg, rgba(24, 37, 34, .22), transparent 38%, rgba(24, 37, 34, .16)),
    linear-gradient(0deg, rgba(26, 19, 13, .28), transparent 62%, rgba(26, 19, 13, .12));
}

#app.game-stage .harem-register-layout,
#app.game-stage .harem-hall-ledger {
  position: relative;
  z-index: 4;
  box-sizing: border-box;
  width: min(1120px, 82cqw);
  min-height: 100cqh;
  margin: 0 auto;
  padding: clamp(128px, 15.5cqh, 152px) 0 clamp(72px, 9.5cqh, 92px);
}

#app.game-stage .harem-register-layout {
  display: grid;
  grid-template-columns: clamp(116px, 11.8cqw, 148px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 2.4cqw, 30px);
}

#app.game-stage .harem-register-nav {
  align-self: stretch;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: clamp(370px, 55cqh, 510px);
  padding: 14px 10px 13px;
  border: 1px solid rgba(209, 177, 107, .72);
  background:
    linear-gradient(90deg, rgba(49, 91, 82, .94), rgba(37, 73, 68, .94)),
    repeating-linear-gradient(90deg, transparent 0 9px, rgba(255,255,236,.04) 9px 10px);
  box-shadow: 0 14px 30px rgba(18, 23, 19, .28), inset 0 0 0 2px rgba(229, 205, 139, .12);
}

#app.game-stage .harem-register-nav > b {
  color: #f4e4b6;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(23px, 2.45cqw, 30px);
  line-height: 1;
  letter-spacing: .34em;
  text-align: center;
  text-indent: .34em;
}

#app.game-stage .harem-register-nav > div {
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  gap: 7px;
  min-height: 0;
}

#app.game-stage .harem-rank-slip {
  min-width: 0;
  border: 1px solid rgba(55, 90, 81, .75);
  border-radius: 2px;
  background: linear-gradient(180deg, #f7f0dd, #d6dfce);
  color: #334c45;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(12px, 1.24cqw, 15px);
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 252, 231, .58), 0 2px 5px rgba(15, 19, 16, .18);
}

#app.game-stage .harem-rank-slip:hover:not(.is-active) { filter: brightness(1.05); border-color: #d0a755; }
#app.game-stage .harem-rank-slip.is-active {
  /* 2026-07-27 选中态统一（H1） */
  border-color: rgba(79, 117, 106, 0.65);
  background: linear-gradient(180deg, #eff4ec, #d8e2d4);
  color: #24382f;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #a74a3a, inset 0 0 0 1.5px rgba(197, 155, 86, 0.3), 0 0 10px rgba(140, 170, 158, 0.35);
}

#app.game-stage .harem-palace-ledger,
#app.game-stage .harem-single-dossier,
#app.game-stage .harem-hall-ledger {
  border: 1px solid rgba(183, 147, 78, .72);
  background:
    linear-gradient(90deg, rgba(248, 242, 222, .96), rgba(255, 251, 235, .93) 48%, rgba(238, 230, 202, .95)),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(139, 100, 48, .035) 23px 24px);
  box-shadow: 0 16px 34px rgba(27, 21, 13, .25), inset 0 0 0 3px rgba(111, 139, 124, .12), inset 0 0 0 5px rgba(221, 193, 124, .15);
}

#app.game-stage .harem-palace-ledger { min-height: clamp(370px, 55cqh, 510px); padding: clamp(22px, 3.2cqh, 30px); }
#app.game-stage .harem-ledger-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-bottom: 13px; border-bottom: 1px solid rgba(147, 104, 55, .28); }
#app.game-stage .harem-ledger-head div { display: grid; gap: 2px; }
#app.game-stage .harem-ledger-head small { color: #9c7b4d; font-size: clamp(10px, 1cqw, 12px); letter-spacing: .2em; }
#app.game-stage .harem-ledger-head h1 { margin: 0; color: #513720; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(28px, 3.1cqw, 38px); letter-spacing: .22em; text-indent: .22em; }
#app.game-stage .harem-ledger-head > span { color: #806747; font-size: clamp(11px, 1.1cqw, 13px); letter-spacing: .12em; white-space: nowrap; }

#app.game-stage .harem-palace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; gap: clamp(13px, 1.6cqw, 19px); min-height: clamp(286px, 42cqh, 390px); padding: clamp(20px, 3cqh, 28px) clamp(6px, 1cqw, 12px) 0; }
#app.game-stage .harem-palace-record {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  column-gap: 10px;
  min-height: clamp(74px, 10.4cqh, 96px);
  padding: 12px 15px;
  overflow: hidden;
  border: 1px solid rgba(158, 117, 59, .46);
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(249, 240, 215, .92), rgba(233, 221, 186, .74));
  color: #513921;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 238, .62), 0 5px 12px rgba(74, 52, 25, .1);
}
#app.game-stage .harem-palace-record::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(68, 113, 101, .16); pointer-events: none; }
#app.game-stage .harem-palace-record:hover { transform: translateY(-2px); border-color: #b47f3c; background: linear-gradient(90deg, #fff4d3, #e5c98e); }
#app.game-stage .harem-palace-record:active { transform: translateY(0); }
#app.game-stage .harem-palace-rank { grid-row: 1 / -1; display: grid; place-items: center; min-width: 26px; min-height: 38px; padding: 2px 4px; background: #a84b3c; color: #fff0d4; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(11px, 1.05cqw, 13px); letter-spacing: .08em; writing-mode: vertical-rl; }
#app.game-stage .harem-palace-record b { overflow: hidden; color: #50351f; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(20px, 2.25cqw, 27px); letter-spacing: .16em; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .harem-palace-record i { color: #8d704b; font-size: clamp(10px, 1cqw, 12px); font-style: normal; letter-spacing: .12em; }

#app.game-stage .harem-single-dossier { align-self: center; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: clamp(370px, 55cqh, 510px); padding: clamp(22px, 3cqh, 28px); }
#app.game-stage .harem-single-dossier > header { display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 40px; border-bottom: 1px solid rgba(147, 104, 55, .28); }
#app.game-stage .harem-single-dossier > header span { padding: 4px 8px; background: #a84b3c; color: #fff0d4; font-size: 12px; letter-spacing: .12em; }
#app.game-stage .harem-single-dossier h1 { margin: 0; color: #50351f; font-family: "Royal Kai", "STKaiti", "KaiTi", serif; font-size: clamp(28px, 3.1cqw, 38px); letter-spacing: .22em; text-indent: .22em; }
#app.game-stage .harem-single-stage { display: grid; place-items: center; min-height: 0; padding: 18px 0; }
#app.game-stage .harem-single-stage .harem-portrait,
#app.game-stage .harem-hall-stage .harem-portrait { width: min(290px, 62%); height: 100%; min-height: 0; border: 1px solid rgba(66, 108, 96, .72); border-radius: 0; background: linear-gradient(160deg, #dce6d7, #adbead); box-shadow: inset 0 0 0 4px rgba(245, 232, 194, .56); }
#app.game-stage .harem-single-stage .harem-portrait img,
#app.game-stage .harem-hall-stage .harem-portrait img { width: 100%; height: 100%; border: 0; border-radius: 0; object-fit: cover; object-position: center top; }
#app.game-stage .harem-single-empty,
#app.game-stage .harem-hall-empty { position: relative; overflow: hidden; display: grid; place-items: center; align-content: center; gap: 10px; width: min(330px, 68%); height: 100%; min-height: 150px; border: 1px solid rgba(154, 123, 79, .5); background: radial-gradient(circle at 30% 22%, rgba(125, 154, 139, .16), transparent 42%), radial-gradient(circle at 72% 80%, rgba(125, 154, 139, .13), transparent 46%), linear-gradient(165deg, var(--rs-paper-bright), var(--rs-paper-deep)); color: var(--rs-ink-soft); box-shadow: inset 0 0 0 4px rgba(250, 244, 228, .8), inset 0 0 0 5px rgba(197, 155, 86, .4), inset 0 0 42px rgba(154, 123, 79, .12); }
#app.game-stage .harem-single-empty::before { content: "鳳"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%); font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(150px, 19cqw, 220px); line-height: 1; color: rgba(79, 117, 106, .09); pointer-events: none; }
#app.game-stage .harem-single-empty b { position: relative; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(26px, 3cqw, 36px); letter-spacing: .22em; text-indent: .22em; color: var(--rs-ink); }
#app.game-stage .harem-single-empty i { position: relative; padding: 4px 12px; border: 1px solid rgba(139, 44, 36, .38); background: rgba(139, 44, 36, .07); color: var(--rs-cinnabar); font-size: 12px; font-style: normal; letter-spacing: .16em; }
#app.game-stage .harem-single-dossier footer { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 36px; color: #543922; }
#app.game-stage .harem-single-dossier footer b { font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(16px, 1.65cqw, 20px); letter-spacing: .12em; }
#app.game-stage .harem-single-dossier footer button,
#app.game-stage .harem-resident-meta button,
#app.game-stage .harem-hall-pager button { border: 1px solid rgba(64, 105, 95, .72); border-radius: 999px; background: linear-gradient(180deg, #f3dfb1, #d0a967); color: #4f341e; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(11px, 1.08cqw, 13px); font-weight: 700; letter-spacing: .12em; cursor: pointer; }
#app.game-stage .harem-single-dossier footer button,
#app.game-stage .harem-resident-meta button { min-width: 76px; min-height: 28px; padding: 3px 12px; }

#app.game-stage .harem-hall-ledger {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  width: min(1080px, 79cqw);
  min-height: 0;
  height: clamp(410px, 60cqh, 540px);
  margin: clamp(108px, 13.5cqh, 126px) auto 0;
  padding: clamp(15px, 2.05cqh, 19px) 0 clamp(10px, 1.45cqh, 14px);
}
#app.game-stage .harem-hall-ledger .harem-ledger-head { padding: 0 clamp(22px, 2.5cqw, 28px) 10px; }
#app.game-stage .harem-hall-ledger-body { display: grid; grid-template-columns: minmax(210px, .82fr) minmax(0, 1.34fr); min-height: 0; margin: 0 clamp(22px, 2.5cqw, 28px); border: 1px solid rgba(117, 87, 48, .3); background: rgba(255, 252, 237, .44); }
#app.game-stage .harem-hall-list { display: grid; grid-auto-rows: minmax(0, 1fr); gap: 7px; min-height: 0; padding: 12px; border-right: 1px solid rgba(117, 87, 48, .26); background: rgba(83, 119, 106, .08); }
#app.game-stage .harem-hall-list.is-dense { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); }
#app.game-stage .harem-hall-slip { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 1px 7px; align-items: center; min-width: 0; padding: 6px 9px; border: 1px solid rgba(86, 120, 108, .35); background: rgba(246, 239, 216, .82); color: #503b26; text-align: left; cursor: pointer; }
#app.game-stage .harem-hall-slip:hover { border-color: #bd8846; background: #fff2cc; }
#app.game-stage .harem-hall-slip.is-active {
  /* 2026-07-27 选中态统一（H1） */
  border-color: rgba(79, 117, 106, 0.65);
  background: linear-gradient(180deg, #eff4ec, #d8e2d4);
  color: #24382f;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #a74a3a, inset 0 0 0 1.5px rgba(197, 155, 86, 0.3), 0 0 10px rgba(140, 170, 158, 0.35);
}
#app.game-stage .harem-hall-slip span { grid-row: 1 / -1; color: #9b4e3e; font-size: clamp(10px, .95cqw, 11px); letter-spacing: .06em; writing-mode: vertical-rl; }
#app.game-stage .harem-hall-slip b { overflow: hidden; color: #533820; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(14px, 1.35cqw, 16px); letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .harem-hall-slip i { overflow: hidden; color: #846d4e; font-size: clamp(9px, .9cqw, 11px); font-style: normal; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .harem-hall-detail { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; padding: 12px 18px 13px; }
#app.game-stage .harem-hall-detail > header { display: flex; align-items: baseline; justify-content: center; gap: 10px; min-height: 34px; border-bottom: 1px solid rgba(147, 104, 55, .22); }
#app.game-stage .harem-hall-detail > header span { color: #9f4b3d; font-size: clamp(10px, 1cqw, 12px); letter-spacing: .12em; }
#app.game-stage .harem-hall-detail h2 { margin: 0; overflow: hidden; color: #513720; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(23px, 2.5cqw, 30px); letter-spacing: .18em; text-indent: .18em; text-overflow: ellipsis; white-space: nowrap; }
#app.game-stage .harem-hall-stage { display: grid; place-items: center; min-height: 0; padding: 12px 0; }
#app.game-stage .harem-hall-empty { width: min(300px, 72%); min-height: 0; color: #826b4b; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(19px, 2cqw, 24px); letter-spacing: .16em; text-indent: .16em; }
#app.game-stage .harem-resident-meta { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 14px; min-height: 35px; padding-top: 8px; border-top: 1px solid rgba(147, 104, 55, .22); }
#app.game-stage .harem-resident-meta b { color: #513720; font-family: "Royal Kai", "STKaiti", serif; font-size: clamp(15px, 1.55cqw, 18px); letter-spacing: .1em; }
#app.game-stage .harem-resident-meta span { color: #806747; font-size: clamp(10px, 1cqw, 12px); letter-spacing: .08em; }
#app.game-stage .harem-resident-meta button { grid-column: 2; grid-row: 1 / span 2; }
#app.game-stage .harem-hall-pager { display: flex; align-items: center; justify-content: center; gap: 13px; min-height: 28px; color: #765b3a; font-size: clamp(10px, 1cqw, 12px); letter-spacing: .12em; }
#app.game-stage .harem-hall-pager button { min-width: 66px; min-height: 24px; padding: 2px 8px; }
#app.game-stage .harem-hall-pager button:disabled { opacity: .34; cursor: default; }

@media (max-width: 900px) {
  #app.game-stage .harem-register-layout,
  #app.game-stage .harem-hall-ledger { width: min(900px, 89cqw); }
  #app.game-stage .harem-palace-record b { font-size: clamp(16px, 2.1cqw, 22px); }
  #app.game-stage .harem-hall-ledger-body { grid-template-columns: minmax(185px, .72fr) minmax(0, 1.2fr); }
}

/* ═══ 美术优化五批：转月面板「月令帖」——浅玉册页中央月字水印（:has 精准定位转月面板，不涉其他复用处） ═══ */
.home-panel-body .consort-status:has([data-month-confirm]) { position: relative; }
.home-panel-body .consort-status:has([data-month-confirm])::before {
  content: "月"; position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  font-family: var(--rs-font-kai); font-size: clamp(130px, 17cqw, 190px); line-height: 1;
  color: rgba(79, 117, 106, 0.14); pointer-events: none; z-index: 0;
}
.home-panel-body .consort-status:has([data-month-confirm]) > * { position: relative; z-index: 1; }
.home-panel-body .consort-status:has([data-month-confirm]) .cs-head {
  font-family: var(--rs-font-kai); letter-spacing: 0.34em; text-indent: 0.34em; font-weight: 600;
}

/* ═══ 交互优化：事件弹窗选择按钮 深绿令签→浅玉签条（用户反馈：整条深色与米纸弹窗脱节）。
   仅限米色弹窗语境（.palace-modal 内）；深色背景上的按钮（底部剧情选项等）保持深绿令签。 ═══ */
#app.game-stage .palace-modal .palace-command {
  position: relative;
  background: linear-gradient(180deg, #eef3ea, #d3dfd0);
  border: 1px solid rgba(79, 117, 106, 0.55);
  border-radius: 3px;
  color: var(--rs-jade-ink);
  text-shadow: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 248, 0.78),
    inset 0 0 0 2.5px rgba(197, 155, 86, 0.3),
    0 3px 10px rgba(30, 40, 34, 0.15);
}
#app.game-stage .palace-modal .palace-command::before,
#app.game-stage .palace-modal .palace-command::after {
  content: ""; position: absolute; top: 50%; width: 6px; height: 6px;
  transform: translateY(-50%) rotate(45deg);
  background: linear-gradient(135deg, #d8b364, var(--rs-gold-dim));
  box-shadow: 0 0 0 1px rgba(255, 252, 235, 0.5);
}
#app.game-stage .palace-modal .palace-command::before { left: 11px; }
#app.game-stage .palace-modal .palace-command::after { right: 11px; }
#app.game-stage .palace-modal .palace-command:hover {
  background: linear-gradient(180deg, #f5f9f1, #dde8da);
  border-color: rgba(79, 117, 106, 0.78);
  color: #24382f;
  filter: none;
}
#app.game-stage .palace-modal .palace-command:active {
  background: linear-gradient(180deg, #e6ede1, #ccd9c8);
  transform: translateY(1px) scale(0.988);
}

/* ═══ 修复：仪典叙事样式并入主表（原先只存在于未被 index.html 引用的 src/styles.css，导致大典界面裸奔） ═══ */
.ceremony-narration-screen {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background-color: #e9d9bb;
  background-image: var(--ceremony-scene-bg);
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
}
.ceremony-narration-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(28, 22, 12, .06) 0%, rgba(28, 22, 12, 0) 48%, rgba(28, 22, 12, .1) 100%);
}
.ceremony-narration-screen .dialog-screen { z-index: 1; }

/* 2026-07-27：花楼位分选择翻页条（rankPickList·Yan「迎入宫找不到翻页」——原列表溢出面板不可见） */
#app.game-stage .hl-rank-pager {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 8px;
}
#app.game-stage .hl-rank-pager .hl-rank-pgno { font-size: 13px; color: #e8d9bc; opacity: 0.85; letter-spacing: 1px; }

/* ═══ 2026-07-27 Yan 花楼 UI 重设计：贵宾腰牌 + 米纸图鉴（原深棕面板/毛玻璃表格弃用） ═══ */
/* 腰牌：米纸单行横徽·金边描线·压过上方 flex-column 旧面板定义 */
#app.game-stage .visit-screen--person .hualou-topbar.hl-badge {
  flex-direction: row; align-items: center; gap: 10px;
  padding: 7px 8px 7px 14px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(250, 244, 228, 0.95), rgba(238, 227, 200, 0.93));
  border: 1px solid rgba(155, 119, 66, 0.6);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 248, 0.65), 0 3px 10px rgba(20, 12, 8, 0.35);
}
#app.game-stage .hl-badge .hl-badge-tier {
  font-family: var(--rs-font-kai); font-weight: 700; letter-spacing: 1px;
  font-size: 15px; color: #2f4a41;
}
#app.game-stage .hl-badge .hl-badge-next { font-size: 12px; color: #6b5a40; letter-spacing: .5px; }
#app.game-stage .hl-badge .hl-badge-detail {
  border: 1px solid rgba(79, 117, 106, 0.55); border-radius: 999px;
  background: linear-gradient(180deg, #eff4ec, #d8e2d4);
  color: #24382f; font-size: 12px; padding: 3px 12px; cursor: pointer;
  transition: filter 120ms ease;
}
#app.game-stage .hl-badge .hl-badge-detail:hover { filter: brightness(1.07); }

/* 图鉴外壳：米纸卷（仅 hl-panel--paper 变体·其余花楼子屏外壳暂沿旧制） */
#app.game-stage .hl-panel--paper {
  background: linear-gradient(180deg, rgba(250, 245, 230, 0.97), rgba(240, 230, 205, 0.96));
  border: 1px solid rgba(155, 119, 66, 0.65);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 248, 0.6), inset 0 0 0 3.5px rgba(197, 155, 86, 0.3), 0 16px 44px rgba(15, 10, 6, 0.5);
}
#app.game-stage .hl-panel--paper .hl-panel-head span {
  color: #3d2c20; font-family: var(--rs-font-kai); letter-spacing: 4px; text-shadow: none;
}

/* 图鉴·我的进度头 */
#app.game-stage .hl-guide-me { text-align: center; padding: 2px 0 10px; border-bottom: 1px dashed rgba(155, 119, 66, 0.4); margin-bottom: 10px; }
#app.game-stage .hl-guide-viprow { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 6px; }
#app.game-stage .hl-vip-step {
  font-size: 12.5px; letter-spacing: 1px; color: #8d7d62;
  padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(155, 119, 66, 0.35);
  background: rgba(255, 253, 244, 0.6);
}
#app.game-stage .hl-vip-step.is-past { color: #4b6a5e; border-color: rgba(79, 117, 106, 0.4); }
#app.game-stage .hl-vip-step.is-me {
  color: #24382f; font-weight: 700;
  background: linear-gradient(180deg, #eff4ec, #d8e2d4);
  border-color: rgba(79, 117, 106, 0.65);
  box-shadow: inset 2px 0 0 #a74a3a, 0 0 8px rgba(140, 170, 158, 0.4);
}
#app.game-stage .hl-vip-sep { width: 10px; height: 1px; background: rgba(155, 119, 66, 0.45); }
#app.game-stage .hl-guide-pts { margin: 0; font-size: 13px; color: #5d4c36; }
#app.game-stage .hl-guide-pts b { color: #8b2c24; }
#app.game-stage .hl-guide-pts small { display: block; margin-top: 2px; font-size: 11px; color: #98876c; }

/* 图鉴·等级行卡 */
#app.game-stage .hl-guide-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
#app.game-stage .hl-guide-row {
  display: grid; grid-template-columns: 5.2em 1fr auto; grid-template-rows: auto auto;
  align-items: center; column-gap: 12px; padding: 7px 14px;
  border: 1px solid rgba(155, 119, 66, 0.4); border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 253, 244, 0.85), rgba(246, 238, 216, 0.8));
}
#app.game-stage .hl-guide-name { grid-row: 1 / span 2; font-family: var(--rs-font-kai); font-size: 17px; letter-spacing: 2px; color: #3d2c20; }
#app.game-stage .hl-guide-fee { font-size: 13.5px; color: #5d4c36; }
#app.game-stage .hl-guide-state {
  font-size: 12px; letter-spacing: 1px; color: #2f4a41;
  padding: 2px 10px; border-radius: 999px;
  background: linear-gradient(180deg, #eff4ec, #d8e2d4); border: 1px solid rgba(79, 117, 106, 0.5);
}
#app.game-stage .hl-guide-req { grid-column: 2 / span 2; font-size: 11.5px; color: #98876c; }
#app.game-stage .hl-guide-row.is-locked { opacity: 0.62; filter: saturate(0.8); }
#app.game-stage .hl-guide-row.is-locked .hl-guide-state {
  color: #7a4a3c; background: linear-gradient(180deg, #f3e8e2, #e6d4cb); border-color: rgba(139, 44, 36, 0.35);
}

/* ═══ 2026-07-27 场景菜单确认弹窗套正统米纸皮（Yan：素框方角+按钮一大一小失衡·购置酒楼等） ═══ */
#app.game-stage .menu-confirm.consort-status {
  width: min(480px, 82cqw);
  padding: 24px 30px 22px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(250, 245, 230, 0.98), rgba(240, 230, 205, 0.97));
  border: 1px solid rgba(155, 119, 66, 0.65);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 248, 0.6), inset 0 0 0 3.5px rgba(197, 155, 86, 0.3), 0 18px 48px rgba(15, 10, 6, 0.5);
}
#app.game-stage .menu-confirm .cs-head {
  font-family: var(--rs-font-kai); font-size: 20px; letter-spacing: 4px; color: #3d2c20;
  text-align: center; margin-bottom: 6px;
}
#app.game-stage .menu-confirm .cs-sub { text-align: center; color: #5d4c36; }
#app.game-stage .menu-confirm .menu-confirm-acts {
  display: flex; gap: 14px; justify-content: center; margin-top: 16px;
}
#app.game-stage .menu-confirm .menu-confirm-acts .palace-command { flex: 1 1 0; max-width: 200px; }

/* 2026-07-29：后宫品级总览最终基线。
   1–3 宫直接沿用选定参考图的完整构图；4 宫以上才切换为三宫宽横向滚动。 */
#app.game-stage .harem-screen {
  background-color: #eef3eb;
  background-image: var(--scene-bg);
  background-position: center;
  background-size: 100% 100%;
}
#app.game-stage .harem-screen::before,
#app.game-stage .harem-screen::after { display: none; }

#app.game-stage .harem-register-layout,
#app.game-stage .harem-gate-map,
#app.game-stage .harem-gate-track {
  position: absolute;
  inset: 0;
}

#app.game-stage .harem-register-layout {
  z-index: 4;
  width: 100%;
  min-height: 100%;
  padding: 0;
  margin: 0;
  display: block;
}

#app.game-stage .harem-register-nav {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  width: 13.16cqw;
  height: 100cqh;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

#app.game-stage .harem-register-nav > div {
  position: absolute;
  top: 12.55cqh;
  left: 2.27cqw;
  width: 9.81cqw;
  height: 55.55cqh;
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 0;
}

#app.game-stage .harem-rank-slip {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #69583c;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(13px, 1.46cqw, 25px);
  font-weight: 500;
  letter-spacing: .1em;
  line-height: 1;
  text-indent: .1em;
  box-shadow: none;
  text-shadow: 0 1px rgba(255, 255, 255, .82);
  transition: filter 140ms ease;
}
#app.game-stage .harem-rank-slip::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0;
  background: url('./assets/ui/generated/harem-rank-active-reference-20260729.png') center / 100% 100% no-repeat;
  transition: opacity 140ms ease;
}
#app.game-stage .harem-rank-slip:hover:not(.is-active) {
  border: 0;
  background: none;
  filter: brightness(.88) saturate(1.18);
  transform: none;
}
#app.game-stage .harem-screen .harem-gate-track > .harem-palace-record {
  top: auto !important;
  left: auto !important;
}
#app.game-stage .harem-rank-slip.is-active {
  border: 0;
  background: none;
  color: #fff5d8;
  box-shadow: none;
  text-shadow: 0 1px 2px rgba(58, 46, 28, .7);
}
#app.game-stage .harem-rank-slip.is-active::before { opacity: 1; }

#app.game-stage .harem-gate-map,
#app.game-stage .harem-gate-track {
  min-width: 0;
  min-height: 0;
  padding: 0;
}
#app.game-stage .harem-gate-map__head { display: none; }

#app.game-stage .harem-palace-record {
  position: absolute;
  z-index: 4;
  top: 10.63cqh;
  width: 29.9cqw;
  height: 71.73cqh;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  color: #5b4529;
  box-shadow: none;
  cursor: pointer;
  transition: filter 140ms ease;
}
#app.game-stage .harem-palace-record::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 24%;
  right: 18%;
  bottom: 13%;
  left: 27%;
  opacity: 0;
  border: 1px solid rgba(220, 188, 116, .8);
  background: rgba(255, 250, 220, .12);
  box-shadow: inset 0 0 24px rgba(255, 247, 201, .3);
  transition: opacity 140ms ease;
}
#app.game-stage .harem-palace-record::after { display: none; }
#app.game-stage .harem-palace-record:hover {
  border: 0;
  background: none;
  filter: brightness(1.035) saturate(1.03);
  transform: none;
}
#app.game-stage .harem-palace-record:hover::before { opacity: 1; }
#app.game-stage .harem-palace-record:active { filter: brightness(.98); transform: none; }

#app.game-stage .harem-count-1 .harem-palace-record:nth-child(1) { left: 40.67cqw; }
#app.game-stage .harem-count-2 .harem-palace-record:nth-child(1),
#app.game-stage .harem-count-3 .harem-palace-record:nth-child(1) { left: 12.26cqw; }
#app.game-stage .harem-count-2 .harem-palace-record:nth-child(2) { left: 69.68cqw; }
#app.game-stage .harem-count-3 .harem-palace-record:nth-child(2) { left: 40.97cqw; }
#app.game-stage .harem-count-3 .harem-palace-record:nth-child(3) { left: 68.78cqw; }

#app.game-stage .harem-gate-frame { display: none; }
#app.game-stage .harem-palace-record b,
#app.game-stage .harem-palace-record i {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}
#app.game-stage .harem-palace-record b {
  top: 30.8%;
  left: 12.2%;
  width: 10.5%;
  height: 23%;
  overflow: hidden;
  color: #635035;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(13px, 1.55cqw, 26px);
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.24;
  text-align: center;
  text-indent: .08em;
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: normal;
}
#app.game-stage .harem-palace-record i {
  right: 30.5%;
  bottom: 3.55%;
  left: 30%;
  color: #fff7df;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(11px, 1.18cqw, 20px);
  font-style: normal;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 1px rgba(76, 65, 43, .3);
  white-space: nowrap;
}

/* 四宫以上：视窗严格容纳三座完整宫门，不露第四座；滚轮 / 触控板横向滚动。 */
#app.game-stage .harem-count-scroll .harem-gate-map {
  top: 10.63cqh;
  right: 0;
  bottom: auto;
  left: 12.86cqw;
  width: 87.14cqw;
  height: 71.73cqh;
  overflow: hidden;
}
#app.game-stage .harem-count-scroll .harem-gate-track {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
#app.game-stage .harem-count-scroll .harem-gate-track::-webkit-scrollbar { display: none; }
#app.game-stage .harem-count-scroll .harem-palace-record {
  position: relative;
  top: auto;
  left: auto;
  flex: 0 0 calc(100% / 3);
  width: calc(100% / 3);
  height: 100%;
  scroll-snap-align: start;
}
#app.game-stage .harem-count-scroll .harem-gate-frame {
  position: absolute;
  inset: 0;
  display: block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}
#app.game-stage .harem-count-scroll .harem-palace-record:nth-child(3n + 1) .harem-gate-frame {
  background-image: url('./assets/ui/generated/harem-palace-card-reference-1-20260729.png');
}
#app.game-stage .harem-count-scroll .harem-palace-record:nth-child(3n + 2) .harem-gate-frame {
  background-image: url('./assets/ui/generated/harem-palace-card-reference-2-20260729.png');
}
#app.game-stage .harem-count-scroll .harem-palace-record:nth-child(3n) .harem-gate-frame {
  background-image: url('./assets/ui/generated/harem-palace-card-reference-3-20260729.png');
}
#app.game-stage .harem-count-scroll .harem-palace-record b { left: 10.2%; }

#app.game-stage .harem-screen > .court-leave {
  z-index: 10;
  right: 1.8cqw;
  bottom: 2.2cqh;
  width: clamp(70px, 7.6cqw, 126px);
  min-width: 0;
  height: clamp(28px, 4.4cqh, 42px);
  padding: 0;
  border: 1px solid rgba(170, 135, 72, .65);
  border-radius: 999px;
  background: rgba(244, 240, 218, .84);
  color: #607464;
  font-size: clamp(12px, 1.05cqw, 17px);
  box-shadow: 0 4px 12px rgba(73, 66, 45, .16), inset 0 0 0 2px rgba(255, 255, 246, .5);
}

@media (max-width: 900px) {
  #app.game-stage .harem-rank-slip { font-size: clamp(11px, 1.45cqw, 14px); }
  #app.game-stage .harem-palace-record b { font-size: clamp(11px, 1.55cqw, 15px); }
  #app.game-stage .harem-palace-record i { font-size: clamp(9px, 1.18cqw, 12px); }
}

/* ═══ 2026-07-27 两段式司法（Yan）：秋审案述 + 天牢处置行 ═══ */
#app.game-stage .court-case-brief {
  margin: 6px 0 2px; padding: 8px 14px;
  font-size: 14px; line-height: 1.7; color: #4a3a28;
  background: linear-gradient(90deg, rgba(197, 155, 86, 0.1), rgba(197, 155, 86, 0.03));
  border-left: 3px solid rgba(139, 44, 36, 0.55); border-radius: 0 6px 6px 0;
}
#app.game-stage .tianlao-row { flex-wrap: wrap; }
#app.game-stage .tianlao-acts { display: flex; gap: 8px; width: 100%; margin-top: 8px; flex-wrap: wrap; }
#app.game-stage .tianlao-acts .court-action { font-size: 13px; padding: 6px 14px; }
#app.game-stage .tianlao-acts .tianlao-act-grave { border-color: rgba(139, 44, 36, 0.7); color: #7a2018; }

/* ═══ 2026-07-29 后宫正式接入：同一宫门组件分层复用 ═══
   品级总览不含人物；进入具体宫后，殿门层使用背景 < 动态立绘 < 宫门前景
   < 宫牌/殿名/居者。所有层都以 .harem-palace-record 为唯一定位父级。 */
#app.game-stage .harem-screen {
  background-color: #eef3eb;
  background-image: var(--scene-bg);
  background-position: center;
  background-size: 100% 100%;
}
#app.game-stage .harem-screen::before,
#app.game-stage .harem-screen::after { display: none; }

#app.game-stage .harem-register-layout {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  min-height: 100%;
  padding: 0;
  margin: 0;
  display: block;
}
#app.game-stage .harem-register-nav {
  position: absolute;
  z-index: 12;
  inset: 0 auto 0 0;
  width: 13.16cqw;
  height: 100cqh;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
#app.game-stage .harem-register-nav > div {
  position: absolute;
  top: 12.55cqh;
  left: 2.27cqw;
  width: 9.81cqw;
  height: 55.55cqh;
  display: grid;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 0;
}
#app.game-stage .harem-rank-slip {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #69583c;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(13px, 1.46cqw, 25px);
  font-weight: 500;
  letter-spacing: .1em;
  line-height: 1;
  text-indent: .1em;
  box-shadow: none;
  text-shadow: 0 1px rgba(255, 255, 255, .82);
  transition: filter 140ms ease;
}
#app.game-stage .harem-rank-slip::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0;
  background: url('./assets/ui/generated/harem-rank-active-reference-20260729.png') center / 100% 100% no-repeat;
  transition: opacity 140ms ease;
}
#app.game-stage .harem-rank-slip:hover:not(.is-active) {
  border: 0;
  background: none;
  filter: brightness(.88) saturate(1.18);
  transform: none;
}
#app.game-stage .harem-rank-slip.is-active {
  border: 0;
  background: none;
  color: #fff5d8;
  box-shadow: none;
  text-shadow: 0 1px 2px rgba(58, 46, 28, .7);
}
#app.game-stage .harem-rank-slip.is-active::before { opacity: 1; }

#app.game-stage .harem-gate-map {
  position: absolute;
  z-index: 5;
  top: 10.63cqh;
  right: 0;
  left: 12.86cqw;
  width: 87.14cqw;
  height: 71.73cqh;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
#app.game-stage .harem-gate-map__head { display: none; }
#app.game-stage .harem-gate-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
#app.game-stage .harem-count-1 .harem-gate-track { justify-content: center; }
#app.game-stage .harem-count-2 .harem-gate-track { justify-content: space-around; }
#app.game-stage .harem-count-3 .harem-gate-track { justify-content: flex-start; }

#app.game-stage .harem-palace-record {
  position: relative;
  z-index: 4;
  top: auto;
  left: auto;
  flex: 0 0 calc(100% / 3);
  width: calc(100% / 3);
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: block;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  color: #5b4529;
  box-shadow: none;
  cursor: default;
  filter: none;
  transform: none;
}
#app.game-stage .harem-palace-record::before { display: none; }
#app.game-stage .harem-palace-record::after {
  content: "";
  position: absolute;
  z-index: 6;
  top: 21.8%;
  right: 17.5%;
  bottom: 9.5%;
  left: 26%;
  display: block;
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(220, 188, 116, .82);
  background: rgba(255, 250, 220, .11);
  box-shadow: inset 0 0 28px rgba(255, 247, 201, .34), 0 0 18px rgba(232, 205, 142, .18);
  transition: opacity 140ms ease;
}
#app.game-stage .harem-palace-record:hover,
#app.game-stage .harem-palace-record:active {
  border: 0;
  background: none;
  filter: none;
  transform: none;
}
#app.game-stage .harem-palace-record:has(.harem-palace-hitbox:hover)::after,
#app.game-stage .harem-palace-record:has(.harem-palace-hitbox:focus-visible)::after { opacity: 1; }

#app.game-stage .harem-gate-portrait {
  position: absolute;
  z-index: 2;
  top: 24.45%;
  right: 18.8%;
  bottom: 12.6%;
  left: 27.8%;
  display: block;
  overflow: hidden;
  pointer-events: none;
}
#app.game-stage .harem-gate-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--portrait-focus, 50%) top;
}
#app.game-stage .harem-palace-foreground {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  pointer-events: none;
}
#app.game-stage .harem-palace-plaque {
  position: absolute;
  z-index: 4;
  top: 27%;
  left: 6.5%;
  width: 16%;
  height: 30%;
  display: block;
  pointer-events: none;
}
#app.game-stage .harem-palace-plaque > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
}
#app.game-stage .harem-palace-name {
  position: absolute;
  z-index: 1;
  inset: 10% 18%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .05em;
  color: #635035;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(12px, 1.38cqw, 24px);
  font-weight: 500;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px rgba(255, 255, 255, .62);
}
#app.game-stage .harem-palace-name > span {
  display: grid;
  place-items: center;
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
}
#app.game-stage .harem-palace-count {
  position: absolute;
  z-index: 4;
  right: 29.5%;
  bottom: 1.9%;
  left: 29.5%;
  height: 6.8%;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #fff7df;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(10px, 1.06cqw, 18px);
  font-style: normal;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 1px rgba(76, 65, 43, .34);
  white-space: nowrap;
}
#app.game-stage .harem-palace-hitbox {
  position: absolute;
  z-index: 5;
  top: 21.8%;
  right: 17.5%;
  bottom: 9.5%;
  left: 26%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  box-shadow: none;
  cursor: pointer;
}
#app.game-stage .harem-palace-hitbox:focus-visible {
  outline: 2px solid rgba(170, 135, 72, .9);
  outline-offset: -3px;
}

/* 四宫及以上：一屏恰好三座同尺寸宫门，第四座不露边；滚轮与触控板直接横向滑动。 */
#app.game-stage .harem-count-scroll .harem-gate-track {
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
#app.game-stage .harem-count-scroll .harem-gate-track::-webkit-scrollbar { display: none; }
#app.game-stage .harem-count-scroll .harem-palace-record { scroll-snap-align: start; }

/* 普通宫内仍是同一宫门地图，只把左侧六品级栏让出的宽度均分到舞台两侧。 */
#app.game-stage .harem-palace-interior .harem-gate-map {
  right: 6.43cqw;
  left: 6.43cqw;
  width: 87.14cqw;
}
#app.game-stage .harem-palace-interior .harem-palace-count {
  right: 24%;
  left: 24%;
  font-size: clamp(9px, .96cqw, 16px);
  letter-spacing: .06em;
}
#app.game-stage .harem-palace-interior .harem-palace-hitbox:disabled {
  cursor: default;
}
#app.game-stage .harem-palace-interior .harem-palace-record:has(.harem-palace-hitbox:disabled)::after {
  display: none;
}

#app.game-stage .harem-screen > .court-leave {
  z-index: 14;
  right: 1.8cqw;
  bottom: 2.2cqh;
  width: clamp(70px, 7.6cqw, 126px);
  min-width: 0;
  height: clamp(28px, 4.4cqh, 42px);
  padding: 0;
  border: 1px solid rgba(170, 135, 72, .65);
  border-radius: 999px;
  background: rgba(244, 240, 218, .84);
  color: #607464;
  font-size: clamp(12px, 1.05cqw, 17px);
  box-shadow: 0 4px 12px rgba(73, 66, 45, .16), inset 0 0 0 2px rgba(255, 255, 246, .5);
}

/* 群芳苑：独立五列双排居室册；背景、人物、宫门前景三层分离。 */
#app.game-stage .harem-dorm-screen {
  isolation: isolate;
}
#app.game-stage .harem-dorm-screen::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, .05);
}
#app.game-stage .harem-dorm-title {
  position: absolute;
  z-index: 6;
  top: 4.2%;
  left: 2.15%;
  width: clamp(70px, 6.2cqw, 104px);
  filter: drop-shadow(0 3px 4px rgba(79, 62, 43, .16));
  pointer-events: none;
}
#app.game-stage .harem-dorm-title img {
  display: block;
  width: 100%;
  height: auto;
}
#app.game-stage .harem-dorm-grid {
  position: absolute;
  z-index: 2;
  top: 10.2%;
  right: 2.7%;
  bottom: 11.9%;
  left: 9.3%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  column-gap: clamp(8px, .72cqw, 15px);
  row-gap: clamp(2px, .65cqh, 8px);
  align-items: center;
  justify-items: center;
}
#app.game-stage .harem-dorm-room {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
}
#app.game-stage .harem-dorm-room__inner {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 385 / 485;
  margin: 0 auto;
  transform: translateZ(0);
  transition: transform 150ms ease;
}
#app.game-stage .harem-dorm-room:has(.harem-dorm-room__hitbox:not(:disabled):hover) .harem-dorm-room__inner,
#app.game-stage .harem-dorm-room:has(.harem-dorm-room__hitbox:not(:disabled):focus-visible) .harem-dorm-room__inner {
  transform: translateY(-3px);
}
#app.game-stage .harem-dorm-room .harem-gate-portrait {
  z-index: 1;
  top: 32.8%;
  right: auto;
  bottom: auto;
  left: 27.7%;
  width: 55.2%;
  height: 49.2%;
  overflow: hidden;
  background: rgba(245, 239, 217, .34);
  box-shadow: inset 0 0 18px rgba(95, 111, 90, .12);
}
#app.game-stage .harem-dorm-room .harem-gate-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--portrait-focus, 50%) 6%;
  filter: saturate(.84) brightness(1.06);
  transition: transform 180ms ease, filter 180ms ease;
}
#app.game-stage .harem-dorm-room:has(.harem-dorm-room__hitbox:not(:disabled):hover) .harem-gate-portrait img,
#app.game-stage .harem-dorm-room:has(.harem-dorm-room__hitbox:not(:disabled):focus-visible) .harem-gate-portrait img {
  transform: scale(1.025);
  filter: saturate(.94) brightness(1.08);
}
#app.game-stage .harem-dorm-room__frame {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
#app.game-stage .harem-dorm-room__frame--selected {
  z-index: 4;
  opacity: 0;
  transition: opacity 140ms ease;
}
#app.game-stage .harem-dorm-room:has(.harem-dorm-room__hitbox:not(:disabled):hover) .harem-dorm-room__frame--selected,
#app.game-stage .harem-dorm-room:has(.harem-dorm-room__hitbox:not(:disabled):focus-visible) .harem-dorm-room__frame--selected {
  opacity: 1;
}
#app.game-stage .harem-dorm-room__number {
  position: absolute;
  z-index: 5;
  right: auto;
  bottom: 6.5%;
  left: 31.5%;
  width: 36.5%;
  height: 5%;
  display: grid;
  place-items: center;
  overflow: visible;
  color: #f4ead2;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(7px, .96cqw, 16px);
  line-height: 1;
  letter-spacing: .12em;
  text-align: center;
  text-shadow: 0 1px 1px rgba(62, 49, 35, .88);
  white-space: nowrap;
  pointer-events: none;
}
#app.game-stage .harem-dorm-room__resident {
  position: absolute;
  z-index: 5;
  top: 38.5%;
  left: 9.7%;
  width: 10.9%;
  height: 22.8%;
  display: grid;
  place-items: center;
  color: #56412f;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(7px, 1.12cqw, 20px);
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .78);
  pointer-events: none;
}
#app.game-stage .harem-dorm-room__resident > span {
  display: block;
  writing-mode: vertical-rl;
  text-orientation: upright;
  line-height: 1;
  letter-spacing: .08em;
  white-space: nowrap;
}
#app.game-stage .harem-dorm-room__number > span {
  display: block;
  max-width: 94%;
  overflow: hidden;
  text-overflow: ellipsis;
}
#app.game-stage .harem-dorm-room.is-empty .harem-dorm-room__resident,
#app.game-stage .harem-dorm-room.is-empty .harem-dorm-room__number {
  opacity: .84;
  color: #806f5d;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .76);
}
#app.game-stage .harem-dorm-room__hitbox {
  position: absolute;
  z-index: 6;
  inset: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
#app.game-stage .harem-dorm-room__hitbox:focus-visible {
  outline: none;
}
#app.game-stage .harem-dorm-room__hitbox:disabled {
  cursor: default;
}
#app.game-stage .harem-dorm-pager {
  position: absolute;
  z-index: 8;
  top: 1.8%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, .45cqw, 9px);
  transform: translateX(-50%);
}
#app.game-stage .harem-dorm-pager__button,
#app.game-stage .harem-dorm-return {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 2px 3px rgba(69, 55, 37, .16));
}
#app.game-stage .harem-dorm-pager__button {
  position: relative;
  flex: 0 0 auto;
  width: clamp(116px, 10.3cqw, 174px);
  aspect-ratio: 320 / 155;
  transition: transform 120ms ease, filter 120ms ease;
}
#app.game-stage .harem-dorm-pager__button:not(:disabled):hover,
#app.game-stage .harem-dorm-pager__button:not(:disabled):focus-visible {
  outline: none;
  transform: translateY(-1px);
  filter: drop-shadow(0 3px 4px rgba(69, 55, 37, .22)) brightness(1.04);
}
#app.game-stage .harem-dorm-pager__button:not(:disabled):active {
  transform: translateY(1px);
}
#app.game-stage .harem-dorm-pager__button:disabled {
  cursor: default;
  opacity: .88;
}
#app.game-stage .harem-dorm-pager__button img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}
#app.game-stage .harem-dorm-pager__counter {
  position: relative;
  width: clamp(66px, 6.2cqw, 104px);
  aspect-ratio: 390 / 155;
  display: grid;
  place-items: center;
  transform: translateY(-29%);
  color: #69533d;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(15px, 1.2cqw, 21px);
  letter-spacing: .05em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .82);
}
#app.game-stage .harem-dorm-pager__counter img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
#app.game-stage .harem-dorm-pager__counter span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 83%;
  height: 66%;
  place-items: center;
  line-height: 1;
  transform: translate(.04em, -.08em);
}
#app.game-stage .harem-dorm-return {
  position: absolute;
  z-index: 8;
  left: 3.1%;
  bottom: 3.8%;
  width: clamp(58px, 5.2cqw, 88px);
  transition: transform 120ms ease, filter 120ms ease;
}
#app.game-stage .harem-dorm-return img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}
#app.game-stage .harem-dorm-return:hover,
#app.game-stage .harem-dorm-return:focus-visible {
  outline: none;
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 5px rgba(69, 55, 37, .24)) brightness(1.05);
}
#app.game-stage .harem-dorm-return:active {
  transform: translateY(1px) scale(.98);
}
@container (max-aspect-ratio: 3 / 2) {
  #app.game-stage .harem-dorm-grid {
    right: 1.5%;
    left: 10.2%;
  }
  #app.game-stage .harem-dorm-room__number {
    font-size: clamp(7px, 1.22cqw, 18px);
  }
}

@media (max-width: 900px) {
  #app.game-stage .harem-rank-slip { font-size: clamp(11px, 1.45cqw, 14px); }
  #app.game-stage .harem-palace-name { font-size: clamp(10px, 1.38cqw, 14px); }
  #app.game-stage .harem-palace-count { font-size: clamp(8px, 1.06cqw, 11px); }
}

/* ═══ 2026-07-27 官员编制编辑器重皮（Yan「UI 不好看重新设计」）：深棕行卡 → 米纸玉签语言 ═══ */
#app.game-stage .est-board {
  background: linear-gradient(180deg, rgba(250, 245, 230, 0.96), rgba(240, 230, 205, 0.95));
  border: 1px solid rgba(155, 119, 66, 0.6); border-radius: 14px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 248, 0.55), inset 0 0 0 3.5px rgba(197, 155, 86, 0.28), 0 14px 40px rgba(15, 10, 6, 0.4);
  padding: 16px 20px 18px;
}
#app.game-stage .est-rank-name {
  font-family: var(--rs-font-kai); font-size: 19px; letter-spacing: 5px; color: #3d2c20;
  text-align: center; padding-bottom: 8px; margin-bottom: 10px;
  border-bottom: 1px dashed rgba(155, 119, 66, 0.42);
}
#app.game-stage .est-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px;
  padding: 9px 16px; margin-bottom: 7px;
  background: linear-gradient(180deg, rgba(255, 253, 244, 0.9), rgba(246, 238, 216, 0.85));
  border: 1px solid rgba(155, 119, 66, 0.38); border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 248, 0.5);
}
#app.game-stage .est-post {
  font-family: var(--rs-font-kai); font-size: 16.5px; letter-spacing: 1.5px; color: #3d2c20; font-weight: 700;
}
#app.game-stage .est-post .est-kind {
  display: inline-block; margin-left: 8px; padding: 1px 8px;
  font-size: 11.5px; letter-spacing: 1px; font-weight: 400; vertical-align: 2px;
  color: #2f4a41; background: linear-gradient(180deg, #eff4ec, #dbe4d6);
  border: 1px solid rgba(79, 117, 106, 0.45); border-radius: 999px;
}
#app.game-stage .est-stat { font-size: 13.5px; color: #5d4c36; letter-spacing: 0.5px; }
#app.game-stage .est-stat .est-cut { color: #8b2c24; }
#app.game-stage .est-ctl { display: flex; gap: 8px; }
#app.game-stage .est-btn {
  min-width: 40px; padding: 5px 12px;
  background: linear-gradient(180deg, #f4eedd, #e6d9bb);
  border: 1px solid rgba(155, 119, 66, 0.55); border-radius: 7px;
  color: #43301b; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 248, 0.65), 0 2px 6px rgba(30, 40, 34, 0.14);
  transition: filter 120ms ease, transform 120ms ease;
}
#app.game-stage .est-btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
#app.game-stage .est-btn:disabled { opacity: 0.45; cursor: not-allowed; }
#app.game-stage .est-btn.est-cut-btn { border-color: rgba(139, 44, 36, 0.6); color: #7a2018; }
#app.game-stage .est-add {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 16px;
  background: linear-gradient(180deg, rgba(246, 238, 216, 0.75), rgba(238, 227, 200, 0.7));
  border: 1px dashed rgba(155, 119, 66, 0.5); border-radius: 10px;
}
#app.game-stage .est-add-title { font-family: var(--rs-font-kai); letter-spacing: 2px; color: #3d2c20; font-weight: 700; }
#app.game-stage .est-add input[type="text"], #app.game-stage .est-add input[type="number"] {
  background: rgba(255, 253, 244, 0.92); border: 1px solid rgba(155, 119, 66, 0.5); border-radius: 7px;
  color: #43301b; padding: 6px 10px; font-size: 14px;
}
#app.game-stage .est-board { max-height: none; }
#app.game-stage .court-screen .est-list {
  max-height: 43vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(104, 75, 42, 0.6) rgba(255, 253, 244, 0.38);
}
#app.game-stage .est-rank + .est-rank { margin-top: 16px; padding-top: 12px; border-top: 1px dashed rgba(155, 119, 66, 0.42); }

/* 可读／可操作内容一律不得被固定舞台直接裁掉：高频清单保留既有分页，正文和未定长内容在本区有界滚动。立绘、背景和单行省略不适用本规则。 */
#app.game-stage :is(
  .setup-body,
  .roster,
  .court-board,
  .diplo-list,
  .scene-menu-panel,
  .petition-main .pet-list,
  .petition-main .pet-card-body,
  .agent-panel .sz-row-wrap,
  .home-panel.affairs-subscreen .home-panel-body,
  .home-panel.affairs-subscreen .faction-list,
  .home-panel.affairs-subscreen .chron-list,
  .home-panel.affairs-subscreen .cs-saved,
  .home-panel.affairs-subscreen .poison-list,
  .home-panel.affairs-subscreen .poison-targets,
  .affairs-book__groups,
  .affairs-book__ledger,
  .affairs-book__aside,
  .shared-ledger-screen:not(.shared-roster-ledger-screen) .shared-ledger-panel,
  .market-ledger-panel,
  .edict-screen .decree-body,
  .visit-dialog .visit-dialog-text
) {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
/* ============================================================================
   2026-07-30 储秀宫宫册母版
   母框、名单、档案、立绘与主操作共用 865 × 515 原生坐标系；整组等比缩放。
   姓名与年龄分别使用候选名签白色有效区的独立槽位。
   ============================================================================ */
#app.game-stage .palace-roster-master {
  --palace-master-ink: #493e2f;
  --palace-master-ink-soft: #756752;
  --palace-master-jade: #6f9183;
  --palace-master-jade-deep: #315d50;
  --palace-master-gold: #c5a56b;
  --palace-master-paper: #f7f1e3;
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  color: var(--palace-master-ink);
  background: #e8eadf var(--palace-master-bg) center / cover no-repeat;
  font-family: var(--rs-font-hei);
}

#app.game-stage .palace-roster-master::before,
#app.game-stage .palace-roster-master::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
}

#app.game-stage .palace-roster-master::before {
  background:
    linear-gradient(90deg, rgba(235, 235, 211, .02), transparent 25%, transparent 73%, rgba(238, 231, 201, .08)),
    linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(250, 247, 228, 0) 52%, rgba(32, 57, 47, .17));
}

#app.game-stage .palace-roster-master::after {
  box-shadow: inset 0 0 6cqw rgba(40, 67, 56, .18), inset 0 -11cqh 10cqh rgba(38, 61, 51, .14);
}

#app.game-stage .palace-master__wash {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

#app.game-stage .palace-master__title {
  position: absolute;
  z-index: 10;
  top: 4.57cqh;
  left: 3.23cqw;
  width: 31.1cqw;
  height: 16.9cqh;
  object-fit: contain;
  filter: drop-shadow(0 .75cqh .75cqh rgba(44, 59, 48, .22));
  pointer-events: none;
}

#app.game-stage .palace-master__categories {
  position: absolute;
  z-index: 9;
  top: 23.59cqh;
  left: 2.87cqw;
  width: 11.06cqw;
  display: grid;
  grid-template-rows: repeat(var(--palace-master-category-count), 17.53cqh);
  gap: 1.17cqh;
}

#app.game-stage .palace-master__category {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}

#app.game-stage .palace-master__category:hover,
#app.game-stage .palace-master__category:focus-visible {
  outline: none;
  transform: translateX(.48cqw);
  filter: drop-shadow(0 .9cqh .7cqh rgba(50, 73, 62, .23));
}

#app.game-stage .palace-master__category:active {
  transform: translateX(.3cqw) scale(.985);
}

#app.game-stage .palace-master__category[aria-pressed="true"] {
  transform: translateX(.54cqw);
  filter: drop-shadow(0 0 .42cqw rgba(255, 235, 173, .9)) drop-shadow(0 1cqh .8cqh rgba(44, 70, 58, .28));
}

#app.game-stage .palace-master__category-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

#app.game-stage .palace-master__category-label,
#app.game-stage .palace-master__category-count {
  position: absolute;
  right: 8%;
  left: 8%;
  text-align: center;
  font-family: var(--rs-font-kai);
  pointer-events: none;
}

#app.game-stage .palace-master__category-label {
  top: 28%;
  font-size: clamp(17px, 2.03cqw, 34px);
  letter-spacing: .12em;
  line-height: 1;
  text-indent: .12em;
  text-shadow: 0 1px 0 #fff8e4;
}

#app.game-stage .palace-master__category-count {
  top: 55%;
  color: var(--palace-master-ink-soft);
  font-size: clamp(9px, .96cqw, 16px);
  letter-spacing: .15em;
}

#app.game-stage .palace-master__category[aria-pressed="true"] .palace-master__category-label {
  color: var(--palace-master-jade-deep);
  font-size: clamp(19px, 2.27cqw, 38px);
}

/* 865 × 515 母框整体占舞台 78.65% × 83.21%，保持原始宽高比。 */
#app.game-stage .palace-master__folio {
  position: absolute;
  z-index: 5;
  top: 9.14cqh;
  left: 15.25cqw;
  width: 78.65cqw;
  height: 83.21cqh;
  filter: drop-shadow(0 2.55cqh 1.7cqh rgba(45, 59, 49, .25));
}

#app.game-stage .palace-master__frame {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

#app.game-stage .palace-master__roster {
  position: absolute;
  z-index: 4;
  top: 18.25%;
  left: 5.9%;
  width: 26.01%;
  height: 68.74%;
}

#app.game-stage .palace-master__roster-head {
  position: relative;
  height: 11.86%;
  margin-bottom: .85%;
}

#app.game-stage .palace-master__roster-head > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

#app.game-stage .palace-master__roster-head > div {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  height: 100%;
  padding: 4.5% 13% 0 16%;
  font-family: var(--rs-font-kai);
}

#app.game-stage .palace-master__roster-head strong {
  font-size: clamp(12px, 1.46cqw, 25px);
  font-weight: 500;
  letter-spacing: .14em;
  white-space: nowrap;
}

#app.game-stage .palace-master__roster-head span {
  color: var(--palace-master-ink-soft);
  font-size: clamp(8px, .91cqw, 16px);
  letter-spacing: .1em;
  white-space: nowrap;
}

#app.game-stage .palace-master__candidate-list {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 1.18%;
  height: 72.03%;
  align-content: start;
}

#app.game-stage .palace-master__candidate {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}

#app.game-stage .palace-master__candidate:hover,
#app.game-stage .palace-master__candidate:focus-visible {
  outline: none;
  transform: translateX(.42cqw);
  filter: drop-shadow(0 .65cqh .45cqh rgba(49, 68, 58, .18));
}

#app.game-stage .palace-master__candidate:active {
  transform: translateX(.24cqw) scale(.992);
}

#app.game-stage .palace-master__candidate[aria-pressed="true"] {
  transform: translateX(.6cqw);
  filter: drop-shadow(0 0 .24cqw rgba(255, 235, 169, .95)) drop-shadow(0 .8cqh .5cqh rgba(49, 68, 58, .22));
}

#app.game-stage .palace-master__candidate-art,
#app.game-stage .palace-master__candidate-content {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#app.game-stage .palace-master__candidate-art {
  object-fit: fill;
  pointer-events: none;
}

#app.game-stage .palace-master__candidate-content {
  z-index: 1;
  pointer-events: none;
}

#app.game-stage .palace-master__candidate-name-slot,
#app.game-stage .palace-master__candidate-age-slot {
  position: absolute;
  top: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  min-width: 0;
  text-align: center;
}

#app.game-stage .palace-master__candidate-name-slot {
  left: 21.5%;
  width: 42.5%;
}

#app.game-stage .palace-master__candidate-age-slot {
  left: 64%;
  width: 17.5%;
}

#app.game-stage .palace-master__candidate-name-slot strong {
  color: inherit;
  font-family: var(--rs-font-kai);
  font-size: clamp(11px, 1.4cqw, 24px);
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1;
  text-indent: .12em;
  white-space: nowrap;
}

#app.game-stage .palace-master__candidate-age-slot span {
  color: var(--palace-master-ink-soft);
  font-family: var(--rs-font-kai);
  font-size: clamp(8px, .95cqw, 16px);
  white-space: nowrap;
}

#app.game-stage .palace-master__candidate[aria-pressed="true"] .palace-master__candidate-name-slot strong {
  color: var(--palace-master-jade-deep);
  font-size: clamp(12px, 1.5cqw, 26px);
  font-weight: 600;
}

#app.game-stage .palace-master__empty-list {
  grid-row: 1 / -1;
  display: grid;
  place-items: center;
  color: var(--palace-master-ink-soft);
  font-family: var(--rs-font-kai);
  font-size: clamp(13px, 1.6cqw, 26px);
  letter-spacing: .2em;
}

#app.game-stage .palace-master__pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9%;
  height: 12.43%;
  margin-top: 1.13%;
}

#app.game-stage .palace-master__pager button,
#app.game-stage .palace-master__pager > div {
  position: relative;
  height: 79.55%;
  padding: 0;
  border: 0;
  background: none;
}

#app.game-stage .palace-master__pager button {
  width: 15.56%;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}

#app.game-stage .palace-master__pager button:not(:disabled):hover,
#app.game-stage .palace-master__pager button:not(:disabled):focus-visible {
  outline: none;
  transform: translateY(-.32cqh);
  filter: drop-shadow(0 .55cqh .4cqh rgba(42, 63, 51, .2));
}

#app.game-stage .palace-master__pager button:disabled {
  opacity: .35;
  cursor: default;
}

#app.game-stage .palace-master__pager > div {
  display: grid;
  place-items: center;
  width: 38.22%;
  color: var(--palace-master-ink-soft);
  font-family: var(--rs-font-kai);
  font-size: clamp(8px, .95cqw, 16px);
  letter-spacing: .14em;
}

#app.game-stage .palace-master__pager img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

#app.game-stage .palace-master__pager > div span {
  position: relative;
  z-index: 1;
}

#app.game-stage .palace-master__portrait {
  position: absolute;
  z-index: 1;
  top: 21.55%;
  left: 63.47%;
  width: 24.28%;
  height: 63.3%;
  overflow: hidden;
  background: radial-gradient(circle at 52% 25%, rgba(255, 255, 255, .92), rgba(218, 226, 207, .64) 55%, rgba(119, 150, 135, .52));
}

#app.game-stage .palace-master__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.04);
  transform-origin: center top;
}

#app.game-stage .palace-master__profile {
  position: absolute;
  z-index: 4;
  top: 18.64%;
  left: 33.29%;
  width: 26.13%;
  height: 68.74%;
  padding: 0 .35%;
}

#app.game-stage .palace-master__profile--empty {
  display: grid;
  place-items: center;
  color: var(--palace-master-ink-soft);
  font-family: var(--rs-font-kai);
  font-size: clamp(14px, 1.8cqw, 30px);
  letter-spacing: .2em;
}

#app.game-stage .palace-master__identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24.34%;
  align-items: end;
  min-height: 10.17%;
  padding: 0 1.8% 1.4%;
  border-bottom: 1px solid rgba(146, 119, 71, .35);
}

#app.game-stage .palace-master__identity strong {
  min-width: 0;
  color: inherit;
  font-family: var(--rs-font-kai);
  font-size: clamp(17px, 2.14cqw, 36px);
  font-weight: 500;
  letter-spacing: .1em;
  line-height: 1.08;
  white-space: nowrap;
}

#app.game-stage .palace-master__identity span {
  color: var(--palace-master-ink-soft);
  font-family: var(--rs-font-kai);
  font-size: clamp(9px, 1.14cqw, 19px);
  letter-spacing: .1em;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}

#app.game-stage .palace-master__profile-lines {
  display: grid;
  gap: .18cqh;
  min-height: 31.07%;
  margin: 1.7% 0 1.4%;
}

#app.game-stage .palace-master__profile-line {
  display: grid;
  grid-template-columns: 18.14% minmax(0, 1fr);
  align-items: start;
  min-height: 5.65%;
  padding: .28% 1.8%;
  font-family: var(--rs-font-kai);
  font-size: clamp(9px, 1.13cqw, 19px);
  line-height: 1.35;
}

#app.game-stage .palace-master__profile-line--family {
  min-height: 13.56%;
}

#app.game-stage .palace-master__profile-line > span {
  color: var(--palace-master-ink-soft);
  letter-spacing: .12em;
}

#app.game-stage .palace-master__profile-line > b {
  min-width: 0;
  color: inherit;
  font-weight: 500;
  letter-spacing: .04em;
  white-space: normal;
  overflow-wrap: anywhere;
}

#app.game-stage .palace-master__profile-rule {
  position: relative;
  height: 2.26%;
  margin: 0 1.8% 1.13%;
  border-top: 1px solid rgba(146, 119, 71, .35);
}

#app.game-stage .palace-master__profile-rule::before {
  content: "";
  position: absolute;
  top: -.35cqh;
  left: 50%;
  width: .45cqw;
  height: .45cqw;
  border: 1px solid var(--palace-master-gold);
  background: var(--palace-master-paper);
  transform: translateX(-50%) rotate(45deg);
}

#app.game-stage .palace-master__attrs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 4%;
  row-gap: .28%;
  padding: 0 1.8%;
  font-family: var(--rs-font-kai);
}

#app.game-stage .palace-master__attr {
  display: grid;
  grid-template-columns: 14% minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  min-height: 6.5%;
  font-size: clamp(9px, 1.09cqw, 18px);
}

#app.game-stage .palace-master__attr-gem {
  display: grid;
  place-items: center;
  width: .98cqw;
  height: .98cqw;
  color: #f4e8c5;
  background: var(--palace-master-jade);
  border: 1px solid var(--palace-master-gold);
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22);
}

#app.game-stage .palace-master__attr-gem i {
  font-size: clamp(5px, .55cqw, 9px);
  font-style: normal;
  transform: rotate(-45deg);
}

#app.game-stage .palace-master__attr > span:nth-child(2) {
  color: var(--palace-master-ink-soft);
  letter-spacing: .12em;
}

#app.game-stage .palace-master__attr > strong {
  justify-self: end;
  min-width: 0;
  color: inherit;
  font-size: clamp(10px, 1.23cqw, 21px);
  letter-spacing: .04em;
  white-space: nowrap;
}

#app.game-stage .palace-master__actions {
  position: absolute;
  z-index: 8;
  top: 83.88%;
  left: 41.62%;
  width: 25.43%;
  height: 14.37%;
}

#app.game-stage .palace-master__action {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: #f8edce;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease;
}

#app.game-stage .palace-master__action img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

#app.game-stage .palace-master__action span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  padding-bottom: 2%;
  font-family: var(--rs-font-kai);
  font-size: clamp(16px, 2cqw, 34px);
  letter-spacing: .18em;
  text-indent: .18em;
  text-shadow: 0 2px 2px rgba(23, 45, 37, .68);
}

#app.game-stage .palace-master__action:not(:disabled):hover,
#app.game-stage .palace-master__action:not(:disabled):focus-visible {
  outline: none;
  transform: translateY(-.53cqh);
  filter: drop-shadow(0 0 .3cqw rgba(255, 232, 169, .88)) drop-shadow(0 1cqh .6cqh rgba(42, 62, 51, .25));
}

#app.game-stage .palace-master__action:not(:disabled):active {
  transform: translateY(-.1cqh) scale(.985);
}

#app.game-stage .palace-master__action:disabled {
  opacity: .42;
  cursor: default;
}

#app.game-stage .palace-master__return {
  position: absolute;
  z-index: 9;
  right: 2.69cqw;
  bottom: 4.14cqh;
  width: 8.25cqw;
  height: 15.09cqh;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease;
}

#app.game-stage .palace-master__return img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

#app.game-stage .palace-master__return:hover,
#app.game-stage .palace-master__return:focus-visible {
  outline: none;
  transform: translateY(-.53cqh) rotate(-2deg);
  filter: drop-shadow(0 0 .3cqw rgba(255, 232, 169, .9)) drop-shadow(0 1cqh .6cqh rgba(42, 62, 51, .26));
}

@media (prefers-reduced-motion: reduce) {
  #app.game-stage .palace-roster-master *,
  #app.game-stage .palace-roster-master *::before,
  #app.game-stage .palace-roster-master *::after {
    transition-duration: .01ms !important;
  }
}
/* 2026-07-30：乌衣巷／阡陌巷／积贫巷邻居页。
   三巷共用黑漆旧金 5×2 卡册，只替换各自的无人物环境底图。 */

#app.game-stage .residence-neighbor-register {
  min-height: 100%;
  background-color: #cfc7b2;
  background-image: var(--scene-bg);
  background-position: center;
  background-size: cover;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
}

#app.game-stage .residence-neighbor-register::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(28, 20, 15, .13);
}

#app.game-stage .residence-neighbor-register .residence-top {
  position: absolute;
  z-index: 8;
  inset: 0;
  height: 100%;
  padding: 0;
  display: block;
  pointer-events: none;
}

#app.game-stage .residence-neighbor-register .residence-name {
  position: absolute;
  left: 2.57cqw;
  top: 2.44cqh;
  width: 19.98cqw;
  height: 11.26cqh;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: none;
  color: #33271e;
  filter: drop-shadow(0 8px 8px rgba(20, 12, 7, .44));
  pointer-events: none;
}

#app.game-stage .residence-neighbor-register .residence-name img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

#app.game-stage .residence-neighbor-register .residence-name span {
  position: relative;
  z-index: 1;
  margin-top: -2px;
  color: #33271e;
  font-size: clamp(23px, 2.4cqw, 40px);
  font-weight: 500;
  letter-spacing: .25em;
  text-indent: .25em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
  white-space: nowrap;
}

#app.game-stage .residence-neighbor-register .residence-back {
  position: absolute;
  z-index: 9;
  right: 2.93cqw;
  top: 2.55cqh;
  width: 4.67cqw;
  height: 8.29cqh;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: none;
  color: #233b36;
  filter: drop-shadow(0 7px 7px rgba(17, 10, 5, .48));
  pointer-events: auto;
  transition: transform 140ms ease, filter 140ms ease;
}

#app.game-stage .residence-neighbor-register .residence-back img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

#app.game-stage .residence-neighbor-register .residence-back span {
  position: relative;
  z-index: 1;
  color: #233b36;
  font-size: clamp(17px, 1.45cqw, 24px);
  font-weight: 800;
  text-shadow: 0 1px 0 #fff9de;
}

#app.game-stage .residence-neighbor-register .residence-back:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 10px 8px rgba(17, 10, 5, .58)) brightness(1.08);
}

#app.game-stage .residence-neighbor-register .residence-grid {
  position: absolute;
  z-index: 4;
  left: 5.02cqw;
  top: 12.33cqh;
  right: auto;
  bottom: auto;
  width: 80.62cqw;
  height: 75.45cqh;
  display: grid;
  grid-template-columns: repeat(5, 14.59cqw);
  grid-template-rows: repeat(2, 35.6cqh);
  column-gap: 1.91cqw;
  row-gap: 2.98cqh;
  align-content: start;
  justify-content: start;
}

#app.game-stage .residence-neighbor-register .residence-house-card {
  position: relative;
  width: 14.59cqw;
  height: 35.6cqh;
  min-width: 0;
  min-height: 0;
  isolation: isolate;
  display: block;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  color: #322118;
  box-shadow: none;
  filter: drop-shadow(0 12px 12px rgba(29, 16, 8, .38));
  transition: transform 150ms ease, filter 150ms ease;
}

#app.game-stage .residence-neighbor-register .residence-house-card:not(.house-empty):hover {
  transform: translateY(-5px);
  filter: drop-shadow(0 16px 14px rgba(29, 16, 8, .5)) brightness(1.035);
}

#app.game-stage .residence-neighbor-register .house-portrait {
  position: absolute;
  z-index: 1;
  left: 7.38%;
  top: 5.67%;
  width: 85.25%;
  height: 57.61%;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: none;
}

#app.game-stage .residence-neighbor-register .house-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center top;
  filter: saturate(.9) contrast(1.02);
}

#app.game-stage .residence-neighbor-register .residence-house-frame {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

#app.game-stage .residence-neighbor-register .house-info {
  position: absolute;
  z-index: 4;
  left: 11.48%;
  right: 11.48%;
  top: 61.79%;
  height: 18.21%;
  display: grid;
  grid-template-rows: 42% 29% 29%;
  gap: 0;
  align-items: center;
  color: #614735;
  font-family: "Source Han Sans", "SourceHan", "Songti SC", serif;
  text-align: center;
  letter-spacing: .05em;
}

#app.game-stage .residence-neighbor-register .house-info strong,
#app.game-stage .residence-neighbor-register .house-info span {
  display: block;
  overflow: hidden;
  color: inherit;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#app.game-stage .residence-neighbor-register .house-info strong {
  color: #281a13;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(15px, 1.43cqw, 24px);
  font-weight: 500;
  letter-spacing: .08em;
}

#app.game-stage .residence-neighbor-register .house-info span {
  font-size: clamp(9px, .79cqw, 13px);
  font-weight: 600;
  line-height: 1;
}

#app.game-stage .residence-neighbor-register .house-info .house-occ {
  color: #614735;
}

#app.game-stage .residence-neighbor-register .house-acts {
  position: absolute;
  z-index: 5;
  left: 19.26%;
  top: 81.79%;
  width: 61.48%;
  height: 11.64%;
  margin: 0;
  display: block;
}

#app.game-stage .residence-neighbor-register .mini-btn {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #fff0cf;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(14px, 1.2cqw, 20px);
  line-height: 1;
  letter-spacing: .25em;
  text-indent: .25em;
  text-align: center;
  text-shadow: 0 2px 2px rgba(66, 12, 4, .72);
  transition: color 120ms ease, transform 120ms ease;
}

#app.game-stage .residence-neighbor-register .mini-btn:hover {
  border: 0;
  background: none;
  color: #fff8df;
  transform: scale(1.025);
}

#app.game-stage .residence-neighbor-register .house-empty {
  opacity: .72;
}

#app.game-stage .residence-neighbor-register .house-empty .house-info {
  grid-template-rows: 56% 44%;
}

#app.game-stage .residence-neighbor-register .house-empty .house-info strong,
#app.game-stage .residence-neighbor-register .house-empty .house-none {
  color: #6a5c44;
}

#app.game-stage .residence-neighbor-register .residence-side {
  position: absolute;
  z-index: 7;
  top: 12.75cqh;
  right: 2.57cqw;
  width: 8.97cqw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.06cqh;
  transform: none;
}

#app.game-stage .residence-neighbor-register .residence-side-btn {
  position: relative;
  width: 7.3cqw;
  height: 22.74cqh;
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: none;
  color: #f4d99d;
  filter: drop-shadow(0 9px 8px rgba(17, 10, 5, .48));
  transition: transform 140ms ease, filter 140ms ease;
}

#app.game-stage .residence-neighbor-register .residence-side-btn img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

#app.game-stage .residence-neighbor-register .residence-side-btn span {
  position: relative;
  z-index: 1;
  width: 1.9cqw;
  color: #f4d99d;
  font-size: clamp(15px, 1.31cqw, 22px);
  line-height: 1.16;
  text-align: center;
  text-shadow: 0 2px 3px #050402;
}

#app.game-stage .residence-neighbor-register .residence-side-btn--primary span {
  color: #fff0bf;
}

#app.game-stage .residence-neighbor-register .residence-side-btn:hover {
  border: 0;
  background: none;
  transform: translateX(-5px);
  filter: drop-shadow(0 11px 10px rgba(17, 10, 5, .6)) brightness(1.12);
}

#app.game-stage .residence-neighbor-register .residence-pager {
  position: absolute;
  z-index: 8;
  left: 29.07cqw;
  bottom: 2.44cqh;
  width: 41.87cqw;
  height: 8.82cqh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.08cqw;
}

#app.game-stage .residence-neighbor-register .residence-page {
  position: relative;
  width: 10.53cqw;
  height: 6.48cqh;
  min-width: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: none;
  color: #493526;
  filter: drop-shadow(0 6px 6px rgba(22, 13, 7, .38));
  transition: transform 130ms ease, filter 130ms ease;
}

#app.game-stage .residence-neighbor-register .residence-page img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

#app.game-stage .residence-neighbor-register .residence-page span {
  position: relative;
  z-index: 1;
  margin-top: -2px;
  color: #493526;
  font-family: "Royal Kai", "STKaiti", "KaiTi", serif;
  font-size: clamp(14px, 1.26cqw, 21px);
  letter-spacing: .14em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}

#app.game-stage .residence-neighbor-register .residence-page:not(:disabled):hover {
  border: 0;
  background: none;
  transform: translateY(-3px);
  filter: drop-shadow(0 8px 7px rgba(22, 13, 7, .48)) brightness(1.06);
}

#app.game-stage .residence-neighbor-register .residence-page:disabled {
  opacity: .48;
  cursor: default;
}

#app.game-stage .residence-neighbor-register .residence-pageno {
  min-width: 7.06cqw;
  color: #f8e7bd;
  font-family: "Source Han Sans", "SourceHan", "Songti SC", serif;
  font-size: clamp(12px, 1.01cqw, 17px);
  text-align: center;
  letter-spacing: .18em;
  text-shadow: 0 2px 4px #2c190d, 0 0 6px #2c190d;
}

#app.game-stage .residence-neighbor-register button:focus-visible {
  outline: 2px solid #f3d18c;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  #app.game-stage .residence-neighbor-register .residence-house-card,
  #app.game-stage .residence-neighbor-register .residence-side-btn,
  #app.game-stage .residence-neighbor-register .residence-page,
  #app.game-stage .residence-neighbor-register .residence-back,
  #app.game-stage .residence-neighbor-register .mini-btn {
    transition: none;
  }
}
/* 白金花枝按钮试接入（2026-08-13·华丽克制版）
 * 只给已确认的象牙白素按钮叠加完整花枝珠框，不改尺寸、圆角、文字与交互。
 * 页面专属按钮、危险按钮、青玉整页返回与地图热区不在此处换皮。
 */

#app.game-stage :where(
  .button-floral-ivory,
  .member-info-navbtn,
  .member-info-footbtn,
  .setup-field > .setup-mini,
  .setup-attrs-actions > .setup-mini,
  .setup-realm-actions > .setup-mini,
  .setup-prefs-actions > .setup-mini,
  .setup-clan-ctl > .setup-mini,
  .map-head button
) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-shadow: 0 1px 0 rgba(255, 253, 236, .9);
}

/* 中长钮：加粗双线框、左右完整花簇、卷草与珠边。 */
#app.game-stage :where(
  .button-floral-ivory,
  .member-info-navbtn,
  .member-info-footbtn
)::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: url("./assets/ui/buttons/button-floral-frame-long-luxe-20260813.png") center / 100% 100% no-repeat;
  opacity: 1;
  transition: filter .14s ease, opacity .14s ease;
}

/* 紧凑小钮使用独立短框，保留清楚花簇且不压缩长框。 */
#app.game-stage :where(
  .setup-field > .setup-mini,
  .setup-attrs-actions > .setup-mini,
  .setup-realm-actions > .setup-mini,
  .setup-prefs-actions > .setup-mini,
  .setup-clan-ctl > .setup-mini,
  .map-head button
)::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: url("./assets/ui/buttons/button-floral-frame-compact-luxe-20260813.png") center / 100% 100% no-repeat;
  opacity: 1;
  transition: filter .14s ease, opacity .14s ease;
}

#app.game-stage :where(
  .button-floral-ivory,
  .member-info-navbtn,
  .member-info-footbtn,
  .setup-field > .setup-mini,
  .setup-attrs-actions > .setup-mini,
  .setup-realm-actions > .setup-mini,
  .setup-prefs-actions > .setup-mini,
  .setup-clan-ctl > .setup-mini,
  .map-head button
)::after {
  content: none;
}

#app.game-stage :where(
  .button-floral-ivory,
  .member-info-navbtn,
  .member-info-footbtn,
  .setup-field > .setup-mini,
  .setup-attrs-actions > .setup-mini,
  .setup-realm-actions > .setup-mini,
  .setup-prefs-actions > .setup-mini,
  .setup-clan-ctl > .setup-mini,
  .map-head button
):hover:not(:disabled)::before {
  opacity: 1;
  filter: brightness(1.1) saturate(1.05);
}

#app.game-stage :where(
  .button-floral-ivory,
  .member-info-navbtn,
  .member-info-footbtn,
  .setup-field > .setup-mini,
  .setup-attrs-actions > .setup-mini,
  .setup-realm-actions > .setup-mini,
  .setup-prefs-actions > .setup-mini,
  .setup-clan-ctl > .setup-mini,
  .map-head button
):disabled::before {
  opacity: .44;
  filter: saturate(.72);
}

/* 人物资料／家族页真实动态标题：同族花框，较按钮舒展，不增加说明性文案。 */
#app.game-stage .member-info-title {
  position: relative;
  isolation: isolate;
  overflow: visible;
  background: linear-gradient(180deg, rgba(247, 240, 211, .98), rgba(220, 207, 168, .98));
  border-color: rgba(174, 124, 46, .76);
  box-shadow: 0 5px 13px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(255, 255, 241, .7);
}

#app.game-stage .member-info-title::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -5px -13px;
  pointer-events: none;
  background: url("./assets/ui/buttons/member-info-title-frame-luxe-20260813.png") center / 100% 100% no-repeat;
}

/* 返回按钮第二批（2026-08-13）：显式标记，不按文字或通用按钮类扩散。 */
#app.game-stage :where(
  .return-floral-jade,
  .return-floral-vermilion,
  .return-floral-ivory
) {
  overflow: hidden;
  isolation: isolate;
}

#app.game-stage .return-floral-ivory { position: relative; }
#app.game-stage :where(.return-floral-jade, .return-floral-vermilion) { position: absolute; }

#app.game-stage :where(
  .return-floral-jade,
  .return-floral-vermilion,
  .return-floral-ivory
)::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: center / 100% 100% no-repeat;
  opacity: 1;
  transition: filter .14s ease, opacity .14s ease;
}

/* 玉钮保留青玉材质，只叠玉雕金枝框；不用白钮框硬套。 */
#app.game-stage .return-floral-jade::before {
  background-image: url("./assets/ui/buttons/return-frame-jade-luxe-20260813.svg");
}

#app.game-stage .affairs-book-screen .affairs-book__return.return-floral-jade {
  z-index: 9;
  right: clamp(28px, 3.6cqw, 48px);
  bottom: clamp(20px, 3cqh, 32px);
}

/* 人物拜访离开保留深朱底，叠暗金枝蔓与珠边。 */
#app.game-stage .return-floral-vermilion::before {
  background-image: url("./assets/ui/buttons/return-frame-vermilion-luxe-20260813.svg");
}

/* 独立局部长钮使用完整象牙白金花框。 */
#app.game-stage .return-floral-ivory::before {
  background-image: url("./assets/ui/buttons/button-floral-frame-long-luxe-20260813.png");
}

#app.game-stage .return-floral-ivory--compact::before {
  background-image: url("./assets/ui/buttons/button-floral-frame-compact-luxe-20260813.png");
}

#app.game-stage :where(
  .return-floral-jade,
  .return-floral-vermilion,
  .return-floral-ivory
):hover:not(:disabled)::before {
  filter: brightness(1.1) saturate(1.06);
}

#app.game-stage :where(
  .return-floral-jade,
  .return-floral-vermilion,
  .return-floral-ivory
):disabled::before {
  opacity: .44;
  filter: saturate(.72);
}
