/* TACTICAL COMMAND: CIC - 硬派な現代戦CICモニタースタイル */
:root {
  --bg-deep: #050b12;
  --bg-panel: #0b1522;
  --bg-card: #112033;
  --border: #1e3a57;
  --accent: #38bdf8;
  --green: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --text: #e2e8f0;
  --muted: #94a3b8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: "Meiryo", "Yu Gothic", system-ui, sans-serif;
  font-size: 13px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
}

/* 上部ステータスバー */
.topbar {
  min-height: 48px;
  height: auto;
  flex-shrink: 0;
  background: #08121e;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px;
  gap: 6px 10px;
}
.brand {
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
  font-size: 14px;
  white-space: nowrap;
}
.top-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 12px;
}
.metric-pill {
  background: #0f1f32;
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: 4px;
}
.metric-pill strong { color: #fff; }
.metric-pill.danger strong { color: #f87171; }
.metric-pill.warn strong { color: #fbbf24; }

.top-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

/* 3ペインメインエリア */
.workspace {
  display: grid;
  grid-template-columns: 300px 1fr 330px;
  flex: 1;
  min-height: 0;
  gap: 6px;
  padding: 6px;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-header {
  background: #0f2034;
  border-bottom: 1px solid var(--border);
  padding: 6px 10px;
  font-weight: bold;
  font-size: 12px;
  color: var(--accent);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 左ペイン：決裁トレイ＆本部スタッフ */
.left-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.decision-card {
  background: #142235;
  border: 1px solid #334155;
  border-left: 4px solid var(--warn);
  border-radius: 4px;
  padding: 8px;
}
.decision-card.urgent {
  border-left-color: var(--danger);
  background: #231420;
  animation: pulseBorder 1.5s infinite;
}
@keyframes pulseBorder {
  0%, 100% { box-shadow: 0 0 0 rgba(239,68,68,0); }
  50% { box-shadow: 0 0 10px rgba(239,68,68,0.45); }
}
.decision-title { font-weight: bold; font-size: 12px; margin-bottom: 4px; color: #fff; }
.decision-note { font-size: 11px; color: #cbd5e1; margin: 4px 0; line-height: 1.4; background: rgba(0,0,0,0.28); padding: 4px 6px; border-radius: 3px; }
.decision-note.intel { border-left: 2px solid var(--accent); color: #bae6fd; }
.decision-actions { display: flex; gap: 4px; margin-top: 6px; }

.hq-section {
  border-top: 1px solid var(--border);
  padding: 6px;
  background: #091320;
}
.hq-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  background: #0f1d2e;
  border: 1px solid #1e334a;
  border-radius: 4px;
  margin-bottom: 4px;
  gap: 4px;
}
.hq-name {
  font-size: 11px;
  cursor: pointer;
  color: #e2e8f0;
}
.hq-name:hover { color: var(--accent); text-decoration: underline; }
.del-btns { display: flex; gap: 2px; }
.del-btn {
  font-size: 10px;
  padding: 2px 5px;
  border: 1px solid #334155;
  background: #0b1623;
  color: #94a3b8;
  border-radius: 3px;
  cursor: pointer;
}
.del-btn.active { background: #0284c7; color: #fff; border-color: #38bdf8; }
.del-btn.manual.active { background: #dc2626; border-color: #f87171; }
.del-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* 中央ペイン：作戦盤＆コマンドバー */
.center-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #04090f;
  position: relative;
  overflow: hidden;
}
#tacticalCanvas {
  width: 100%;
  height: 100%;
  max-width: 800px;
  max-height: 520px;
  object-fit: contain;
  cursor: crosshair;
}
.queue-bar {
  width: 100%;
  background: #0a1726;
  border-top: 1px solid var(--border);
  padding: 5px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  gap: 10px;
}
.queue-progress-bg {
  flex: 1;
  height: 8px;
  background: #1e293b;
  border-radius: 4px;
  overflow: hidden;
}
.queue-progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}
.action-toolbar {
  background: #0c1929;
  border-top: 1px solid var(--border);
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

/* 右ペイン：通信ログ */
.log-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: #0a1523;
}
.log-tab {
  flex: 1;
  padding: 6px;
  text-align: center;
  font-size: 11px;
  cursor: pointer;
  color: var(--muted);
  border: none;
  background: transparent;
}
.log-tab.active {
  color: #fff;
  background: #132840;
  border-bottom: 2px solid var(--accent);
  font-weight: bold;
}
.log-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.log-item {
  background: #0e1c2e;
  border-left: 3px solid #475569;
  padding: 5px 7px;
  border-radius: 3px;
  font-size: 11.5px;
  line-height: 1.45;
}
.log-item.urgent { border-left-color: var(--danger); background: #22131c; }
.log-item.warn { border-left-color: var(--warn); background: #201a12; }
.log-item.intel { border-left-color: var(--accent); background: #0c2135; }
.log-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 2px;
  gap: 4px;
}
.log-sender {
  font-weight: bold;
  color: #e2e8f0;
  cursor: pointer;
}
.log-sender:hover { color: var(--accent); text-decoration: underline; }

/* 下部ドック：現場6〜8部隊 */
.bottom-dock {
  min-height: 126px;
  height: auto;
  flex-shrink: 0;
  background: #08121e;
  border-top: 1px solid var(--border);
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 5px;
}
.unit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s;
}
.unit-card.selected {
  border-color: var(--accent);
  background: #132a44;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}
.unit-card.dead { opacity: 0.45; border-color: #475569; }
.unit-head { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 11px; font-weight: bold; }
.status-pill {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.4px;
}
.status-pill.st-adv { background: #0284c7; color: #f0f9ff; border: 1px solid #38bdf8; }
.status-pill.st-even { background: #854d0e; color: #fef9c3; border: 1px solid #eab308; }
.status-pill.st-dis { background: #b91c1c; color: #fef2f2; border: 1px solid #f87171; }
.status-pill.st-calm { background: #1e293b; color: #94a3b8; border: 1px solid #334155; }
.unit-officer { font-size: 11px; color: #bae6fd; }
.unit-bars { display: flex; gap: 6px; font-size: 10px; color: var(--muted); }
.unit-actions { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.unit-actions .btn-xs { padding: 2px 5px; font-size: 10px; }

/* 汎用ボタン＆付箋タグ */
.btn {
  background: #172a42;
  color: #e2e8f0;
  border: 1px solid #2e4f73;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { background: #213d5e; border-color: var(--accent); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary { background: #0284c7; border-color: #38bdf8; color: #fff; font-weight: bold; }
.btn.danger { background: #991b1b; border-color: #ef4444; color: #fff; }
.btn.warn { background: #92400e; border-color: #f59e0b; color: #fff; }
.btn.active-mode { background: #eab308; color: #000; border-color: #fef08a; font-weight: bold; }
.btn-xs { padding: 2px 5px; font-size: 10px; }

.tag-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: bold;
  color: #fff;
  margin-left: 3px;
}

/* モーダル＆オーバーレイ（ブリーフィング・閻魔帳・AAR） */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 15, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.overlay.hidden { display: none; }
.modal {
  background: #0d1a2a;
  border: 1px solid #2b4e73;
  border-radius: 8px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 18px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}
.modal.wide { max-width: 1040px; }
.modal h2 { margin: 0 0 10px; color: var(--accent); font-size: 18px; }
.modal h3 { margin: 12px 0 6px; color: #93c5fd; font-size: 13px; border-bottom: 1px solid var(--border); padding-bottom: 3px; }

.career-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  margin: 6px 0;
}
.career-table th, .career-table td {
  border: 1px solid #243b55;
  padding: 4px 6px;
  text-align: center;
}
.career-table th { background: #13263d; color: #93c5fd; }

.tag-picker { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.tag-chip {
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #475569;
  font-size: 11px;
  cursor: pointer;
  background: #0f172a;
  color: #cbd5e1;
}
.tag-chip.selected { color: #fff; border-color: #fff; font-weight: bold; }

textarea.enma-memo {
  width: 100%;
  min-height: 68px;
  background: #07101b;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 6px;
  font-family: inherit;
  font-size: 12px;
}

/* AAR 2カラム */
.aar-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin-top: 10px;
}
.aar-event-card {
  background: #102033;
  border-left: 3px solid var(--warn);
  padding: 7px 9px;
  border-radius: 4px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 11.5px;
}
.aar-event-card:hover { background: #162d47; }
.aar-event-card.good_call { border-left-color: var(--green); }
.aar-event-card.friendly_fire, .aar-event-card.fake_radio { border-left-color: var(--danger); }
.title-banner {
  background: linear-gradient(90deg, #0f2942, #1e1b4b);
  border: 1px solid var(--accent);
  padding: 12px 14px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 顔グラフィック共通 */
.portrait-svg {
  border-radius: 5px;
  flex-shrink: 0;
  display: block;
}
.log-row-flex {
  display: flex;
  gap: 7px;
  align-items: flex-start;
}
.unit-top-flex {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* インターミッションUI */
.im-tabs {
  display: flex;
  gap: 6px;
  margin: 10px 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
.im-tab {
  padding: 6px 12px;
  background: #0f1e30;
  color: #94a3b8;
  border: 1px solid #243b55;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
}
.im-tab.active {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
}
.im-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.im-card {
  background: #102033;
  border: 1px solid #243b55;
  border-radius: 5px;
  padding: 9px 10px;
  margin-bottom: 8px;
  font-size: 11.5px;
}
.im-card.selected-swap {
  border-color: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
}
.adv-bar-bg {
  height: 10px;
  background: #7f1d1d;
  border-radius: 5px;
  overflow: hidden;
  width: 200px;
  border: 1px solid #334155;
}
.adv-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #22c55e);
}

/* タイトル画面（前作『TACTICAL COMMAND』準拠）＆ギャラリー */
.title-screen-card {
  background: radial-gradient(circle at top, #102a46 0%, #07121e 68%, #040a11 100%);
  border: 1px solid #2b547e;
  border-radius: 12px;
  padding: 28px 34px 22px;
  max-width: 680px;
  width: 100%;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(56, 189, 248, 0.25);
}
.title-hero {
  text-align: center;
  margin-bottom: 20px;
}
.title-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  color: #22c55e;
  font-weight: 700;
  margin-bottom: 6px;
}
.title-logo {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: #38bdf8;
  text-shadow: 0 0 22px rgba(56, 189, 248, 0.5);
  margin: 0 0 6px;
}
.title-sub {
  font-size: 12.5px;
  color: #94a3b8;
  margin: 0 0 12px;
}
.title-hi-score {
  display: inline-block;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 12px;
  color: #fde047;
  font-weight: 700;
  letter-spacing: 1px;
}
.title-hi-score span {
  font-size: 14px;
  color: #fff;
  font-family: monospace;
}
.title-menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.title-menu-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  background: linear-gradient(135deg, #102236, #0b1827);
  border: 1px solid #284b70;
  border-radius: 7px;
  color: #e2e8f0;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s, background 0.15s;
}
.title-menu-btn:hover:not(:disabled) {
  transform: translateX(4px);
  border-color: #38bdf8;
  background: linear-gradient(135deg, #16304c, #0f2238);
}
.title-menu-btn.primary {
  background: linear-gradient(135deg, #0369a1, #0c4a6e);
  border-color: #38bdf8;
}
.title-menu-btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0284c7, #0369a1);
}
.title-menu-btn.gold {
  background: linear-gradient(135deg, #422006, #1c1917);
  border-color: #eab308;
}
.title-menu-btn.gold:hover:not(:disabled) {
  border-color: #fde047;
  background: linear-gradient(135deg, #713f12, #292524);
}
.title-menu-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.tm-icon {
  font-size: 20px;
  width: 30px;
  text-align: center;
  flex-shrink: 0;
}
.tm-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tm-text strong {
  font-size: 14px;
  letter-spacing: 0.8px;
  color: #fff;
}
.tm-text small {
  font-size: 11px;
  color: #94a3b8;
}
.title-footer-meta {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #1e3a57;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
}

/* 会話調通信ブリーフィング */
.brief-comm-box {
  background: #07111d;
  border: 1px solid #24466b;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 10px 0;
}
.brief-comm-head {
  font-size: 11px;
  font-weight: bold;
  color: #38bdf8;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #16304c;
  padding-bottom: 4px;
}
.brief-comm-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 8px;
  background: #0d1d30;
  border-left: 3px solid #38bdf8;
  border-radius: 4px;
  margin-bottom: 6px;
}
.brief-comm-row:last-child { margin-bottom: 0; }
.brief-comm-row.is-nepo { border-left-color: #facc15; background: #221a12; }
.brief-comm-name {
  font-size: 11px;
  font-weight: bold;
  color: #93c5fd;
  margin-bottom: 2px;
}
.brief-comm-text {
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.5;
}

/* アーケード筐体風ランキングボード＆ネームエントリー */
.arcade-board {
  background: linear-gradient(180deg, #070e19 0%, #0b1626 100%);
  border: 2px solid #eab308;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 0 24px rgba(234, 179, 8, 0.18);
}
.arcade-header-glow {
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fde047;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.65);
  margin-bottom: 12px;
}
.arcade-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.arcade-table th {
  background: #13253c;
  color: #93c5fd;
  padding: 7px 8px;
  border-bottom: 2px solid #2b4e73;
  letter-spacing: 0.8px;
}
.arcade-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #182d47;
  text-align: center;
  font-family: "Consolas", "Meiryo", monospace;
}
.arcade-table tr.rank-gold td { color: #fde047; font-weight: bold; }
.arcade-table tr.rank-silver td { color: #e2e8f0; font-weight: bold; }
.arcade-table tr.rank-bronze td { color: #fdba74; font-weight: bold; }
.arcade-table tr.arcade-highlight {
  background: rgba(56, 189, 248, 0.18);
  outline: 1px solid #38bdf8;
}
.arc-new {
  display: inline-block;
  background: #ef4444;
  color: #fff;
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  font-weight: bold;
}
.arcade-footer-note {
  margin-top: 10px;
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
}
.arcade-entry-box {
  background: #0c1b2e;
  border: 1px solid #eab308;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.arcade-input {
  background: #040a11;
  color: #fde047;
  border: 1px solid #38bdf8;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  width: 170px;
  font-family: monospace;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}

/* 公開用PC推奨バナー・難易度切替・簡易マニュアル凡例 */
.mobile-notice {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 12px;
  background: #1e293b;
  border-bottom: 1px solid #38bdf8;
  color: #e0f2fe;
  font-size: 11.5px;
}
@media (max-width: 1180px) {
  .mobile-notice:not(.dismissed) { display: flex; }
}
.diff-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
}
.diff-badge.normal { background: #dc2626; color: #fff; }
.diff-badge.easy { background: #0284c7; color: #fff; }
.diff-badge.hard { background: linear-gradient(135deg, #9333ea, #e11d48); color: #fff; }
.diff-opt.locked {
  opacity: 0.52;
  cursor: not-allowed;
  border-style: dashed;
}

.title-diff-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid #1e3a57;
  border-radius: 8px;
  flex-wrap: wrap;
}
.diff-opt {
  flex: 1;
  min-width: 210px;
  text-align: left;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.15s;
}
.diff-opt small {
  display: block;
  font-size: 10px;
  font-weight: normal;
  color: #94a3b8;
  margin-top: 2px;
}
.diff-opt.active {
  border-color: #38bdf8;
  background: #102a45;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45);
}
.diff-opt.active small { color: #bae6fd; }

.manual-icon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  background: #08121f;
  border: 1px solid #1e3a57;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11.5px;
  color: #cbd5e1;
}

/* 人事査定モーダル */
.appraisal-advisor-bar {
  background: #0c1b2c;
  border: 1px solid #2b4e73;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 12px;
}
.appraisal-advice-note {
  margin-top: 4px;
  padding: 3px 6px;
  background: rgba(15, 23, 42, 0.75);
  border-left: 2px solid #38bdf8;
  border-radius: 3px;
  font-size: 10.5px;
  color: #fde68a;
  line-height: 1.4;
}
.appraisal-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #0b1929;
  border: 1px solid #244366;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 12px;
}
.appraisal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}
.appraisal-row {
  background: #102033;
  border: 1px solid #243b55;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.appraisal-row.is-hq-fav {
  border-color: #eab308;
  background: linear-gradient(135deg, #1b2234, #262013);
}

/* 戦術一時停止ポップアップ＆チュートリアル強調枠 */
.tactical-popup-overlay {
  background: rgba(2, 8, 20, 0.42);
  backdrop-filter: none;
}
.tactical-popup-card {
  position: relative;
  z-index: 176;
  max-width: 600px;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 32px rgba(56, 189, 248, 0.38), 0 18px 42px rgba(0, 0, 0, 0.82);
  background: linear-gradient(180deg, #0d1d31 0%, #091422 100%);
}
.tactical-popup-card.urgent {
  border-color: #ef4444;
  box-shadow: 0 0 36px rgba(239, 68, 68, 0.42), 0 18px 42px rgba(0, 0, 0, 0.78);
}
.tactical-popup-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.tactical-popup-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid #38bdf8;
  color: #7dd3fc;
}
.tactical-popup-card.urgent .tactical-popup-badge {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #fca5a5;
}
.tactical-popup-step {
  font-size: 11.5px;
  font-weight: bold;
  color: #94a3b8;
  font-family: monospace;
}
.tactical-popup-speaker {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #1e3a57;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.tactical-popup-speech {
  flex: 1;
  min-width: 0;
}
.tactical-popup-speaker-name {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 3px;
}
.tactical-popup-quote {
  font-size: 12.5px;
  line-height: 1.55;
  color: #f1f5f9;
}
.tactical-popup-body {
  background: #0b1828;
  border-left: 4px solid #38bdf8;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #cbd5e1;
}
.tactical-popup-body ul {
  margin: 6px 0 0 18px;
  padding: 0;
}
.tactical-popup-body li {
  margin-bottom: 5px;
}
.tactical-popup-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
@keyframes tutPulseBorder {
  0%, 100% { box-shadow: 0 0 0 2px #38bdf8, 0 0 22px rgba(56, 189, 248, 0.72); }
  50% { box-shadow: 0 0 0 4px #7dd3fc, 0 0 34px rgba(125, 211, 252, 0.95); }
}
.tut-highlight {
  position: relative;
  z-index: 20 !important;
  animation: tutPulseBorder 1.35s ease-in-out infinite;
  border-color: #7dd3fc !important;
}

/* エンディング：三国志／信長の野望風 司令官ステータス＆組織通信簿 */
.ending-status-panel {
  display: grid;
  grid-template-columns: 215px 1fr;
  gap: 14px;
  background: linear-gradient(135deg, #0b1829 0%, #121c30 100%);
  border: 1px solid #2b4c73;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  align-items: center;
}
.ending-stat-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}
.ending-stat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}
.ending-stat-label {
  width: 34px;
  font-weight: bold;
  color: #cbd5e1;
}
.ending-stat-track {
  flex: 1;
  height: 8px;
  background: #060d18;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #1e3a57;
}
.ending-stat-fill {
  height: 100%;
  border-radius: 4px;
}
.ending-stat-val {
  width: 28px;
  text-align: right;
  font-family: monospace;
  font-weight: 800;
  color: #fff;
}
.ending-trait-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: bold;
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid #eab308;
  color: #fde047;
  margin-right: 5px;
}
.ending-mgmt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.ending-mgmt-card {
  background: #0c192b;
  border: 1px solid #1e3a57;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11.5px;
}
.hq-fav-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  background: rgba(234, 179, 8, 0.22);
  border: 1px solid #eab308;
  color: #fde047;
  margin-left: 4px;
}
.grade-group {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.grade-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid #334155;
  background: #08121f;
  color: #94a3b8;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s;
}
.grade-btn:hover { border-color: #60a5fa; color: #fff; }
.grade-btn.active.g-S { background: #eab308; color: #0f172a; border-color: #fef08a; }
.grade-btn.active.g-A { background: #22c55e; color: #052e16; border-color: #86efac; }
.grade-btn.active.g-B { background: #38bdf8; color: #082f49; border-color: #bae6fd; }
.grade-btn.active.g-C { background: #f97316; color: #fff; border-color: #fdba74; }
.grade-btn.active.g-D { background: #ef4444; color: #fff; border-color: #fca5a5; }

/* 組織エンゲージメントサーベイ */
.survey-group-box {
  background: #0b1929;
  border: 1px solid #1e3a57;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.survey-group-title {
  font-size: 11px;
  font-weight: bold;
  color: #93c5fd;
  margin-bottom: 6px;
}
.survey-row {
  display: grid;
  grid-template-columns: 115px 1fr 78px;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 11.5px;
}
.survey-bar-bg {
  height: 10px;
  background: #050c15;
  border: 1px solid #1e3a57;
  border-radius: 5px;
  overflow: hidden;
}
.survey-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.3s ease;
}
.survey-voice-card {
  background: #0f1d2e;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  padding: 6px 9px;
  margin-bottom: 6px;
  font-size: 11.5px;
  color: #e2e8f0;
  line-height: 1.45;
}
.survey-voice-card.good { border-left-color: #22c55e; }
.survey-voice-card.danger { border-left-color: #ef4444; }
