/* ==========================================================================
   股票系统 · 移动端专用站点（/m）
   --------------------------------------------------------------------------
   设备档位（由 JS 写入 html[data-device]）：
     phone  手机竖屏            < 600   单列 + 底部 tab
     fold   折叠屏展开          600~899 双列 + 底部 tab
     dual   双折叠             900~1199 双列 + 左侧导航
     tri    三折叠            1200~1599 三列 + 左侧导航
     wide   阔折叠            1600~1999 四列 + 左侧导航
     tablet 平板（短边 ≥ 900）  ——     三列 + 左侧导航
   所有纵向留白都带 safe-area，横向内容不贴边（--pad）。
   ========================================================================== */

:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --text: #1f2329;
  --text-sub: #86909c;
  --text-weak: #a9b0bb;
  --up: #e02e2e;
  --down: #2ea44e;
  --flat: #86909c;
  --primary: #3b82f6;
  --primary-soft: #e8f1ff;
  --gold: #d97706;
  --border: #e5e8ef;
  --radius: 14px;
  --radius-sm: 10px;
  --error: #c53a3a;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .05);

  --pad: 12px;
  --cols: 1;
  --bar-h: 48px;
  --tab-h: 54px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

:root[data-device="fold"]   { --cols: 2; --pad: 14px; }
:root[data-device="dual"]   { --cols: 2; --pad: 16px; }
:root[data-device="tri"]    { --cols: 3; --pad: 18px; }
:root[data-device="wide"]   { --cols: 4; --pad: 20px; }
:root[data-device="tablet"] { --cols: 3; --pad: 18px; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body { overflow: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: var(--primary); text-decoration: none; }

/* ============================ 外壳布局 ============================ */

.m-app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 100dvh;
}

.m-bar {
  flex: 0 0 auto;
  height: calc(var(--bar-h) + var(--safe-t));
  padding: var(--safe-t) calc(8px + var(--safe-r)) 0 calc(8px + var(--safe-l));
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 20;
}

.m-bar-btn {
  width: 34px;
  height: 34px;
  font-size: 24px;
  line-height: 1;
  color: var(--text-sub);
  border-radius: 50%;
  flex: 0 0 auto;
}
.m-bar-btn:active { background: var(--panel-2); }

.m-bar-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-bar-act {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-sub);
}

.m-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  /* 底部多留 84px：给右下角悬浮导航按钮（56px + 边距）腾地方，列表最后一行不会被压住 */
  padding: var(--pad) calc(var(--pad) + var(--safe-r)) calc(var(--pad) + var(--safe-b) + 84px) calc(var(--pad) + var(--safe-l));
}

.m-page { padding-bottom: 8px; }
:root[data-device="wide"] .m-page,
:root[data-device="tri"] .m-page,
:root[data-device="tablet"] .m-page { max-width: 1600px; margin: 0 auto; }

/* ============================ 底部 tab / 左侧导航 ============================ */

/* 手机上没有底部导航了（全靠右下角悬浮按钮），只有宽设备才显示这条左侧导航 */
.m-tabbar {
  flex: 0 0 auto;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex;
  background: var(--panel);
  border-top: 1px solid var(--border);
  z-index: 20;
}
.m-tabbar[hidden] { display: none; }

.m-tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-weak);
  font-size: 11px;
}
.m-tab .ico { font-size: 20px; line-height: 1; }
.m-tab.is-on { color: var(--primary); }
.m-tab.is-on .ico { transform: translateY(-1px); }

/* 宽设备（双折叠及以上）：左侧导航条 */
@media (min-width: 900px) {
  .m-app {
    display: grid;
    grid-template-columns: 92px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: "bar bar" "nav main";
  }
  .m-bar { grid-area: bar; }
  .m-tabbar {
    grid-area: nav;
    height: auto;
    padding: 8px 0 calc(8px + var(--safe-b)) 0;
    flex-direction: column;
    gap: 2px;
    border-top: 0;
    border-right: 1px solid var(--border);
    overflow-y: auto;
  }
  .m-tab {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    margin: 0 6px;
  }
  .m-tab.is-on { background: var(--primary-soft); }
  .m-main { grid-area: main; }
}

/* ============================ 通用组件 ============================ */

.m-sec { margin-bottom: 14px; }

.m-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 2px 8px;
}

.m-sec-title { font-size: 14px; font-weight: 600; }
.m-sec-note { font-size: 12px; color: var(--text-sub); }

.m-card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  margin-bottom: 10px;
}

.m-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 10px;
}

.m-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.m-row-main { flex: 1 1 auto; min-width: 0; }
.m-row-title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-row-sub {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-row-right { flex: 0 0 auto; text-align: right; }
.m-row-price { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.m-row-pct { font-size: 13px; font-variant-numeric: tabular-nums; }

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }

/* 列表条目（可点击行，带分隔线） */
.m-list {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.m-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.m-item:last-child { border-bottom: 0; }
.m-item:active { background: var(--panel-2); }
.m-item.is-on { background: var(--primary-soft); }

.m-del {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--text-weak);
  font-size: 17px;
  line-height: 1;
}
.m-del:active { background: #fee2e2; color: var(--error); }

/* 统计卡 */
.m-stats {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
:root[data-device="phone"] .m-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.m-stat {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 12px;
}
.m-stat-k { font-size: 12px; color: var(--text-sub); }
.m-stat-v {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.m-stat-v small { font-size: 12px; font-weight: 500; margin-left: 2px; }
.m-stat-s { font-size: 11px; color: var(--text-weak); margin-top: 2px; }

/* 分段 / chips */
.m-seg {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.m-seg-btn {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-sub);
}
.m-seg-btn.is-on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.m-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--panel-2);
  color: var(--text-sub);
}
.m-chip.is-warn { background: #fff4e5; color: var(--gold); }
.m-chip.is-soon { background: #fee2e2; color: var(--up); }
.m-chip.is-ok { background: #e7f7ee; color: var(--down); }

/* 表单 */
.m-form { display: flex; gap: 8px; }
.m-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  outline: none;
}
.m-input:focus { border-color: var(--primary); }
.m-select {
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.m-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
}
.m-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.m-btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.m-btn:active { opacity: .82; }
.m-btn:disabled { opacity: .5; }

.m-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-sub);
  font-size: 13px;
}
.m-empty .big { display: block; font-size: 30px; margin-bottom: 6px; }

.m-loading {
  padding: 40px 0;
  text-align: center;
  color: var(--text-sub);
  font-size: 13px;
}
.m-line { height: 1px; background: var(--border); margin: 10px 0; }

.m-note { font-size: 12px; color: var(--text-weak); line-height: 1.7; }

/* 数值条（资金流 / 股息率） */
.m-bar-wrap {
  height: 4px;
  border-radius: 2px;
  background: var(--panel-2);
  overflow: hidden;
  margin-top: 4px;
}
.m-bar-wrap > i { display: block; height: 100%; border-radius: 2px; background: var(--primary); }
.m-bar-wrap > i.up { background: var(--up); }
.m-bar-wrap > i.down { background: var(--down); }

/* 图表容器 */
.m-chart { width: 100%; height: 260px; }
:root[data-device="dual"] .m-chart,
:root[data-device="tri"] .m-chart,
:root[data-device="wide"] .m-chart,
:root[data-device="tablet"] .m-chart { height: 340px; }

/* 只在宽设备（双折叠及以上）显示：内联走势图、双栏明细等 */
.m-only-wide { display: none; }
@media (min-width: 900px) {
  .m-only-wide { display: block; }
}

/* toast */
.m-toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--safe-b));
  transform: translateX(-50%);
  max-width: min(88vw, 420px);
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, .92);
  color: #fff;
  font-size: 13px;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .25);
}
.m-toast.is-err { background: var(--error); }

.m-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  z-index: 200;
}

/* 实时连接指示点 */
.m-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-weak);
  margin-right: 4px;
  vertical-align: middle;
}
.m-dot.on { background: var(--down); }
.m-dot.off { background: var(--text-weak); }

/* ===== 悬浮导航（右下角圆按钮）=====
 * 手机上它是唯一的主导航：收起时只有一个圆按钮，点开后入口沿「同一条弧线」整齐甩出，
 * 每个按钮下方挂一个两字短标签（跟着按钮一起淡入，不会互相压住），当前页面高亮。
 * 弧线坐标由 JS 按视口算好写进 --x / --y，--d 是逐项展开的错峰延迟（越远越晚出来）。 */
.m-fab {
  position: fixed;
  right: 16px;
  bottom: calc(18px + var(--safe-b));
  z-index: 260;
}
.m-fab-main {
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f8ef7, #2563eb);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .42), 0 0 0 4px rgba(59, 130, 246, .14);
  transition: transform .22s cubic-bezier(.34, 1.3, .64, 1), background .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.m-fab-main:active { transform: scale(.92); }
.m-fab.is-open .m-fab-main {
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .32), 0 0 0 4px rgba(100, 116, 139, .16);
  transform: rotate(90deg);
}

/* 扇形圆心 = 主按钮正中心 */
.m-fab-fan {
  position: absolute;
  left: 28px;
  top: 28px;
  width: 0;
  height: 0;
  z-index: 1;
}
.m-fab-item {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--panel);
  font-size: 21px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .2);
  opacity: 0;
  pointer-events: none;
  transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px))) scale(.35);
  transition: transform .32s cubic-bezier(.34, 1.26, .64, 1) var(--d, 0ms),
              opacity .18s linear var(--d, 0ms);
  -webkit-tap-highlight-color: transparent;
}
.m-fab.is-open .m-fab-item {
  opacity: 1;
  pointer-events: auto;
  transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px))) scale(1);
}
.m-fab-item.is-on {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .34), 0 0 0 3px rgba(59, 130, 246, .18);
}

/* 名字挂在按钮「外侧」再往外一圈：图标一道弧 + 名字一道弧，谁也不会压着谁 */
.m-fab-label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px))) scale(.8);
  white-space: nowrap;
  text-align: center;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .14);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity .18s linear var(--d, 0ms),
              transform .3s cubic-bezier(.34, 1.26, .64, 1) var(--d, 0ms);
}
.m-fab.is-open .m-fab-label {
  opacity: 1;
  pointer-events: auto;
  transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px))) scale(1);
}
.m-fab-item.is-on + .m-fab-label { color: var(--primary); border-color: var(--primary); }

/* 小屏手机（≤360）按钮收一点，弧线就不会挤在一起 */
@media (max-width: 360px) {
  .m-fab-item { width: 42px; height: 42px; font-size: 18px; }
  .m-fab-label { font-size: 10px; padding: 2px 6px; letter-spacing: 0; }
}

.m-fab-mask {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(15, 23, 42, .34);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

@media (min-width: 900px) {
  .m-fab { right: 22px; bottom: calc(22px + var(--safe-b)); }
}

/* 复制兜底弹层：自动复制失败时把内容摊开让用户长按拷贝 */
.m-copybox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .45);
}
.m-copybox-panel {
  width: min(520px, 100%);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .28);
}
.m-copybox-input {
  width: 100%;
  height: 46px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  user-select: all;
  -webkit-user-select: all;
}

/* ==========================================================================
   行情监测：左边股票列表 · 右边K线图
   --------------------------------------------------------------------------
   手机：概览 → 添加 → 列表 → 行情 + 周期 + 图表（纵向堆叠）
   宽屏（≥900）：概览一整行四格，下面左列表 / 右图表分栏，左列吸顶
   ========================================================================== */

.mk-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.mk-stat {
  position: relative;
  overflow: hidden;
  padding: 9px 11px 10px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

/* 左侧一道渐变竖条，纯装饰 */
.mk-stat::after {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--primary), #8ab4ff);
}

.mk-stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-sub);
  letter-spacing: .5px;
}

.mk-stat-value {
  display: block;
  margin-top: 1px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-stat-value i {
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-weak);
  margin: 0 2px;
}

/* 领涨那格要放「名字 + 涨幅」，字号收一点才放得下 */
.mk-stat-lead { font-size: 15px; }

/* ---------------------------------------------------------- 主体两栏 */

.mk-body { display: block; }
.mk-col { min-width: 0; }
.mk-col-list { margin-bottom: 12px; }

/* 列表：选中行左侧一道主色竖条，一眼看得出在看哪只 */
.mk-col-list .m-item.is-on { background: var(--primary-soft); }
.mk-col-list .m-item.is-on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
}
.mk-col-list .m-row-title { font-size: 15.5px; }

/* 删除按钮的两段式确认态：点一下变成红色胶囊「确认」 */
.m-del.is-ask {
  width: auto;
  padding: 0 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: var(--error);
  font-size: 12px;
  font-weight: 600;
}

/* ---------------------------------------------------------- 右侧行情头 */

.mk-quote {
  margin-bottom: 10px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mk-quote-empty {
  padding: 16px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text-sub);
  font-size: 13px;
  text-align: center;
}

.mk-quote-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f6f9ff 0%, #edf3ff 100%);
}

.mk-quote-main { flex: 1 1 auto; min-width: 0; }

.mk-quote-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-quote-code {
  font-size: 12px;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.mk-quote-price {
  flex: 0 0 auto;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.8px;
  font-variant-numeric: tabular-nums;
}

.mk-quote-delta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------- 八项指标 */

.mk-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mk-metric {
  padding: 8px 4px;
  text-align: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.mk-metric:nth-child(4n) { border-right: 0; }
.mk-metric:nth-last-child(-n+4) { border-bottom: 0; }

.mk-metric span {
  display: block;
  font-size: 11px;
  color: var(--text-sub);
}

.mk-metric b {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------------------------------------------------- 周期切换 + 图表 */

.mk-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.mk-chart-card { padding: 8px 6px 6px; }

/* 用 id 提高优先级，盖过设备档位里 .m-chart 的统一高度 */
#mk-chart { height: 300px; }

@media (max-width: 359px) {
  .mk-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-metric { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .mk-metric:nth-child(2n) { border-right: 0; }
  .mk-metric:nth-last-child(-n+4) { border-bottom: 1px solid var(--border); }
  .mk-metric:nth-last-child(-n+2) { border-bottom: 0; }
}

/* 宽屏：左边列表 + 右边K线 */
@media (min-width: 900px) {
  .mk-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .mk-body {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .mk-col-list {
    margin-bottom: 0;
    position: sticky;
    top: 0;
  }

  .mk-col-list .m-list {
    max-height: calc(100dvh - 260px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #mk-chart { height: max(420px, min(600px, calc(100dvh - 400px))); }
}

/* 个股详情：K线是三宫格（蜡烛+成交量+MACD），比普通走势图要高一点 */
#sk-chart { height: 320px; }

:root[data-device="dual"] #sk-chart,
:root[data-device="tri"] #sk-chart,
:root[data-device="wide"] #sk-chart,
:root[data-device="tablet"] #sk-chart { height: 460px; }
