:root {
  --bg-outer: #0b0b0b;
  --canvas: #1a1a1a;
  --surface: #252525;
  --surface-2: #2e2e2e;
  --surface-3: #383838;
  --accent: #d4a574;
  --accent-strong: #e8be8e;
  --accent-soft: rgba(212, 165, 116, 0.14);
  --text: #ffffff;
  --text-2: #b0b0b0;
  --text-3: #888888;
  --line: #3a3a3a;
  --success: #4caf50;
  --danger: #c0504d;
  --warn: #e0a458;
  --info: #5b8fb9;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.5);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "STSong", "SimSun", Georgia, serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(212, 165, 116, 0.08), transparent 42%),
    radial-gradient(circle at 88% 100%, rgba(91, 143, 185, 0.07), transparent 46%),
    var(--bg-outer);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  padding: 28px 16px 64px;
}

a { color: var(--accent); }

button, input { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Mobile canvas ---------- */

.prototype-shell {
  position: relative;
  width: 375px;
  max-width: 100%;
  min-height: 812px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--canvas) 0%, #151515 100%);
  border: 1px solid #333;
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.prototype-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35);
}

.page {
  position: relative;
  padding: 22px 18px 38px;
  z-index: 1;
}

/* ---------- Header ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.topbar-title {
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--text);
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
}

.back-link:hover { border-color: var(--accent); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}

.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Typography ---------- */

.brand-title {
  font-family: var(--font-serif);
  font-size: 30px;
  letter-spacing: 6px;
  color: var(--text);
  margin: 0;
}

.brand-sub {
  display: block;
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--text-3);
  margin-top: 6px;
}

.divider {
  height: 1px;
  margin: 16px 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.55;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
}

.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.accent { color: var(--accent); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.serif { font-family: var(--font-serif); }
.nowrap { white-space: nowrap; }

/* ---------- Layout utilities ---------- */

.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.center { display: flex; align-items: center; justify-content: center; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }

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

.section { margin-top: 22px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.section-title {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--accent);
  margin: 0;
  font-weight: 600;
}
.section-note { font-size: 11px; color: var(--text-3); }

/* ---------- Cards ---------- */

.card {
  background: linear-gradient(155deg, var(--surface) 0%, #202020 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.card + .card { margin-top: 12px; }
.card-title { font-size: 14px; color: var(--text); margin: 0 0 4px; }
.card-sub { font-size: 12px; color: var(--text-3); margin: 0; }
.card-accent { border-color: rgba(212, 165, 116, 0.45); background: linear-gradient(155deg, rgba(212, 165, 116, 0.1), #202020 70%); }
.card-flat { background: #1f1f1f; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.btn:hover { border-color: var(--accent); color: var(--accent); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #b9895a 100%);
  border-color: transparent;
  color: #1a1a1a;
  font-weight: 600;
}
.btn-primary:hover { color: #1a1a1a; filter: brightness(1.06); }

.btn-ghost { background: transparent; }
.btn-danger { border-color: rgba(192, 80, 77, 0.6); color: #e39a97; background: rgba(192, 80, 77, 0.1); }
.btn-danger:hover { border-color: var(--danger); color: #f0b3b0; }

.btn-block { width: 100%; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }

/* ---------- Chips and badges ---------- */

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.5;
}
.badge-accent { border-color: rgba(212, 165, 116, 0.5); background: var(--accent-soft); color: var(--accent); }
.badge-success { border-color: rgba(76, 175, 80, 0.5); background: rgba(76, 175, 80, 0.12); color: #9cd69f; }
.badge-danger { border-color: rgba(192, 80, 77, 0.5); background: rgba(192, 80, 77, 0.12); color: #e3a3a0; }
.badge-warn { border-color: rgba(224, 164, 88, 0.5); background: rgba(224, 164, 88, 0.12); color: #e9c38f; }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10px;
}

/* ---------- Forms ---------- */

.field { margin-bottom: 14px; }
.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-2);
}

.input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #1f1f1f;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: #666; }
.input-sm { height: 34px; font-size: 12px; }

.hint { font-size: 11px; color: var(--text-3); }
.hint-box {
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid rgba(192, 80, 77, 0.4);
  background: rgba(192, 80, 77, 0.12);
  color: #e39a97;
  font-size: 12px;
}

.switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex: none;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #3a3a3a;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #8a8a8a;
  transition: left 0.2s, background 0.2s;
}
.switch.is-on { border-color: var(--accent); background: rgba(212, 165, 116, 0.35); }
.switch.is-on::after { left: 22px; background: var(--accent); }

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #333;
  cursor: pointer;
}
.setting-item:last-child { border-bottom: 0; }
.setting-label { font-size: 14px; color: var(--text); }
.setting-value { font-size: 13px; color: var(--text-2); }
.setting-arrow { color: var(--text-3); font-size: 18px; }

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}
.tab {
  flex: 1;
  padding: 12px 0;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  position: relative;
}
.tab.is-active { color: var(--accent); }
.tab.is-active::after {
  content: "";
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

/* ---------- State panels ---------- */

.state-panel { display: none; }
.state-panel.is-active { display: block; }

/* ---------- Lists ---------- */

.list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid #333;
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: #282828; }

.list-main { min-width: 0; }
.list-name { font-size: 14px; color: var(--text); }
.list-sub { font-size: 11px; color: var(--text-3); margin-top: 3px; }

/* ---------- Stats ---------- */

.stat-card {
  padding: 14px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
}
.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stat-label { display: block; margin-top: 4px; font-size: 11px; letter-spacing: 1px; color: var(--text-3); }
.stat-card.is-highlight { border-color: rgba(212, 165, 116, 0.45); background: linear-gradient(160deg, rgba(212, 165, 116, 0.12), #202020); }
.stat-card.is-highlight .stat-number { color: var(--accent); }

.detail-row { display: flex; gap: 8px; }
.detail-item { flex: 1; text-align: center; }
.detail-label { display: block; font-size: 11px; color: var(--text-3); }
.detail-value { display: block; margin-top: 4px; font-size: 14px; color: var(--text); }

/* ---------- Portraits and general cards ---------- */

.portrait {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  border: 1px solid #444;
  background: linear-gradient(160deg, #3a3a3a, #262626);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 18px;
}
.portrait-lg { width: 58px; height: 58px; font-size: 23px; }
.portrait-enemy { border-color: rgba(192, 80, 77, 0.45); color: #e3a3a0; }

.cards-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.cards-scroll::-webkit-scrollbar { display: none; }

.general-card {
  min-width: 128px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.general-card.enemy { border-color: rgba(192, 80, 77, 0.35); }
.general-head { display: flex; align-items: center; gap: 8px; }
.general-name { font-size: 13px; color: var(--text); }
.general-tag { font-size: 10px; color: var(--text-3); }
.general-stats { display: flex; justify-content: space-between; margin-top: 8px; font-size: 10px; color: var(--text-2); }

/* ---------- Map ---------- */

.map-board {
  position: relative;
  border: 1px solid #3a3a3a;
  border-radius: 14px;
  background:
    radial-gradient(circle at 28% 18%, rgba(212, 165, 116, 0.1), transparent 55%),
    radial-gradient(circle at 78% 82%, rgba(91, 143, 185, 0.1), transparent 55%),
    #1e1e1c;
  overflow: hidden;
}
.map-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px; }
.region {
  position: relative;
  min-height: 64px;
  padding: 7px;
  border-radius: 8px;
  border: 1px dashed #4a443a;
  background: rgba(212, 165, 116, 0.05);
  font-size: 11px;
  color: var(--text-2);
}
.region-name { display: block; color: var(--text); font-size: 12px; }
.region.is-owned { border-style: solid; border-color: rgba(212, 165, 116, 0.45); background: rgba(212, 165, 116, 0.12); }
.region.is-contested { border-style: solid; border-color: rgba(192, 80, 77, 0.55); background: rgba(192, 80, 77, 0.12); }
.region.is-neutral { border-color: rgba(136, 136, 136, 0.5); background: rgba(136, 136, 136, 0.08); }

.unit-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #3a3a3a;
  color: #ddd;
  font-size: 10px;
}
.unit-chip.friendly { background: rgba(76, 175, 80, 0.18); color: #9cd69f; }
.unit-chip.enemy { background: rgba(192, 80, 77, 0.18); color: #e3a3a0; }

.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 10px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* ---------- Logs and commands ---------- */

.log { font-size: 12px; color: var(--text-2); }
.log-line { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px dashed #333; }
.log-line:last-child { border-bottom: 0; }
.log-turn { flex: none; color: var(--accent); font-variant-numeric: tabular-nums; }

.command-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.command-btn {
  padding: 10px 4px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 11px;
  text-align: center;
  cursor: pointer;
}
.command-btn:hover { border-color: var(--accent); color: var(--accent); }
.command-btn.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ---------- Modal ---------- */

.modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.66);
}
.modal-overlay.is-open { display: flex; }
.modal-panel {
  width: 100%;
  max-height: 84%;
  overflow-y: auto;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid #3a3a3a;
  background: #232323;
  box-shadow: 0 -12px 44px rgba(0, 0, 0, 0.55);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal-title { font-size: 16px; letter-spacing: 1px; }
.modal-close {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: none;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--accent); border-color: var(--accent); }
.modal-footer { margin-top: 16px; }

/* ---------- Specific components ---------- */

.hero-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 30px;
  letter-spacing: 3px;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.14), transparent 70%);
}
.hero-badge.is-loss { border-color: var(--danger); color: #e3a3a0; background: radial-gradient(circle, rgba(192, 80, 77, 0.14), transparent 70%); }

.stars { font-size: 22px; letter-spacing: 4px; color: #4a4a4a; }
.star.is-filled { color: var(--accent); }

.rank-num { width: 26px; flex: none; text-align: center; font-size: 13px; color: var(--text-3); }
.rank-num.is-top1 { color: #e5c07b; }
.rank-num.is-top2 { color: #c9c9c9; }
.rank-num.is-top3 { color: #c08a5a; }

.trend-up { color: #9cd69f; }
.trend-down { color: #e3a3a0; }
.trend-flat { color: var(--text-3); }

.empty-state { padding: 34px 12px; text-align: center; color: var(--text-3); }
.empty-mark { font-size: 30px; color: #444; }
.empty-title { display: block; margin-top: 10px; font-size: 14px; color: var(--text-2); }
.empty-desc { display: block; margin-top: 4px; font-size: 11px; }

.code-card { text-align: center; }
.code-label { display: block; font-size: 11px; letter-spacing: 2px; color: var(--text-3); }
.code-value {
  display: block;
  margin: 10px 0;
  font-family: var(--font-serif);
  font-size: 30px;
  letter-spacing: 8px;
  color: var(--accent);
}

.versus { display: flex; align-items: stretch; gap: 8px; }
.force-card {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.force-banner {
  padding: 8px 10px;
  font-size: 13px;
  letter-spacing: 2px;
  color: #fff;
  background: #2c3e50;
}
.force-body { padding: 12px 10px; text-align: center; }
.force-leader { font-family: var(--font-serif); font-size: 19px; color: var(--text); }
.force-title { font-size: 10px; color: var(--text-3); margin-top: 3px; }
.force-troops { margin-top: 10px; font-size: 11px; color: var(--text-3); }
.force-troops strong { display: block; font-size: 16px; color: var(--accent); font-weight: 600; }
.vs-mark {
  align-self: center;
  flex: none;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--text-3);
}

.message { display: flex; gap: 10px; }
.message + .message { margin-top: 12px; }
.message-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 14px;
}
.message-body { flex: 1; min-width: 0; }
.message-name { font-size: 11px; color: var(--accent); }
.message-text { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.dialogue {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), transparent);
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-2);
}

.footer-note {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid #2e2e2e;
  font-size: 10px;
  color: #666;
  text-align: center;
}

/* ---------- Gallery (navigation page) ---------- */

.gallery { width: 100%; max-width: 1120px; padding: 8px 0 40px; }

.gallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid #2e2e2e;
}
.gallery-kicker { font-size: 11px; letter-spacing: 3px; color: var(--accent); }
.gallery-title { margin: 8px 0 6px; font-family: var(--font-serif); font-size: 34px; letter-spacing: 4px; }
.gallery-sub { margin: 0; max-width: 620px; font-size: 13px; color: var(--text-2); line-height: 1.75; }
.gallery-meta { display: flex; flex-wrap: wrap; gap: 8px; }

.gallery-stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 8px; }
.gallery-stat {
  padding: 12px 16px;
  border: 1px solid #2e2e2e;
  border-radius: var(--radius);
  background: #181818;
}
.gallery-stat b { display: block; font-size: 20px; color: var(--accent); }
.gallery-stat span { font-size: 10px; letter-spacing: 1px; color: var(--text-3); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.gallery-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid #2e2e2e;
  border-radius: 16px;
  background: linear-gradient(155deg, #1f1f1f, #161616);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s, transform 0.18s;
}
.gallery-card:hover { border-color: rgba(212, 165, 116, 0.6); transform: translateY(-2px); }
.gallery-card-head { display: flex; align-items: center; gap: 10px; }
.gallery-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.gallery-card-title { font-family: var(--font-serif); font-size: 18px; letter-spacing: 1px; }
.gallery-card-desc { margin: 0; font-size: 12px; line-height: 1.7; color: var(--text-2); }
.gallery-meta-grid { display: grid; grid-template-columns: 64px 1fr; gap: 4px 10px; font-size: 11px; }
.gallery-meta-key { color: var(--text-3); }
.gallery-meta-val { color: var(--text-2); word-break: break-all; }
.gallery-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid #2b2b2b; }
.gallery-open { color: var(--accent); font-size: 12px; }

.review {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid #2e2e2e;
  border-radius: 16px;
  background: #161616;
}
.review h2 { margin: 0 0 12px; font-family: var(--font-serif); font-size: 19px; letter-spacing: 2px; }
.review h3 { margin: 18px 0 8px; font-size: 12px; letter-spacing: 1px; color: var(--accent); }
.review ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 12px; line-height: 1.9; }
.review code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #262626;
  color: #d8d8d8;
  font-size: 11px;
}
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 24px; }

/* ---------- Responsive ---------- */

@media (max-width: 440px) {
  body { padding: 0; }
  .prototype-shell {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .gallery { padding: 4px 2px 30px; }
  .gallery-title { font-size: 27px; }
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ---------- Page-specific building blocks ---------- */

.head-center { text-align: center; padding-top: 6px; }
.login-hero { margin: 6px 0 22px; }
.login-tabs-card { padding: 0 16px 16px; }
.login-tabs-card .tabs { margin: 0 -16px 16px; }

.guest-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guest-title { font-size: 14px; color: var(--text); }
.guest-sub { margin-top: 2px; font-size: 11px; color: var(--text-3); }
.legal { margin-top: 18px; text-align: center; font-size: 10px; color: #666; }

.user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}
.user-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-name { font-size: 13px; color: var(--text); }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.feature-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 11px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 11px;
  text-decoration: none;
  cursor: pointer;
}
.feature-btn:hover { border-color: var(--accent); color: var(--accent); }
.feature-icon { font-family: var(--font-serif); font-size: 17px; line-height: 1; color: var(--accent); }

.scenario-option {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #202020;
  cursor: pointer;
}
.scenario-option + .scenario-option { margin-top: 8px; }
.scenario-option.is-selected {
  border-color: var(--accent);
  background: linear-gradient(150deg, rgba(212, 165, 116, 0.12), #202020);
}
.scenario-name { font-size: 13px; color: var(--text); }
.scenario-desc { margin-top: 2px; font-size: 11px; color: var(--text-3); }
.scenario-meta { flex: none; max-width: 100px; text-align: right; font-size: 10px; color: var(--text-3); }

.scenario-detail {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed #44403a;
  border-radius: 10px;
  background: rgba(212, 165, 116, 0.04);
}
.scenario-detail p { margin: 4px 0; font-size: 11px; line-height: 1.7; color: var(--text-2); }
.scenario-force {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #3a3a3a;
  font-size: 10px;
  color: var(--text-2);
}

.duration-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.duration-label { flex: none; font-size: 12px; color: var(--text-2); }

.my-room {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.room-code { font-family: var(--font-serif); font-size: 14px; letter-spacing: 2px; color: var(--accent); }

.battle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #202020;
}
.battle-card.is-locked { opacity: 0.55; }
.battle-name { font-family: var(--font-serif); font-size: 16px; color: var(--text); }
.battle-time { font-size: 11px; color: var(--text-3); }
.battle-factions { text-align: right; font-size: 10px; color: var(--text-2); }

.seat-summary { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11px; color: var(--text-3); }
.faction-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.faction-option {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #202020;
  text-align: center;
  cursor: pointer;
}
.faction-option.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.faction-option.is-taken { opacity: 0.45; }
.faction-option .faction-name { font-family: var(--font-serif); font-size: 16px; color: var(--text); }
.faction-option .faction-state { font-size: 10px; color: var(--text-3); }
.ready-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #333;
}

.countdown-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(212, 165, 116, 0.35);
  border-radius: 10px;
  background: rgba(212, 165, 116, 0.07);
  text-align: center;
}
.countdown-label { display: block; font-size: 10px; letter-spacing: 2px; color: var(--text-3); }
.countdown-value {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  letter-spacing: 2px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.notice-item { padding: 10px 0; border-bottom: 1px dashed #333; }
.notice-item:last-child { padding-bottom: 0; border-bottom: 0; }
.notice-head { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--text-3); }
.notice-msg { margin-top: 3px; font-size: 12px; line-height: 1.6; color: var(--text-2); }

.order-faction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed #333;
}
.order-faction:last-child { border-bottom: 0; }
.order-row { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 6px; align-items: center; margin-top: 8px; }
.order-counter { font-size: 10px; color: var(--text-2); }
.order-counter b { display: block; font-size: 11px; color: var(--accent); }

.map-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 148px;
  border: 1px solid #3a3a3a;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(212, 165, 116, 0.12), transparent 60%),
    #1e1e1c;
  cursor: pointer;
  overflow: hidden;
}
.map-preview-mark { font-family: var(--font-serif); font-size: 26px; color: var(--accent); }
.map-preview-text { margin-top: 6px; font-size: 12px; color: var(--text-2); }
.map-preview-sub { margin-top: 2px; font-size: 10px; color: var(--text-3); }

.intro-text { margin: 0; font-size: 12px; line-height: 1.9; color: var(--text-2); }
.intro-text.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.expand-btn { display: inline-block; margin-top: 8px; font-size: 11px; color: var(--accent); cursor: pointer; }

.difficulty-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #202020;
  cursor: pointer;
}
.difficulty-card.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.difficulty-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 15px;
}
.difficulty-name { font-size: 13px; color: var(--text); }
.difficulty-desc { font-size: 11px; color: var(--text-3); }
.difficulty-check { margin-left: auto; color: var(--accent); font-size: 15px; }

.version { margin-top: 26px; text-align: center; font-size: 10px; color: #666; }

.rank-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #333; }
.rank-item:last-child { border-bottom: 0; }
.rank-person { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.rank-value { text-align: right; font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; }

.result-info { text-align: center; }
.result-name { margin: 14px 0 4px; font-family: var(--font-serif); font-size: 22px; letter-spacing: 2px; }
.result-faction { font-size: 12px; color: var(--text-2); }

.event-item { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px dashed #333; font-size: 12px; }
.event-item:last-child { border-bottom: 0; }
.event-mark { flex: none; }
.event-item.is-success .event-mark { color: #9cd69f; }
.event-item.is-fail .event-mark { color: #e3a3a0; }

.rating-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rating-score { font-size: 18px; font-weight: 600; color: var(--accent); }

.overview-row { display: flex; gap: 8px; }
.overview-row .stat-card { flex: 1; }

.legend i.legend-owned { background: var(--accent); }
.legend i.legend-contested { background: var(--danger); }
.legend i.legend-neutral { background: var(--text-3); }

.difficulty-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.difficulty-check { visibility: hidden; }
.difficulty-card.is-active .difficulty-check { visibility: visible; }

/* ---------- Login page (aligned with frontend/src/pages/login/login.vue) ---------- */

.login-page {
  min-height: 812px;
  background: linear-gradient(180deg, #0f0f0f 0%, #1a1a2e 42%, #16213e 100%);
  overflow: hidden;
}
.login-bg {
  position: absolute;
  top: -18%;
  right: -10%;
  width: 70%;
  height: 50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.1) 0%, transparent 70%);
  pointer-events: none;
}
.login-bg::after {
  content: "";
  position: absolute;
  bottom: -18%;
  left: -12%;
  width: 80%;
  height: 40%;
  background: radial-gradient(circle, rgba(60, 60, 80, 0.32) 0%, transparent 70%);
}
.login-hero { position: relative; padding-top: 28px; }
.login-hero .brand-title {
  color: var(--accent);
  font-size: 30px;
  letter-spacing: 5px;
  text-shadow: 0 0 16px rgba(212, 165, 116, 0.22);
}
.login-card {
  position: relative;
  background: rgba(30, 30, 45, 0.72);
  border: 1px solid rgba(212, 165, 116, 0.18);
  border-radius: 16px;
  padding: 20px 18px;
  backdrop-filter: blur(6px);
}
.login-tabs { display: flex; justify-content: center; gap: 38px; margin-bottom: 20px; }
.login-tab {
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 14px;
  cursor: pointer;
}
.login-tab.is-active { color: var(--accent); }
.login-tab::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  margin: 7px auto 0;
  border-radius: 2px;
  background: transparent;
}
.login-tab.is-active::after {
  width: 30px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.input-group {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 12px;
  border: 1px solid rgba(212, 165, 116, 0.12);
  border-radius: 10px;
  background: rgba(20, 20, 30, 0.85);
}
.input-group:focus-within { border-color: rgba(212, 165, 116, 0.4); }
.input-icon {
  width: 24px;
  margin-right: 8px;
  text-align: center;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 14px;
}
.input-field {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}
.input-field::placeholder { color: #666; }
.eye-icon {
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 11px;
  cursor: pointer;
}
.eye-icon:hover { color: var(--accent); }
.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #d4a574, #b88655);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
}
.btn-login:hover { filter: brightness(1.05); color: #fff; }
.or-divider { display: flex; align-items: center; margin: 18px 0; }
.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.25), transparent);
}
.or-divider span { padding: 0 10px; color: #666; font-size: 11px; }
.guest-login {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(212, 165, 116, 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.06), rgba(184, 134, 85, 0.12));
  text-decoration: none;
  color: inherit;
}
.guest-login:hover { border-color: rgba(212, 165, 116, 0.45); }
.guest-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 14px;
}
.guest-login .guest-title { color: var(--accent); font-weight: 600; }
.login-footer { margin-top: 26px; text-align: center; color: #555; font-size: 10px; }
.login-page .footer-note { color: #555; border-top-color: rgba(255, 255, 255, 0.06); }

/* Links styled as cards */
a.my-room, a.battle-card, a.list-item { color: inherit; text-decoration: none; }
a.my-room:hover, a.battle-card:hover { border-color: var(--accent); }

.login-back { position: absolute; top: 16px; left: 16px; z-index: 2; }

.list-item[data-nav] { cursor: pointer; }

.login-card { max-width: 300px; margin-left: auto; margin-right: auto; }
.login-card .input-field { height: 42px; }

.login-card .hint-box {
  border-color: rgba(212, 165, 116, 0.22);
  background: rgba(212, 165, 116, 0.06);
  color: var(--text-3);
}

/* =========================================================
   Frontend alignment pass
   Values follow frontend/src/pages/*/*.vue (1rpx = 0.5px)
   ========================================================= */

.prototype-shell { background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 100%); }
.page { padding: 0 15px 30px; }
.topbar { padding-top: 18px; margin-bottom: 14px; }
.section-title {
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  margin: 0 0 10px;
  padding-left: 5px;
}
.section-note { color: #888; font-size: 10px; }
.card {
  background: #2a2a2a;
  border: 1px solid rgba(212, 165, 116, 0.15);
  border-radius: 7px;
  padding: 12px;
}
.card + .card { margin-top: 10px; }
.btn { border-radius: 6px; }
.btn-primary {
  background: linear-gradient(135deg, #d4a574, #8b4513);
  color: #fff;
  border: 0;
  font-weight: 500;
}
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-ghost {
  background: rgba(42, 42, 42, 0.8);
  border: 1px solid rgba(212, 165, 116, 0.2);
  color: #b0b0b0;
}
.chip {
  padding: 4px 7px;
  border-radius: 4px;
  border: 1px solid rgba(212, 165, 116, 0.16);
  background: rgba(26, 26, 26, 0.8);
  color: #999;
  font-size: 10px;
}
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1a1a;
}
.badge { border-radius: 4px; font-size: 10px; }
.badge-accent { background: rgba(212, 165, 116, 0.15); border-color: rgba(212, 165, 116, 0.3); color: #d4a574; }
.badge-success { background: rgba(34, 139, 34, 0.15); border-color: rgba(34, 139, 34, 0.3); color: #7bc67b; }
.badge-danger { background: rgba(220, 20, 60, 0.15); border-color: rgba(224, 122, 122, 0.3); color: #e07a7a; }
.badge-warn { background: rgba(212, 165, 116, 0.16); border-color: rgba(212, 165, 116, 0.3); color: #e0a86b; }
.hint-box {
  border-color: rgba(224, 122, 122, 0.32);
  background: rgba(224, 122, 122, 0.08);
  color: #e07a7a;
  font-size: 11px;
}
.stat-card {
  background: #2a2a2a;
  border: 1px solid rgba(212, 165, 116, 0.1);
  border-radius: 6px;
}
.stat-number { color: var(--accent); font-size: 24px; font-weight: bold; }
.stat-label { color: #888; font-size: 12px; }
.stat-card.is-highlight {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.2), rgba(139, 69, 19, 0.2));
  border-color: rgba(212, 165, 116, 0.3);
}
.modal-overlay { align-items: center; padding: 16px; background: rgba(0, 0, 0, 0.78); }
.modal-panel {
  background: #2a2a2a;
  border: 1px solid rgba(212, 165, 116, 0.2);
  border-radius: 8px;
  max-height: 85%;
  padding: 14px;
}
.modal-header { padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid rgba(212, 165, 116, 0.15); }
.modal-title { font-size: 16px; font-weight: 500; }
.modal-close { width: auto; height: auto; border: 0; background: none; color: #888; font-size: 22px; line-height: 1; }
.modal-close:hover { color: var(--accent); }
.footer-note { margin-top: 18px; padding-top: 10px; border-top: 1px solid rgba(212, 165, 116, 0.1); color: #666; font-size: 9px; }

/* ===== 首页 / index.vue ===== */
.home-page .title-section { text-align: center; padding: 4px 0 8px; }
.home-page .user-header {
  margin: 0 5px 10px;
  padding: 8px 12px;
  background: rgba(42, 42, 42, 0.6);
  border: 1px solid rgba(212, 165, 116, 0.15);
  border-radius: 6px;
}
.home-page .user-header .portrait { width: 28px; height: 28px; font-size: 14px; border-radius: 50%; background: rgba(212, 165, 116, 0.15); border: 0; }
.home-page .user-name { font-size: 13px; font-weight: 500; }
.home-page .main-title {
  display: block;
  margin: 0 0 5px;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 4px;
}
.home-page .sub-title { display: block; color: #b0b0b0; font-size: 14px; letter-spacing: 2px; }
.home-page .divider { width: 60px; margin: 15px auto 0; }
.home-page .stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
  padding: 5px 15px;
  background: rgba(42, 42, 42, 0.8);
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 10px;
}
.home-page .stat-item { color: #ccc; font-size: 12px; }
.home-page .stat-divider { color: #666; font-size: 12px; margin: 0 8px; }
.home-page .feature-section {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
  padding: 8px 0 10px;
  border-bottom: 1px solid rgba(212, 165, 116, 0.1);
}
.home-page .feature-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 10px;
  border: 0;
  background: none;
  color: #b0b0b0;
  font-size: 11px;
  text-decoration: none;
}
.home-page .feature-icon { color: var(--accent); font-family: var(--font-serif); font-size: 20px; line-height: 1.2; }
.home-page .room-section {
  margin-bottom: 12px;
  padding: 11px 12px;
  background: rgba(42, 42, 42, 0.55);
  border: 1px solid rgba(212, 165, 116, 0.16);
  border-radius: 7px;
}
.home-page .room-section-header { display: flex; align-items: baseline; justify-content: space-between; }
.home-page .room-section .section-title { color: #fff; font-size: 14px; font-weight: 500; letter-spacing: 0; padding-left: 0; margin-bottom: 10px; }
.home-page .room-hint { color: #777; font-size: 10px; }
.home-page .scenario-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.home-page .scenario-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  background: rgba(26, 26, 26, 0.75);
  border: 1px solid rgba(212, 165, 116, 0.16);
  border-radius: 5px;
}
.home-page .scenario-option.is-selected { border-color: var(--accent); background: rgba(212, 165, 116, 0.12); }
.home-page .scenario-name { color: #fff; font-size: 13px; font-weight: 500; }
.home-page .scenario-desc { color: #888; font-size: 10px; }
.home-page .scenario-meta { color: var(--accent); font-size: 10px; }
.home-page .scenario-detail {
  margin-top: 4px;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: #f7f4ee;
}
.home-page .scenario-detail .badge { background: #e8efe6; border: 0; color: #3d6b45; }
.home-page .scenario-detail p { margin: 4px 0; color: #5c5144; font-size: 12px; line-height: 1.5; }
.home-page .scenario-detail .tiny.dim { color: #7a6a55; }
.home-page .scenario-force { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #d9d0c3; color: #5c5144; font-size: 10px; }
.home-page .scenario-force .between { color: #5c5144; }
.home-page .duration-row { display: flex; align-items: center; gap: 7px; margin-top: 7px; margin-bottom: 8px; }
.home-page .duration-label { color: #b0b0b0; font-size: 11px; flex: none; }
.home-page .duration-options { display: flex; flex: 1; flex-wrap: wrap; gap: 4px; }
.home-page .duration-chip {
  padding: 3px 7px;
  color: #999;
  font-size: 10px;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(212, 165, 116, 0.16);
  border-radius: 4px;
  cursor: pointer;
}
.home-page .duration-chip.selected { color: #1a1a1a; background: var(--accent); border-color: var(--accent); }
.home-page .room-actions { display: flex; gap: 7px; margin-bottom: 4px; }
.home-page .room-btn {
  flex: 1;
  padding: 9px 0;
  color: #fff;
  font-size: 12px;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, #d4a574, #8b4513);
  border-radius: 5px;
}
.home-page .room-btn.ghost { color: var(--accent); background: rgba(212, 165, 116, 0.12); border: 1px solid rgba(212, 165, 116, 0.3); }
.home-page .my-rooms { margin-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.home-page .my-rooms-title { color: #888; font-size: 11px; }
.home-page .my-room-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(212, 165, 116, 0.12);
  border-radius: 5px;
  text-decoration: none;
}
.home-page .my-room-code { color: #fff; font-size: 15px; font-weight: bold; letter-spacing: 2px; }
.home-page .my-room-meta { color: #888; font-size: 10px; }
.home-page .my-room-enter { color: var(--accent); font-size: 12px; }
.home-page .battle-section { margin-top: 4px; }
.home-page .battle-section .section-title { color: #fff; font-size: 14px; font-weight: 500; letter-spacing: 0; padding-left: 3px; }
.home-page .battle-list { display: flex; flex-direction: column; gap: 8px; }
.home-page .battle-card {
  display: block;
  overflow: hidden;
  border-radius: 7px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  text-decoration: none;
}
.home-page .battle-card.is-locked { opacity: 0.5; }
.home-page .card-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background: linear-gradient(135deg, #252525, #1a1a1a);
  border: 1px solid rgba(212, 165, 116, 0.12);
}
.home-page .card-left { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.home-page .battle-name { color: #fff; font-size: 16px; font-weight: bold; }
.home-page .battle-time { color: #888; font-size: 11px; }
.home-page .status-badge { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 2px 8px; background: rgba(34, 139, 34, 0.15); border-radius: 3px; }
.home-page .locked-badge { background: rgba(136, 136, 136, 0.15); }
.home-page .badge-dot { width: 4px; height: 4px; border-radius: 50%; background: #228b22; }
.home-page .locked-dot { background: #888; }
.home-page .badge-text { color: #228b22; font-size: 10px; }
.home-page .locked-text { color: #888; }
.home-page .card-right { display: flex; align-items: center; gap: 4px; margin-left: 10px; flex: none; }
.home-page .faction-name { font-size: 13px; font-weight: bold; letter-spacing: 1px; }
.home-page .faction-a { color: #5b8fb9; }
.home-page .faction-b { color: #c0504d; }
.home-page .vs-text { color: var(--accent); font-size: 9px; font-weight: bold; }

/* ===== 战争房间 / room.vue ===== */
.room-page .room-title { margin: 0; color: var(--accent); font-family: var(--font-sans); font-size: 20px; font-weight: bold; letter-spacing: 2px; }
.room-page .room-status { padding: 3px 9px; color: #7bc67b; font-size: 12px; background: rgba(34, 139, 34, 0.15); border-radius: 4px; }
.room-page .room-status.is-started { color: var(--accent); background: rgba(212, 165, 116, 0.15); }
.room-page .scenario-label { display: block; margin: -9px 0 12px; color: var(--accent); font-size: 11px; }
.room-page .code-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px; background: rgba(42, 42, 42, 0.9); border: 1px solid rgba(212, 165, 116, 0.25); border-radius: 8px; text-align: center; }
.room-page .code-label { color: #888; font-size: 11px; letter-spacing: 0; }
.room-page .code-value { margin: 0; color: #fff; font-family: var(--font-sans); font-size: 28px; font-weight: bold; letter-spacing: 6px; }
.room-page .code-card .btn { border: 1px solid rgba(212, 165, 116, 0.4); color: var(--accent); background: transparent; border-radius: 4px; }
.room-page .seat-summary { display: flex; justify-content: space-between; margin: 14px 2px 8px; color: #b0b0b0; font-size: 12px; }
.room-page .faction-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.room-page .faction-option { padding: 8px 0; border: 1px solid rgba(212, 165, 116, 0.25); border-radius: 5px; background: rgba(26, 26, 26, 0.7); }
.room-page .faction-option.is-selected { border-color: var(--accent); background: rgba(212, 165, 116, 0.16); }
.room-page .faction-option .faction-name { color: #fff; font-size: 15px; font-weight: bold; }
.room-page .faction-option .faction-state { color: #999; font-size: 9px; }
.room-page .ready-row { margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(212, 165, 116, 0.12); }
.room-page .turn-card .turn-title { color: #fff; font-size: 16px; font-weight: bold; letter-spacing: 1px; }
.room-page .countdown-box { display: flex; align-items: baseline; justify-content: space-between; margin-top: 2px; padding: 7px 0 0; border: 0; border-top: 1px solid rgba(212, 165, 116, 0.12); border-radius: 0; background: none; text-align: left; }
.room-page .countdown-label { color: #b0b0b0; font-size: 11px; letter-spacing: 0; }
.room-page .countdown-value { color: var(--accent); font-size: 19px; font-weight: bold; letter-spacing: 1px; }
.room-page .notice-title { color: var(--accent); font-size: 13px; font-weight: bold; }
.room-page .notice-type { color: var(--accent); font-size: 10px; }
.room-page .notice-time { color: #777; font-size: 9px; }
.room-page .notice-msg { color: #c8c8c8; font-size: 10.5px; line-height: 1.45; }
.room-page .order-title { color: var(--accent); font-size: 14px; font-weight: bold; }
.room-page .order-row { grid-template-columns: 66px 1fr 95px; }
.room-page .order-counter b { color: #fff; font-size: 9.5px; }
.room-page .order-input { height: 30px; font-size: 10.5px; }
.room-page .order-submit, .room-page .start-btn {
  display: block;
  margin-top: 4px;
  padding: 9px 0;
  color: #fff;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, #d4a574, #8b4513);
  border-radius: 5px;
}
.room-page .lifecycle-input { height: 31px; font-size: 10.5px; background: rgba(26, 26, 26, 0.9); border: 1px solid rgba(212, 165, 116, 0.2); border-radius: 4px; }
.room-page .end-room-btn { padding: 7px 0; color: #e07a7a; font-size: 11.5px; text-align: center; border: 1px solid rgba(224, 122, 122, 0.32); border-radius: 4px; }

/* ===== 战役详情 / battle-detail.vue ===== */
.battle-page .map-preview { min-height: 130px; height: 130px; margin-bottom: 15px; border-radius: 8px; background: linear-gradient(135deg, #1e2d3d, #141e2b); border: 1px solid rgba(212, 165, 116, 0.2); }
.battle-page .map-preview-mark { font-size: 22px; }
.battle-page .map-preview-text { color: var(--accent); font-size: 14px; }
.battle-page .map-preview-sub { color: #666; font-size: 11px; }
.battle-page .versus { gap: 10px; margin-bottom: 15px; }
.battle-page .force-card { border-radius: 7px; border-width: 1px; background: #252525; }
.battle-page .force-banner { padding: 12px 0; margin-bottom: 8px; text-align: center; font-size: 18px; font-weight: bold; letter-spacing: 2px; }
.battle-page .force-body { padding: 0 8px 10px; text-align: center; }
.battle-page .force-leader { font-family: var(--font-sans); font-size: 14px; font-weight: 500; }
.battle-page .force-title { color: #888; font-size: 10px; }
.battle-page .force-troops { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; color: #666; font-size: 11px; }
.battle-page .force-troops strong { display: inline; color: var(--accent); font-size: 14px; font-weight: bold; }
.battle-page .force-body .btn { min-height: 28px; margin-top: 8px; padding: 3px 10px; color: var(--accent); font-size: 10px; background: rgba(212, 165, 116, 0.1); border: 1px solid rgba(212, 165, 116, 0.2); border-radius: 999px; }
.battle-page .vs-mark { color: var(--accent); font-size: 15px; font-weight: bold; }
.battle-page .section-title { font-size: 15px; }
.battle-page .intro-text { color: #ccc; font-size: 13px; line-height: 1.8; }
.battle-page .expand-btn { display: block; margin-top: 5px; color: var(--accent); font-size: 13px; text-align: center; }
.battle-page .card { padding: 12px; }
.battle-page .modal-panel { background: #1e2d3d; border-color: rgba(212, 165, 116, 0.3); }
.battle-page .modal-header { background: rgba(26, 26, 26, 0.95); }

/* ===== 战役结算 / result.vue ===== */
.result-page .hero-badge {
  display: block;
  width: auto;
  height: auto;
  margin: 0 auto;
  padding: 20px 40px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #d4a574, #8b4513);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 0;
}
.result-page .hero-badge.is-loss { background: linear-gradient(135deg, #5d6d7e, #2c3e50); border: 0; }
.result-page .result-header { padding: 28px 0 20px; text-align: center; }
.result-page .result-name { margin: 10px 0 4px; font-family: var(--font-sans); font-size: 18px; font-weight: bold; letter-spacing: 0; }
.result-page .result-faction { color: var(--accent); font-size: 14px; }
.result-page .grid-3 { display: flex; justify-content: space-around; gap: 0; margin-top: 20px; padding: 15px; background: #2a2a2a; border-radius: 8px; }
.result-page .stat-card { display: flex; flex-direction: column; align-items: center; padding: 0; background: none; border: 0; }
.result-page .stat-label { order: 1; margin: 0 0 5px; color: #888; font-size: 12px; }
.result-page .stat-number { order: 2; color: #fff; font-size: 20px; font-weight: bold; }
.result-page .card { padding: 10px; margin-top: 20px; }
.result-page .section-title { font-size: 16px; }
.result-page .event-item { padding: 8px 0; border-bottom: 1px solid #3a3a3a; color: #ccc; font-size: 13px; }
.result-page .event-item.is-success .event-mark { color: #228b22; }
.result-page .event-item.is-fail .event-mark { color: #dc143c; }
.result-page .rating-line { padding: 15px; background: #2a2a2a; border-radius: 6px; }
.result-page .stars { font-size: 20px; letter-spacing: 2px; color: #555; }
.result-page .star.is-filled { color: var(--accent); }
.result-page .rating-score { color: #fff; font-size: 16px; font-weight: bold; }
.result-page .btn-row { flex-direction: column; gap: 10px; margin-top: 20px; }
.result-page .btn-row .btn { min-height: 44px; border-radius: 6px; font-size: 16px; font-weight: bold; }
.result-page .btn-primary { background: linear-gradient(135deg, #d4a574, #8b4513); }
.result-page .btn-ghost { background: #2a2a2a; border: 1px solid var(--accent); color: #fff; }

/* ===== 历史战绩 / history.vue ===== */
.history-page .overview-row { gap: 8px; margin: 15px 0 10px; }
.history-page .overview-row .stat-card { flex: 1; min-width: 0; padding: 15px 10px; }
.history-page .detail-section { margin-bottom: 15px; }
.history-page .detail-row { justify-content: space-around; padding: 12px; background: #2a2a2a; border-radius: 6px; }
.history-page .detail-label { color: #666; font-size: 11px; }
.history-page .detail-value { color: #fff; font-size: 14px; font-weight: 500; }
.history-page .section-title { font-size: 16px; }
.history-page .list { display: flex; flex-direction: column; gap: 8px; background: none; border: 0; overflow: visible; }
.history-page .list-item { padding: 12px; background: #2a2a2a; border: 1px solid rgba(212, 165, 116, 0.1); border-radius: 6px; }
.history-page .list-item:last-child { border-bottom: 1px solid rgba(212, 165, 116, 0.1); }
.history-page .portrait { width: 40px; height: 40px; border-radius: 6px; font-size: 16px; }
.history-page .list-name { font-size: 14px; font-weight: 500; }
.history-page .list-sub { color: #888; font-size: 11px; }
.history-page .badge { border-radius: 3px; font-size: 12px; }
.history-page .empty-state { padding: 50px 0; }
.history-page .empty-mark { font-size: 40px; }
.history-page .empty-title { color: #fff; font-size: 16px; font-weight: 500; }
.history-page .empty-desc { color: #888; font-size: 13px; }

/* ===== 设置 / settings.vue ===== */
.settings-page .settings-section { margin-top: 20px; }
.settings-page .section-title { font-size: 16px; margin-bottom: 10px; }
.settings-page .setting-item {
  margin-bottom: 8px;
  padding: 12px;
  background: #2a2a2a;
  border: 0;
  border-radius: 6px;
}
.settings-page .setting-label { color: #fff; font-size: 14px; }
.settings-page .setting-value { color: var(--accent); font-size: 14px; }
.settings-page .setting-arrow { color: #666; font-size: 18px; }
.settings-page .version { margin-top: 40px; padding: 20px 0; text-align: center; }
.settings-page .version-text { color: #666; font-size: 12px; }
.settings-page .version-copyright { color: #555; font-size: 11px; }
.settings-page .modal-panel { width: 85%; max-width: 320px; background: #2a2a2a; border-radius: 10px; }
.settings-page .modal-header { padding: 16px 18px; margin: 0; background: rgba(212, 165, 116, 0.08); border-bottom: 1px solid rgba(212, 165, 116, 0.1); }
.settings-page .difficulty-card { margin: 0 0 8px; padding: 14px; background: #333; border-radius: 8px; border: 1px solid transparent; }
.settings-page .difficulty-card.is-active { border-color: #d4a574; background: rgba(212, 165, 116, 0.1); }
.settings-page .difficulty-mark { width: 40px; height: 40px; border-radius: 8px; background: rgba(212, 165, 116, 0.1); border: 0; font-size: 18px; }
.settings-page .difficulty-name { font-size: 15px; font-weight: 500; }
.settings-page .difficulty-desc { color: #888; font-size: 12px; }
.settings-page .difficulty-check { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 14px; text-align: center; line-height: 24px; }
.settings-page .modal-footer { padding: 12px 18px; margin: 0; border-top: 1px solid rgba(212, 165, 116, 0.1); }
.settings-page .modal-footer .btn { min-height: 42px; }

/* ===== 排行榜 / rankings.vue ===== */
.rankings-page .nav-bar { display: flex; align-items: center; justify-content: space-between; padding: 30px 15px 10px; margin: 0 -15px 10px; background: rgba(26, 26, 26, 0.95); border-bottom: 1px solid rgba(212, 165, 116, 0.2); }
.rankings-page .nav-title { color: #fff; font-size: 17px; font-weight: bold; }
.rankings-page .tabs-container { display: flex; gap: 10px; margin: 0 -15px; padding: 10px 15px; background: rgba(26, 26, 26, 0.8); border-bottom: 1px solid rgba(212, 165, 116, 0.1); }
.rankings-page .tab { flex: 1; padding: 8px 0; border: 0; border-radius: 5px; background: rgba(42, 42, 42, 0.8); color: #b0b0b0; font-size: 13px; }
.rankings-page .tab.is-active { background: linear-gradient(135deg, #d4a574, #8b4513); color: #fff; font-weight: bold; }
.rankings-page .tab.is-active::after { display: none; }
.rankings-page .section-head { margin-top: 15px; }
.rankings-page .section-title { font-size: 15px; }
.rankings-page .card.card-accent {
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.15), rgba(139, 69, 19, 0.1));
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 8px;
}
.rankings-page .list { display: flex; flex-direction: column; gap: 8px; background: none; border: 0; overflow: visible; }
.rankings-page .rank-item { padding: 12px; background: rgba(42, 42, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 7px; }
.rankings-page .rank-item:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.rankings-page .rank-person .portrait { width: 36px; height: 36px; border-radius: 50%; background: rgba(212, 165, 116, 0.15); border: 0; font-size: 15px; }
.rankings-page .rank-value { color: var(--accent); font-size: 14px; font-weight: bold; }
.rankings-page .rank-num { color: #888; font-size: 14px; font-weight: bold; }
.rankings-page .list-name { font-size: 14px; font-weight: bold; }
.rankings-page .list-sub { color: #888; font-size: 11px; }

.rankings-page .card.card-accent .rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 5px 7px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d4a574, #8b4513);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
}

/* ===== 推演中 / game.vue ===== */
.game-page {
  height: 812px;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  overflow: hidden;
}
.game-page .top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: 10px;
  background: rgba(26, 26, 26, 0.95);
  border-bottom: 1px solid rgba(212, 165, 116, 0.2);
}
.game-page .left-section { display: flex; align-items: center; gap: 8px; }
.game-page .game-back { width: 28px; height: 28px; font-size: 18px; }
.game-page .menu-btn { width: 30px; height: 30px; padding: 0; border: 0; background: none; color: var(--accent); font-size: 19px; cursor: pointer; }
.game-page .turn-info { padding: 3px 8px; background: rgba(212, 165, 116, 0.15); border-radius: 10px; }
.game-page .turn-text { color: var(--accent); font-size: 12px; }
.game-page .battle-name { color: #fff; font-size: 15px; font-weight: 500; }
.game-page .right-section { display: flex; gap: 6px; }
.game-page .icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: #2a2a2a;
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 5px;
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}
.game-page .enemy-cards-bar,
.game-page .player-cards-bar { flex: none; padding: 6px 0; background: rgba(26, 26, 26, 0.95); }
.game-page .enemy-cards-bar { border-bottom: 1px solid rgba(196, 30, 58, 0.2); }
.game-page .player-cards-bar { border-top: 1px solid rgba(46, 139, 87, 0.2); }
.game-page .cards-scroll { overflow-x: auto; scrollbar-width: none; }
.game-page .cards-scroll::-webkit-scrollbar { display: none; }
.game-page .cards-row { display: inline-flex; gap: 6px; padding: 0 8px; }
.game-page .general-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 130px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.game-page .enemy-card { background: linear-gradient(135deg, rgba(196, 30, 58, 0.08), rgba(26, 26, 26, 0.9)); border: 1px solid rgba(196, 30, 58, 0.2); }
.game-page .player-card { background: linear-gradient(135deg, rgba(46, 139, 87, 0.08), rgba(26, 26, 26, 0.9)); border: 1px solid rgba(46, 139, 87, 0.2); }
.game-page .card-portrait {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: linear-gradient(135deg, #d4a574, #8b6914);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
}
.game-page .card-portrait.deputy { border-color: #888; background: linear-gradient(135deg, #6b6b6b, #4a4a4a); }
.game-page .card-portrait.strategist { border-color: #5a8fc5; background: linear-gradient(135deg, #4a6fa5, #2c3e50); }
.game-page .card-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.game-page .card-name { color: #fff; font-size: 12px; font-weight: 500; }
.game-page .card-tag { color: #888; font-size: 9px; }
.game-page .card-stats-mini { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.game-page .stat-mini { color: var(--accent); font-size: 10px; }
.game-page .card-status { padding: 2px 6px; border-radius: 4px; font-size: 10px; }
.game-page .card-status.ready { background: rgba(128, 128, 128, 0.15); color: #888; }
.game-page .card-status.active { background: rgba(34, 139, 34, 0.2); color: #228b22; }
.game-page .dialogue-area { flex: 1; min-height: 0; padding: 10px; overflow-y: auto; }
.game-page .system-msg { margin-bottom: 15px; padding: 15px; background: rgba(212, 165, 116, 0.08); border: 1px solid rgba(212, 165, 116, 0.15); border-radius: 6px; }
.game-page .system-text { color: #ccc; font-size: 13px; line-height: 1.8; white-space: pre-line; }
.game-page .turn-block { margin-bottom: 20px; }
.game-page .message-row { display: flex; align-items: flex-start; margin-bottom: 8px; }
.game-page .player-message { justify-content: flex-start; }
.game-page .enemy-message { justify-content: flex-end; }
.game-page .msg-avatar { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 50%; }
.game-page .player-avatar { margin-left: 6px; background: linear-gradient(135deg, #4169e1, #1e40af); }
.game-page .enemy-avatar { margin-right: 6px; background: linear-gradient(135deg, #c41e3a, #7f1d1d); }
.game-page .avatar-text { color: #fff; font-size: 14px; font-weight: bold; }
.game-page .msg-bubble { max-width: 75%; padding: 8px 12px; border-radius: 8px; }
.game-page .player-bubble { background: linear-gradient(135deg, #1e40af, #1e3a8a); border-bottom-left-radius: 2px; }
.game-page .enemy-bubble { background: linear-gradient(135deg, #7f1d1d, #991b1b); border-bottom-right-radius: 2px; }
.game-page .msg-header { margin-bottom: 4px; }
.game-page .msg-sender { color: rgba(255, 255, 255, 0.6); font-size: 10px; }
.game-page .msg-content { color: #fff; font-size: 14px; line-height: 1.6; }
.game-page .judge-block {
  margin: 8px 0 6px 15px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.08), rgba(139, 69, 19, 0.05));
  border: 1px solid rgba(212, 165, 116, 0.25);
  border-radius: 6px;
}
.game-page .judge-header { display: flex; align-items: center; margin-bottom: 6px; }
.game-page .judge-icon { margin-right: 5px; color: var(--accent); font-family: var(--font-serif); font-size: 14px; }
.game-page .judge-title { color: var(--accent); font-size: 13px; font-weight: 500; }
.game-page .judge-summary { color: #fff; font-size: 13px; line-height: 1.8; }
.game-page .judge-footer { display: flex; justify-content: center; margin-top: 6px; }
.game-page .judge-toggle { color: var(--accent); font-size: 12px; }
.game-page .advantage-bar { margin: 0 15px; padding: 4px 10px; border-radius: 4px; }
.game-page .advantage-bar.player { background: rgba(34, 139, 34, 0.15); border: 1px solid rgba(34, 139, 34, 0.3); }
.game-page .advantage-bar.enemy { background: rgba(220, 20, 60, 0.15); border: 1px solid rgba(220, 20, 60, 0.3); }
.game-page .adv-text { font-size: 12px; }
.game-page .advantage-bar.player .adv-text { color: #228b22; }
.game-page .advantage-bar.enemy .adv-text { color: #dc143c; }
.game-page .dialogue-bottom-padding { height: 20px; }
.game-page .advisor-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 6px 10px;
  background: rgba(26, 26, 26, 0.95);
  border-top: 1px solid rgba(212, 165, 116, 0.1);
}
.game-page .advisor-action-item { display: flex; align-items: center; justify-content: center; gap: 4px; flex: 1; padding: 7px 0; cursor: pointer; }
.game-page .advisor-action-icon { color: var(--accent); font-family: var(--font-serif); font-size: 14px; }
.game-page .advisor-action-label { color: var(--accent); font-size: 13px; font-weight: 500; }
.game-page .advisor-divider { width: 1px; height: 20px; background: rgba(212, 165, 116, 0.2); }
.game-page .input-area { flex: none; padding: 8px 10px; background: rgba(26, 26, 26, 0.98); border-top: 1px solid rgba(212, 165, 116, 0.2); }
.game-page .input-wrapper { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #2a2a2a; border: 1px solid rgba(212, 165, 116, 0.2); border-radius: 8px; }
.game-page .strategy-input { flex: 1; min-width: 0; height: 30px; padding: 0; border: 0; outline: none; background: transparent; color: #fff; font-size: 14px; }
.game-page .strategy-input::placeholder { color: #666; }
.game-page .send-btn { width: 30px; height: 30px; flex: none; border: 0; border-radius: 50%; background: linear-gradient(135deg, #d4a574, #8b4513); color: #fff; font-size: 16px; cursor: pointer; }
.game-page .modal-panel { background: #2a2a2a; }
.game-page .map-panel { background: #1e2d3d; }
.game-page .section-title { font-size: 14px; border-left: 2px solid var(--accent); padding-left: 5px; margin-bottom: 10px; }
.game-page .compare-table { overflow: hidden; background: rgba(0, 0, 0, 0.3); border-radius: 6px; }
.game-page .compare-header { display: flex; padding: 8px; background: rgba(212, 165, 116, 0.1); }
.game-page .compare-row { display: flex; padding: 7px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.game-page .compare-cell { flex: 1; color: #ccc; font-size: 12px; text-align: center; }
.game-page .compare-cell.highlight { color: var(--accent); font-weight: bold; }
.game-page .compare-cell.divider { color: #888; }

@media (max-width: 440px) {
  .game-page { height: 100vh; }
}

/* ===== Shared frontend header + modal alignment ===== */
.topbar { padding-top: 30px; }
.home-page .topbar,
.room-page .topbar { padding-top: 15px; }
.page-title { font-size: 18px; font-weight: 500; letter-spacing: 0; }
.map-panel { background: #1e2d3d; }
.map-panel .modal-header { background: rgba(26, 26, 26, 0.95); }
.modal-panel .section-title { margin-bottom: 10px; padding-left: 5px; border-left: 2px solid var(--accent); font-size: 14px; }
.compare-table { overflow: hidden; background: rgba(0, 0, 0, 0.3); border-radius: 6px; }
.compare-header { display: flex; padding: 8px; background: rgba(212, 165, 116, 0.1); }
.compare-row { display: flex; padding: 7px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.compare-cell { flex: 1; color: #ccc; font-size: 12px; text-align: center; }
.compare-cell.highlight { color: var(--accent); font-weight: bold; }
.compare-cell.divider { color: #888; }

#difficulty-modal .modal-panel { width: 85%; max-width: 320px; border-radius: 10px; }
#difficulty-modal .modal-header { padding: 16px 18px; margin: 0; background: rgba(212, 165, 116, 0.08); border-bottom: 1px solid rgba(212, 165, 116, 0.1); }
#difficulty-modal .modal-footer { margin: 0; padding: 12px 18px; border-top: 1px solid rgba(212, 165, 116, 0.1); }
#difficulty-modal .modal-footer .btn { min-height: 42px; }
#difficulty-modal .difficulty-card { margin: 0 0 8px; padding: 14px; background: #333; border: 1px solid transparent; border-radius: 8px; }
#difficulty-modal .difficulty-card:last-child { margin-bottom: 0; }
#difficulty-modal .difficulty-card.is-active { border-color: #d4a574; background: rgba(212, 165, 116, 0.1); }
#difficulty-modal .difficulty-mark { width: 40px; height: 40px; border: 0; border-radius: 8px; background: rgba(212, 165, 116, 0.1); font-size: 18px; }
#difficulty-modal .difficulty-name { font-size: 15px; font-weight: 500; }
#difficulty-modal .difficulty-desc { color: #888; font-size: 12px; }
#difficulty-modal .difficulty-check { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-left: auto; border-radius: 50%; background: var(--accent); color: #fff; font-size: 14px; }
#difficulty-modal .difficulty-card:not(.is-active) .difficulty-check { visibility: hidden; }

.battle-page .force-body .btn { display: inline-flex; width: auto; }
.battle-page .force-card-a .force-banner { background: #2c3e50; }
.battle-page .force-card-b .force-banner { background: #7f8c8d; }

/* ===== Header patterns aligned with frontend pages ===== */
.page-header { display: flex; align-items: center; justify-content: space-between; padding: 30px 0 15px; }
.page-header .page-title { color: #fff; font-size: 18px; font-weight: 500; }
.page-placeholder { width: 30px; }
.home-page { position: relative; }
.home-back { position: absolute; top: 10px; left: 12px; z-index: 2; width: 28px; height: 28px; font-size: 18px; }
.home-page .title-section { padding-top: 22px; }
.room-header { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; }
.room-header .back-link { width: 28px; height: 28px; font-size: 18px; }
.room-header .room-title { flex: 1; text-align: center; }
.room-header .room-status { flex: none; }
.rankings-page .nav-bar .back-link { width: 28px; height: 28px; font-size: 18px; }
.rankings-page .nav-bar .page-placeholder { width: 28px; }
.result-page .page-header { padding-top: 15px; }
.login-card { padding: 15px; border-radius: 10px; }
.login-hero { padding-top: 20px; }
.login-hero .brand-title { font-size: 28px; }
.login-tabs { gap: 20px; }

.home-page .title-section { padding-top: 44px; }

.result-page .event-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: #3a3a3a;
  font-size: 13px;
}
.result-page .event-item.is-success > span:last-child { color: #228b22; }
.result-page .event-item.is-fail > span:last-child { color: #dc143c; }

.history-page .detail-value.highlight { color: var(--accent); }

.history-page .history-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.history-page .history-faction { color: var(--accent); font-size: 11px; }
.history-page .list-sub + .list-sub { margin-top: 2px; }
.room-page .order-panel .btn-primary { min-height: 31px; padding: 9px 0; font-size: 13px; border-radius: 5px; }
.room-page .host-card .btn-primary { min-height: 34px; font-size: 14px; }

#difficulty-modal .modal-panel { padding: 0; }
#difficulty-modal [data-command-group] { padding: 12px 18px; }
.map-panel { padding: 0; }
.map-panel .map-board { margin: 12px; }
.map-panel .legend { margin: 0 12px 12px; }

/* ===== 战棋地图 (war-chess map) ===== */
.wc-map { display: block; width: 100%; height: auto; }
.wc-label {
  fill: #e8dcc0;
  font-size: 10px;
  font-weight: 600;
  paint-order: stroke;
  stroke: #15130f;
  stroke-width: 3px;
  stroke-linejoin: round;
}
.wc-label-sub {
  fill: #a89a7c;
  font-size: 8px;
  paint-order: stroke;
  stroke: #15130f;
  stroke-width: 2.5px;
  stroke-linejoin: round;
}
.wc-label-terrain {
  fill: #8f7f62;
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: 3px;
  paint-order: stroke;
  stroke: #15130f;
  stroke-width: 2.5px;
  stroke-linejoin: round;
}
.wc-river { fill: none; stroke: #3f6d8f; stroke-width: 8; stroke-linecap: round; opacity: 0.45; }
.wc-river-flow { fill: none; stroke: #8fc0e0; stroke-width: 1; stroke-linecap: round; stroke-dasharray: 7 5; opacity: 0.55; }
.wc-mtn { fill: #2b2620; stroke: #6b5f4c; stroke-width: 1.2; stroke-linejoin: round; }
.wc-wall { fill: none; stroke: #a08c66; stroke-width: 2.5; stroke-dasharray: 5 3; stroke-linecap: round; }
.wc-supply-qin { fill: none; stroke: #d4a574; stroke-width: 1.4; stroke-dasharray: 4 4; opacity: 0.75; }
.wc-supply-zhao { fill: none; stroke: #c0504d; stroke-width: 1.4; stroke-dasharray: 4 4; opacity: 0.75; }
.wc-supply-label {
  font-size: 8px;
  paint-order: stroke;
  stroke: #15130f;
  stroke-width: 2px;
  stroke-linejoin: round;
}
.wc-supply-label-qin { fill: #d4a574; }
.wc-supply-label-zhao { fill: #e07a7a; }
.wc-arrow { fill: none; stroke-width: 2; stroke-linecap: round; }
.wc-arrow-qin { stroke: #e8be8e; }
.wc-arrow-zhao { stroke: #e07a7a; }
.wc-arrow-flank { stroke-dasharray: 5 4; }

.wc-fill-mtn { fill: url(#wcMtnPat); stroke: #6b5f4c; stroke-width: 1.4; stroke-linejoin: round; }
.wc-fill-forest { fill: url(#wcForestPat); stroke: #5b7f50; stroke-width: 1.2; stroke-linejoin: round; opacity: 0.92; }
.wc-city { fill: #1c1a17; stroke: #d4a574; stroke-width: 1.6; }
.wc-city-inner { fill: #d4a574; }
.wc-fort-qin { fill: #d4a574; stroke: #8b6914; stroke-width: 1; }
.wc-fort-zhao { fill: #8c2f2f; stroke: #e07a7a; stroke-width: 1; }
.wc-contested-ring { fill: rgba(192, 80, 77, 0.14); stroke: #c0504d; stroke-width: 1.6; }
.wc-contested-core { fill: #e0a458; }
.wc-pass { fill: #1c1a17; stroke: #e0a458; stroke-width: 1.5; stroke-linejoin: round; }
.wc-flag-qin { fill: #d4a574; stroke: #8b6914; stroke-width: 1; }
.wc-flag-zhao { fill: #8c2f2f; stroke: #e07a7a; stroke-width: 1; }

.wc-counter .wc-box { stroke-width: 1.2; }
.wc-counter .wc-name { font-size: 10px; font-weight: 700; }
.wc-counter .wc-num { font-size: 8px; font-variant-numeric: tabular-nums; }
.wc-counter-qin .wc-box { fill: #d4a574; stroke: #f0d8b0; }
.wc-counter-qin .wc-name { fill: #241a0e; }
.wc-counter-qin .wc-num { fill: #5a4526; }
.wc-counter-zhao .wc-box { fill: #7f2a2a; stroke: #e07a7a; }
.wc-counter-zhao .wc-name { fill: #ffe9e9; }
.wc-counter-zhao .wc-num { fill: #e8b8b8; }
.wc-counter-unknown .wc-box { fill: #36332e; stroke: #8a8a8a; stroke-dasharray: 3 3; }
.wc-counter-unknown .wc-name { fill: #d0d0d0; }
.wc-counter-unknown .wc-num { fill: #9a9a9a; }

.wc-compass circle { fill: rgba(0, 0, 0, 0.25); stroke: #6b5f4c; stroke-width: 1; }
.wc-compass path { fill: #a89a7c; }
.wc-compass text { fill: #a89a7c; font-size: 8px; }

.map-caption {
  padding: 9px 12px 11px;
  border-top: 1px dashed rgba(212, 165, 116, 0.18);
  font-size: 10px;
  line-height: 1.6;
  color: #a89a7c;
}

.legend i.legend-friendly { background: var(--accent); }
.legend i.legend-enemy { background: var(--danger); }
.legend i.legend-unknown { background: #36332e; border: 1px dashed #8a8a8a; }
.legend i.legend-line { width: 16px; height: 0; border-radius: 0; border-top: 2px dashed var(--accent); background: none; }
.legend i.legend-line-red { border-top-color: var(--danger); }
.legend i.legend-mtn { background: #6b5f4c; }
.legend i.legend-forest { background: #5b7f50; }
.legend i.legend-river { background: #3f6d8f; }

/* 战棋地图 · 可滑动大地图 */
.wc-scroll-wrap { position: relative; }
.wc-scroll {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 430px;
  overscroll-behavior: contain;
}
.wc-scroll .wc-map { width: 720px; max-width: none; }
.wc-scroll-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #d8c9a8;
  font-size: 9px;
  pointer-events: none;
}
.wc-routes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  padding: 10px 12px 12px;
  border-top: 1px dashed rgba(212, 165, 116, 0.18);
  font-size: 10px;
  line-height: 1.6;
  color: #a89a7c;
}
.wc-route-item b { margin-right: 4px; font-weight: 700; }
.wc-route-item b.q { color: #e8be8e; }
.wc-route-item b.r { color: #e07a7a; }
.wc-badge circle { stroke-width: 1; }
.wc-badge text { font-size: 10px; font-weight: 700; }
.wc-badge-qin circle { fill: #d4a574; stroke: #f0d8b0; }
.wc-badge-qin text { fill: #241a0e; }
.wc-badge-zhao circle { fill: #8c2f2f; stroke: #e07a7a; }
.wc-badge-zhao text { fill: #ffe9e9; }
.wc-encircle { fill: none; stroke: #c0504d; stroke-width: 1.2; stroke-dasharray: 6 4; opacity: 0.5; }
.wc-label-danger {
  fill: #e07a7a;
  font-size: 8px;
  paint-order: stroke;
  stroke: #15130f;
  stroke-width: 2.5px;
  stroke-linejoin: round;
}

.home-page .title-section { padding-top: 15px; }
.home-page .user-header .home-back-inline { width: 28px; height: 28px; flex: none; margin-right: 4px; font-size: 18px; }

.home-page .user-header .user-id { margin-right: auto; }

.rankings-page .user-rank-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.15), rgba(139, 69, 19, 0.1));
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 8px;
}
.rankings-page .user-rank-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  padding: 8px 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d4a574, #8b4513);
}
.rankings-page .user-rank-badge .rank-num { min-width: 0; padding: 0; background: none; color: #fff; font-size: 20px; font-weight: bold; }
.rankings-page .rank-label { color: rgba(255, 255, 255, 0.8); font-size: 10px; }
.rankings-page .user-info { display: flex; align-items: center; flex: 1; gap: 10px; min-width: 0; }
.rankings-page .user-avatar { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: rgba(212, 165, 116, 0.2); color: var(--accent); font-family: var(--font-serif); font-size: 18px; }
.rankings-page .user-name { color: #fff; font-size: 15px; font-weight: bold; }
.rankings-page .user-stats { color: var(--accent); font-size: 12px; }
.rankings-page .user-trend { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 10px; font-size: 11px; }
.rankings-page .user-trend.up { background: rgba(34, 139, 34, 0.2); color: #228b22; }
.rankings-page .user-trend.steady { background: rgba(136, 136, 136, 0.2); color: #888; }
.rankings-page .rank-list { display: flex; flex-direction: column; gap: 8px; }
.rankings-page .rank-item { display: flex; align-items: center; gap: 8px; padding: 12px; background: rgba(42, 42, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 7px; }
.rankings-page .rank-item.top-three { background: linear-gradient(135deg, rgba(212, 165, 116, 0.08), rgba(139, 69, 19, 0.05)); }
.rankings-page .rank-item.gold { border-color: rgba(255, 215, 0, 0.3); }
.rankings-page .rank-item.silver { border-color: rgba(192, 192, 192, 0.3); }
.rankings-page .rank-item.bronze { border-color: rgba(205, 127, 50, 0.3); }
.rankings-page .rank-badge { width: 30px; flex: none; display: flex; align-items: center; justify-content: center; }
.rankings-page .rank-number { color: #888; font-size: 16px; font-weight: bold; }
.rankings-page .rank-number.is-top1 { color: #e5c07b; }
.rankings-page .rank-number.is-top2 { color: #c9c9c9; }
.rankings-page .rank-number.is-top3 { color: #c08a5a; }
.rankings-page .player-info { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.rankings-page .player-avatar { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: rgba(212, 165, 116, 0.15); color: var(--accent); font-family: var(--font-serif); font-size: 16px; }
.rankings-page .player-name { color: #fff; font-size: 14px; font-weight: bold; }
.rankings-page .player-faction { color: #888; font-size: 11px; }
.rankings-page .player-stats { display: flex; flex-direction: column; align-items: center; margin: 0 6px; }
.rankings-page .stat-value { color: var(--accent); font-size: 16px; font-weight: bold; }
.rankings-page .stat-label { color: #888; font-size: 10px; }
.rankings-page .win-rate { display: flex; flex-direction: column; align-items: center; padding: 4px 8px; border-radius: 4px; background: rgba(34, 139, 34, 0.1); }
.rankings-page .rate-value { color: #228b22; font-size: 14px; font-weight: bold; }
.rankings-page .rate-label { color: #888; font-size: 10px; }

.join-modal .modal-panel { background: #242424; border: 1px solid rgba(212, 165, 116, 0.25); border-radius: 8px; padding: 18px 16px; }
.join-modal .modal-title { font-size: 16px; font-weight: bold; }
.join-modal .input { text-align: center; letter-spacing: 4px; }
.join-modal .btn { min-height: 36px; font-size: 13px; }
.about-modal .modal-panel { background: #242424; border: 1px solid rgba(212, 165, 116, 0.25); border-radius: 8px; padding: 18px 16px; }

.battle-page .click-hint {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  margin-top: 8px;
  background: rgba(212, 165, 116, 0.1);
  border: 1px solid rgba(212, 165, 116, 0.2);
  border-radius: 10px;
}
.battle-page .hint-text { color: var(--accent); font-size: 10px; }

.room-page .task-card { margin-top: 8px; padding: 10px; background: #fff; border-radius: 5px; }
.room-page .task-title { color: #3f3528; font-size: 13px; font-weight: 600; }
.room-page .task-visibility { padding: 2px 8px; border-radius: 4px; background: #eef2e9; color: #4f6b48; font-size: 10px; }
.room-page .task-visibility.secret { background: #f3e8f4; color: #7b3f85; }
.room-page .task-desc { margin-top: 5px; color: #6a5b49; font-size: 11px; line-height: 1.5; }
.room-page .task-meta { margin-top: 5px; color: #8a7964; font-size: 10px; }
.room-page .force-card { padding: 10px; background: rgba(42, 42, 42, 0.75); border: 1px solid rgba(212, 165, 116, 0.16); border-radius: 6px; }
.room-page .force-faction { color: #fff; font-size: 14px; font-weight: bold; }
.room-page .force-capital { color: var(--accent); font-size: 10.5px; }
.room-page .force-stat { margin-top: 4px; color: #b0b0b0; font-size: 10.5px; }
.room-page .counter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 8px; }
.room-page .counter-item { display: flex; flex-direction: column; gap: 1px; padding: 5px 6px; background: rgba(26, 26, 26, 0.75); border-radius: 4px; }
.room-page .counter-code { color: #fff; font-size: 10.5px; }
.room-page .counter-role { color: #b0b0b0; font-size: 9px; }
.room-page .counter-type { color: var(--accent); font-size: 9px; }
.room-page .counter-step { color: #888; font-size: 9px; }
.room-page .seat-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.room-page .seat-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: rgba(42, 42, 42, 0.75); border: 1px solid rgba(212, 165, 116, 0.16); border-radius: 6px; }
.room-page .seat-row.empty { border-style: dashed; opacity: 0.7; }
.room-page .seat-no { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: rgba(212, 165, 116, 0.15); color: var(--accent); font-size: 13px; }
.room-page .seat-info { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.room-page .member-main { display: flex; flex-direction: column; gap: 3px; }
.room-page .member-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.room-page .member-name { color: #fff; font-size: 14px; }
.room-page .member-tags { display: flex; gap: 4px; }
.room-page .member-tag { padding: 1px 5px; border-radius: 3px; font-size: 9px; }
.room-page .host-tag { color: var(--accent); background: rgba(212, 165, 116, 0.16); }
.room-page .ready-tag { color: #7bc67b; background: rgba(34, 139, 34, 0.15); }
.room-page .wait-tag { color: #999; background: rgba(120, 120, 120, 0.14); }
.room-page .faction-label { color: var(--accent); font-size: 11px; }
.room-page .seat-empty { color: #777; font-size: 12px; }
.room-page .room-actions { display: flex; gap: 10px; margin-top: 18px; }
.room-page .action-btn { flex: 1; padding: 11px 0; color: #fff; font-size: 14px; text-align: center; text-decoration: none; background: linear-gradient(135deg, #d4a574, #8b4513); border: 0; border-radius: 6px; cursor: pointer; }
.room-page .action-btn.ghost { color: #b0b0b0; background: rgba(42, 42, 42, 0.8); border: 1px solid rgba(212, 165, 116, 0.2); }

.login-page .toast {
  position: absolute;
  top: 54px;
  left: 50%;
  z-index: 5;
  display: none;
  max-width: 80%;
  padding: 8px 14px;
  transform: translateX(-50%);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 12px;
  text-align: center;
}
.login-page .toast.is-visible { display: block; }

.history-page .detail-section { margin-bottom: 15px; }

.result-page { position: relative; }
.result-back { position: absolute; top: 12px; left: 12px; z-index: 2; }
.battle-page details > summary { list-style: none; }
.battle-page details > summary::-webkit-details-marker { display: none; }

.home-page .scenario-detail { margin-top: 8px; padding: 12px; border-radius: 12px; }
.home-page .scenario-detail .badge { padding: 2px 8px; border-radius: 8px; font-size: 11px; }
.home-page .scenario-detail .tiny.dim { font-size: 12px; }
.home-page .battle-section { margin-top: 10px; }
.room-page .task-panel { margin-top: 12px; padding: 12px; border-radius: 12px; background: #fffaf0; }
.room-page .force-panel { display: flex; flex-direction: column; gap: 8px; }
.room-page .force-title { color: var(--accent); font-size: 14px; font-weight: bold; }
.room-page .setup-hint { color: #888; font-size: 10.5px; }
.room-page .turn-role { color: var(--accent); font-size: 10.5px; }
.room-page .btn-sm { border-radius: 4px; }
.result-page .result-header { padding: 40px 0 20px; }
.result-page .tiny { font-size: 12px; }
.history-page .section { margin-top: 15px; }
.history-page .empty-mark { font-size: 50px; }

.game-forces-modal .commander-compare { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.game-forces-modal .cmdr-card { flex: 1; padding: 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid #2c3e50; border-radius: 6px; }
.game-forces-modal .cmdr-card.enemy { border-color: #7f8c8d; }
.game-forces-modal .cmdr-name { display: block; margin-bottom: 2px; color: #fff; font-size: 14px; font-weight: bold; text-align: center; }
.game-forces-modal .cmdr-title { display: block; margin-bottom: 8px; color: var(--accent); font-size: 11px; text-align: center; }
.game-forces-modal .cmdr-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.game-forces-modal .stat-item { display: flex; flex-direction: column; align-items: center; }
.game-forces-modal .stat-label { color: #888; font-size: 10px; }
.game-forces-modal .stat-value { color: #fff; font-size: 12px; font-weight: bold; }
.game-forces-modal .vs-text { padding: 0 6px; color: var(--accent); font-size: 18px; font-weight: bold; }
.game-menu { width: 80%; padding: 0; background: #2a2a2a; border: 1px solid rgba(212, 165, 116, 0.2); border-radius: 8px; overflow: hidden; }
.game-menu .menu-item { display: block; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid rgba(212, 165, 116, 0.1); background: none; color: #fff; font-size: 14px; text-align: center; text-decoration: none; cursor: pointer; }
.game-menu .menu-item:last-child { border-bottom: 0; }
.game-menu .menu-item:hover { color: var(--accent); }

.home-page .duration-chip.is-active { color: #1a1a1a; background: var(--accent); border-color: var(--accent); }

.login-page { padding-bottom: 15px; }
.login-card { background: rgba(30, 30, 45, 0.6); border-color: rgba(212, 165, 116, 0.15); }

/* ===== Bottom tabbar ===== */
.tab-page { padding-bottom: 82px; }
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  width: 375px;
  max-width: 100%;
  height: 58px;
  transform: translateX(-50%);
  background: rgba(26, 26, 26, 0.98);
  border-top: 1px solid rgba(212, 165, 116, 0.18);
  backdrop-filter: blur(8px);
}
.tabbar-item {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #888;
  font-size: 10px;
  text-decoration: none;
}
.tabbar-item.is-active { color: var(--accent); }
.tabbar-item.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 24px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--accent);
}
.tabbar-icon { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
.tabbar-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 440px) { .tabbar { width: 100%; } }

/* ===== 我的 / profile ===== */
.profile-page .page-header { padding-top: 18px; }
.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  background: rgba(42, 42, 42, 0.6);
  border: 1px solid rgba(212, 165, 116, 0.15);
  border-radius: 8px;
}
.profile-main { flex: 1; min-width: 0; }
.profile-name { color: #fff; font-size: 18px; font-weight: bold; }
.profile-tag { margin-top: 2px; color: #888; font-size: 11px; }
.profile-page .grid-3 { margin-bottom: 16px; }
.profile-page .section { margin-top: 16px; }
.profile-page .section-title { font-size: 15px; }
.profile-page .section-note { color: var(--accent); text-decoration: none; }
.profile-page .list { background: #2a2a2a; border-color: rgba(212, 165, 116, 0.1); }
.profile-page .list-item { padding: 12px 14px; }
.profile-page .list-item .dim { font-size: 16px; }

.home-page .room-section { margin-top: 12px; }

/* ===== Unified battle entry on home ===== */
.home-page .battle-section { margin-top: 12px; }
.home-mode-note { margin: 0 0 10px; color: #888; font-size: 11px; line-height: 1.6; }
.home-page .battle-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.home-page .battle-meta .badge { padding: 2px 6px; font-size: 9px; }
.home-page .card-factions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; max-width: 86px; }
.home-page .faction-c { color: #7b9e6b; }
.home-page .faction-d { color: #b08a5a; }

/* ===== Unified battle detail ===== */
body.battle-body {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  align-items: center;
  padding: 16px;
  overflow: hidden;
}
.battle-shell {
  height: min(812px, calc(100vh - 32px));
  height: min(812px, calc(100dvh - 32px));
  min-height: 0;
}
.battle-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 0 15px calc(12px + env(safe-area-inset-bottom));
  overflow: hidden;
}
.battle-page .page-header { flex: none; padding: 16px 0 12px; }
.battle-page .page-header .page-title { font-size: 16px; }
.battle-page .back-link,
.detail-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  color: var(--accent);
  cursor: pointer;
}
.battle-page .back-link svg,
.detail-info-btn svg { width: 17px; height: 17px; }
.detail-info-btn:hover { border-color: var(--accent); }
.battle-panel { display: none; }
.battle-panel.is-active { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.battle-page .section { margin-top: 0; }
.detail-battle-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.detail-battle-name { margin: 0; color: var(--text); font-family: var(--font-serif); font-size: 22px; font-weight: bold; letter-spacing: 1px; }
.detail-battle-meta { margin: 4px 0 0; color: var(--text-3); font-size: 11px; }
.detail-battle-head .badge { flex: none; }
.detail-summary { margin: 8px 0 0; color: var(--text-2); font-size: 12px; line-height: 1.6; }
.battle-page .detail-select-section { margin-top: 12px; }
.battle-page .section-head { align-items: center; margin-bottom: 8px; }
.battle-page .section-title { margin: 0; padding-left: 0; font-size: 14px; }
.detail-faction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.battle-panel[data-battle-panel="changping"] .detail-faction-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-faction-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(212, 165, 116, 0.18);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.detail-faction-card:hover { border-color: rgba(212, 165, 116, 0.5); transform: translateY(-1px); }
.detail-faction-card.is-selected { border-color: var(--accent); background: rgba(212, 165, 116, 0.12); box-shadow: 0 0 0 1px rgba(212, 165, 116, 0.25); }
.detail-faction-banner { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 6px 8px; color: var(--text); font-size: 14px; font-weight: bold; letter-spacing: 1px; background: #2c3e50; }
.detail-faction-banner.faction-a { background: #2c3e50; }
.detail-faction-banner.faction-b { background: #7f8c8d; }
.detail-faction-banner.faction-c { background: #5b7c5a; }
.detail-faction-banner.faction-d { background: #8a6a45; }
.detail-faction-body { padding: 8px; }
.detail-faction-leader { color: var(--text); font-family: var(--font-serif); font-size: 16px; }
.detail-faction-meta { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 4px; color: var(--text-2); font-size: 10px; white-space: nowrap; }
.battle-panel[data-battle-panel="changping"] .detail-faction-meta { flex-direction: column; align-items: flex-start; gap: 0; }
.detail-faction-role { display: inline-flex; margin: 0; padding: 1px 5px; border-radius: 3px; background: rgba(0, 0, 0, 0.22); color: rgba(255, 255, 255, 0.84); font-size: 9px; font-weight: 400; letter-spacing: 0; white-space: nowrap; }
.detail-faction-card.is-selected .detail-faction-role { background: var(--accent); color: var(--canvas); font-weight: 600; }
.detail-profile {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  margin-top: 14px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(212, 165, 116, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 96% 12%, rgba(212, 165, 116, 0.1), transparent 42%),
    linear-gradient(155deg, #272727 0%, #202020 100%);
}
.detail-profile::after {
  content: attr(data-faction);
  position: absolute;
  right: 2px;
  bottom: -38px;
  color: rgba(212, 165, 116, 0.055);
  font-family: var(--font-serif);
  font-size: 136px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}
.detail-profile > * { position: relative; z-index: 1; }
.detail-profile.is-updating { animation: detail-profile-in 0.22s ease-out; }
@keyframes detail-profile-in {
  from { opacity: 0.68; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
.detail-profile-head { display: flex; flex: none; align-items: center; gap: 9px; }
.detail-profile-seal {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: #2c3e50;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.detail-profile-seal.faction-a { background: #2c3e50; }
.detail-profile-seal.faction-b { background: #7f8c8d; }
.detail-profile-seal.faction-c { background: #5b7c5a; }
.detail-profile-seal.faction-d { background: #8a6a45; }
.detail-profile-identity { flex: 1; min-width: 0; }
.detail-profile-name { display: flex; align-items: center; gap: 6px; color: var(--text); font-family: var(--font-serif); font-size: 16px; font-weight: 600; letter-spacing: 1px; }
.detail-profile-name .badge { flex: none; padding: 1px 6px; border-color: rgba(212, 165, 116, 0.3); background: var(--accent-soft); color: var(--accent); font-family: var(--font-sans); font-size: 9px; font-weight: 400; letter-spacing: 0; }
.detail-profile-identity > p { margin: 3px 0 0; color: var(--text-3); font-size: 10px; }
.detail-profile-index { flex: none; align-self: flex-start; padding-top: 2px; color: rgba(212, 165, 116, 0.7); font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.detail-profile-desc { flex: none; margin: 9px 0 0; color: var(--text-2); font-size: 11.5px; line-height: 1.65; }
.detail-profile-traits { display: flex; flex: none; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.detail-profile-traits span { padding: 2px 7px; border: 1px solid rgba(212, 165, 116, 0.18); border-radius: 3px; background: rgba(212, 165, 116, 0.07); color: var(--accent); font-size: 9px; line-height: 1.5; }
.detail-profile-goal {
  display: grid;
  flex: none;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  margin-top: auto;
  padding: 8px 9px;
  border-left: 2px solid rgba(212, 165, 116, 0.7);
  border-radius: 0 4px 4px 0;
  background: rgba(0, 0, 0, 0.2);
}
.detail-profile-goal > span { color: var(--accent); font-size: 9.5px; line-height: 1.6; letter-spacing: 1px; }
.detail-profile-goal > p { margin: 0; color: var(--text-2); font-size: 10.5px; line-height: 1.6; }
.detail-footer { flex: none; margin-top: auto; padding-top: 12px; }
.detail-hint-row { display: flex; align-items: center; justify-content: center; margin: 0 0 4px; }
.detail-hint { color: #e07a7a; font-size: 11px; }
.detail-actions { display: flex; gap: 8px; margin: 0; padding: 0; background: none; }
.detail-actions .btn { flex: 1; min-height: 42px; border-radius: 6px; }
.battle-page .detail-actions .btn-primary { background: var(--accent); color: var(--canvas); font-weight: 600; }
.battle-page .detail-actions .btn-primary:hover { color: var(--canvas); }
.detail-mode-note { margin: 8px 0 0; color: var(--text-3); font-size: 10px; text-align: center; }
.battle-background-modal .modal-panel { max-height: calc(100% - 32px); padding: 16px; overflow-y: auto; background: #242424; scrollbar-color: var(--accent) var(--surface); scrollbar-width: thin; }
.battle-background-modal .modal-close { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 50%; }
.battle-background-modal .modal-close svg { width: 15px; height: 15px; }
.battle-background-panel { display: none; }
.battle-background-panel.is-active { display: block; }
.detail-modal-intro { margin: 0 0 12px; color: var(--text-2); font-size: 12px; line-height: 1.7; }
.detail-background-list { border-top: 1px solid rgba(212, 165, 116, 0.14); }
.detail-background-list > div { display: grid; grid-template-columns: 72px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(212, 165, 116, 0.1); font-size: 11px; }
.detail-background-list span { color: var(--accent); }
.detail-background-list p { margin: 0; color: var(--text-2); line-height: 1.6; }
.detail-archive { margin-top: 16px; }
.detail-archive h3 { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 500; letter-spacing: 1px; }
.detail-archive p { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 6px 0; color: var(--text-2); font-size: 11px; }
.detail-archive strong { flex: none; color: var(--text); font-weight: 500; }
.detail-archive span { text-align: right; }

@media (max-width: 440px) {
  body.battle-body { padding: 0; }
  .battle-shell { height: 100vh; height: 100dvh; min-height: 0; }
}

@media (max-height: 700px) {
  .battle-page .page-header { padding: 10px 0 8px; }
  .battle-page .detail-select-section { margin-top: 8px; }
  .detail-faction-grid { gap: 6px; }
  .detail-faction-banner { padding: 4px 7px; }
  .detail-faction-body { padding: 6px 7px; }
  .detail-profile { margin-top: 8px; padding: 10px; }
  .detail-profile::after { right: -4px; bottom: -24px; font-size: 88px; }
  .detail-profile-seal { width: 28px; height: 28px; font-size: 16px; }
  .detail-profile-name { font-size: 14px; }
  .detail-profile-name .badge { padding: 0 5px; font-size: 8px; }
  .detail-profile-identity > p { margin-top: 1px; font-size: 9px; }
  .detail-profile-index { display: none; }
  .detail-profile-desc {
    display: -webkit-box;
    margin-top: 5px;
    overflow: hidden;
    font-size: 10.5px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .detail-profile-traits { gap: 4px; margin-top: 5px; }
  .detail-profile-traits span { padding: 1px 5px; font-size: 8.5px; }
  .detail-profile-goal { grid-template-columns: 46px 1fr; gap: 6px; margin-top: 6px; padding: 5px 7px; }
  .detail-profile-goal > span { font-size: 9px; }
  .detail-profile-goal > p { font-size: 10px; line-height: 1.45; }
  .detail-footer { padding-top: 8px; }
  .detail-hint-row { margin-bottom: 2px; }
  .detail-mode-note { margin-top: 6px; }
}

@media (max-height: 600px) {
  .battle-panel[data-battle-panel="four"] .detail-faction-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .battle-panel[data-battle-panel="four"] .detail-faction-banner { gap: 2px; padding: 4px 5px; font-size: 13px; letter-spacing: 0; }
  .battle-panel[data-battle-panel="four"] .detail-faction-role { padding: 1px 3px; font-size: 8px; }
  .battle-panel[data-battle-panel="four"] .detail-faction-body { padding: 5px 6px; }
  .battle-panel[data-battle-panel="four"] .detail-faction-leader { font-size: 14px; }
  .battle-panel[data-battle-panel="four"] .detail-faction-meta { flex-direction: column; align-items: flex-start; gap: 0; font-size: 8.5px; line-height: 1.4; }
}

@media (prefers-reduced-motion: reduce) {
  .detail-profile.is-updating { animation: none; }
}

/* ===== Waiting room lobby ===== */
.rooms-page .page-header { padding-top: 18px; }
.rooms-page .join-card { padding: 12px; }
.rooms-page .join-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rooms-page .join-card .row { align-items: stretch; }
.rooms-page .join-card .input { height: 40px; letter-spacing: 2px; text-transform: uppercase; }
.rooms-page .join-card .btn { min-height: 40px; }
.rooms-page .join-error { display: none; margin: 8px 0 0; }
.rooms-page .join-error.is-visible { display: block; }
.rooms-page .lobby-list { display: flex; flex-direction: column; gap: 8px; }
.rooms-page .lobby-card {
  display: block;
  padding: 12px;
  background: #2a2a2a;
  border: 1px solid rgba(212, 165, 116, 0.15);
  border-radius: 7px;
  color: inherit;
  text-decoration: none;
}
.rooms-page .lobby-card.is-mine {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.12), #2a2a2a);
  border-color: rgba(212, 165, 116, 0.45);
}
.rooms-page .lobby-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rooms-page .lobby-battle { color: #fff; font-size: 15px; font-weight: bold; }
.rooms-page .lobby-meta { margin-top: 2px; color: #888; font-size: 10px; }
.rooms-page .lobby-info { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: #b0b0b0; font-size: 11px; }
.rooms-page .lobby-code { color: var(--accent); font-family: var(--font-serif); letter-spacing: 2px; }
.rooms-page .lobby-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #333; }
.rooms-page .lobby-enter { color: var(--accent); font-size: 11px; }
.rooms-page .empty-state { padding: 42px 12px; }
.rooms-page .empty-mark { font-size: 40px; }
.rooms-page .empty-title { color: #fff; font-size: 16px; font-weight: 500; }
.rooms-page .empty-desc { color: #888; font-size: 12px; }

.home-page .battle-desc {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 2px;
  color: #888;
  font-size: 10.5px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-page .battle-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.home-page .battle-title-row .battle-name { flex: none; }
.home-page .battle-title-row .card-factions { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 3px; margin-left: auto; max-width: none; }

.rooms-page .join-card .row { flex-wrap: nowrap; }
.rooms-page .join-card .input { flex: 1 1 auto; width: auto; min-width: 0; }
.rooms-page .join-card .btn { flex: 0 0 auto; min-width: 64px; white-space: nowrap; }
.room-page .room-actions { flex-wrap: nowrap; }
.room-page .room-actions .action-btn { white-space: nowrap; }

/* ===== Battle intel fog ===== */
.game-page .intel-btn { font-size: 10px; letter-spacing: 0; }
.own-info-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 10px 4px; }
.own-info-title { color: var(--accent); font-size: 11px; font-weight: 500; }
.own-info-meta { color: #888; font-size: 10px; }
#intel-modal .intel-panel { max-height: 85%; background: #2a2a2a; }
.intel-note { margin: 0 0 10px; color: #888; font-size: 10.5px; line-height: 1.6; }
.intel-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; padding-right: 2px; }
.intel-faction { padding: 10px; border: 1px solid rgba(212, 165, 116, 0.15); border-radius: 7px; background: #252525; }
.intel-faction.is-self { border-color: rgba(212, 165, 116, 0.4); background: linear-gradient(135deg, rgba(212, 165, 116, 0.12), #252525); }
.intel-faction.is-unknown { border-style: dashed; }
.intel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.intel-faction-name { color: #fff; font-size: 14px; font-weight: bold; }
.intel-faction-name.faction-a { color: #8fb3c9; }
.intel-faction-name.faction-b { color: #e3a3a0; }
.intel-faction-name.faction-c { color: #9cd69f; }
.intel-faction-name.faction-d { color: #e0c08a; }
.intel-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; color: #b0b0b0; font-size: 11px; }
.intel-row span:last-child { color: #fff; text-align: right; }
.intel-units { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.intel-unit { display: flex; justify-content: space-between; gap: 8px; padding: 5px 7px; border-radius: 4px; background: rgba(26, 26, 26, 0.75); color: #ccc; font-size: 10.5px; }
.intel-unit span:last-child { color: #aaa; text-align: right; }
.intel-unit.is-unknown { border: 1px dashed #4a4a4a; background: rgba(26, 26, 26, 0.4); color: #777; }
.intel-unit.is-unknown span:last-child { color: #666; }

/* Prominent intel entry in the game top bar */
.game-page .intel-btn {
  width: auto;
  padding: 0 8px;
  border-color: transparent;
  background: linear-gradient(135deg, #d4a574, #b9895a);
  color: #1a1a1a;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: 0 2px 8px rgba(212, 165, 116, 0.2);
}
.game-page .intel-btn:hover { color: #1a1a1a; filter: brightness(1.05); }

/* Bottom game actions: plain labels plus current situation */
.game-page .advisor-action-item {
  border: 0;
  background: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.game-page .advisor-action-item:hover .advisor-action-label { color: var(--accent-strong); }

/* Compact bottom game actions and troop cards */
.game-page .advisor-actions { padding: 2px 10px; }
.game-page .advisor-action-item { padding: 3px 0; font-size: 12px; }
.game-page .advisor-action-label { font-size: 12px; }
.game-page .advisor-divider { height: 16px; }
.game-page .player-cards-bar { padding: 3px 0; }
.game-page .own-info-head { padding: 0 10px 2px; }
.game-page .own-info-title { font-size: 10px; }
.game-page .own-info-meta { font-size: 9px; }
.game-page .cards-row { gap: 5px; }
.game-page .general-card { min-width: 120px; padding: 4px 8px; gap: 5px; }
.game-page .card-portrait { width: 28px; height: 28px; border-radius: 5px; font-size: 13px; }
.game-page .card-info { flex: 1 1 auto; justify-content: center; gap: 0; text-align: left; }
.game-page .card-name { font-size: 11px; line-height: 1.25; white-space: nowrap; }
.game-page .card-tag { font-size: 8px; line-height: 1.25; white-space: nowrap; }
.game-page .card-stats-mini { flex: none; text-align: center; white-space: nowrap; }
.game-page .stat-mini { font-size: 9px; line-height: 1.2; }
.game-page .card-status { padding: 1px 5px; font-size: 9px; white-space: nowrap; }
.game-page .status-text { font-size: 9px; line-height: 1.2; }

/* Balanced bottom game area: not overly compressed */
.game-page .advisor-actions { padding: 5px 10px; }
.game-page .advisor-action-item { padding: 6px 0; font-size: 13px; }
.game-page .advisor-action-label { font-size: 13px; }
.game-page .advisor-divider { height: 20px; }
.game-page .player-cards-bar { padding: 5px 0; }
.game-page .own-info-head { padding: 0 10px 3px; }
.game-page .own-info-title { font-size: 10.5px; }
.game-page .own-info-meta { font-size: 9.5px; }
.game-page .cards-row { gap: 6px; }
.game-page .general-card { min-width: 128px; padding: 5px 9px; gap: 6px; }
.game-page .card-portrait { width: 30px; height: 30px; border-radius: 5px; font-size: 13px; }
.game-page .card-info { gap: 1px; }
.game-page .card-name { font-size: 12px; line-height: 1.3; }
.game-page .card-tag { font-size: 9px; line-height: 1.3; }
.game-page .stat-mini { font-size: 10px; line-height: 1.3; }
.game-page .stat-count { color: #fff; font-size: 10px; font-weight: 600; }
.game-page .card-status { padding: 2px 6px; font-size: 10px; }
.game-page .status-text { font-size: 10px; line-height: 1.2; }

/* Taller troop cards and clearer troop counts */
.game-page .advisor-actions { padding: 5px 10px; }
.game-page .advisor-action-item { padding: 6px 0; font-size: 13px; }
.game-page .advisor-action-label { font-size: 13px; }
.game-page .advisor-divider { height: 20px; }
.game-page .player-cards-bar { padding: 7px 0; }
.game-page .own-info-head { padding: 0 10px 4px; }
.game-page .own-info-title { font-size: 11px; }
.game-page .own-info-meta { font-size: 10px; }
.game-page .cards-row { gap: 7px; }
.game-page .general-card { min-width: 142px; padding: 7px 10px; gap: 7px; }
.game-page .card-portrait { width: 34px; height: 34px; border-radius: 6px; font-size: 14px; }
.game-page .card-info { gap: 2px; }
.game-page .card-name { font-size: 13px; line-height: 1.3; }
.game-page .card-tag { font-size: 9.5px; line-height: 1.3; }
.game-page .stat-mini { font-size: 10.5px; line-height: 1.3; }
.game-page .stat-count { font-size: 11px; font-weight: 600; }
.game-page .card-status { padding: 2px 7px; font-size: 10px; }
.game-page .status-text { font-size: 10px; line-height: 1.2; }

/* Faction intel tabs */
.intel-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.intel-tab {
  flex: 1;
  padding: 7px 0;
  border: 1px solid rgba(212, 165, 116, 0.16);
  border-radius: 5px;
  background: rgba(42, 42, 42, 0.8);
  color: #999;
  font-size: 12px;
  cursor: pointer;
}
.intel-tab.is-active { border-color: var(--accent); background: rgba(212, 165, 116, 0.15); color: var(--accent); font-weight: 600; }
.intel-tab-content { max-height: 56vh; overflow-y: auto; padding-right: 2px; }
.intel-section { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(212, 165, 116, 0.1); }
.intel-section-title { margin-bottom: 4px; color: var(--accent); font-size: 10px; letter-spacing: 1px; }
