:root {
  --bg: #f4f6f9; --surface: #ffffff; --surface2: #eef1f5; --line: #d9dee6;
  --text: #1b1f26; --text2: #4b5563; --muted: #7b8494;
  --accent: #1e3a5f; --accent-ink: #ffffff; --accent-soft: #e3ebf6;
  --navy: #0b1220; --navy2: #101a2e; --navy-line: rgba(255, 255, 255, .09); --gold: #ffd166; --cyan: #5fd3ff;
  --up: #c93b3b; --up-soft: #fbe9e9; --down: #2a6fcf; --down-soft: #e6eefb; --flat: #6b7280;
  --up-dark: #ff8585; --down-dark: #7cc0ff;
  --warn-bg: #fff7e0; --warn-line: #e5c66a;
  --radius: 14px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 10px rgba(16, 24, 40, .05);
  --shadow-hover: 0 6px 20px rgba(16, 24, 40, .12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117; --surface: #151b25; --surface2: #1c2431; --line: #2a3342;
    --text: #e6e8eb; --text2: #b4bac4; --muted: #8a93a1;
    --accent: #8fb4e8; --accent-ink: #0f1216; --accent-soft: #1d2a3d;
    --up: #ff8585; --up-soft: #3a1f22; --down: #7cc0ff; --down-soft: #1c2a40; --flat: #9aa3b2;
    --warn-bg: #2b2611; --warn-line: #7a6a2e;
    --shadow: none; --shadow-hover: 0 6px 20px rgba(0, 0, 0, .4); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 15px; line-height: 1.65; font-feature-settings: "palt";
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; display: flex; align-items: center; gap: .6em; flex-wrap: wrap; }
h2::before { content: ""; width: 5px; height: 1.05em; border-radius: 3px; background: linear-gradient(180deg, var(--gold), #f29e4c); flex: none; }
h2 small { font-size: .8rem; font-weight: normal; color: var(--muted); }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .8em; }
img { max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--flat); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ===== 上部（ダークの帯：ヘッダー → ティッカー → ヒーロー） ===== */
.top { background: var(--navy); color: #fff; border-bottom: 1px solid var(--navy-line); position: sticky; top: 0; z-index: 10; }
.top .in { max-width: 1120px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 12px; min-height: 56px; }
.brand { font-weight: 700; font-size: 1.12rem; color: #fff; white-space: nowrap; display: flex; align-items: center; gap: 9px; letter-spacing: .02em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; display: block; }
.brand b { color: var(--gold); }
.brand:hover { text-decoration: none; }
.top nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { padding: 6px 11px; border-radius: 8px; color: #c9d3e3; white-space: nowrap; font-size: .92rem; }
.top nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.top nav a[aria-current="page"] { background: rgba(255, 209, 102, .16); color: var(--gold); font-weight: 600; }

.ticker { background: var(--navy2); border-bottom: 1px solid var(--navy-line); overflow: hidden; height: 36px; position: relative; }
.ticker .track { display: flex; gap: 0; width: max-content; height: 36px; align-items: center; animation: ticker var(--tk-dur, 70s) linear infinite; will-change: transform; }
.ticker:hover .track { animation-play-state: paused; }
.ticker .tk { display: inline-flex; align-items: center; gap: 7px; padding: 0 18px; font-size: .84rem; color: #c9d3e3; white-space: nowrap; cursor: pointer; border-right: 1px solid var(--navy-line); height: 20px; }
.ticker .tk:hover { color: #fff; }
.ticker .tk .p { color: #fff; font-weight: 600; }
.ticker .tk .up { color: var(--up-dark); } .ticker .tk .down { color: var(--down-dark); } .ticker .tk .flat { color: #9aa3b2; }
.ticker .empty { color: #8a93a1; font-size: .84rem; padding: 0 16px; line-height: 36px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker { overflow-x: auto; }
  .ticker .track { animation: none; }
  .ticker .track .half:last-child { display: none; }
}

.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; isolation: isolate; }
.hero .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 68% center; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 18, 32, .96) 0%, rgba(11, 18, 32, .86) 38%, rgba(11, 18, 32, .42) 66%, rgba(11, 18, 32, .18) 100%); }
.hero .in { max-width: 1120px; margin: 0 auto; padding: 46px 16px 48px; min-height: 300px; display: flex; flex-direction: column; justify-content: center; }
.hero.compact .in { min-height: 220px; padding: 34px 16px 36px; }
.hero .kicker { color: var(--gold); font-size: .82rem; font-weight: 700; letter-spacing: .14em; margin: 0 0 8px; }
.hero h1 { font-size: 2.15rem; font-weight: 800; letter-spacing: .01em; margin: 0 0 12px; text-shadow: 0 2px 14px rgba(0, 0, 0, .45); }
.hero h1 b { color: var(--gold); }
.hero .lead { color: #d3dbe8; max-width: 620px; margin: 0; font-size: 1rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.hero .hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 10px 18px; border-radius: 10px; font-weight: 600; border: 0; font: inherit; cursor: pointer; transition: transform .15s, box-shadow .15s, filter .15s; }
.btn:hover { text-decoration: none; filter: brightness(1.08); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn.ghost { background: var(--surface2); color: var(--text); }
.btn.gold { background: linear-gradient(180deg, #ffd978, #f5b93b); color: #1b1f26; }
.btn.outline { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .4); }

.updbar { max-width: 1120px; margin: 0 auto; padding: 10px 16px 0; font-size: .82rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }

main { max-width: 1120px; margin: 0 auto; padding: 8px 16px 48px; }
section { margin: 26px 0 0; }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 10px 14px; font-size: .88rem; margin: 14px 0 0; }
.notice.soft { background: var(--surface2); border-color: var(--line); }

/* 機能タイル（ヒーローに少し重ねる） */
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: -30px auto 0; position: relative; z-index: 1; max-width: 1120px; padding: 0 16px; }
.features a { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; background: var(--navy2); color: #fff; border: 1px solid var(--navy-line); border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transition: transform .18s, border-color .18s; }
.features a:hover { text-decoration: none; transform: translateY(-3px); border-color: rgba(255, 209, 102, .5); }
.features img { width: 52px; height: 52px; border-radius: 12px; display: block; object-fit: cover; }
.features b { display: block; font-size: .98rem; }
.features span { display: block; font-size: .78rem; color: #b4bfd1; line-height: 1.4; }

/* ===== カード ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cards.wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 13px; box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--cyan), var(--gold)); opacity: 0; transition: opacity .18s; }
.card:hover { border-color: transparent; transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card:hover::before { opacity: 1; }
.card .name { font-size: .86rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .price { font-size: 1.28rem; font-weight: 700; letter-spacing: -.01em; }
.card .chg { font-size: .9rem; font-weight: 600; }
.card .sub { font-size: .78rem; color: var(--muted); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; white-space: nowrap; }
.card .sub span:last-child { text-align: right; }
.card svg.spark { width: 100%; height: 34px; margin-top: 4px; display: block; }
.card.static { cursor: default; }
.cards .card { animation: rise .4s ease both; }
.cards .card:nth-child(2) { animation-delay: .04s; } .cards .card:nth-child(3) { animation-delay: .08s; } .cards .card:nth-child(4) { animation-delay: .12s; } .cards .card:nth-child(5) { animation-delay: .16s; }
.cards .card:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cards .card, .features a, .card, .btn { animation: none; transition: none; } }

/* ===== 2列ブロック ===== */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.cols.rank4 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .cols.rank4 { grid-template-columns: 1fr 1fr; } }
.cols.partners { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; box-shadow: var(--shadow); min-width: 0; }
.box h3 { margin-bottom: 6px; }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); cursor: pointer; }
.rank li:first-child { border-top: 0; }
.rank .n { color: var(--muted); font-size: .85rem; text-align: right; }
.rank .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank .nm small { color: var(--muted); margin-left: 4px; }
.rank .v { font-weight: 600; min-width: 4.5em; text-align: right; }
.rank .p { text-align: right; min-width: 5em; }
.rank li:hover .nm { color: var(--accent); }

/* ===== ニュース ===== */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs button, .chip { background: var(--surface); border: 1px solid var(--line); color: var(--text2); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .88rem; cursor: pointer; transition: background .15s, color .15s; }
.tabs button[aria-selected="true"], .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 9px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.news li:first-child { border-top: 0; }
.news a { color: var(--text); font-weight: 500; }
.news a:visited { color: var(--text2); }
.news .meta { font-size: .78rem; color: var(--muted); }

/* ===== 一覧の操作 ===== */
.controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 12px; }
.controls input, .controls select { font: inherit; font-size: .92rem; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.controls input { min-width: 180px; flex: 1 1 180px; }
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 8px 10px; text-align: right; white-space: nowrap; border-top: 1px solid var(--line); }
th { font-weight: 600; color: var(--text2); font-size: .82rem; background: var(--surface2); border-top: 0; position: sticky; top: 0; cursor: pointer; user-select: none; }
th[aria-sort="descending"]::after { content: " ▼"; font-size: .7em; }
th[aria-sort="ascending"]::after { content: " ▲"; font-size: .7em; }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
th:first-child { background: var(--surface2); z-index: 1; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--surface2); }
td .code { color: var(--muted); font-size: .8rem; margin-left: 6px; }
td svg.spark { width: 90px; height: 26px; display: block; }
.badge { display: inline-block; font-size: .72rem; padding: 1px 6px; border-radius: 6px; background: var(--surface2); color: var(--text2); margin-left: 4px; vertical-align: middle; }

/* ===== 注目銘柄 ===== */
.screen { margin-top: 18px; }
.screen .rule { font-size: .86rem; color: var(--text2); margin: 0 0 8px; }
.screen .empty { color: var(--muted); font-size: .9rem; padding: 6px 0; }

/* ===== 詳細ダイアログ ===== */
dialog.detail { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(680px, calc(100vw - 24px)); background: var(--surface); color: var(--text); box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
dialog.detail::backdrop { background: rgba(5, 10, 20, .6); backdrop-filter: blur(2px); }
.detail .hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px 0; }
.detail .hd h2 { margin: 0; font-size: 1.15rem; display: block; }
.detail .hd h2::before { display: none; }
.detail .hd .code { color: var(--muted); font-size: .85rem; }
.detail .close { background: var(--surface2); border: 0; color: var(--text); border-radius: 8px; width: 34px; height: 34px; font-size: 1.2rem; cursor: pointer; flex: none; }
.detail .bigprice { padding: 4px 16px 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.detail .bigprice .p { font-size: 1.7rem; font-weight: 700; }
.detail .bigprice .c { font-size: 1rem; font-weight: 600; }
.detail .chartwrap { padding: 8px 8px 0; position: relative; }
.detail svg.chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.detail .tip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); font-size: .78rem; padding: 4px 8px; border-radius: 6px; transform: translate(-50%, -100%); white-space: nowrap; display: none; }
.detail .stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 12px; padding: 10px 16px; font-size: .88rem; }
.detail .stats div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.detail .stats span:first-child { color: var(--muted); }
.detail .acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 16px 16px; }

/* ===== 口座開設・静的ページ ===== */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 10px 0; }
.steps .box { position: relative; padding-top: 14px; }
.steps .box::before { counter-increment: s; content: counter(s); position: absolute; top: -12px; left: 12px; background: linear-gradient(180deg, #ffd978, #f5b93b); color: #1b1f26; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.partner { display: flex; flex-direction: column; gap: 8px; position: relative; }
.partner .btn { align-self: flex-start; margin-top: auto; }
.partner .tag { font-size: .78rem; color: var(--accent); font-weight: 600; }
.partner ul { margin: 6px 0 0; padding-left: 1.2em; font-size: .9rem; color: var(--text2); }
.partner .pr { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-left: 6px; vertical-align: middle; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 1.3em; }
.cta { background: var(--navy2); color: #fff; border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 26px; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 200px at 100% 0%, rgba(255, 209, 102, .18), transparent 60%); pointer-events: none; }
.cta p { margin: 0; position: relative; }
.cta .small { color: #b4bfd1; }
.cta .btn { position: relative; }
.cta img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; position: relative; }
.cta .txt { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 320px; }

footer { background: var(--navy); color: #9aa6ba; border-top: 1px solid var(--navy-line); margin-top: 20px; }
footer .in { max-width: 1120px; margin: 0 auto; padding: 22px 16px 30px; font-size: .8rem; }
footer .links { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
footer .links a { color: #d3dbe8; }
footer .brandline { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; margin-bottom: 10px; }
footer .brandline img { width: 22px; height: 22px; border-radius: 5px; }

.skeleton { color: var(--muted); padding: 14px; text-align: center; font-size: .9rem; background: linear-gradient(90deg, transparent, rgba(127, 140, 160, .12), transparent); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ===== 本格仕上げ：手動テーマ・ヒーロー数値・取引状況・ヒートマップ・演出 ===== */
:root[data-theme="dark"] {
  --bg: #0d1117; --surface: #151b25; --surface2: #1c2431; --line: #2a3342;
  --text: #e6e8eb; --text2: #b4bac4; --muted: #8a93a1;
  --accent: #8fb4e8; --accent-ink: #0f1216; --accent-soft: #1d2a3d;
  --up: #ff8585; --up-soft: #3a1f22; --down: #7cc0ff; --down-soft: #1c2a40; --flat: #9aa3b2;
  --warn-bg: #2b2611; --warn-line: #7a6a2e;
  --shadow: none; --shadow-hover: 0 6px 20px rgba(0, 0, 0, .4); color-scheme: dark;
}
.theme-btn { background: transparent; border: 1px solid var(--navy-line); color: #c9d3e3; border-radius: 8px; width: 34px; height: 30px; cursor: pointer; font-size: .95rem; flex: none; line-height: 1; }
.theme-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; align-items: stretch; }
.stat { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 12px; padding: 8px 14px; min-width: 150px; cursor: pointer; transition: background .15s, transform .15s; }
.stat:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }
.stat.static { cursor: default; }
.stat .l { font-size: .74rem; color: #b4bfd1; letter-spacing: .04em; white-space: nowrap; }
.stat .v { font-size: 1.25rem; font-weight: 700; color: #fff; line-height: 1.25; }
.stat .v .up { color: var(--up-dark); } .stat .v .down { color: var(--down-dark); }
.stat .c { font-size: .8rem; font-weight: 600; } .stat .c.up { color: var(--up-dark); } .stat .c.down { color: var(--down-dark); } .stat .c.flat { color: #9aa3b2; }
.statuses { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; color: #c9d3e3; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #6b7280; flex: none; }
.status.open i { background: #3ddc84; animation: pulse 1.6s ease-in-out infinite; }
.status.lunch i { background: #f5b93b; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(61, 220, 132, .25); } 50% { box-shadow: 0 0 0 7px rgba(61, 220, 132, .06); } }

.hm-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.hm-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); min-width: 0; }
.hm-label { font-size: .78rem; color: var(--muted); margin: 0 0 6px 2px; }
.hm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 4px; }
.hm-tile { border-radius: 7px; padding: 5px 7px; min-height: 46px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; color: var(--text); font-size: .74rem; line-height: 1.3; transition: transform .12s, box-shadow .12s; min-width: 0; }
.hm-tile.strong { color: #fff; }
.hm-tile:hover { transform: scale(1.05); box-shadow: 0 0 0 2px var(--gold); z-index: 1; position: relative; }
.hm-tile .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-tile .v { font-weight: 700; font-size: .82rem; }
.hm-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin: 10px 0 0; }
.hm-legend .g { width: 160px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, rgba(42, 111, 207, .9), var(--surface2) 50%, rgba(201, 59, 59, .9)); border: 1px solid var(--line); }

.live .cards .card { animation: none; }
.livedot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; margin-right: 6px; vertical-align: middle; animation: pulse 1.6s ease-in-out infinite; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.show { opacity: 1; transform: none; }
td.bar { background-image: linear-gradient(to left, color-mix(in srgb, currentColor 16%, transparent) var(--w, 0%), transparent var(--w, 0%)); }
.legend { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); padding: 4px 16px 0; flex-wrap: wrap; }
.legend .sw { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--text2); vertical-align: middle; margin-right: 5px; }
.legend .sw.ma { border-top: 2px dashed #e0a930; }
.range { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 16px 0; font-size: .8rem; color: var(--muted); }
.range .bar { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--down-soft), var(--surface2), var(--up-soft)); position: relative; border: 1px solid var(--line); }
.range .bar i { position: absolute; top: -5px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); transform: translateX(-50%); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
/* ===== 診断・シミュレーター・ガイド ===== */
.quiz { max-width: 760px; }
.quiz .qcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-top: 12px; }
.quiz .qcard.done { opacity: .78; }
.quiz .qcard, .result { scroll-margin-top: 110px; }
.quiz .qn { font-size: .78rem; color: var(--muted); letter-spacing: .06em; }
.quiz .qt { font-weight: 700; font-size: 1.05rem; margin: 2px 0 10px; }
.quiz .opts { display: grid; gap: 8px; }
.quiz .opts button { text-align: left; font: inherit; background: var(--surface2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.quiz .opts button:hover { border-color: var(--accent); }
.quiz .opts button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.quiz .progress { height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; margin-top: 12px; }
.quiz .progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--gold)); transition: width .3s; }
.result { margin-top: 18px; }
.result .win { position: relative; }
.result .win .rankno { position: absolute; top: -10px; left: 14px; background: linear-gradient(180deg, #ffd978, #f5b93b); color: #1b1f26; font-weight: 800; font-size: .8rem; padding: 2px 10px; border-radius: 999px; }
.result .why { margin: 8px 0 0; padding-left: 1.2em; font-size: .9rem; color: var(--text2); }
.result .why li::marker { color: var(--gold); }
.share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.sim { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.sim .inputs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.sim label { display: grid; gap: 4px; font-size: .88rem; color: var(--text2); }
.sim label b { color: var(--text); font-size: 1rem; }
.sim .row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.sim input[type="number"] { font: inherit; width: 110px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface2); color: var(--text); text-align: right; }
.sim input[type="range"] { width: 100%; accent-color: var(--accent); }
.sim .presets { display: flex; gap: 6px; flex-wrap: wrap; }
.sim .out { display: grid; gap: 12px; }
.sim .kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sim .kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow); min-width: 0; }
.sim .kpi .l { font-size: .76rem; color: var(--muted); }
.sim .kpi .v { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.sim .kpi.gain .v { color: var(--up); }
.sim .chartbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 10px 6px; box-shadow: var(--shadow); }
.sim svg.simchart { width: 100%; height: auto; display: block; }
.sim .legend { padding: 4px 6px 0; }
.sim .legend .sw.base { border-top: 2px solid var(--muted); }
.sim .legend .sw.total { border-top: 2px solid var(--accent); }
.sim table td:first-child, .sim table th:first-child { position: static; }
@media (max-width: 820px) { .sim { grid-template-columns: 1fr; } .sim .kpis { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 520px) { .sim .kpi .v { font-size: 1.02rem; } }

.article { max-width: 760px; }
.article h2 { margin-top: 1.6em; font-size: 1.12rem; }
.article table { font-size: .9rem; margin: 10px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.article th, .article td { text-align: left; white-space: normal; }
.article th:first-child, .article td:first-child { position: static; }
.article .meta { font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.article .toc { background: var(--surface2); border-radius: 10px; padding: 10px 14px; font-size: .88rem; margin: 10px 0 18px; }
.article .toc ol { margin: 4px 0 0; padding-left: 1.3em; }
.glist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.glist a.gcard { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.glist a.gcard:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.glist a.gcard b { display: block; font-size: 1rem; line-height: 1.4; margin-bottom: 6px; }
.glist a.gcard span { font-size: .85rem; color: var(--text2); }
.glossary dl { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 8px 16px; max-width: 900px; }
.glossary dt { font-weight: 700; padding-top: 2px; }
.glossary dd { margin: 0; color: var(--text2); border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.glossary .gnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 14px; }
@media (max-width: 560px) { .glossary dl { grid-template-columns: 1fr; gap: 2px 0; } .glossary dd { margin-bottom: 8px; } }
.related { margin-top: 24px; }

@media (max-width: 640px) {
  .hero-stats { gap: 8px; margin-top: 16px; }
  .stat { min-width: calc(50% - 4px); padding: 7px 10px; }
  .stat .v { font-size: 1.05rem; }
  .statuses { flex-direction: row; flex-wrap: wrap; }
  .hm-wrap { grid-template-columns: 1fr; }
  .hm-tiles { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}
@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .top .in { flex-wrap: wrap; padding-bottom: 6px; min-height: 50px; }
  .top nav { margin-left: -4px; width: 100%; order: 3; }
  .theme-btn { order: 2; margin-left: auto; }
  .hero .in { min-height: 230px; padding: 30px 16px 40px; }
  .hero.compact .in { min-height: 180px; padding: 26px 16px 34px; }
  .hero h1 { font-size: 1.5rem; }
  .hero .lead { font-size: .92rem; }
  .hero .hero-bg { object-position: 72% center; }
  .features { gap: 8px; margin-top: -22px; }
  .features a { grid-template-columns: 40px minmax(0, 1fr); gap: 9px; padding: 10px 10px; }
  .features img { width: 40px; height: 40px; border-radius: 9px; }
  .features b { font-size: .88rem; }
  .features span { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards.wide { grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); }
  .card .price { font-size: 1.12rem; }
}
