/* ============ 角色扮演类通用样式 ============ */
.rpg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: var(--rp-text);
  font-family: var(--font);
  --rp-text: #F2E7D6;
  --rp-mute: rgba(242, 231, 214, .62);
  --rp-card: rgba(20, 16, 14, .82);
  --rp-line: rgba(255, 220, 170, .18);
  --rp-accent: #E58B3C;
  --rp-good: #7FBF7A;
  --rp-bad: #E06A5A;
  --rp-radius: 13px;
}
.rpg-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.rpg-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.rpg-ui > * { pointer-events: auto; }

/* ---------------- 顶栏状态 ---------------- */
.rp-strip {
  position: absolute;
  left: 14px;
  top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: calc(100% - 280px);
}
.rp-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--rp-card);
  border: 1px solid var(--rp-line);
  backdrop-filter: blur(6px);
  font-size: 12px;
  color: var(--rp-mute);
  white-space: nowrap;
}
.rp-pill b {
  font-family: var(--font-num);
  font-size: 15px;
  color: var(--rp-text);
  font-weight: 700;
}

/* ---------------- 右栏 ---------------- */
.rp-side {
  position: absolute;
  right: 14px;
  top: 13px;
  width: 238px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: calc(100% - 28px);
}
.rp-card {
  background: var(--rp-card);
  border: 1px solid var(--rp-line);
  border-radius: var(--rp-radius);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.rp-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--rp-mute);
  border-bottom: 1px solid var(--rp-line);
}
.rp-card-head em { font-style: normal; margin-left: auto; font-size: 11px; color: var(--rp-accent); }
.rp-card-body {
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--rp-text);
}
.rp-card-body p + p { margin-top: 6px; }
.rp-scroll { max-height: 168px; overflow: auto; scrollbar-width: thin; }

/* ---------------- 按钮 ---------------- */
.rp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--rp-line);
  background: rgba(255, 255, 255, .06);
  color: var(--rp-text);
  font-size: 12.5px;
  letter-spacing: .02em;
  transition: transform .12s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
}
.rp-btn:hover { border-color: var(--rp-accent); }
.rp-btn:active { transform: translateY(1px); }
.rp-btn.primary {
  background: linear-gradient(180deg, rgba(255, 168, 90, .96), var(--rp-accent));
  border-color: transparent;
  color: #241304;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
}
.rp-btn.ghost { background: transparent; }
.rp-btn:disabled { opacity: .42; filter: grayscale(.3); cursor: not-allowed; }

/* ---------------- 条 ---------------- */
.rpg-bar-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11.5px;
  color: var(--rp-mute);
}
.rpg-bar-name { white-space: nowrap; }
.rpg-bar {
  height: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
  display: block;
}
.rpg-bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .5), var(--rp-accent));
  transition: width .3s var(--ease);
}
.rpg-bar i.is-good { background: linear-gradient(90deg, #5FA96F, #9AD8A0); }
.rpg-bar i.is-bad { background: linear-gradient(90deg, #B4473C, #E06A5A); }
.rpg-bar i.is-san { background: linear-gradient(90deg, #6A7FD1, #A9B6F2); }
.rpg-bar-num { font-family: var(--font-num); font-size: 11px; color: var(--rp-text); }

/* ---------------- 任务板 ---------------- */
.rpg-quests { font-size: 12px; }
.rq-group + .rq-group { margin-top: 10px; }
.rq-head {
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--rp-accent);
  margin-bottom: 6px;
  opacity: .9;
}
.rq-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin-bottom: 8px; }
.rq-item.is-done { opacity: .55; }
.rq-name { font-size: 12px; color: var(--rp-text); }
.rq-name .rq-hidden {
  display: inline-block; margin-left: 5px; font-size: 10px; color: var(--rp-mute);
}
.rq-num { font-family: var(--font-num); font-size: 11px; color: var(--rp-mute); }
.rq-bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.rq-bar i { display: block; height: 100%; background: var(--rp-accent); border-radius: 3px; opacity: .85; }

/* ---------------- 中央纸页 / 对话框 ---------------- */
.rp-sheet {
  position: absolute;
  background: var(--rp-paper, rgba(20, 16, 14, .9));
  color: var(--rp-ink, #241A12);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(0, 0, 0, .06);
  padding: 18px 20px;
}
.rp-sheet h3 { font-size: 16px; letter-spacing: .02em; }
.rp-sheet p { margin-top: 8px; font-size: 12.5px; line-height: 1.8; }

.rp-dialog {
  position: absolute;
  left: 16px;
  right: 268px;
  bottom: 14px;
  background: var(--rp-card);
  border: 1px solid var(--rp-line);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  padding: 14px 16px 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.rp-dialog-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--rp-accent);
  letter-spacing: .04em;
}
.rp-dialog-head b { font-size: 14px; color: var(--rp-text); letter-spacing: 0; }
.rp-dialog-text {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--rp-text);
  min-height: 44px;
}
.rp-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.rp-choice {
  text-align: left;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid var(--rp-line);
  background: rgba(255, 255, 255, .05);
  color: var(--rp-text);
  font-size: 12px;
  transition: background .15s, border-color .15s, transform .12s;
}
.rp-choice:hover { border-color: var(--rp-accent); background: rgba(255, 255, 255, .1); }
.rp-choice:active { transform: translateY(1px); }
.rp-choice .cost { margin-left: 6px; color: var(--rp-mute); font-size: 11px; }

/* ---------------- 日志 ---------------- */
.rp-log {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--rp-mute);
}
.rp-log p + p { margin-top: 4px; }
.rp-log .ok { color: var(--rp-good); }
.rp-log .bad { color: var(--rp-bad); }
.rp-log .hl { color: var(--rp-text); }

/* ---------------- 提示条 ---------------- */
.rp-hint {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-size: 11px;
  color: var(--rp-mute);
  letter-spacing: .02em;
}

/* ---------------- 主题：余烬 ---------------- */
.rpg[data-rpg="ember"] {
  --rp-card: rgba(24, 17, 15, .82);
  --rp-line: rgba(255, 186, 120, .18);
  --rp-accent: #E58B3C;
  --rp-mute: rgba(240, 220, 196, .6);
  --rp-text: #F2E4D0;
}

/* ---------------- 主题：夜话 ---------------- */
.rpg[data-rpg="talk"] {
  --rp-card: rgba(9, 17, 32, .8);
  --rp-line: rgba(120, 210, 255, .22);
  --rp-accent: #63D8F2;
  --rp-mute: rgba(200, 226, 255, .6);
  --rp-text: #DCEBFF;
  --rp-bad: #FF7A94;
  --rp-good: #79E3B4;
}
.rpg[data-rpg="talk"] .rpg-bar i { background: linear-gradient(90deg, rgba(99, 216, 242, .5), #63D8F2); }

/* ---------------- 主题：守夜 ---------------- */
.rpg[data-rpg="watch"] {
  --rp-card: rgba(14, 20, 16, .84);
  --rp-line: rgba(214, 178, 94, .2);
  --rp-accent: #C8A45C;
  --rp-mute: rgba(214, 226, 208, .58);
  --rp-text: #E2EAD9;
}

/* ---------------- 主题：行商 ---------------- */
.rpg[data-rpg="trade"] {
  --rp-card: rgba(26, 22, 16, .84);
  --rp-line: rgba(226, 186, 120, .22);
  --rp-accent: #E0B071;
  --rp-mute: rgba(238, 226, 200, .58);
  --rp-text: #F3E8D2;
}
.rpg[data-rpg="trade"] .rpg-bar i { background: linear-gradient(90deg, #C7B98E, #E0B071); }

/* 小屏：右栏变成下方抽屉式，仍不出现整排按钮 */
@media (max-width: 720px) {
  .rp-side {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 10px;
    width: auto;
    max-height: 42%;
    flex-direction: row;
    overflow-x: auto;
  }
  .rp-side .rp-card { min-width: 220px; flex: 1 1 0; }
  .rp-strip { max-width: calc(100% - 20px); }
  .rp-dialog { left: 10px; right: 10px; bottom: 168px; padding: 12px; }
  .rp-hint { display: none; }
}

/* ============ 余烬行记：路线与战斗 ============ */
.rp-center {
  position: absolute;
  left: 14px;
  right: 264px;
  top: 56px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rp-route {
  flex: 1;
  overflow: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
}
.rp-layer { display: flex; align-items: center; gap: 10px; }
.rp-layer.is-future { opacity: .45; }
.rp-layer.is-past { opacity: .5; }
.rp-layer-no {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-num); font-size: 11px;
  color: var(--rp-mute); border: 1px solid var(--rp-line);
}
.rp-node {
  position: relative; flex: 1 1 0; min-height: 52px;
  display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto;
  align-content: center; column-gap: 8px; padding: 8px 12px; text-align: left;
  border-radius: 11px; border: 1px solid var(--rp-line);
  background: rgba(255,255,255,.04); color: var(--rp-text);
  transition: border-color .18s, background .18s, transform .14s;
}
.rp-node:hover { border-color: var(--rp-accent); background: rgba(255,160,90,.1); transform: translateY(-1px); }
.rp-node i { grid-row: 1 / 3; align-self: center; font-style: normal; font-size: 18px; color: var(--rp-accent); }
.rp-node b { font-size: 12.5px; font-weight: 600; }
.rp-node em { font-style: normal; font-size: 10.5px; color: var(--rp-mute); line-height: 1.5; }
.rp-node.is-elite { border-color: rgba(224,106,90,.35); }
.rp-node.is-elite i { color: #E06A5A; }
.rp-node.is-boss { border-color: rgba(255,179,71,.5); }
.rp-node.is-past, .rp-node.is-veil { flex: none; width: 116px; min-height: 34px; grid-template-columns: 16px 1fr; }
.rp-node.is-past b, .rp-node.is-veil b { font-size: 11px; color: var(--rp-mute); }
.rp-node.is-veil i { color: var(--rp-mute); }

.rp-sheet { max-width: 420px; margin: auto; }

.rp-enemies { display: flex; gap: 10px; flex-wrap: wrap; }
.rp-enemy {
  flex: 1 1 168px; padding: 9px 11px; border-radius: 11px;
  background: var(--rp-card); border: 1px solid var(--rp-line); backdrop-filter: blur(6px);
}
.rp-enemy.is-boss { border-color: rgba(255,179,71,.55); box-shadow: 0 0 24px rgba(255,130,40,.2); }
.rp-enemy.is-elite { border-color: rgba(224,106,90,.45); }
.re-name { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; margin-bottom: 5px; }
.re-intent { margin-left: auto; font-size: 10.5px; color: var(--rp-accent); }
.re-num { font-family: var(--font-num); font-size: 11px; color: var(--rp-mute); margin-top: 4px; }

.rp-hand { margin-top: auto; display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.rp-handcard {
  flex: 1 1 0; min-width: 96px; max-width: 132px; height: 138px; border-radius: 12px; border: 1px solid var(--rp-line);
  background: linear-gradient(165deg, rgba(52,34,24,.92), rgba(18,12,10,.95));
  color: var(--rp-text); padding: 10px; text-align: left; display: flex; flex-direction: column; gap: 5px;
  position: relative; transition: transform .14s var(--ease), border-color .16s, box-shadow .16s;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
.rp-handcard:hover { transform: translateY(-4px); border-color: var(--rp-accent); }
.rp-handcard.is-used { opacity: .38; transform: none; }
.rp-handcard.is-dim { opacity: .62; }
.rp-handcard.is-end { background: linear-gradient(165deg, rgba(40,30,22,.9), rgba(14,11,9,.95)); }
.hc-cost {
  position: absolute; right: 8px; top: 7px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-num); font-size: 12px; font-weight: 700;
  color: #241304; background: var(--rp-accent);
}
.hc-art { height: 30px; display: block; }
.hc-art.is-slash { background: linear-gradient(100deg, transparent 46%, rgba(255,210,160,.8) 47%, rgba(255,210,160,.8) 51%, transparent 52%), radial-gradient(closest-side, rgba(255,150,90,.35), transparent); }
.hc-art.is-guard { background: linear-gradient(180deg, transparent 40%, rgba(180,210,255,.7) 41%, rgba(180,210,255,.7) 58%, transparent 59%), radial-gradient(closest-side, rgba(160,200,255,.28), transparent); }
.hc-art.is-kindle { background: radial-gradient(circle at 50% 62%, rgba(255,190,90,.95), rgba(255,110,40,.55) 42%, transparent 68%); }
.hc-art.is-dash { background: repeating-linear-gradient(105deg, rgba(255,220,180,.7) 0 2px, transparent 2px 9px); opacity: .8; }
.hc-art.is-burst { background: radial-gradient(circle at 50% 55%, rgba(255,240,200,.95), rgba(255,120,40,.7) 38%, transparent 70%); }
.hc-art.is-end { background: linear-gradient(180deg, rgba(220,220,220,.2), transparent); }
.hc-name { font-size: 13px; font-weight: 600; }
.hc-desc { font-style: normal; font-size: 10.5px; line-height: 1.55; color: var(--rp-mute); }

.rp-relic-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.rp-relic { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--rp-line); color: var(--rp-accent); }

.rp-rewards { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.rp-reward {
  width: 168px; padding: 14px 13px; border-radius: 12px; border: 1px solid var(--rp-line);
  background: rgba(40,28,20,.86); color: var(--rp-text); text-align: left;
  display: flex; flex-direction: column; gap: 6px; transition: transform .16s, border-color .16s;
}
.rp-reward:hover { transform: translateY(-3px); border-color: var(--rp-accent); }
.rp-reward i { font-style: normal; font-size: 20px; color: var(--rp-accent); }
.rp-reward b { font-size: 13px; }
.rp-reward em { font-style: normal; font-size: 10.5px; color: var(--rp-mute); line-height: 1.55; }
.rp-flavor { text-align: center; font-size: 11.5px; color: var(--rp-mute); }

@media (max-width: 720px) {
  .rp-center { left: 10px; right: 10px; top: 52px; bottom: 44%; }
  .rp-handcard { flex: 0 0 118px; height: 126px; }
}
.rp-act-name { font-size: 13px; font-weight: 600; color: var(--rp-accent); margin-bottom: 4px; }
.rp-note { margin-top: 6px; font-size: 10.5px; color: var(--rp-mute); }
.rp-side { overflow: hidden; }
.rp-card.is-fixed { flex: none; }
.rp-card.is-log { flex: none; }
.rp-card.is-log .rp-card-body { max-height: 74px; overflow: auto; }
.rp-card.is-grow { flex: 1 1 auto; min-height: 90px; display: flex; flex-direction: column; }
.rp-card.is-grow .rp-card-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.rp-node.is-veil { flex: 1 1 0; }
.rpg-host { min-height: 0; height: 100%; }
@media (max-width: 767px) { .rpg-host { min-height: 0; } }
.rp-card { flex: none; }
.rp-card.is-grow { flex: 1 1 auto; }
.rp-card.is-log .rp-card-body { max-height: 58px; }
/* 战斗中的火边絮语 */
.rp-logfloat {
  position: absolute; left: 22px; top: 74px; width: 226px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(20, 12, 6, .5);
  border: 1px solid rgba(255, 168, 96, .14);
  font-size: 12px; line-height: 1.75; color: #c9a684;
  pointer-events: none;
}
.rp-logfloat p { margin: 0; }
.rp-logfloat p.is-good { color: #9fd08a; }
.rp-logfloat p.is-bad { color: #e0846b; }
.rp-logfloat p.is-hint { color: #e8c07c; }

/* ---------------- 夜话：对话与线索 ---------------- */
.nt-side { width: 252px; }
.nt-dialog {
  position: absolute; left: 16px; right: 284px; bottom: 16px;
  padding: 16px 18px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(10,20,34,.88), rgba(6,12,20,.94));
  border: 1px solid rgba(120,210,255,.16);
  box-shadow: 0 18px 44px rgba(0,0,0,.5);
  cursor: pointer;
}
.nt-who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.nt-portrait {
  position: relative; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.18), rgba(10,20,34,.9));
  border: 1px solid rgba(120,210,255,.24); flex: none;
}
.nt-portrait i {
  position: absolute; left: 50%; top: 44%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: rgba(230,214,196,.8);
}
.nt-portrait::after {
  content: ''; position: absolute; left: 50%; bottom: 4px; width: 18px; height: 8px; margin-left: -9px;
  border-radius: 9px 9px 0 0; background: rgba(230,214,196,.55);
}
.nt-who b { display: block; font-size: 13px; color: var(--rp-text); }
.nt-who em { display: block; font-style: normal; font-size: 11px; color: var(--rp-mute); }
.nt-text { font-size: 15px; line-height: 1.95; color: var(--rp-text); min-height: 62px; letter-spacing: .2px; }
.nt-text.is-end { font-size: 14px; line-height: 1.9; }
.nt-foot { margin-top: 12px; display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.nt-choices { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.rp-choice em { font-style: normal; color: var(--rp-accent); margin-right: 8px; font-family: var(--font-num); }
.nt-next { min-width: 96px; }
.nt-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--rp-accent); margin-left: 8px; animation: nt-blink 1.2s infinite; }
@keyframes nt-blink { 0%, 60% { opacity: .25; } 80% { opacity: 1; } }
.nt-night { font-family: var(--font-title), serif; font-size: 20px; color: var(--rp-text); }
.nt-where { font-size: 11px; color: var(--rp-mute); margin: 2px 0 10px; letter-spacing: .3px; }
.nt-rel-list { display: flex; flex-direction: column; gap: 6px; }
.nt-rel { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--rp-mute); }
.nt-rel b { width: 34px; font-weight: 500; color: var(--rp-text); }
.nt-rel-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.nt-rel-bar i { display: block; height: 100%; background: linear-gradient(90deg, rgba(120,210,255,.5), var(--rp-accent)); }
.nt-rel em { font-style: normal; font-family: var(--font-num); color: var(--rp-mute); }
.nt-clues { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-clue { font-size: 11px; padding: 3px 8px; border-radius: 4px; background: rgba(120,210,255,.1); border: 1px solid rgba(120,210,255,.22); color: var(--rp-text); }
.nt-empty { font-size: 11px; color: var(--rp-mute); margin: 0; }
.nt-end-head { font-family: var(--font-title), serif; font-size: 18px; color: var(--rp-accent); margin-bottom: 10px; }
.nt-end-stat { margin-top: 12px; font-size: 11px; color: var(--rp-mute); }
@media (max-width: 720px) {
  .nt-side { width: 100%; }
  .nt-dialog { left: 10px; right: 10px; bottom: 10px; padding: 12px 14px; }
  .nt-text { font-size: 13px; }
}

/* ---------------- 守夜：闸门与排班 ---------------- */
.nw-side { width: 246px; }
.nw-lanterns { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.nw-lanterns i { width: 9px; height: 13px; border-radius: 2px; background: rgba(255,255,255,.08); }
.nw-lanterns i.on { background: linear-gradient(180deg, #FFD48A, #E59A43); box-shadow: 0 0 6px rgba(255,190,110,.5); }
.nw-nightline { font-size: 11px; color: var(--rp-mute); letter-spacing: .3px; }
.nw-threats { display: flex; flex-direction: column; gap: 7px; }
.nw-threat { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--rp-mute); }
.nw-threat b { width: 34px; font-weight: 500; color: var(--rp-text); }
.nw-tbar { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.nw-tbar i { display: block; height: 100%; }
.nw-tbar i.ok { background: linear-gradient(90deg, rgba(120,200,160,.5), #8FD3A8); }
.nw-tbar i.bad { background: linear-gradient(90deg, rgba(220,120,90,.4), #E06A5A); }
.nw-threat em { font-style: normal; font-family: var(--font-num); color: var(--rp-text); }
.nw-log p { margin: 0 0 4px; font-size: 11px; line-height: 1.6; color: var(--rp-mute); }
.nw-hand {
  position: absolute; left: 14px; right: 268px; bottom: 14px;
  padding: 10px 12px 12px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(10,20,18,.82), rgba(6,12,10,.94));
  border: 1px solid rgba(150,220,190,.16);
  box-shadow: 0 -8px 30px rgba(0,0,0,.4);
}
.nw-hint { font-size: 11px; color: var(--rp-mute); margin-bottom: 8px; letter-spacing: .3px; }
.nw-guards { display: flex; gap: 8px; }
.nw-guard {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 6px 8px; border-radius: 9px; cursor: pointer;
  border: 1px solid rgba(160,220,190,.18);
  background: rgba(18,30,26,.72); color: var(--rp-text);
  transition: transform .16s, border-color .16s, background .16s;
}
.nw-guard:hover { transform: translateY(-2px); border-color: rgba(190,240,210,.5); }
.nw-guard.is-sel { border-color: #8FD3A8; box-shadow: 0 0 0 1px rgba(143,211,168,.6), 0 8px 20px rgba(0,0,0,.4); }
.nw-guard.is-placed { background: rgba(30,52,44,.85); }
.nw-guard.is-tired { opacity: .7; }
.nw-ava { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, rgba(220,240,230,.2), rgba(8,16,14,.9)); position: relative; }
.nw-ava i { position: absolute; left: 50%; top: 46%; width: 9px; height: 9px; margin: -4px 0 0 -4px; border-radius: 50%; background: rgba(226,214,196,.75); }
.nw-gname { font-size: 12px; }
.nw-gpow { font-family: var(--font-num); font-size: 15px; color: #8FD3A8; line-height: 1; }
.nw-gtag { font-size: 10px; color: var(--rp-mute); text-align: center; line-height: 1.35; max-height: 26px; overflow: hidden; }
.nw-foot { margin-top: 9px; display: flex; justify-content: flex-end; }
.nw-go { min-width: 106px; }
@media (max-width: 720px) {
  .nw-side { width: 100%; }
  .nw-hand { left: 10px; right: 10px; bottom: 10px; }
  .nw-guards { flex-wrap: wrap; }
  .nw-guard { flex: 1 1 28%; }
}

/* ---------------- 行商：集市与车队 ---------------- */
.tr-side { width: 246px; }
.tr-slots { display: flex; gap: 4px; margin-bottom: 7px; }
.tr-slots i { flex: 1; height: 7px; border-radius: 2px; background: rgba(255,255,255,.08); }
.tr-slots i.on { background: linear-gradient(90deg, #E0B071, #F2CE92); }
.tr-cargo { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--rp-text); }
.tr-cargo em { font-style: normal; color: var(--rp-mute); }
.tr-stops { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 11px; color: var(--rp-mute); }
.tr-stops span { padding: 1px 4px; border-radius: 3px; }
.tr-stops span.is-pass { color: var(--rp-text); }
.tr-stops span.is-now { background: rgba(255,210,150,.14); color: var(--rp-accent); }
.tr-stops em { font-style: normal; color: rgba(255,255,255,.2); }
.tr-note { margin-top: 6px; font-size: 11px; color: var(--rp-mute); }
.tr-panel {
  position: absolute; left: 16px; right: 274px; bottom: 16px;
  padding: 12px 14px 12px; border-radius: 13px;
  background: linear-gradient(180deg, rgba(18,16,14,.84), rgba(10,9,8,.94));
  border: 1px solid rgba(255,210,150,.18);
  box-shadow: 0 -10px 34px rgba(0,0,0,.45);
}
.tr-panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.tr-panel-head b { font-family: var(--font-title), serif; font-size: 16px; color: var(--rp-text); }
.tr-panel-head span { font-size: 11px; color: var(--rp-mute); }
.tr-panel-head em { font-style: normal; font-family: var(--font-num); color: var(--rp-accent); }
.tr-rows { display: flex; flex-direction: column; gap: 4px; }
.tr-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; background: rgba(255,255,255,.03); }
.tr-row:hover { background: rgba(255,255,255,.07); }
.tr-g { width: 26px; font-size: 13px; color: var(--rp-text); }
.tr-p { font-size: 11px; color: var(--rp-mute); }
.tr-p b { font-family: var(--font-num); color: var(--rp-text); }
.tr-p b.is-sell { color: #9FD08A; }
.tr-own { margin-left: auto; font-family: var(--font-num); font-size: 12px; color: var(--rp-accent); }
.tr-mini {
  width: 40px; padding: 3px 0; border-radius: 5px; font-size: 11px; cursor: pointer;
  border: 1px solid rgba(255,210,150,.28); background: transparent; color: var(--rp-text);
}
.tr-mini:hover { background: rgba(255,210,150,.14); }
.tr-mini.is-sell { border-color: rgba(150,210,140,.3); }
.tr-mini:disabled { opacity: .35; cursor: not-allowed; }
.tr-panel-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.tr-tip { font-size: 11px; color: var(--rp-mute); }
.tr-event { text-align: left; }
.tr-ev-name { font-family: var(--font-title), serif; font-size: 17px; color: var(--rp-accent); margin-bottom: 6px; }
.tr-ev-text { font-size: 13px; line-height: 1.8; color: var(--rp-text); margin: 0 0 10px; }
.tr-ev-choices { display: flex; flex-direction: column; gap: 8px; }
.tr-finish { text-align: center; }
.tr-fin-name { font-family: var(--font-title), serif; font-size: 20px; color: var(--rp-accent); }
.tr-fin-actions { margin-top: 10px; display: flex; justify-content: center; }
@media (max-width: 720px) {
  .tr-side { width: 100%; }
  .tr-panel { left: 10px; right: 10px; bottom: 10px; }
  .tr-row { gap: 5px; }
}

.tr-logfloat {
  position: absolute; left: 18px; top: 62px; width: 210px;
  padding: 8px 10px; border-radius: 9px;
  background: rgba(20,16,12,.5); border: 1px solid rgba(224,176,113,.16);
  pointer-events: none;
}
.tr-logfloat p { margin: 0 0 3px; font-size: 11px; line-height: 1.6; color: rgba(238,226,200,.72); }

/* 余烬：开场纸页 */
.rp-sheet.rp-intro {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  width: min(440px, 76%); text-align: left; padding: 22px 26px 20px;
  background: linear-gradient(180deg, rgba(34,22,16,.94), rgba(16,10,8,.96));
  border: 1px solid rgba(255,186,120,.24); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.rp-sheet.rp-intro h3 { font-family: var(--font-title), serif; font-size: 24px; letter-spacing: 2px; color: var(--rp-accent); margin: 0 0 12px; }
.rp-sheet.rp-intro p { margin: 0 0 8px; font-size: 13px; line-height: 1.9; color: var(--rp-text); }
.rp-sheet.rp-intro p:last-child { color: var(--rp-mute); }

/* ---------------- 发酵地窖 ---------------- */
.cl-side { width: 246px; }
.cl-coin { font-size: 12px; color: var(--rp-mute); margin-bottom: 8px; }
.cl-coin b { font-family: var(--font-num); color: var(--rp-accent); }
.cl-actions { display: flex; gap: 8px; }
.cl-act {
  flex: 1; padding: 8px 6px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255,190,120,.24); background: rgba(255,170,90,.07);
  color: var(--rp-text); font-size: 12px; display: flex; flex-direction: column; gap: 2px;
}
.cl-act span { font-size: 10px; color: var(--rp-mute); }
.cl-act:hover { border-color: var(--rp-accent); background: rgba(255,170,90,.16); }
.cl-side { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.cl-side::-webkit-scrollbar { display: none; }
.cl-jars { display: flex; flex-direction: column; gap: 9px; }
.cl-jar { padding: 6px 8px 5px; border-radius: 7px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,190,120,.1); }
.cl-jar.is-ready { border-color: rgba(255,206,120,.5); background: rgba(255,180,90,.1); }
.cl-jar-top { display: flex; align-items: center; gap: 5px; }
.cl-jar-top .cl-mini { padding: 2px 6px; flex: none; }
.cl-jar-name { font-size: 11.5px; color: var(--rp-text); display: flex; align-items: baseline; gap: 5px; }
.cl-jar-name em { font-style: normal; font-size: 10px; color: var(--rp-mute); }
.cl-jar-pct { margin-left: auto; font-size: 10px; color: var(--rp-mute); font-family: var(--font-num); }
.cl-jar.is-ready .cl-jar-pct { color: var(--rp-accent); }
.cl-jar-bar { height: 3px; margin-top: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.cl-jar-bar i { display: block; height: 100%; transition: width .3s; }
.cl-jar-btns { display: flex; gap: 6px; }
.cl-jar-btns .cl-mini { flex: 1; }
.cl-mini {
  padding: 3px 6px; font-size: 10px; border-radius: 5px; cursor: pointer;
  border: 1px solid rgba(255,190,120,.24); background: transparent; color: var(--rp-text);
}
.cl-mini:hover { background: rgba(255,190,120,.14); }
.cl-logfloat { display: none; }
.cl-logfloat p { margin: 0 0 3px; font-size: 11px; line-height: 1.6; color: rgba(240,224,196,.7); }

/* ---------------- 雨夜电报站 ---------------- */
.tg-side { width: 252px; }
.tg-target { text-align: center; font-family: var(--font-num); font-size: 20px; letter-spacing: 3px; line-height: 1.7; color: var(--rp-accent); }
.tg-line { margin-top: 6px; font-size: 11px; color: var(--rp-mute); }
.tg-table { display: flex; flex-wrap: wrap; gap: 3px; }
.tg-code { font-size: 9.5px; padding: 1px 4px; border-radius: 4px; background: rgba(120,210,255,.08); border: 1px solid rgba(120,210,255,.18); color: var(--rp-text); }
.tg-code b { color: var(--rp-accent); margin-right: 3px; }
.tg-keys {
  position: absolute; left: 18px; right: 276px; bottom: 16px;
  display: flex; gap: 10px; padding: 12px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(8,18,30,.82), rgba(4,10,18,.94));
  border: 1px solid rgba(120,210,255,.18);
}
.tg-key {
  flex: 1; padding: 10px 0; border-radius: 9px; cursor: pointer;
  border: 1px solid rgba(120,210,255,.24); background: rgba(20,40,58,.7); color: var(--rp-text);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: transform .12s, background .12s;
}
.tg-key b { font-size: 20px; line-height: 1; color: var(--rp-accent); }
.tg-key span { font-size: 11px; color: var(--rp-mute); }
.tg-key:hover { background: rgba(40,70,96,.8); transform: translateY(-2px); }
.tg-key.is-send { background: rgba(120,210,255,.16); border-color: rgba(120,210,255,.5); }
.tg-key.is-ghost b { font-size: 16px; color: var(--rp-mute); }
.tg-logfloat {
  position: absolute; left: 22px; top: 62px; width: 250px; padding: 8px 10px; border-radius: 9px;
  background: rgba(8,18,30,.44); border: 1px solid rgba(120,210,255,.14); pointer-events: none;
}
.tg-logfloat p { margin: 0 0 3px; font-size: 11px; line-height: 1.6; color: rgba(214,232,248,.7); }

/* ---------------- 巷尾戏班 ---------------- */
.tp-side { width: 250px; }
.tp-stat { font-size: 11px; color: var(--rp-mute); }
.tp-stat b { font-family: var(--font-num); color: var(--rp-accent); }
.tp-play { margin-top: 6px; padding: 7px 9px; border-radius: 8px; cursor: pointer; background: rgba(200,164,92,.1); border: 1px dashed rgba(200,164,92,.4); display: flex; flex-direction: column; gap: 3px; }
.tp-play { flex-direction: row; align-items: baseline; gap: 8px; }
.tp-play b { font-size: 13px; color: var(--rp-text); margin-right: auto; }
.tp-play span { font-size: 10px; color: var(--rp-mute); }
.tp-play i { font-style: normal; font-size: 10px; color: var(--rp-accent); }
.tp-actors { display: flex; flex-direction: column; gap: 5px; }
.tp-actor {
  text-align: left; padding: 6px 8px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(200,164,92,.2); background: rgba(255,255,255,.03); color: var(--rp-text);
  display: flex; align-items: center; gap: 7px;
}
.tp-actor.is-sel { border-color: var(--rp-accent); background: rgba(200,164,92,.14); }
.tp-name { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.2; }
.tp-name em { font-style: normal; font-size: 10px; color: var(--rp-mute); }
.tp-stam { width: 40px; flex: none; height: 3px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.tp-stam i { display: block; height: 100%; background: linear-gradient(90deg, rgba(200,164,92,.4), #C8A45C); }
.tp-skills { display: flex; gap: 5px; font-size: 9.5px; line-height: 1.2; margin-left: auto; }
.tp-skills b { font-weight: 400; color: var(--rp-mute); }
.tp-skills b.on { color: #C8A45C; }
.tp-train { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tp-mini { flex: 1 1 30%; padding: 5px 0; font-size: 11px; border-radius: 6px; cursor: pointer; border: 1px solid rgba(200,164,92,.26); background: transparent; color: var(--rp-text); }
.tp-mini:hover { background: rgba(200,164,92,.14); }
.tp-row { display: flex; gap: 8px; }
.tp-row .rp-btn { flex: 1; }
.tp-logfloat {
  position: absolute; left: 20px; top: 64px; width: 250px; padding: 8px 10px; border-radius: 9px;
  background: rgba(20,14,8,.48); border: 1px solid rgba(200,164,92,.16); pointer-events: none;
}
.tp-logfloat p { margin: 0 0 3px; font-size: 11px; line-height: 1.6; color: rgba(238,222,192,.72); }

/* ---------------- 失物招领处 ---------------- */
.lf-side { width: 260px; }
.lf-stat { font-size: 11px; color: var(--rp-mute); }
.lf-stat b { font-family: var(--font-num); color: var(--rp-accent); }
.lf-hearts { display: flex; gap: 5px; margin-top: 8px; }
.lf-hearts i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(120,210,255,.3); }
.lf-hearts i.on { background: radial-gradient(circle at 40% 35%, #9FE0FF, #3A8CB4); box-shadow: 0 0 8px rgba(120,210,255,.5); }
.lf-owners { display: flex; flex-direction: column; gap: 6px; max-height: 252px; overflow-y: auto; scrollbar-width: thin; }
.lf-owner {
  text-align: left; padding: 7px 9px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(120,210,255,.18); background: rgba(255,255,255,.03); color: var(--rp-text);
  display: flex; flex-direction: column; gap: 2px;
}
.lf-owner b { font-size: 12px; font-weight: 500; }
.lf-owner span { font-size: 10px; color: var(--rp-mute); line-height: 1.5; }
.lf-owner:hover { border-color: var(--rp-accent); background: rgba(120,210,255,.1); }
.lf-owner.is-done { opacity: .4; cursor: default; }
.lf-board {
  position: absolute; left: 16px; right: 280px; bottom: 16px; top: auto;
  padding: 10px 12px 12px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(8,18,28,.8), rgba(4,9,14,.94));
  border: 1px solid rgba(120,210,255,.16);
}
.lf-board.is-shake { animation: lf-shake .34s; }
@keyframes lf-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  80% { transform: translateX(-3px); }
}
.lf-head { font-size: 11px; color: var(--rp-mute); margin-bottom: 8px; }
.lf-items { display: flex; gap: 8px; }
.lf-item {
  flex: 1 1 0; min-width: 0; text-align: left; padding: 10px 10px 9px; border-radius: 9px; cursor: pointer;
  border: 1px solid rgba(120,210,255,.18); background: rgba(255,255,255,.03); color: var(--rp-text);
  display: flex; flex-direction: column; gap: 4px; position: relative;
}
.lf-item:hover { border-color: rgba(120,210,255,.5); }
.lf-item.is-sel { border-color: var(--rp-accent); box-shadow: 0 0 0 1px rgba(120,210,255,.4); background: rgba(120,210,255,.1); }
.lf-item.is-done { opacity: .42; }
.lf-icon { width: 26px; height: 26px; border-radius: 50%; background: var(--mark); opacity: .55; position: relative; }
.lf-icon::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); }
.lf-name { font-size: 12px; }
.lf-look { font-size: 10px; line-height: 1.5; color: var(--rp-mute); }
.lf-logfloat {
  position: absolute; left: 20px; top: 62px; width: 240px; padding: 7px 10px; border-radius: 9px;
  background: rgba(8,18,28,.42); border: 1px solid rgba(120,210,255,.12); pointer-events: none;
}
.lf-logfloat p { margin: 0; font-size: 11px; line-height: 1.6; color: rgba(214,232,248,.66); }

/* ---------------- 急流纸船 ---------------- */
.pb-side { width: 240px; }
.pb-hull { display: flex; gap: 6px; margin-bottom: 8px; }
.pb-hull i { flex: 1; height: 8px; border-radius: 3px; background: rgba(255,255,255,.09); }
.pb-hull i.on { background: linear-gradient(90deg, #9FE0D6, #5FB3A8); }
.pb-dist { height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.pb-dist i { display: block; height: 100%; background: linear-gradient(90deg, rgba(120,210,255,.4), #9FE0D6); }
.pb-stat { margin-top: 8px; font-size: 11px; color: var(--rp-mute); }
.pb-stat b { font-family: var(--font-num); color: var(--rp-accent); }
.pb-note { font-size: 11px; line-height: 1.7; color: var(--rp-text); }
.pb-log { margin-top: 8px; }
.pb-log p { margin: 0 0 3px; font-size: 11px; color: var(--rp-mute); }
@media (max-width: 720px) {
  .tg-keys { left: 10px; right: 10px; bottom: 10px; }
  .lf-board { left: 10px; right: 10px; bottom: 10px; }
  .lf-items { flex-wrap: wrap; }
  .lf-item { flex: 1 1 44%; }
}

/* 新版五款需要的纵向空间 */
.rpg-host { min-height: 0; height: 100%; }
.tp-side { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; gap: 7px; }
.tp-row .rp-btn { padding: 8px 0; font-size: 12px; }
.tp-side::-webkit-scrollbar { display: none; }
