/* ============================================================
   オルカン定点観測  共通スタイル
   色を変えたいときは、この一番上の変数だけ触れば全体に反映されます。
   ※姉妹サイト「AIブレイン開発記」と同じ骨格・色だけ変えています。
   ============================================================ */
:root {
  --accent: #2f9e8f;          /* テーマカラー（ティール＝緑と青の中間）*/
  --accent-dark: #1f7d6a;
  --up: #e2574c;              /* 上がった日（日本式：赤）*/
  --down: #3f8fd6;            /* 下がった日（日本式：青）*/
  --ink: #e9e7e3;
  --sub: #9a9690;
  --line: #2c322f;
  --bg: #0f1614;
  --bg-soft: #182320;
  --max: 900px;
  --radius: 10px;
  --worldmap: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%201000%20500%27%3E%3Cg%20fill%3D%27%232f9e8f%27%3E%3Cpath%20d%3D%27M150%2C70%20L250%2C58%20L302%2C95%20L286%2C140%20L250%2C152%20L236%2C200%20L206%2C238%20L184%2C200%20L196%2C155%20L160%2C130%20L128%2C96%20Z%27%2F%3E%3Cpath%20d%3D%27M345%2C40%20L402%2C34%20L412%2C66%20L380%2C86%20L348%2C70%20Z%27%2F%3E%3Cpath%20d%3D%27M256%2C266%20L302%2C254%20L332%2C290%20L320%2C352%20L296%2C422%20L272%2C436%20L262%2C386%20L248%2C330%20L246%2C290%20Z%27%2F%3E%3Cpath%20d%3D%27M452%2C96%20L516%2C84%20L542%2C106%20L530%2C142%20L494%2C162%20L464%2C150%20L448%2C120%20Z%27%2F%3E%3Cpath%20d%3D%27M470%2C186%20L546%2C180%20L572%2C216%20L560%2C276%20L526%2C332%20L506%2C386%20L480%2C370%20L470%2C310%20L454%2C256%20L458%2C210%20Z%27%2F%3E%3Cpath%20d%3D%27M546%2C80%20L652%2C58%20L762%2C74%20L812%2C110%20L790%2C162%20L734%2C176%20L700%2C216%20L660%2C242%20L620%2C216%20L590%2C176%20L554%2C140%20Z%27%2F%3E%3Cpath%20d%3D%27M700%2C250%20L742%2C242%20L768%2C262%20L750%2C286%20L714%2C280%20Z%27%2F%3E%3Cpath%20d%3D%27M776%2C320%20L842%2C304%20L876%2C330%20L864%2C372%20L820%2C386%20L784%2C360%20Z%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --font: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink);
  background: var(--bg); line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- ヘッダー ---------- */
.site-header {
  border-bottom: 3px solid var(--accent);
  background: var(--bg); position: sticky; top: 0; z-index: 20;
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { text-decoration: none; }
.logo { font-size: 1.15rem; font-weight: 800; letter-spacing: .02em; }
.logo b { color: var(--accent); }
.tagline { display: block; font-size: .72rem; color: var(--sub); margin-top: 2px; }
.nav { display: flex; gap: 18px; font-size: .84rem; }
.nav a { color: var(--sub); text-decoration: none; }
.nav a:hover { color: var(--accent); }

/* ---------- 見出し ---------- */
h1.headline {
  font-size: clamp(1.4rem, 4.5vw, 2rem); line-height: 1.5;
  margin: .3em 0 .5em; letter-spacing: .01em;
}
h2 {
  font-size: 1.12rem; margin: 2.2em 0 .8em; padding-left: .6em;
  border-left: 4px solid var(--accent);
}
h3 { font-size: 1rem; margin: 1.8em 0 .6em; color: var(--accent); }

/* ---------- 数字の主役ブロック ---------- */
.price-card {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px; margin: 22px 0;
}
.price-main { font-size: clamp(2rem, 8vw, 3rem); font-weight: 800; letter-spacing: -.02em; }
.price-diff { font-size: clamp(1rem, 4vw, 1.3rem); font-weight: 700; margin-top: 6px; }
.is-up { color: var(--up); }
.is-down { color: var(--down); }
.is-flat { color: var(--sub); }
.price-sub { font-size: .82rem; color: var(--sub); margin-top: 12px; line-height: 1.7; }

/* ---------- 分解テーブル ---------- */
.breakdown { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .95rem; }
.breakdown th, .breakdown td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.breakdown th { color: var(--sub); font-weight: 500; width: 52%; }
.breakdown td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.breakdown tr.total th, .breakdown tr.total td { border-top: 2px solid var(--accent); border-bottom: none; }

/* ---------- 用語のかみ砕き ---------- */
.term { border-bottom: 1px dotted var(--accent); }
.note {
  background: var(--bg-soft); border-left: 3px solid var(--accent);
  padding: 14px 16px; margin: 16px 0; font-size: .9rem; border-radius: 0 6px 6px 0;
}
.note b { color: var(--accent); }
.caution {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin: 20px 0; font-size: .85rem; color: var(--sub);
}

/* ---------- 一覧 ---------- */
.daylist { list-style: none; padding: 0; margin: 12px 0; }
.daylist li { border-bottom: 1px solid var(--line); }
.daylist a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 4px; text-decoration: none; font-size: .95rem;
}
.daylist a:hover { background: var(--bg-soft); }
.daylist .d { color: var(--sub); font-size: .88rem; }
.daylist .v { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- フッター ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 60px; padding: 30px 0 50px;
  font-size: .82rem; color: var(--sub);
}
.disclaimer {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin: 24px 0; font-size: .8rem; color: var(--sub); line-height: 1.8;
}
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 30px 0; font-size: .9rem; }
.pager a { color: var(--accent); text-decoration: none; }
.back-link { color: var(--accent); text-decoration: none; font-size: .9rem; }


/* ---------- 用語ふきだし（タップで説明が出る） ---------- */
.term {
  border-bottom: 1px dashed var(--accent);
  cursor: pointer; position: relative;
  padding: 0 1px;
}
.term::before {
  content: "?"; font-size: .6em; vertical-align: super;
  color: var(--accent); font-weight: 700; margin-left: 1px;
}
.term.open { background: rgba(47,158,143,.14); border-radius: 3px; }
.tip-bubble {
  position: absolute; z-index: 50;
  max-width: min(320px, calc(100vw - 32px));
  background: #223330; color: var(--ink);
  border: 1px solid var(--accent);
  border-radius: 8px; padding: 12px 14px;
  font-size: .84rem; line-height: 1.75; font-weight: 400;
  box-shadow: 0 8px 28px rgba(0,0,0,.55);
}
.tip-bubble .tip-word {
  display: block; color: var(--accent); font-weight: 700;
  font-size: .8rem; margin-bottom: 4px;
}
.tip-bubble .tip-close {
  display: block; margin-top: 8px; text-align: right;
  color: var(--sub); font-size: .75rem;
}


/* ============================================================
   ヘッダーの飾り
   ・国旗の帯 ＝ オルカンが投資している国（左へ流れる）
   ・会社の帯 ＝ 組入れ上位の会社（右へ流れる）
   ・背景     ＝ 透かしの世界地図
   ※動きが苦手な人の設定（prefers-reduced-motion）では止まります。
   ============================================================ */

/* --- 背景の透かし世界地図 --- */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image: var(--worldmap);
  background-repeat: no-repeat;
  background-position: center 42%;
  background-size: min(1400px, 145%) auto;
  opacity: .07;
  pointer-events: none;
}

/* --- 流れる帯の共通 --- */
.ticker {
  overflow: hidden; position: relative;
  background: #0b1211;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker-track {
  display: flex; align-items: center; gap: 22px;
  width: max-content; padding: 7px 0;
  will-change: transform;
}
.ticker-track > * { flex: none; }

/* 国旗＝左へ流れる */
.ticker-flags .ticker-track { animation: flow-left 46s linear infinite; }
@keyframes flow-left  { from { transform: translateX(0); }    to { transform: translateX(-50%); } }

/* 会社＝右へ流れる */
.ticker-firms .ticker-track { animation: flow-right 52s linear infinite; }
@keyframes flow-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* 国旗のかたち */
.flag {
  display: flex; align-items: center; gap: 7px;
  opacity: .92;
}
.flag svg {
  width: 26px; height: 17px; display: block;
  border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.14);
}
.flag span { font-size: .68rem; color: var(--sub); letter-spacing: .04em; white-space: nowrap; }

/* 会社名のバッジ */
.firm {
  font-size: .68rem; letter-spacing: .1em; font-weight: 700;
  color: var(--sub); white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 12px; background: rgba(47,158,143,.05);
}
.firm b { color: var(--accent); font-weight: 700; }

/* 帯の説明（小さく添える） */
.ticker-caption {
  font-size: .64rem; color: #6d7a76; text-align: center;
  padding: 3px 12px 0; letter-spacing: .03em;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none !important; }
}
@media (max-width: 520px) {
  .flag svg { width: 22px; height: 14px; }
  .ticker-track { gap: 16px; }
}
