/* 期权投资板块原型 · 样式。2026-10-23 起改成苹果式毛玻璃（暗色）：彩色光晕的底 + 半透明、背景模糊的玻璃层；
   颜色取苹果系统色（暗色）。最早的令牌照抄 web/src/assets/main.css，现在和站里其他板块的观感不同，正式开发时再定 */
:root {
  --bg: #06080f;
  --glass: rgba(26, 30, 42, 0.5); /* 外层玻璃：块、顶栏、代码条 */
  --glass-strong: rgba(30, 34, 46, 0.82); /* 浮层玻璃：浮动窗口、术语、引导卡、图表提示框 */
  --blur: blur(28px) saturate(180%);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.08); /* 玻璃上沿的一道高光 */
  --shadow: 0 10px 36px rgba(0, 0, 0, 0.32);
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.07);
  --s1: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --accent: #0a84ff;
  --call: #30d158;
  --put: #ff453a;
  --price: #f5c542;
  --warn-bg: #3d2c00;
  --warn-border: #9e6a03;
  --warn-text: #f2cc60;
  --err-bg: #3d1418;
  --err-border: #b62324;
  --err-text: #ff9492;
  --orange: #f0883e; /* = --signal-bigtrade */
  --hub-gex-call: #ff9a8c;
  --hub-gex-put: #7ee79a;
  --hub-earn: #a9b83a;
  --radius: 18px;
  --top: 56px; /* 顶栏高度 */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 700px at 6% -10%, rgba(10, 132, 255, 0.42), transparent 60%),
    radial-gradient(900px 640px at 98% 2%, rgba(191, 90, 242, 0.34), transparent 62%),
    radial-gradient(1000px 760px at 72% 108%, rgba(48, 209, 88, 0.18), transparent 60%),
    radial-gradient(800px 600px at -4% 96%, rgba(255, 159, 10, 0.16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
td, .num, .kpi b, .big { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.up { color: var(--call); }
.dn { color: var(--put); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: grid; gap: 8px; align-content: start; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spacer { flex: 1; }

/* ── 玻璃层：半透明 + 背景模糊；块、顶栏、代码条是外层玻璃，浮动窗口和各种浮层用更实的一层 ── */
.topbar, .panel, .blk, dialog.modal, #tip, .tour-card, .toast { -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }

/* ── 顶栏：仿 Probe TopNav 第一行 ── */
.topbar { height: var(--top); display: flex; align-items: center; gap: 16px; padding: 0 22px; background: rgba(14, 17, 26, 0.6); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; white-space: nowrap; }
.brand img { width: 22px; height: 22px; display: block; }
.boards { display: flex; gap: 2px; background: rgba(118, 118, 128, 0.2); padding: 3px; border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.boards::-webkit-scrollbar { display: none; }
.boards a, .boards button { color: var(--muted); padding: 6px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; border: 0; background: none; cursor: pointer; }
.boards a:hover, .boards button:hover { color: var(--text); text-decoration: none; }
.boards .board-active { color: #fff; background: rgba(255, 255, 255, 0.16); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), var(--edge); }
.boards .new { font-size: 10px; margin-left: 4px; padding: 0 4px; border-radius: 4px; background: var(--orange); color: #111; vertical-align: 2px; }
.mock-badge { font-size: 12px; color: var(--warn-text); background: var(--warn-bg); border: 1px solid var(--warn-border); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.toast { position: fixed; left: 50%; top: 72px; transform: translateX(-50%); background: var(--glass-strong); border: 1px solid var(--border); padding: 8px 16px; border-radius: 999px; z-index: 60; box-shadow: var(--shadow), var(--edge); }
.foot { padding: 16px 22px 28px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); }

/* ── 行情主页 ── */
.mk { padding: 16px 22px; display: grid; gap: 12px; min-width: 0; }
.panel { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; box-shadow: var(--shadow), var(--edge); }
.mk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.syms { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent); } /* 放不下时右边渐隐，看得出还能往右滑 */
.syms::-webkit-scrollbar { display: none; }
.sym { display: grid; grid-template-columns: auto auto; justify-items: start; align-items: center; gap: 0 5px; padding: 4px 8px 4px 6px; border-radius: 12px; border: 1px solid var(--border); background: var(--s1); color: var(--text); white-space: nowrap; min-height: 44px; }
.sym:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.sym b { font-size: 14px; }
/* 图标占两行：1440 宽下 10 只个股刚好一行放下（约 840 / 865px），再加宽就要横向滚动 */
.sym > .logo { grid-row: span 2; width: 20px; height: 20px; padding: 3px; border-radius: 5px; }
.sym > .logo.mono { padding: 0; font-size: 7px; }
.sym b + span { font-size: 11px; color: var(--muted); }
.sym.on { border-color: rgba(10, 132, 255, 0.7); background: rgba(10, 132, 255, 0.2); }
.sym .up { color: var(--call); }
.sym .dn { color: var(--put); }
/* 选股参考：条件一行、卡片一行四张（窄屏两张 / 一张），每张逐条 ✓ ✗ */
.guide .conds { gap: 6px; }
.guide .gsum { display: none; margin-left: 10px; font-size: 12px; font-weight: 400; color: var(--muted); }
.guide.shut .gsum { display: inline; }
.guide.shut > .blk-b, .guide.shut > .blk-f { display: none; }
.guide.shut > .blk-h { border-bottom: 0; }
.guide .gcash { margin-left: auto; grid-template-columns: auto 120px; }
.picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 14px 12px; }
.pick { display: grid; gap: 6px; align-content: start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--s1); color: var(--text); }
.pick:hover { background: rgba(255, 255, 255, 0.07); text-decoration: none; }
.pick.on { border-color: rgba(10, 132, 255, 0.7); background: rgba(10, 132, 255, 0.12); }
/* 公司图标：白底圆角方块，品牌色图形；ETF 没有图标，显示代码字样 */
.logo { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 5px; border-radius: 7px; background: #fff; }
.logo svg { width: 100%; height: 100%; display: block; }
.logo.mono { padding: 0; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); font-size: 9px; font-weight: 700; letter-spacing: -0.2px; }
.pick .checks { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; }
.pick .go { color: var(--accent); font-size: 12px; font-weight: 600; }
.guide .rest { margin: 0; border-top: 1px solid var(--border); }
@media (max-width: 1100px) { .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .picks { grid-template-columns: minmax(0, 1fr); } .guide .gcash { margin-left: 0; } }
/* 期权学堂入口：金色、两行（名字 + 进度），一次都没打开过时右上角有呼吸点 */
.btn.learn { position: relative; min-height: 44px; padding: 4px 14px 4px 10px; gap: 8px; color: var(--warn-text); border-color: var(--price); background: rgba(210, 153, 34, 0.12); }
.btn.learn:hover { border-color: var(--warn-text); background: rgba(210, 153, 34, 0.2); }
.btn.learn span { display: grid; text-align: left; line-height: 1.3; }
.btn.learn small { font-size: 11px; font-weight: 400; color: var(--muted); }
.btn.learn.fresh::after { content: ''; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--price); animation: ping 1.6s ease-out infinite; }
@keyframes ping { from { box-shadow: 0 0 0 0 rgba(210, 153, 34, 0.7); } to { box-shadow: 0 0 0 10px rgba(210, 153, 34, 0); } }
.btn.icon { min-width: 40px; padding: 0; color: var(--muted); }
/* 新手引导：整屏透明的 dialog，挖空区域用超大阴影压暗其余部分 */
dialog.tour { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; }
dialog.tour::backdrop { background: transparent; }
.tour-hole { position: fixed; border-radius: 20px; box-shadow: 0 0 0 2px var(--price), 0 0 0 200vmax rgba(1, 4, 9, 0.72); transition: top 0.25s, left 0.25s, width 0.25s, height 0.25s; pointer-events: none; }
.tour-card { position: fixed; width: min(340px, calc(100vw - 32px)); display: grid; gap: 8px; padding: 16px; background: var(--glass-strong); color: var(--text); border: 1px solid var(--price); border-radius: 18px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), var(--edge); }
.tour-card h4 { margin: 0; font-size: 16px; }
.tour-card p { margin: 0; }
.tour-card .row { margin-top: 4px; }
.tour-card .skip { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px 4px; }
.tour-card .skip:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .btn.learn.fresh::after { animation: none; } .tour-hole { transition: none; } }
.quote { display: flex; align-items: baseline; gap: 10px 22px; flex-wrap: wrap; }
.quote .px { font-size: 26px; font-weight: 700; }
/* 公司资料入口：代码 + 名称 + 小箭头，悬浮弹出、点击钉住 */
.who { display: inline-flex; align-items: baseline; gap: 8px; margin: -2px -6px; padding: 2px 6px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; cursor: pointer; }
.who > svg, .who > .logo { align-self: center; }
.who > svg { color: var(--muted); }
.who:hover, .who:focus-visible { background: var(--panel-2); }
.prof { position: absolute; inset: auto; margin: 0; padding: 0; border: 0; background: none; color: var(--text); width: min(380px, calc(100vw - 32px)); overflow: visible; }
.prof > .blk { background: var(--glass-strong); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), var(--edge); }
.prof .blk-h .btn { min-width: 28px; min-height: 28px; font-size: 16px; }
.chart { width: 100%; height: 220px; }
.chart.big { height: clamp(340px, calc(100vh - 420px), 600px); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 14px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 4px; }
/* 上面两栏：左行情 K 线（拉伸到和右栏一样高），右模拟挂单 */
.mk-top { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 12px; align-items: stretch; scroll-margin-top: calc(var(--top) + 12px); }
.blk.fill, .blk.side { display: flex; flex-direction: column; }
.blk.fill > .blk-b, .blk.side > .blk-b { flex: 1; display: flex; flex-direction: column; }
.blk.fill > .blk-b > .blk-pad { flex: 1; display: flex; flex-direction: column; }
.blk.fill .chart.big { flex: 1; height: auto; min-height: 320px; margin-top: 8px; }
.pn > section { padding: 8px 14px; border-bottom: 1px solid var(--border); display: grid; gap: 6px; }
.pn .stack { gap: 6px; }
.pn .input { min-height: 34px; padding: 5px 10px; }
.strat-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.strat-seg a { text-align: center; padding: 5px 4px; }
/* 委托单细节：默认收起 */
.pn details.more { border: 1px solid var(--border); border-radius: 12px; background: var(--s1); }
.pn details.more > summary { cursor: pointer; padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--accent); display: flex; gap: 8px; align-items: baseline; }
.pn details.more > summary span { font-weight: 400; }
.pn details.more > .stack { padding: 0 10px 10px; }
.pn > section:last-child { border-bottom: 0; }
.pn h4 { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.pn h4 span { font-weight: 400; }
/* 推演结果的文字时长时短，留足高度，拖滑块时右栏和左边 K 线不跟着抖 */
.pn .sim-out { min-height: 110px; }
.pn .kpi[hidden] { display: none; }
.pn .kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 8px; margin-top: 2px; }
.pn .kpi b { font-size: 14px; }
.btn.sm { min-height: 30px; padding: 4px 10px; font-size: 12px; border-radius: 9px; }

/* ── 控件 ── */
.seg { display: inline-flex; gap: 2px; background: rgba(118, 118, 128, 0.2); padding: 3px; border-radius: 12px; flex-wrap: wrap; }
.seg button, .seg a { border: 0; background: none; color: var(--muted); padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; min-height: 36px; display: inline-flex; align-items: center; }
.seg button:hover, .seg a:hover { color: var(--text); text-decoration: none; }
.seg .on { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), var(--edge); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); cursor: pointer; font-weight: 600; white-space: nowrap; box-shadow: var(--edge); }
.btn:hover { text-decoration: none; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.18); }
.btn.on, .btn-primary { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 4px 16px rgba(10, 132, 255, 0.35), var(--edge); }
.btn-primary:hover { background: var(--accent); }
.btn-primary:hover { filter: brightness(1.08); }
.input { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; min-height: 40px; width: 100%; color: var(--text); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.3); }
.input:focus, .btn:focus-visible, .seg button:focus-visible, .sym:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.field .input { font-size: 14px; }
.field .fl { display: flex; justify-content: space-between; gap: 8px; }
.field.inline { grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 8px; }
/* 委托单：类型 + 有效期一行两格；委托价下面一排 Bid / 中间价 / Ask 快捷；数量带单位；预计金额两格 */
.field.inline > .term { justify-self: start; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pair .field.inline { grid-template-columns: auto minmax(0, 1fr); }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-left: 60px; }
.quick .btn { padding: 4px 6px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.input:disabled { opacity: 0.6; }
.suffix { position: relative; display: block; }
.suffix .input { padding-right: 32px; }
.suffix > span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ticket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.ticket > div { display: grid; gap: 1px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--s1); }
.ticket span { font-size: 11px; color: var(--muted); }
.ticket b { font-size: 16px; font-variant-numeric: tabular-nums; }
input[type='checkbox'] { accent-color: var(--accent); width: 16px; height: 16px; margin-top: 3px; }
input[type='range'] { width: 100%; accent-color: var(--price); }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '▸ '; color: var(--muted); }
details[open] > summary::before { content: '▾ '; }

/* ── 标签 ── */
.tag { display: inline-flex; font-size: 12px; padding: 3px 8px; border-radius: 6px; border: 1px solid; white-space: nowrap; }
.tag.orange { color: var(--orange); border-color: var(--orange); background: rgba(240, 136, 62, 0.1); }
.tag.yellow { color: var(--warn-text); border-color: var(--warn-border); background: var(--warn-bg); }
.tag.red { color: var(--err-text); border-color: var(--err-border); background: var(--err-bg); }
.tag.ok { color: var(--call); border-color: rgba(63, 185, 80, 0.5); background: rgba(63, 185, 80, 0.08); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--panel-2); border: 1px solid var(--border); }
.badge.A { color: var(--call); }
.badge.B { color: var(--price); }

/* 术语：点击弹出解释（原生 popover，叠在浮动窗口之上） */
.term { border: 0; background: none; padding: 0; color: inherit; cursor: help; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; font: inherit; }
.term:hover { color: var(--accent); }
#tip { max-width: min(420px, calc(100vw - 32px)); background: var(--glass-strong); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), var(--edge); }
#tip::backdrop { background: rgba(0, 0, 0, 0.25); }
#tip h4 { font-size: 16px; margin-bottom: 6px; }
#tip .aka { color: var(--muted); font-size: 12px; margin-left: 6px; font-weight: 400; }

/* ── 表格 ── */
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: right; font-weight: 600; color: var(--muted); background: var(--panel); padding: 7px 8px; white-space: nowrap; }
table.t td { text-align: right; padding: 0 8px; height: 32px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t th:first-child, table.t td:first-child { text-align: left; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--s1); }
table.t tr.sel td { background: rgba(10, 132, 255, 0.16); }
table.t tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
/* 文字表：表头和单元格一起左对齐，否则表头沿用数字表的右对齐，和内容错开 */
table.t.text th, table.t.text td { text-align: left; }
table.t :is(th, td).l { text-align: left; }
table.t .tag { padding: 0 6px; }
table.t td.wrap { white-space: normal; min-width: 300px; line-height: 1.45; padding-block: 6px; height: auto; }
.tag.blue { color: var(--accent); border-color: rgba(10, 132, 255, 0.5); background: rgba(10, 132, 255, 0.1); }
.tag.gray { color: var(--muted); border-color: var(--border); background: var(--panel-2); }
.warn { color: var(--price); }
/* 主推策略的星标：金色，切换按钮选中后也不变色 */
.star { font-style: normal; color: var(--price); margin-right: 4px; font-size: 0.92em; }
#evf a { cursor: pointer; }

/* 独立块（参照 Notion 的表格块）：自带标题栏和边框，和正文明显分开；内容放不下时在块内左右滑 */
.blk { border: 1px solid var(--border); border-radius: var(--radius); background: var(--glass); overflow: hidden; box-shadow: var(--shadow), var(--edge); }
.blk-h { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-height: 44px; padding: 8px 14px; background: var(--panel); border-bottom: 1px solid var(--border); font-weight: 600; }
.blk-h svg { color: var(--accent); flex: none; }
.blk-h .meta { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 400; color: var(--muted); }
.blk-h .meta .input { width: auto; min-height: 32px; padding: 4px 8px; font-size: 13px; }
.blk-h .meta input[type='search'] { width: 260px; max-width: 100%; }
.blk-h .meta .seg a { min-height: 28px; padding: 3px 12px; font-size: 13px; }
.blk-b { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.blk-f { padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13px; }
.blk-pad { padding: 12px 14px; }
.blk-pad + .blk-list { border-top: 1px solid var(--border); }
/* 块里的条目：左列名目、右列说明，行间画线（理由、风险、术语、日历、步骤、核对清单） */
.blk-list { list-style: none; margin: 0; padding: 0; }
.blk-list > li.sub { background: var(--panel-2); padding-top: 6px; padding-bottom: 6px; font-size: 12px; color: var(--muted); }
.blk-list > li.sub b { color: var(--muted); }
.blk-list > li { display: grid; grid-template-columns: var(--kw, 96px) minmax(0, 1fr); align-items: baseline; gap: 4px 14px; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.blk-list > li:last-child { border-bottom: 0; }
.blk-list > li > :only-child { grid-column: 1 / -1; }
.blk-list > li[hidden] { display: none; }
/* 块里的表：画全网格线；列宽按内容、不挤压；首列在左右滑时钉住 */
.blk table.t { min-width: max-content; border-collapse: separate; border-spacing: 0; }
.blk table.t :is(th, td) { padding-inline: 14px; border-right: 1px solid var(--border); }
.blk table.t th { border-bottom: 1px solid var(--border); }
.blk table.t :is(th, td):last-child { border-right: 0; }
.blk table.t tr:last-child td { border-bottom: 0; }
.blk table.t :is(th, td):first-child { position: sticky; left: 0; z-index: 1; }
.blk table.t tr.click:hover td { background: var(--panel-2); }

/* ── 浮动窗口（原生 dialog）：居中大窗，约占页面 80% 宽；自带遮罩、Esc 关闭、焦点锁在窗口内 ── */
dialog.modal { width: min(1600px, 80vw); height: min(1040px, 86vh); max-width: none; max-height: none; padding: 0; border: 1px solid var(--border); border-radius: 22px; background: var(--glass-strong); color: var(--text); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), var(--edge); }
dialog.modal[open] { display: flex; flex-direction: column; }
/* 完整分析：内容多少不一（卖 Put 有适合度和对比，其他策略没有），高度跟内容走；学堂保持固定高度，切标签不跳 */
dialog.modal.fit { height: fit-content; max-height: min(1040px, 86vh); }
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body:has(dialog[open]) { overflow: hidden; }
.modal-h { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.modal-h h2 { font-size: 17px; }
.modal-x { margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: var(--text); font-size: 20px; }
.modal-x:hover { text-decoration: none; background: rgba(255, 255, 255, 0.18); }
.modal-body { flex: 1; overflow-y: auto; padding: 20px; outline: none; }
/* 行高按内容走：窗口内容比窗口高时，带 overflow:hidden 的块不会被压扁（grid 的 auto 行允许收缩到 0） */
.modal-body.analysis { display: grid; grid-auto-rows: max-content; gap: 16px; }
.an-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(380px, 1fr); gap: 16px; align-items: start; }
.col { display: grid; gap: 16px; min-width: 0; }
.chart.pay { height: 260px; }
.blk-f.legend { margin: 0; }
.reading { max-width: 880px; margin: 0 auto; }
.big { font-size: 22px; font-weight: 700; line-height: 1.2; }
.kpi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
.kpi div { display: grid; gap: 2px; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi b { font-size: 15px; }
.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.out { background: var(--s1); border: 1px solid var(--border); border-top: 3px solid; border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; align-content: start; }
.out.good { border-top-color: var(--call); }
.out.bad { border-top-color: var(--put); }
.out .cond { font-size: 12px; color: var(--muted); }
.out .res { font-size: 16px; font-weight: 700; }
.out .mean { font-size: 12px; }
.sim-out { font-size: 15px; display: grid; gap: 6px; align-content: start; }
/* 推演结果的「期间最高 / 期间最低 / 到期」：两项或三项平分一行，最后一天那格最显眼 */
.swing { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.swing > div { display: grid; gap: 1px; align-content: start; padding: 6px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--s1); }
.swing > div > span { font-size: 11px; color: var(--muted); }
.swing b { font-size: 16px; font-variant-numeric: tabular-nums; }
.swing .end { border-color: var(--price); }
.swing .end b { font-size: 20px; }
.swing b small { font-size: 11px; font-weight: 600; }
/* 期权大单解读：点一行在它下面展开；表格放不下时左右滑，解读本身贴着左边、按可见宽度排 */
table.t tr.flow-x > td { padding: 0; height: auto; white-space: normal; text-align: left; background: var(--panel); }
.flow-read { position: sticky; left: 0; width: min(100%, calc(100vw - 48px)); display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px 24px; padding: 14px; line-height: 1.6; font-size: 13px; }
.flow-read p, .flow-read ul { margin: 0; }
.flow-read ul { padding-left: 18px; }
.flow-read .fr-h { display: block; margin-bottom: 2px; color: var(--muted); font-size: 12px; }
.fr-ends { display: grid; gap: 6px; align-content: start; }
.fr-grid { display: grid; grid-template-columns: auto auto 1fr auto; gap: 4px 12px; align-items: baseline; }
.fr-grid > :nth-child(-n + 4) { font-size: 11px; color: var(--muted); }
.fr-grid > :nth-child(4n + 3), .fr-grid > :nth-child(4n + 4) { text-align: right; }
.fr-act { grid-column: 1 / -1; gap: 8px 12px; }

/* 期权链（T 型报价，参照盘口）：到期日一排按钮 → 概况 → 悬浮提示条 → 表。先列现价上下几档，上下各一行按钮展开更多；
   中间一列行权价，现价一条金线隔开，价内铺浅底；持仓量画横条（像盘口的挂单量），从外侧往里长；Bid / Ask 是可点的价格格 */
.ch-exps { display: flex; gap: 6px; padding: 10px 14px 0; overflow-x: auto; scrollbar-width: none; }
.ch-exps::-webkit-scrollbar { display: none; }
.ch-exps a { flex: none; display: grid; justify-items: center; padding: 4px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--s1); color: var(--muted); line-height: 1.35; }
.ch-exps a:hover { background: var(--panel-2); text-decoration: none; }
.ch-exps a b { font-size: 13px; color: var(--text); }
.ch-exps a small { font-size: 11px; }
.ch-exps a em { font-style: normal; color: var(--orange); }
.ch-exps a.on { border-color: rgba(10, 132, 255, 0.7); background: rgba(10, 132, 255, 0.2); }
.ch-sum { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 10px 14px; font-size: 13px; color: var(--muted); }
.ch-sum b { color: var(--text); }
.ch-sum b.up { color: var(--call); }
.ch-sum b.dn { color: var(--put); }
.ch-hint { padding: 8px 14px; font-size: 13px; border-top: 1px solid var(--border); background: rgba(10, 132, 255, 0.08); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-wrap { overflow-x: auto; border-top: 1px solid var(--border); scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
table.ch { width: 100%; min-width: max-content; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.ch th { padding: 5px 10px; font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; background: var(--panel); border-bottom: 1px solid var(--border); line-height: 1.3; }
table.ch th small { display: block; font-size: 11px; font-weight: 400; }
table.ch tr.grp th { padding: 7px 10px; font-size: 13px; }
table.ch tr.grp small { display: inline; margin-left: 6px; }
table.ch th.gc { color: var(--call); background-image: linear-gradient(rgba(48, 209, 88, 0.1), rgba(48, 209, 88, 0.1)); }
table.ch th.gp { color: var(--put); background-image: linear-gradient(rgba(255, 69, 58, 0.1), rgba(255, 69, 58, 0.1)); }
table.ch :is(th, td).k { border-inline: 1px solid var(--border); }
table.ch td { height: 34px; padding: 0 10px; text-align: center; white-space: nowrap; border-bottom: 1px solid rgba(255, 255, 255, 0.05); cursor: pointer; }
table.ch td.k { background-color: rgba(255, 255, 255, 0.05); min-width: 96px; }
table.ch td.k small { font-size: 11px; }
table.ch td.itm { background-color: rgba(245, 197, 66, 0.1); }
table.ch td.oi { background-image: linear-gradient(rgba(48, 209, 88, 0.3), rgba(48, 209, 88, 0.3)); background-position: left center; background-size: var(--w) 20px; background-repeat: no-repeat; }
table.ch td.oi-P { background-image: linear-gradient(rgba(255, 69, 58, 0.3), rgba(255, 69, 58, 0.3)); background-position: right center; }
table.ch td.px { font-weight: 600; }
table.ch tr.r:hover td { background-color: var(--panel-2); }
table.ch td.sel { background-color: rgba(10, 132, 255, 0.14); }
table.ch td.px:hover { background-color: rgba(10, 132, 255, 0.28); box-shadow: inset 0 0 0 1px var(--accent); }
table.ch td.on, table.ch td.on:hover { background-color: var(--accent); color: #fff; }
table.ch tr.spot td { height: 24px; padding: 0; border: 0; cursor: default; background: linear-gradient(transparent calc(50% - 1px), var(--price) 0 calc(50% + 1px), transparent 0); }
table.ch tr.spot span { display: inline-block; padding: 1px 12px; border-radius: 999px; background: var(--price); color: #111; font-size: 12px; font-weight: 700; }
table.ch tr.spot small { font-size: 11px; opacity: 0.75; }
table.ch tr.more td { height: 30px; padding: 0; cursor: default; }
table.ch tr.more button { width: 100%; height: 30px; border: 0; background: none; color: var(--accent); font-size: 12px; cursor: pointer; }
table.ch tr.more button:hover { background: var(--panel-2); }
table.ch tr.more b { font-weight: 600; }

/* 学堂 */
.lesson { display: grid; gap: 10px; }
/* 列宽钉死在容器内：块里的宽表在块内左右滑，不撑宽整页 */
.lesson, .lesson > ol { grid-template-columns: minmax(0, 1fr); }
.lesson h3 { font-size: 15px; margin-top: 6px; }
.lesson > ol, .lesson > ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.lesson li > .blk { margin-top: 8px; }
.lesson > .seg { justify-self: start; }
.contract { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); }
.contract button { border: 0; border-right: 1px solid var(--border); background: var(--s1); padding: 10px; display: grid; gap: 2px; cursor: pointer; text-align: left; }
.contract button:last-child { border-right: 0; }
.contract button.on { background: rgba(10, 132, 255, 0.18); }
.contract button span { font-size: 12px; color: var(--muted); }
.contract button b { font-size: 15px; }

/* ── 手机（次要）：浮动窗口全屏，主页单列 ── */
@media (max-width: 1100px) {
  dialog.modal { width: 94vw; }
  .blk table.t :is(th, td):first-child { background: var(--glass-strong); }
  .an-cols, .mk-top { grid-template-columns: minmax(0, 1fr); }
  .flow-read { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .topbar { padding: 0 12px; gap: 10px; }
  .brand .name, .mock-badge .long { display: none; }
  .mk { padding: 12px; }
  .mk-bar .syms { flex-basis: 100%; } /* 代码条独占一行，按钮换到下一行 */
  .ch-hint { white-space: normal; } /* 手机没有悬浮，提示条整句换行 */
  dialog.modal { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  dialog.modal.fit { height: 100dvh; max-height: none; }
  .modal-body { padding: 14px; }
  .quote .px { font-size: 22px; }
  .chart.big { height: 320px; }
  .outcomes, .g2 { grid-template-columns: minmax(0, 1fr); }
  .kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
