/* option.css — オプション研究セクション共通スタイル */
.opt-hero{background:linear-gradient(135deg,#0f172a 0%,#1e293b 100%);border-radius:14px;padding:26px 22px;margin-bottom:18px;color:#fff}
.opt-hero h1{font-size:1.4rem;font-weight:800;margin:0 0 8px}
.opt-hero p{font-size:.86rem;color:#cbd5e1;line-height:1.8;max-width:720px;margin:0}
.opt-hero p b{color:#fff}
.opt-hero .opt-tag{display:inline-block;font-size:.68rem;background:rgba(56,189,248,.16);color:#7dd3fc;border:1px solid rgba(56,189,248,.35);padding:3px 10px;border-radius:20px;margin-bottom:10px;font-weight:600}

.opt-section-title{font-size:1.02rem;font-weight:700;color:#0f172a;margin:22px 0 12px;display:flex;align-items:center;gap:8px}
.opt-note{font-size:.75rem;color:#64748b;line-height:1.7}
.opt-lead{font-size:.82rem;color:#334155;line-height:1.75;background:#f8fafc;border-left:3px solid #38bdf8;border-radius:0 8px 8px 0;padding:9px 12px;margin:0 0 12px}
.opt-lead b{color:#0f172a}
.opt-warn{background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:12px 14px;font-size:.76rem;color:#92400e;line-height:1.7;margin:10px 0}
.opt-err{background:#fef2f2;border:1px solid #fecaca;border-radius:10px;padding:12px 14px;font-size:.8rem;color:#b91c1c;line-height:1.6;margin:10px 0}

/* ===== タブナビ（Phase 5 単一ページ統合） ===== */
.opt-tabnav{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 18px;padding-bottom:8px;border-bottom:2px solid #e2e8f0;position:sticky;top:0;background:#fff;z-index:20}
.opt-tabbtn{font-size:.82rem;font-weight:600;color:#475569;text-decoration:none;padding:8px 14px;border-radius:9px 9px 0 0;border:1px solid transparent;border-bottom:0;white-space:nowrap;transition:all .14s;line-height:1.2}
.opt-tabbtn:hover{background:#f1f5f9;color:#0f172a}
.opt-tabbtn.active{background:#2563eb;color:#fff}
section.opt-tab{display:none}
section.opt-tab.active{display:block;animation:optFade .18s ease}
@keyframes optFade{from{opacity:.4}to{opacity:1}}

/* ===== 環境判定カード（きょうの市況） ===== */
.opt-env-cards{margin-bottom:8px}
.opt-card.opt-env{cursor:default}
.opt-card.opt-env:hover{transform:none;box-shadow:none;border-color:#e2e8f0}
.opt-env-badge{display:inline-block;font-size:.78rem;font-weight:800;padding:3px 10px;border-radius:8px;margin:2px 0 8px}
.opt-env-badge.opt-env-good,.opt-card.opt-env-good{border-color:#86efac}
.opt-env-badge.opt-env-good{background:#dcfce7;color:#15803d}
.opt-env-badge.opt-env-mid{background:#fef9c3;color:#a16207}
.opt-env-badge.opt-env-bad{background:#fee2e2;color:#b91c1c}
.opt-card.opt-env-good{background:#f0fdf4}
.opt-card.opt-env-bad{background:#fef7f7}

/* ===== 用語辞典（この研究について） ===== */
.opt-glossary{margin:0}
.opt-glossary dt{font-size:.82rem;font-weight:700;color:#0f172a;margin-top:12px}
.opt-glossary dt:first-child{margin-top:0}
.opt-glossary dd{font-size:.78rem;color:#475569;line-height:1.7;margin:2px 0 0}
.opt-about-list{margin:6px 0 0;padding-left:18px}
.opt-about-list li{font-size:.8rem;color:#475569;line-height:1.85;margin-bottom:6px}
.opt-about-list li b{color:#0f172a}

/* cards */
.opt-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px;margin-bottom:8px}
.opt-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:18px;text-decoration:none;color:inherit;transition:all .18s;display:block}
.opt-card:hover{transform:translateY(-3px);box-shadow:0 8px 22px rgba(0,0,0,.08);border-color:#93c5fd}
.opt-card h3{font-size:.95rem;font-weight:700;color:#0f172a;margin:0 0 6px}
.opt-card p{font-size:.76rem;color:#64748b;line-height:1.6;margin:0}
.opt-card .opt-card-ic{font-size:1.3rem;margin-bottom:8px;display:block}

/* panels */
.opt-panel{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px;margin-bottom:16px}
.opt-panel h2{font-size:.95rem;font-weight:700;color:#0f172a;margin:0 0 10px}
.opt-panel h3{font-size:.84rem;font-weight:700;color:#334155;margin:14px 0 8px}
.opt-canvas-wrap{position:relative;width:100%}

/* selectors */
.opt-controls{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px}
.opt-field{display:flex;flex-direction:column;gap:3px}
.opt-field label{font-size:.68rem;color:#64748b;font-weight:600}
.opt-field select,.opt-field input{font-size:.82rem;padding:6px 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#0f172a;min-width:110px}
.opt-seg{display:inline-flex;border:1px solid #cbd5e1;border-radius:8px;overflow:hidden}
.opt-seg button{font-size:.76rem;padding:6px 12px;background:#fff;border:0;border-right:1px solid #e2e8f0;cursor:pointer;color:#475569}
.opt-seg button:last-child{border-right:0}
.opt-seg button.active{background:#2563eb;color:#fff}

/* stat tiles */
.opt-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}
.opt-tile{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px}
.opt-tile .lab{font-size:.66rem;color:#64748b;font-weight:600;margin-bottom:3px}
.opt-tile .val{font-size:1.05rem;font-weight:800;color:#0f172a;line-height:1.1}
.opt-tile .val.pos{color:#16a34a}.opt-tile .val.neg{color:#dc2626}
.opt-tile .sub{font-size:.62rem;color:#94a3b8;margin-top:2px}

/* tables */
.opt-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
table.opt-tbl{border-collapse:collapse;width:100%;font-size:.78rem;min-width:520px}
table.opt-tbl th,table.opt-tbl td{padding:7px 9px;border-bottom:1px solid #eef2f7;text-align:right;white-space:nowrap}
table.opt-tbl th{background:#f8fafc;color:#475569;font-weight:700;position:sticky;top:0;cursor:default}
table.opt-tbl th.sortable{cursor:pointer}
table.opt-tbl th.sortable:hover{color:#2563eb}
table.opt-tbl td:first-child,table.opt-tbl th:first-child{text-align:left}
table.opt-tbl tbody tr:hover{background:#f1f5f9}
table.opt-tbl tr.clickable{cursor:pointer}
.opt-pos{color:#16a34a}.opt-neg{color:#dc2626}

/* heatmap */
.opt-hm-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
table.opt-hm{border-collapse:collapse;font-size:.72rem}
table.opt-hm th{background:#f8fafc;color:#475569;font-weight:700;padding:6px 8px;white-space:nowrap;position:sticky}
table.opt-hm th.opt-hm-row{text-align:right;left:0;background:#f8fafc}
table.opt-hm .opt-hm-corner{left:0}
table.opt-hm td{padding:0;text-align:center}
table.opt-hm td.opt-hm-cell{min-width:52px;height:34px;font-weight:600}
table.opt-hm td.opt-hm-cell span{display:block;padding:6px 4px}
table.opt-hm td.opt-hm-cell:hover{outline:2px solid #0f172a;outline-offset:-2px}
table.opt-hm td.opt-hm-empty{background:#f1f5f9;color:#cbd5e1;min-width:52px}

/* year tiles */
.opt-ytiles{display:flex;flex-wrap:wrap;gap:4px}
.opt-ytile{width:56px;border-radius:6px;padding:5px 4px;text-align:center;font-size:.64rem}
.opt-ytile .yr{font-weight:700;color:#334155;font-size:.6rem}
.opt-ytile .v{font-weight:700;margin-top:2px}

/* mini bars */
.opt-mbars{display:flex;flex-direction:column;gap:5px}
.opt-mbar{display:grid;grid-template-columns:120px 1fr 62px;align-items:center;gap:8px;font-size:.72rem}
.opt-mbar-lab{color:#475569;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.opt-mbar.hl .opt-mbar-lab{font-weight:700;color:#1d4ed8}
.opt-mbar-track{position:relative;height:14px;background:#f1f5f9;border-radius:3px}
.opt-mbar-mid{position:absolute;left:50%;top:0;bottom:0;width:1px;background:#cbd5e1}
.opt-mbar-fill{position:absolute;top:2px;bottom:2px;border-radius:2px}
.opt-mbar-val{color:#334155;font-weight:600;text-align:right}

/* tooltip (shared, appended to body) */
.opt-tip{position:fixed;z-index:9999;pointer-events:none;background:rgba(15,23,42,.94);color:#fff;font-size:.72rem;line-height:1.5;padding:7px 10px;border-radius:7px;box-shadow:0 4px 14px rgba(0,0,0,.25);max-width:220px}

/* snapshot table color cues */
.opt-iv-hi{background:#fef2f2}.opt-iv-mid{background:#fffbeb}.opt-iv-lo{background:#f0fdf4}

details.opt-method{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:4px 14px;margin:16px 0}
details.opt-method summary{cursor:pointer;font-weight:700;font-size:.86rem;color:#334155;padding:10px 0}
details.opt-method ul{margin:6px 0 12px;padding-left:18px}
details.opt-method li{font-size:.76rem;color:#475569;line-height:1.8}

.opt-loading{text-align:center;color:#94a3b8;font-size:.8rem;padding:30px}
.opt-chip{display:inline-block;font-size:.66rem;padding:2px 8px;border-radius:20px;background:#eff6ff;color:#2563eb;font-weight:600;margin-left:6px}
.opt-chip.proxy{background:#fef3c7;color:#b45309}
@media(max-width:640px){
  .opt-mbar{grid-template-columns:92px 1fr 52px}
  .opt-hero h1{font-size:1.2rem}
  .opt-tabbtn{font-size:.76rem;padding:7px 10px}
}

/* --- fix6: この環境でのおすすめ戦略 + スキュー曲線 --- */
.opt-sig-cards{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.opt-card.opt-sig{padding:14px;cursor:default}
.opt-card.opt-sig:hover{transform:none;box-shadow:none;border-color:#e2e8f0}
.opt-sig-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}
.opt-sig-head h3{margin:0}
.opt-sig-row{border-top:1px solid #eef2f7;padding:8px 6px;border-radius:8px;cursor:pointer;transition:background .15s}
.opt-sig-row:hover{background:#f0f7ff}
.opt-sig-strat{font-size:.82rem;color:#0f172a}
.opt-sig-set{color:#94a3b8;font-weight:500;font-size:.72rem}
.opt-sig-stat{font-size:.7rem;color:#475569;line-height:1.6;margin-top:2px}
.opt-sig-live{font-size:.7rem;color:#2563eb;margin-top:2px}
