/* 毎日マーケットラジオ｜マーケットレポート
   藍（夜明け前）＋朝日の金。上昇＝赤、下落＝緑（日本の慣習）。
   「選んでいるもの」はどこでも同じ見た目：白い面＋金の枠。 */
:root {
  --ink: #1E2A5A;
  --ink-2: #2E3D78;
  --ink-soft: #C9D0EA;
  --sun: #F2B33D;
  --paper: #F3F4F8;
  --card: #FFFFFF;
  --chip: #E8EAF2;
  --text: #1A2032;
  --muted: #5A6380;
  --line: #DFE2EC;
  --up: #CF2840;
  --up-bg: #FDECEF;
  --down: #0C875C;
  --down-bg: #E4F4EC;
  --flat: #5A6380;
  --warn: #8F5400;
  --warn-bg: #FFF3D6;
  --num: "Barlow Condensed", "Zen Kaku Gothic New", system-ui, sans-serif;
  --body: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1226;
    --card: #182041;
    --chip: #141B36;
    --text: #EBEEF8;
    --muted: #A4ACC8;
    --line: #2A335C;
    --up: #FF7486;
    --up-bg: #3C1B2B;
    --down: #3BCB91;
    --down-bg: #10352A;
    --flat: #A4ACC8;
    --warn: #FFC861;
    --warn-bg: #3A2E12;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--body); font-size: 16px; line-height: 1.8; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 8px; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.tx-up { color: var(--up); }
.tx-down { color: var(--down); }
.tx-flat { color: var(--flat); }

/* ---------- 上部バー ---------- */
.top { background: var(--ink); color: #fff; }
.top-inner { max-width: 980px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: .03em; }
.brand img { border-radius: 9px; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }
.share { border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; border-radius: 999px; padding: 6px 16px; font-size: 13px; cursor: pointer; min-height: 36px; }
.share:hover { background: rgba(255,255,255,.1); }

/* ---------- 冒頭 ---------- */
.hero {
  color: #fff; padding: 14px 0 60px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(242,179,61,.26) 0, rgba(242,179,61,0) 45%),
    linear-gradient(180deg, var(--ink) 0, #172048 100%);
}
.hero-title { margin: 6px 0 4px; font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1.25; letter-spacing: .02em; }
.hero-sub { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; max-width: 34em; }

.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sw {
  display: grid; text-align: left; align-content: start; gap: 2px; padding: 12px 14px;
  border-radius: var(--r); cursor: pointer; line-height: 1.45;
  background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.16); color: #fff;
}
.sw:hover { background: rgba(255,255,255,.12); }
.sw.is-on { background: var(--card); color: var(--text); border-color: var(--sun); box-shadow: 0 14px 30px -18px rgba(0,0,0,.7); }
.sw-head { display: flex; align-items: center; gap: 8px; }
.sw-name { font-size: 21px; font-weight: 700; }
.sw-new { font-size: 10px; font-weight: 700; color: #1A2032; background: var(--sun); border-radius: 4px; padding: 1px 5px; letter-spacing: .05em; }
.sw-date { font-size: 12px; opacity: .8; }
.sw-pulse { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; min-height: 22px; }
.pl { display: inline-flex; align-items: baseline; gap: 4px; font-size: 12px; }
.pl-n { opacity: .85; }
.pl b { font-family: var(--num); font-size: 17px; font-weight: 600; white-space: nowrap; }
.sw:not(.is-on) .tx-up { color: #FF9EAC; }
.sw:not(.is-on) .tx-down { color: #82E6BC; }
.next-up { margin: 12px 0 0; font-size: 13px; color: var(--ink-soft); }
.next-up::before { content: "●"; color: var(--sun); margin-right: 6px; font-size: 10px; vertical-align: .15em; }

/* ---------- 日付 ---------- */
.main { margin-top: -36px; padding-bottom: 40px; }
.days { margin: 0 -16px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.days::-webkit-scrollbar { display: none; }
.day-list { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0 16px 6px; align-items: stretch; }
.day {
  display: grid; justify-items: center; min-width: 78px; padding: 6px 8px 8px; cursor: pointer; line-height: 1.25;
  border: 2px solid var(--line); border-radius: 12px; background: var(--chip); color: var(--muted);
}
.day:hover { border-color: var(--ink-2); }
.day-tag { font-size: 11px; }
.day-num { font-family: var(--num); font-size: 24px; font-weight: 600; color: var(--text); }
.day-move { font-family: var(--num); font-size: 15px; font-weight: 600; white-space: nowrap; }
.day.is-on { background: var(--card); border-color: var(--sun); color: var(--text); box-shadow: 0 8px 18px -12px rgba(30,42,90,.55); }
.day.is-on .day-tag { font-weight: 700; }
.day-more { display: flex; align-items: center; font-size: 11px; line-height: 1.5; color: var(--muted); padding: 0 12px; white-space: nowrap; border: 2px dashed var(--line); border-radius: 12px; background: var(--paper); }

.a2hs { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.a2hs[hidden] { display: none; }
.a2hs p { margin: 0; flex: 1; line-height: 1.6; }
.a2hs button { border: 0; background: var(--chip); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 12px; }

/* ---------- その日の見出し ---------- */
.past { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 16px; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13px; font-weight: 700; }
.past-back { border: 0; background: transparent; text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; color: inherit; }
.day-head { margin: 20px 0 12px; }
.day-head-date { margin: 0; font-size: 14px; color: var(--muted); font-weight: 500; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.stamp { font-size: 12px; }
.verdict { margin: 2px 0 4px; font-size: clamp(1.3rem, 3.8vw, 1.65rem); line-height: 1.5; max-width: 30em; }
.verdict.is-long { font-size: clamp(1.1rem, 3.2vw, 1.35rem); }
.verdict-sub { margin: 0; color: var(--muted); max-width: 42em; }

.listen {
  display: flex; align-items: center; gap: 12px; text-decoration: none; margin: 4px 0 16px;
  padding: 10px 14px; border-radius: var(--r); background: var(--sun); color: #1A2032;
}
.listen:hover { filter: brightness(1.05); }
.listen-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #1A2032; color: var(--sun); font-size: 13px; padding-left: 2px; }
.listen strong { display: block; font-size: 15px; line-height: 1.3; }
.listen small { display: block; font-size: 12px; color: #4A4127; line-height: 1.5; }

/* ---------- 指数ボード（主役） ---------- */
.board { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (min-width: 760px) { .board { grid-template-columns: repeat(3, 1fr); } }
.tile { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 12px 16px; display: flex; flex-direction: column; min-width: 0; }
.tile::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 3px 3px 0; background: var(--flat); }
.tile.is-up::before { background: var(--up); }
.tile.is-down::before { background: var(--down); }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.tile-name { margin: 0; font-size: 14px; line-height: 1.4; font-weight: 700; }
.tile-hint { margin: 1px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.tile-value { margin: 8px 0 0; font-family: var(--num); font-weight: 600; font-size: 38px; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.unit { font-family: var(--body); font-size: .45em; font-weight: 500; margin-left: 2px; color: var(--muted); }
.tile-change { margin: 6px 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; font-variant-numeric: tabular-nums; }
.chg-pct { font-family: var(--num); font-size: 22px; font-weight: 600; padding: 0 8px; border-radius: 7px; color: var(--flat); background: rgba(90,99,128,.1); white-space: nowrap; }
.chg-abs { font-family: var(--num); font-size: 15px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.is-up .chg-pct { color: var(--up); background: var(--up-bg); }
.is-down .chg-pct { color: var(--down); background: var(--down-bg); }
.is-none { font-size: 14px; color: var(--muted); }
.is-none .chg-abs { font-family: var(--body); font-size: 12px; margin-left: 6px; }
.arw { font-size: .66em; margin-right: 3px; vertical-align: .14em; }
.tile-spark { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.spark { width: 140px; height: 32px; overflow: visible; }
.sp-line { fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; opacity: .75; vector-effect: non-scaling-stroke; }
.sp-on { fill: var(--sun); stroke: var(--ink); stroke-width: 1; }
.spark-cap { font-size: 11px; color: var(--muted); }
.tile-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
@media (prefers-color-scheme: dark) {
  .sp-line { stroke: var(--ink-soft); }
  .hero { background: linear-gradient(180deg, #1A2452 0, #121a3e 100%); }
}
.mini { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

/* 要確認（押すとその場で理由が開く。下の数字に重ならない） */
.chk { flex: none; }
.chk summary {
  list-style: none; display: inline-block; cursor: pointer; font-size: 11px; font-weight: 700; line-height: 1;
  color: var(--warn); background: var(--warn-bg); border: 1px solid currentColor; border-radius: 999px; padding: 4px 8px; white-space: nowrap;
}
.chk summary::-webkit-details-marker { display: none; }
.chk summary::after { content: "？"; margin-left: 2px; }
.chk[open] { flex-basis: 100%; }
.chk p { margin: 6px 0 2px; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--text); font-size: 12px; line-height: 1.6; font-weight: 400; }
.tile-top:has(.chk[open]) { flex-wrap: wrap; }

/* ---------- 文章ブロック ---------- */
.block { margin-top: 26px; }
.block-title { margin: 0 0 8px; font-size: 17px; line-height: 1.4; }
.points { margin: 0; padding: 14px 18px 14px 34px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.points li { margin: 4px 0; max-width: 46em; }
.points li::marker { color: var(--sun); }
.why { display: grid; gap: 14px 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.why-item { border-top: 3px solid var(--ink); padding-top: 10px; }
.why-item p { margin: 0; max-width: 40em; }
@media (prefers-color-scheme: dark) { .why-item { border-top-color: var(--sun); } }

.rows { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-name { font-weight: 700; font-size: 14px; line-height: 1.45; min-width: 0; flex: 1; }
.row-name .chk { display: inline-block; margin-left: 6px; vertical-align: 1px; }
.row-name .chk[open] { display: block; margin-left: 0; margin-top: 4px; }
.row-hint, .row-note { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.row-fig { display: grid; justify-items: end; text-align: right; flex: none; }
.row-value { font-family: var(--num); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.row-change { margin: 2px 0 0; display: flex; gap: 6px; align-items: baseline; justify-content: flex-end; }
.row-change .chg-pct { font-size: 16px; padding: 0 6px; }
.row-change .chg-abs { font-size: 13px; }
.row .is-none { font-size: 12px; }
.row .is-none .chg-abs { display: block; margin: 0; font-size: 11px; }

.legend { margin: 14px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.legend-badge { display: inline-block; margin-right: 6px; font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-bg); border: 1px solid currentColor; border-radius: 999px; padding: 0 7px; }

/* ---------- 次の行動 ---------- */
.next { margin-top: 30px; background: var(--ink); color: #fff; border-radius: 18px; padding: 18px; }
.next-when { margin: 0 0 12px; font-weight: 700; }
.next-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.next-card { display: grid; gap: 2px; text-align: left; text-decoration: none; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff; cursor: pointer; }
.next-card:hover { background: rgba(255,255,255,.14); }
.next-card strong { font-size: 16px; }
.next-card span { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.next-mag { margin: 14px 0 0; font-size: 12px; color: var(--ink-soft); }
.term { border: 0; padding: 0; background: none; cursor: help; text-decoration: underline dotted var(--muted); text-underline-offset: 4px; font: inherit; color: inherit; }

.fine { margin: 18px 0 0; font-size: 12px; color: var(--muted); }
.closed { background: var(--card); border: 1px dashed var(--line); border-radius: var(--r); padding: 18px; color: var(--muted); }
.state { margin-top: 24px; color: var(--muted); }
.state.is-error { color: var(--up); }

/* ---------- フッター ---------- */
.foot { border-top: 1px solid var(--line); padding: 22px 0 calc(36px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--muted); }
.foot p { margin: 0 0 8px; max-width: 52em; }
.foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.foot-brand img { border-radius: 7px; }
.foot-links a { margin-right: 16px; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--text); color: var(--paper); padding: 8px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .hero-sub { display: none; }
  .hero { padding-top: 6px; }
  .hero-title { font-size: 1.45rem; margin: 4px 0 12px; }
  .board { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { padding: 10px 10px 10px 13px; }
  .tile-name { font-size: 13px; }
  .tile-hint { font-size: 11px; line-height: 1.4; }
  .tile-value { font-size: 27px; }
  .chg-pct { font-size: 18px; padding: 0 6px; }
  .chg-abs { font-size: 13px; }
  .spark { width: 100%; height: 26px; }
  .spark-cap { display: none; }
  .sw { padding: 10px 11px; }
  .sw-name { font-size: 19px; }
  .pl b { font-size: 15px; }
  .row { padding: 10px 12px; }
  .row-value { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* マウスで見る画面では、日付の列が横に続くことがわかるよう細いスクロールバーを出す */
@media (hover: hover) and (pointer: fine) {
  .days { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .days::-webkit-scrollbar { display: block; height: 6px; }
  .days::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
}

/* 全文（新聞の代わりに読める）2026-10-09 */
.full { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 0; }
.full-sum { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 18px; }
.full-sum::-webkit-details-marker { display: none; }
.full-label { font-weight: 700; }
.full-label::before { content: "▸ "; color: var(--sun); }
.full[open] .full-label::before { content: "▾ "; }
.full-meta { font-size: .85rem; opacity: .7; }
.full-body { padding: 0 18px 16px; max-width: 46em; line-height: 1.85; }
.full-h { font-size: 1rem; margin: 18px 0 6px; padding-left: 8px; border-left: 3px solid var(--sun); }
.full-body p { margin: 0 0 .9em; }
.full-src { font-size: .8rem; opacity: .7; margin-top: 16px; }

/* ---------- 共通ナビ導入（2026-10-09）：共有ボタンは冒頭の右上へ ---------- */
.hero { padding-top: 18px; }
.hero-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.hero-back { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--sun); color: #1A2032; text-decoration: none; font-size: 13px; font-weight: 700; }
.hero-back:hover { filter: brightness(1.06); }
.hero-back { border: 0; cursor: pointer; font-family: inherit; }
/* ページのまま再生（common/player.js） */
button.listen { width: 100%; border: 0; text-align: left; font: inherit; cursor: pointer; }
.listen.is-playing { background: #1A2032; color: #fff; box-shadow: 0 0 0 2px var(--sun) inset; }
.listen.is-playing small { color: #C9D0EA; }
.listen.is-playing .listen-ico { background: var(--sun); color: #1A2032; padding-left: 0; }
.listen.is-current:not(.is-playing) .listen-ico { padding-left: 2px; }
.listen.is-none { background: var(--chip); color: var(--muted); cursor: default; }
.listen.is-none small { color: var(--muted); }
.listen.is-none .listen-ico { background: var(--line); color: var(--muted); }
.listen.is-none:hover { filter: none; }
