/* ============================================================
   world-extra.css — 大世界：三栏布局 / 角色面板 / 遭遇战浮层
   风格与主游戏一致（纸质规则书拟物风）
   ============================================================ */

/* ── 三栏布局 ── */
.wh-page { overflow: hidden; }

.wh-main {
  position: relative; z-index: 1;
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 330px;
  gap: 0;
}

.wh-col {
  overflow-y: auto; overflow-x: hidden;
  padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.wh-left {
  border-right: 2px double var(--rule);
  background: var(--paper-deep);
}
.wh-right {
  border-left: 2px double var(--rule);
  background: var(--paper-deep);
}

.wh-map-wrap {
  position: relative; min-width: 0;
  background: var(--paper);
}

/* ── 左栏：角色卡（复用主游戏 .card 等类） ── */
.wh-left .card { padding: 12px; }
.wh-left .char-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wh-left .char-avatar {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1.5px solid var(--accent); border-radius: var(--r);
  color: var(--accent); font-size: 19px;
  background: rgba(168,50,50,.06);
}
.wh-left .char-name { font-size: 15px; font-weight: 700; }
.wh-left .char-race { font-size: 12px; color: var(--ink-faint); }

.wh-left .stat-row { margin-bottom: 10px; }
.wh-left .stat-label { font-size: 11px; letter-spacing: .2em; color: var(--ink-faint); margin-bottom: 3px; }
.wh-left .hp-bar {
  height: 8px; background: rgba(168,50,50,.14);
  border: 1px solid var(--rule); border-radius: 2px; overflow: hidden;
}
.wh-left .hp-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transition: width .25s;
}
.wh-left .stat-value { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* 资源格：与大世界 HUD 保持一致（5 格一行） */
.wh-left .res-grid { grid-template-columns: repeat(3, 1fr); margin: 10px 0 0; }

/* 装备面板（沿用主游戏样式，这里只缩一点） */
.wh-left .equip-title {
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600;
  padding-bottom: 5px; margin: 10px 0 6px;
  border-bottom: 1px solid var(--rule);
}
.wh-left .equip-panel { margin-top: 4px; }
.wh-left .equip-row { display: flex; flex-direction: column; gap: 4px; }

/* 背包 / 咒语列表：主游戏样式，窄栏下缩紧 */
.wh-left .inv-list { list-style: none; }
.wh-left .inv-list li {
  padding: 6px 0; font-size: 12.5px;
  border-bottom: 1px dotted rgba(201,185,155,.7);
  display: flex; justify-content: space-between; gap: 6px;
  align-items: center;
}
.wh-left .inv-list li:last-child { border-bottom: none; }
.wh-left .ability-box {
  margin-top: 10px; padding: 9px 10px;
  background: rgba(255,255,255,.44);
  border: 1px solid var(--rule); border-radius: var(--r);
  font-size: 12px; line-height: 1.6; color: var(--ink-soft);
}

/* ── 右侧：水域不可进入的格子样式 ── */
.hex-blocked { cursor: not-allowed; }
.hex-blocked:hover { opacity: .85 !important; }
.wh-blocked-tag {
  font-size: 10px; fill: var(--ink-faint);
  pointer-events: none; user-select: none;
}

/* 可前往按钮上的「需船」标记 */
.wm-need { font-size: 10.5px; color: var(--accent); font-weight: 700; }

/* ── 遭遇战浮层 ── */
.wc-modal { max-width: 520px; width: 94vw; text-align: left; }
.wc-modal .dice-label { text-align: center; margin-bottom: 10px; }
.wc-me {
  font-size: 13.5px; padding: 8px 10px; margin-bottom: 10px;
  background: rgba(255,255,255,.5); border: 1px solid var(--rule);
  border-radius: var(--r);
}
.wc-me b { color: var(--accent); font-size: 15px; }

.wc-monsters { display: flex; flex-direction: column; gap: 6px; }
.wc-mon {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #F7F1E4, var(--paper));
  border: 1px solid var(--rule); border-radius: var(--r);
}
.wc-mon.wc-dead { opacity: .42; }
.wc-mon-name { font-weight: 700; font-size: 13.5px; min-width: 76px; }
.wc-mon-hp { font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.wc-mon-dmg { font-size: 11.5px; color: var(--ink-faint); margin-left: auto; }
.wc-mon .btn { padding: 4px 14px; font-size: 12.5px; }

.wc-log-title {
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600;
  padding-bottom: 5px; margin: 12px 0 6px;
  border-bottom: 1px solid var(--rule);
}
.wc-log { list-style: none; max-height: 160px; overflow-y: auto; }
.wc-log-line {
  font-size: 12.5px; line-height: 1.55; padding: 4px 0 4px 8px;
  color: var(--ink-soft); border-left: 2px solid transparent;
}
.wc-log-line + .wc-log-line { border-top: 1px dotted rgba(201,185,155,.7); }

/* ── 窄屏：退回单栏 ── */
@media (max-width: 980px) {
  .wh-main { grid-template-columns: 1fr; grid-template-rows: 46vh auto auto; }
  .wh-left, .wh-right { border: none; border-top: 2px double var(--rule); }
  .wh-left { order: 2; }
  .wh-right { order: 3; }
  .wh-map-wrap { order: 1; }
}
