/* 談合カード 観戦ビューア — テーマ対応CSS（ダーク既定 / ライト切替） */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* テーマ変数（ダーク既定値） */
:root {
  --bg: #1a1a2e;            --surface: #16213e;      --surface-2: #12172a;
  --input-bg: #0f3460;      --border: #0f3460;       --border-accent: #533483;
  --accent: #e94560;        --text: #e0e0e0;         --text-secondary: #a0a0c0;
  --text-muted: #808090;    --text-content: #c0c0e0; --text-meta: #606080;
  --text-strong: #e6e6f5;   --text-soft: #b0b0d0;    --sub: #8888aa;
  --cash: #ffd479;          --pid-alt: #ff6b6b;      --action-type: #4fc3f7;
  --phase-text: #d0d0f0;    --overlay: rgba(0,0,0,0.7);
  --text-danger: #ef5350;
}

/* ライトテーマ上書き（html付きで詳細度を上げ、後方の :root 再定義に勝たせる） */
html[data-theme="light"] {
  --bg: #eef0f5;           --surface: #ffffff;       --surface-2: #e7eaf2;
  --input-bg: #dfe3ee;     --border: #c8cde0;        --border-accent: #9a86c8;
  --accent: #d5285f;       --text: #23252e;          --text-secondary: #55596a;
  --text-muted: #7a7f90;   --text-content: #3a3d4d;  --text-meta: #9096a8;
  --text-strong: #1c1e28;  --text-soft: #4a4d5e;     --sub: #6b6f82;
  --cash: #a9791f;         --pid-alt: #d5285f;       --action-type: #0277bd;
  --phase-text: #ffffff;   --overlay: rgba(0,0,0,0.45);
  --text-danger: #c62828;
  /* 実況席もライト化 */
  --commentary-bg: #e7eaf2;             --commentary-border: #c8cde0;
  --commentary-bubble-zundamon: #d9f2d9; --commentary-bubble-metan: #f0ddf5;
  --commentary-text: #23252e;
  --commentary-name-zundamon: #2e7d32;   --commentary-name-metan: #8e24aa;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
}

/* ヘッダ */
.header {
  background: var(--surface);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.header h1 { font-size: 16px; color: var(--accent); white-space: nowrap; }
.header .home-link {
  font-size: 12px; color: var(--text-muted); text-decoration: none;
  border: 1px solid var(--border); border-radius: 4px; padding: 3px 8px;
  white-space: nowrap; line-height: 1;
}
.header .home-link:hover { border-color: var(--accent); color: var(--text); }
.header select {
  background: var(--input-bg); color: var(--text); border: 1px solid var(--border-accent);
  padding: 4px 8px; border-radius: 4px; font-size: 13px;
}
.header .stats {
  font-size: 14px; color: var(--text-secondary); display: flex; gap: 16px;
}
.header .stats span { white-space: nowrap; }
.header label { font-size: 12px; color: var(--text-muted); cursor: pointer; }
.theme-toggle {
  background: var(--input-bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 8px; cursor: pointer; font-size: 15px; line-height: 1;
}
.theme-toggle:hover { border-color: var(--accent); }

/* グリッド */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 8px;
  padding: 8px;
}

/* パネル */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.2s;
  min-height: 120px;
}
.panel:hover { border-color: var(--accent); }
.panel.eliminated { opacity: 0.6; }
.panel .pid { font-size: 18px; font-weight: bold; color: var(--accent); }
.panel .model { font-size: 11px; color: var(--text-muted); margin-left: 8px; }
.panel .badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: bold; margin-left: 8px;
  white-space: nowrap;
}
.badge.alive { background: #1b5e20; color: #a5d6a7; }
.badge.eliminated { background: #b71c1c; color: #ef9a9a; }
.badge.thinking { background: #e65100; color: #ffcc80; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.panel .strategy {
  font-size: 12px; color: var(--text-soft); margin-top: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.panel .stats-row {
  font-size: 10px; color: var(--text-muted); margin-top: 6px;
  display: flex; justify-content: space-between; align-items: center;
}
.panel .stats-row .stats-left { display: flex; gap: 8px; flex-wrap: wrap; }
.panel .stats-row .stats-left span { white-space: nowrap; }
.panel .stats-row .stats-cost { white-space: nowrap; }

/* フッタ（最新メッセージ） */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 8px 20px;
  font-size: 12px; color: var(--text-secondary);
  max-height: 80px; overflow-y: auto;
}
.footer .msg { margin: 2px 0; }
.footer .sender { color: var(--accent); font-weight: bold; }

/* 詳細モーダル */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--overlay); z-index: 100;
}
.modal-overlay.active { display: flex; justify-content: center; align-items: flex-start; padding-top: 40px; }
.modal {
  background: var(--bg); border: 1px solid var(--border-accent); border-radius: 8px;
  width: 90%; max-width: 700px; max-height: 80vh; overflow-y: auto; padding: 16px;
}
.modal h2 { font-size: 16px; color: var(--accent); margin-bottom: 12px; }
.modal .close { float: right; cursor: pointer; color: var(--accent); font-size: 20px; }
.modal .timeline-item {
  border-left: 2px solid var(--border); padding: 4px 0 4px 12px; margin: 4px 0;
  font-size: 12px;
}
.modal .timeline-item .phase-badge {
  display: inline-block; padding: 1px 6px; border-radius: 8px;
  font-size: 10px; background: var(--border-accent); color: var(--phase-text); margin-right: 6px;
}
.modal .timeline-item .action-type { color: var(--action-type); font-weight: bold; }
.modal .timeline-item .content { color: var(--text-content); margin-top: 2px; }
.modal .timeline-item .meta { color: var(--text-meta); font-size: 10px; }
.modal .reasoning {
  background: var(--input-bg); padding: 6px; border-radius: 4px;
  font-size: 11px; color: var(--text-secondary); margin-top: 4px; cursor: pointer;
  max-height: 40px; overflow: hidden; transition: max-height 0.3s;
}
.modal .reasoning.expanded { max-height: 300px; overflow-y: auto; }

/* プレイヤー詳細: ラウンド表示 / 生ログ */
.detail-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.detail-tab, .round-nav-btn, .round-jump {
  background: var(--input-bg); color: var(--text-secondary); border: 1px solid var(--border);
  border-radius: 4px; padding: 5px 9px; cursor: pointer;
}
.detail-tab { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.detail-tab.active, .round-jump.active { background: var(--border-accent); color: var(--phase-text); font-weight: bold; }
.round-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.round-jumps { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.round-jump { font-size: 11px; padding: 3px 6px; }
.round-nav-btn:disabled { opacity: .45; cursor: default; }
.detail-section { border: 1px solid var(--border); border-radius: 6px; padding: 10px; margin: 10px 0; }
.detail-section h3 { color: var(--accent); font-size: 13px; margin: 0 0 8px; }
.memory-start { border-left: 3px solid #4c84c4; }
.memory-end { border-left: 3px solid #8a63b8; }
.detail-call { border-top: 1px solid var(--border); padding: 8px 0; font-size: 12px; }
.detail-call:first-of-type { border-top: 0; padding-top: 0; }
.detail-meta, .detail-thinking, .detail-muted, .detail-empty { color: var(--text-meta); font-size: 11px; margin-top: 4px; }
.detail-error { color: #ef9a9a; margin-top: 5px; }
.detail-full-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow-y: auto; margin: 6px 0 0; padding: 8px; background: var(--input-bg); color: var(--text-secondary); font: inherit; font-size: 12px; }
.detail-disclosure summary { cursor: pointer; color: var(--text-content); margin-top: 6px; }
.detail-result { color: var(--text-secondary); font-size: 12px; line-height: 1.55; }
.detail-loading { color: var(--text-secondary); padding: 18px 0; text-align: center; }
.god-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: -4px 0 8px; }
.god-toggle { background: #52212a; color: #fff; border: 1px solid #db6675; border-radius: 4px; padding: 5px 8px; cursor: pointer; }
.god-status { color: var(--text-meta); font-size: 12px; }
#god-token-input { background: var(--input-bg); border: 1px solid #db6675; color: var(--text); border-radius: 4px; padding: 5px 7px; min-width: 160px; }
.god-banner { background: #641f2a; border: 2px solid #ef8c98; border-radius: 5px; color: #fff; font-weight: bold; padding: 8px; margin: 6px 0 10px; }
/* God UI をヘッダー内に常設配置（Viewer全体で1回だけ認証し使い回すため、
   従来のモーダル内配置用マージンを打ち消して右寄せする）。*/
.header .god-controls { margin: 0 0 0 auto; }
/* ヘッダー直下・#player-gridの前に全幅バーとして表示するgod-banner */
body > .god-banner { margin: 0; border-radius: 0; text-align: center; }
.visibility-label { display: inline-block; border-radius: 3px; font-size: 11px; font-weight: bold; padding: 2px 5px; margin-right: 4px; }
.visibility-public { border-left: 4px solid #5d91c9; background: color-mix(in srgb, #3b638b 18%, transparent); }
.visibility-secret { border-left: 4px solid #dd6675; background: color-mix(in srgb, #852d3a 20%, transparent); }
.visibility-public .visibility-label { background: #345f87; color: #fff; }
.visibility-secret .visibility-label { background: #8b2f3d; color: #fff; }
.detail-call.visibility-public, .detail-call.visibility-secret { padding: 8px; margin: 6px 0; border-top: 0; }
.secret-section { border-color: #dd6675; background: color-mix(in srgb, #852d3a 12%, transparent); }
/* D5: delivery（delivered/rejected/unverified）バッジ。
   'unverified'を'rejected'と混同表示しないよう色を明確に分ける
   （脱落済みプレイヤー宛DMが「送れた」ように見えていた元バグの再発防止）。*/
.delivery-badge { display: inline-block; border-radius: 3px; font-size: 11px; font-weight: bold; padding: 2px 5px; margin-left: 2px; }
.delivery-badge.delivery-delivered { background: #2f7d4f; color: #fff; }
.delivery-badge.delivery-rejected { background: #b5482a; color: #fff; }
.delivery-badge.delivery-unverified { background: #6b6b6b; color: #fff; }
/* 受信DM（選手詳細モーダルでその選手が受け取ったDM）。
   送信=緑 / 受信=青。青は .visibility-public .visibility-label と同じ #345f87 を
   再利用してテーマから浮かないようにする。 */
.delivery-badge.delivery-received { background: #345f87; color: #fff; }
.sit-msg.msg-rejected { opacity: 0.85; border-left: 3px solid #b5482a; padding-left: 4px; }
.sit-msg.msg-unverified { opacity: 0.85; border-left: 3px solid #6b6b6b; padding-left: 4px; }
.detail-call.msg-rejected { border-left: 3px solid #b5482a; }
.detail-call.msg-unverified { border-left: 3px solid #6b6b6b; }
.detail-warn { display: block; color: #e08a5c; font-size: 11px; margin-top: 2px; }
.final-reflection { border-left: 3px solid #c98a3e; }
.final-reflection-emotion { margin-bottom: 6px; }
.final-reflection-emotion .emotion-img { width: 36px; height: 36px; vertical-align: middle; }

@media (max-width: 540px) {
  .modal { width: 96%; padding: 12px; }
  .round-nav { font-size: 12px; }
  .detail-full-text { max-height: 210px; }
}

/* === 実況席 === */
:root {
  --commentary-height: 28vh;
  --commentary-bg: #12172a;
  --commentary-border: #0f3460;
  --commentary-bubble-zundamon: #1a3a1a;
  --commentary-bubble-metan: #2a1a3a;
  --commentary-text: #e0e0e0;
  --commentary-name-zundamon: #7bcc7b;
  --commentary-name-metan: #cc7bcc;
  --commentary-chara-size: 80px;
  --commentary-font-size: 14px;
  --commentary-speaking-glow: 0 0 12px rgba(233, 69, 96, 0.6);
}

.commentary-area {
  background: var(--commentary-bg);
  border-top: 2px solid var(--commentary-border);
  height: var(--commentary-height);
  display: flex;
  flex-direction: column;
}
.commentary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--commentary-border);
  flex-shrink: 0;
}
.commentary-title {
  font-size: 13px;
  font-weight: bold;
  color: var(--accent);
}
.commentary-round-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.commentary-round-nav button {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 12px;
}
.commentary-round-nav button:hover { background: var(--border-accent); }
#commentary-round-label {
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
  min-width: 32px;
  text-align: center;
}
.commentary-btn {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  padding: 2px 10px;
  cursor: pointer;
  font-size: 12px;
}
.commentary-btn:hover { background: var(--border-accent); }

.commentary-body {
  display: flex;
  flex: 1;
  min-height: 0;
}
.commentary-chara {
  width: var(--commentary-chara-size);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  flex-shrink: 0;
  transition: box-shadow 0.3s;
}
.commentary-chara.speaking {
  box-shadow: var(--commentary-speaking-glow);
}
.chara-img {
  font-size: 36px;
  line-height: 1;
}
.chara-img img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.chara-name {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 4px;
  text-align: center;
}
.commentary-zundamon .chara-name { color: var(--commentary-name-zundamon); }
.commentary-metan .chara-name { color: var(--commentary-name-metan); }

.commentary-lines {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.commentary-line {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: var(--commentary-font-size);
  color: var(--commentary-text);
  max-width: 90%;
  line-height: 1.5;
}
.line-zundamon {
  background: var(--commentary-bubble-zundamon);
  align-self: flex-start;
  border-left: 3px solid var(--commentary-name-zundamon);
}
.line-metan {
  background: var(--commentary-bubble-metan);
  align-self: flex-end;
  border-right: 3px solid var(--commentary-name-metan);
  text-align: right;
}
.line-name {
  font-size: 11px;
  font-weight: bold;
  display: block;
  margin-bottom: 2px;
}
.line-zundamon .line-name { color: var(--commentary-name-zundamon); }
.line-metan .line-name { color: var(--commentary-name-metan); }

/* 感情表示 */
.emotion-icon { font-size: 1.6em; vertical-align: middle; margin-left: 4px; }
.emotion-icon .emotion-img { width: 28px; height: 28px; vertical-align: middle; }
.emotion-history { font-size: 0.8em; letter-spacing: 2px; color: var(--sub); margin: 2px 0; }
.emotion-history .emotion-img { width: 16px; height: 16px; vertical-align: middle; }
.emotion-badge { font-size: 1.1em; margin-right: 2px; }
.emotion-badge .emotion-img { width: 20px; height: 20px; vertical-align: middle; }

/* 発言カードの感情（本文より先に目に入るサイズ）。色は付けず、
   visibility-* / msg-rejected / msg-unverified の既存配色を優先する */
.emotion-lead { display: inline-flex; align-items: center; gap: 4px;
                vertical-align: middle; margin-right: 6px; }
.emotion-lead .emotion-img { width: 44px; height: 44px; border-radius: 8px; }
.emotion-lead .emotion-word { font-size: 1.25em; font-weight: bold; line-height: 1; }

/* パネル改善: 大きい感情画像・モデル名・純資産・内訳・最終発言 */
.panel-top { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 6px; }
.emotion-big { flex: 0 0 88px; line-height: 1; }
.emotion-big .emotion-img { width: 88px; height: 88px; border-radius: 10px; vertical-align: middle; }
.panel-id { min-width: 0; flex: 1; }
.model-large { font-size: 1.1em; font-weight: bold; color: var(--text-strong); line-height: 1.2; }
.panel-sub { font-size: 0.78em; color: var(--sub); margin: 1px 0; }
.panel-sub .pid { color: var(--pid-alt); font-weight: bold; margin-right: 4px; }
.panel-sub .seat { margin-right: 6px; }
.net-asset { font-size: 19px; font-weight: 500; color: var(--cash); margin-top: 4px; letter-spacing: -0.02em; }
.finance-detail { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
.finance-detail .debt-val { color: var(--text-danger); }
.last-utterance {
  font-size: 0.85em; color: var(--text-soft); margin: 4px 0; font-style: italic;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ルール解説セクション */
.rules {
  max-width: 1400px; margin: 16px auto 40px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text);
}
.rules > summary {
  cursor: pointer; padding: 12px; font-size: 16px; font-weight: bold;
  color: var(--accent); list-style: none;
}
.rules > summary::-webkit-details-marker { display: none; }
.rules-body {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px; padding: 0 12px 16px;
}
.rules-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 10px 12px;
}
.rules-card h4 { margin: 0 0 6px; color: var(--accent); font-size: 14px; }
.rules-card p, .rules-card li { color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.rules-card b { color: var(--text); }
.rules-card ul { margin: 4px 0 0; padding-left: 18px; }
.rules-cards {
  list-style: none; padding: 0; margin: 6px 0 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 12px;
  font-family: monospace; font-size: 12px;
}

/* ラウンド状況セクション */
.situation {
  max-width: 1400px; margin: 16px auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; color: var(--text);
}
.situation-header {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.situation-title { font-weight: bold; color: var(--accent); }
.situation-round-nav { display: flex; align-items: center; gap: 8px; }
.situation-round-nav button {
  background: var(--input-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 4px; cursor: pointer; padding: 2px 10px; font-size: 14px;
}
.situation-round-nav button:hover { border-color: var(--accent); }
.situation-round-nav span { font-weight: bold; min-width: 34px; text-align: center; }
.situation-body {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px; padding: 12px;
}
.sit-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 10px 12px;
}
.sit-card-wide { grid-column: 1 / -1; }
.sit-card h4 { color: var(--accent); font-size: 13px; margin: 0 0 6px; }
.sit-row { font-size: 12.5px; color: var(--text-secondary); line-height: 1.7; padding: 1px 0; }
.sit-row b { color: var(--text); }
.sit-muted { color: var(--text-muted); }
.card-chip {
  display: inline-block; padding: 1px 6px; margin: 1px; border-radius: 4px;
  background: var(--input-bg); color: var(--text); font-family: monospace; font-size: 11px;
}
.sit-win { color: var(--cash); font-weight: bold; }
.sit-surge { color: #ff6b35; font-weight: bold; font-size: 0.85em; }
.sit-carry { color: #4a9eff; font-weight: bold; font-size: 0.85em; }
.sit-ok { color: #5cc98a; font-weight: bold; }
.sit-debt { color: var(--pid-alt); }
.sit-elim { color: var(--text-muted); }
/* v0.10サイクル10.2: 首位公示（IDのみの目印。金額・順位を追加表示するものではない） */
.sit-crown { font-size: 0.95em; }
/* v0.10サイクル10.3: 自己順位通知（本人にのみ届く秘匿情報。god視点限定表示） */
.sit-rank { color: var(--text-muted); font-size: 0.85em; }
/* A-7: AUTO COMMIT / AUTO COMMIT失敗 の視覚的区別（神視点のみ）。
   「本人が約束を破った」のではなく「システムが代行した/合法な提出が
   1つも無かった」ことを一目で判別できるようにする。 */
.auto-badge {
  display: inline-block; padding: 1px 6px; margin-left: 4px; border-radius: 4px;
  background: #6b5b1f; color: #ffe08a; font-size: 10.5px; font-weight: bold;
}
.auto-badge-failure { background: #7a2b2b; color: #ffb3b3; }
.sit-msg { padding: 2px 0; font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }
.sit-msg b { color: var(--text); }
.sit-msg.dm { color: var(--action-type); }
.sit-msg .arrow { color: var(--text-muted); }
/* 公正証書の締結条件 */
.sit-contract { padding: 4px 0; border-top: 1px dashed var(--border); }
.sit-contract:first-child { border-top: none; }
.ob-list { margin: 4px 0 2px; padding-left: 4px; list-style: none; }
.ob-list li { padding: 2px 0; font-size: 12.5px; color: var(--text); line-height: 1.5; }
.ob-tag { display: inline-block; padding: 0 5px; margin-right: 4px; border-radius: 3px;
  font-size: 11px; font-weight: bold; border: 1px solid; }
.ob-a { color: var(--cash); border-color: var(--cash); }          /* 型A=金銭 */
.ob-b { color: var(--action-type); border-color: var(--action-type); } /* 型B=行動 */
.ob-c { color: #8a5cf6; border-color: #8a5cf6; }                   /* 型C=条件付き金銭（v0.10） */
.ob-round { color: var(--text-muted); font-size: 11px; margin-left: 4px; }
.ob-none { font-size: 12px; padding: 2px 0; }
.ob-unknown { color: #b0763a; font-style: italic; }
.oc-ok { color: #4caf50; }
.oc-ng { color: #e05a5a; }
.oc-none { color: var(--text-muted); }                             /* 型C不成立（v0.10、失敗ではない） */
.ct-meta { font-size: 12px; opacity: .8; margin: 4px 0; }
.ct-label { font-size: 11px; font-weight: bold; opacity: .7; margin-top: 6px; }
.ct-active { color: #4caf50; }
.ct-pending { color: #999; }
.ct-cancelled { color: #b5482a; font-weight: bold; }
.ct-card-cancelled { opacity: 0.7; }
.ct-raw > summary { cursor: pointer; font-size: 11px; opacity: .6; margin-top: 6px; }

/* コスト内訳モーダル */
.cost-modal { max-width: 850px; }
.cost-modal h3 { font-size: 14px; color: var(--accent); margin: 14px 0 6px; }
.cost-table {
  width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 8px;
}
.cost-table th {
  text-align: left; padding: 4px 8px; border-bottom: 2px solid var(--border);
  color: var(--text-secondary); font-weight: 600; font-size: 11px;
}
.cost-table td { padding: 3px 8px; border-bottom: 1px solid var(--border); }
.cost-table .num { text-align: right; font-family: monospace; }
.cost-table .total-row td { border-top: 2px solid var(--border-accent); }
.cost-table .thinking-col { color: #ff9800; }
.cost-total {
  text-align: right; font-size: 14px; margin-top: 10px; color: var(--cash);
}
.thinking-badge {
  font-size: 10px; color: #ff9800; margin-left: 2px; white-space: nowrap;
}
#cost-info:hover { text-decoration: underline; color: var(--cash); }
