/* ============================================================
   AI 小镇 · 阶段 1 观察台 样式
   纯原生 CSS，无框架、无外部字体（离线可用）
   ============================================================ */

:root {
  --bg: #10141c;
  --bg-2: #171d27;
  --card: #1c232f;
  --card-2: #232b39;
  --line: #2e3848;
  --line-soft: #26303e;
  --text: #e6ecf5;
  --text-dim: #9aa7ba;
  --text-faint: #6b7889;
  --accent: #54b0f3;
  --ok: #35c08a;
  --warn: #f0b13b;
  --bad: #ec5a5a;
  --radius: 12px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background:
    radial-gradient(1200px 600px at 18% -8%, #1c2a3d 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #1a2433 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  overflow: hidden;
}

.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px 14px;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(38,48,63,.92), rgba(28,35,47,.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 22px rgba(0,0,0,.28);
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 236px; }
.logo {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #3d7fd6, #6a4fd0);
  font-weight: 800; letter-spacing: .5px; font-size: 15px;
  box-shadow: 0 3px 12px rgba(70,110,220,.4);
}
.brand-text h1 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.brand-text h1 .ver {
  font-size: 10px; font-weight: 600; color: var(--accent);
  border: 1px solid rgba(84,176,243,.45); border-radius: 999px;
  padding: 1px 7px; margin-left: 6px; vertical-align: middle;
}
.brand-text p { margin: 2px 0 0; font-size: 11px; color: var(--text-faint); }

/* 世界时钟 */
.clock-block {
  display: flex; align-items: center; gap: 14px;
  padding: 6px 16px;
  background: rgba(10,14,20,.5);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.clock-left { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.clock-time { font-family: var(--mono); font-size: 24px; font-weight: 700; letter-spacing: 1px; color: #f2f7ff; }
.clock-day { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.clock-right { display: flex; flex-direction: column; gap: 5px; min-width: 128px; }

.phase-chip {
  align-self: flex-start;
  /* [2026-11-08 jitter] 锁高：芯片文本万一为空（半截时钟 / 接口抖动）也只能塌到这里，
     不允许 21px → 6px —— 顶栏矮 15px 会让整块地图上下跳 7.5px。 */
  min-height: 21px;
  line-height: 15px;
  font-size: 11px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px;
  background: rgba(240,177,59,.16); color: var(--warn);
  border: 1px solid rgba(240,177,59,.36);
  transition: all .35s ease;
}
.phase-chip.phase-day   { background: rgba(240,177,59,.16); color: #f5c451; border-color: rgba(245,196,81,.4); }
.phase-chip.phase-night { background: rgba(110,140,230,.16); color: #8fa8ee; border-color: rgba(143,168,238,.4); }
.phase-chip.phase-dawn  { background: rgba(236,140,110,.16); color: #ef9a7e; border-color: rgba(239,154,126,.4); }
.phase-chip.phase-dusk  { background: rgba(214,110,160,.16); color: #dd7fa8; border-color: rgba(221,127,168,.4); }

/* 一天的进度条（0:00 → 24:00，标出昼/夜/晨昏区间） */
.daybar {
  position: relative; height: 6px; border-radius: 999px; overflow: hidden;
  background: linear-gradient(90deg,
    #101a2c 0%, #101a2c 20.8%,      /* 0-5   night */
    #b4763f 20.8%, #f0b13b 33.3%,   /* 5-8   dawn  */
    #f2c860 33.3%, #f2c860 70.8%,   /* 8-17  day   */
    #d46f9a 70.8%, #8b7fd6 83.3%,   /* 17-20 dusk  */
    #2a3450 83.3%, #101a2c 100%);   /* 20-24 night */
  opacity: .85;
}
.daybar-marker {
  position: absolute; top: -2px; width: 2px; height: 10px;
  background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.9);
  transition: left .35s linear;
}
.clock-sub { font-size: 10px; color: var(--text-faint); font-family: var(--mono); }

.status { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.chip {
  font-size: 11px; font-family: var(--mono);
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
  white-space: nowrap;
}
.chip-ok { color: var(--ok); border-color: rgba(53,192,138,.35); background: rgba(53,192,138,.1); }
.chip-bad { color: var(--bad); border-color: rgba(236,90,90,.4); background: rgba(236,90,90,.1); }

/* ---------------- 主区 ---------------- */
.main {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 396px;
  /* [2026-11-08 jitter] 行高锁死在容器高度内：右栏内容再多也只能自己内部滚动/裁切，
     不能把整行撑高 —— 否则右栏多 15px，地图卡片就跟着高 15px，画布被重新居中（上下跳）。 */
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
}

.card {
  background: linear-gradient(180deg, rgba(35,43,57,.9), rgba(28,35,47,.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.22);
}

.card-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(12,16,23,.35);
}
.card-head h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .6px; }
.muted { font-size: 11px; color: var(--text-faint); font-family: var(--mono); }

/* ---------------- 地图 ---------------- */
.map-card { min-width: 0; }

/* [2026-11-08 mapswitch] 左上角地图选择器 + 顶部统计。
   用自定义下拉（button + listbox）而不是原生 <select>：原生下拉的展开层是 OS 画的，
   截图/验收脚本拍不到，也没法高亮当前项。 */
.map-head { gap: 10px; flex-wrap: wrap; }
.map-switch { position: relative; flex: 0 0 auto; }
.map-switch-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 10px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .5px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.map-switch-btn:hover { border-color: rgba(84,176,243,.55); background: #263041; }
.map-switch-btn:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(84,176,243,.28); }
.map-switch-btn[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(84,176,243,.18);
}
.map-switch-btn.is-single { cursor: default; }
.map-switch-btn.is-busy { opacity: .7; pointer-events: none; }
.ms-icon { font-size: 15px; line-height: 1; }
.ms-name { white-space: nowrap; }
.ms-online { font-size: 11px; font-weight: 500; color: var(--text-dim); font-family: var(--mono); white-space: nowrap; }
.ms-caret { color: var(--text-faint); font-size: 10px; transition: transform .15s ease; }
.map-switch-btn[aria-expanded="true"] .ms-caret { transform: rotate(180deg); }
.map-switch-btn.is-single .ms-caret { display: none; }

.map-switch-menu {
  position: absolute; z-index: 60;
  top: calc(100% + 6px); left: 0;
  min-width: 248px;
  padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  background: #1b2330;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 38px rgba(0,0,0,.58);
}
.map-switch-menu[hidden] { display: none; }
.map-switch-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px;
  background: transparent; border: 0; border-radius: 8px;
  color: var(--text-dim);
  font: inherit; font-size: 12.5px; text-align: left;
  cursor: pointer;
}
.map-switch-item:hover, .map-switch-item:focus-visible {
  background: rgba(84,176,243,.12); color: var(--text); outline: none;
}
.map-switch-item.active {
  background: rgba(84,176,243,.16); color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(84,176,243,.4);
}
.msi-icon { font-size: 15px; line-height: 1; }
.msi-name { font-weight: 600; white-space: nowrap; }
.msi-online { margin-left: auto; font-size: 11px; font-family: var(--mono); color: var(--text-faint); white-space: nowrap; }
.map-switch-item.active .msi-online { color: var(--text-dim); }
.msi-check { width: 12px; color: var(--accent); font-weight: 700; visibility: hidden; }
.map-switch-item.active .msi-check { visibility: visible; }

.map-stats { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.map-stat {
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(12,16,23,.5);
  color: var(--text-faint);
  font-size: 11px; font-family: var(--mono); white-space: nowrap;
}
.map-stat b { color: var(--text); font-weight: 700; }
.map-stat.map-stat-0 { color: var(--text-faint); }
.map-stat.map-stat-0 b { color: var(--text-faint); }
@media (max-width: 1180px) {
  .map-stats { margin-left: 0; }
  .map-head #map-meta { display: none; }
}
.canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  /* [2026-11-08 jitter] 不再交给 grid 做居中（center 会落在 x.5 像素上）：
     位置由 core.js resize() 用整数 margin 给，只在切图 / 容器真的变尺寸时算一次。 */
  place-items: start;
  padding: 8px;
  background:
    radial-gradient(60% 60% at 50% 45%, rgba(64,110,160,.12), transparent 70%),
    #0c1016;
  overflow: hidden;
}
#map {
  display: block;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line), 0 8px 30px rgba(0,0,0,.5);
  cursor: crosshair;
  /* 尺寸由 JS 按容器计算，保持正方形 */
}
.map-loading {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(12,16,22,.82);
  color: var(--text-dim); font-size: 13px;
  transition: opacity .4s ease;
}
.map-loading.hidden { opacity: 0; pointer-events: none; }

.map-foot {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 8px 14px;
  border-top: 1px solid var(--line-soft);
  background: rgba(12,16,23,.35);
  min-height: 40px;
}
.hover-info { font-size: 12px; font-family: var(--mono); color: var(--text-dim); min-width: 210px; }
.hover-info .hi-empty { color: var(--text-faint); font-family: inherit; }
.hover-info b { color: var(--text); font-weight: 600; }
.hover-info .swatch {
  display: inline-block; width: 9px; height: 9px; border-radius: 2px;
  margin-right: 5px; vertical-align: middle; box-shadow: 0 0 0 1px rgba(255,255,255,.2);
}
.legend { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-dim); }
.legend-swatch { width: 11px; height: 11px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.legend-swatch-img {
  width: 14px; height: 14px; border-radius: 3px; overflow: hidden;
  display: inline-grid; place-items: center;
  background: rgba(0,0,0,.35);
  box-shadow: 0 0 0 1px rgba(255,255,255,.16);
}
.legend-swatch-img img {
  width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated;
}

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  display: flex; flex-direction: column; gap: 12px;
  min-height: 0; min-width: 0;
}

/* 角色列表：5 个 NPC 必须一屏全见（不滚动） */
.npc-panel { flex: 0 0 auto; }
.npc-list { padding: 7px; display: flex; flex-direction: column; gap: 5px; }

.npc-row {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,.028);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.npc-row:hover { background: rgba(255,255,255,.06); border-color: var(--line); }
.npc-row.selected {
  background: rgba(84,176,243,.13);
  border-color: rgba(84,176,243,.5);
}
.npc-row.selected::after {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent);
}
.npc-dot {
  width: 10px; height: 10px; border-radius: 50%;
  margin-top: 4px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.12), 0 0 7px currentColor;
}
/* 角色头像（48×48 像素立绘） */
.npc-portrait {
  width: 22px; height: 22px;
  margin-top: 1px;
  border-radius: 5px;
  object-fit: contain;
  image-rendering: pixelated;
  background: rgba(0,0,0,.28);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12);
}
.npc-main { min-width: 0; }
.npc-top { display: flex; align-items: baseline; gap: 6px; }
.npc-name { font-size: 12.5px; font-weight: 700; flex: 0 0 auto; }
.npc-action {
  font-size: 11px; color: var(--accent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.npc-action.sleeping { color: #8fa8ee; }
.npc-pos { margin-left: auto; font-size: 10px; font-family: var(--mono); color: var(--text-faint); flex: 0 0 auto; }

/* 需求条：三条并排，省高度 */
.needs { margin-top: 4px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; }
.need-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label val" "track track"; gap: 2px 4px; }
.need-label { grid-area: label; font-size: 9.5px; color: var(--text-faint); }
.need-val { grid-area: val; font-size: 9.5px; font-family: var(--mono); color: var(--text-dim); text-align: right; }
.need-track {
  grid-area: track;
  height: 4px; border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.need-fill {
  height: 100%; border-radius: 999px;
  transition: width .45s ease, background .45s ease;
}
.need-fill.ok   { background: linear-gradient(90deg, #2e9e6f, #35c08a); }
.need-fill.mid  { background: linear-gradient(90deg, #c99630, #f0b13b); }
.need-fill.low  { background: linear-gradient(90deg, #c24545, #ec5a5a); }
.need-fill.low  { animation: pulse .9s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* 下半区：事件流 / 角色详情 标签页 */
.tab-panel { flex: 1 1 auto; min-height: 0; }
.tab-head { padding: 0 8px; gap: 4px; }
.tab-btn {
  flex: 1 1 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 6px;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-faint);
  font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: .4px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.tab-btn:hover { color: var(--text-dim); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-badge {
  font-size: 10px; font-weight: 500; font-family: var(--mono);
  padding: 1px 6px; border-radius: 999px;
  background: rgba(255,255,255,.07); color: var(--text-faint);
}
.tab-btn.active .tab-badge { background: rgba(84,176,243,.18); color: var(--accent); }
.tab-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.tab-body[hidden] { display: none; }

/* 事件流 */
.event-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 7px 9px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.ev-empty { color: var(--text-faint); font-size: 12px; text-align: center; padding: 24px 0; }
.ev-item {
  display: grid;
  grid-template-columns: 40px 15px 1fr;
  gap: 5px;
  align-items: start;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(255,255,255,.025);
  border-left: 2px solid transparent;
  font-size: 11.5px;
  line-height: 1.42;
  animation: evIn .28s ease;
}
@keyframes evIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ev-time { font-family: var(--mono); font-size: 10px; color: var(--text-faint); padding-top: 1px; }
/* [2026-11-08 log] 相对时间（「3 分钟前」）跟在 HH:MM 后面，比绝对时间更贴身 */
.ev-ago { display: block; font-family: var(--mono); font-size: 9px; color: var(--text-faint); opacity: .78; margin-top: 1px; white-space: nowrap; }
.ev-icon { text-align: center; font-size: 11px; line-height: 1.5; }
.ev-text { color: var(--text-dim); word-break: break-word; }
.ev-text b { color: var(--text); font-weight: 600; }

.ev-say   { border-left-color: #54b0f3; background: rgba(84,176,243,.07); }
.ev-say .ev-text b { color: #8ecbf7; }
.ev-trade { border-left-color: #f0b13b; background: rgba(240,177,59,.06); }
.ev-sleep { border-left-color: #8fa8ee; }
.ev-wake  { border-left-color: #f5c451; }
.ev-need_met { border-left-color: #35c08a; }
.ev-join  { border-left-color: #8a63d2; }
.ev-chat  { border-left-color: #e04a4a; }
.ev-move  { opacity: .68; }
.ev-system { border-left-color: #6b7889; }

/* [2026-11-06 events] 两级事件：大事件醒目，日常压暗（默认根本不显示） */
.ev-filter {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 9px 2px;
  flex: 0 0 auto;
}
.ev-filter-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text-faint);
  font-size: 10.5px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ev-filter-btn:hover { color: var(--text-dim); border-color: #3a475a; }
.ev-filter-btn.active {
  color: #d8ecff;
  border-color: rgba(84,176,243,.55);
  background: rgba(84,176,243,.16);
  font-weight: 600;
}
.ev-filter-note { margin-left: auto; font-size: 10px; color: var(--text-faint); letter-spacing: .3px; }

.ev-item.ev-major {
  border-left-width: 3px;
  background: rgba(255,255,255,.055);
  font-size: 12px;
}
.ev-item.ev-major .ev-text { color: var(--text); }
.ev-item.ev-daily { opacity: .64; }
.ev-item.ev-cat-death       { border-left-color: #ec5a5a; background: rgba(236,90,90,.12); }
.ev-item.ev-cat-death .ev-text { color: #ffd7d7; }
.ev-item.ev-cat-achievement { border-left-color: #f0c04b; background: rgba(240,192,75,.10); }
.ev-item.ev-cat-trade       { border-left-color: #35c08a; background: rgba(53,192,138,.09); }
.ev-item.ev-cat-weather     { border-left-color: #54b0f3; background: rgba(84,176,243,.11); }
.ev-item.ev-cat-wildlife    { border-left-color: #e8863f; background: rgba(232,134,63,.10); }
.ev-item.ev-cat-milestone   { border-left-color: #b98af0; background: rgba(185,138,240,.10); }
.ev-item.ev-cat-arrival     { border-left-color: #47c7c7; background: rgba(71,199,199,.08); }
.ev-item.ev-cat-departure   { border-left-color: #8a94a6; }
.ev-item.ev-cat-market      { border-left-color: #d9a441; background: rgba(217,164,65,.07); }
.ev-item.ev-cat-rank        { border-left-color: #f0c04b; background: rgba(240,192,75,.10); }
.ev-item.ev-cat-quest       { border-left-color: #6fb1e8; }
/* [2026-11-08 log] 新增三类：BOSS / 镇级事件 / 商人开关门 / PVP / 寄售 / 重生 */
.ev-item.ev-cat-boss        { border-left-color: #c455ff; background: rgba(196,85,255,.13); }
.ev-item.ev-cat-boss .ev-text { color: #ecd5ff; }
.ev-item.ev-cat-town        { border-left-color: #4fc3a1; background: rgba(79,195,161,.10); }
.ev-item.ev-cat-vendor      { border-left-color: #d9a441; background: rgba(217,164,65,.09); }
.ev-item.ev-cat-pvp         { border-left-color: #ff6b4a; background: rgba(255,107,74,.12); }
.ev-item.ev-cat-consign     { border-left-color: #35c08a; background: rgba(53,192,138,.09); }
.ev-item.ev-cat-rebirth     { border-left-color: #7fe3ff; background: rgba(127,227,255,.11); }
/* [2026-11-09 evlog] 打猎成功（老板点名的「打羊」）：暖绿，和「受伤/野兽」的橙红明确分开 */
.ev-item.ev-cat-hunt        { border-left-color: #7ed957; background: rgba(126,217,87,.10); }
.ev-item.ev-cat-hunt .ev-text { color: #ddffd0; }
/* [2026-11-09 evlog] 随机事件（山火/旱季/大雾/税吏/传染病）开始与结束 */
.ev-item.ev-cat-random      { border-left-color: #ffa53d; background: rgba(255,165,61,.11); }
.ev-merge-more { color: var(--text-faint); }
/* [2026-11-09 evlog] 大事件的可展开细节（谁杀 / 耗时 / 掉落）：默认收着，点「细节」才展开 */
.ev-detail { display: block; margin-top: 3px; }
.ev-detail > summary {
  cursor: pointer;
  font-size: 9.5px;
  color: var(--text-faint);
  opacity: .8;
  list-style: none;
  user-select: none;
}
.ev-detail > summary::-webkit-details-marker { display: none; }
.ev-detail > summary::before { content: '▸ '; }
.ev-detail[open] > summary::before { content: '▾ '; }
.ev-detail > span {
  display: block;
  margin-top: 2px;
  padding-left: 9px;
  border-left: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 10.5px;
  line-height: 1.45;
}
.ev-merge-count {
  display: inline-block;
  margin-left: 5px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: var(--text-dim);
  font-size: 9.5px;
  vertical-align: 1px;
}

/* ---------------- 角色详情 ---------------- */
.detail-body { flex: 1 1 auto; overflow-y: auto; padding: 10px 12px 14px; }
.dt-placeholder { color: var(--text-faint); font-size: 12px; line-height: 1.7; text-align: center; padding: 30px 16px; }
.dt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.dt-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800; color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,.14);
}
.dt-avatar-sprite {
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0,0,0,.3);
}
.dt-avatar-sprite img {
  width: 100%; height: 100%; object-fit: contain;
  image-rendering: pixelated;
}
.dt-name { font-size: 15px; font-weight: 700; }
.dt-sub { font-size: 11px; color: var(--text-faint); font-family: var(--mono); }
.dt-section { margin-top: 11px; }
.dt-section h3 {
  margin: 0 0 5px; font-size: 11px; font-weight: 700;
  color: var(--text-faint); letter-spacing: .7px; text-transform: uppercase;
}
.dt-persona {
  font-size: 12px; line-height: 1.6; color: var(--text-dim);
  background: rgba(255,255,255,.03);
  border-left: 2px solid rgba(84,176,243,.5);
  border-radius: 0 7px 7px 0;
  padding: 7px 10px;
}
.dt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dt-kv {
  background: rgba(255,255,255,.03); border-radius: 7px;
  padding: 6px 9px; font-size: 11px;
}
.dt-kv .k { color: var(--text-faint); font-size: 10px; display: block; }
.dt-kv .v { font-family: var(--mono); color: var(--text); font-size: 12px; }
.dt-mem {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.dt-mem li {
  font-size: 11.5px; color: var(--text-dim); line-height: 1.5;
  padding: 5px 9px; border-radius: 6px;
  background: rgba(255,255,255,.025);
  border-left: 2px solid rgba(255,255,255,.09);
}
.dt-mem li:last-child { border-left-color: rgba(84,176,243,.6); background: rgba(84,176,243,.07); color: var(--text); }
.dt-empty { font-size: 11px; color: var(--text-faint); }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.13); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }

/* ============================================================
   [2026-11-05 vendors] 右栏三块：排行榜 / 世界聊天 / 固定商人
   + 底部「观察日志」抽屉（原事件流 / 角色详情，默认收起）
   ============================================================ */

/* 右栏整体：四块变三块（排行榜 / 聊天 / 商人·寄售行 / 观察日志），合并块吃大头 */
/* [2026-11-08 jitter] 矮窗口（<900 高）里三块的最小高度加起来会超过右栏：
   以前 overflow:hidden 直接把最底下的「观察日志」按钮裁没（点不到）；
   改成纵向滚动，地图区高度锁定后右栏自己滚，谁都不会消失。 */
.sidebar { gap: 8px; overflow-x: hidden; overflow-y: auto; }

.rank-panel {
  /* [2026-11-06 coinsrank] 多了一行排序切换，给榜单多留一点高度，一屏能看见前 4 名 */
  /* [2026-11-07 rank-tabs] 排序切换挪到顶部 tab，少一行；position 给名人堂浮层兜底 */
  position: relative;
  flex: 1.6 1 330px;
  min-height: 310px;
}
.rank-panel .card-head { padding: 8px 13px; }
.rank-sub {
  font-size: 10px; font-weight: 500; color: var(--text-faint);
  letter-spacing: 0; margin-left: 5px;
}
.rank-tabs {
  flex: 0 0 auto;
  display: flex;
  padding: 0 8px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10,14,20,.18);
}
.rank-tab {
  flex: 1 1 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 4px;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-faint); font-family: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: color .15s ease, border-color .15s ease;
}
.rank-tab:hover { color: var(--text-dim); }
.rank-tab.active { color: var(--text); border-bottom-color: var(--warn); }
.rank-tab.active .tab-badge { background: rgba(240,177,59,.16); color: var(--warn); }

/* [2026-11-07 rank-tabs] 顶部两个 tab = 排序切换（🏆 生存天数 / 💰 金币榜）。
   比原来的“现存榜/名人堂”更强调一点：图标 + 更亮的选中色 + 金币 tab 的金色暗示。 */
.rank-tab { padding: 8px 6px 7px; font-size: 12.5px; letter-spacing: .2px; }
.rank-tab .rt-icon {
  font-size: 12.5px; line-height: 1;
  filter: grayscale(.45) brightness(.85);
  transition: filter .15s ease, transform .15s ease;
}
.rank-tab.active .rt-icon { filter: none; transform: translateY(-.5px); }
.rank-tab[data-metric="coins"].active { border-bottom-color: #f0c04b; }
.rank-tab[data-metric="coins"].active .rt-label { color: #f5d27a; }

/* 标题旁的「已故 N 位」——名人堂唯一入口，别做得很显眼 */
.rank-head-left { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.rank-hall-link {
  appearance: none; background: none; border: none; padding: 0; margin: 0;
  font-family: inherit; font-size: 9.5px; font-weight: 500; line-height: 1.4;
  color: var(--text-faint); cursor: pointer;
  border-bottom: 1px dotted rgba(255,255,255,.18);
  transition: color .15s ease, border-color .15s ease;
}
.rank-hall-link:hover { color: var(--warn); border-bottom-color: rgba(240,177,59,.55); }
.rank-hall-link span { font-family: var(--mono); font-size: 9.5px; }

/* 名人堂浮层（fixed：不会被 sidebar 的 overflow 裁掉） */
.rank-hall-pop {
  position: fixed; z-index: 260;
  display: flex; flex-direction: column;
  max-height: 300px;
  background: linear-gradient(180deg, #181e28, #11161e);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0,0,0,.62);
  overflow: hidden;
}
.rank-hall-pop[hidden] { display: none; }
.rhp-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(240,177,59,.06);
}
.rhp-title { font-size: 11.5px; font-weight: 700; color: var(--text-dim); letter-spacing: .3px; }
.rhp-count { color: var(--warn); font-family: var(--mono); }
.rhp-close {
  appearance: none; background: none; border: none; padding: 0 2px;
  color: var(--text-faint); font-size: 15px; line-height: 1; cursor: pointer;
}
.rhp-close:hover { color: var(--text); }
.rhp-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 5px; }
.rhp-row {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px;
  padding: 4px 5px; border-radius: 5px;
}
.rhp-row:hover { background: rgba(255,255,255,.05); }
.rhp-rank {
  font-family: var(--mono); font-size: 9.5px; color: var(--text-faint);
  text-align: right; padding-top: 1px;
}
.rhp-main { min-width: 0; }
.rhp-line { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.rhp-name { font-size: 11.5px; font-weight: 700; color: var(--text); }
.rhp-days { margin-left: auto; font-family: var(--mono); font-size: 9.5px; color: var(--warn); white-space: nowrap; }
.rhp-cause {
  margin-top: 1px; font-size: 9.5px; color: var(--text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rhp-empty { padding: 18px 10px; text-align: center; font-size: 11px; line-height: 1.6; color: var(--text-faint); }
.rhp-foot {
  flex: 0 0 auto; padding: 5px 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 9px; color: var(--text-faint); font-family: var(--mono);
}

/* [2026-11-06 coinsrank] 现存榜排序切换：两个小胶囊（名人堂时整行隐藏） */
.rank-metrics {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10,14,20,.12);
}
.rank-metrics[hidden] { display: none; }
.rank-metric {
  appearance: none;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px 3px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--text-faint);
  font-family: inherit; font-size: 10.5px; font-weight: 700; line-height: 1.35;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.rank-metric:hover { color: var(--text-dim); background: rgba(255,255,255,.07); }
.rank-metric.active { color: var(--warn); border-color: rgba(240,177,59,.45); background: rgba(240,177,59,.12); }

.rank-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 7px 6px;
  display: flex; flex-direction: column; gap: 2px;
}
.rank-empty { padding: 20px 12px; text-align: center; color: var(--text-faint); font-size: 11.5px; line-height: 1.65; }
.rank-empty .re-title { font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 5px; }
.rank-empty .re-hint { font-size: 11px; color: var(--text-faint); }
.rank-empty code {
  font-family: var(--mono); font-size: 10.5px; color: var(--text-dim);
  background: rgba(255,255,255,.05); border-radius: 4px; padding: 1px 4px;
}

.rank-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease;
}
.rank-row:hover { background: rgba(255,255,255,.055); border-color: var(--line-soft); }
.rank-row.top1 { background: rgba(240,177,59,.09); border-color: rgba(240,177,59,.26); }
.rank-row.top2 { background: rgba(190,205,225,.07); border-color: rgba(190,205,225,.22); }
.rank-row.top3 { background: rgba(205,140,80,.07); border-color: rgba(205,140,80,.22); }
/* 名人堂行更高（死因 + 倒下日），压一压行高让前 5 名一屏能看全 */
.rank-row.hall { padding: 3px 7px; }
.rank-row.hall .rank-line { line-height: 1.15; }
.rank-row.hall .rank-cause { font-size: 9.5px; line-height: 1.25; margin-top: 0; }
.rank-row.hall .rank-died { font-size: 9px; line-height: 1.2; margin-top: 0; }
.rank-no {
  align-self: start;
  display: grid; place-items: center;
  width: 24px; height: 22px; margin-top: 1px;
  border-radius: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.055); color: var(--text-dim);
}
.rank-no.gold { background: linear-gradient(145deg,#f7cf5f,#c98a1c); color: #2a1c04; box-shadow: 0 1px 6px rgba(240,177,59,.35); }
.rank-no.silver { background: linear-gradient(145deg,#e7edf6,#98a6b8); color: #1d2733; }
.rank-no.bronze { background: linear-gradient(145deg,#e0a06a,#9c5f2e); color: #2a1608; }
.rank-main { min-width: 0; }
.rank-line { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.rank-name {
  font-size: 12.5px; font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-status {
  font-size: 10.5px; color: var(--accent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-status.risk-hungry { color: var(--warn); }
.rank-status.risk-dying { color: var(--bad); }
.rank-days {
  margin-left: auto; flex: 0 0 auto;
  font-family: var(--mono); font-size: 10.5px; color: #d8c48a;
}
/* [2026-11-06 coinsrank] 金币榜：金币数金色加粗，天数退到第二行做次要信息 */
.rank-coins {
  margin-left: auto; flex: 0 0 auto;
  display: inline-flex; align-items: baseline; gap: 3px;
  font-family: var(--mono); font-size: 13px; font-weight: 800;
  color: #f5c451; text-shadow: 0 0 12px rgba(240,177,59,.28);
}
.rank-coins-unit { font-family: inherit; font-size: 9px; font-weight: 600; color: rgba(245,196,81,.7); }
.rank-coin-line2 { margin-top: 2px; }
.rank-coin-line2 .rank-status { flex: 1 1 auto; min-width: 0; }
.rank-coin-days {
  margin-left: auto; flex: 0 0 auto;
  font-family: var(--mono); font-size: 9.5px; color: var(--text-faint);
}
.rank-line2 { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.sat-track {
  position: relative;
  flex: 1 1 auto;
  height: 5px; border-radius: 999px;
  background: rgba(255,255,255,.09);
  overflow: hidden;
}
.sat-fill {
  display: block; height: 100%; border-radius: 999px;
  transition: width .45s ease, background .45s ease;
}
.sat-fill.risk-ok { background: linear-gradient(90deg,#2e9e6f,#35c08a); }
.sat-fill.risk-hungry { background: linear-gradient(90deg,#c99630,#f0b13b); }
.sat-fill.risk-dying { background: linear-gradient(90deg,#c24545,#ec5a5a); animation: pulse .9s ease-in-out infinite; }
.rank-pct { flex: 0 0 auto; font-family: var(--mono); font-size: 9.5px; color: var(--text-faint); }
.rank-online { flex: 0 0 auto; font-size: 9.5px; color: var(--text-faint); }
.rank-online.off { color: #8b6f4a; }
.rank-cause { font-size: 10.5px; color: var(--text-dim); line-height: 1.4; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-died { font-size: 9.5px; color: var(--text-faint); font-family: var(--mono); margin-top: 1px; }

/* ============================================================
   [2026-11-22 pubdungeon] 副本榜（公共观察台的「🕳 副本榜」档）
   ------------------------------------------------------------
   老板要的：3 个副本 ×（5 人队 / 单人）= 6 个榜，按过关用时排名。
   右栏太窄 → 两层切换（先选副本、再选规模），不塞 6 个平铺 tab。
   只显示名次 / 名字 / 用时 / 日期 / 死了几个 —— 副本内部细节一律不上公共页。
   ============================================================ */
.rank-dg-tabs { display: flex; gap: 4px; padding: 3px 7px 0; flex-wrap: wrap; }
.rank-dg-tabs.scopes { padding-top: 4px; padding-bottom: 3px; }
.rank-dg-tab {
  appearance: none; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px; border-radius: 999px;
  border: 1px solid var(--line-soft); background: rgba(255,255,255,.03);
  color: var(--text-faint); font-size: 10.5px; line-height: 1.5;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.rank-dg-tab:hover { color: var(--text-dim); background: rgba(255,255,255,.07); }
.rank-dg-tab.active {
  color: #cfe4ff; border-color: rgba(84,176,243,.5);
  background: rgba(84,176,243,.16); font-weight: 700;
}
.rank-dg-tab.sm { padding: 2px 9px; font-size: 10px; }
.rank-dg-tab .dg-ic { font-size: 10.5px; }

.rank-dg-list { display: flex; flex-direction: column; gap: 3px; padding: 5px 7px 2px; }
.rank-dg-row {
  display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 7px; align-items: center;
  padding: 4px 7px; border-radius: 8px;
  background: rgba(255,255,255,.025); border: 1px solid transparent;
}
.rank-dg-row:hover { background: rgba(255,255,255,.055); border-color: var(--line-soft); }
.rank-dg-row.top1 { background: rgba(240,177,59,.09); border-color: rgba(240,177,59,.26); }
.rank-dg-row.top2 { background: rgba(190,205,225,.07); border-color: rgba(190,205,225,.22); }
.rank-dg-row.top3 { background: rgba(205,140,80,.07); border-color: rgba(205,140,80,.22); }
.rank-dg-main { min-width: 0; }
.rank-dg-line { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.rank-dg-name {
  font-size: 12px; font-weight: 700; color: var(--text); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-dg-gap { margin-left: auto; flex: 0 0 auto; font-size: 9.5px; color: #7fe0b4; font-family: var(--mono); }
.rank-dg-meta { display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.rank-dg-death { font-size: 9.5px; font-family: var(--mono); }
.rank-dg-death.ok { color: #6fbf95; }
.rank-dg-death.bad { color: #e08b8b; }
.rank-dg-date { font-size: 9px; color: var(--text-faint); font-family: var(--mono); margin-left: auto; }
.rank-dg-dur {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: #ffd977; white-space: nowrap;
}
.rank-dg-foot { padding: 2px 8px 5px; font-size: 9px; color: var(--text-faint); font-family: var(--mono); }

.rank-foot {
  flex: 0 0 auto;
  padding: 5px 12px 7px;
  border-top: 1px solid var(--line-soft);
  font-size: 9.5px; color: var(--text-faint); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-foot .dot { color: var(--line); margin: 0 5px; }

/* ② 世界聊天 */
.chat-panel {
  flex: 0 0 112px;
  min-height: 96px;
}
.chat-panel .card-head { padding: 7px 12px; }
.chat-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 5px 9px 8px;
  display: flex; flex-direction: column; gap: 4px;
  /* 顶部渐隐：滚到最新时最上面那条只露一半，是正常聊天流；渐隐让它看起来是故意裁的 */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 10px);
}
.chat-empty {
  margin: auto;
  text-align: center;
  color: var(--text-faint);
  font-size: 11.5px; line-height: 1.7;
  padding: 8px 10px;
}
.chat-empty .ce-hint { font-size: 10px; color: #5b6675; margin-top: 4px; }
.chat-row {
  font-size: 11.5px; line-height: 1.45;
  color: var(--text-dim);
  padding: 3px 6px;
  border-radius: 6px;
  border-left: 2px solid transparent;
  background: rgba(255,255,255,.022);
  word-break: break-word;
  animation: chatIn .25s ease;
}
@keyframes chatIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.chat-row .chat-time { font-family: var(--mono); font-size: 9.5px; color: var(--text-faint); margin-right: 4px; }
.chat-row .chat-name { color: #8ecbf7; font-weight: 700; }
.chat-row .chat-text { color: var(--text-dim); }
.chat-row.dm { opacity: .58; border-left-color: #5b6675; background: rgba(255,255,255,.012); }
.chat-row.dm .chat-name, .chat-row.dm .chat-text { color: #8b95a4; }
.chat-dm-tag {
  display: inline-block; margin-right: 4px;
  font-size: 9px; font-weight: 700; color: #9aa7ba;
  border: 1px solid rgba(154,167,186,.32); border-radius: 999px;
  padding: 0 4px; vertical-align: 1px;
}

/* ③ 市集：固定商人 + 寄售行（[2026-11-06 consignui] 合并成一块，tab 切换 + 放大） */
.trade-panel {
  /* [2026-11-06 coinsrank] 略让一点高度给排行榜（商人列表本来就可滚动） */
  flex: 1 1 340px;
  min-height: 300px;
  max-height: 560px;
}
.trade-head { padding: 0; }
.trade-tabs {
  display: flex;
  gap: 6px;
  width: 100%;
  padding: 6px;
}
.trade-tab {
  flex: 1 1 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 8px 8px;
  background: rgba(255,255,255,.035);
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text-faint);
  font-family: inherit; font-size: 14px; font-weight: 800; letter-spacing: .3px;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.trade-tab:hover { background: rgba(255,255,255,.07); color: var(--text-dim); }
.trade-tab.active {
  color: #ffd98a;
  background: rgba(240,177,59,.13);
  border-color: rgba(240,177,59,.4);
  box-shadow: inset 0 -2px 0 rgba(240,177,59,.85);
}
.trade-tab .tt-icon { font-size: 15px; line-height: 1; }
.trade-tab .tt-count {
  min-width: 20px;
  padding: 0 5px;
  border-radius: 999px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  color: var(--text-faint);
  background: rgba(255,255,255,.07);
}
.trade-tab.active .tt-count { color: #2a1c04; background: rgba(240,177,59,.85); }
.trade-body { flex: 1 1 auto; min-height: 0; display: flex; }
.trade-pane { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.trade-pane[hidden] { display: none; }
.trade-sub {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 3px;
}
.trade-sub .muted { font-size: 10.5px; }
.trade-hint { margin-left: auto; font-size: 10px; color: var(--text-faint); white-space: nowrap; }
.vendor-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 3px 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.vendor-empty { padding: 22px 10px; text-align: center; color: var(--text-faint); font-size: 12px; }
.vendor-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.028);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.vendor-row:hover { background: rgba(255,255,255,.06); border-color: var(--line); }
.vendor-row.closed { opacity: .62; }
.vendor-avatar {
  width: 30px; height: 30px; border-radius: 7px;
  background: rgba(0,0,0,.3);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12);
  object-fit: contain; image-rendering: pixelated;
}
.vendor-main { min-width: 0; line-height: 1.2; }
.vendor-line { display: flex; align-items: baseline; gap: 5px; }
.vendor-name { font-size: 14px; font-weight: 800; }
.vendor-icon { font-size: 12px; }
.vendor-hours { font-size: 10px; color: var(--text-faint); font-family: var(--mono); }
.vendor-status {
  margin-left: auto; flex: 0 0 auto;
  font-size: 9.5px; font-weight: 700;
  border-radius: 999px; padding: 0 6px;
  color: #77d6a8; background: rgba(53,192,138,.12); border: 1px solid rgba(53,192,138,.26);
}
.vendor-status.closed { color: #a8a196; background: rgba(160,150,135,.1); border-color: rgba(160,150,135,.25); }
.vendor-deals { margin-top: 3px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vendor-deal-line {
  display: flex; align-items: baseline; gap: 5px;
  min-width: 0;
  font-size: 11.5px; line-height: 1.3; color: var(--text-dim);
  white-space: nowrap;
}
.vendor-deal-line .vd-tag {
  flex: 0 0 auto;
  width: 17px; text-align: center;
  font-size: 10px; font-weight: 800; line-height: 1.35;
  border-radius: 4px;
}
.vendor-deal-line.buy .vd-tag { color: #f0c96b; background: rgba(240,177,59,.14); border: 1px solid rgba(240,177,59,.3); }
.vendor-deal-line.sell .vd-tag { color: #8ecbf7; background: rgba(84,176,243,.13); border: 1px solid rgba(84,176,243,.3); }
.vendor-deal-line .vd-items {
  min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.vendor-deal-line .vd-item b { color: #ffd98a; font-family: var(--mono); font-weight: 700; }
.vendor-deal-line.sell .vd-item b { color: #a9d8ff; }
.vendor-deal-line .vd-sep { color: var(--line); margin: 0 1px; }
.vendor-deal-line .vd-more { color: var(--text-faint); font-size: 10.5px; margin-left: 3px; }
.vendor-deal-line .vd-none { color: var(--text-faint); }
.vendor-more { font-size: 18px; color: var(--text-faint); padding-right: 2px; }

/* 寄售行：每行 = 物品名+数量 / 总价+单价 / 卖家 / 剩余时间（字比上一轮大一圈） */
.consign-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.consign-row {
  display: flex; flex-direction: column; gap: 3px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.028);
  border: 1px solid transparent;
  line-height: 1.2;
}
.consign-row:hover { background: rgba(255,255,255,.06); border-color: var(--line); }
.consign-top { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.consign-name {
  font-size: 15px; font-weight: 800; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.consign-qty { font-size: 12px; color: var(--text-faint); font-family: var(--mono); font-weight: 600; }
.consign-price {
  margin-left: auto; flex: 0 0 auto;
  display: inline-flex; align-items: baseline;
  font-size: 16px; font-weight: 800; color: #ffd98a; font-family: var(--mono);
  white-space: nowrap; line-height: 1.15;
}
.consign-price .unit { font-size: 10.5px; color: var(--text-faint); font-weight: 500; margin-left: 6px; }
.consign-meta2 {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--text-faint); min-width: 0;
}
.consign-seller {
  color: #8ecbf7; font-weight: 700;
  max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.consign-seller .cs-tag {
  margin-right: 4px;
  font-size: 9.5px; font-weight: 500; color: var(--text-faint);
  border: 1px solid var(--line); border-radius: 4px; padding: 0 3px;
}
.consign-left { margin-left: auto; font-family: var(--mono); white-space: nowrap; font-size: 11.5px; }
.consign-left.warn { color: var(--warn); }
/* [2026-11-06 group] 寄售行归类：品类小标题（色条）+ 物品分组头；折叠时物品一行，点开才看明细 */
.consign-cat { display: flex; flex-direction: column; gap: 3px; }
.consign-cat[data-cat="food"] { --cc: #f0b13b; }
.consign-cat[data-cat="material"] { --cc: #63c98f; }
.consign-cat[data-cat="gear"] { --cc: #6fb6f0; }
.consign-cat[data-cat="other"] { --cc: #a8a196; }
.consign-cat + .consign-cat { margin-top: 4px; }
.consign-cat-head {
  display: flex; align-items: center; gap: 6px;
  padding: 2px 4px 0;
  font-size: 10px; font-weight: 800; letter-spacing: .1em;
  color: var(--cc, #a8a196);
}
.consign-cat-head .cc-bar { flex: 0 0 auto; width: 3px; height: 11px; border-radius: 2px; background: var(--cc, #a8a196); }
.consign-cat-head .cc-count {
  margin-left: auto;
  font-size: 9.5px; font-weight: 600; letter-spacing: 0; color: var(--text-faint);
}
.consign-group {
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid transparent;
  transition: background .16s ease, border-color .16s ease;
}
.consign-group[open] { background: rgba(255,255,255,.05); border-color: rgba(240,177,59,.22); }
.consign-group-head {
  display: flex; align-items: center; gap: 7px;
  width: 100%; padding: 7px 9px;
  list-style: none; cursor: pointer;
  border-radius: 10px;
  color: inherit; font: inherit; text-align: left;
  line-height: 1.2;
}
.consign-group-head::-webkit-details-marker { display: none; }
.consign-group-head:hover { background: rgba(255,255,255,.05); }
.consign-group-head:focus-visible { outline: 2px solid rgba(240,177,59,.55); outline-offset: -2px; }
.consign-group-head .cg-icon { flex: 0 0 auto; font-size: 14px; line-height: 1; }
.consign-group-head .cg-name { flex: 0 0 auto; font-size: 14.5px; font-weight: 800; color: var(--text); white-space: nowrap; }
.consign-group-head .cg-qty {
  flex: 0 0 auto;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--text-faint);
  white-space: nowrap;
}
.consign-group-head .cg-price {
  margin-left: auto;
  font-family: var(--mono); font-size: 13.5px; font-weight: 800; color: #ffd98a;
  white-space: nowrap;
}
.consign-group-head .cg-sub {
  flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
  font-size: 10.5px; color: var(--text-faint); white-space: nowrap;
}
.consign-group-head .cg-caret {
  flex: 0 0 auto;
  font-size: 10px; color: var(--text-faint);
  transition: transform .15s ease;
}
.consign-group[open] .cg-caret { transform: rotate(90deg); }
.consign-group-body { display: flex; flex-direction: column; gap: 3px; padding: 0 6px 6px 10px; }
.consign-group-body .consign-row { background: rgba(0,0,0,.18); }
.consign-row.is-detail { border-left: 2px solid var(--cc, #f0b13b); }

.consign-empty { padding: 22px 10px; text-align: center; color: var(--text-faint); font-size: 12px; line-height: 1.7; }
.consign-empty .ce-title { font-size: 14px; font-weight: 800; color: var(--text-dim); margin-bottom: 4px; }
.consign-foot {
  flex: 0 0 auto;
  padding: 5px 12px 6px;
  border-top: 1px solid var(--line-soft);
  font-size: 9.5px; color: var(--text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 商人价目浮层（地图内） */
.vendor-pop {
  position: absolute;
  z-index: 25;
  width: min(340px, calc(100% - 20px));
  max-height: calc(100% - 20px);
  overflow-y: auto;
  padding: 11px 13px 12px;
  background: linear-gradient(180deg, rgba(35,44,58,.985), rgba(24,31,42,.985));
  border: 1px solid rgba(240,177,59,.38);
  border-radius: 11px;
  box-shadow: 0 14px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.3);
  color: var(--text);
  backdrop-filter: blur(2px);
}
.vendor-pop[hidden] { display: none; }
.vendor-pop-close {
  position: absolute; right: 6px; top: 5px;
  width: 22px; height: 22px; border-radius: 6px;
  border: 1px solid transparent; background: none;
  color: var(--text-faint); font-size: 16px; line-height: 1; cursor: pointer;
}
.vendor-pop-close:hover { background: rgba(255,255,255,.08); color: var(--text); }
.vp-head { display: flex; align-items: center; gap: 9px; padding-right: 18px; }
.vp-avatar {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(0,0,0,.3); box-shadow: 0 0 0 1px rgba(255,255,255,.14);
  object-fit: contain; image-rendering: pixelated;
}
.vp-name { font-size: 15px; font-weight: 800; }
.vp-sub { font-size: 10.5px; color: var(--text-faint); margin-top: 1px; }
.vp-state {
  margin-left: auto; font-size: 10px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px;
  color: #77d6a8; background: rgba(53,192,138,.12); border: 1px solid rgba(53,192,138,.28);
}
.vp-state.closed { color: #b0a89a; background: rgba(160,150,135,.1); border-color: rgba(160,150,135,.28); }
.vp-lines {
  margin: 8px 0 0;
  padding: 6px 9px;
  border-left: 2px solid rgba(240,177,59,.45);
  border-radius: 0 7px 7px 0;
  background: rgba(240,177,59,.055);
  font-size: 10.5px; color: var(--text-dim); line-height: 1.55;
}
.vp-section { margin-top: 9px; }
.vp-section h4 {
  margin: 0 0 4px; font-size: 10px; font-weight: 700;
  color: var(--text-faint); letter-spacing: .6px;
}
.vp-table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.vp-table td { padding: 2px 3px; border-bottom: 1px solid rgba(255,255,255,.045); }
.vp-table tr:last-child td { border-bottom: none; }
.vp-table .it { color: var(--text); }
.vp-table .pr { color: #f0c96b; font-family: var(--mono); text-align: right; white-space: nowrap; }
.vp-table .cap { color: var(--text-faint); font-family: var(--mono); text-align: right; white-space: nowrap; }
.vp-none { color: var(--text-faint); font-size: 10.5px; padding: 2px 3px; }
.vp-foot { margin-top: 9px; font-size: 9.5px; color: var(--text-faint); line-height: 1.5; }

/* ============ 观察日志抽屉（保住原事件流 / 角色详情） ============ */
.obs-dock { position: relative; flex: 0 0 auto; z-index: 30; }
.dock-toggle {
  width: 100%;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 11px;
  background: linear-gradient(180deg, rgba(35,43,57,.92), rgba(28,35,47,.94));
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-dim);
  font-family: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease;
}
.dock-toggle:hover { border-color: #3a475a; color: var(--text); }
.dock-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px rgba(84,176,243,.7); }
.dock-title { letter-spacing: .3px; }
.dock-mini {
  font-size: 9.5px; font-weight: 500; font-family: var(--mono);
  color: var(--text-faint);
  background: rgba(255,255,255,.05);
  border-radius: 999px; padding: 1px 6px;
}
.dock-mini.dim { color: #7a8697; }
.dock-caret { margin-left: auto; font-size: 10px; color: var(--text-faint); transition: transform .2s ease; }
.dock-toggle[aria-expanded="true"] .dock-caret { transform: rotate(180deg); }

.dock-body {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(100% + 8px);
  height: min(46vh, 420px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(33,41,55,.99), rgba(24,30,41,.99));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
  overflow: hidden;
  z-index: 40;
}
.dock-body[hidden] { display: none; }
.dock-body .tab-head { padding: 0 8px; gap: 4px; }
.dock-close {
  flex: 0 0 auto;
  width: 26px; height: 26px; margin-left: 2px;
  border: 1px solid transparent; border-radius: 6px;
  background: none; color: var(--text-faint); font-size: 17px; line-height: 1; cursor: pointer;
}
.dock-close:hover { background: rgba(255,255,255,.08); color: var(--text); }

/* 窄屏：侧边栏下移 */
@media (max-width: 1080px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100vh; }
  .main { grid-template-columns: 1fr; }
  .canvas-wrap { min-height: 60vh; }
  .sidebar { max-height: none; overflow: visible; }
  .rank-panel { min-height: 320px; }
  .chat-panel { flex: 0 0 260px; }
  .trade-panel { max-height: none; min-height: 320px; }
  .dock-body { position: static; height: 360px; margin-top: 8px; }
}


/* ============================================================
   [2026-11-05 owner] 属性卡（人话 + 彩条）+ 主人视角私聊问答
   —— 只新增，不改上面任何一条既有规则
   ============================================================ */
.dt-tag {
  font-size: 10.5px; font-weight: 600;
  color: #7fe3ff; border: 1px solid rgba(56,189,248,.75);
  border-radius: 4px; padding: 0 4px; margin-left: 4px;
  vertical-align: 2px;
}
.dt-tag.chat { color: #7ef2b0; border-color: rgba(52,192,138,.7); }
.dt-h3note { font-weight: 400; color: #5c6a7c; letter-spacing: 0; text-transform: none; font-size: 10px; }
.dt-note { margin-top: 6px; font-size: 10.5px; color: var(--text-faint); font-family: var(--mono); }

/* 数值条：标签 / 轨道 / 百分比 + 人话 */
.dt-bar-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}
.dt-bar-label { font-size: 10.5px; color: var(--text-faint); }
.dt-bar-track {
  position: relative;
  height: 8px; border-radius: 999px;
  background: rgba(255,255,255,.07);
  overflow: hidden;
}
.dt-bar-fill {
  display: block; height: 100%; border-radius: 999px;
  transition: width .35s ease;
}
.dt-bar-fill.ok      { background: linear-gradient(90deg, #2e9e6f, #35c08a); }
.dt-bar-fill.mid     { background: linear-gradient(90deg, #c99630, #f0b13b); }
.dt-bar-fill.low     { background: linear-gradient(90deg, #c24545, #ec5a5a); }
.dt-bar-fill.unknown { background: repeating-linear-gradient(45deg, rgba(255,255,255,.14) 0 4px, rgba(255,255,255,.05) 4px 8px); }
.dt-bar-val { font-size: 10.5px; color: var(--text-dim); white-space: nowrap; }
.dt-bar-val b { font-family: var(--mono); color: var(--text); font-weight: 600; }
.dt-bar-val em { font-style: normal; color: var(--text-faint); margin-left: 3px; }

/* 背包（私产） */
.dt-private {
  font-size: 9.5px; font-weight: 500;
  color: #c9a24a; border: 1px solid rgba(201,162,74,.45);
  background: rgba(201,162,74,.1);
  border-radius: 999px; padding: 0 6px; margin-left: 4px;
  letter-spacing: 0; text-transform: none;
}
.dt-baglist { display: flex; flex-wrap: wrap; gap: 5px; }
.dt-bagitem {
  font-size: 11px; font-family: var(--mono);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 7px; padding: 3px 8px;
  color: var(--text);
}
.dt-bagitem.empty { color: var(--text-faint); }
.dt-bagsrc { margin-top: 6px; font-size: 9.5px; color: #7d8b9d; font-family: var(--mono); }
.dt-baglocked {
  font-size: 11.5px; line-height: 1.6; color: var(--text-dim);
  background: rgba(255,255,255,.025);
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 8px; padding: 8px 10px;
}
.dt-baglocked span { color: var(--text-faint); font-size: 11px; }

/* 问它：小对话面板 */
.dt-owner { border-top: 1px solid var(--line-soft); padding-top: 9px; }
.dt-qa {
  max-height: 168px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 5px;
  padding: 7px; border-radius: 9px;
  background: rgba(0,0,0,.22);
  border: 1px solid var(--line-soft);
}
.dt-qempty { font-size: 11px; line-height: 1.65; color: var(--text-faint); text-align: center; padding: 12px 6px; }
.dt-qempty span { color: #7ef2b0; }
.dt-qerr { color: #ffb3a0; }
.dt-qmsg {
  max-width: 88%; font-size: 11.5px; line-height: 1.5;
  border-radius: 9px; padding: 5px 9px;
  display: flex; flex-direction: column; gap: 1px;
  animation: evIn .22s ease;
}
.dt-qmsg .dt-qwho { font-size: 9px; color: var(--text-faint); font-family: var(--mono); }
.dt-qmsg .dt-qtext { color: var(--text); word-break: break-word; }
.dt-qmsg.me {
  align-self: flex-end;
  background: rgba(84,176,243,.16);
  border: 1px solid rgba(84,176,243,.3);
}
.dt-qmsg.it {
  align-self: flex-start;
  background: rgba(52,192,138,.12);
  border: 1px solid rgba(52,192,138,.26);
}
.dt-qwait { font-size: 10px; color: var(--text-faint); text-align: center; padding: 2px 0; }
.dt-qwait.bad { color: #d6a26a; }
.dt-qchips { display: flex; flex-wrap: wrap; gap: 4px; margin: 7px 0 5px; }
.dt-qchip {
  font-family: inherit; font-size: 10.5px;
  color: var(--text-dim);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 9px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.dt-qchip:hover:not(:disabled) { color: var(--text); border-color: var(--accent); background: rgba(84,176,243,.12); }
.dt-qchip:disabled { opacity: .45; cursor: not-allowed; }
.dt-qinputrow { display: flex; gap: 5px; }
.dt-qinput {
  flex: 1 1 auto; min-width: 0;
  font-family: inherit; font-size: 11.5px;
  color: var(--text);
  background: rgba(0,0,0,.3);
  border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 9px;
  outline: none;
}
.dt-qinput:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(84,176,243,.16); }
.dt-qinput:disabled { color: var(--text-faint); cursor: not-allowed; }
.dt-qsend {
  flex: 0 0 auto;
  font-family: inherit; font-size: 11.5px; font-weight: 700;
  color: #06202f;
  background: linear-gradient(180deg, #7cc6f8, #4aa6e8);
  border: none; border-radius: 8px; padding: 6px 13px;
  cursor: pointer;
}
.dt-qsend:disabled { background: rgba(255,255,255,.1); color: var(--text-faint); cursor: not-allowed; }
.dt-qhint { margin-top: 5px; font-size: 9.5px; color: var(--text-faint); }

/* NPC：最近说的话 */
.dt-says { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.dt-says li {
  font-size: 11.5px; line-height: 1.5; color: var(--text);
  padding: 5px 9px; border-radius: 6px;
  background: rgba(84,176,243,.06);
  border-left: 2px solid rgba(84,176,243,.45);
}
.dt-says .dt-sayt { margin-left: 6px; font-size: 9.5px; color: var(--text-faint); font-family: var(--mono); }

/* 带问答面板时，抽屉高一点（默认 46vh/420px 放不下属性卡 + 对话） */
.dock-body.dock-wide { height: min(72vh, 660px); }
@media (max-width: 1080px) {
  .dock-body.dock-wide { height: 560px; }
}

/* 世界聊天底部：一句话说清「这里只有公屏，私聊在角色卡里」 */
.chat-foot {
  flex: 0 0 auto;
  padding: 5px 10px 6px;
  border-top: 1px solid var(--line-soft);
  font-size: 9.5px;
  color: var(--text-faint);
  letter-spacing: .2px;
  text-align: center;
  background: rgba(0,0,0,.14);
}

/* ===================== [2026-11-05 weather] 顶栏天气芯片 ===================== */
/* 位置在「昼夜相位」右边、日进度条上方；颜色跟天气种类走，一眼能看出下没下雨 */
.weather-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px 2px;
  border-radius: 999px;
  border: 1px solid var(--line-soft, rgba(255,255,255,.12));
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: .2px;
  color: #e8eef7;
  background: rgba(255,255,255,.06);
  cursor: help;
  white-space: nowrap;
  transition: background .35s ease, color .35s ease, border-color .35s ease;
}
.weather-chip.wx-clear  { color: #ffd98a; background: rgba(255,196,72,.14);  border-color: rgba(255,196,72,.38); }
.weather-chip.wx-cloudy { color: #cfd8e3; background: rgba(180,196,214,.14); border-color: rgba(180,196,214,.32); }
.weather-chip.wx-rain   { color: #9fd0ff; background: rgba(84,150,232,.20);  border-color: rgba(84,150,232,.46); }
.weather-chip.wx-fog    { color: #dfe7ee; background: rgba(206,216,226,.18); border-color: rgba(206,216,226,.40); }
.weather-chip.wx-storm  { color: #c9b6ff; background: rgba(120,88,214,.22);  border-color: rgba(150,120,240,.50); }
.weather-chip.wx-snow   { color: #eaf5ff; background: rgba(196,226,255,.20); border-color: rgba(196,226,255,.46); }

/* ===================================================================
   [2026-11-06 season] 四季：顶栏季节芯片 + 地图上的季节感两层
   =================================================================== */
/* 季节芯片：配色跟季节走（春绿 / 夏黄 / 秋橙 / 冬蓝白） */
.season-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 8px 2px;
  border-radius: 999px;
  border: 1px solid var(--line-soft, rgba(255,255,255,.12));
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: .2px;
  color: #e8eef7;
  background: rgba(255,255,255,.06);
  cursor: help;
  white-space: nowrap;
  transition: background .45s ease, color .45s ease, border-color .45s ease;
}
.season-chip.season-spring { color: #b7e8a8; background: rgba(120,200,120,.16); border-color: rgba(120,200,120,.42); }
.season-chip.season-summer { color: #ffd98a; background: rgba(255,196,72,.18);  border-color: rgba(255,196,72,.46); }
.season-chip.season-autumn { color: #f0b878; background: rgba(208,140,56,.18);  border-color: rgba(208,140,56,.46); }
.season-chip.season-winter { color: #dbeaff; background: rgba(150,190,235,.20); border-color: rgba(150,190,235,.50); }

/* 地图上的季节感：一层色调 + 一层点缀，都盖在地图上、都不吃鼠标。
   为什么用 DOM 两层而不进地图渲染管线：季节出问题也只坏这两层，地图照画。 */
.season-tint,
.season-fx {
  position: absolute;
  pointer-events: none;
  border-radius: 8px;
  z-index: 2; /* 地图(1) 之上、商人浮层/加载遮罩之下 */
}
.season-tint {
  /* [2026-11-08 perf3] 这层不再参与合成：全屏 mix-blend-mode:soft-light 在软件光栅下
     实测 1600×900 只有 35~45fps（关掉 60fps），吃掉约 1/3 的帧。
     季节色改由 js/core.js 的 applySeasonTint() 一次性烘焙进静态地图缓存，
     本元素只保留 inline background 作为「当前季节色」的唯一真源。
     低分辨率 canvas / transform 缩放 / multiply 都试过，混合成本按屏幕像素算，救不回来。 */
  display: none;
  transition: background .8s ease;
}
.season-fx { transition: opacity .8s ease; }
.canvas-wrap #map { position: relative; z-index: 1; }

/* 对话面板再高一点：两三个来回不用滚 */
.dt-qa { max-height: 216px; }

/* [2026-11-06] 角色详情抽屉改成完全不透明：
   原来是 rgba(...,.99)，背后右栏的字会透出来一点（截图里像"残影"）。 */
.dock-body { background: linear-gradient(180deg, #212937, #181e29); }

/* ============================================================
   [2026-11-08 righttabs2] 右栏「世界聊天 / 商人 / 寄售行」三页签
   —— 只新增，不动上面既有规则（旧的两页签样式留给回滚用）
   顺序固定：① 💬 世界聊天（默认） ② 🏪 商人 ③ 🏷️ 寄售行
   ============================================================ */
.trade-panel.right-tabs-panel {
  /* 聊天默认页 400px：表头 ~54 + 副标题 ~23 + 聊天区 300 + 页脚 ~24 */
  /* [2026-11-08 jitter] 允许在矮窗口里收一点（400 → 最低 300）：
     排行榜最低 310 + 本块 400 + 观察日志 31 + 间距 16 = 757，
     900 高的窗口只有 725 高 → 底下「观察日志」按钮会被挤出屏幕。
     地图区高度既然锁死了（.main 的 minmax(0,1fr)），右栏就得自己让出这 32px。 */
  flex: 0 1 400px;
  height: 400px;
  min-height: 300px;
  max-height: 400px;
}

.right-tabs {
  gap: 5px;
  padding: 6px 6px 5px;
}

/* 三页签改成上下两行：图标+名字一行，徽标一行。
   396px 宽的右栏三等分后每格约 124px，「世界聊天 + 公屏 · 30 条」一行放不下。 */
.right-tab {
  flex-direction: column;
  gap: 2px;
  padding: 5px 4px 4px;
  font-size: 12.5px;
  border-radius: 8px;
  min-width: 0;
}
.right-tab .tt-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}
.right-tab .tt-icon { font-size: 13px; }
.right-tab .tt-name { letter-spacing: .2px; white-space: nowrap; }
.right-tab .tt-count {
  min-width: 0;
  padding: 0 6px;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 15px;
  white-space: nowrap;
}

/* 聊天是第一个/默认页：选中态用主色蓝，和商人的暖金区分开 */
.right-tab[data-pane="chat"].active {
  color: #bfe3ff;
  background: rgba(84,176,243,.14);
  border-color: rgba(84,176,243,.42);
  box-shadow: inset 0 -2px 0 rgba(84,176,243,.85);
}
.right-tab[data-pane="chat"].active .tt-count {
  color: #082034;
  background: rgba(84,176,243,.88);
}

/* 聊天页：合并后把整块腾出的高度给它，固定 300px（验收要求 260~320px） */
.right-pane { flex: 1 1 auto; min-height: 0; }
.right-pane .chat-list {
  flex: 0 0 300px;
  height: 300px;
  min-height: 260px;
  max-height: 320px;
}
.right-pane .chat-foot { margin-top: auto; }
.right-pane .trade-sub { padding: 5px 12px 2px; }

/* 商人 / 寄售行两页沿用原 .trade-pane 的滚动列表，只把页签内容区压紧一点 */
.right-pane .vendor-list,
.right-pane .consign-list { padding-top: 3px; }

/* ============================================================
   [2026-11-08 killrank] ⚔️ 击杀榜 + 角色卡战绩行
   ============================================================ */
/* 第三个 tab 的选中态用红橙，和金币榜的金色区分开 */
.rank-tab[data-metric="kills"].active { border-bottom-color: #ff7a45; }
.rank-tab[data-metric="kills"].active .rt-label { color: #ff9a6b; }

/* 击杀数：红橙 + 加粗，放行尾（和金币数同一个位置） */
.rank-kills {
  margin-left: auto; flex: 0 0 auto;
  display: inline-flex; align-items: baseline; gap: 3px;
  font-family: var(--mono); font-size: 13px; font-weight: 800;
  color: #ff7a45; text-shadow: 0 0 12px rgba(255,110,60,.3);
}
.rank-kills-unit { font-family: inherit; font-size: 9px; font-weight: 600; color: rgba(255,150,110,.78); }
.rank-kill-line2 { margin-top: 2px; }
.rank-kill-deaths { flex: 0 0 auto; font-size: 10px; font-weight: 600; color: #c98f86; }
.rank-kill-days {
  margin-left: auto; flex: 0 0 auto;
  font-family: var(--mono); font-size: 9.5px; color: var(--text-faint);
}

/* 角色卡里的「战绩 12 杀 · 5 死（KD 2.4）」：一条淡红的横条，别抢生存状态的主次 */
.dt-combat {
  margin-top: 7px;
  padding: 6px 9px;
  border-radius: 7px;
  background: rgba(255,122,69,.08);
  border-left: 2px solid rgba(255,122,69,.55);
  font-size: 11px;
  color: var(--text-dim);
}
.dt-combat b { font-family: var(--mono); font-weight: 800; color: #ff8a55; }
.dt-combat [data-combat="deaths"] { font-family: var(--mono); font-weight: 700; color: #f0b3a4; }
.dt-combat [data-combat="kd"] { font-family: var(--mono); color: var(--text-faint); }

/* ============================================================
   [2026-11-08 vitals] 地图悬停卡（#player-tip）里的三条细血条
   ------------------------------------------------------------
   条高 5px、圆角；宽度 = 数值百分比；数字固定右侧（卡片总宽不变）。
   颜色：>60% 绿 / 30~60% 黄 / <30% 红（红时轻微脉动）。
   ============================================================ */
#player-tip .pt-vitals { margin: 4px 0 2px; }
#player-tip .pt-vital {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  white-space: nowrap;
}
#player-tip .pt-vital-label {
  flex: 0 0 auto;
  width: 25px;
  font-size: 10.5px;
  line-height: 1.4;
  color: #8fb6c8;
}
#player-tip .pt-vital-track {
  position: relative;
  flex: 1 1 auto;
  width: 110px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
#player-tip .pt-vital-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}
#player-tip .pt-vital-fill.ok      { background: linear-gradient(90deg, #2e9e6f, #4fd18b); }
#player-tip .pt-vital-fill.mid     { background: linear-gradient(90deg, #c99630, #f0b13b); }
#player-tip .pt-vital-fill.low     { background: linear-gradient(90deg, #c24545, #ec5a5a); }
#player-tip .pt-vital-fill.unknown {
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.16) 0 3px, rgba(255,255,255,.05) 3px 6px);
}
#player-tip .pt-vital.pulse .pt-vital-fill { animation: ptVitalPulse 0.9s ease-in-out infinite; }
#player-tip .pt-vital-num {
  flex: 0 0 auto;
  min-width: 20px;
  text-align: right;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #eafaff;
}
#player-tip .pt-vital.unknown .pt-vital-num,
#player-tip .pt-vital.unknown .pt-vital-label { color: #6f7f8f; }

@keyframes ptVitalPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}



/* ============================================================
   [2026-11-09 market] 右栏第四个页签「📈 行情」（市场交易）
   ------------------------------------------------------------
   结构（market-trend.js 渲染）：
     .market-ticker-bar  > #market-ticker        顶部轮播：📈 鱼 5.0 ↑ +2%
     .trade-sub          > #market-meta          第 N 天 HH:MM · 手续费 5% · 今日成交 N 笔
     #market-list        > .market-row × N       名称 | 现价 | ↑↓幅度 | 今日成交 | 收购帽
                           └ .mk-detail           点开后的小卡片（基础/开盘/目标价 + 迷你折线）
   颜色：涨绿跌红（和股市一致，**不用**红涨绿跌那套）。
   ============================================================ */

/* 四个页签：396px 右栏四等分，每格约 95px，图标+名字仍放得下 */
.right-tabs { gap: 4px; }
.right-tab { padding: 5px 3px 4px; font-size: 12px; }
.right-tab .tt-count { font-size: 9px; padding: 0 5px; line-height: 14px; }

/* 行情页签选中态：涨绿（和聊天的蓝、商人的金、寄售的红区分开） */
.right-tab[data-pane="market"].active {
  color: #a6f0c9;
  background: rgba(53,192,138,.14);
  border-color: rgba(53,192,138,.42);
  box-shadow: inset 0 -2px 0 rgba(53,192,138,.85);
}
.right-tab[data-pane="market"].active .tt-count {
  color: #06251a;
  background: rgba(53,192,138,.88);
}

.market-pane {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  /* [2026-11-13 market-cols] 列宽只在这里定义一次，表头和数据行都吃 --mk-cols：
     表头在滚动容器外面，两边一旦各写一套（更别说一边根本没写）就必然对不上。 */
  --mk-cols: minmax(0, 1fr) 48px 58px 44px 54px; /* 名称 | 现价 | 涨跌 | 成交量 | 收购帽 */
  --mk-gap: 6px;   /* 列间距（表头 / 行同值） */
  --mk-pad-x: 8px; /* 行内左右留白（= .market-row 与 .market-list 的左右 padding） */
  --mk-sbw: 8px;   /* 数据区纵向滚动条占宽；market-trend.js 会按实测值改这个变量 */
}

/* 顶部轮播条：一行、不换行、超出省略；颜色跟着当前那个商品涨跌 */
.market-ticker-bar {
  flex: 0 0 auto;
  padding: 4px 12px 0;
  min-width: 0;
}
.market-ticker {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  padding: 0 7px;
  border-radius: 7px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
}
.market-ticker.up   { color: #52d99a; border-color: rgba(53,192,138,.32); background: rgba(53,192,138,.08); }
.market-ticker.down { color: #ff8a8a; border-color: rgba(236,90,90,.30); background: rgba(236,90,90,.08); }
.market-ticker.flat { color: var(--text-dim); }

/* [2026-11-13 market-cols] 列表表头：和 .market-row 用同一套 --mk-cols / --mk-gap，
   盒子也按一样的方式算 —— 左右 margin 补上 .market-list 的左右 padding(8px)，
   内边距 + 边框照着 .market-row 的 8px padding / (左 2px + 其余 1px) border 来，
   最后再加一条 --mk-sbw：数据区是 overflow-y:auto，滚动条吃掉的那 8px 表头也得让出来，
   否则表头比数据行宽 8px，五列会整体往右错开。 */
.mk-head-row {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: var(--mk-cols);
  gap: var(--mk-gap);
  align-items: center;
  margin: 0 var(--mk-pad-x);
  padding: 1px var(--mk-pad-x) 2px;
  padding-right: calc(var(--mk-pad-x) + var(--mk-sbw));
  border: 1px solid transparent;
  border-left: 2px solid transparent; /* 行有 2px 涨跌色条，表头留同宽空心位 */
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.6;
  color: var(--text-faint);
  user-select: none;
}
.mk-head-row > span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: right; /* 和数字列一样右对齐；名称列单独改回左对齐 */
}
.mk-head-row .mkh-name { text-align: left; padding-left: 1px; }

/* 商品列表：可滚动，一行一商品 */
.market-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  /* 滚动条槽位常驻：行数少/空态时也不会因为滚动条出现或消失而让表头跳 8px */
  scrollbar-gutter: stable;
  padding: 2px 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* 列宽：名称吃剩余、现价/幅度/成交/帽 固定宽（数字右对齐，滚起来不跳）
   宽度定义在 .market-pane 的 --mk-cols，表头 .mk-head-row 用的是同一个变量 */
.market-row {
  display: grid;
  grid-template-columns: var(--mk-cols);
  align-items: center;
  gap: var(--mk-gap);
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.028);
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.25;
  transition: background .14s ease, border-color .14s ease;
}
.market-row:hover { background: rgba(255,255,255,.06); border-color: var(--line); }
.market-row:focus-visible { outline: 2px solid rgba(53,192,138,.55); outline-offset: -2px; }
.market-row[aria-expanded="true"] {
  background: rgba(255,255,255,.055);
  border-color: rgba(53,192,138,.3);
}

.market-row .mk-name {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
}
.market-row .mk-icon { flex: 0 0 auto; font-size: 12px; line-height: 1; }
.market-row .mk-nm {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.market-row .mk-kind {
  flex: 0 0 auto;
  font-size: 8.5px;
  font-weight: 600;
  color: var(--text-faint);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0 3px;
}
.market-row .mk-price {
  text-align: right;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
}
.market-row .mk-pct {
  text-align: right;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}
.market-row .mk-vol {
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}
.market-row .mk-cap {
  text-align: right;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
}

/* 涨绿跌红（股市口径）；平盘走灰 */
.market-row.up   .mk-pct,  .market-row.up   .mk-price { color: #52d99a; }
.market-row.down .mk-pct,  .market-row.down .mk-price { color: #ff8a8a; }
.market-row.flat .mk-pct,  .market-row.flat .mk-price { color: var(--text-dim); }
.market-row.up   { border-left: 2px solid rgba(53,192,138,.55); }
.market-row.down { border-left: 2px solid rgba(236,90,90,.5); }
.market-row.flat { border-left: 2px solid rgba(154,167,186,.28); }

/* 展开卡片：基础价/开盘价/目标价… + 迷你折线 */
.market-row .mk-detail {
  grid-column: 1 / -1;
  margin: 5px 0 1px;
  padding: 7px 8px 8px;
  border-radius: 8px;
  background: rgba(0,0,0,.26);
  border: 1px solid var(--line-soft);
  cursor: default;
}
.mk-detail .mk-dhead {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
}
.mk-detail .mk-dname { font-size: 12.5px; font-weight: 800; color: var(--text); }
.mk-detail .mk-dsub {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  color: var(--text-faint);
}
.mk-detail .mk-dgrid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 3px 8px;
  font-size: 11px;
}
.mk-detail .mk-dk { color: var(--text-faint); white-space: nowrap; }
.mk-detail .mk-dv {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mk-detail .mk-dv.up { color: #52d99a; }
.mk-detail .mk-dv.down { color: #ff8a8a; }
.mk-detail .mk-dv.flat { color: var(--text-dim); }
.mk-detail .mk-spark-wrap { margin-top: 7px; }
.mk-detail .mk-spark-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 10px;
  color: var(--text-faint);
  margin-bottom: 2px;
}
.mk-detail .mk-spark-note { color: #55606f; font-size: 9.5px; }
.mk-detail .mk-spark { display: block; width: 100%; height: 32px; }
.mk-detail .mk-spark-empty {
  padding: 7px 0 1px;
  font-size: 10.5px;
  color: var(--text-faint);
  text-align: center;
  border: 1px dashed var(--line-soft);
  border-radius: 6px;
}

/* 空状态 / 页脚 */
.market-empty { padding: 22px 10px; text-align: center; color: var(--text-faint); font-size: 12px; line-height: 1.7; }
.market-empty .me-title { font-size: 14px; font-weight: 800; color: var(--text-dim); margin-bottom: 4px; }
.market-foot {
  flex: 0 0 auto;
  padding: 4px 12px 5px;
  font-size: 10px;
  color: var(--text-faint);
  border-top: 1px solid var(--line-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 矮窗口：行情列表本来就滚，别把页签表头挤掉 */
@media (max-height: 820px) {
  .market-row { padding: 3px 8px; }
}

/* ============================================================
   [2026-11-09 craft] 商人卡片（点地图上的商人 → 覆盖层）
   ------------------------------------------------------------
   结构（npc-card.js 渲染）：.npc-card-mask > .npc-card > #npc-card-body
     .nc-head    立绘 + 名字 + 营业时间 + ● 营业中 / 🌙 已打烊
     .nc-closed  打烊提示 + 倒计时
     .nc-sec     配方（.nc-recipe） / 收（.nc-deal） / 卖（.nc-deal） / 外观
   遮罩半透明：地图还看得见，不挡事。
   ============================================================ */
.npc-card-mask {
  position: fixed;
  inset: 0;
  z-index: 620; /* 在地图之上、主人面板（9600）之下 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6,9,14,.46); /* 半透明遮罩，不阻断看地图 */
  backdrop-filter: blur(1.5px);
}
.npc-card-mask[hidden] { display: none; }

.npc-card {
  position: relative;
  width: min(520px, 100%);
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(36,45,60,.99), rgba(24,30,41,.99));
  border: 1px solid #2e3848;
  border-radius: 14px;
  box-shadow: 0 26px 70px rgba(0,0,0,.66), inset 0 1px 0 rgba(255,255,255,.04);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}
.npc-card-x {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  font: 17px/1 ui-sans-serif, sans-serif;
  color: var(--text-dim);
  background: rgba(0,0,0,.2);
  border: 1px solid #2e3848;
  border-radius: 8px;
  cursor: pointer;
  z-index: 2;
}
.npc-card-x:hover { background: rgba(255,255,255,.1); color: var(--text); }
.npc-card-body { overflow-y: auto; padding: 12px 14px 13px; }

/* [2026-11-11 i18n] 右上角的关闭按钮是 absolute；英文「● Open」比「● 营业中」短，
   会正好滑到 × 底下叠在一起 —— 这里给 head 留出 30px，两种语言都不会撞上。 */
.nc-head { display: flex; align-items: flex-start; gap: 11px; padding-right: 30px; }
.nc-avatar {
  width: 54px; height: 54px;
  flex: 0 0 auto;
  image-rendering: pixelated;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line-soft);
  object-fit: contain;
}
.nc-id { flex: 1 1 auto; min-width: 0; }
.nc-name { font-size: 15px; font-weight: 800; letter-spacing: .3px; }
.nc-title { font-size: 11px; color: var(--text-dim); margin-top: 1px; }
.nc-hours { font-size: 10px; color: var(--text-faint); margin-top: 2px; }
.nc-count { color: var(--warn); font-weight: 700; }
.nc-state {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}
.nc-state.open { color: #8ff0c0; background: rgba(53,192,138,.14); border-color: rgba(53,192,138,.38); }
.nc-state.closed { color: #a7b2c2; background: rgba(255,255,255,.05); border-color: var(--line-soft); }

.nc-closed {
  margin-top: 8px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 11px;
  color: #ffd9a0;
  background: rgba(240,177,59,.09);
  border: 1px solid rgba(240,177,59,.28);
}
.nc-lines {
  margin-top: 7px;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 10.5px;
  color: var(--text-faint);
  background: rgba(255,255,255,.03);
  border: 1px dashed var(--line-soft);
}

.nc-sec { margin-top: 10px; }
.nc-sec h4 {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: .3px;
}
.nc-tag {
  padding: 0 5px;
  border-radius: 5px;
  font-size: 9px;
  line-height: 15px;
  font-weight: 800;
  color: #d7e3f2;
  background: rgba(255,255,255,.09);
  border: 1px solid var(--line-soft);
}
.nc-tag.craft { color: #ffd0a6; background: rgba(240,140,59,.16); border-color: rgba(240,140,59,.36); }
.nc-tag.buy { color: #9fe6c4; background: rgba(53,192,138,.14); border-color: rgba(53,192,138,.32); }
.nc-tag.sell { color: #ffd9a0; background: rgba(240,177,59,.14); border-color: rgba(240,177,59,.32); }
/* [2026-11-11 nc-bank] 非商人（钱庄 / 荒原引路人）两张卡：键值表 + 警示条 */
.nc-tag.bank { color: #ffd98a; background: rgba(226,190,84,.16); border-color: rgba(226,190,84,.38); }
.nc-tag.guide { color: #ffb0a6; background: rgba(200,84,64,.16); border-color: rgba(200,84,64,.38); }

.nc-kvs { display: flex; flex-direction: column; gap: 2px; }
.nc-kv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  padding: 2px 0;
  border-bottom: 1px dashed rgba(255,255,255,.06);
}
.nc-kv:last-child { border-bottom: 0; }
.nc-k { font-size: 11px; color: var(--fg-dim, #92a4bb); }
.nc-v { font-size: 11px; font-weight: 700; color: #e6eefb; text-align: right; }
.nc-v.good { color: #52d99a; }
.nc-v.warn { color: #ffd66b; }
.nc-warn {
  margin-top: 6px;
  padding: 5px 7px;
  border-radius: 6px;
  border-left: 2px solid rgba(255,138,120,.6);
  background: rgba(255,110,90,.08);
  color: #ffc9bd;
  font-size: 11px;
  line-height: 1.45;
}

.nc-recipes { display: flex; flex-direction: column; gap: 3px; }
.nc-recipe {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "name fee state"
    "need need need";
  align-items: center;
  column-gap: 6px;
  row-gap: 1px;
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line-soft);
  border-left: 2px solid rgba(154,167,186,.3);
  font-size: 11.5px;
}
.nc-recipe.ok { border-left-color: rgba(53,192,138,.75); }
.nc-recipe.lack { border-left-color: rgba(236,90,90,.75); background: rgba(236,90,90,.06); }
.nc-recipe .nc-r-name { grid-area: name; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-recipe.lack .nc-r-name { color: #d9b6b6; }
.nc-recipe .nc-r-need { grid-area: need; display: flex; flex-wrap: wrap; gap: 3px; min-width: 0; }
.nc-recipe .nc-r-fee { grid-area: fee; justify-self: end; color: var(--warn); font-size: 10px; font-weight: 700; white-space: nowrap; }
.nc-recipe .nc-r-rate { grid-area: rate; justify-self: end; color: var(--text-faint); font-size: 10px; white-space: nowrap; }
.nc-recipe .nc-r-state { grid-area: state; justify-self: end; font-size: 9.5px; font-weight: 700; white-space: nowrap; }
.nc-recipe.ok .nc-r-state { color: #52d99a; }
.nc-recipe.lack .nc-r-state { color: #ff8a8a; }
.nc-recipe.unknown .nc-r-state { color: var(--text-faint); }

.nc-chip {
  padding: 0 4px;
  border-radius: 5px;
  font-size: 9.5px;
  line-height: 15px;
  color: var(--text-dim);
  background: rgba(255,255,255,.05);
  border: 1px solid transparent;
  white-space: nowrap;
}
.nc-chip.lack { color: #ffb3b3; background: rgba(236,90,90,.14); border-color: rgba(236,90,90,.38); }
.nc-chip.ok { color: #a8e6c4; background: rgba(53,192,138,.1); border-color: rgba(53,192,138,.26); }

/* 卖 / 收 的价目行：一行一件，「名字 …… 24 文（每日 3 件）」 */
.nc-sells { display: flex; flex-direction: column; gap: 2px; }
.nc-sell-row {
  display: flex; align-items: baseline; gap: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line-soft);
  white-space: nowrap;
  overflow: hidden;
}
.nc-sell-row b { margin-left: auto; color: var(--warn); font-weight: 800; }
.nc-sell-row .nc-di { font-size: 11px; }
.nc-sell-row .nc-cap { color: var(--text-faint); font-style: normal; font-size: 9px; }

/* 收旧装备：槽位标签 + 说明 */
.nc-gear-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nc-gear-tag {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  color: #cfe6d8;
  background: rgba(53,192,138,.1);
  border: 1px solid rgba(53,192,138,.28);
}
.nc-gear-note { font-size: 9px; color: var(--text-faint); }

/* 节标题右边的小字（几分钟 / 几折 / 谁接） */
.nc-sub { margin-left: 5px; font-size: 9.5px; font-weight: 500; color: var(--text-faint); }

/* 还没有立绘的 NPC（鲁班刚上线时）：用 emoji 占位，别让 <img> 404 污染控制台 */
.nc-avatar-emoji {
  display: grid; place-items: center;
  font-size: 26px; line-height: 1;
}

/* 打烊：整卡变灰（价目 / 打造单还能看，只是现在不能下单） */
.npc-card.is-closed { filter: grayscale(.72) brightness(.86); }
.npc-card.is-closed .nc-state.closed { filter: grayscale(0) brightness(1.2); }
.nc-clothes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.nc-cloth {
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
  color: var(--text-dim);
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,.03);
}
.nc-note { margin-top: 5px; font-size: 9.5px; color: var(--text-faint); line-height: 1.5; }
.nc-foot {
  margin-top: 10px;
  padding-top: 7px;
  border-top: 1px solid var(--line-soft);
  font-size: 9.5px;
  color: #55606f;
  line-height: 1.5;
}
.nc-empty { padding: 18px 8px; text-align: center; color: var(--text-faint); }

@media (max-height: 760px) {
  .npc-card { max-height: 84vh; }
  .nc-avatar { width: 44px; height: 44px; }
}

/* ============================================================
   [2026-11-09 news] 顶栏「📰 日报」+ 报纸风格覆盖层
   ------------------------------------------------------------
   深色界面里的一块**浅色纸**：米白/淡黄底 + 衬线标题 + 细黑描边，
   就是要和周围拉开对比 —— 一眼就知道「这是报纸，不是又一个面板」。
   结构（js/news-panel.js 建）：
     .news-mask > .news-paper > (.news-x, #news-body > .news-issue, #news-nav)
       .news-issue : .news-mast 报头 / .news-sec 分栏 / .news-cols 两栏 / .news-full 原文 / .news-stats
       .news-degraded : 接口没上线时的降级卡
   ============================================================ */

/* ---- 顶栏按钮 ---- */
.chip.news-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--text-dim);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line-soft);
  font-family: inherit;
  font-size: 11px;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.chip.news-btn:hover { color: #f3e6c8; border-color: rgba(240,201,120,.5); background: rgba(240,201,120,.1); }
.chip.news-btn.has-unread { color: #ffd98a; border-color: rgba(240,177,59,.55); background: rgba(240,177,59,.12); }
.news-btn-ico { font-size: 13px; line-height: 1; }
.news-btn-text { letter-spacing: .5px; }
.news-badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e2453f;
  color: #fff;
  font: 700 10px/1 var(--mono);
  letter-spacing: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.5), 0 0 0 1.5px #1c232f;
  animation: newsBadgePop .3s ease-out;
}
.news-badge[hidden] { display: none; }
@keyframes newsBadgePop {
  from { transform: scale(.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ============================================================
   [2026-11-11 i18n] 顶栏语言切换（中文 / English 并排两枚小胶囊）
   ------------------------------------------------------------
   结构由 js/i18n.js 按 I18N.langs 生成：.lang-switch > .lang-btn[data-lang]
   当前语言 = .active（亮底 + 亮字），所以一眼就能看出现在是哪一个。
   放这一段的理由：和 .chip 系列同一块，方便跟顶栏其它胶囊一起调。
   ============================================================ */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line-soft);
}
.lang-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-faint);
  font: 600 10.5px/1 inherit;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.lang-btn:hover { color: var(--text); background: rgba(255,255,255,.07); }
.lang-btn:focus-visible { outline: 2px solid rgba(56,189,248,.6); outline-offset: 1px; }
.lang-btn.active {
  color: #eaf6ff;
  background: rgba(61,127,214,.32);
  border-color: rgba(120,180,255,.55);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
/* 有新一期：图标闪一下（一次，不循环） */
.chip.news-btn.is-flash { animation: newsFlash 1.4s ease-out 1; }
@keyframes newsFlash {
  0%   { box-shadow: 0 0 0 0 rgba(240,177,59,.85); background: rgba(240,177,59,.34); color: #fff3d0; }
  35%  { box-shadow: 0 0 0 7px rgba(240,177,59,0);  background: rgba(240,177,59,.18); }
  70%  { box-shadow: 0 0 0 0 rgba(240,177,59,.5);   background: rgba(240,177,59,.3); }
  100% { box-shadow: 0 0 0 0 rgba(240,177,59,0);    background: rgba(240,177,59,.12); }
}

/* ---- 遮罩 ---- */
.news-mask {
  position: fixed;
  inset: 0;
  z-index: 6200; /* 在地图/右栏之上，主人面板（9600）之下 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background: rgba(4,7,11,.62);
  backdrop-filter: blur(2px);
}
.news-mask[hidden] { display: none; }

/* ---- 纸 ---- */
.news-paper {
  position: relative;
  width: min(880px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* 米白纸 + 极淡的斜向纹理，像旧报纸的纤维 */
  background:
    repeating-linear-gradient(45deg, rgba(120,100,60,.028) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #fbf6e8 0%, #f6efdc 55%, #f2e9d2 100%);
  color: #2a2419;
  border: 1px solid #cdbf9d;
  border-radius: 3px;
  box-shadow:
    0 30px 80px rgba(0,0,0,.7),
    0 2px 0 rgba(255,255,255,.6) inset,
    0 0 0 1px rgba(120,100,60,.12);
  font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, "Microsoft YaHei", serif;
  font-size: 13.5px;
  line-height: 1.72;
}
/* 纸边：左右两道双线，老报纸的框 */
.news-paper::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(90,74,42,.28);
  outline: 3px double rgba(90,74,42,.16);
  outline-offset: -4px;
  pointer-events: none;
  z-index: 1;
}

.news-x {
  position: absolute;
  top: 12px; right: 12px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  font: 17px/1 ui-sans-serif, sans-serif;
  color: #5c4d33;
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(90,74,42,.3);
  border-radius: 50%;
  cursor: pointer;
  z-index: 6;
}
.news-x:hover { background: #fff9ec; color: #231d12; border-color: #8a7448; }

.news-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 30px 18px;
  position: relative;
  z-index: 2;
  scrollbar-width: thin;
  scrollbar-color: #c3b48d transparent;
}
.news-body::-webkit-scrollbar { width: 9px; }
.news-body::-webkit-scrollbar-thumb { background: #cbbd97; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }

/* ---- 报头 ---- */
.news-mast { position: relative; }
.news-mast-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.news-mast-name {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #1b1610;
  /* 报头字压一点点阴影，像铅字 */
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
}
.news-mast-date {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #4a3f2b;
  letter-spacing: .5px;
  font-family: var(--mono);
}
/* 【新】印章：红底白字，稍微歪一点才像盖上去的 */
.news-stamp,
.news-nav-new {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  background: #c8402f;
  border-radius: 2px;
  transform: rotate(-4deg);
  box-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.news-stamp { margin-left: 2px; }
.news-nav-new { transform: none; box-shadow: none; }
.news-mast-rule {
  margin-top: 7px;
  height: 0;
  border-top: 3px double #4a3f2b;
}
.news-mast-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0 0;
  font-size: 10.5px;
  letter-spacing: 1.5px;
  color: #6e5f42;
  font-family: var(--mono);
}
.news-mast-dot { color: #b9a97f; }

/* ---- 分栏 ---- */
.news-sec { margin-top: 13px; }
.news-sec-h {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  padding-bottom: 3px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #231d12;
  border-bottom: 1px solid rgba(90,74,42,.34);
}
.news-sec-ico { font-size: 14px; }
.news-sec-body { padding: 0 2px; }
/* 头版：行情那块给一道左侧竖线 + 略大字号，撑起「头条」的感觉 */
.news-sec.news-lead .news-sec-h { font-size: 15px; border-bottom-width: 2px; }
.news-sec.news-lead .news-sec-body { padding-left: 10px; border-left: 3px solid rgba(200,64,47,.55); }

.news-rows { margin: 0; padding: 0; list-style: none; }
.news-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 1px 0;
}
.news-row-name { font-weight: 700; color: #1f1a11; }
.news-row-name::after { content: " "; }
.news-row-val { font-family: var(--mono); font-size: 12.5px; font-weight: 700; }
.news-row-val.up { color: #a8331f; }     /* 涨=红（纸媒习惯） */
.news-row-val.down { color: #1f5d3a; }   /* 跌=绿 */
.news-row-val.flat { color: #5a4d33; }

.news-list { margin: 0; padding: 0; list-style: none; }
.news-li { position: relative; padding-left: 13px; }
.news-li::before {
  content: "·";
  position: absolute;
  left: 3px;
  color: #a08b5f;
  font-weight: 900;
}
.news-li-top { font-weight: 700; }
.news-li-top::before { content: "▶"; font-size: 9px; color: #c8402f; left: 1px; }

.news-text { margin: 0; }

.news-advice {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 7px;
  padding: 6px 9px;
  background: rgba(200,64,47,.07);
  border-left: 3px solid #c8402f;
}
.news-advice-tag {
  flex: 0 0 auto;
  padding: 0 5px;
  font-size: 10.5px;
  font-weight: 900;
  color: #fff;
  background: #c8402f;
  border-radius: 2px;
  letter-spacing: 1px;
}
.news-advice-text { font-weight: 700; color: #3a2f1d; }

/* 两栏：宽屏并排（报纸版式），窄屏自动落成一栏 */
.news-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 26px;
  align-items: start;
}
.news-cols .news-sec { margin-top: 12px; }
/* 中间那道分栏线（老报纸的竖线） */
.news-cols .news-sec:nth-child(even) {
  padding-left: 24px;
  border-left: 1px solid rgba(90,74,42,.22);
  margin-left: -13px;
}
@media (max-width: 720px) {
  .news-cols { grid-template-columns: 1fr; }
  .news-cols .news-sec:nth-child(even) { padding-left: 0; border-left: 0; margin-left: 0; }
}

/* 原文：给 AI 读的那份纯文本 */
.news-full {
  margin-top: 14px;
  padding-top: 7px;
  border-top: 1px dashed rgba(90,74,42,.35);
  font-size: 11.5px;
  color: #5b4d33;
}
.news-full > summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .5px;
  color: #7a6844;
  list-style: none;
}
.news-full > summary::-webkit-details-marker { display: none; }
.news-full > summary::before { content: "▸ "; }
.news-full[open] > summary::before { content: "▾ "; }
.news-full > summary:hover { color: #2a2419; }
.news-pre {
  margin: 7px 0 0;
  padding: 9px 11px;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.62;
  color: #3b3222;
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(90,74,42,.2);
  border-radius: 3px;
}

/* 数据条 */
.news-stats {
  display: flex;
  gap: 16px;
  margin-top: 13px;
  padding-top: 7px;
  border-top: 3px double #4a3f2b;
  font-size: 11px;
  letter-spacing: .5px;
  color: #5b4d33;
  font-family: var(--mono);
}
.news-stats b { color: #1f1a11; font-size: 12.5px; }

/* ---- 翻页栏 ---- */
.news-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 10px;
  background: rgba(120,100,60,.07);
  border-top: 1px solid rgba(90,74,42,.28);
  position: relative;
  z-index: 3;
  font-family: var(--mono);
  font-size: 11px;
  color: #5b4d33;
}
.news-nav[hidden] { display: none; }
.news-nav-btn {
  padding: 4px 12px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: #33291a;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(90,74,42,.4);
  border-radius: 3px;
  cursor: pointer;
}
.news-nav-btn:hover:not(:disabled) { background: #fffdf6; border-color: #7a6844; }
.news-nav-btn:disabled { opacity: .34; cursor: not-allowed; }
.news-nav-pos { font-weight: 700; color: #3a2f1d; }
.news-nav-keys { margin-left: auto; color: #8a7853; font-size: 10px; }
.news-nav-offline { color: #a8331f; font-size: 10px; }

/* ---- 降级 / 空 / 加载 ---- */
.news-degraded,
.news-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 260px;
  padding: 26px 16px;
  text-align: center;
}
.news-loading { color: #6e5f42; font-size: 12.5px; font-family: var(--mono); }
.news-loading::before {
  content: "";
  width: 22px; height: 22px;
  margin-bottom: 6px;
  border: 2px solid rgba(90,74,42,.25);
  border-top-color: #7a6844;
  border-radius: 50%;
  animation: newsSpin .8s linear infinite;
}
@keyframes newsSpin { to { transform: rotate(360deg); } }
.nd-ico { font-size: 40px; line-height: 1; filter: grayscale(.15); }
.nd-title { font-size: 17px; font-weight: 900; letter-spacing: 1px; color: #2a2419; }
.nd-sub { font-size: 12px; color: #6e5f42; }
.nd-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
  font-size: 10.5px;
  color: #857351;
  font-family: var(--mono);
}
.nd-meta-2 { margin-top: 1px; }
.nd-dot { color: #b9a97f; }
.nd-retry {
  margin-top: 11px;
  padding: 5px 16px;
  font: 700 12px/1.4 "Microsoft YaHei", system-ui, sans-serif;
  color: #fff;
  background: #8a7448;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
.nd-retry:hover { background: #6f5c37; }
.nd-hint {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px dashed rgba(90,74,42,.3);
  font-size: 10px;
  color: #8a7853;
  font-family: var(--mono);
}
.nd-hint code {
  padding: 1px 4px;
  background: rgba(90,74,42,.1);
  border-radius: 2px;
}

/* 矮窗口：报头小一号，别把正文挤没了 */
@media (max-height: 720px) {
  .news-body { padding: 16px 22px 12px; }
  .news-mast-name { font-size: 21px; }
  .news-degraded { min-height: 200px; padding: 16px; }
}

/* ============================================================
   [2026-11-10 itemtip] 全站物品悬停卡（js/item-tip.js）
   ------------------------------------------------------------
   一个单例浮层，跟着鼠标走；靠近视口边缘自动翻到另一侧（JS 里算 side/vside）。
   pointer-events:none 是硬要求：卡片不能吃掉鼠标，否则鼠标一进去就触发 mouseout → 闪。
   ============================================================ */
.itip {
  position: fixed;
  z-index: 9800; /* 主人面板 9600 之上：物品属性永远看得见 */
  min-width: 172px;
  max-width: 320px;
  padding: 9px 11px 10px;
  background: linear-gradient(180deg, rgba(28,35,47,.985), rgba(18,23,32,.99));
  border: 1px solid rgba(240,200,120,.5);
  border-radius: 7px;
  box-shadow: 0 10px 30px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.4) inset;
  color: var(--text);
  font: 12px/1.45 "Microsoft YaHei", system-ui, sans-serif;
  pointer-events: none;
  user-select: none;
  animation: itip-in .12s ease-out;
}
@keyframes itip-in {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: none; }
}
.itip[hidden] { display: none; }

.itip-h {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(240,200,120,.28);
  margin-bottom: 6px;
}
.itip-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #ffd98a;
  text-shadow: 0 1px 0 rgba(0,0,0,.6);
}
.itip-sub {
  font-size: 10.5px;
  color: #9aa7ba;
  font-family: var(--mono);
}

.itip-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 1px 0;
}
.itip-k { color: #8fa4ba; white-space: nowrap; font-size: 11.5px; }
.itip-v { color: var(--text); font-weight: 600; font-family: var(--mono); text-align: right; }
.itip-v.up { color: #7ef2b0; }
.itip-v.down { color: #ff9b93; }
.itip-v.dim { color: #b6c0cf; font-weight: 500; }
.itip-v.craft { color: #ffd98a; }

.itip-sep {
  height: 1px;
  margin: 6px 0 5px;
  background: linear-gradient(90deg, rgba(240,200,120,.35), rgba(240,200,120,.05));
}

.itip-bullet {
  position: relative;
  padding-left: 9px;
  color: #d8e2ee;
  font-size: 11.5px;
  line-height: 1.5;
}
.itip-bullet::before {
  content: '·';
  position: absolute;
  left: 1px;
  color: #f0c96b;
}
.itip-bullet.eff { color: #cfe6ff; }
.itip-bullet.use { color: #ffe0a0; padding-left: 0; }

.itip-flavor {
  margin-top: 5px;
  color: #8f9bab;
  font-size: 11px;
  line-height: 1.5;
  font-style: italic;
}

/* 日志里被自动包起来的掉落物名：只加虚下划线，不改变行内排版 */
.itip-link {
  border-bottom: 1px dotted rgba(240,200,120,.6);
  cursor: help;
}
.itip-link:hover { color: #ffd98a; border-bottom-color: #ffd98a; }

/* ---- [2026-11-10 itemtip] 角色卡「随身物」：外观 / 手上的武器，悬停看属性 ---- */
.dt-bag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.dt-bag-item {
  padding: 3px 9px 4px;
  border: 1px solid rgba(240,200,120,.28);
  border-radius: 999px;
  background: rgba(240,200,120,.06);
  color: #ffe0a0;
  font-size: 11.5px;
  cursor: help;
}
.dt-bag-item:hover { border-color: rgba(240,200,120,.7); background: rgba(240,200,120,.14); }
/* 带物品的东西统一给个 help 光标：一眼看出「这里能悬停」 */
[data-item] { cursor: help; }
.nc-chip[data-item]:hover, .consign-row[data-item]:hover, .opm-item[data-item]:hover { filter: brightness(1.18); }

/* ============================================================
   [2026-11-11 durability] 装备耐久：悬停卡里的耐久条 + 列表里的小条 / ⚠️
   ------------------------------------------------------------
   老板原话：「装备上看不到耐久。」
   颜色四档（和 js/item-tip.js 的 durTone() 一一对应）：
     100~60% 绿（.ok）· 60~30% 黄（.warn）· 30~10% 橙（.low）· <10% 红 + 闪烁（.critical）
   ⚠️ 三条硬要求：
     1) 颜色只在这里写一次，JS 只负责加 class（改色不用改逻辑）；
     2) <10% 必须真的在动（animation），「快坏了」要一眼看出来；
     3) prefers-reduced-motion 下不闪（无障碍），但颜色照旧 —— 红色本身就够扎眼。
   ============================================================ */

/* ---- 悬停卡里的耐久条：10 格方块 ---- */
.itip-dur .itip-k { color: #9fb0c4; }
.itip-durv { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); }
.itip-durbar { display: inline-flex; gap: 2px; align-items: center; }
.itip-durbar > i {
  display: block;
  width: 7px;
  height: 11px;
  border-radius: 1.5px;
  background: rgba(255,255,255,.11);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.28);
}
.itip-durbar > i.on { box-shadow: inset 0 0 0 1px rgba(0,0,0,.28), 0 0 5px rgba(0,0,0,.25); }
/* 绿：还结实 */
.itip-durbar.ok > i.on { background: linear-gradient(180deg, #4fd18b, #2e9e6f); }
.itip-durv.ok b { color: #7ef2b0; }
/* 黄：有点旧了 */
.itip-durbar.warn > i.on { background: linear-gradient(180deg, #f0cf5a, #c99630); }
.itip-durv.warn b { color: #f2d47e; }
/* 橙：快坏了 */
.itip-durbar.low > i.on { background: linear-gradient(180deg, #ffa64d, #d9762a); }
.itip-durv.low b { color: #ffb066; }
/* 红：快断了（闪烁） */
.itip-durbar.critical > i.on { background: linear-gradient(180deg, #ff6b6b, #c22525); }
.itip-durv.critical b { color: #ff8d8d; }
.itip-durv.critical { animation: dur-blink 0.9s ease-in-out infinite; }
.itip-durbar.critical { animation: dur-blink 0.9s ease-in-out infinite; }
@keyframes dur-blink {
  0%, 100% { opacity: 1; filter: none; }
  50%      { opacity: .42; filter: drop-shadow(0 0 4px rgba(255,80,80,.85)); }
}
.itip-durv em { font-style: normal; font-size: 10.5px; color: #9aa7ba; font-weight: 500; }
.itip-durv.critical em, .itip-durv.low em { color: #ffb0a0; }
.itip-bullet.warn { color: #ffc08a; }
.itip-bullet.warn::before { content: '⚠'; color: #ffb066; }
@media (prefers-reduced-motion: reduce) {
  .itip-durv.critical, .itip-durbar.critical { animation: none; }
}

/* ---- 列表里的小耐久条（背包 / 寄售行 / 角色卡装备栏共用）---- */
.dur-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 5px;
  padding: 0 5px 0 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 15px;
  color: #c8d2de;
  vertical-align: middle;
  white-space: nowrap;
}
.dur-chip .dur-track {
  display: block;
  width: 34px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.dur-chip .dur-fill { display: block; height: 100%; border-radius: 3px; transition: width .25s ease; }
.dur-chip.ok       { border-color: rgba(53,192,138,.35); }
.dur-chip.ok .dur-fill { background: linear-gradient(90deg, #2e9e6f, #4fd18b); }
.dur-chip.warn     { border-color: rgba(240,177,59,.38); }
.dur-chip.warn .dur-fill { background: linear-gradient(90deg, #c99630, #f0cf5a); }
.dur-chip.low      { border-color: rgba(255,150,60,.45); }
.dur-chip.low .dur-fill { background: linear-gradient(90deg, #d9762a, #ffa64d); }
.dur-chip.critical { border-color: rgba(236,90,90,.6); color: #ffb0a8; }
.dur-chip.critical .dur-fill { background: linear-gradient(90deg, #c22525, #ff6b6b); }
.dur-chip.critical { animation: dur-blink 0.9s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .dur-chip.critical { animation: none; }
}

/* ⚠️ 低耐久标记：名字后面挂一个，扫一眼就能挑出来 */
.dur-warn {
  margin-left: 4px;
  font-size: 11px;
  color: #ffb066;
  text-shadow: 0 0 6px rgba(255,140,60,.5);
}
.dur-broken {
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(236,90,90,.18);
  border: 1px solid rgba(236,90,90,.45);
  color: #ff9b93;
  font-size: 10px;
  line-height: 15px;
}

/* ---- 角色卡「装备」栏：耐久条直接摊开（不用悬停）---- */
.dt-gear-list { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.dt-gear-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px 4px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 5px;
  background: rgba(255,255,255,.03);
}
.dt-gear-row .dt-gear-slot {
  min-width: 34px;
  font-size: 10.5px;
  color: #8fa4ba;
  font-family: var(--mono);
}
.dt-gear-row .dt-gear-name { flex: 1 1 auto; font-size: 11.5px; color: #e6ecf5; }
.dt-gear-row .dt-gear-name .q { font-size: 10px; color: #8fa4ba; margin-left: 3px; }
.dt-gear-row.critical { border-color: rgba(236,90,90,.45); background: rgba(236,90,90,.07); }

/* ---- 寄售行：挂单上的耐久条（买家有权知道几成新）---- */
.consign-row .consign-dur { margin: 3px 0 0; display: flex; align-items: center; gap: 4px; }
.consign-row .cd-tag {
  font-size: 10px;
  color: #8fa4ba;
  padding: 0 4px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 3px;
  line-height: 14px;
}
.consign-group-head .cg-dur { display: inline-flex; align-items: center; gap: 3px; margin-left: 2px; }
.consign-group-head .cg-durnote { font-size: 10px; color: #8fa4ba; }
.consign-name .dur-warn, .consign-name .dur-broken { margin-left: 3px; }


