/* ============================================
   9697 Capcom — Integrated Report 中文導讀
   局部樣式（沿用 ../hospitality-tech/styles.css 設計系統）
   ============================================ */

/* Capcom brand-ish accent overrides (深藍 + 既有 FT-red) */
:root {
  --cap: #0a2a6b;          /* Capcom 風的深藍 */
  --cap-soft: #e7edf7;
  --cap-deep: #06184a;
  --digi: #b8351c;         /* 數位（沿用 accent red） */
  --amu: #b8761c;          /* 娛樂設施（amber） */
  --other: #5a5a5a;
}

/* ---------- Hero 補強 ---------- */
.ir-kicker {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--cap); font-weight: 600; margin-bottom: var(--s-4);
}
.ir-kicker::before {
  content: ""; width: 26px; height: 2px; background: var(--cap); display: inline-block;
}
.jp { color: var(--ink-light); font-weight: 400; font-size: 0.78em; letter-spacing: 0.02em; }
.section-label .jp { display: block; margin-top: 2px; }

/* ---------- 統計卡（沿用 takara 風） ---------- */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-4); margin-top: var(--s-6);
}
.stat-card {
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: 10px; padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-2);
}
.stat-card.hl { border-color: var(--cap); background: var(--cap-soft); }
.stat-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-value .u { font-size: 0.9rem; font-weight: 600; color: var(--ink-muted); margin-left: 2px; }
.stat-sub { font-size: 0.82rem; color: var(--ink-light); line-height: 1.45; }
.pos { color: var(--success); }

/* ---------- verdict bar ---------- */
.verdict-bar {
  display: flex; flex-wrap: wrap; gap: var(--s-5); margin-top: var(--s-6);
  padding: var(--s-5); background: var(--bg-elevated);
  border: 1px solid var(--line); border-radius: 10px;
}
.verdict { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.verdict-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-light); }
.verdict-value { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.verdict-value.big { font-size: 1.4rem; color: var(--cap); }

/* ---------- 圖表容器 ---------- */
.chart-card {
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: 12px; padding: var(--s-6); margin-top: var(--s-5);
}
.chart-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-4); }
.chart-head h3 { margin: 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: var(--s-4); font-size: 0.82rem; color: var(--ink-muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.swatch.line { height: 3px; border-radius: 2px; }
.chart-wrap { width: 100%; overflow-x: auto; }
.chart-wrap svg { width: 100%; height: auto; display: block; }
.chart-wrap.wide svg { min-width: 700px; }
.chart-note { font-size: 0.8rem; color: var(--ink-light); margin-top: var(--s-3); }

/* SVG primitives */
.bar-sales { fill: var(--cap-soft); }
.bar-op { fill: var(--cap); }
.grid-line { stroke: var(--line); stroke-width: 1; }
.axis-text { fill: var(--ink-light); font-size: 12px; font-family: var(--font-sans); }
.axis-text.bold { fill: var(--ink-muted); font-weight: 600; }
.opm-line { fill: none; stroke: var(--digi); stroke-width: 2.5; }
.opm-dot { fill: #fff; stroke: var(--digi); stroke-width: 2.5; }
.hit-rect { fill: transparent; cursor: pointer; }
.hit-rect:hover + .hover-band, .bar-group:hover { }
.hover-band { fill: var(--cap); opacity: 0; }

/* tooltip */
.tip {
  position: fixed; pointer-events: none; z-index: 100; opacity: 0;
  background: var(--ink); color: #fff; padding: 10px 12px; border-radius: 8px;
  font-size: 0.8rem; line-height: 1.5; transition: opacity 0.12s;
  box-shadow: 0 6px 24px rgba(0,0,0,0.22); min-width: 150px;
}
.tip b { color: #fff; }
.tip .row { display: flex; justify-content: space-between; gap: 14px; }
.tip .k { color: #c9c9c9; }
.tip .dot { display:inline-block; width:8px;height:8px;border-radius:2px;margin-right:5px;}

/* ---------- One Content Multi-Use hub ---------- */
.hub-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s-6); align-items: center; }
.ip-node { cursor: pointer; }
.ip-node circle { transition: all 0.15s; }
.ip-node:hover circle, .ip-node.active circle { stroke: var(--cap); stroke-width: 3; }
.ip-node.active circle { fill: var(--cap); }
.ip-node.active text { fill: #fff; }
.ip-node text { font-family: var(--font-sans); font-size: 13px; font-weight: 600; fill: var(--ink); pointer-events: none; }
.hub-center circle { fill: var(--cap); }
.hub-center text { fill: #fff; font-weight: 700; pointer-events: none; }
.spoke { stroke: var(--line-strong); stroke-width: 1.5; }
.ip-info {
  background: var(--bg-subtle); border: 1px solid var(--line); border-radius: 10px;
  padding: var(--s-5); min-height: 220px;
}
.ip-info h4 { color: var(--cap); margin-bottom: var(--s-2); text-transform: none; letter-spacing: 0; font-size: 1.1rem; }
.ip-info .ip-jp { font-size: 0.8rem; color: var(--ink-light); margin-bottom: var(--s-3); }
.ip-info ul { margin: var(--s-3) 0 0; padding-left: 1.1em; }
.ip-info li { margin-bottom: 4px; font-size: 0.9rem; }

/* ---------- 切換鈕 ---------- */
.seg-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg-toggle button {
  border: none; background: var(--bg-elevated); padding: 7px 14px; cursor: pointer;
  font-family: var(--font-sans); font-size: 0.85rem; color: var(--ink-muted); font-weight: 600;
  border-right: 1px solid var(--line);
}
.seg-toggle button:last-child { border-right: none; }
.seg-toggle button.active { background: var(--cap); color: #fff; }

/* ---------- 數位長尾對照 ---------- */
.longtail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: var(--s-4); margin-top: var(--s-5); }
.lt-card { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 10px; padding: var(--s-5); }
.lt-card .era { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-light); margin-bottom: 6px; }
.lt-bar-track { height: 12px; background: var(--bg-subtle); border-radius: 6px; overflow: hidden; margin: var(--s-3) 0; }
.lt-bar-fill { height: 100%; background: var(--cap); border-radius: 6px; }

/* ---------- donut legend ---------- */
.donut-layout { display: grid; grid-template-columns: 320px 1fr; gap: var(--s-6); align-items: center; }
.donut-legend { display: flex; flex-direction: column; gap: var(--s-3); }
.donut-legend .item { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border-radius: 8px; background: var(--bg-subtle); }
.donut-legend .item .sw { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.donut-legend .item .lbl { flex: 1; }
.donut-legend .item .lbl b { display: block; }
.donut-legend .item .lbl small { color: var(--ink-light); }
.donut-legend .item .val { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.1rem; }

/* ---------- 管理層 / 治理 ---------- */
.mgmt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: var(--s-4); margin-top: var(--s-5); }
.person-card { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 10px; padding: var(--s-5); }
.person-card .role { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--cap); font-weight: 700; }
.person-card h3 { margin: 4px 0 2px; }
.person-card .born { font-size: 0.82rem; color: var(--ink-light); margin-bottom: var(--s-3); }
.person-card p { font-size: 0.9rem; margin: 0; }

.quote-card { border-left: 3px solid var(--cap); padding: var(--s-3) var(--s-5); margin: var(--s-5) 0; background: var(--bg-subtle); border-radius: 0 8px 8px 0; }
.quote-card .q { font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; line-height: 1.5; color: var(--ink); margin-bottom: var(--s-2); }
.quote-card .q-jp { font-size: 0.82rem; color: var(--ink-light); }
.quote-card .q-by { font-size: 0.85rem; color: var(--ink-muted); margin-top: var(--s-2); }

/* flags / risks */
.flag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: var(--s-4); margin-top: var(--s-5); }
.flag-card { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 10px; padding: var(--s-5); border-top: 3px solid var(--warning); }
.flag-card.pos { border-top-color: var(--success); }
.flag-card h4 { text-transform: none; letter-spacing: 0; color: var(--ink); margin-bottom: var(--s-2); font-size: 1rem; }
.flag-card p { font-size: 0.88rem; margin: 0; color: var(--ink-muted); }
.flag-tag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.flag-tag.warn { color: var(--warning); }
.flag-tag.good { color: var(--success); }

/* ---------- 章節導讀卡（整合報告書目錄映射） ---------- */
.toc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: var(--s-4); margin-top: var(--s-5); }
.toc-card { display: block; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 10px; padding: var(--s-5); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.toc-card:hover { border-color: var(--cap); transform: translateY(-2px); text-decoration: none; }
.toc-card .ch { font-size: 0.75rem; color: var(--cap); font-weight: 700; letter-spacing: 0.04em; }
.toc-card h4 { text-transform: none; letter-spacing: 0; color: var(--ink); margin: 6px 0 4px; font-size: 1.05rem; }
.toc-card p { font-size: 0.84rem; color: var(--ink-muted); margin: 0; }

/* sources */
.src-list { columns: 2; column-gap: var(--s-6); font-size: 0.82rem; color: var(--ink-muted); }
.src-list li { margin-bottom: 6px; break-inside: avoid; }

/* responsive */
@media (max-width: 820px) {
  .hub-layout, .donut-layout { grid-template-columns: 1fr; }
  .src-list { columns: 1; }
}
