/* ===== デザイントークン（青基調） ===== */
:root {
  --page: #eef3fa;
  --page-top: #dde8f7;
  --surface: #ffffff;
  --surface-2: #f5f8fd;
  --ink: #0c1e3c;
  --ink-2: #44567a;
  --muted: #7b8aa6;
  --grid: #e3eaf5;
  --axis: #c3d0e4;
  --accent: #1f6fd1;
  --accent-strong: #1559b3;
  --accent-soft: #e8f1fd;
  --chip: #edf3fc;
  --up: #1c5cab;
  --down: #b42f2f;
  --navy-1: #0a2552;
  --navy-2: #123f86;
  --navy-3: #1f6fd1;
  --on-navy: #ffffff;
  --on-navy-2: rgb(255 255 255 / .74);
  --shadow: 0 1px 2px rgb(16 42 90 / .05), 0 8px 24px rgb(16 42 90 / .07);
  --shadow-pop: 0 12px 32px rgb(16 42 90 / .18);
  --ring: 0 0 0 3px rgb(31 111 209 / .2);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #08111f; --page-top: #0c1a31; --surface: #0f1c31; --surface-2: #132340;
    --ink: #eaf1ff; --ink-2: #a9b8d3; --muted: #7d8dab; --grid: #1d2c45; --axis: #2b3d5c;
    --accent: #4a90e8; --accent-strong: #6aa6f0; --accent-soft: #15284a; --chip: #15243d;
    --up: #86b6ef; --down: #f0a09f;
    --navy-1: #061730; --navy-2: #0b2a5b; --navy-3: #164c9c;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    --shadow-pop: 0 12px 32px rgb(0 0 0 / .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #08111f; --page-top: #0c1a31; --surface: #0f1c31; --surface-2: #132340;
  --ink: #eaf1ff; --ink-2: #a9b8d3; --muted: #7d8dab; --grid: #1d2c45; --axis: #2b3d5c;
  --accent: #4a90e8; --accent-strong: #6aa6f0; --accent-soft: #15284a; --chip: #15243d;
  --up: #86b6ef; --down: #f0a09f;
  --navy-1: #061730; --navy-2: #0b2a5b; --navy-3: #164c9c;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  --shadow-pop: 0 12px 32px rgb(0 0 0 / .45);
  color-scheme: dark;
}

/* ===== ベース ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink);
  background: var(--page) linear-gradient(180deg, var(--page-top) 0, var(--page) 360px) no-repeat;
  font: 15px/1.6 "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1 { margin: 0; font-size: 24px; letter-spacing: .03em; }
h2 { margin: 0; font-size: 16px; letter-spacing: .02em; }
::selection { background: rgb(31 111 209 / .2); }

/* ===== ヘッダー ===== */
.site-header {
  position: relative; color: var(--on-navy);
  background: linear-gradient(115deg, var(--navy-1) 0%, var(--navy-2) 55%, var(--navy-3) 100%);
  box-shadow: 0 2px 12px rgb(10 37 82 / .25);
}
.site-header::after { /* 控えめな光沢 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 120px at 85% -40px, rgb(255 255 255 / .18), transparent 70%);
}
.header-inner { position: relative; padding: 14px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { font-size: 19px; font-weight: 700; letter-spacing: .04em; color: var(--on-navy); text-decoration: none; }
.lede { margin: 0; color: var(--on-navy-2); font-size: 12px; }

/* ===== メニュー（ドロワー） ===== */
.layout { min-height: calc(100vh - 60px); }
.menu-btn, .menu-close {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin: -8px 0 -8px -8px;
  border: 0; border-radius: 10px; background: transparent; color: var(--on-navy); cursor: pointer;
}
.menu-btn:hover, .menu-close:hover { background: rgb(255 255 255 / .14); }
.menu-btn svg, .menu-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.side {
  position: fixed; z-index: 30; top: 0; left: 0; bottom: 0; width: 272px; max-width: 85vw;
  background: linear-gradient(180deg, var(--navy-1) 0%, var(--navy-2) 100%); color: var(--on-navy);
  padding: 12px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
  transform: translateX(-100%); visibility: hidden;
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .22s;
}
.side.open { transform: none; visibility: visible; transition: transform .22s cubic-bezier(.2, .8, .2, 1); box-shadow: 8px 0 32px rgb(6 23 48 / .35); }
.side-head {
  display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 12px 12px; margin-bottom: 4px;
  font-size: 11px; letter-spacing: .12em; color: var(--on-navy-2); font-weight: 700; border-bottom: 1px solid rgb(255 255 255 / .12);
}
.side-head .menu-close { margin: 0; }
.side a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px;
  color: var(--on-navy-2); text-decoration: none; font-size: 14px; position: relative;
}
.side a:hover { background: rgb(255 255 255 / .08); color: var(--on-navy); }
.side a[aria-current="page"] { background: rgb(255 255 255 / .14); color: var(--on-navy); font-weight: 700; }
.side a[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: #7db4ff;
}
.side a:focus-visible, .menu-btn:focus-visible, .menu-close:focus-visible { outline: 2px solid #9cc6ff; outline-offset: 2px; }
.side svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.backdrop { position: fixed; inset: 0; z-index: 25; background: rgb(6 23 48 / .45); backdrop-filter: blur(2px); }

/* ===== 本文 ===== */
.content { padding: 28px 24px; max-width: 1160px; margin: 0 auto; min-width: 0; }
@media (max-width: 640px) { .content { padding: 20px 16px; } .lede { display: none; } }
@media (prefers-reduced-motion: reduce) { .side, .side.open { transition: none; } }
.page-head { margin-bottom: 18px; }
.page-head h1 { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.page-head h1::before {
  content: ""; width: 5px; height: 1.05em; border-radius: 3px; flex: none;
  background: linear-gradient(180deg, #5aa0f0, var(--accent-strong));
}
.page-head .card-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-2); }

.card {
  background: var(--surface); border: 1px solid var(--grid); border-radius: 16px;
  padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head h2 { color: var(--ink); }
.card-sub { margin: 4px 0 14px; font-size: 12px; color: var(--muted); }
.status { min-height: 1.2em; margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }

/* ===== 操作部品 ===== */
.filters {
  margin: 0 0 18px; padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--grid); border-radius: 16px; display: grid; gap: 14px; box-shadow: var(--shadow);
}
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-row.split { justify-content: space-between; row-gap: 14px; }
.filter-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-label { width: 64px; flex: none; font-size: 12px; color: var(--accent-strong); font-weight: 700; letter-spacing: .04em; }
.hint { font-size: 12px; color: var(--muted); }
select, input[type="search"] {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--axis); border-radius: 10px; padding: 6px 12px; min-height: 38px;
  transition: border-color .15s, box-shadow .15s;
}
select:hover, input[type="search"]:hover { border-color: var(--accent); }
select:focus, input[type="search"]:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--chip); border-radius: 12px; }
.seg button {
  font: inherit; font-size: 13px; border: 0; background: transparent; color: var(--ink-2);
  padding: 6px 14px; border-radius: 9px; cursor: pointer; min-height: 32px; transition: background .15s, color .15s;
}
.seg button:hover:not(:disabled):not([aria-checked="true"]) { color: var(--accent-strong); background: rgb(31 111 209 / .08); }
.seg button[aria-checked="true"] {
  background: linear-gradient(180deg, #2a7de0, var(--accent-strong)); color: #fff; font-weight: 700;
  box-shadow: 0 2px 8px rgb(21 89 179 / .35);
}
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.seg button:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.ghost {
  font: inherit; font-size: 13px; background: var(--surface); color: var(--accent-strong); border: 1px solid var(--axis);
  border-radius: 10px; padding: 6px 14px; cursor: pointer; min-height: 38px; font-weight: 600;
}
button.ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.more { display: block; margin: 14px auto 0; }

/* ===== ツリーマップ ===== */
.treemap { position: relative; width: 100%; height: 440px; }
@media (max-width: 640px) { .treemap { height: 520px; } }
.tile {
  position: absolute; overflow: hidden; border-radius: 6px; padding: 6px 7px; cursor: pointer;
  font-size: 12px; line-height: 1.3; border: 0; text-align: left; font-family: inherit;
  transition: filter .15s;
}
.tile:hover { filter: brightness(1.06) saturate(1.05); }
.tile .t-name { font-weight: 700; display: block; }
.tile .t-val { display: block; white-space: nowrap; opacity: .9; font-variant-numeric: tabular-nums; }
.tile[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--ink); }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 1; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-2); }
.legend .bar { width: 140px; height: 10px; border-radius: 5px; }

/* ===== 表 ===== */
.rk-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.rk-tools input { width: 190px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data th, table.data td { padding: 9px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
table.data th {
  font-size: 12px; color: var(--ink-2); font-weight: 700; text-align: left; position: sticky; top: 0;
  background: var(--surface-2); border-bottom: 1px solid var(--axis);
}
table.data th:first-child { border-top-left-radius: 10px; }
table.data th:last-child { border-top-right-radius: 10px; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover td { background: var(--accent-soft); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data th.active { color: var(--accent-strong); }
table.data th.active::after { content: " ▼"; font-size: 10px; }
table.data.asc th.active::after { content: " ▲"; }
table.data td.rank { color: var(--muted); width: 3em; font-variant-numeric: tabular-nums; }
table.data tbody tr:nth-child(-n+3) td.rank { color: var(--accent-strong); font-weight: 700; }
table.data td.name { white-space: normal; min-width: 10em; font-weight: 500; }
@media (max-width: 640px) { table.data .ind { display: none; } .filter-label { width: 100%; } }
table.data td.code { color: var(--muted); font-variant-numeric: tabular-nums; }
table.data td.ind { color: var(--ink-2); font-size: 12px; }
table.data td.lbl { font-weight: 700; }
table.data tr.sub td { color: var(--ink-2); font-size: 12px; }
table.data tr.sel td { background: var(--accent-soft); font-weight: 700; }
.up { color: var(--up); }
.down { color: var(--down); }
.tag { font-size: 11px; color: var(--muted); margin-left: 4px; }
.div-badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; color: var(--muted); }
.div-badge.up { color: var(--up); }
.div-badge.down { color: var(--down); }
.div-h { font-size: 14px; margin: 18px 0 6px; }
.table-view { margin-top: 14px; }
.table-view summary { cursor: pointer; font-size: 13px; color: var(--accent-strong); font-weight: 600; }

.tip {
  position: fixed; z-index: 40; pointer-events: none; background: var(--surface); color: var(--ink);
  border: 1px solid var(--grid); border-radius: 12px; padding: 10px 12px; font-size: 12px; line-height: 1.55;
  box-shadow: var(--shadow-pop); max-width: 280px;
}
.tip b { font-size: 13px; color: var(--accent-strong); }
.tip .row { display: flex; justify-content: space-between; gap: 16px; font-variant-numeric: tabular-nums; }
.tip .row span:first-child { color: var(--ink-2); }

.foot { padding: 12px 0 36px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--grid); margin-top: 8px; }
.note { margin-top: 12px; }
a.co-link { color: inherit; text-decoration: none; }
a.co-link:hover { text-decoration: underline; color: var(--accent); }

/* ===== 日本全体 ===== */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--grid);
  border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow);
}
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--accent), #6fb0ff); }
.kpi .k-label { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.kpi .k-val { font-size: 27px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; color: var(--ink); letter-spacing: .01em; }
.kpi .k-sub { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.mini { background: var(--surface-2); border-radius: 12px; padding: 14px 14px 10px; }
.mini h3 { margin: 0 0 6px; font-size: 13px; color: var(--ink); font-weight: 700; }
.mini svg { width: 100%; height: 170px; display: block; overflow: visible; }
.mini .bar { fill: var(--accent); }
.mini .bar:hover, .mini .bar:focus { fill: var(--accent-strong); outline: none; }
.mini .val { font-size: 11px; fill: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.mini .axis { font-size: 11px; fill: var(--muted); }
.mini .base { stroke: var(--axis); stroke-width: 1; }
.mini .yoy { font-size: 12px; margin-top: 6px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ===== 個別企業分析 ===== */
.search-box { position: relative; max-width: 560px; margin-bottom: 18px; }
.search-box input {
  width: 100%; min-height: 50px; font-size: 15px; padding: 10px 16px 10px 46px; border-radius: 14px;
  box-shadow: var(--shadow);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f6fd1' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M20 20l-4.8-4.8'/%3E%3C/svg%3E") no-repeat 16px center / 20px;
}
.results {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--grid); border-radius: 14px; box-shadow: var(--shadow-pop);
  max-height: 360px; overflow-y: auto;
}
.results li { padding: 9px 10px; border-radius: 8px; cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.results li[aria-selected="true"], .results li:hover { background: var(--accent-soft); }
.results .r-code { color: var(--muted); font-variant-numeric: tabular-nums; width: 3.2em; flex: none; }
.results .r-ind { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.co-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.co-head h2 { font-size: 22px; color: var(--ink); }
.co-head .tag {
  margin: 0; font-size: 12px; font-weight: 700; color: var(--accent-strong); background: var(--accent-soft);
  padding: 2px 8px; border-radius: 6px; font-variant-numeric: tabular-nums;
}
.co-meta { font-size: 12px; color: var(--ink-2); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.co-meta span:not(:empty) { background: var(--surface); border: 1px solid var(--grid); border-radius: 999px; padding: 2px 10px; }
.co-empty { color: var(--ink-2); font-size: 14px; padding: 24px 0; }
.pairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 18px; }
.pair { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.pair h3 { margin: 0 0 6px; font-size: 13px; color: var(--ink); font-weight: 700; }
.pair .row { display: grid; grid-template-columns: 4.5em 1fr; align-items: center; gap: 8px; font-size: 12px; margin: 5px 0; color: var(--ink-2); }
.pair .track { height: 14px; position: relative; }
.pair .fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 0 5px 5px 0; }
.pair .fill.prior { background: var(--axis); }
.pair .fill.cur { background: linear-gradient(90deg, var(--accent-strong), var(--accent)); }
.pair .neg { font-size: 11px; color: var(--down); }

/* ===== お気に入り ===== */
.star {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--axis); border-radius: 999px; padding: 6px 14px 6px 11px; background: var(--surface); color: var(--ink-2);
  transition: background .15s, border-color .15s;
}
.star:hover { border-color: #eda100; }
.star svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.star[aria-pressed="true"] { color: var(--ink); border-color: #eda100; background: color-mix(in srgb, #eda100 14%, var(--surface)); }
.star[aria-pressed="true"] svg { fill: #eda100; stroke: #c98500; }
.favs { padding-bottom: 14px; }
.fav-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fav-list li { display: flex; align-items: center; border: 1px solid var(--grid); border-radius: 10px; background: var(--surface-2); transition: border-color .15s; }
.fav-list li:hover { border-color: var(--accent); }
.fav-list li[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
.fav-list a { padding: 7px 4px 7px 12px; color: var(--ink); text-decoration: none; font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.fav-list a::before { content: "★"; color: #eda100; font-size: 12px; }
.fav-list a:hover { color: var(--accent-strong); }
.fav-list .r-code { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.fav-list button { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 30px; height: 32px; font-size: 16px; border-radius: 0 10px 10px 0; }
.fav-list button:hover { color: var(--down); }
.results .r-fav { color: #c98500; width: 1em; flex: none; }
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .k-val { font-size: 21px; }
}

/* ===== 業種サマリー（ツリーマップのタイルで開く） ===== */
.ind-summary { border-top: 4px solid var(--accent); scroll-margin-top: 16px; }
.sum-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sum-head h2 { font-size: 20px; }
.sum-head .tag { margin: 0; }
.sum-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.sum-close {
  width: 36px; height: 36px; border: 1px solid var(--axis); border-radius: 10px; background: var(--surface);
  color: var(--ink-2); cursor: pointer; font-size: 18px; line-height: 1;
}
.sum-close:hover { border-color: var(--accent); color: var(--accent-strong); }
a.btn-link {
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--accent-strong);
  text-decoration: none; border: 1px solid var(--axis); border-radius: 10px; padding: 7px 12px; background: var(--surface);
}
a.btn-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.sum-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 18px; }
.sum-kpi { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.sum-kpi .k-label { font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.sum-kpi .k-val { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.sum-kpi .k-sub { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sum-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 860px) { .sum-grid { grid-template-columns: minmax(0, 1fr); } }
.sum-block h3 { margin: 0 0 8px; font-size: 14px; color: var(--ink); }
.sum-block + .sum-block { margin-top: 18px; }
.sum-block .card-sub { margin: -4px 0 8px; }
.share-bar { display: inline-block; vertical-align: middle; height: 8px; border-radius: 4px; background: var(--accent); margin-right: 6px; }
.sum-note { font-size: 11.5px; color: var(--muted); margin: 14px 0 0; }

/* ===== メニュー下部のリンク・固定ページ ===== */
.side-sep { height: 1px; background: rgb(255 255 255 / .14); margin: 10px 8px; }
.side a.side-sub { font-size: 13px; padding: 9px 14px; }
.prose { max-width: 820px; line-height: 1.85; font-size: 14.5px; }
.prose h2 { font-size: 16px; margin: 26px 0 8px; padding-left: 10px; border-left: 3px solid var(--accent); }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 1.3em; }
.prose li { margin: 4px 0; }
.prose a { color: var(--accent-strong); }
.info-list { display: grid; grid-template-columns: 8em minmax(0, 1fr); margin: 0; }
.info-list dt, .info-list dd { padding: 12px 4px; border-bottom: 1px solid var(--grid); margin: 0; }
.info-list dt { font-weight: 700; color: var(--ink-2); font-size: 13px; }
.info-list dd { word-break: break-all; }
.pending { color: var(--muted); }
@media (max-width: 640px) { .info-list { grid-template-columns: minmax(0, 1fr); } .info-list dt { border-bottom: 0; padding-bottom: 0; } }
/* スマホでは選択欄を幅いっぱいに折り返す */
.seg { max-width: 100%; }
select { max-width: 100%; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .filters select { width: 100%; }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1 1 auto; padding: 6px 10px; }
}

/* ===== 市場別規模 ===== */
.mk-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.mk-section .card-head h2 { display: flex; align-items: center; font-size: 18px; }
.stacks { display: grid; gap: 12px; margin-top: 4px; }
.stack-row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); align-items: center; gap: 12px; }
.stack-label { font-size: 13px; font-weight: 700; display: flex; flex-direction: column; line-height: 1.35; }
.stack-label span { font-size: 11.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.stack { display: flex; gap: 2px; height: 30px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.seg-fill { display: flex; align-items: center; justify-content: center; min-width: 2px; color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.seg-fill:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.seg-fill span { text-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.legend-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--ink-2); }
.legend-row .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend-row i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
@media (max-width: 640px) { .stack-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } .stack-label { flex-direction: row; gap: 8px; align-items: baseline; } }
.mk-section { border-top: 4px solid var(--mk); }
.mk-section .mini .bar { fill: var(--mk); }
.mk-section .mini .bar:hover, .mk-section .mini .bar:focus { fill: var(--mk); opacity: .8; }
.mk-section .kpi::before { background: var(--mk); }
