
/* Layout: 調査端末型の1カラム。社名ヘッダー → 固定セクションナビ → 概要（チャート＋指標盤）→ 各分析セクション */
:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --ink: #111a24;
  --ink-2: #4a5665;
  --ink-3: #7a8594;
  --line: #dbe1e7;
  --line-2: #e9edf1;
  --accent: #1d4f8c;
  --accent-soft: #e3ecf7;
  --up: #12784a;
  --down: #c03a30;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --neutral-mark: #b9c1ca;
  --f-display: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --f-body: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  --f-num: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;   /* 数字も本文と同じ書体。桁は tabular-nums でそろえる */
  --r: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1116; --surface: #141a21; --surface-2: #1a222b; --ink: #e7ecf2; --ink-2: #a9b4c1; --ink-3: #7c8897;
    --line: #27313c; --line-2: #1f2832; --accent: #7fb0ec; --accent-soft: #1b2c42; --up: #3fbf7f; --down: #f0695f;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    --neutral-mark: #4b5663; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1116; --surface: #141a21; --surface-2: #1a222b; --ink: #e7ecf2; --ink-2: #a9b4c1; --ink-3: #7c8897;
  --line: #27313c; --line-2: #1f2832; --accent: #7fb0ec; --accent-soft: #1b2c42; --up: #3fbf7f; --down: #f0695f;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --neutral-mark: #4b5663; color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.pos { color: var(--up); } .neg { color: var(--down); }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Header */
.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead .wrap { padding-block: 20px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: end; }
.idline { display: flex; gap: 14px; align-items: center; min-width: 0; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.jpybox { grid-column: 1 / -1; background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 14px; }
.jpybox b { font-family: var(--f-num); }
.names { min-width: 0; }
.names h1 { margin: 0; font-family: var(--f-display); font-weight: 900; font-size: clamp(22px, 3.2vw, 30px); line-height: 1.15; letter-spacing: .01em; text-wrap: balance; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font-size: 12px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 1px 8px; border-radius: 999px; }
.tag.tk { font-family: var(--f-num); font-weight: 600; color: var(--ink); }
.quote { text-align: right; }
.quote .px { font-family: var(--f-num); font-size: clamp(28px, 4vw, 38px); font-weight: 600; letter-spacing: -.01em; line-height: 1.05; }
.quote .px small { font-size: 14px; color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.quote .chg { font-family: var(--f-num); font-size: 15px; font-weight: 600; margin-top: 4px; }
.quote .asof { color: var(--ink-3); font-size: 12px; margin-top: 4px; }

/* Section nav */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.secnav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.secnav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.secnav .wrap::-webkit-scrollbar { display: none; }
.secnav a { white-space: nowrap; padding: 11px 12px 10px; color: var(--ink-2); font-size: 13px; font-weight: 500; border-bottom: 2px solid transparent; }
.secnav a:hover { color: var(--ink); text-decoration: none; }
.secnav a.on { color: var(--accent); border-bottom-color: var(--accent); }

main .wrap { padding-block: 20px 48px; display: grid; gap: 28px; }
section { scroll-margin-top: 56px; display: grid; gap: 14px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.sec-h h2 { margin: 0; font-family: var(--f-display); font-size: 19px; font-weight: 700; }
.sec-h .note { color: var(--ink-3); font-size: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-width: 0; }
.panel h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* Controls */
.ctrls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); scrollbar-width: none; }
.seg button { white-space: nowrap; flex: none; font: inherit; font-size: 12px; border: 0; background: none; color: var(--ink-2); padding: 5px 10px; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.seg button:hover:not(.on) { background: var(--surface-2); }

/* Overview */
.ov { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.chart { width: 100%; height: 300px; overflow: hidden; }
.chart.tall { height: 380px; }
.chart.short { height: 240px; }
.perf { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.perf div { background: var(--surface-2); border-radius: 4px; padding: 6px 8px; }
.perf .k { font-size: 11px; color: var(--ink-3); }
.perf .v { font-family: var(--f-num); font-weight: 600; font-size: 13px; }
.range52 { margin-top: 12px; }
.range52 .bar { position: relative; height: 6px; background: var(--surface-2); border-radius: 3px; margin: 6px 0 4px; }
.range52 .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); border-radius: 3px; }
.range52 .dot { position: absolute; top: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); transform: translateX(-50%); }
.range52 .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); font-family: var(--f-num); }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.stats .grp { min-width: 0; }
.stats h4 { margin: 10px 0 4px; font-size: 11px; letter-spacing: .08em; color: var(--accent); font-weight: 600; }
.stats .grp:nth-child(-n+2) h4 { margin-top: 0; }
.kv { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.kv span:first-child { color: var(--ink-2); }
.kv span:first-child { min-width: 0; }
.kv span:last-child { font-family: var(--f-num); font-weight: 500; text-align: right; white-space: nowrap; }
.facts .kv span:last-child { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.facts .kv span:first-child { flex: none; white-space: nowrap; }

/* Tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 6px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line-2); }
th { color: var(--ink-3); font-weight: 500; font-size: 12px; background: var(--surface); position: sticky; top: 0; }
td { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); font-family: var(--f-body); z-index: 1; }
tr.grp td { background: var(--surface-2); font-weight: 600; color: var(--ink-2); font-family: var(--f-body); font-size: 12px; }
tr.grp td:first-child { background: var(--surface-2); }
tr.em td { font-weight: 600; }
tr.sub td:first-child { padding-left: 22px; color: var(--ink-2); }
tbody tr:hover td { background: var(--surface-2); }
td.spark { padding: 2px 10px; }
td.txt { font-family: var(--f-body); text-align: left; }
.tbl-plain td:first-child { position: static; }

/* Misc blocks */
.bignums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bignum { background: var(--surface-2); border-radius: 4px; padding: 8px 10px; }
.bignum .k { font-size: 11px; color: var(--ink-3); }
.bignum .v { font-family: var(--f-num); font-size: 18px; font-weight: 600; }
.bignum .s { font-size: 11px; color: var(--ink-3); font-family: var(--f-num); }
.fx-note { margin: -4px 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--ink-2); font-size: 12.5px; line-height: 1.7; }
.desc { max-width: 72ch; color: var(--ink-2); line-height: 1.8; margin: 0; }
.desc-note { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); }
.insight { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--line-2); display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4px 28px; max-width: 1100px; }
.ins-item h3 { margin: 12px 0 4px; font-size: 14px; font-weight: 700; color: var(--ink); }
.ins-item p, .ins-item li { margin: 0; color: var(--ink-2); line-height: 1.8; font-size: 13.5px; }
.ins-item ul { margin: 0; padding-left: 1.2em; }
.ins-item .ins-src { margin-top: 4px; font-size: 11.5px; color: var(--ink-3); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.target { position: relative; height: 54px; margin: 18px 6px 6px; }
.target .rail { position: absolute; top: 24px; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--surface-2); }
.target .band { position: absolute; top: 24px; height: 6px; border-radius: 3px; background: var(--accent-soft); border: 1px solid var(--accent); }
.target .mk { position: absolute; top: 0; transform: translateX(-50%); text-align: center; font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.target .mk b { display: block; font-family: var(--f-num); color: var(--ink); font-size: 12px; }
.target .mk::after { content: ""; display: block; width: 2px; height: 14px; margin: 2px auto 0; background: currentColor; }
.target .mk.low { top: 34px; } .target .mk.low::after { order: -1; }
.footnote { color: var(--ink-3); font-size: 12px; }
footer { border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12px; }
footer .wrap { padding-block: 18px 28px; display: grid; gap: 4px; }
.err { padding: 40px 0; color: var(--down); }

@media (max-width: 980px) {
  .ov { grid-template-columns: minmax(0, 1fr); }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .masthead .wrap { grid-template-columns: minmax(0, 1fr); }
  .quote { text-align: left; }
  .grid2, .grid3, .stats, .facts { grid-template-columns: minmax(0, 1fr); }
  .stats .grp:nth-child(2) h4 { margin-top: 10px; }
  .perf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bignums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .chart.tall { height: 320px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html { scroll-behavior: smooth; }
.rel-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.rel-links a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 13px; min-width: 0; }
.rel-links a:hover { border-color: var(--accent); }
.rel-links a b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rel-links a span { flex: none; color: var(--ink-3); font-family: var(--f-num); font-size: 12px; }
/* 数字の幅をそろえる（表の桁がそろう） */
body { font-variant-numeric: tabular-nums; }

html, body { margin: 0; }
[hidden] { display: none !important; }
img { max-width: 100%; }
.topbar { background: var(--surface); color: var(--ink); border-top: 3px solid #1d4f8c; border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(17,26,36,.04); position: relative; z-index: 30; }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-block: 9px; }
.topbar a.brand { color: var(--ink); font-family: var(--f-display); font-weight: 900; font-size: 17px; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar a.brand:hover { text-decoration: none; }
.gnav { display: flex; gap: 14px; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
.gnav::-webkit-scrollbar { display: none; }
.gnav a { color: var(--ink-2); font-size: 14px; padding: 7px 1px; white-space: nowrap; }
.gnav a:hover { color: var(--accent); text-decoration: none; }
.gnav a.on { color: var(--accent); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.topbar .tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.langsw { font-size: 12px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; white-space: nowrap; min-height: 30px; display: inline-flex; align-items: center; }
.langsw:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.langbar { background: var(--accent-soft); color: var(--ink); font-size: 13px; }
.langbar .wrap { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding-block: 8px; }
.langbar a { font-weight: 700; }
.langbar button { margin-left: auto; border: 0; background: transparent; color: var(--ink-2); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.ccy { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.ccy button { border: 0; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12px; padding: 5px 11px; cursor: pointer; min-height: 30px; }
.ccy button.on { background: var(--accent); color: #fff; font-weight: 700; }
.wlink { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.wlink:hover { color: var(--accent); text-decoration: none; }
.wlink svg { color: #e6a700; }
.wcount { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0 7px; font-size: 11px; font-family: var(--f-num); }
.findwrap { position: relative; display: flex; align-items: center; }
.findwrap .mag { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.topbar input { width: 200px; max-width: 60vw; font: inherit; font-size: 13px; padding: 7px 12px 7px 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.topbar input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.topbar ul.sugg { position: absolute; right: 0; top: 100%; z-index: 40; margin: 6px 0 0; padding: 4px 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 300px; max-height: 60vh; overflow: auto; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.topbar ul.sugg li a { display: flex; gap: 10px; padding: 7px 12px; color: var(--ink); font-size: 13px; }
.topbar ul.sugg li a:hover, .topbar ul.sugg li a.on { background: var(--surface-2); text-decoration: none; }
.topbar ul.sugg b { font-family: var(--f-num); min-width: 60px; }
@media (max-width: 1440px) { .wlink span { display: none; } .topbar input { width: 130px; } .gnav { gap: 11px; } .gnav a { font-size: 13px; } .topbar .wrap { gap: 8px 14px; } .topbar .tools { gap: 8px; } .topbar a.brand { font-size: 16px; } }
@media (max-width: 720px) {
  .wlink span { display: none; }
  .topbar .tools { width: 100%; }
  .findwrap { flex: 1; } .topbar input { width: 100%; max-width: none; }
  .gnav { order: 3; width: 100%; }
}
/* スマホ：画面下のタブとメニュー */
.mtab, .msheet, .mback { display: none; }
@media (max-width: 720px) {
  .gnav { display: none; }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .mtab { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface);
    border-top: 1px solid var(--line); padding: 5px 2px calc(5px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 10px rgba(17,26,36,.06); }
  .mtab a, .mtab button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px; justify-content: center; color: var(--ink-3);
    font: inherit; font-size: 10px; letter-spacing: -.02em; white-space: nowrap; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
  .mtab .on { color: var(--accent); font-weight: 700; }
  .mback:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 58; background: rgba(10,15,22,.4); }
  .msheet:not([hidden]) { display: block; position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 59; background: var(--surface);
    border-radius: 16px 16px 0 0; padding: 14px 12px 12px; box-shadow: 0 -10px 30px rgba(0,0,0,.18); max-height: 70vh; overflow: auto; }
  .mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .mgrid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 12px; background: var(--surface-2);
    color: var(--ink); font-size: 12px; text-align: center; text-decoration: none; }
  .mgrid a svg { color: var(--accent); }
  .mgrid a.on { outline: 2px solid var(--accent); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
.sitefoot { border-top: 1px solid var(--line); margin-top: 24px; }
.sitefoot .wrap { padding-block: 18px 28px; color: var(--ink-3); font-size: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.legal section h2 { margin: 0 0 10px; font-size: 16px; } .legal section p { margin: 0 0 8px; line-height: 1.9; font-size: 14px; }
.livebadge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-3); white-space: nowrap; font-family: var(--f-num); }
.livebadge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.livebadge.on { color: var(--up); } .livebadge.on::before { background: var(--up); animation: livepulse 2s infinite; }
@keyframes livepulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .livebadge.on::before { animation: none; } }
/* 行全体を押せる表 */
tbody tr:has(a.tk[href]), .li:has(a.tk[href]), .ev:has(a.tk[href]) { cursor: pointer; }
.li:has(a.tk[href]):hover { background: var(--surface-2); }
/* 会員（ログイン） */
.acct { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; min-height: 30px; }
.acct:hover { border-color: var(--accent); color: var(--accent); }
.acct.in { color: var(--up); border-color: var(--up); }
.mdl-bg { position: fixed; inset: 0; background: rgba(10,15,22,.45); z-index: 90; display: grid; place-items: center; padding: 16px; }
.mdl { background: var(--surface); color: var(--ink); border-radius: 16px; width: min(420px, 100%); padding: 24px 24px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.mdl h2 { margin: 0 0 8px; font-family: var(--f-display); font-size: 20px; }
.mdl p { margin: 0 0 14px; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.mdl .btns { display: flex; flex-direction: column; gap: 10px; align-items: stretch; margin: 16px 0; }
.mdl .gbtn { display: flex; justify-content: center; min-height: 44px; }
.mdl .linebtn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #06C755; color: #fff; border-radius: 6px; min-height: 42px; font-weight: 700; font-size: 14px; text-decoration: none; }
.mdl .linebtn:hover { background: #05b34c; text-decoration: none; }
.mdl .linebtn b { background: #fff; color: #06C755; border-radius: 5px; padding: 1px 5px; font-size: 11px; }
.mdl .notify { margin: 12px 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.mdl .notify p { margin: 6px 0 10px; font-size: 12px; }
.mdl .x { float: right; border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--ink-3); cursor: pointer; }
.mdl .note2 { font-size: 11px; color: var(--ink-3); }
.mdl .menu { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mdl .menu button { justify-content: center; }
@media (max-width: 720px) { .acct span { display: none; } }
/* 用語解説 */
.term { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 4px; border-radius: 50%; border: 1px solid var(--ink-3); color: var(--ink-2); font-size: 10px; font-weight: 700; background: transparent; padding: 0; cursor: help; vertical-align: 1px; font-family: var(--f-body); line-height: 1; }
.term:hover, .term:focus { border-color: var(--accent); color: var(--accent); }
.tip { position: absolute; z-index: 60; max-width: 300px; background: #111827; color: #f3f4f6; border-radius: 10px; padding: 11px 13px; font-size: 13px; line-height: 1.65; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.tip b { color: #fff; } .tip small { color: #9ca3af; display: block; margin-top: 4px; font-size: 12px; }
/* 共通ボタン */
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.on { background: #fff8e1; border-color: #e6a700; color: #7a5300; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn svg { flex: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #111827; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13px; z-index: 80; }

/* ---------------- 各ページ共通 */
.page { padding-block: 24px 40px; display: flex; flex-direction: column; gap: 20px; }
.page > section { scroll-margin-top: 70px; }
.ph { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; margin-bottom: 10px; }
.ph h1 { margin: 0; font-family: var(--f-display); font-weight: 900; font-size: clamp(24px, 3vw, 30px); line-height: 1.3; }
.ph h2 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 18px; display: inline-flex; align-items: center; }
.ph h2.big { font-size: 22px; font-weight: 900; }
.ph.top { margin-bottom: 0; align-items: flex-end; }
.ph .note, .note { color: var(--ink-3); font-size: 12px; }
.sub { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.crumb { font-size: 12px; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; min-width: 0; }
.foot { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); }
.pos { color: var(--up); } .neg { color: var(--down); }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.split { display: flex; flex-wrap: wrap; gap: 16px; }
.split > .card:first-child { flex: 999 1 600px; } .split > .card:last-child { flex: 1 1 340px; }
.cta { align-self: center; display: inline-flex; padding: 12px 22px; border: 1px solid var(--accent); border-radius: 8px; font-weight: 700; }
.cta:hover { background: var(--accent-soft); text-decoration: none; }
.mini { font-size: 12px; }
/* 指数カード */
.icards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.icard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.icard .lbl { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.icard .v { font-size: 21px; font-weight: 600; }
.icard .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.icard svg { max-width: 55%; height: auto; }
/* ヒートマップ */
.heat { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 64px; gap: 4px; }
.tile { border-radius: 6px; padding: 6px 8px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; overflow: hidden; font-family: var(--f-num); font-size: 12px; }
.tile:hover { text-decoration: none; outline: 2px solid var(--ink); }
.tile b { font-size: 13px; }
.tile .nm { flex-shrink: 0; font-family: var(--f-body); font-size: 10.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; margin-top: 1px; }
.tile.s4 .nm { font-size: 14px; white-space: normal; } .tile.s3 .nm { font-size: 13px; white-space: normal; } .tile.s2 .nm { font-size: 12px; }
.tile > span { margin-top: auto; }
.tile.s4 { grid-column: span 4; grid-row: span 2; } .tile.s4 b { font-size: 18px; } .tile.s4 span { font-size: 14px; }
.tile.s3 { grid-column: span 3; grid-row: span 2; } .tile.s3 b { font-size: 16px; }
.tile.s2 { grid-column: span 2; grid-row: span 2; }
.tile.s1 { grid-column: span 2; } .tile.s1 .nm { font-size: 11px; }
.su { background: #12784a; color: #fff; } .mu { background: #3f9d6f; color: #fff; } .wu { background: #b7dcc6; color: #0d3d26; }
.fl { background: #d5dbe1; color: #2b3542; }
.wd { background: #f0c3bf; color: #5c1712; } .md { background: #d4645b; color: #fff; } .sd { background: #a8281f; color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.legend .tile { display: inline-block; padding: 2px 8px; font-size: 11px; }
@media (max-width: 720px) {
  .heat { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 60px; }
  .tile.s4 { grid-column: span 3; } .tile.s3, .tile.s2 { grid-column: span 3; grid-row: span 1; } .tile.s1 { grid-column: span 2; }
}
/* セクター棒 */
.sbars { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.sbar { display: grid; grid-template-columns: 11.5em 1fr 4.6em; gap: 8px; align-items: center; }
.sbar .track { display: flex; height: 12px; } .sbar .half { flex: 1; display: flex; } .sbar .half:first-child { justify-content: flex-end; }
.sbar i { display: block; height: 100%; } .sbar i.up { background: var(--up); border-radius: 0 3px 3px 0; } .sbar i.dn { background: var(--down); border-radius: 3px 0 0 3px; }
.sbar .num { text-align: right; }
/* ランキングカード */
.rks { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.rk { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; min-width: 0; }
.rk h3 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 16px; }
.rk .lead { margin: 0 0 6px; font-size: 12px; color: var(--ink-3); }
.li { display: grid; grid-template-columns: 18px 62px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.li .no { font-family: var(--f-num); font-size: 12px; color: var(--ink-3); }
.li .nm { line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.tk { font-family: var(--f-num); font-weight: 600; }
.more { margin-top: 8px; font-size: 13px; font-weight: 600; }
.earnstrip { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.earnstrip h2 { margin: 0; font-family: var(--f-display); font-size: 18px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.pill { display: inline-block; background: var(--accent-soft); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--accent); }
.pill:hover { text-decoration: none; filter: brightness(.97); }
/* 表 */
.tbl-wrap { overflow-x: auto; }
.rtbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.rtbl th { font-size: 12px; color: var(--ink-2); font-weight: 500; text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rtbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); text-align: right; white-space: nowrap; }
.rtbl th.l, .rtbl td.l { text-align: left; }
.rtbl td.l, .ctbl td.lbl { font-family: var(--f-body); } .rtbl td.l.muted { font-size: 12px; } .rtbl td .tk, .ctbl .tk { font-family: var(--f-num); }
.rtbl td.em { font-weight: 700; }
.rtbl th.sort { cursor: pointer; user-select: none; } .rtbl th.sort:hover { color: var(--ink); } .rtbl th.on { color: var(--ink); font-weight: 700; }
.rtbl tr:hover td { background: var(--surface-2); }
.morebtn { display: block; margin: 12px auto 0; font: inherit; font-size: 13px; padding: 8px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--accent); cursor: pointer; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.tabs a, .tabs button { border: 0; background: transparent; font: inherit; font-size: 14px; padding: 9px 2px; color: var(--ink-2); cursor: pointer; box-shadow: none; }
.tabs .on { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
nav.tabs { position: sticky; top: 0; background: var(--bg); z-index: 5; padding-top: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 0; align-items: flex-end; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.filters select, .filters input { font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); min-height: 36px; }
/* 配当カレンダー */
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; }
.day { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.day > b { font-size: 14px; }
.ev { display: flex; flex-direction: column; padding: 7px 9px; border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.ev .tk { font-size: 13px; }
/* スクリーナー */
.presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.presets button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12px; cursor: pointer; color: var(--ink); }
.presets button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.scr { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.scr-f { flex: 1 1 270px; padding-top: 6px; order: -1; }
.scrtoggle { display: none; }
@media (max-width: 720px) { .scrtoggle { display: inline-flex; } .scr-f { display: none; } .scr-f.open { display: block; } }
.scr-r { flex: 999 1 620px; grid-template-columns: minmax(0, 1fr); }
.scr-r > * { min-width: 0; }   /* 中の表が枠を押し広げないように（表は枠の中で横にスクロール） */
.grp { padding: 12px 0; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.grp h3 { margin: 0; font-size: 13px; }
.rng { display: grid; grid-template-columns: 1fr auto 1fr 22px; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-2); }
.rng .lbl { grid-column: 1 / -1; display: flex; align-items: center; }
.rng input, .scr-f select { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; min-height: 34px; background: var(--surface); color: var(--ink); }
.rng .x { border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 16px; padding: 0; }
.scr-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.scr-h .big { font-size: 22px; }
/* スクリーナー：表／散布図の切り替えと散布図 */
.scr-view { margin: 6px 0 10px; } .scr-view button { font-size: 13px; padding: 7px 14px; }
.scr-plot { display: flex; flex-direction: column; gap: 10px; } .scr-plot[hidden] { display: none; }
.sp-pre { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-pre button { font: inherit; font-size: 12.5px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.sp-pre button.on { background: var(--accent); border-color: var(--accent); color: var(--surface); font-weight: 700; }
.sp-ctl { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; color: var(--ink-2); }
.sp-ctl select { min-height: 34px; max-width: 220px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font: inherit; background: var(--surface); color: var(--ink); }
.sp-ctl .sp-reset { margin-left: auto; font-size: 12px; padding: 6px 10px; }
.sp-chart { height: 580px; width: 100%; }
@media (max-width: 720px) { .sp-chart { height: 480px; } .sp-ctl select { max-width: 100%; } }
/* 銘柄の列：ティッカーの下に社名を小さく。スマホでは列の幅を抑え、ほかの列が見えるようにする */
.scr-nm .nm { display: block; font-size: 11.5px; color: var(--ink-2); max-width: 15em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }
#scrTbl td:first-child, #scrTbl th:first-child { box-shadow: 1px 0 0 var(--line); }
@media (max-width: 720px) { .scr-nm .nm { max-width: 7em; } #scrTbl td.scr-nm { padding-right: 8px; }
  /* スマホではセクターの列を省き、指標の列が見える幅を広げる（セクターはスクリーナーの条件で絞り込める） */
  #scrTbl th:nth-child(2), #scrTbl td:nth-child(2) { display: none; } }
.chip { display: inline-flex; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; margin: 2px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.colpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; font-size: 13px; }
/* 比較 */
.cmpadd { width: 300px; max-width: 100%; }
.cmpadd input { width: 100%; font: inherit; font-size: 13px; padding: 8px 12px 8px 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.cmpadd .sugg { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin: 6px 0 0; padding: 4px 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; max-height: 50vh; overflow: auto; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.cmpadd .sugg a { display: flex; gap: 10px; padding: 7px 12px; color: var(--ink); font-size: 13px; }
.cmpadd .sugg a:hover { background: var(--surface-2); text-decoration: none; }
.ctbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.ctbl th, .ctbl td { padding: 9px 14px; border-bottom: 1px solid var(--line-2); text-align: right; white-space: nowrap; }
.ctbl td.lbl, .ctbl th.lbl { text-align: left; color: var(--ink-2); font-weight: 500; }
.ctbl tr.g td { background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--ink); text-align: left; }
.ctbl .hd { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ctbl .hd span { font-size: 12px; color: var(--ink-2); font-weight: 400; }
.ctbl .x { border: 0; background: transparent; color: var(--ink-3); font: inherit; font-size: 11px; cursor: pointer; padding: 0; }
.best { background: #e6f4ec; color: #0d5c38; font-weight: 700; border-radius: 4px; padding: 2px 6px; }
.empty { color: var(--ink-2); padding: 16px 4px; }
.chart { width: 100%; height: 300px; }
/* 指数ページ・リンクになったカード */
a.icard { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.icard:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(29,79,140,.10); text-decoration: none; }
a.icard .more2 { color: var(--accent); }
.quote2 { text-align: right; } .quote2 .v { font-size: 30px; font-weight: 700; } .quote2 .chg { font-weight: 700; }
.desc2 { margin: 0 0 12px; line-height: 1.9; max-width: 62em; }
.chart.tall { height: 360px; margin-top: 10px; }
.yrbars { display: flex; align-items: flex-end; gap: 4px; height: 200px; overflow-x: auto; padding-top: 18px; }
.yrbars .yb { flex: 1 0 34px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 11px; font-family: var(--f-num); position: relative; }
.yrbars .yb .half { flex: 1; width: 70%; display: flex; }
.yrbars .yb .half.top { align-items: flex-end; } .yrbars .yb .half.bot { align-items: flex-start; }
.yrbars .yb i { display: block; width: 100%; border-radius: 3px; }
.yrbars .yb i.up { background: var(--up); } .yrbars .yb i.dn { background: var(--down); }
.yrbars .yb .yl { color: var(--ink-3); margin-top: 4px; } .yrbars .yb .yv { font-size: 10px; }
.ixstat { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.ixstat .rng52 { height: 8px; border-radius: 4px; background: var(--surface-2); position: relative; margin: 6px 0 2px; }
.ixstat .rng52 i { position: absolute; top: -4px; width: 4px; height: 16px; border-radius: 2px; background: var(--accent); }
.ixstat .kv2 { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-2); padding-bottom: 6px; }
/* ETF */
.ctbl2 tr.g td { background: var(--surface-2); font-size: 12px; font-weight: 700; text-align: left; }
.etfrow { display: flex; flex-wrap: wrap; gap: 16px 32px; }
.etfk { flex: 1 1 300px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; align-content: start; }
.etfk > div { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-2); }
.etfk b { font-size: 18px; color: var(--ink); }
.etfk > div:last-child { grid-column: 1 / -1; }
.etfsec { flex: 1 1 340px; }
.etfsec .sbar { grid-template-columns: 9em 1fr 4em; }

/* ポートフォリオ */
.pfintro summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.pfintro summary::-webkit-details-marker { display: none; }
.pfintro summary::after { content: "Close ▲"; font-size: 12px; color: var(--accent); white-space: nowrap; }
.pfintro details:not([open]) summary::after { content: "Open ▼"; }
.pfintro details:not([open]) h2 { margin: 0; }
.pfintro h2 { margin: 0 0 8px; font-family: var(--f-display); font-size: 18px; }
.pfintro > p { margin: 0 0 14px; max-width: 62em; line-height: 1.85; }
.pfintro > p.foot { max-width: none; margin: 12px 0 0; }
.merits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.merits > div { background: var(--surface-2); border-radius: 10px; padding: 14px 16px; }
.merits h3 { margin: 0 0 6px; font-size: 14px; color: var(--accent); }
.merits p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.lead2 { margin: -2px 0 14px; font-size: 13px; line-height: 1.8; color: var(--ink-2); max-width: 70em; }
.sugg li.sghd { display: flex; justify-content: space-between; gap: 8px; padding: 6px 12px; font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--line-2); }
.sugg li.sghd a { color: var(--accent); font-weight: 600; padding: 0; }
.pfadd .cmpadd { width: 360px; }
.pfadd { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 10px; }
.pftbl td, .pftbl th { vertical-align: middle; }
.pftbl input, .pftbl select, .simf input, .simf select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); min-height: 32px; box-sizing: border-box; }
.pftbl input { width: 92px; text-align: right; font-family: var(--f-num); }
.pftbl .qty { display: flex; gap: 4px; justify-content: flex-end; }
.pftbl .qty select, .pftbl .cost select { width: auto; }
.pftbl .cost { display: flex; gap: 4px; justify-content: flex-end; }
.pf .sub2 { display: block; font-size: 11px; color: var(--ink-3); }
#pfBody { display: flex; flex-direction: column; gap: 20px; }
.pf .icard .row { white-space: normal; }
.pftbl th, .pftbl td { padding: 8px 6px; }
@media (max-width: 720px) {
  .pftbl { min-width: 0; } .pftbl thead { display: none; }
  .pftbl tbody tr, .pftbl tfoot tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); position: relative; }
  .pftbl td { border: 0; padding: 0; white-space: normal; text-align: left; }
  .pftbl td.l { grid-column: 1 / -1; }
  .pftbl td[data-l="Holding"], .pftbl td[data-l="Purchase info"] { grid-column: 1 / -1; }
  .pftbl td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 2px; }
  .pftbl .qty, .pftbl .cost { justify-content: flex-start; }
  .pftbl input { width: 120px; }
  .pftbl td.rm { text-align: right; align-self: end; }
  .pftbl td.rm .x { font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; }
  .pftbl td.rm .x::after { content: " Remove"; }
  .pftbl td.hm, .pftbl tfoot td:empty { display: none; }
  .pftbl tr:hover td { background: transparent; }
}
.pftbl tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.pftbl .x { border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 16px; padding: 2px 6px; }
.pftbl .x:hover { color: var(--down); }
.pftbl tbody tr { cursor: default; }
.checks { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.checks li::before { content: "●"; font-size: 10px; margin-top: 5px; color: var(--ink-3); }
.checks li.warn { background: #fff4e0; color: #6b4300; } .checks li.warn::before { color: #e08a2c; }
.checks li.ok::before { color: var(--up); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .checks li.warn { background: #3a2c12; color: #f5d7a1; } }
:root[data-theme="dark"] .checks li.warn { background: #3a2c12; color: #f5d7a1; }
.h3 { margin: 6px 0 10px; font-size: 14px; }
.pfsplit > div { flex: 1 1 340px; min-width: 0; }
.cmpbars { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.cb { display: grid; grid-template-columns: 9.5em 1fr 9em; gap: 8px; align-items: center; }
.cb .bars { display: flex; flex-direction: column; gap: 2px; }
.cb .bars i { display: block; height: 8px; border-radius: 0 3px 3px 0; }
.cb .bars i.me { background: var(--accent); } .cb .bars i.sp { background: var(--ink-3); opacity: .45; }
.cb .num { text-align: right; font-size: 12px; }
.cb.over .num b { color: #c2410c; }
.mix { display: flex; flex-direction: column; gap: 12px; }
.mix .row { font-size: 13px; }
.mix .bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin: 4px 0; background: var(--surface-2); }
.mix .bar i { display: block; height: 100%; }
.mix .lg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-2); }
.mix .lg span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; background: var(--c); }
.chart.short { height: 240px; }
.chart.tall2 { height: 380px; }
.corr { border-collapse: collapse; font-size: 12px; font-family: var(--f-num); }
.corr th, .corr td { padding: 6px 8px; text-align: center; border: 1px solid var(--surface); }
.corr th { color: var(--ink-2); font-weight: 600; }
.legend-line { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); }

/* 図鑑をめくる */
.zk { padding-block: 18px 30px; }
main.zk > .wrap { padding-block: 0; gap: 12px; }
main.zk > .wrap.zk-bar { display: flex; }
.zk-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; margin-bottom: 14px; }
.zk-title { display: flex; align-items: baseline; gap: 14px; }
.zk-title h1 { margin: 0; font-family: var(--f-display); font-weight: 900; font-size: 24px; }
.zk-ctrl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zk-ctrl select { font: inherit; font-size: 13px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); min-height: 32px; }
.zk-stage { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 12px; align-items: start; }
.zk-nav { margin-top: 200px; }
.zk-nav { height: 96px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-2); font-size: 34px; line-height: 1; cursor: pointer; }
.zk-nav:hover { border-color: var(--accent); color: var(--accent); }
.zk-deck { position: relative; perspective: 1800px; min-height: 520px; }
.zk-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 24px rgba(17,26,36,.08); overflow: hidden; transform-origin: left center; }
.zk-card.out-l { animation: zkOutL .32s ease-in forwards; } .zk-card.in-r { animation: zkInR .32s ease-out; }
.zk-card.out-r { animation: zkOutR .32s ease-in forwards; } .zk-card.in-l { animation: zkInL .32s ease-out; }
@keyframes zkOutL { to { transform: rotateY(-35deg) translateX(-40px); opacity: 0; } }
@keyframes zkInR { from { transform: translateX(40px); opacity: 0; } }
@keyframes zkOutR { to { transform: translateX(40px); opacity: 0; } }
@keyframes zkInL { from { transform: rotateY(-35deg) translateX(-40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .zk-card { animation: none !important; } }
.zk-band { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 22px; background: var(--accent); color: #fff; font-size: 13px; }
.zk-band b { font-family: var(--f-display); font-size: 14px; letter-spacing: .04em; }
.zk-band .no { font-family: var(--f-num); opacity: .85; }
.zk-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px 28px; padding: 22px 26px 24px; }
.zk-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: flex-end; grid-column: 1 / -1; border-bottom: 1px solid var(--line-2); padding-bottom: 14px; }
.zk-head h2 { margin: 0; font-family: var(--f-display); font-weight: 900; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.25; }
.zk-head .en { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.zk-head .tk { font-size: 15px; margin-right: 8px; }
.zk-px { text-align: right; }
.zk-px .v { font-family: var(--f-num); font-size: 26px; font-weight: 700; }
.zk-px .c { font-family: var(--f-num); font-size: 14px; font-weight: 700; }
.zk-desc { margin: 0 0 14px; font-size: 14px; line-height: 1.9; }
.zk-unit { font-size: 11px; font-weight: 400; color: var(--ink-3); }
.zk-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.zk-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--ink); }
.zk-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.zk-tag.div::before { background: #e6a700; } .zk-tag.up::before { background: var(--up); } .zk-tag.q::before { background: var(--accent); } .zk-tag.val::before { background: #7c5cc4; }
.zk-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.zk-kv > div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.zk-kv span { display: block; font-size: 11px; color: var(--ink-3); }
.zk-kv b { font-family: var(--f-num); font-size: 17px; }
.zk-chart { height: 230px; }
.zk-chartcap { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.zk-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.zk-hint { font-size: 12px; text-align: center; margin-top: 12px; }
.zk-fin { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.zk-sec { padding: 18px 22px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); min-width: 0; }
.zk-sec:nth-child(3n + 1):not(.wide) { border-right: 1px solid var(--line-2); }
.zk-sec.wide { grid-column: 1 / -1; border-right: 0; }
.zk-sec h3 { margin: 0 0 10px; font-family: var(--f-display); font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; }
.zk-sec h3 small { font-family: var(--f-body); font-weight: 400; font-size: 11px; color: var(--ink-3); }
.zk-finchart { height: 210px; margin-bottom: 8px; }
.zk-ft { font-size: 13px; } .zk-ft td, .zk-ft th { padding: 6px 8px; }
.zk-ft tbody tr { cursor: default; }
.zk-ft-note { display: none; margin: 6px 0 0; font-size: 11.5px; }
.zk-fx { margin: 8px 0 0; font-size: 11.5px; line-height: 1.6; }
.zk-ins { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 24px; }
.zk-ins-i h3 { margin: 6px 0 4px; }
.zk-ins-i p, .zk-ins-i li { margin: 0; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.zk-ins-i ul { margin: 0; padding-left: 1.2em; }
.zk-ins-i .zk-ins-src { margin-top: 2px; font-size: 11px; color: var(--ink-3); }
@media (max-width: 620px) { .zk-ft .o { display: none; } .zk-ft-note { display: block; } .zk-ft { font-size: 12px; width: 100%; } .zk-ft td, .zk-ft th { padding: 6px 4px; } .zk-ft td.l { white-space: normal; min-width: 5.5em; } .zk-ft td.num { letter-spacing: -0.02em; } }
@media (max-width: 400px) { .zk-fin > .zk-sec { padding-inline: 10px; } .zk-ft { font-size: 11.5px; } .zk-ft td, .zk-ft th { padding: 6px 3px; } }
.zk-dl { margin: 0; display: flex; flex-direction: column; }
.zk-dl > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.zk-dl dt { color: var(--ink-2); } .zk-dl dd { margin: 0; font-family: var(--f-num); font-weight: 600; text-align: right; }
@media (max-width: 980px) { .zk-fin { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .zk-fin { grid-template-columns: minmax(0, 1fr); } .zk-sec { border-right: 0; padding: 16px 18px; } }
.zk-nav { position: sticky; top: 40vh; }

/* 図鑑：タブ・ツールバー・一覧・目次・索引・棚 */
.zk-title { flex-wrap: wrap; }
.zk-read { font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.zk-read b { font-family: var(--f-num); color: var(--ink); }
.zk-pbar { display: inline-block; width: 120px; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; vertical-align: middle; }
.zk-pbar.sm { width: 64px; height: 5px; }
.zk-pbar i { display: block; height: 100%; background: #e6a700; border-radius: 99px; }
.zk-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); width: 100%; }
.zk-tabs button { flex: none; font: inherit; font-size: 14px; font-weight: 600; padding: 10px 16px; border: 0; background: none; color: var(--ink-2); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.zk-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.zk-tabs button:hover:not(.on) { color: var(--ink); }
.zk-tabs .n { font-size: 11px; font-family: var(--f-num); color: var(--ink-3); font-weight: 400; }
.zk-tabs .n:empty { display: none; }
main.zk > .wrap.zk-v { display: block; } .zk-v[hidden], .zk-stage[hidden] { display: none !important; }
.zk-tool { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 8px; }
.zk-tl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.zk-tool select, .zk-filter select { font: inherit; font-size: 13px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); min-height: 32px; max-width: 100%; }
.zk-tool select[hidden], .seg[hidden] { display: none; }
.zk-posn { font-family: var(--f-num); font-size: 13px; }
.zk-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.zk-chip button { border: 0; background: none; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 6px; }
.zk-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.zk-filter label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.zk-clear { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.zk-new, .zk-seen { display: inline-block; margin-right: 10px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.zk-new { background: #ffc83d; color: #4a3500; } .zk-seen { background: rgba(255,255,255,.2); }
.zk-bm.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.ck { font-style: normal; color: #1a8a4a; font-weight: 700; }
.zk-nb { margin-top: 18px; }
.zk-nb h3 { margin: 0 0 8px; font-family: var(--f-display); font-size: 14px; } .zk-nb h3 small { font-family: var(--f-body); font-weight: 400; font-size: 11px; color: var(--ink-3); margin-left: 6px; }
.zk-nbi { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; margin-bottom: 6px; }
.zk-nbi:hover { border-color: var(--accent); }
.zk-nbi b { font-size: 13px; } .zk-nbi small { margin-left: 8px; color: var(--ink-3); font-size: 11px; }
.zk-nbi .m { font-family: var(--f-num); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.zk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.zk-gh { font-family: var(--f-display); font-size: 16px; margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--accent); }
.zk-gh:first-child { margin-top: 0; }
.zk-mini { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0 12px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; overflow: hidden; min-width: 0; }
.zk-mini:hover { border-color: var(--accent); text-decoration: none; box-shadow: 0 4px 14px rgba(17,26,36,.08); }
.zk-mini .b { margin: 0 -12px 4px; padding: 4px 12px; background: var(--accent); color: #fff; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zk-mini.seen .b { background: color-mix(in srgb, var(--accent) 55%, var(--surface)); }
.zk-mini .t { display: flex; align-items: center; gap: 6px; font-size: 13px; } .zk-mini .t .bmk { color: var(--accent); display: inline-flex; } .zk-mini .t .ck { margin-left: auto; }
.zk-mini .nm { font-weight: 700; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.zk-mini .r { display: flex; justify-content: space-between; font-family: var(--f-num); font-size: 12px; color: var(--ink-2); }
.zk-mini .tg { align-self: flex-start; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zk-more { text-align: center; margin-top: 16px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zk-mini .b { background: #1d4f8c; } :root:not([data-theme="light"]) .zk-mini.seen .b { background: #34557d; } }
.zk-lead { margin: 0 0 14px; font-size: 13px; }
.zk-toc { columns: 2 420px; column-gap: 20px; }
.zk-chap { break-inside: avoid; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.zk-chap h2 { margin: 0 0 6px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; font-size: 16px; }
.zk-chap h2 .zk-go { font-family: var(--f-display); font-weight: 900; font-size: 16px; }
.zk-chap .no { color: var(--accent); margin-right: 8px; }
.zk-chap ul { list-style: none; margin: 0; padding: 0; }
.zk-chap li .zk-go { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 6px 4px; border-top: 1px dashed var(--line-2); font-size: 13px; text-align: left; }
.zk-go { font: inherit; border: 0; background: none; color: var(--ink); cursor: pointer; padding: 0; }
.zk-go:hover { color: var(--accent); }
.zk-cnt { font-family: var(--f-num); font-size: 12px; color: var(--ink-3); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.zk-idxbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.zk-idxbar input { font: inherit; font-size: 14px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); min-width: 0; flex: 1 1 220px; max-width: 360px; }
.zk-keys { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.zk-keys button { min-width: 38px; height: 36px; padding: 0 8px; font: inherit; font-size: 14px; font-weight: 700; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
.zk-keys button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.zk-keys button:disabled { opacity: .35; cursor: default; }
.zk-idxn { font-size: 12px; margin: 0 0 6px; }
.zk-idx { list-style: none; margin: 0; padding: 0; columns: 3 260px; column-gap: 18px; }
.zk-idxi { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; width: 100%; text-align: left; font: inherit; border: 0; border-bottom: 1px dashed var(--line-2); background: none; color: var(--ink); padding: 7px 2px; cursor: pointer; break-inside: avoid; }
.zk-idxi:hover .nm { color: var(--accent); }
.zk-idxi .nm { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zk-idxi .tk { font-family: var(--f-num); font-size: 12px; color: var(--ink-2); }
.zk-idxi .in { grid-column: 1 / -1; font-size: 11px; color: var(--ink-3); }
.zk-shelf { margin-bottom: 26px; }
.zk-sh { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 16px; margin-bottom: 10px; }
.zk-sh h2 { margin: 0; font-family: var(--f-display); font-size: 18px; } .zk-sh p { margin: 2px 0 0; font-size: 13px; }
.zk-sha { display: flex; gap: 8px; flex-wrap: wrap; }
.zk-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 190px; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.zk-strip .zk-mini { scroll-snap-align: start; }
.zk-note { font-size: 12px; text-align: center; }
@media (max-width: 620px) {
  .zk-pbar { width: 70px; }
  .zk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .zk-strip { grid-auto-columns: 160px; }
  .zk-filter { gap: 8px 12px; padding: 10px 12px; }
  .zk-tabs button { padding: 10px 12px; }
}
.zk-flip { display: none; }
@media (max-width: 820px) {
  .zk-flip:not([hidden]) { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 30;
    flex-wrap: nowrap; align-items: center; gap: 6px; padding: 8px; border-radius: 16px; background: var(--ink); color: var(--bg); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
  .zk-flip button { font: inherit; border: 0; cursor: pointer; min-height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
  .zk-flip-prev { width: 48px; flex: none; background: rgba(127,127,127,.22); color: inherit; }
  .zk-flip-next { flex: none; max-width: 52%; gap: 4px; padding: 0 12px; background: var(--bg); color: var(--ink); font-weight: 700; }
  .zk-flip-next span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .zk-flip-mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; }
  .zk-flip-pos { font-family: var(--f-num); font-size: 12px; opacity: .8; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .zk-flip-prog { display: block; width: 100%; max-width: 120px; height: 4px; border-radius: 2px; background: rgba(127,127,127,.35); overflow: hidden; }
  .zk-flip-prog i { display: block; height: 100%; background: var(--accent-soft); border-radius: 2px; }
  #zkV-read { padding-bottom: 84px; }
  .zk-stage { grid-template-columns: minmax(0, 1fr); }
  .zk-nav { display: none; }
  .zk-body { grid-template-columns: minmax(0, 1fr); padding: 18px 18px 20px; }
  .zk-deck { min-height: 0; }
  .zk-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
