:root {
  --bg-dark: #0b1120;
  --bg-panel: #111827;
  --bg-card: #1e293b;
  --border: #334155;
  --text-main: #f1f5f9;
  --text-sub: #94a3b8;
  --accent-gold: #f59e0b;
  --accent-red: #ef4444;
  --accent-green: #10b981;
  --accent-blue: #38bdf8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: "Yu Gothic UI", "Meiryo", "Hiragino Kaku Gothic ProN", sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 13px;
}

/* 上部バー */
.topbar {
  height: 58px;
  background: #0f172a;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  gap: 12px;
  flex-shrink: 0;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-seal {
  width: 34px; height: 34px; border-radius: 6px;
  background: #991b1b; border: 2px solid #fca5a5;
  color: #fff; font-weight: bold; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.brand-title { font-weight: 700; font-size: 15px; letter-spacing: 0.04em; }
.brand-title .ver { font-size: 11px; color: var(--accent-gold); font-weight: 600; margin-left: 4px; }
.brand-sub { font-size: 11px; color: var(--text-sub); }

.clock-box { display: flex; align-items: center; gap: 10px; }
.date-display {
  font-family: monospace; font-size: 16px; font-weight: 700;
  color: #fde68a; background: #1e293b; padding: 4px 10px;
  border-radius: 5px; border: 1px solid #475569; min-width: 118px; text-align: center;
}
.speed-controls { display: flex; gap: 4px; }
.btn-ctrl {
  background: #1e293b; color: #e2e8f0; border: 1px solid #475569;
  border-radius: 4px; padding: 5px 8px; cursor: pointer; font-size: 11.5px; font-weight: 600;
}
.btn-ctrl:hover { background: #334155; }
.btn-ctrl.active { background: #0284c7; border-color: #38bdf8; color: #fff; }
.btn-ctrl.locked { background: #1f161a; border-color: #7f1d1d; color: #fca5a5; }
.btn-ctrl.unlocked-pause { background: #065f46; border-color: #34d399; color: #fff; }

.kpi-strip { display: flex; gap: 8px; }
.kpi {
  background: #172033; border: 1px solid #334155; border-radius: 5px;
  padding: 3px 9px; min-width: 82px; text-align: center;
}
.kpi-label { display: block; font-size: 10px; color: var(--text-sub); }
.kpi-val { font-size: 13px; font-weight: 700; color: #f8fafc; }
.kpi-val.danger { color: #f87171; }
.kpi-val.good { color: #34d399; }
.kpi-val.warn { color: #fbbf24; }

/* メイン3ペイン */
.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr 310px;
  min-height: 0;
}

.pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  background: var(--bg-panel);
}
.pane:last-child { border-right: none; }

.pane-tabs, .center-tabs, .pane-header {
  display: flex;
  align-items: center;
  background: #0f172a;
  border-bottom: 1px solid var(--border);
  padding: 6px 8px;
  gap: 6px;
  flex-shrink: 0;
}
.pane-header { justify-content: space-between; font-weight: 700; font-size: 12.5px; }

.sub-tab, .main-tab {
  background: transparent; color: var(--text-sub); border: 1px solid transparent;
  padding: 5px 10px; border-radius: 5px; cursor: pointer; font-size: 12px; font-weight: 600;
}
.sub-tab.active, .main-tab.active {
  background: #1e293b; color: #f8fafc; border-color: #475569;
}

.legend-inline {
  margin-left: auto; font-size: 11px; color: var(--text-sub);
  display: flex; align-items: center; gap: 6px;
}
.legend-inline .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 2px; }

.pane-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* カード共通 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 10px;
}
.card.done { border-color: #059669; background: #0f241f; }
.card.running { border-color: #ea580c; background: #26180f; }
.card.failed-once { border-color: #dc2626; }

.card-title { font-weight: 700; font-size: 12.5px; display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.card-desc { font-size: 11px; color: #cbd5e1; margin: 5px 0; line-height: 1.45; }
.card-meta { font-size: 10.5px; color: var(--text-sub); display: flex; justify-content: space-between; margin-bottom: 6px; }

.badge {
  display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 99px; font-weight: 700;
}
.badge-ok { background: #065f46; color: #a7f3d0; }
.badge-warn { background: #78350f; color: #fde68a; }
.badge-bad { background: #7f1d1d; color: #fecaca; }
.badge-info { background: #0c4a6e; color: #bae6fd; }

.btn-action {
  width: 100%; background: #2563eb; color: #fff; border: none; border-radius: 4px;
  padding: 6px 8px; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.btn-action:hover:not(:disabled) { background: #1d4ed8; }
.btn-action:disabled { background: #334155; color: #64748b; cursor: not-allowed; }
.btn-action.gold { background: #b45309; }
.btn-action.gold:hover:not(:disabled) { background: #92400e; }

.btn-mini {
  background: #334155; color: #f1f5f9; border: 1px solid #475569;
  border-radius: 4px; padding: 3px 8px; font-size: 11px; cursor: pointer;
}
.btn-mini:hover { background: #475569; }

/* 中央ビュー */
.center-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.center-view.scrollable { overflow-y: auto; padding: 12px; }
.canvas-wrap { flex: 1; position: relative; min-height: 260px; }
.canvas-wrap.full-graph { height: 100%; }
canvas { width: 100%; height: 100%; display: block; cursor: pointer; }

/* ノード詳細＆人事ドック */
.node-inspector {
  height: 198px;
  background: #0f172a;
  border-top: 1px solid var(--border);
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 12px;
  overflow-y: auto;
  flex-shrink: 0;
}
.insp-title { font-size: 14px; font-weight: 700; color: #f8fafc; margin-bottom: 4px; }
.insp-desc { font-size: 11.5px; color: #94a3b8; line-height: 1.4; margin-bottom: 6px; }
.insp-current {
  background: #1e293b; border: 1px solid #334155; border-radius: 5px;
  padding: 6px 8px; font-size: 11.5px;
}

.assign-row { display: flex; gap: 6px; margin-bottom: 6px; }
.assign-select {
  flex: 1; background: #1e293b; color: #f8fafc; border: 1px solid #475569;
  border-radius: 4px; padding: 5px; font-size: 11.5px;
}
.eval-box { font-size: 11px; line-height: 1.45; background: #172033; padding: 6px 8px; border-radius: 5px; border: 1px solid #334155; }

/* 勢力・外交帳票ビュー */
.world-grid { display: flex; flex-direction: column; gap: 14px; }
.section-title { font-size: 13px; font-weight: 700; color: #fde68a; border-bottom: 1px solid #334155; padding-bottom: 4px; margin-bottom: 8px; }
.world-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.meter { height: 7px; background: #0f172a; border-radius: 4px; overflow: hidden; margin: 4px 0; }
.meter-fill { height: 100%; background: #38bdf8; }
.btn-row { display: flex; gap: 6px; margin-top: 6px; }

/* 右ペイン：受信トレイ */
.inbox-item {
  background: #172033; border: 1px solid #334155; border-left: 3px solid #64748b;
  border-radius: 5px; padding: 7px 9px; cursor: pointer;
}
.inbox-item.urgent { border-left-color: #ef4444; background: #26161b; }
.inbox-item.blanco { border-left-color: #f59e0b; background: #241c11; }
.inbox-date { font-size: 10px; color: var(--text-sub); }
.inbox-title { font-size: 12px; font-weight: 700; margin: 2px 0; }
.inbox-summary { font-size: 11px; color: #cbd5e1; line-height: 1.4; }
.inbox-highlight {
  display: inline-block; background: rgba(245, 158, 11, 0.2); color: #fcd34d;
  font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-top: 3px;
}

/* モーダル */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(2, 6, 23, 0.78);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.modal-card {
  background: #111827; border: 1px solid #475569; border-radius: 10px;
  max-width: 680px; width: 100%; max-height: 86vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.intro-card { padding: 24px 28px; }
.intro-seal {
  display: inline-block; background: #991b1b; color: #fef2f2; font-weight: 700;
  padding: 3px 10px; border-radius: 4px; font-size: 12px; margin-bottom: 10px;
}
.intro-card h1 { font-size: 21px; margin-bottom: 10px; color: #fde68a; }
.intro-lead { font-size: 13px; line-height: 1.6; color: #e2e8f0; margin-bottom: 14px; }
.intro-points { margin-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: #cbd5e1; line-height: 1.5; margin-bottom: 20px; }

.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid #334155;
}
.modal-head h2 { font-size: 15px; color: #fde68a; }
.btn-close { background: transparent; border: none; color: #94a3b8; font-size: 18px; cursor: pointer; }
.modal-body { padding: 14px 16px; overflow-y: auto; flex: 1; }
.modal-actions { padding: 12px 16px; border-top: 1px solid #334155; display: flex; justify-content: flex-end; }
.btn-primary {
  background: #b91c1c; color: #fff; border: 1px solid #f87171; border-radius: 6px;
  padding: 10px 20px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.btn-primary:hover { background: #991b1b; }

/* 木のブランコ ステップ表示 */
.blanco-flow { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.blanco-step {
  background: #1e293b; border: 1px solid #334155; border-left: 4px solid #38bdf8;
  border-radius: 6px; padding: 8px 10px;
}
.blanco-step.distorted { border-left-color: #ef4444; background: #26161b; }
.blanco-arrow { text-align: center; color: #64748b; font-size: 13px; }

/* 閻魔帳 */
.enma-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.enma-tag-btn {
  background: #1e293b; color: #cbd5e1; border: 1px solid #475569;
  border-radius: 99px; padding: 3px 9px; font-size: 11px; cursor: pointer;
}
.enma-tag-btn.active { background: #b45309; color: #fff; border-color: #fbbf24; }
.enma-textarea {
  width: 100%; min-height: 70px; background: #0f172a; color: #f8fafc;
  border: 1px solid #475569; border-radius: 5px; padding: 8px; font-size: 12px;
}

.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fde68a; border: 1px solid #f59e0b;
  padding: 8px 16px; border-radius: 6px; font-weight: 700; font-size: 12.5px;
  z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.hidden { display: none !important; }

/* Phase 1 追加スタイル：年末評定所・個別人材カルテ・予算スライダー・委任スイッチ */
.council-card { max-width: 860px; height: 84vh; }
.roster-split { display: grid; grid-template-columns: 240px 1fr; gap: 12px; min-height: 360px; }
.roster-list {
  display: flex; flex-direction: column; gap: 4px; max-height: 440px; overflow-y: auto;
  border-right: 1px solid #334155; padding-right: 8px;
}
.roster-item {
  background: #172033; border: 1px solid #334155; border-radius: 5px;
  padding: 6px 8px; cursor: pointer; text-align: left; color: #e2e8f0; font-size: 11.5px;
}
.roster-item:hover { background: #1e293b; }
.roster-item.active { border-color: #38bdf8; background: #0c4a6e; }
.roster-detail { display: flex; flex-direction: column; gap: 8px; }
.career-table { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-top: 4px; }
.career-table th, .career-table td { border: 1px solid #334155; padding: 4px 6px; text-align: center; }
.career-table th { background: #1e293b; color: #94a3b8; }
.report-card {
  background: #172033; border: 1px solid #334155; border-left: 4px solid #f59e0b;
  border-radius: 6px; padding: 10px 12px; margin-bottom: 8px;
}
.report-card.spy { border-left-color: #ef4444; background: #26161b; }
.report-card.praise { border-left-color: #10b981; }
.deleg-box {
  background: #172033; border: 1px solid #334155; border-radius: 6px;
  padding: 7px 9px; margin-bottom: 6px;
}
.deleg-row { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; font-size: 11.5px; }
.budget-row {
  background: #172033; border: 1px solid #334155; border-radius: 6px;
  padding: 8px 10px; margin-bottom: 8px;
}
.budget-slider { width: 100%; margin-top: 4px; accent-color: #f59e0b; }
.choice-btn {
  width: 100%; text-align: left; background: #1e293b; color: #f8fafc;
  border: 1px solid #475569; border-radius: 6px; padding: 10px 12px;
  margin-top: 8px; cursor: pointer; font-size: 12.5px; font-weight: 700;
}
.choice-btn:hover { background: #334155; border-color: #f59e0b; }

/* エージェント間掛け合い（城内チャット）カード */
.chatter-card {
  background: #172033; border: 1px solid #334155; border-radius: 7px;
  padding: 8px 9px; display: flex; flex-direction: column; gap: 6px;
}
.chatter-meta { display: flex; justify-content: space-between; font-size: 10px; color: #94a3b8; }
.chatter-tag { background: #1e293b; color: #fcd34d; padding: 1px 6px; border-radius: 99px; font-weight: 700; }
.chatter-bubble {
  background: #0f172a; border-left: 3px solid #38bdf8; border-radius: 4px;
  padding: 5px 7px; font-size: 11.5px; line-height: 1.45; color: #e2e8f0;
}
.chatter-bubble.reply { border-left-color: #f59e0b; margin-left: 10px; }
.chatter-speaker {
  font-weight: 700; font-size: 11px; color: #7dd3fc; cursor: pointer;
  text-decoration: underline dotted; margin-bottom: 2px; display: inline-block;
}
.chatter-bubble.reply .chatter-speaker { color: #fcd34d; }

/* Ver 2.0 追加スタイル：RitsuryoOS起動ログ・3案推薦・閻魔帳バッジ・表vs裏年表・フィルタバー */
.boot-card { border-color: #334155; background: #0a0f1d; max-width: 720px; }
.boot-terminal {
  background: #020617; border: 1px solid #1e293b; border-radius: 6px;
  padding: 14px 16px; font-family: "Consolas", "Courier New", monospace;
  font-size: 12.5px; line-height: 1.7; margin-bottom: 16px;
  box-shadow: inset 0 0 18px rgba(0,0,0,0.65);
}
.boot-line.dim { color: #94a3b8; }
.boot-line .ok { color: #34d399; font-weight: 700; }
.boot-line.warn { color: #fbbf24; }
.boot-line.err { color: #f87171; font-weight: 700; }
.boot-line.sys { color: #38bdf8; font-weight: 700; margin-top: 4px; }

.btn-secondary {
  background: #1e293b; color: #e2e8f0; border: 1px solid #475569; border-radius: 6px;
  padding: 10px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-secondary:hover { background: #334155; border-color: #38bdf8; }

.btn-danger {
  background: #991b1b; color: #fff; border: 1px solid #f87171; border-radius: 6px;
  padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-danger:hover { background: #7f1d1d; }

.btn-success {
  background: #047857; color: #fff; border: 1px solid #34d399; border-radius: 6px;
  padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-success:hover { background: #065f46; }

/* 3案推薦人事カード */
.rec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
@media (max-width: 780px) { .rec-grid { grid-template-columns: 1fr; } }
.rec-card {
  background: #172033; border: 1px solid #334155; border-radius: 8px;
  padding: 10px; display: flex; flex-direction: column; gap: 7px;
}
.rec-card:hover { border-color: #38bdf8; }
.rec-head { display: flex; align-items: center; gap: 8px; }

/* 閻魔帳リアルタイム付箋ピル */
.enma-pill {
  display: inline-block; font-size: 9.5px; font-weight: 700; color: #fff;
  padding: 1px 6px; border-radius: 99px; margin-left: 4px; vertical-align: middle;
}

/* 掛け合いログのポートレート行 */
.chatter-row { display: flex; gap: 7px; align-items: flex-start; }

/* 受信トレイ重要度フィルタバー */
.inbox-filter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 5px 8px; background: #0f172a; border-bottom: 1px solid #334155;
  font-size: 11px; flex-shrink: 0;
}

/* AAR 表vs裏の2カラム対比年表 */
.alt-history-box {
  background: #1c1917; border: 1px solid #b45309; border-left: 4px solid #f59e0b;
  border-radius: 6px; padding: 12px 14px; font-size: 13px; line-height: 1.7;
  color: #fef3c7; margin: 10px 0 14px;
}
.dual-table { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-top: 6px; }
.dual-table th, .dual-table td { border: 1px solid #334155; padding: 6px 8px; vertical-align: top; text-align: left; line-height: 1.5; }
.dual-table th { background: #1e293b; color: #fde68a; }
.dual-table td.col-date { width: 74px; font-family: monospace; color: #94a3b8; white-space: nowrap; }
.dual-table td.col-surface { width: 44%; background: #172033; color: #cbd5e1; }
.dual-table td.col-truth { background: #1f1419; color: #fecaca; }

/* ワンクリック閻魔帳クイックタグバー（木のブランコモーダル内） */
.quick-enma-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  margin-top: 5px; padding-top: 5px; border-top: 1px dashed #334155;
}
.quick-tag-chip {
  font-size: 10px; padding: 2px 6px; border-radius: 99px; cursor: pointer;
  border: 1px solid #475569; background: #0f172a; color: #cbd5e1;
}
.quick-tag-chip.active { color: #fff; border-color: #f8fafc; }

/* 右ペイン帳票ログの未読重要バッジ */
.unread-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: 4px;
  border-radius: 99px; background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 800; line-height: 1;
}

/* 木のブランコ：ビフォー・アフター特大対比バナー */
.blanco-banner {
  background: linear-gradient(135deg, #1e1b4b, #3b0764);
  border: 1px solid #a855f7; border-radius: 8px;
  padding: 10px 12px; margin-bottom: 10px; text-align: center;
  font-size: 14px; font-weight: 800; line-height: 1.5; color: #f8fafc;
}
.blanco-banner.ok { background: linear-gradient(135deg, #064e3b, #0f172a); border-color: #10b981; }
.blanco-banner.warn { background: linear-gradient(135deg, #451a03, #1e293b); border-color: #f59e0b; }
.blanco-banner.fail { background: linear-gradient(135deg, #450a0a, #2e1065); border-color: #ef4444; }
.blanco-banner .ba-tag {
  display: inline-block; font-size: 10.5px; padding: 1px 6px; border-radius: 4px;
  margin-right: 4px; vertical-align: middle; font-weight: 700;
}
.blanco-banner .ba-arrow { margin: 0 8px; color: #fbbf24; font-size: 16px; }

/* 1366px以下のノートPC画面でも上部バー右端（保守反発）が見切れないよう調整 */
@media (max-width: 1420px) {
  .topbar { padding: 0 10px; gap: 8px; }
  .brand-sub { display: none; }
  .date-display { min-width: 104px; font-size: 14.5px; padding: 3px 7px; }
  .btn-ctrl { padding: 4px 6px; font-size: 11px; }
  .kpi-strip { gap: 5px; }
  .kpi { min-width: 68px; padding: 3px 6px; }
  .kpi-val { font-size: 12px; }
}

/* 1280px以下・夢現iframe・Windows 125%拡大環境でも右端KPIが見切れないよう折り返し対応 */
@media (max-width: 1280px) {
  .topbar {
    height: auto;
    min-height: 54px;
    padding: 6px 10px;
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .workspace {
    grid-template-columns: 245px 1fr 270px;
  }
  .kpi { min-width: 62px; padding: 2px 5px; }
  .kpi-label { font-size: 9.5px; }
  .kpi-val { font-size: 11.5px; }
}

/* 複式簿記導入後：Cities: Skylines / シムシティ風「近代・予算編成表」UI */
.modern-budget-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px;
}
.mb-kpi {
  background: #0f172a; border: 1px solid #334155; border-radius: 6px;
  padding: 8px 10px; text-align: center;
}
.mb-kpi-lbl { font-size: 10.5px; color: #94a3b8; display: block; margin-bottom: 2px; }
.mb-kpi-val { font-size: 16px; font-weight: 800; font-family: monospace; }
.modern-budget-grid {
  display: grid; grid-template-columns: 0.95fr 1.55fr; gap: 10px; align-items: start;
}
@media (max-width: 1100px) { .modern-budget-grid { grid-template-columns: 1fr; } }
.budget-table {
  width: 100%; border-collapse: collapse; font-size: 11.5px;
  background: #0f172a; border: 1px solid #334155; border-radius: 6px; overflow: hidden;
}
.budget-table th, .budget-table td {
  padding: 7px 8px; border-bottom: 1px solid #1e293b; text-align: left; vertical-align: middle;
}
.budget-table th { background: #1e293b; color: #7dd3fc; font-size: 11px; }
.budget-table tr:last-child td { border-bottom: none; }
.budget-table .num { text-align: right; font-family: monospace; font-weight: 700; white-space: nowrap; }
.budget-table .slider-cell { min-width: 130px; }
.budget-table .budget-slider { width: 100%; margin: 0; }

/* オンライン番付（ランキング）＆スコア登録ボックス */
.ranking-submit-box {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.ranking-submit-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.ranking-input {
  flex: 1 1 180px;
  min-width: 150px;
  background: #0b1120;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
}
.ranking-input:focus {
  outline: none;
  border-color: #fbbf24;
}
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 6px;
}
.ranking-table th {
  background: #1e293b;
  color: #cbd5e1;
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid #334155;
  white-space: nowrap;
}
.ranking-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.55);
  color: #e2e8f0;
  vertical-align: middle;
}
.ranking-table tr.ranking-self td {
  background: rgba(251, 191, 36, 0.14);
  color: #fef08a;
}
.rank-num {
  font-weight: 700;
  text-align: center;
  width: 42px;
}
.rank-1 { color: #fbbf24; font-size: 14px; }
.rank-2 { color: #e2e8f0; font-size: 13px; }
.rank-3 { color: #f59e0b; font-size: 13px; }
.ranking-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid #334155;
  border-radius: 8px;
  font-size: 11.5px;
  color: #cbd5e1;
}
.ranking-stat-pill {
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  color: #e2e8f0;
}
