/* ==========================================================================
   TokyoCX — tokyocx.com  共通スタイル
   設計正本: sagyou/design/claudedesign_brief_tokyocx.json
   ClaudeDesign モック: sagyou/design/TokyoCX Home Board.dc.html
   方針: 素のCSS(ビルド工程なし)。ダーク既定 + ライト切替。外部リソース読み込みなし。
   ========================================================================== */

/* --- 1. トークン ---------------------------------------------------------- */
:root {
  /* ダーク(既定) */
  --bg:            #0A0D11;
  --surface-1:     #0E1116;
  --surface-2:     #151B23;
  --surface-3:     #131A22;
  --surface-sunk:  #0B0F14;
  --line:          #26303C;
  --line-soft:     #222B36;
  --line-strong:   #2E3946;

  --text:          #E8EDF2;
  --text-2:        #C7D2DD;
  --text-muted:    #9AA7B4;
  --text-dim:      #7C8A99;  /* 本文用の最小コントラスト(AA適合) */
  --text-deco:     #5C6B7A;  /* 装飾のみ。文章には使わない */

  --accent:        #E3A82B;
  --accent-hover:  #F2C05A;
  --accent-weak:   rgba(227, 168, 43, 0.07);
  --accent-2:      #3E63DD;
  --accent-2-text: #A9BCF5;
  --accent-2-weak: rgba(62, 99, 221, 0.08);
  --accent-2-bg:   #1B2338;

  --up:            #4CCB86;
  --down:          #F0575C;

  --radius:        6px;   /* 2026-08-26 放送局UIの計器面に揃えて 10→6 */
  --radius-sm:     3px;
  --radius-pill:   999px;

  --font-sans: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
               "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
               "Roboto Mono", "Noto Sans Mono", monospace;

  --wrap:      1440px;
  --wrap-read: 46rem;   /* 記事本文: 全角38〜42字相当 */

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg:            #F4F2EC;
  --surface-1:     #FAF9F6;
  --surface-2:     #FFFFFF;
  --surface-3:     #F3F1EA;
  --surface-sunk:  #EDEAE1;
  --line:          #DDD9CE;
  --line-soft:     #E7E4DA;
  --line-strong:   #CFCABC;

  --text:          #1B242F;
  --text-2:        #2E3A47;
  --text-muted:    #566475;
  --text-dim:      #5C6B7A;
  --text-deco:     #8A94A1;

  --accent:        #9A6F12;   /* 白地でAA適合させた金 */
  --accent-hover:  #7E5A0C;
  --accent-weak:   rgba(227, 168, 43, 0.16);
  --accent-2:      #2E4CBF;
  --accent-2-text: #2A4099;
  --accent-2-weak: rgba(62, 99, 221, 0.09);
  --accent-2-bg:   #E8ECFB;

  --up:            #15803D;
  --down:          #C0272D;

  color-scheme: light;
}

/* 配色の既定はダーク(計器盤としての識別性を優先するデザイン判断)。
   ライトは利用者がヘッダーの切替で選んだときだけ適用し、選択は localStorage に残す。
   OS設定に追従させたい場合は、下のブロックのコメントを外す。
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F4F2EC; --surface-1: #FAF9F6; --surface-2: #FFFFFF; --surface-3: #F3F1EA;
    --surface-sunk: #EDEAE1; --line: #DDD9CE; --line-soft: #E7E4DA; --line-strong: #CFCABC;
    --text: #1B242F; --text-2: #2E3A47; --text-muted: #566475; --text-dim: #5C6B7A; --text-deco: #8A94A1;
    --accent: #9A6F12; --accent-hover: #7E5A0C; --accent-weak: rgba(227,168,43,0.16);
    --accent-2: #2E4CBF; --accent-2-text: #2A4099; --accent-2-weak: rgba(62,99,221,0.09); --accent-2-bg: #E8ECFB;
    --up: #15803D; --down: #C0272D;
    color-scheme: light;
  }
}
*/

/* --- 2. リセットと土台 ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; line-height: 1.4; letter-spacing: 0.01em; }
p { margin: 0; }
img, svg { max-width: 100%; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  padding: 10px 16px; background: var(--surface-2); border: 1px solid var(--accent);
  border-radius: var(--radius-sm); color: var(--text); text-decoration: none;
  transition: top .12s ease;
}
.skip-link:focus { top: 8px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 数字は必ず等幅・桁揃え */
.num, .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* --- 3. レイアウト ------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }

.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }

.card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 14px 16px 10px;
}
.card-head h2, .card-head h3 { font-size: 14px; }
.card-body { padding: 0 16px 16px; }
.card-foot {
  padding: 10px 16px; border-top: 1px solid var(--line);
  background: var(--surface-3); font-size: 12px; color: var(--text-dim); line-height: 1.6;
  border-radius: 0 0 var(--radius) var(--radius);
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

/* ボードの2カラム(本体 + 右サイド) */
.board-cols { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 1080px) {
  .board-cols { grid-template-columns: minmax(0, 1fr) 372px; gap: 20px; }
}

/* --- 4. 免責バー / ヘッダー / ナビ ---------------------------------------- */
.disclaimer-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 16px; background: var(--surface-3); border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--text-dim); line-height: 1.5;
}
.disclaimer-strip .sub { display: none; }
@media (min-width: 768px) {
  .disclaimer-strip { padding: 7px 24px; }
  .disclaimer-strip .sub { display: inline; }
}

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface-1); border-bottom: 1px solid var(--line);
}
.site-header .inner {
  display: flex; align-items: center; gap: 16px;
  max-width: var(--wrap); margin: 0 auto; padding: 10px 16px;
}
@media (min-width: 768px) { .site-header .inner { padding: 12px 24px; gap: 24px; } }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: 0 0 auto; }
.brand:hover { color: var(--text); }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; display: block; }
.brand-name { font-size: 14px; font-weight: 650; letter-spacing: 0.14em; white-space: nowrap; }
@media (min-width: 768px) { .brand-name { font-size: 15px; } }

.nav { display: none; }
@media (min-width: 1080px) {
  .nav { display: flex; align-items: center; gap: 2px; }
  .nav a {
    padding: 8px 12px; border-radius: var(--radius-sm);
    font-size: 13.5px; color: var(--text-muted); text-decoration: none; white-space: nowrap;
  }
  .nav a:hover { color: var(--text); background: var(--surface-2); }
  .nav a[aria-current="page"] {
    color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong);
  }
}

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.search-box {
  display: none; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.search-box input {
  flex: 1; min-width: 0; width: 180px; background: transparent; border: 0; outline: none;
  color: var(--text); font-size: 13px; font-family: inherit;
}
@media (min-width: 1080px) { .search-box { display: flex; } }

.theme-toggle {
  display: flex; height: 36px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.theme-toggle button {
  display: flex; align-items: center; padding: 0 10px; border: 0; border-radius: 4px;
  background: transparent; color: var(--text-muted); font-size: 12px; font-family: inherit; cursor: pointer;
}
.theme-toggle button[aria-pressed="true"] { background: var(--line); color: var(--text); }

.nav-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 16px; cursor: pointer;
}
@media (min-width: 1080px) { .nav-toggle { display: none; } }

.nav-drawer {
  display: none; border-bottom: 1px solid var(--line); background: var(--surface-1);
}
.nav-drawer[data-open="true"] { display: block; }
@media (min-width: 1080px) { .nav-drawer { display: none !important; } }
.nav-drawer ul { list-style: none; margin: 0; padding: 8px 16px 14px; display: flex; flex-direction: column; gap: 2px; }
.nav-drawer a {
  display: block; min-height: 46px; padding: 12px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-size: 14px;
}
.nav-drawer a:hover { background: var(--surface-2); }
.nav-drawer a[aria-current="page"] { background: var(--surface-2); color: var(--accent); }

/* --- 5. 前回訪問からの差分 ----------------------------------------------- */
.lastvisit {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: 10px 16px; background: var(--surface-3); border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-muted);
}
@media (min-width: 768px) { .lastvisit { padding: 10px 24px; } }
.lastvisit[hidden] { display: none; }
.lastvisit .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); font-size: 12.5px;
}
.lastvisit .note { font-size: 11.5px; color: var(--text-dim); }
@media (min-width: 1080px) { .lastvisit .note { margin-left: auto; } }

/* --- 6. 価格ボード ------------------------------------------------------- */
.board-title { display: flex; flex-direction: column; gap: 5px; }
.board-title h1 { font-size: 19px; }
@media (min-width: 768px) { .board-title h1 { font-size: 21px; } }
.board-title p { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; }

.asof {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px;
  background: var(--surface-1); border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); font-size: 11.5px; color: var(--text-muted); white-space: nowrap;
}
.asof .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--up); flex: 0 0 auto; }
.asof[data-state="stale"] .dot { background: var(--accent); }
.asof[data-state="error"] .dot { background: var(--down); }

/* 騰落表現: 色 + 記号 + 符号の三重 */
.chg { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.chg[data-dir="up"] { color: var(--up); }
.chg[data-dir="down"] { color: var(--down); }
.chg[data-dir="flat"], .chg[data-dir="na"] { color: var(--text-dim); }

/* デスクトップ: マトリクス表 / モバイル: 銘柄カード積み */
.matrix { width: 100%; border-collapse: collapse; }
.matrix caption { text-align: left; padding: 0 16px 8px; font-size: 12px; color: var(--text-dim); }
.matrix th, .matrix td { border-top: 1px solid var(--line-soft); }
.matrix thead th {
  padding: 0 16px 8px; border-top: 0; text-align: right;
  font-size: 11.5px; font-weight: 400; color: var(--text-dim); letter-spacing: 0.06em;
}
.matrix thead th:first-child { text-align: left; }
.matrix .sym {
  padding: 16px 12px 16px 16px; text-align: left; vertical-align: top;
  border-right: 1px solid var(--line-soft); font-weight: 400;
}
.matrix .sym .pair { display: block; font-size: 17px; font-weight: 650; letter-spacing: 0.02em; font-family: var(--font-mono); }
.matrix .sym .name { display: block; margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.matrix .sym .upd { display: block; margin-top: 6px; font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }
.matrix td.cell {
  padding: 14px 16px; text-align: right; vertical-align: top;
  border-right: 1px solid var(--line-soft);
}
.matrix td.cell:last-child { border-right: 0; }
.matrix td.cell .price {
  display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.01em;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.matrix td.cell .chg { display: block; margin-top: 5px; font-size: 12.5px; }
.matrix td.cell .tag { display: block; min-height: 17px; margin-top: 5px; font-size: 10.5px; letter-spacing: 0.04em; }
.matrix td.cell[data-rank="low"]  { background: var(--accent-weak); }
.matrix td.cell[data-rank="high"] { background: var(--accent-2-weak); }
.matrix td.cell[data-rank="low"]  .tag { color: var(--accent); }
.matrix td.cell[data-rank="high"] .tag { color: var(--accent-2-text); }
.matrix td.cell.is-na .price { color: var(--text-dim); font-size: 17px; }

.matrix-scroll { display: none; }
.board-cards { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 1080px) {
  .matrix-scroll { display: block; overflow-x: auto; }
  .board-cards { display: none; }
}

.sym-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sym-card > .head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 14px 10px;
}
.sym-card .pair { font-size: 15px; font-weight: 650; font-family: var(--font-mono); }
.sym-card .name { display: block; margin-top: 3px; font-size: 11.5px; color: var(--text-muted); }
.sym-card .upd { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }
.sym-card .row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  padding: 11px 14px; border-top: 1px solid var(--line-soft);
}
.sym-card .row[data-rank="low"]  { background: var(--accent-weak); }
.sym-card .row[data-rank="high"] { background: var(--accent-2-weak); }
.sym-card .row .ex { font-size: 12.5px; color: var(--text-2); }
.sym-card .row .tag { margin-left: 8px; font-size: 10px; letter-spacing: 0.04em; }
.sym-card .row[data-rank="low"]  .tag { color: var(--accent); }
.sym-card .row[data-rank="high"] .tag { color: var(--accent-2-text); }
.sym-card .row .vals { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sym-card .row .price { font-size: 16px; font-weight: 600; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sym-card .row .chg { font-size: 11.5px; }

/* 更新パルス(150ms・1回) */
@keyframes tcx-pulse {
  0%   { background-color: var(--accent-weak); }
  100% { background-color: transparent; }
}
.pulse { animation: tcx-pulse 150ms ease-out 1; }

/* --- 7. スプレッド / ゲージ / ウォッチリスト ------------------------------ */
.spread-item {
  display: flex; flex-direction: column; gap: 7px; padding: 12px 14px;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 8px;
}
.spread-item .top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.spread-item .pair { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.spread-item .pct { font-size: 11.5px; color: var(--text-dim); }
.spread-item .diff {
  font-size: 28px; font-weight: 600; letter-spacing: -0.02em; color: var(--accent);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.spread-item .legs { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }
.spread-item .legs b { font-weight: 400; color: var(--text-2); font-family: var(--font-mono); }

.gauge-row { display: flex; align-items: center; gap: 16px; }
.gauge-row svg { flex: 0 0 auto; }
.gauge-val { font-size: 34px; line-height: 1; font-weight: 600; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.gauge-label { font-size: 13px; color: var(--text); }
.gauge-prev { font-size: 11.5px; color: var(--text-muted); font-family: var(--font-mono); }

.watch-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
  padding: 10px 16px; border-top: 1px solid var(--line-soft);
}
.watch-row .pair { font-size: 12.5px; color: var(--text-2); font-family: var(--font-mono); }
.watch-row .price { font-size: 14px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.watch-row .chg { min-width: 64px; text-align: right; font-size: 12px; }
.watch-row .del {
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-dim); font-size: 14px; cursor: pointer;
}
.watch-row .del:hover { background: var(--surface-3); color: var(--text); }
.watch-empty { padding: 12px 16px 4px; font-size: 12.5px; color: var(--text-dim); line-height: 1.7; }

.add-row {
  display: flex; gap: 8px; width: 100%; padding: 11px 16px;
  border-top: 1px solid var(--line); background: var(--surface-3);
  border-radius: 0 0 var(--radius) var(--radius);
}
.add-row select, .add-row button {
  min-height: 40px; padding: 0 10px; background: var(--surface-2);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--text); font-size: 13px; font-family: inherit; cursor: pointer;
}
.add-row select { flex: 1; min-width: 0; }

/* --- 8. スケルトン / n/a 表示 -------------------------------------------- */
.skeleton {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 8px;
  background: repeating-linear-gradient(135deg, var(--surface-1) 0 10px, var(--surface-3) 10px 20px);
  color: var(--text-dim); font-size: 12px; text-align: center; padding: 16px;
}
.na { color: var(--text-dim); font-family: var(--font-mono); }
.notice {
  display: flex; flex-direction: column; gap: 4px; padding: 12px 14px;
  background: var(--surface-3); border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent); border-radius: var(--radius-sm);
  font-size: 12.5px; color: var(--text-2); line-height: 1.7;
}
.notice[hidden] { display: none; }
.notice .t { font-weight: 600; }

/* --- 9. ニュース / カード導線 -------------------------------------------- */
.news-item {
  display: grid; grid-template-columns: 1fr; gap: 6px; padding: 13px 16px;
  border-top: 1px solid var(--line-soft); text-decoration: none; color: var(--text);
}
.news-item:hover { background: var(--surface-3); color: var(--text); }
.news-item .t { font-size: 13.5px; line-height: 1.6; text-wrap: pretty; }
.news-item .m { font-size: 11.5px; color: var(--text-dim); font-family: var(--font-mono); }
@media (min-width: 768px) {
  .news-item { grid-template-columns: 1fr auto; align-items: baseline; gap: 14px; }
  .news-item .m { white-space: nowrap; }
}

.link-card {
  display: flex; flex-direction: column; gap: 5px; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--text);
}
.link-card:hover { border-color: var(--accent); color: var(--text); }
.link-card .t { font-size: 13.5px; font-weight: 600; }
.link-card .d { font-size: 11.5px; color: var(--text-muted); line-height: 1.6; }

.tool-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 48px; padding: 13px 14px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--text); font-size: 13.5px;
}
.tool-row:hover { border-color: var(--accent); color: var(--text); }
.tool-row .chev { color: var(--text-dim); }

.guide-card {
  display: flex; flex-direction: column; gap: 8px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--text);
}
.guide-card:hover { border-color: var(--line-strong); color: var(--text); }
.guide-card .thumb {
  display: flex; align-items: center; justify-content: center; height: 116px; padding: 8px;
  background: repeating-linear-gradient(135deg, var(--surface-1) 0 10px, var(--surface-3) 10px 20px);
  font-size: 11px; color: var(--text-dim); text-align: center;
}
.guide-card .kind { padding: 0 14px; font-size: 11px; color: var(--accent-2-text); letter-spacing: 0.04em; }
.guide-card .t { padding: 0 14px; font-size: 13.5px; line-height: 1.55; text-wrap: pretty; }
.guide-card .d { padding: 0 14px 14px; font-size: 11.5px; color: var(--text-dim); font-family: var(--font-mono); }

.countdown {
  display: flex; align-items: center; gap: 16px; padding: 16px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.countdown .big {
  display: flex; flex-direction: column; gap: 3px; min-width: 116px; flex: 0 0 auto;
}
.countdown .big .n {
  font-size: 28px; font-weight: 600; line-height: 1;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.countdown .big .u { font-size: 12px; color: var(--text-muted); }
.countdown .txt { display: flex; flex-direction: column; gap: 5px; }
.countdown .txt .t { font-size: 13.5px; font-weight: 600; }
.countdown .txt .d { font-size: 11.5px; color: var(--text-muted); line-height: 1.6; }
.badge-est {
  display: inline-flex; align-self: flex-start; padding: 2px 7px; border-radius: 4px;
  background: var(--accent-2-bg); border: 1px solid var(--accent-2);
  font-size: 10.5px; color: var(--accent-2-text);
}

/* --- 10. PR(広告)カード ------------------------------------------------- */
/* 記事面と背景を変え、広告であることを隠さない */
.pr-card {
  display: flex; flex-direction: column; gap: 10px; padding: 16px;
  background: var(--surface-3); border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.pr-badge {
  display: inline-flex; align-self: flex-start; align-items: center;
  padding: 3px 9px; border-radius: 4px;
  background: var(--surface-sunk); border: 1px solid var(--line-strong);
  font-size: 11px; letter-spacing: 0.08em; color: var(--text-muted);
}
.pr-card .t { font-size: 14.5px; font-weight: 600; }
.pr-card .d { font-size: 12.5px; color: var(--text-muted); line-height: 1.75; }
.pr-card .cta {
  display: inline-flex; align-self: flex-start; align-items: center; min-height: 44px;
  padding: 0 18px; border-radius: var(--radius-sm);
  background: var(--accent); border: 1px solid var(--accent);
  color: #16130A; font-size: 13.5px; font-weight: 600; text-decoration: none;
}
.pr-card .cta:hover { background: var(--accent-hover); color: #16130A; }
.pr-card .fine { font-size: 11px; color: var(--text-dim); line-height: 1.7; }

/* --- 11. フォーム / ツール ----------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--text-dim); line-height: 1.6; }
.field .inputwrap { display: flex; align-items: center; gap: 8px; max-width: 440px; }
.field > input, .field > select, .field .inputwrap input, .field .inputwrap select { max-width: 440px; }
input[type="number"], input[type="text"], input[type="search"], select {
  min-height: 46px; padding: 0 12px; background: var(--surface-2);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--text); font-size: 16px; font-family: var(--font-mono);
  font-variant-numeric: tabular-nums; width: 100%;
}
select { font-family: var(--font-sans); }
input:focus-visible, select:focus-visible { border-color: var(--accent); }
.field .unit { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  padding: 0 20px; border-radius: var(--radius-sm); border: 1px solid var(--accent);
  background: var(--accent); color: #16130A; font-size: 14px; font-weight: 600;
  font-family: inherit; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-hover); color: #16130A; }
.btn-ghost { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--accent); color: var(--text); }

.result-card {
  display: flex; flex-direction: column; gap: 12px; padding: 18px;
  background: var(--surface-2); border: 1px solid var(--accent); border-radius: var(--radius);
}
.result-card .label { font-size: 12.5px; color: var(--text-muted); }
.result-card .big {
  font-size: 32px; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { .result-card .big { font-size: 40px; } }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.result-grid .item { display: flex; flex-direction: column; gap: 3px; }
.result-grid .item .k { font-size: 11.5px; color: var(--text-dim); }
.result-grid .item .v { font-size: 17px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

details.assump {
  padding: 12px 14px; background: var(--surface-3);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
details.assump summary { cursor: pointer; font-size: 13px; color: var(--text-2); }
details.assump .inner { padding-top: 10px; font-size: 12.5px; color: var(--text-muted); line-height: 1.8; }
details.assump ul { margin: 0; padding-left: 1.3em; }

/* --- 12. 記事 / 読み物面 ------------------------------------------------- */
.page-head { display: flex; flex-direction: column; gap: 10px; padding: 24px 0 18px; }
.page-head h1 { font-size: 24px; line-height: 1.4; }
@media (min-width: 768px) { .page-head h1 { font-size: 30px; } }
.page-head .lead { font-size: 14.5px; color: var(--text-muted); line-height: 1.85; max-width: var(--wrap-read); }

.breadcrumb { padding: 14px 0 0; font-size: 12px; color: var(--text-dim); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li::after { content: "／"; margin-left: 6px; color: var(--text-deco); }
.breadcrumb li:last-child::after { content: ""; }

.meta-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  font-size: 12px; color: var(--text-dim);
}
.meta-row .upd { font-family: var(--font-mono); }

.prose { max-width: var(--wrap-read); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: 19px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.prose h3 { margin-top: 1.6em; font-size: 16px; }
.prose p, .prose li { font-size: 16.5px; line-height: 1.95; color: var(--text-2); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose figure { margin: 1.6em 0; }
.prose figure img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.prose figcaption { margin-top: 8px; font-size: 11.5px; color: var(--text-dim); font-family: var(--font-mono); }
.prose blockquote {
  margin: 1.4em 0; padding: 12px 16px; border-left: 3px solid var(--line-strong);
  background: var(--surface-3); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14.5px; color: var(--text-muted);
}
/* 出典として生のURLを本文に置いている箇所がある(検証可能性を優先)。
   長いURLで行が破綻しないように、どこでも折り返せるようにする。 */
.prose a[href^="http"] { word-break: break-word; overflow-wrap: anywhere; }
.prose code {
  padding: 2px 6px; background: var(--surface-3); border: 1px solid var(--line);
  border-radius: 4px; font-family: var(--font-mono); font-size: .92em;
}

.datatable-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
table.data caption { padding: 12px 14px; text-align: left; font-size: 12.5px; color: var(--text-dim); }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-top: 1px solid var(--line-soft); vertical-align: top; }
table.data thead th { background: var(--surface-3); font-size: 12px; font-weight: 600; color: var(--text-muted); border-top: 0; }
table.data td.n { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
table.data .src { display: block; margin-top: 4px; font-size: 11px; color: var(--text-dim); }

/* --- 13. フッター ------------------------------------------------------- */
.site-footer {
  margin-top: 32px; padding: 24px 0 28px;
  background: var(--surface-sunk); border-top: 1px solid var(--line);
}
.site-footer .cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (min-width: 768px) { .site-footer .cols { grid-template-columns: repeat(4, 1fr); } }
.site-footer .col { display: flex; flex-direction: column; gap: 8px; }
.site-footer .col .h { font-size: 11.5px; color: var(--text-dim); letter-spacing: 0.06em; }
.site-footer .col a { font-size: 12.5px; }
.site-footer .attr { font-size: 12.5px; color: var(--text-2); font-family: var(--font-mono); }
.site-footer .attr-sub { font-size: 12px; color: var(--text-muted); }
.site-footer .bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  font-size: 11.5px; color: var(--text-dim);
}

.disclaimer-block {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--radius);
}
.disclaimer-block .a { font-size: 12.5px; color: var(--text-2); line-height: 1.75; }
.disclaimer-block .b { font-size: 11.5px; color: var(--text-dim); line-height: 1.75; }

/* --- 14. モーション制御 -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* --- 15. 印刷 ----------------------------------------------------------- */
@media print {
  .site-header, .nav-drawer, .lastvisit, .theme-toggle, .search-box, .add-row { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .result-card { border-color: #999; }
}
/* ==========================================================================
   v2 ヘッダー（2026-08-26 放送局化）— 全ページ共通。正本: docs/DESIGN.md §6.8 / CONTENTS.md §1.2
   ========================================================================== */
:root { --live: #F5442F; --latest: #E3A82B; --post: #8E9BAA; }
.lbl {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim); white-space: nowrap; line-height: 1;
}
.brand-plate {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border: 1px solid var(--accent); border-radius: 3px; color: var(--accent);
  font-family: var(--font-mono); font-weight: 700; font-size: 12px; letter-spacing: 0.06em;
}
.brand-tag { display: none; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
@media (min-width: 1500px) { .brand-tag { display: inline; } }
.site-header .inner { gap: 12px; min-width: 0; }
.header-tools { min-width: 0; gap: 8px; }
@media (min-width: 1080px) { .nav a { padding: 6px 9px; font-size: 13px; white-space: nowrap; } }
.ticker { display: none; align-items: center; gap: 12px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.ticker b { font-weight: 600; color: var(--text); }
.ticker .chg { font-size: 11.5px; }
.ticker .k { color: var(--text-dim); }
@media (min-width: 1200px) { .ticker { display: flex; } }
.ticker-bar {
  display: flex; align-items: center; gap: 14px; height: 26px; padding: 0 16px; overflow-x: auto; overflow-y: hidden;
  border-bottom: 1px solid var(--line); background: var(--surface-1); scrollbar-width: none;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11.5px; color: var(--text-2); white-space: nowrap;
}
.ticker-bar::-webkit-scrollbar { display: none; }
.ticker-bar b { font-weight: 600; color: var(--text); }
.ticker-bar .k { color: var(--text-dim); }
@media (min-width: 1200px) { .ticker-bar { display: none; } }
.hd-count { display: none; flex-direction: column; align-items: flex-end; line-height: 1; gap: 3px; text-decoration: none; }
.hd-count .num { font-size: 17px; font-weight: 600; color: var(--text); }
@media (min-width: 1280px) { .hd-count { display: flex; } }
.lang-toggle {
  display: inline-flex; height: 32px; border: 1px solid var(--line-strong); border-radius: 3px; overflow: hidden;
  background: var(--surface-2); padding: 0;
}
.lang-toggle button {
  padding: 0 9px; border: 0; background: transparent; color: var(--text-muted); font-size: 11px; font-family: inherit; cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--line); color: var(--text); }
.site-footer .col a.is-new::after { content: " new"; font-size: 9px; color: var(--accent); letter-spacing: .08em; }
.st-search { display: none; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface-2); }
.st-search input { width: 118px; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 12px; font-family: inherit; }
.st-search input::placeholder { color: var(--text-dim); }
.st-search .key { display: inline-flex; align-items: center; min-width: 18px; height: 16px; padding: 0 4px; border: 1px solid var(--line-strong); border-radius: 2px; font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
@media (min-width: 1080px) { .st-search { display: flex; } }
body.is-search .st-search { display: flex; position: fixed; left: 0; right: 0; top: 52px; z-index: 35; height: 44px; border-radius: 0; border-left: 0; border-right: 0; }
body.is-search .st-search input { width: 100%; font-size: 14px; }
