/* ================= Chirper Tycoon ================= */
:root {
  --bg: #0b1018;
  --bg2: #141b26;
  --bg3: #1b2635;
  --border: #334155;
  --text: #f1f5f9;
  --muted: #a9b5c5;
  --accent: #48c7f7;
  --surface-highlight: #202d3e;
  --shadow: 0 8px 28px rgba(0, 0, 0, .18);
  --good: #4ade80;
  --bad: #f87171;
  --warn: #fbbf24;
  --gold: #fcd34d;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.65;
  letter-spacing: .01em;
}
.mono { font-family: 'JetBrains Mono', monospace; }
.hidden { display: none !important; }
h1,h2,h3,h4 { font-weight: 700; }

/* ===== タイトル ===== */
#title-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 30% 20%, #16324a 0%, var(--bg) 60%);
  text-align: center; padding: 24px;
}
.title-logo { font-size: 72px; color: var(--accent); margin-bottom: 12px; }
#title-screen h1 { font-size: 52px; font-weight: 900; letter-spacing: 2px; }
.title-sub { color: var(--accent); font-size: 18px; margin: 4px 0 20px; }
.title-desc { color: var(--muted); margin-bottom: 28px; }
.title-desc strong { color: var(--gold); }
.title-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.save-note { color: var(--muted); font-size: 12px; margin-top: 12px; }
.save-note i { color: var(--good); margin-right: 4px; }
.title-tips { margin-top: 36px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 13px; }
.title-tips i { color: var(--accent); width: 20px; }

/* ===== ボタン ===== */
button { font-family: inherit; cursor: pointer; }
.btn-primary {
  background: var(--accent); color: #04263a; border: none; border-radius: 8px;
  padding: 10px 22px; font-size: 15px; font-weight: 700;
  transition: transform .1s, filter .15s;
}
.btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn-primary.big { font-size: 20px; padding: 14px 40px; }
.btn-secondary {
  background: var(--bg3); color: var(--text); border: 1px solid var(--accent); border-radius: 8px;
  padding: 10px 22px; font-size: 15px; font-weight: 700;
  transition: transform .1s, background .15s;
}
.btn-secondary:hover { background: #16324a; transform: translateY(-1px); }
.btn-secondary.big { font-size: 18px; padding: 14px 32px; }
.btn-sm {
  background: var(--bg3); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 12px; font-size: 13px; font-weight: 500;
}
.btn-sm:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-sm:disabled { opacity: .35; cursor: not-allowed; }
.btn-sm.danger:hover:not(:disabled) { border-color: var(--bad); color: var(--bad); }

/* ===== KPIバー ===== */
#kpi-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(20, 27, 38, .96); border-bottom: 1px solid var(--border);
  padding: 10px 18px; position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(0,0,0,.14);
}
.kpi-brand { font-size: 18px; font-weight: 900; color: var(--accent); margin-right: 6px; }
.kpi-item {
  display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px;
  padding: 6px 9px; border: 1px solid transparent; border-radius: 8px;
  background: rgba(255,255,255,.025);
}
.kpi-item i { color: var(--muted); font-size: 13px; }
.kpi-item.warn { color: var(--bad); }
.kpi-item.warn i { color: var(--bad); animation: pulse 1s infinite; }
#time-controls { margin-left: auto; display: flex; gap: 6px; }
#time-controls button {
  width: 36px; height: 32px; background: var(--bg3); color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px;
}
#time-controls button.active { background: var(--accent); color: #04263a; border-color: var(--accent); }

#outage-banner {
  background: linear-gradient(90deg, #7f1d1d, #991b1b); color: #fecaca;
  text-align: center; padding: 8px; font-weight: 700;
  animation: pulse 1.2s infinite;
}
@keyframes pulse { 50% { opacity: .55; } }

/* ===== レイアウト ===== */
#layout { display: grid; grid-template-columns: 200px minmax(520px, 1fr) 390px; min-height: calc(100vh - 54px); }
#side-nav {
  background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 16px 10px; gap: 6px;
  position: sticky; top: 57px; height: calc(100vh - 57px);
}
.nav-btn {
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: none; border: none; color: var(--muted);
  padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 500;
  position: relative;
}
.nav-btn i { width: 18px; text-align: center; }
.nav-btn:hover { background: var(--bg3); color: var(--text); }
.nav-btn.active {
  background: var(--surface-highlight); color: var(--accent); font-weight: 700;
  box-shadow: inset 3px 0 var(--accent);
}
.badge {
  position: absolute; right: 8px; background: var(--bad); color: #fff;
  font-size: 11px; font-style: normal; border-radius: 10px; padding: 1px 7px; font-weight: 700;
}

#tab-content { padding: 24px 28px 48px; overflow-y: auto; max-height: calc(100vh - 57px); }
#log-panel {
  background: #0e151f; border-left: 1px solid var(--border); padding: 0;
  overflow-y: auto; max-height: calc(100vh - 57px);
  position: sticky; top: 57px; height: calc(100vh - 57px);
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.feed-head {
  min-height: 66px; display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px 10px; background: rgba(14,21,31,.94); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 3; backdrop-filter: blur(12px);
}
.feed-head h3 { margin: 1px 0 0; color: var(--text); font-size: 19px; }
.feed-head > i { color: var(--accent); font-size: 18px; }
.feed-kicker { color: var(--muted); font: 700 9px/1 'JetBrains Mono', monospace; letter-spacing: .14em; }
.feed-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(14,21,31,.96);
  border-bottom: 1px solid var(--border); position: sticky; top: 66px; z-index: 3;
}
.feed-tab {
  position: relative; border: 0; background: transparent; color: var(--muted);
  padding: 12px 5px; font-size: 12px; font-weight: 700;
}
.feed-tab:hover { background: rgba(255,255,255,.035); color: var(--text); }
.feed-tab.active { color: var(--text); }
.feed-tab.active::after {
  content: ''; position: absolute; left: 24%; right: 24%; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--accent);
}
#timeline-list { display: flex; flex-direction: column; }
.timeline-post, .news-entry {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px;
  padding: 14px 16px 10px; border-bottom: 1px solid rgba(51,65,85,.75);
  transition: background .15s;
}
.timeline-post:hover, .news-entry:hover { background: rgba(255,255,255,.025); }
.post-avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: var(--avatar-color); font-weight: 900; font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.post-body { min-width: 0; }
.post-author { display: flex; align-items: center; min-width: 0; gap: 4px; font-size: 12px; line-height: 1.3; }
.post-author strong { color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-author > i { color: var(--accent); font-size: 11px; flex: 0 0 auto; }
.post-author span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-text { margin-top: 5px; color: #e8eef5; font-size: 13px; line-height: 1.62; overflow-wrap: anywhere; }
.post-actions { display: flex; justify-content: space-between; max-width: 285px; margin-top: 10px; color: #8190a4; }
.post-actions span { display: inline-flex; align-items: center; gap: 5px; min-width: 42px; font: 500 10.5px/1 'JetBrains Mono', monospace; }
.post-actions i { font-size: 12px; }
.post-actions span:nth-child(1):hover { color: var(--accent); }
.post-actions span:nth-child(2):hover { color: var(--good); }
.post-actions span:nth-child(3):hover { color: #f472b6; }
.news-entry { grid-template-columns: 34px minmax(0, 1fr); background: rgba(27,38,53,.38); padding-top: 12px; padding-bottom: 12px; }
.news-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--bg3); color: var(--accent); }
.news-meta { color: var(--text); font-size: 11px; font-weight: 700; }
.news-meta span { color: var(--muted); font-weight: 400; }
.news-entry p { margin-top: 3px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.news-entry.good .news-icon { color: var(--good); }
.news-entry.bad .news-icon { color: var(--bad); }
.news-entry.gold .news-icon { color: var(--gold); }
.feed-empty { color: var(--muted); text-align: center; padding: 42px 20px; font-size: 12px; }

/* ===== カード ===== */
.card {
  background: linear-gradient(145deg, var(--bg2), #121923); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.card h3 { font-size: 15px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; letter-spacing: .02em; }
.card h3 i { color: var(--accent); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.section-title { font-size: 20px; font-weight: 900; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.section-title i { color: var(--accent); }
.desc { color: var(--muted); font-size: 12.5px; line-height: 1.65; }

/* ===== コミュニティパルス ===== */
.social-pulse {
  display: grid; grid-template-columns: minmax(190px, .7fr) 2.3fr; gap: 20px; align-items: center;
  border-color: #28546b; background: linear-gradient(135deg, #132636 0%, var(--bg2) 62%);
}
.social-pulse h3 { margin: 3px 0 0; font-size: 17px; }
.eyebrow { color: var(--accent); font: 700 10px/1.2 'JetBrains Mono', monospace; letter-spacing: .14em; }
.pulse-grid { display: grid; grid-template-columns: repeat(5, minmax(105px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pulse-stat { min-width: 0; background: #152130; padding: 11px 12px; }
.pulse-stat span, .pulse-stat small { display: block; color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse-stat strong { display: block; color: var(--text); font: 700 16px/1.7 'JetBrains Mono', monospace; white-space: nowrap; }
.pulse-stat small { font-size: 10px; }

/* ===== 統計 ===== */
.stat-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 13px; border-bottom: 1px solid rgba(51,65,85,.55); }
.stat-row .val { text-align: right; }
.stat-row:last-child { border-bottom: none; }
.stat-row .lbl { color: var(--muted); }
.stat-row .val { font-weight: 700; }
.val.good { color: var(--good); } .val.bad { color: var(--bad); } .val.warn { color: var(--warn); }

/* ===== ゲージ ===== */
.gauge { margin: 8px 0; }
.gauge-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.gauge-head .g-val { font-weight: 700; }
.gauge-bar { height: 10px; background: #0a0e14; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.gauge-fill { height: 100%; border-radius: 6px; transition: width .5s; }
.g-ok { background: linear-gradient(90deg, #059669, #4ade80); }
.g-warn { background: linear-gradient(90deg, #d97706, #fbbf24); }
.g-danger { background: linear-gradient(90deg, #b91c1c, #f87171); animation: pulse 1s infinite; }

/* ===== サーバーカード ===== */
.server-card { display: flex; flex-direction: column; gap: 6px; }
.server-head { display: flex; align-items: center; gap: 10px; }
.server-head i { font-size: 20px; color: var(--accent); width: 26px; text-align: center; }
.server-head .sv-name { font-weight: 700; }
.server-head .sv-spec { font-size: 11.5px; color: var(--muted); }
.server-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.server-own { font-size: 13px; }
.server-own b { font-size: 17px; color: var(--accent); }
.server-actions { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.pending-tag { color: var(--warn); font-size: 12px; }

/* ===== ティア選択 ===== */
.tier-list { display: flex; flex-direction: column; gap: 8px; }
.tier-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--bg3); border: 2px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: border-color .15s;
}
.tier-item:hover { border-color: #46587a; }
.tier-item.selected { border-color: var(--accent); background: #12283a; }
.tier-info { flex: 1; }
.tier-name { font-weight: 700; }
.tier-desc { font-size: 12px; color: var(--muted); }
.tier-cost { font-size: 12.5px; color: var(--warn); white-space: nowrap; text-align: right; }
.tier-check { width: 20px; color: var(--accent); font-size: 16px; }

/* ===== スライダー・トグル ===== */
input[type=range] { width: 100%; accent-color: var(--accent); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #232c3d; }
.toggle-row:last-child { border-bottom: none; }
.switch {
  position: relative; width: 46px; height: 24px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; transition: .2s; flex-shrink: 0;
}
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch.on::after { left: 24px; }

/* ===== 人材 ===== */
.staff-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed #232c3d; }
.staff-row:last-child { border-bottom: none; }
.staff-info { flex: 1; }
.staff-name { font-weight: 700; }
.staff-count { font-size: 20px; font-weight: 900; color: var(--accent); min-width: 46px; text-align: center; }
.staff-btns { display: flex; gap: 6px; }
.staff-btns button { width: 32px; height: 32px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--border); color: var(--text); font-size: 16px; }
.staff-btns button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.staff-btns button:disabled { opacity: .3; cursor: not-allowed; }

/* ===== 炎上 ===== */
.incident-card { border: 1px solid #7f1d1d; background: #1c1114; }
.incident-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.incident-head i { font-size: 22px; color: var(--bad); }
.sev-stars { color: var(--warn); letter-spacing: 2px; }
.heat-bar { height: 12px; background: #0a0e14; border-radius: 6px; overflow: hidden; margin: 8px 0; border: 1px solid #3d1b1b; }
.heat-fill { height: 100%; background: linear-gradient(90deg, #f59e0b, #ef4444); transition: width .4s; }
.resp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 10px; }
.resp-btn {
  text-align: left; background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  padding: 10px 12px; border-radius: 8px; font-size: 12.5px;
}
.resp-btn:hover { border-color: var(--warn); }
.resp-btn b { display: block; font-size: 13px; }
.resp-btn .r-cost { color: var(--warn); }
.no-incident { text-align: center; color: var(--muted); padding: 40px 0; }
.no-incident i { font-size: 44px; color: var(--good); margin-bottom: 10px; display: block; }

/* ===== トレンド・ユーザー層 ===== */
.trend-row, .segment-row {
  display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 9px;
  padding: 8px 0; border-bottom: 1px solid rgba(51,65,85,.55);
}
.trend-row:last-child, .segment-row:last-child { border-bottom: 0; }
.trend-rank { color: var(--muted); font: 700 13px 'JetBrains Mono', monospace; text-align: center; }
.trend-row b, .segment-row b { display: block; font-size: 12.5px; }
.trend-row small, .segment-row small { display: block; color: var(--muted); font-size: 10.5px; }
.trend-change { font: 700 10px 'JetBrains Mono', monospace; }
.up { color: var(--good); } .down { color: var(--bad); }
.segment-icon {
  width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center;
  color: var(--segment-color); background: color-mix(in srgb, var(--segment-color) 13%, transparent);
}
.segment-score { font: 700 12px 'JetBrains Mono', monospace; }

/* ===== 世論・バズ・要望 ===== */
.crisis-subnav { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 14px; }
.crisis-subnav span { padding: 5px 10px; border-radius: 20px; background: var(--bg3); color: var(--muted); font-size: 11px; border: 1px solid var(--border); }
.buzz-list { display: grid; gap: 10px; }
.buzz-card { padding: 14px; border-radius: 11px; background: var(--bg3); border: 1px solid var(--border); }
.buzz-card.positive { border-left: 3px solid var(--good); }
.buzz-card.neutral { border-left: 3px solid var(--accent); }
.buzz-card.negative { border-left: 3px solid var(--bad); }
.buzz-top { display: flex; align-items: center; gap: 6px; color: var(--bad); font-size: 10.5px; }
.buzz-top span:last-child { color: var(--muted); margin-left: auto; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 4px rgba(248,113,113,.12); }
.buzz-author { margin-top: 9px; color: var(--text); font-size: 12px; font-weight: 700; }
.buzz-author span { color: var(--accent); font-weight: 500; }
.buzz-card p { margin: 5px 0 10px; font-size: 13px; line-height: 1.65; }
.buzz-metrics { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font: 500 10.5px 'JetBrains Mono', monospace; }
.buzz-metrics i { margin-right: 4px; }
.buzz-actions { display: flex; gap: 7px; margin-top: 11px; }
.quiet-state { color: var(--muted); text-align: center; padding: 18px; background: var(--bg3); border-radius: 10px; font-size: 12px; }
.request-intro { margin: -7px 0 12px; }
.request-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.request-card { padding: 13px; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; }
.request-card.done { opacity: .7; }
.request-head { display: flex; justify-content: space-between; gap: 8px; }
.request-head span { display: block; color: var(--muted); font-size: 9.5px; }
.request-head b { display: block; font-size: 12.5px; }
.request-head strong { color: var(--accent); font: 700 15px 'JetBrains Mono', monospace; }
.request-card p { color: var(--muted); font-size: 11px; margin: 7px 0; min-height: 34px; }
.request-progress { height: 5px; overflow: hidden; background: #0a0e14; border-radius: 4px; }
.request-progress i { display: block; height: 100%; background: linear-gradient(90deg, #0ea5e9, var(--accent)); }
.request-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 9px; color: var(--muted); font-size: 10px; }
.request-foot > div { display: flex; gap: 5px; }
.implemented-tag { color: var(--good); font-weight: 700; }

/* ===== 競合SNS ===== */
.market-hero { display: grid; grid-template-columns: .7fr 1.6fr; gap: 24px; align-items: center; background: linear-gradient(135deg, #172337, var(--bg2)); }
.market-hero h3 { margin: 4px 0 0; }
.market-hero > div > strong { display: block; color: var(--accent); font: 900 38px 'JetBrains Mono', monospace; }
.market-summary { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.market-summary div { background: var(--bg3); padding: 10px 12px; }
.market-summary span, .market-summary b { display: block; }
.market-summary span { color: var(--muted); font-size: 10px; }
.market-summary b { font: 700 13px 'JetBrains Mono', monospace; }
.competitor-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.competitor-card { padding: 15px; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.competitor-brand { display: flex; align-items: center; gap: 9px; }
.competitor-brand > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--competitor-color); background: color-mix(in srgb, var(--competitor-color) 14%, transparent); }
.competitor-brand b, .competitor-brand small { display: block; }
.competitor-brand small { color: var(--muted); font-size: 9.5px; }
.competitor-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin: 13px 0 9px; }
.competitor-stats span, .competitor-stats b { display: block; }
.competitor-stats span { color: var(--muted); font-size: 8.5px; }
.competitor-stats b { font: 700 11px 'JetBrains Mono', monospace; }
.market-bar { height: 5px; border-radius: 5px; background: #0a0e14; overflow: hidden; }
.market-bar i { display: block; height: 100%; background: var(--accent); }
.competitor-change { margin-top: 7px; font-size: 9.5px; text-align: right; }
.campaign-list { display: grid; gap: 4px; }
.campaign-row { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(51,65,85,.5); }
.campaign-row:last-child { border: 0; }
.campaign-icon { width: 34px; height: 34px; display: grid; place-items: center; background: var(--bg3); color: var(--accent); border-radius: 9px; }
.campaign-row b, .campaign-row small { display: block; }
.campaign-row b { font-size: 12.5px; }
.campaign-row small { color: var(--muted); font-size: 10.5px; }
.campaign-active { color: var(--good); font-size: 11px; font-weight: 700; }

/* ===== 成長戦略 ===== */
.strategy-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; padding: 0; overflow: hidden; background: var(--border); }
.strategy-summary > div { padding: 14px; background: var(--bg2); }
.strategy-summary span, .strategy-summary b, .strategy-summary small { display: block; }
.strategy-summary span { color: var(--muted); font-size: 10px; }
.strategy-summary b { margin: 3px 0; font: 700 16px 'JetBrains Mono', monospace; }
.strategy-summary small { color: var(--muted); font-size: 9.5px; }
.strategy-intro { margin: -5px 0 12px; }
.strategy-list { display: grid; gap: 8px; }
.strategy-list.research-list, .strategy-list.acquisition-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.strategy-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg3); transition: border-color .2s, opacity .2s; }
.strategy-card.completed { border-color: rgba(74, 222, 128, .4); }
.strategy-card.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .15); }
.strategy-card.locked { opacity: .58; }
.strategy-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--accent); background: rgba(56, 189, 248, .09); font-size: 16px; }
.strategy-body b, .strategy-body p, .strategy-body small, .effect-line { display: block; }
.strategy-body b { font-size: 12.5px; }
.strategy-body p { margin: 3px 0; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.strategy-body small { color: #9ba8ba; font-size: 9.5px; }
.effect-line { margin-top: 5px; color: var(--accent); font-size: 9.5px; }
.strategy-action { min-width: 92px; text-align: right; }
.strategy-action strong, .strategy-action small { display: block; }
.strategy-action strong { font-size: 12px; }
.strategy-action small { color: var(--warn); font-size: 9px; }
.strategy-action button { margin-top: 6px; }
.status-chip { padding: 5px 8px; border-radius: 999px; white-space: nowrap; font-size: 10px; font-weight: 700; }
.status-chip.done { color: var(--good); background: rgba(74, 222, 128, .1); }
.status-chip.active { color: var(--accent); background: rgba(56, 189, 248, .1); }
.global-risk { display: grid; grid-template-columns: 1fr auto; gap: 3px 14px; margin-top: 12px; padding: 11px 13px; border-radius: 9px; background: rgba(56, 189, 248, .08); }
.global-risk span { font-size: 11px; }
.global-risk b { color: var(--accent); font: 700 13px 'JetBrains Mono', monospace; }
.global-risk small { grid-column: 1 / -1; color: var(--muted); font-size: 9.5px; }
.global-risk.danger { background: rgba(248, 113, 113, .08); }
.global-risk.danger b { color: var(--bad); }
.share-display { display: grid; grid-template-columns: 90px 1fr; gap: 14px; align-items: center; margin-bottom: 10px; }
.share-display > strong { color: var(--accent); font: 900 36px 'JetBrains Mono', monospace; }
.share-display b { font-size: 12px; }
.share-display p { margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.range-labels { display: flex; justify-content: space-between; gap: 5px; margin-top: 5px; color: var(--muted); font-size: 9px; }
.locked-panel { position: relative; opacity: .68; }
.locked-note { margin-top: 9px; color: var(--warn); font-size: 10px; }
.local-feature { display: block; margin-top: 6px; color: #c4b5fd; font-size: 9.5px; }
.strategy-action .status-chip + button { display: block; margin: 8px 0 0 auto; }
.event-title { margin: 18px 0 10px !important; }
.overseas-event { padding: 15px; border: 1px solid #6d5aa8; border-radius: 11px; background: linear-gradient(135deg, rgba(109,90,168,.18), var(--bg3)); }
.event-head { display: flex; align-items: center; gap: 10px; }
.event-head > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #c4b5fd; background: rgba(196,181,253,.1); }
.event-head b, .event-head small { display: block; }
.event-head small { color: var(--muted); font-size: 9.5px; }
.overseas-event > p { margin: 10px 0; color: var(--muted); font-size: 11px; }
.event-choices { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.event-choices button { padding: 10px; text-align: left; color: var(--text); background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; }
.event-choices button:hover:not(:disabled) { border-color: #c4b5fd; }
.event-choices button:disabled { opacity: .4; cursor: not-allowed; }
.event-choices b, .event-choices span, .event-choices small { display: block; }
.event-choices b { font-size: 11px; }
.event-choices span { margin: 3px 0; color: var(--warn); font-size: 9px; }
.event-choices small { color: var(--muted); font-size: 9px; }

/* ===== グラフ ===== */
.chart-box { position: relative; height: 220px; }

/* ===== モーダル ===== */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  max-width: 520px; width: 100%; padding: 28px; text-align: center;
}
.crisis-box { border-color: #b91c1c; box-shadow: 0 0 60px rgba(239,68,68,.35); }
.crisis-box h2 { color: var(--bad); margin-bottom: 14px; }
.modal-box .btn-primary { margin-top: 18px; }
.end-title { font-size: 30px; font-weight: 900; margin-bottom: 10px; }
.end-stats { text-align: left; margin: 16px 0; }

/* ===== 財務テーブル ===== */
.fin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fin-table td { padding: 5px 8px; border-bottom: 1px dashed #232c3d; }
.fin-table td:last-child { text-align: right; font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.fin-table tr.total td { border-top: 2px solid var(--border); border-bottom: none; font-weight: 900; }

/* ===== レスポンシブ ===== */
@media (max-width: 1280px) {
  #layout { grid-template-columns: 64px minmax(500px, 1fr) 350px; }
  .nav-btn span { display: none; }
  .badge { right: 4px; top: 4px; }
  .social-pulse { grid-template-columns: 1fr; }
  .pulse-grid { grid-template-columns: repeat(5, minmax(100px, 1fr)); overflow-x: auto; }
}
@media (max-width: 980px) {
  #layout { grid-template-columns: 64px 1fr; }
  #log-panel { display: none; }
  .competitor-grid { grid-template-columns: 1fr; }
  .strategy-list.research-list, .strategy-list.acquisition-list { grid-template-columns: 1fr; }
  .strategy-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  #kpi-bar { gap: 6px; padding: 8px; font-size: 12px; }
  .kpi-brand { width: 100%; }
  .kpi-item { font-size: 11px; padding: 5px 7px; }
  #time-controls { margin-left: 0; }
  #layout { display: block; }
  #side-nav {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; top: auto; height: 62px;
    flex-direction: row; overflow-x: auto; border: 0; border-top: 1px solid var(--border); padding: 7px;
  }
  .nav-btn { min-width: 48px; justify-content: center; padding: 10px; }
  #tab-content { padding: 14px 12px 82px; max-height: none; overflow: visible; }
  .card { padding: 15px; }
  .card-grid, .request-grid { grid-template-columns: 1fr; }
  .market-hero { grid-template-columns: 1fr; }
  .market-summary { grid-template-columns: 1fr 1fr; }
  .strategy-summary { grid-template-columns: 1fr; }
  .strategy-card { grid-template-columns: 38px minmax(0, 1fr); }
  .strategy-card > button, .strategy-card > .status-chip, .strategy-action { grid-column: 2; justify-self: start; text-align: left; }
  .share-display { grid-template-columns: 1fr; }
  .range-labels { font-size: 8px; }
  .request-foot { align-items: flex-start; flex-direction: column; }
  .request-foot > div { width: 100%; flex-wrap: wrap; }
  .pulse-grid { grid-template-columns: repeat(2, 1fr); }
  .pulse-stat:last-child { grid-column: 1 / -1; }
  .stat-row { align-items: flex-start; }
  .section-title { font-size: 18px; }
}
