/* 最强风口 · 网页版样式
   视觉依据：用户截图 + 原 App H5（strongestTuyere.css / commons.css / rangeSelBar.css）
   取色：标题栏 rgb(221,74,66)；表头 #f3f3f3；排序列表头 #eaf4fe；
        涨红 #e02d2d；跌绿 #25990e；板块蓝 #3c5c9f；风险提示 #811d11/#fcf1d8。 */

:root {
  --brand: #dd4a42;
  --brand-deep: #c53c34;
  --ink: #333333;
  --ink-2: #666666;
  --muted: #8b8b8b;
  --line: #ececec;
  --line-2: #e2e2e2;
  --head-bg: #f3f3f3;
  --head-ink: #666666;
  --active-head: #eaf4fe;
  --active-row: #f2f8ff;
  --red: #e02d2d;
  --red-deep: #a3231a;
  --green: #25990e;
  --blue: #3c5c9f;
  --bg: #f3f3f3;
  --radius: 8px;
  --dock-h: 118px;
  --font: 'Century Gothic', Arial, Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--font);
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
}
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
button:disabled { cursor: default; }
b { font-weight: 600; }
:focus-visible { outline: 2px solid #4a75a9; outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  background: #fff; color: var(--blue); padding: 8px 12px; border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.15); text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ---------- 标题栏 ---------- */
.app-bar { background: var(--brand); color: #fff; padding-top: env(safe-area-inset-top); }
.app-bar-inner {
  max-width: 1120px; margin: 0 auto; height: 54px;
  padding: 0 12px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
}
.back-chip {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 2px;
  color: #fff; text-decoration: none;
  padding: 4px 8px 4px 2px; border-radius: 8px;
}
.back-chip:hover { background: rgba(255,255,255,.14); }
.back-chev {
  width: 9px; height: 9px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
  transform: rotate(45deg); margin: 0 6px 0 4px; border-radius: 1px;
}
.back-icon {
  display: block; width: 28px; height: 28px;
  object-fit: contain; flex: 0 0 auto;
}
.title-wrap { display: inline-flex; align-items: center; gap: 6px; }
.app-title { font-size: 19px; font-weight: 600; letter-spacing: 2px; }
.help-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.9);
  color: #fff; font-size: 14px; font-weight: 600; line-height: 1;
  display: inline-grid; place-items: center;
}
.help-btn:hover { background: rgba(255,255,255,.16); }

/* ---------- 页面容器 ---------- */
.shell {
  max-width: 1120px; margin: 0 auto; background: #fff;
  min-height: calc(100vh - 54px);
  box-shadow: 0 0 0 1px rgba(0,0,0,.03);
}

/* ---------- 指数 + 日期 ---------- */
.quote-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px 9px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.index-block { position: relative; flex: 0 0 auto; min-width: 116px; }
.index-main { display: block; width: 100%; text-align: left; padding: 0; border-radius: 6px; }
.index-main:hover { background: #fafafa; }
.idx-top { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.idx-name { font-size: 19px; color: #4a4a4a; }
.idx-last {
  font-size: 19px; color: var(--red-deep); font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: .2px;
}
.idx-last.up { color: var(--red-deep); }
.idx-last.down { color: #1c7a0d; }
.idx-last.flat { color: #4a4a4a; }
.idx-sub {
  display: block; font-size: 12.5px; color: var(--red); margin-top: 1px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.idx-sub.down { color: var(--green); }
.idx-sub.flat { color: var(--muted); }
.quote-divider { flex: 0 0 auto; width: 1px; height: 34px; background: #e6e6e6; }
.date-switch { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.date-arrow {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px;
  color: #9a9a9a;
}
.date-arrow:hover:not(:disabled) { background: #f7f7f7; color: #6f6f6f; }
.date-arrow:disabled { color: #d2d2d2; }
.tri { width: 0; height: 0; border-top: 9px solid transparent; border-bottom: 9px solid transparent; display: block; }
.tri-left { border-right: 13px solid currentColor; }
.tri-right { border-left: 13px solid currentColor; }
.date-pill {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid #cfcfcf; border-radius: 6px;
  background: #fff; padding: 5px 9px;
  color: #5a6c9e; font-size: 15px; letter-spacing: .3px;
  font-variant-numeric: tabular-nums; min-width: 148px; justify-content: center;
}
.date-pill:hover { border-color: #b9b9b9; }
.cal-icon {
  display: block; width: 18px; height: 18px;
  object-fit: contain; flex: 0 0 auto;
}

/* 指数下拉 */
.index-menu {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 25;
  min-width: 208px; background: #fff; border-radius: 8px;
  border: 1px solid #e6e6e6; box-shadow: 0 6px 22px rgba(0,0,0,.14);
  padding: 4px; overflow: hidden;
}
.index-menu[hidden] { display: none; }
.index-menu-empty { padding: 10px 12px; font-size: 12px; color: var(--muted); }
.index-option {
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px;
  width: 100%; text-align: left; padding: 7px 8px; border-radius: 6px;
  font-size: 13px; color: #444;
}
.index-option:hover { background: #f6f8fb; }
.index-option[aria-selected="true"] { background: #f1f6fd; }
.opt-name { color: #555; }
.opt-last { font-variant-numeric: tabular-nums; color: #333; text-align: right; }
.opt-pct { font-variant-numeric: tabular-nums; font-size: 12px; min-width: 52px; text-align: right; }

/* ---------- 数据状态行 ---------- */
.meta-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  padding: 7px 14px; background: #fbfbfb; border-bottom: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
.meta-bar b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.mode-chip {
  background: #fdeceb; color: #c04237;
  border: 1px solid #f6d3d0; border-radius: 4px;
  font-size: 11px; padding: 1px 6px; line-height: 1.5;
}
.mode-chip.is-fixed { background: #eef3fb; color: #3c5c9f; border-color: #d8e3f4; }
.mode-chip.is-stale { background: #fff6e5; color: #a9701c; border-color: #f2e0bd; }
.meta-item { white-space: nowrap; }
.meta-note { color: #b06a10; }
.meta-note[hidden] { display: none; }

/* ---------- 提示条 ---------- */
.banner {
  display: flex; align-items: flex-start; gap: 8px;
  background: #fcf1d8; color: #811d11;
  padding: 8px 12px; font-size: 12.5px; line-height: 1.55;
  border-bottom: 1px solid #f2e2c2;
}
.banner[hidden] { display: none; }
.banner-text { flex: 1 1 auto; overflow-wrap: anywhere; }
.banner-close {
  flex: 0 0 auto; color: #811d11; font-size: 16px; line-height: 1;
  padding: 2px 6px; border-radius: 4px;
}
.banner-close:hover { background: rgba(129,29,17,.08); }
.banner-error { background: #fff4f2; color: #a02a1e; border-bottom-color: #f6d9d4; }

/* ---------- 榜单 ---------- */
.board-panel { padding-bottom: 6px; }
.board {
  --cols: 16.5% 10% 10% 26.5% 12.5% 12% 12.5%;
  background: #fff;
}
.grid-row {
  display: grid; grid-template-columns: var(--cols);
  align-items: stretch; width: 100%;
}

/* 表头 */
.thead {
  position: sticky; top: 0; z-index: 12;
  background: var(--head-bg);
  border-bottom: 1px solid #e4e4e4;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.hrow { min-height: 44px; }
.hcell {
  display: flex; align-items: center; justify-content: center;
  min-width: 0; position: relative;
  border-right: 1px solid #e7e7e7;
}
.hcell:last-child { border-right: 0; }
.hcell.is-sorted { background: var(--active-head); }
.th-btn, .th-static {
  width: 100%; height: 100%; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  color: var(--head-ink); font-size: 13.5px; font-weight: 400;
  padding: 0 4px; white-space: nowrap;
}
.th-btn:hover { color: #3d3d3d; }
.th-btn.is-active { color: #55595f; }

/* 窄屏列切换 */
.col-switch {
  display: none;
  align-items: center; gap: 8px;
  padding: 5px 10px; background: #fafafa; border-bottom: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
.col-switch-btn {
  width: 26px; height: 24px; border-radius: 5px; border: 1px solid #dedede;
  background: #fff; color: #6f6f6f; font-size: 15px; line-height: 1;
  display: grid; place-items: center;
}
.col-switch-btn:disabled { color: #cfcfcf; border-color: #ececec; }
.col-switch-label { color: #4a4a4a; font-weight: 600; min-width: 56px; text-align: center; }
.col-switch-hint { margin-left: auto; color: #a5a5a5; }

/* 数据行 */
.tbody { display: block; }
.row { border-bottom: 1px solid var(--line); cursor: pointer; background: #fff; }
.row:hover { background: #fcfcfd; }
.row:last-child { border-bottom: 0; }
.cell {
  min-width: 0; padding: 6px 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-variant-numeric: tabular-nums;
}

.c-name { flex-direction: column; align-items: flex-start; justify-content: center; padding-left: 12px; gap: 1px; }
.nm-line { display: flex; align-items: center; gap: 3px; max-width: 100%; }
.name-btn {
  padding: 0; text-align: left; max-width: 100%;
  font-size: 14.5px; font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.name-btn:hover { color: var(--blue); }
.name-btn.t-red { color: var(--red); }
.meta-line { display: flex; align-items: center; gap: 5px; color: #9a9a9a; font-size: 11.5px; }
.meta-line .code { letter-spacing: .2px; }
.time-badge {
  border: 1px solid #d68875; color: #b5744f;
  border-radius: 3px; padding: 0 3px; font-size: 10.5px; line-height: 1.45;
}
.st-arrow { flex: 0 0 auto; width: 11px; height: 12px; border-radius: 1px; position: relative; display: inline-block; }
.st-arrow::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 0; height: 0; transform: translate(-50%, -50%);
  border-left: 2.5px solid transparent; border-right: 2.5px solid transparent;
}
.st-arrow.up { background: var(--red); }
.st-arrow.up::after { border-bottom: 4px solid #fff; }
.st-arrow.down { background: var(--green); }
.st-arrow.down::after { border-top: 4px solid #fff; }

.c-strength { font-size: 13.5px; color: #444; }
.c-change { font-weight: 500; }
.c-net { font-weight: 500; }
.c-buy { color: var(--red); }
.c-sell { color: var(--green); }
.up { color: var(--red); }
.down { color: var(--green); }
.flat { color: #666; }

/* 板块 */
.c-plate { align-items: flex-start; flex-direction: column; }
.plate-btn { display: block; width: 100%; min-height: 100%; padding: 5px 2px 6px; text-align: left; border-radius: 4px; }
.plate-btn:hover { background: #f6f9ff; }
.plate-line {
  display: block; max-width: 100%;
  color: var(--blue); font-size: 12px; line-height: 1.55;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plate-line .hot-name { color: var(--red); }
.hot-tag {
  display: inline-block; background: var(--red); color: #fff;
  font-size: 9.5px; line-height: 12px; height: 12px; padding: 0 2px;
  border-radius: 1px; margin-left: 2px; vertical-align: 1px;
}
.plate-empty { color: #c4c4c4; font-size: 12px; }
.plate-more { color: #a8a8a8; font-size: 10.5px; padding-left: 2px; }

.sort-mark { font-size: 12px; line-height: 1; color: #8d8d8d; transform: translateY(-1px); }

/* 状态占位 */
.board-state { padding: 26px 20px 34px; text-align: center; }
.board-state[hidden] { display: none; }
.state-title { font-size: 15px; font-weight: 600; color: #444; margin-bottom: 6px; }
.state-text { font-size: 12.5px; color: var(--muted); line-height: 1.7; overflow-wrap: anywhere; }
.state-actions { margin-top: 14px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.state-card-permission {
  max-width: 330px; margin: 0 auto; background: #fff;
  box-shadow: 0 3px 12px rgba(0,0,0,.12); border-radius: 6px; padding: 18px 20px;
}
.state-card-permission .state-title { color: var(--red); font-size: 17px; }
.state-card-permission .state-text { color: #444; font-size: 14px; font-weight: 600; }
.state-note { color: var(--muted); font-weight: 400; font-size: 11.5px; margin-top: 8px; line-height: 1.7; }
.spinner {
  width: 18px; height: 18px; margin: 0 auto 10px; border-radius: 50%;
  border: 2px solid #e6e6e6; border-top-color: var(--brand);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.disclaimer {
  color: #8f8f8f; font-size: 11.5px; line-height: 1.75;
  padding: 12px 16px 14px; border-top: 1px solid var(--line);
  background: #fbfbfb;
}

/* ---------- 底部时间滑块 ---------- */
.time-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: #fff; border-top: 1px solid #e6e6e6;
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  padding-bottom: env(safe-area-inset-bottom);
}
.time-dock-inner { max-width: 1120px; margin: 0 auto; padding: 7px 14px 5px; }
.time-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.time-current {
  color: #c04237; font-weight: 600; font-size: 12.5px;
  font-variant-numeric: tabular-nums; min-width: 44px;
}
.time-current.is-fixed { color: var(--blue); }
.time-hint { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.realtime-btn {
  flex: 0 0 auto; background: var(--brand); color: #fff;
  border-radius: 14px; padding: 3px 11px; font-size: 11.5px; line-height: 18px;
}
.realtime-btn[hidden] { display: none; }
.realtime-btn:hover { background: var(--brand-deep); }

.time-range {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: 24px; margin: 1px 0 0;
  background: transparent; cursor: pointer;
}
.time-range:disabled { cursor: default; opacity: .45; }
.time-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: #e8e8e8; }
.time-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; margin-top: -7px; border-radius: 50%;
  background: #fff; border: 3px solid #cf0f0f; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.time-range::-moz-range-track { height: 4px; border-radius: 2px; background: #e8e8e8; }
.time-range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid #cf0f0f;
}
.time-scale {
  display: flex; justify-content: space-between; gap: 6px;
  font-size: 10px; color: #a0a0a0; margin-top: -1px;
  font-variant-numeric: tabular-nums;
}
.time-scale span:nth-child(2) { flex: 1 1 auto; text-align: center; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal-card {
  position: relative; z-index: 1; background: #fff; border-radius: 12px;
  width: min(420px, 100%); max-height: min(88vh, 760px);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 14px 44px rgba(0,0,0,.24);
}
.modal-card-wide { width: min(560px, 100%); }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 16px; font-weight: 600; }
.modal-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  color: #8a8a8a; font-size: 20px; line-height: 1;
  display: grid; place-items: center;
}
.icon-btn:hover { background: #f2f2f2; color: #555; }
.modal-body { padding: 14px 16px; overflow: auto; -webkit-overflow-scrolling: touch; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 10px 16px 14px; border-top: 1px solid var(--line);
}
.modal-foot-note { justify-content: flex-start; background: #fbfbfb; }
.modal-foot-note p { color: #9a9a9a; font-size: 11px; line-height: 1.7; }
.btn {
  border: 1px solid #dcdcdc; background: #fff; color: #444;
  border-radius: 6px; padding: 7px 15px; font-size: 13px;
}
.btn:hover { border-color: #c3c3c3; background: #fafafa; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }

.field { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #555; }
.field-label { flex: 0 0 auto; }
.field input {
  flex: 1 1 auto; min-width: 0; border: 1px solid #d8d8d8; border-radius: 6px;
  padding: 8px 10px; font-size: 14px; color: #333; background: #fff;
}
.field-note { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.field-note.is-warn { color: #a9701c; }

/* 板块弹窗列表 */
.plate-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plate-item {
  border: 1px solid #ececec; border-radius: 6px; padding: 8px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; min-width: 0;
}
.plate-item .pname { color: #3c5c9f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plate-item .ppct { font-variant-numeric: tabular-nums; font-size: 12.5px; flex: 0 0 auto; }
.plate-hint { margin-top: 10px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.plate-state { text-align: center; padding: 18px 6px; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.plate-state .state-actions { margin-top: 10px; }

/* 帮助 */
.help-body section + section { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #ededed; }
.help-body h3 { font-size: 13px; font-weight: 600; color: #333; margin-bottom: 5px; }
.help-body p { font-size: 12.5px; color: #666; line-height: 1.8; }
.help-body p + p { margin-top: 4px; }
.help-body b { color: #333; }

/* ---------- 个股详情抽屉 ---------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 55; }
.drawer-wrap[hidden] { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.42); }
.drawer {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(430px, 100%);
  background: #fff; display: flex; flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,.18);
  animation: drawer-in .2s ease-out;
}
@keyframes drawer-in { from { transform: translateX(18px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 17px; font-weight: 600; }
.drawer-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.drawer-body { flex: 1 1 auto; overflow: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px 16px; }
.detail-section { padding: 12px 0; border-bottom: 1px dashed #ededed; }
.detail-section:last-child { border-bottom: 0; }
.detail-section h3 {
  font-size: 11px; font-weight: 600; letter-spacing: 1px; color: #9a9a9a;
  margin-bottom: 8px;
}
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.kv-item { min-width: 0; }
.kv-item .k { font-size: 11.5px; color: var(--muted); }
.kv-item .v { font-size: 14px; color: #333; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kv-item .v.big { font-size: 19px; font-weight: 600; }
.detail-note { font-size: 11.5px; color: #9a9a9a; line-height: 1.7; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-tag {
  border: 1px solid #e2e2e2; border-radius: 4px; padding: 2px 7px;
  font-size: 11.5px; color: #3c5c9f; background: #fbfcff;
}
.detail-tag.is-hot { border-color: #f3c9c6; background: #fff7f6; color: var(--red); }
.detail-tag.is-hot .hot-tag { vertical-align: 0; margin-left: 3px; }
.detail-actions { margin-top: 10px; }
.drawer-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: #fff;
}
.drawer-pos { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 18px);
  transform: translateX(-50%);
  background: rgba(40,40,40,.92); color: #fff;
  border-radius: 18px; padding: 8px 16px; font-size: 12.5px;
  z-index: 70; max-width: min(86vw, 460px); text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.22); line-height: 1.5;
}
.toast[hidden] { display: none; }
.noscript { padding: 20px; text-align: center; color: #a02a1e; }

/* ---------- 窄屏（原 App 四列） ---------- */
@media (max-width: 760px) {
  :root { --dock-h: 112px; }
  body { font-size: 13px; }
  .app-bar-inner { height: 50px; padding: 0 8px; }
  .app-title { font-size: 18px; }
  .shell { box-shadow: none; min-height: 0; }
  .quote-bar { padding: 8px 10px; gap: 10px; }
  .index-block { min-width: 102px; }
  .idx-name, .idx-last { font-size: 17px; }
  .idx-sub { font-size: 12px; }
  .date-switch { gap: 2px; }
  .date-arrow { width: 28px; height: 32px; }
  .date-pill { min-width: 0; font-size: 14px; padding: 5px 7px; gap: 5px; }
  .meta-bar { padding: 6px 10px; gap: 4px 10px; font-size: 11px; }

  /* 固定名称列 + 强度 + 涨跌幅 + 第 4 列（板块/资金左右切换） */
  .board { --cols: minmax(0, 1.3fr) minmax(0, .62fr) minmax(0, .8fr) minmax(0, 1.05fr); }
  .grid-row { grid-template-areas: "name strength change slot"; }
  .c-name { grid-area: name; }
  .c-strength { grid-area: strength; }
  .c-change { grid-area: change; }
  .c-plate, .c-net, .c-buy, .c-sell { grid-area: slot; }
  .cell.c-plate, .cell.c-net, .cell.c-buy, .cell.c-sell { display: none; }
  .hcell.c-plate, .hcell.c-net, .hcell.c-buy, .hcell.c-sell { display: none; }
  .board[data-page="plate"] .c-plate { display: flex; }
  .board[data-page="net"] .c-net { display: flex; }
  .board[data-page="buy"] .c-buy { display: flex; }
  .board[data-page="sell"] .c-sell { display: flex; }
  .board[data-page="plate"] .hcell.c-plate { display: flex; }
  .board[data-page="net"] .hcell.c-net { display: flex; }
  .board[data-page="buy"] .hcell.c-buy { display: flex; }
  .board[data-page="sell"] .hcell.c-sell { display: flex; }
  .col-switch { display: flex; }

  .cell.is-sorted { background: var(--active-row); }
  .cell { padding: 6px 4px; font-size: 12.5px; }
  .hcell { border-right: 1px solid #e7e7e7; }
  .th-btn, .th-static { font-size: 13px; min-height: 42px; padding: 0 2px; }
  .c-name { padding-left: 10px; }
  .name-btn { font-size: 14px; }
  .meta-line { font-size: 11px; gap: 4px; }
  .c-strength { font-size: 13px; }
  .plate-line { font-size: 11.5px; line-height: 1.5; }
  .hot-tag { font-size: 9px; }
  .disclaimer { padding: 10px 12px 12px; font-size: 11px; }

  .time-dock-inner { padding: 6px 12px 4px; }
  .time-row { font-size: 11px; }
  .time-scale { font-size: 9.5px; }
  .time-scale span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .drawer {
    right: 0; left: 0; top: auto; bottom: 0; width: auto;
    max-height: 86vh; border-radius: 14px 14px 0 0;
    animation: sheet-in .22s ease-out;
  }
  @keyframes sheet-in { from { transform: translateY(26px); opacity: .7; } to { transform: none; opacity: 1; } }
  .drawer-head { padding: 12px 14px 8px; }
  .drawer-body { padding: 2px 14px 14px; }
  .drawer-foot { padding: 9px 14px calc(10px + env(safe-area-inset-bottom)); }
  .drawer-foot .btn { padding: 7px 12px; font-size: 12.5px; }

  .toast { bottom: calc(var(--dock-h) + 12px); }
}

@media (max-width: 560px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal-card { width: 100%; max-height: 88vh; border-radius: 14px 14px 0 0; }
  .modal-card-wide { width: 100%; }
  .plate-list { grid-template-columns: 1fr; }
  .modal-head { padding: 13px 14px 9px; }
  .modal-body { padding: 12px 14px; }
  .modal-foot { padding: 9px 14px calc(12px + env(safe-area-inset-bottom)); }
}

@media (min-width: 761px) {
  .cell { padding: 7px 10px; }
  .c-name { padding-left: 16px; }
  .name-btn { font-size: 15px; }
  .row:hover .name-btn { color: var(--blue); }
  .board { --cols: 15.5% 9.5% 9.5% 27% 13% 12.5% 13%; }
}

@media (min-width: 761px) and (max-width: 900px) {
  .th-btn, .th-static { font-size: 12.5px; }
  .cell { font-size: 12.5px; }
  .plate-line { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
