:root {
  --accent: #0fb8ac;
  --accent-dark: #0a8f86;
  --accent-soft: #e6f7f5;
  --navy: #232838;
  --bg: #f4f6f8;
  --card: #ffffff;
  --border: #e1e5ea;
  --text: #29303d;
  --text-mute: #737c8c;
  --pos: #d6483e;
  --pos-soft: #f3c1bc;
  --neg: #266ec8;
  --neg-soft: #bcd3ef;
  --zero: #eef0f3;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

[hidden] { display: none !important; }

/* ===== Header / Footer（EAビルダー・相関係数ヒートマップと共通デザイン） ===== */
.site-mini-header {
  min-height: 64px; background: #fff; border-bottom: 1px solid #e5e8ec;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 28px;
}
.site-brand { color: #181c25; text-decoration: none; font-size: 18px; font-weight: 700; }
.back-blog {
  color: #566071; font-size: 13px; text-decoration: none; white-space: nowrap;
  padding: 8px 14px; border: 1px solid #dce1e7; border-radius: 6px;
}
.back-blog:hover { background: #f4f6f8; }

.ea-footer { background: #202533; color: #aeb5c3; text-align: center; padding: 22px 20px; font-size: 12px; }
.ea-footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; margin-bottom: 12px; }
.ea-footer-nav a { color: #d9dde5; text-decoration: none; }
.ea-footer-nav a:hover { color: #fff; }

/* ===== Layout ===== */
.cs { max-width: 1120px; margin: 0 auto; padding: 24px 20px 48px; overflow-wrap: anywhere; }
.cs > * { min-width: 0; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; margin-bottom: 18px; }
.card h2 { font-size: 19px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.h-ico {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark);
}
.h-ico svg { width: 19px; height: 19px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card-lead { margin: 0 0 14px; font-size: 14px; }
.period-note { font-size: 12px; color: var(--text-mute); }
.hint { font-size: 12px; color: var(--text-mute); margin: 10px 0 0; }

.hero {
  background: linear-gradient(135deg, #dff5f2 0%, #f5f8fa 55%, #eaf0f8 100%);
  border: 1px solid #d6ebe7; border-radius: 18px; padding: 28px 32px 24px; margin-bottom: 14px;
}
.hero-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent-dark); background: #fff;
  border: 1px solid #bfe9e4; border-radius: 20px; padding: 2px 12px; margin: 0 0 10px;
}
.hero h1 { font-size: 32px; margin: 0 0 8px; letter-spacing: .02em; line-height: 1.3; }
.hero-lead { margin: 0 0 14px; font-size: 15px; }
.headline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hl-item { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; min-width: 0; }
.hl-item small { display: block; font-size: 11px; font-weight: 700; color: var(--text-mute); }
.hl-item b { display: flex; align-items: center; gap: 8px; font-size: 18px; line-height: 1.4; }
.hl-item .v { font-size: 14px; font-variant-numeric: tabular-nums; }

/* ===== Toolbar（期間の切り替え） ===== */
.toolbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px;
  background: rgba(244, 246, 248, .94); backdrop-filter: blur(6px);
  padding: 10px 0; margin-bottom: 8px;
}
.tb-left { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.tb-label { font-size: 12px; font-weight: 700; color: var(--text-mute); }
.tb-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.updated { font-size: 12px; color: var(--text-mute); display: flex; align-items: center; gap: 6px; }
.updated .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.updated .dot.stale { background: #b8bec8; }
.updated .demo { background: #fff4d6; color: #8a6400; border-radius: 10px; padding: 1px 8px; font-weight: 700; }

/* ===== Buttons / Inputs ===== */
.btn {
  border: none; border-radius: var(--radius); padding: 9px 16px; font-size: 14px;
  cursor: pointer; font-weight: 700; text-decoration: none; display: inline-block; font-family: inherit; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.select { font: inherit; font-size: 13px; color: var(--text); border: 1px solid #cfd5dd; border-radius: var(--radius); padding: 6px 10px; background: #fff; max-width: 100%; }

.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid #cfd5dd; border-radius: var(--radius); overflow: hidden; background: #fff; }
.seg button { font: inherit; font-size: 14px; border: none; background: #fff; color: var(--text); padding: 6px 14px; cursor: pointer; border-right: 1px solid #e3e7ec; }
.seg button:last-child { border-right: none; }
.seg button:hover { background: #f2f5f7; }
.seg button.on { background: var(--navy); color: #fff; font-weight: 700; }
.seg-sm button { font-size: 13px; padding: 5px 12px; }

/* ===== 左右に伸びる棒グラフ（ランキング・通貨別） ===== */
.div-legend { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; margin: 0 0 6px; padding-left: 104px; }
.dl-neg { color: var(--neg); }
.dl-pos { color: var(--pos); }
.dbar-list { display: flex; flex-direction: column; }
.dbar {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 8px;
  width: 100%; font: inherit; color: inherit; text-align: left; background: none; border: none; border-radius: 6px;
  padding: 3px 4px; min-height: 30px; cursor: pointer;
}
.dbar:hover, .dbar.open { background: #f4f7f9; }
.dbar-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.dbar-name.minor { color: #566071; }
.dbar-track { position: relative; height: 22px; }
.dbar-track::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; border-left: 1px solid #c9cfd8; }
.dbar-fill { position: absolute; top: 4px; height: 14px; }
.dbar-fill.pos { left: 50%; background: var(--pos); border-radius: 0 4px 4px 0; }
.dbar-fill.neg { right: 50%; background: var(--neg); border-radius: 4px 0 0 4px; }
.dbar-val {
  position: absolute; top: 1px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text);
}
.dbar-sep { font-size: 11px; font-weight: 700; color: var(--text-mute); padding: 10px 4px 2px; border-top: 1px dashed var(--border); margin-top: 6px; }

.breakdown {
  margin: 2px 0 8px 104px; background: #f8fafb; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 13px;
}
.bd-eq { font-weight: 700; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.bd-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 8px; margin: 4px 0; }
.bd-row .dbar-track { height: 18px; }
.bd-row .dbar-fill { top: 3px; height: 12px; }
.bd-note { color: var(--text-mute); font-size: 12px; margin-top: 6px; }

.ccy-list .dbar { cursor: default; }
.ccy-list .dbar:hover { background: none; }

/* ===== Icons（国旗） ===== */
.ico {
  display: inline-block; position: relative; width: 20px; height: 20px; border-radius: 50%; overflow: hidden;
  background: #e9edf2; box-shadow: 0 0 0 1px rgba(20, 30, 50, .12); flex-shrink: 0;
}
.ico svg { display: block; width: 100%; height: 100%; }
.ico-pair { display: inline-flex; position: relative; flex-shrink: 0; width: 26px; height: 20px; }
.ico-pair .ico { position: absolute; left: 0; top: 0; width: 16px; height: 16px; }
.ico-pair .ico-sub { left: auto; top: auto; right: 0; bottom: 0; width: 12px; height: 12px; box-shadow: 0 0 0 1.5px #fff; }

/* ===== ヒートマップ ===== */
.hm-wrap { overflow-x: auto; }
.hm { border-collapse: separate; border-spacing: 2px; margin: 0 auto; font-variant-numeric: tabular-nums; }
.hm th { font-size: 12px; font-weight: 700; padding: 4px; white-space: nowrap; }
.hm th.hm-row { text-align: left; }
.hm th .hm-in { display: inline-flex; align-items: center; gap: 4px; }
.hm td { width: 66px; height: 40px; text-align: center; font-size: 12px; font-weight: 700; border-radius: 4px; }
.hm td.self { background: #f6f7f9; color: #b8bec8; }
.hm-corner { font-size: 10px !important; color: var(--text-mute); font-weight: 400 !important; }
.legend { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--text-mute); margin-top: 10px; }
.legend-bar { width: 180px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--neg), var(--zero), var(--pos)); }

/* ===== 時間足ごとの方向 ===== */
.table-wrap { overflow-x: auto; }
.mtf { border-collapse: separate; border-spacing: 0 2px; width: 100%; font-variant-numeric: tabular-nums; }
.mtf th { font-size: 12px; color: var(--text-mute); font-weight: 700; padding: 6px 8px; text-align: center; white-space: nowrap; }
.mtf th:first-child { text-align: left; }
.mtf td { padding: 6px 8px; text-align: center; font-size: 13px; white-space: nowrap; }
.mtf td.pair { text-align: left; font-weight: 700; }
.mtf td.pair span { display: inline-flex; align-items: center; gap: 6px; }
.mtf td.cell { border-radius: 4px; font-weight: 700; min-width: 64px; }
.mtf td.align { font-size: 12px; font-weight: 700; }
.align.up { color: var(--pos); }
.align.down { color: var(--neg); }
.align.mixed { color: var(--text-mute); font-weight: 400; }
.mtf tr.hl td.pair { color: var(--text); }
.mtf-more { text-align: center; margin-top: 8px; }
.link-btn { background: none; border: none; color: var(--accent-dark); cursor: pointer; font-size: 13px; padding: 4px 8px; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }

/* ===== サイバーシグナルとの違い ===== */
.promo {
  border-radius: 16px; overflow: hidden; margin-bottom: 18px;
  border: 2px solid var(--accent); box-shadow: 0 10px 30px rgba(15, 184, 172, .18); background: #fff;
}
.promo-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 20px 28px; align-items: center;
  background: linear-gradient(135deg, #1d2232 0%, #232838 55%, #0d4f4b 100%); color: #fff; padding: 28px 30px;
}
.promo-badge {
  display: inline-block; margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  color: #0d2b29; background: #5fe0d6; border-radius: 20px; padding: 2px 12px;
}
.promo-hero h2 { font-size: 24px; margin: 0 0 10px; line-height: 1.4; }
.promo-lead { margin: 0 0 16px; font-size: 14px; color: #d5dae4; }
.promo-lead b { color: #fff; background: linear-gradient(transparent 62%, rgba(95, 224, 214, .45) 62%); }
.promo-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.promo-points li { display: flex; gap: 10px; align-items: flex-start; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.promo-points small { display: block; color: #aeb5c3; font-size: 11.5px; line-height: 1.5; margin-top: 2px; }
.pp-ico { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; }
.pp-ico svg { width: 17px; height: 17px; }
.promo-body { padding: 22px 24px 24px; }
.cmp { border-collapse: collapse; width: 100%; font-size: 13px; }
.cmp th, .cmp td { border-bottom: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.cmp thead th { font-size: 13px; color: var(--text-mute); border-bottom: 2px solid var(--border); vertical-align: bottom; }
.cmp tbody th { white-space: nowrap; font-size: 12px; color: var(--text-mute); }
.cmp .cmp-pro { background: var(--accent-soft); border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.cmp thead .cmp-pro { background: var(--accent); color: #fff; font-size: 15px; border-radius: 10px 10px 0 0; border-bottom-color: var(--accent); }
.cmp tbody tr:last-child .cmp-pro { border-bottom: 2px solid var(--accent); }
.cmp-crown { display: block; font-size: 11px; font-weight: 700; color: #0d2b29; background: #ffd34d; border-radius: 10px; padding: 0 8px; width: max-content; margin-bottom: 4px; }
.cmp-yes, .cmp-no, .cmp-mid { font-weight: 800; margin-right: 4px; }
.cmp-yes { color: var(--pos); }
.cmp-mid { color: #b8890f; }
.cmp-no { color: #9aa3b0; }
.ind-fig { margin: 0; text-align: center; }
.ind-fig img { width: 100%; max-width: 170px; height: auto; display: block; margin: 0 auto; border-radius: 4px; box-shadow: 0 12px 28px rgba(0, 0, 0, .45); transform: rotate(-2deg); }
.ind-fig figcaption { font-size: 11px; color: #aeb5c3; margin-top: 10px; }
.promo-flow { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; margin: 18px 0 0; font-size: 14px; }
.promo-flow span:not(.arrow) { background: #f4f7f9; border: 1px solid var(--border); border-radius: 20px; padding: 4px 14px; }
.promo-flow .arrow { color: var(--accent-dark); font-weight: 800; font-size: 18px; }
.btn-cta {
  background: linear-gradient(180deg, #ffb238, #f08a00); color: #fff; font-size: 16px; padding: 14px 26px; border-radius: 10px;
  box-shadow: 0 4px 0 #b86a00, 0 8px 18px rgba(240, 138, 0, .35); transition: transform .1s, box-shadow .1s;
}
.btn-cta:hover { transform: translateY(2px); box-shadow: 0 2px 0 #b86a00, 0 6px 14px rgba(240, 138, 0, .35); }
.cta-big { margin-top: 18px; }
.cta-big b { font-size: 16px; }

/* ランキング直後の誘導バナー */
.teaser {
  display: flex; align-items: center; gap: 12px; margin: -6px 0 18px; padding: 12px 16px; text-decoration: none; color: #fff;
  background: linear-gradient(90deg, #232838, #0d4f4b); border-radius: 12px; box-shadow: 0 6px 16px rgba(35, 40, 56, .15);
}
.teaser:hover { filter: brightness(1.1); }
.teaser-badge { flex-shrink: 0; font-size: 11px; font-weight: 800; color: #0d2b29; background: #5fe0d6; border-radius: 6px; padding: 3px 8px; }
.teaser-text { flex: 1; min-width: 0; font-size: 14px; }
.teaser-text small { display: block; color: #aeb5c3; font-size: 12px; }
.teaser-arrow { font-size: 26px; line-height: 1; color: #5fe0d6; }

.cta {
  margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--navy); color: #fff; border-radius: 10px; padding: 18px 22px;
}
.cta p { margin: 4px 0 0; color: #c9cedb; font-size: 13px; }

/* ===== 通貨強弱の推移 ===== */
.line-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.lg-btn {
  font: inherit; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 16px; background: #fff; color: var(--text); padding: 3px 10px; cursor: pointer;
}
.lg-btn .sw { width: 14px; height: 3px; border-radius: 2px; }
.lg-btn .sw.dash { background-image: linear-gradient(90deg, currentColor 50%, transparent 50%) !important; background-size: 6px 3px; }
.lg-btn.off { color: #a6adb9; background: #f6f7f9; }
.lg-btn.off .sw { opacity: .3; }
.lg-btn small { font-weight: 400; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.line-chart { position: relative; }
.line-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.line-chart .axis text { font-size: 11px; fill: var(--text-mute); }
.line-chart .grid line { stroke: #eef1f4; }
.line-chart .zero { stroke: #c9cfd8; }
.tip {
  position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(35, 40, 56, .14); padding: 8px 10px; font-size: 12px; min-width: 130px; z-index: 5;
}
.tip b { display: block; margin-bottom: 4px; }
.tip .tr { display: flex; align-items: center; gap: 6px; justify-content: space-between; font-variant-numeric: tabular-nums; }
.tip .tr span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.tip .sw { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }

/* ===== 解説 ===== */
.guide h3 { font-size: 16px; margin: 26px 0 8px; padding-left: 10px; border-left: 4px solid var(--accent); }
.guide p, .guide li { font-size: 14px; }
.guide-list { padding-left: 22px; }
.guide-list li { margin-bottom: 10px; }
.faq dt { font-weight: 700; font-size: 14px; margin-top: 12px; }
.faq dt::before { content: "Q. "; color: var(--accent-dark); }
.faq dd { margin: 4px 0 0; font-size: 14px; }
.disclaimer { font-size: 12px !important; color: var(--text-mute); margin-top: 22px; }

.empty { color: var(--text-mute); font-size: 14px; padding: 20px 0; text-align: center; }

@media (max-width: 860px) {
  .promo-hero { grid-template-columns: minmax(0, 1fr); }
  .promo-points { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .site-mini-header { min-height: 48px; padding: 0 14px; }
  .site-brand { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .back-blog { font-size: 11px; padding: 6px 8px; }
  .cs { padding: 16px 16px 36px; }
  .card { padding: 16px 12px; }
  .card h2 { font-size: 17px; }
  .hero { padding: 20px 16px 16px; border-radius: 14px; }
  .hero h1 { font-size: 24px; }
  .hero-lead { font-size: 14px; }
  .headline { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .hl-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; }
  .hl-item b { font-size: 15px; }
  .toolbar { padding: 8px 0; }
  .seg button { padding: 6px 10px; font-size: 13px; }
  .dbar { grid-template-columns: 78px minmax(0, 1fr); gap: 4px; padding: 2px; }
  .dbar-name { font-size: 12px; gap: 4px; }
  .dbar-name .ico-pair { display: none; }
  .div-legend { padding-left: 82px; font-size: 11px; }
  .dl-sub, .tb-label { display: none; }
  .dbar-val { font-size: 11px; }
  .promo-hero { padding: 22px 16px; }
  .promo-hero h2 { font-size: 20px; }
  .promo-body { padding: 16px 12px 18px; }
  .cmp th, .cmp td { padding: 8px 6px; font-size: 12px; }
  .cmp tbody th { white-space: normal; min-width: 64px; }
  .cta-big { padding: 16px; }
  .btn-cta { width: 100%; text-align: center; white-space: normal; }
  .breakdown { margin-left: 0; }
  .hm td { width: auto; min-width: 38px; height: 32px; padding: 0 2px; font-size: 10px; white-space: nowrap; }
  .hm { border-spacing: 1px; }
  .hm th { font-size: 11px; padding: 2px; }
  .hm th .ico { display: none; }
  .mtf td, .mtf th { padding: 5px 4px; font-size: 12px; }
  .mtf td.cell { min-width: 52px; }
}
