/* 股市風格共用樣式 */

/* CMS 浮動媒體（圖片／GIF／影片） */
.uiMediaFloat {
  pointer-events: none;
  border-radius: 6px;
}
.uiMediaFloat--interactive {
  pointer-events: auto;
}
.uiMediaFloat-media {
  display: block;
  width: 100%;
  height: 100%;
}

/* 裝飾媒體釘在螢幕：捲內容時仍看得到（見 stock-cms-viewport-media） */
#uiMediaLayer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: visible;
  pointer-events: none;
  z-index: 15;
}
#uiMediaLayer .uiMediaFloat {
  overflow: visible;
}
#uiMediaLayer .uiMediaFloat-media {
  object-fit: contain;
  max-width: none;
  max-height: none;
}
#uiMediaLayer .uiMediaFloat--interactive {
  pointer-events: auto;
}

/* GIF/PNG 輪播：尺寸依原圖比例（寬% 決定寬度，高% 只當最高上限） */
#uiMediaLayer .uiMediaFloat--gifPlaylist,
#uiMediaLayer .uiMediaFloat--pngPlaylist,
#stage .uiMediaFloat--gifPlaylist,
#stage .uiMediaFloat--pngPlaylist {
  box-sizing: border-box;
  overflow: visible;
  pointer-events: none;
  margin: 0;
  padding: 0;
}
#stage .uiMediaFloat--gifPlaylist,
#stage .uiMediaFloat--pngPlaylist {
  z-index: 16;
}
#uiMediaLayer .uiMediaFloat--gifPlaylist .uiMediaFloat-media,
#uiMediaLayer .uiMediaFloat--pngPlaylist .uiMediaFloat-media,
#stage .uiMediaFloat--gifPlaylist .uiMediaFloat-media,
#stage .uiMediaFloat--pngPlaylist .uiMediaFloat-media {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: left top;
}

.stk-icon-wrap { display: inline-flex; vertical-align: middle; margin-right: 6px; color: inherit; }
.stk-icon-label { display: inline-flex; align-items: center; gap: 6px; }
.stk-page { min-height: 100%; background: #0b1020; color: #eaf0ff; font-family: system-ui, "Noto Sans TC", sans-serif; }

/* 全站共用捲軸：深藍軌道 + 金色滑塊（彈窗、列表、可捲動區必用） */
.stk-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 210, 122, 0.72) rgba(6, 14, 28, 0.78);
}
.stk-scroll::-webkit-scrollbar { width: 9px; height: 9px; }
.stk-scroll::-webkit-scrollbar-track {
  background: linear-gradient(90deg, rgba(6, 14, 28, 0.9), rgba(14, 26, 52, 0.78));
  border-radius: 5px;
  border: 1px solid rgba(255, 215, 100, 0.12);
}
.stk-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffd27a 0%, #b8860b 100%);
  border-radius: 5px;
  border: 1px solid rgba(255, 230, 160, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.stk-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffe08a 0%, #d4a017 100%);
}
.stk-scroll::-webkit-scrollbar-corner { background: rgba(6, 14, 28, 0.88); }
.stk-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(18, 26, 46, 0.92);
  padding: 14px;
  box-sizing: border-box;
}
.stk-stat-card { margin-bottom: 10px; }
.stk-stat-label { font-size: 12px; opacity: 0.85; margin-bottom: 4px; }
.stk-stat-value { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stk-stat-sub { font-size: 12px; opacity: 0.8; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stk-gold { color: #ffd27a; }
.stk-cash { color: #9fd4ff; }
.stk-amount-buy { color: #7dffb3; }
.stk-amount-sell { color: #ffb4b4; }
.stk-pnl-rise { font-weight: 700; }
.stk-pnl-fall { font-weight: 700; }
.stk-pnl-flat { opacity: 0.85; }
.stk-table { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.stk-table th, .stk-table td { padding: 7px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.stk-table th { font-size: 11px; opacity: 0.75; font-weight: 700; text-align: left; white-space: nowrap; }
.stk-table td { text-align: left; }
.stk-table tr:hover td { background: rgba(255, 255, 255, 0.04); }
.stk-table .stk-num { text-align: right; white-space: nowrap; }
.stk-table .stk-code { font-weight: 700; white-space: nowrap; }
.stk-table .stk-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stk-table-wrap { overflow-x: auto; max-width: 100%; border-radius: 8px; }
.stk-table-wrap .stk-table { width: max-content; min-width: 100%; max-width: 100%; }
.stk-table-wrap .stk-table.stk-table-fit { width: 100%; table-layout: fixed; }
.stk-table-wrap .stk-table.stk-table-holdings { width: 100%; table-layout: fixed; }
.stk-table-holdings .stk-name { max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 持股列表：每檔股票獨立一列 Grid，避免股數等欄位被批次明細擠到下一行 */
.stk-holdings-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: min-content;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.stk-hgrid-row {
  display: grid;
  align-items: center;
  width: 100%;
}
.stk-hgrid-head .stk-hgrid-th {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.stk-hgrid-row:not(.stk-hgrid-head) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.stk-hgrid-th {
  padding: 7px 10px;
  font-size: 11px;
  opacity: 0.75;
  font-weight: 700;
  white-space: nowrap;
}
.stk-hgrid-td {
  padding: 7px 10px;
  min-width: 0;
  white-space: nowrap;
}
.stk-holdings-grid .stk-hgrid-td.stk-qty,
.stk-holdings-grid .stk-hgrid-th.stk-qty {
  padding-right: 6px;
}
.stk-holdings-grid .stk-hgrid-td.stk-num,
.stk-holdings-grid .stk-hgrid-th.stk-num { text-align: right; white-space: nowrap; }
.stk-holdings-grid .stk-hgrid-td.stk-code,
.stk-holdings-grid .stk-hgrid-th.stk-code { font-weight: 700; white-space: nowrap; }
.stk-holdings-grid .stk-hgrid-td.stk-name {
  overflow: hidden;
  min-width: 0;
}
.stk-name-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}
.stk-name-cell .stk-name-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  line-height: 1.3;
}
.stk-lots-inline {
  font-size: 10px;
  opacity: 0.88;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  color: #e8b86d;
  letter-spacing: 0.02em;
}
.stk-holdings-grid .stk-hgrid-td.stk-actions,
.stk-holdings-grid .stk-hgrid-th.stk-actions { text-align: center; padding-left: 4px; padding-right: 4px; }
.stk-pf-trade-btn {
  border: none;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}
.stk-pf-trade-btn.mb-btn-3d {
  font-weight: 800;
}
.stk-pf-trade-btn-disabled,
.stk-pf-trade-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.stk-table-wrap .stk-table.stk-table-fit .stk-name { max-width: none; }
.stk-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.stk-tag-normal { background: #3498db; color: #fff; }
.stk-tag-daytrade { background: #e67e22; color: #fff; }
.stk-warn { color: #f39c12; font-size: 12px; }
.stk-grid-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
@media (max-width: 720px) { .stk-grid-top { grid-template-columns: 1fr; } }
.stk-section-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 800; color: #ffd27a;
  margin: 0 0 8px; letter-spacing: 0.02em;
}
.stk-lot-row td { padding-top: 0 !important; border-bottom: 1px solid rgba(255,255,255,.06); }
#portfolioApp { box-sizing: border-box; width: 100%; min-height: 100%; position: relative; }
.stk-cms-block { border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; padding: 10px; }
.stk-pie-wrap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stk-pie-canvas { max-width: 200px; }
.stk-legend { flex: 1; min-width: 140px; font-size: 12px; }
.stk-legend-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.stk-legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.stk-lots { font-size: 12px; opacity: 0.9; margin-top: 6px; padding-left: 8px; border-left: 2px solid rgba(255, 255, 255, 0.15); }
.stk-empty { text-align: center; padding: 24px; opacity: 0.85; }

/* ── 下單彈窗：股市遊戲風格 ── */
.qo-mask {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(20, 30, 60, 0.92) 0%, rgba(0, 0, 0, 0.88) 100%);
  z-index: 9999; padding: 12px; box-sizing: border-box;
}
.quote-order-modal-box.stk-modal {
  width: min(760px, 96vw);
  max-height: min(92vh, 920px);
  overflow: hidden;
  border-radius: 4px; color: #eaf0ff; box-sizing: border-box;
  border: 2px solid #3d5a80;
  background: linear-gradient(180deg, #0d1528 0%, #121c32 40%, #0a1020 100%);
  box-shadow: 0 0 0 1px rgba(255, 215, 100, 0.15), 0 24px 60px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: "Microsoft JhengHei UI", "Noto Sans TC", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
}
.quote-order-modal-box.qo-mode-buy {
  border-color: #c0392b;
  box-shadow: 0 0 24px rgba(231, 76, 60, 0.25), 0 24px 60px rgba(0, 0, 0, 0.65);
}
.quote-order-modal-box.qo-mode-sell {
  border-color: #1e8e5a;
  box-shadow: 0 0 24px rgba(46, 204, 113, 0.2), 0 24px 60px rgba(0, 0, 0, 0.65);
}
.qo-hero {
  padding: 12px 20px 8px;
  border-bottom: 1px solid rgba(255, 215, 100, 0.2);
  position: relative;
  flex-shrink: 0;
}
.qo-hero::after {
  content: "TRADE";
  position: absolute; right: 14px; top: 12px;
  font-size: 10px; font-weight: 900; letter-spacing: 0.2em;
  color: rgba(255, 215, 100, 0.35);
}
.qo-mode-buy .qo-hero {
  background: linear-gradient(90deg, rgba(192, 57, 43, 0.35) 0%, transparent 55%);
}
.qo-mode-sell .qo-hero {
  background: linear-gradient(90deg, rgba(39, 174, 96, 0.3) 0%, transparent 55%);
}
.qo-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.06em; margin-bottom: 8px;
}
.qo-badge-buy { background: #e74c3c; color: #fff; }
.qo-badge-sell { background: #27ae60; color: #fff; }
.qo-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.qo-title { font-weight: 800; font-size: 17px; line-height: 1.35; margin-bottom: 0; }
.qo-div-hint {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  color: #ffe9a8;
  background: rgba(255, 200, 80, 0.14);
  border: 1px solid rgba(255, 215, 100, 0.35);
  white-space: nowrap;
}
.qo-div-hint--none {
  color: #9aa8c8;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.qo-sub { font-size: 12px; opacity: 0.82; }
.qo-balance-bar {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(52, 152, 219, 0.12);
  border: 1px solid rgba(159, 212, 255, 0.28);
}
.qo-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}
.qo-balance-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.72);
}
.qo-balance-val { font-size: 16px; font-weight: 800; letter-spacing: 0.02em; }
.qo-amt-remain { margin-top: 6px; }
.qo-amt-remain .qo-amt-row { font-weight: 800; }
.qo-amt-ok span:last-child { color: #7dffb3; }
.qo-amt-warn span:last-child { color: #ffb4a8; }
.qo-amt-note-warn { color: #ffb4a8 !important; }
.qo-body {
  padding: 0 20px 6px;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(68vh, 640px);
}
.qo-actions {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  padding: 10px 20px 14px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.qo-rule-hint { font-size: 11px; opacity: 0.85; margin: 0 0 8px; line-height: 1.45; }
.qo-limit-pin-banner {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  background: rgba(241, 196, 15, 0.18);
  border: 1px solid rgba(241, 196, 15, 0.45);
  color: #ffeaa7;
}
.qo-limit-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(231, 76, 60, 0.35);
  color: #fff;
}
.qo-price-line {
  font-size: 14px; font-weight: 700; margin: 0 0 8px; line-height: 1.45;
  padding: 8px 12px; border-radius: 10px;
}
.qo-price-buy { background: rgba(231, 76, 60, 0.12); color: #ffb4a8; border: 1px solid rgba(231, 76, 60, 0.25); }
.qo-price-sell { background: rgba(46, 204, 113, 0.12); color: #a8f0c8; border: 1px solid rgba(46, 204, 113, 0.25); }
.qo-price-label { opacity: 0.85; font-weight: 600; }
.qo-price-lot { font-size: 12px; opacity: 0.75; font-weight: 500; }
.qo-side-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.qo-side-tab {
  flex: 1; border: 2px solid rgba(255, 255, 255, 0.15); border-radius: 12px;
  padding: 12px 8px; font-size: 15px; font-weight: 800; cursor: pointer;
  background: rgba(0, 0, 0, 0.2); color: rgba(255, 255, 255, 0.65); transition: 0.15s;
}
.qo-side-tab-buy.qo-side-tab-active { background: rgba(231, 76, 60, 0.25); border-color: #e74c3c; color: #fff; }
.qo-side-tab-sell.qo-side-tab-active { background: rgba(46, 204, 113, 0.22); border-color: #2ecc71; color: #fff; }
.qo-sell-card {
  margin-bottom: 8px; padding: 10px 12px; border-radius: 12px;
  background: rgba(46, 204, 113, 0.1); border: 1px solid rgba(46, 204, 113, 0.35);
}
.qo-sell-card-title { font-size: 12px; font-weight: 800; color: #7dffb3; margin-bottom: 4px; }
.qo-sell-card-body { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.5; color: #eaf0ff; }
.qo-holdings-card {
  margin: 0 0 10px; padding: 10px 12px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.42); border: 1px solid rgba(255, 215, 100, 0.22);
}
.qo-holdings-title {
  font-size: 12px; font-weight: 800; color: #ffd27a; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.qo-holding-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.qo-holding-item {
  padding: 8px 6px; border-radius: 4px; text-align: center;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
}
.qo-holding-label { display: block; font-size: 10px; opacity: 0.75; margin-bottom: 4px; font-weight: 700; }
.qo-holding-val { display: block; font-size: 15px; font-weight: 800; line-height: 1.25; }
.qo-holding-sub { display: block; font-size: 10px; opacity: 0.72; margin-top: 3px; line-height: 1.3; }
.qo-holding-cash .qo-holding-val { color: #9ecbff; }
.qo-holding-day .qo-holding-val { color: #ffb86a; }
.qo-holding-margin .qo-holding-val { color: #d4a5ff; }
.qo-holding-short .qo-holding-val { color: #ffb86a; }
.qo-holdings-sellable {
  margin: 8px 0 0; font-size: 12px; font-weight: 700; color: #7dffb3; line-height: 1.45;
}
.qo-margin-preview {
  min-height: 72px;
  margin: 10px 0 8px; padding: 10px 12px; border-radius: 4px;
  background: rgba(88, 44, 130, 0.28); border: 1px solid rgba(180, 120, 255, 0.35);
}
.qo-margin-preview-title {
  font-size: 12px; font-weight: 800; color: #e0b8ff; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.qo-margin-preview-body { max-height: 180px; overflow-y: auto; }
.qo-margin-kpi {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px;
}
.qo-margin-kpi-item {
  padding: 8px 6px; border-radius: 4px; text-align: center;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.1);
}
.qo-margin-kpi-item span { display: block; font-size: 10px; opacity: 0.78; margin-bottom: 4px; }
.qo-margin-kpi-item strong { font-size: 16px; font-weight: 800; }
.qo-margin-ok { color: #7dffb3; }
.qo-margin-warn { color: #ffb4a8; }
.qo-margin-meta { margin: 0 0 6px; font-size: 11px; opacity: 0.88; line-height: 1.45; }
.qo-margin-tips {
  margin: 8px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.55; max-height: 120px;
}
.qo-margin-tips li { margin-bottom: 4px; }
.qo-margin-recovery {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255, 215, 100, 0.25);
}
.qo-margin-recovery-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 12px; margin-bottom: 4px;
}
.qo-margin-recovery-row strong { font-size: 14px; }
.qo-margin-preview-loading { margin: 0; font-size: 12px; opacity: 0.85; }
.qo-short-preview {
  min-height: 72px;
  margin: 10px 0 8px; padding: 10px 12px; border-radius: 4px;
  background: rgba(120, 72, 24, 0.28); border: 1px solid rgba(255, 160, 60, 0.38);
}
.qo-short-preview-title {
  font-size: 12px; font-weight: 800; color: #ffd0a0; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.qo-short-preview-body { max-height: 180px; overflow-y: auto; }
.qo-cover-short-panel {
  margin: 0 0 8px; padding: 8px 12px; border-radius: 4px;
  background: rgba(120, 72, 24, 0.2); border: 1px solid rgba(255, 160, 60, 0.28);
}
.qo-cover-short-label {
  display: flex; align-items: flex-start; gap: 8px; font-size: 12px; font-weight: 700;
  line-height: 1.45; cursor: pointer; margin: 0;
}
.qo-cover-short-panel--hint {
  box-shadow: 0 0 0 2px rgba(255, 180, 80, 0.45);
}
.qo-fee-line { color: #ffe08a; }
.credit-maint--ok { color: #7dffb3; }
.credit-maint--caution { color: #ffe08a; }
.credit-maint--call { color: #ffb4a8; }
.credit-maint--force { color: #ff8a7a; }
.pf-credit-short {
  border-color: rgba(255, 160, 60, 0.35);
}
.pf-credit-short .pf-margin-kpi-val { color: #ffb86a; }
.pf-credit-short-card .pf-margin-stock-accent { background: linear-gradient(180deg, #ffb86a, #e67e22); }
.pf-credit-short-card .pf-margin-stock-icon { color: #ffb86a; }
@media (max-width: 560px) {
  .qo-holding-grid { grid-template-columns: repeat(2, 1fr); }
  .qo-margin-kpi { grid-template-columns: 1fr; }
}
.qo-amount-box {
  font-size: 16px; font-weight: 800; margin: 2px 0 6px; padding: 8px 12px; border-radius: 10px;
}
.qo-amt-breakdown { font-weight: 600; }
.qo-amt-title {
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: #ffd27a;
  margin-bottom: 6px; text-transform: uppercase;
}
.qo-amt-rows { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.qo-amt-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.88);
}
.qo-amt-row span:first-child { color: rgba(255, 255, 255, 0.62); font-weight: 700; }
.qo-amt-sub { font-size: 12px; padding-left: 8px; }
.qo-amt-sub span:first-child { color: rgba(255, 255, 255, 0.48); }
.qo-amt-muted span:last-child { color: rgba(255, 255, 255, 0.45); font-style: italic; }
.qo-amt-total {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding-top: 8px; margin-top: 2px; border-top: 1px dashed rgba(255, 215, 100, 0.25);
  font-size: 14px; font-weight: 800;
}
.qo-amt-total-buy { color: #ffb4a8; }
.qo-amt-total-sell { color: #7dffb3; }
.qo-amt-total-val { font-size: 17px; letter-spacing: 0.02em; }
.qo-amt-note {
  margin: 6px 0 0; font-size: 11px; font-weight: 600; line-height: 1.45;
  color: rgba(255, 224, 138, 0.85);
}
.qo-amt-note-etf { color: rgba(159, 212, 255, 0.95); }
.qo-amt-empty { margin: 0; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.55); }
.qo-form .stk-hint { margin: 0 0 6px; }
.qo-amount-buy { color: #ffb4a8; background: rgba(231, 76, 60, 0.1); border: 1px dashed rgba(231, 76, 60, 0.35); }
.qo-amount-sell { color: #7dffb3; background: rgba(46, 204, 113, 0.1); border: 1px dashed rgba(46, 204, 113, 0.35); }
.qo-btn-buy:not(.mb-btn-3d) { background: #e74c3c; color: #fff; min-width: 120px; }
.qo-btn-sell:not(.mb-btn-3d) { background: #27ae60; color: #fff; min-width: 120px; }
.qo-btn-buy:not(.mb-btn-3d):hover { filter: brightness(1.08); }
.qo-btn-sell:not(.mb-btn-3d):hover { filter: brightness(1.08); }
.qo-btn-buy.mb-btn-3d,
.qo-btn-sell.mb-btn-3d { min-width: 120px; }
.qo-field-block { margin-bottom: 4px; }
.qo-result-msg {
  font-size: 14px; line-height: 1.75; padding: 8px 0; white-space: pre-wrap;
  color: rgba(255, 255, 255, 0.92);
}
.qo-result-card {
  margin: 4px 0; padding: 14px 14px 12px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 215, 100, 0.18);
}
.qo-result-short { border-color: rgba(255, 184, 106, 0.35); background: rgba(255, 140, 40, 0.06); }
.qo-result-sell { border-color: rgba(46, 204, 113, 0.28); background: rgba(46, 204, 113, 0.05); }
.qo-result-buy { border-color: rgba(231, 76, 60, 0.28); background: rgba(231, 76, 60, 0.05); }
.qo-result-tag {
  margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase;
}
.qo-result-tag-short { color: #ffb86a; }
.qo-result-tag-sell { color: #6ee7a8; }
.qo-result-tag-buy { color: #ff9a8a; }
.qo-result-tag-etf { color: #9fd4ff; }
.qo-result-qty {
  margin: 0 0 10px; font-size: 26px; font-weight: 800; color: #fff; line-height: 1.2;
}
.qo-result-qty-unit { font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.5); }
.qo-result-sheet {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.qo-result-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 4px 0; font-size: 13px;
}
.qo-result-row span { color: rgba(255, 255, 255, 0.55); font-weight: 700; }
.qo-result-row strong { font-weight: 800; white-space: nowrap; }
.qo-val-neutral { color: #e8f0ff; }
.qo-val-in { color: #7dffb3; }
.qo-val-out { color: #ffb4a8; }
.qo-val-warn { color: #ffb86a; }
.qo-val-fee { color: #ffe08a; }
.qo-result-total {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 10px; padding: 12px 14px; border-radius: 10px; font-weight: 800; font-size: 14px;
}
.qo-result-total span { color: rgba(255, 255, 255, 0.65); }
.qo-result-total strong { font-size: 22px; letter-spacing: 0.02em; }
.qo-result-total-pay {
  background: rgba(231, 76, 60, 0.12); border: 1px dashed rgba(231, 76, 60, 0.45);
}
.qo-result-total-in {
  background: rgba(46, 204, 113, 0.1); border: 1px dashed rgba(46, 204, 113, 0.4);
}
.qo-result-tip {
  margin: 10px 0 0; text-align: center; font-size: 12px; font-weight: 600;
  color: rgba(255, 210, 100, 0.75);
}
.qo-result-tip-short { color: rgba(255, 184, 106, 0.9); }

.qo-panel {
  margin: 0; padding: 8px 12px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 215, 100, 0.12);
}
.qo-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
.qo-split-row > #qoLimitWrap,
.qo-split-row > #qoTradeModeWrap {
  margin-bottom: 0;
  min-width: 0;
}
/* 賣出時只有限價欄，撐滿整列 */
.qo-split-row > #qoLimitWrap:only-child,
.qo-mode-sell .qo-split-row > #qoLimitWrap {
  grid-column: 1 / -1;
}
.qo-mode-sell .qo-split-row > #qoTradeModeWrap {
  display: none;
}
/* 市價模式：限價欄隱藏時，買進方式撐滿 */
.qo-split-row.qo-split-single > #qoTradeModeWrap {
  grid-column: 1 / -1;
}
.qo-qty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.qo-qty-grid .qo-field-row { margin-bottom: 0; }
.qo-panel-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  color: #ffd27a; margin-bottom: 8px; text-transform: uppercase;
}
.qo-ord-tabs { display: flex; gap: 6px; }
.qo-ord-tab {
  flex: 1; border: 2px solid rgba(255, 215, 100, 0.25); border-radius: 4px;
  padding: 8px 6px; font-size: 12px; font-weight: 800; cursor: pointer;
  background: rgba(0, 0, 0, 0.4); color: rgba(255, 255, 255, 0.55);
  transition: 0.12s;
}
.qo-ord-tab-active {
  background: linear-gradient(180deg, rgba(255, 215, 100, 0.2) 0%, rgba(255, 215, 100, 0.05) 100%);
  border-color: #ffd27a; color: #fff;
  box-shadow: 0 0 12px rgba(255, 210, 100, 0.2);
}
.qo-mode-buy .qo-ord-tab-active { border-color: #ff8a7a; box-shadow: 0 0 12px rgba(231, 76, 60, 0.35); }
.qo-mode-sell .qo-ord-tab-active { border-color: #6ee7a8; box-shadow: 0 0 12px rgba(46, 204, 113, 0.3); }

.qo-limit-panel { border-color: rgba(255, 215, 100, 0.2); }
.qo-limit-input-row {
  display: flex; align-items: center; gap: 8px;
  background: #000; border: 2px solid #ffd27a; border-radius: 4px; padding: 6px 10px;
}
.qo-limit-prefix, .qo-limit-suffix { font-size: 12px; font-weight: 700; color: #ffd27a; white-space: nowrap; }
.qo-limit-input {
  flex: 1; border: none; background: transparent; color: #fff;
  font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums;
  text-align: right; min-width: 0; width: 100%; padding: 2px 0; margin: 0;
}
.qo-limit-input:focus { outline: none; }

.qo-mode-cards { display: flex; gap: 8px; }
.qo-mode-card {
  flex: 1; border: 2px solid rgba(255, 255, 255, 0.15); border-radius: 4px;
  padding: 8px 6px; cursor: pointer; text-align: left;
  background: rgba(0, 0, 0, 0.45); color: #fff; transition: 0.12s;
}
.qo-mode-card-title { display: block; font-size: 14px; font-weight: 800; margin-bottom: 2px; }
.qo-mode-card-desc { display: block; font-size: 10px; opacity: 0.8; line-height: 1.35; }
.qo-mode-card.qo-mode-card-active {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}
.qo-mode-card-day.qo-mode-card-active {
  border-color: #f39c12; background: rgba(243, 156, 18, 0.15);
  box-shadow: 0 0 14px rgba(243, 156, 18, 0.25);
}
.qo-mode-card-hold.qo-mode-card-active {
  border-color: #5dade2; background: rgba(93, 173, 226, 0.12);
  box-shadow: 0 0 14px rgba(93, 173, 226, 0.2);
}
.qo-mode-card-margin.qo-mode-card-active {
  border-color: #d4a5ff; background: rgba(180, 120, 255, 0.22);
  box-shadow: 0 0 16px rgba(180, 120, 255, 0.45);
}
.qo-mode-card-short.qo-mode-card-active {
  border-color: #ffb86a; background: rgba(255, 160, 60, 0.18);
  box-shadow: 0 0 16px rgba(255, 160, 60, 0.35);
}
.qo-mode-card-cash-sell.qo-mode-card-active {
  border-color: #6ee7a8; background: rgba(46, 204, 113, 0.14);
  box-shadow: 0 0 14px rgba(46, 204, 113, 0.28);
}
.qo-mode-card-stop-loss.qo-mode-card-active {
  border-color: #ff8a7a; background: rgba(231, 76, 60, 0.14);
  box-shadow: 0 0 14px rgba(231, 76, 60, 0.28);
}
.qo-mode-card-take-profit.qo-mode-card-active {
  border-color: #6ee7d6; background: rgba(46, 196, 182, 0.14);
  box-shadow: 0 0 14px rgba(46, 196, 182, 0.28);
}
.qo-stop-trigger-wrap { margin-top: 8px; }
.qo-mode-card.qo-mode-card-disabled {
  opacity: 0.45; cursor: not-allowed;
}
.qo-buy-mode-hint {
  font-size: 12px; font-weight: 700; margin: 8px 0 0; line-height: 1.45;
  color: #d4a5ff;
}
.qo-buy-mode-hint.qo-buy-mode-hint-warn { color: #ffd27a; }
.qo-mode-foot { font-size: 10px; opacity: 0.75; margin: 6px 0 0; line-height: 1.4; }
.qo-panel-ord { margin-bottom: 8px; }
.qo-qty-panel { margin-bottom: 8px; }
.qo-form.stk-form input,
.qo-form.stk-form select {
  margin-bottom: 0;
}

.qo-field-row { margin-bottom: 8px; }
.qo-field-row label { font-size: 11px; opacity: 0.85; margin-bottom: 4px; display: block; }
.qo-field-row select, .qo-qty-input {
  width: 100%; padding: 9px 10px; border-radius: 4px;
  border: 1px solid rgba(255, 215, 100, 0.25);
  background: #000; color: #fff; box-sizing: border-box; font-weight: 700;
  margin-bottom: 0;
}
.qo-submit-main:not(.mb-btn-3d) {
  min-width: 140px; font-size: 15px; letter-spacing: 0.06em;
  text-transform: none; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
.qo-submit-main:not(.mb-btn-3d):active { transform: translateY(2px); box-shadow: none; }

.stk-form label { font-size: 12px; display: block; margin-bottom: 4px; opacity: 0.9; }
.stk-form input, .stk-form select {
  width: 100%; padding: 9px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25); color: #fff; box-sizing: border-box; margin-bottom: 10px;
}
.stk-hint { font-size: 12px; opacity: 0.85; line-height: 1.5; margin: 0 0 10px; }
.stk-price-line { font-size: 14px; font-weight: 700; color: #ffd27a; margin: 0 0 10px; }
.stk-btn { border: none; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 700; }
.stk-btn-primary { background: #c0392b; color: #fff; }
.stk-btn-ghost { background: #3a4558; color: #fff; }

/* ── 全站立體按鈕 + 滑鼠懸停流光（行情表、持股、下單彈窗） ── */
@keyframes mb-qbtn-shine {
  from { left: -120%; opacity: 0; }
  15% { opacity: 1; }
  to { left: 140%; opacity: 0; }
}

.mb-btn-3d {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition: transform 0.08s ease, box-shadow 0.1s ease, filter 0.12s ease;
}

.mb-btn-3d::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 35%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0.08) 65%,
    transparent 100%
  );
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
}

.mb-btn-3d:not(:disabled):hover::after {
  animation: mb-qbtn-shine 0.62s ease;
}

.mb-btn-3d:not(:disabled):hover {
  filter: brightness(1.06);
}

.mb-btn-3d:active:not(:disabled) {
  transform: translateY(2px);
}

.mb-btn-3d:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

/* 買／賣／K線／持股列／下單彈窗：讀 --mb-btn-bg / --mb-btn-fg 或後台色票 */
.mb-trade-buy.mb-btn-3d,
.mb-trade-sell.mb-btn-3d,
.mb-kline.mb-btn-3d,
.stk-pf-trade-btn--buy.mb-btn-3d,
.stk-pf-trade-btn--sell.mb-btn-3d,
.qo-btn-buy.mb-btn-3d,
.qo-btn-sell.mb-btn-3d {
  color: var(--mb-btn-fg, #fff);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--mb-btn-bg, #e74c3c) 72%, #fff) 0%,
    var(--mb-btn-bg, #e74c3c) 52%,
    color-mix(in srgb, var(--mb-btn-bg, #e74c3c) 78%, #000) 100%
  );
  border-color: color-mix(in srgb, var(--mb-btn-bg, #e74c3c) 65%, #000);
  box-shadow:
    0 3px 0 color-mix(in srgb, var(--mb-btn-bg, #e74c3c) 48%, #000),
    0 5px 10px color-mix(in srgb, var(--mb-btn-bg, #e74c3c) 28%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.stk-pf-trade-btn--buy.mb-btn-3d {
  --mb-btn-bg: var(--pf-trade-buy-bg, #c0392b);
  --mb-btn-fg: var(--pf-trade-buy-color, #fff);
}

.stk-pf-trade-btn--sell.mb-btn-3d {
  --mb-btn-bg: var(--pf-trade-sell-bg, #3a4558);
  --mb-btn-fg: var(--pf-trade-sell-color, #fff);
}

.qo-btn-buy.mb-btn-3d {
  --mb-btn-bg: #e74c3c;
  --mb-btn-fg: #fff;
}

.qo-btn-sell.mb-btn-3d {
  --mb-btn-bg: #27ae60;
  --mb-btn-fg: #fff;
}

.mb-trade-buy.mb-btn-3d:active,
.mb-trade-sell.mb-btn-3d:active,
.mb-kline.mb-btn-3d:active,
.stk-pf-trade-btn--buy.mb-btn-3d:active,
.stk-pf-trade-btn--sell.mb-btn-3d:active,
.qo-btn-buy.mb-btn-3d:active,
.qo-btn-sell.mb-btn-3d:active {
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--mb-btn-bg, #e74c3c) 48%, #000),
    inset 0 2px 5px rgba(0, 0, 0, 0.22);
}

/* 主色藍（搜尋、明細） */
.mb-btn-3d--primary,
.pf-detail-btn.mb-btn-3d {
  color: #fff;
  background: linear-gradient(180deg, #5a9dff 0%, #2f7cff 52%, #1a5fd4 100%);
  border-color: #1a4fb8;
  box-shadow:
    0 3px 0 #13408f,
    0 5px 10px rgba(47, 124, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.mb-btn-3d--primary:active,
.pf-detail-btn.mb-btn-3d:active {
  box-shadow: 0 1px 0 #13408f, inset 0 2px 5px rgba(0, 0, 0, 0.22);
}

/* 幽靈灰（取消、上一頁） */
.mb-btn-3d--ghost {
  color: #eaf0ff;
  background: linear-gradient(180deg, #4a5568 0%, #3a4558 55%, #2c3544 100%);
  border-color: #252d3a;
  box-shadow:
    0 3px 0 #1e2530,
    0 5px 10px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.mb-btn-3d--ghost:active {
  box-shadow: 0 1px 0 #1e2530, inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 下單彈窗主按鈕 */
.qo-submit-main.mb-btn-3d {
  min-width: 140px;
  font-size: 15px;
  letter-spacing: 0.06em;
  padding: 10px 18px;
  border-radius: 10px;
}

/* 持股中心彈窗關閉（金色） */
.pf-tx-close-btn.mb-btn-3d {
  min-width: 120px;
  font-size: 15px;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  border-radius: 10px;
  color: #1a1200;
  background: linear-gradient(180deg, #ffe08a 0%, #ffd27a 45%, #d4a017 100%);
  border-color: #a67c00;
  box-shadow:
    0 3px 0 #8a6500,
    0 5px 10px rgba(212, 160, 23, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.pf-tx-close-btn.mb-btn-3d:active {
  box-shadow: 0 1px 0 #8a6500, inset 0 2px 5px rgba(0, 0, 0, 0.18);
}

/* ── 站內通知彈窗：股市遊戲風格 ── */
.sn-mask {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(20, 30, 60, 0.92) 0%, rgba(0, 0, 0, 0.88) 100%);
  z-index: 100010; padding: 12px; box-sizing: border-box;
}
.sn-modal.stk-modal {
  width: min(440px, 94vw);
  border-radius: 4px; color: #eaf0ff; box-sizing: border-box;
  border: 2px solid #3d5a80;
  background: linear-gradient(180deg, #0d1528 0%, #121c32 40%, #0a1020 100%);
  box-shadow: 0 0 0 1px rgba(255, 215, 100, 0.15), 0 24px 60px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: "Microsoft JhengHei UI", "Noto Sans TC", system-ui, sans-serif;
  display: flex; flex-direction: column; overflow: hidden;
}
.sn-mode-warning {
  border-color: #d68910;
  box-shadow: 0 0 28px rgba(243, 156, 18, 0.28), 0 24px 60px rgba(0, 0, 0, 0.65);
}
.sn-mode-call {
  border-color: #e67e22;
  box-shadow: 0 0 32px rgba(230, 126, 34, 0.35), 0 24px 60px rgba(0, 0, 0, 0.65);
}
.sn-mode-force {
  border-color: #c0392b;
  box-shadow: 0 0 36px rgba(192, 57, 43, 0.45), 0 24px 60px rgba(0, 0, 0, 0.65);
  animation: sn-pulse 2s ease-in-out infinite;
}
.sn-mode-success { border-color: #27ae60; box-shadow: 0 0 20px rgba(39, 174, 96, 0.25), 0 24px 60px rgba(0, 0, 0, 0.65); }
.sn-mode-error { border-color: #c0392b; box-shadow: 0 0 24px rgba(192, 57, 43, 0.3), 0 24px 60px rgba(0, 0, 0, 0.65); }
.sn-mode-info { border-color: #3d5a80; }
@keyframes sn-pulse {
  0%, 100% { box-shadow: 0 0 36px rgba(192, 57, 43, 0.45), 0 24px 60px rgba(0, 0, 0, 0.65); }
  50% { box-shadow: 0 0 48px rgba(231, 76, 60, 0.55), 0 24px 60px rgba(0, 0, 0, 0.65); }
}
.sn-hero {
  padding: 14px 18px 10px;
  border-bottom: 1px solid rgba(255, 215, 100, 0.2);
  position: relative;
  flex-shrink: 0;
}
.sn-hero::after {
  position: absolute; right: 14px; top: 14px;
  font-size: 10px; font-weight: 900; letter-spacing: 0.22em;
  color: rgba(255, 215, 100, 0.32);
}
.sn-modal[data-watermark="MARGIN"] .sn-hero::after { content: "MARGIN"; }
.sn-modal[data-watermark="NOTICE"] .sn-hero::after { content: "NOTICE"; }
.sn-modal[data-watermark="RULES"] .sn-hero::after { content: "RULES"; }
.sn-modal:not([data-watermark]) .sn-hero::after { content: "NOTICE"; }
.sn-mode-warning .sn-hero { background: linear-gradient(90deg, rgba(243, 156, 18, 0.32) 0%, transparent 58%); }
.sn-mode-call .sn-hero { background: linear-gradient(90deg, rgba(230, 126, 34, 0.38) 0%, transparent 58%); }
.sn-mode-force .sn-hero { background: linear-gradient(90deg, rgba(192, 57, 43, 0.42) 0%, transparent 58%); }
.sn-mode-success .sn-hero { background: linear-gradient(90deg, rgba(39, 174, 96, 0.28) 0%, transparent 58%); }
.sn-mode-error .sn-hero { background: linear-gradient(90deg, rgba(192, 57, 43, 0.32) 0%, transparent 58%); }
.sn-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em; margin-bottom: 8px;
  background: rgba(255, 215, 100, 0.18); color: #ffd27a; border: 1px solid rgba(255, 215, 100, 0.35);
}
.sn-mode-warning .sn-badge { background: rgba(243, 156, 18, 0.25); color: #ffe08a; border-color: rgba(243, 156, 18, 0.5); }
.sn-mode-call .sn-badge { background: rgba(230, 126, 34, 0.3); color: #ffc896; border-color: rgba(230, 126, 34, 0.55); }
.sn-mode-force .sn-badge { background: #c0392b; color: #fff; border-color: #e74c3c; }
.sn-mode-success .sn-badge { background: rgba(39, 174, 96, 0.35); color: #a8f0c8; border-color: rgba(39, 174, 96, 0.5); }
.sn-mode-error .sn-badge { background: rgba(192, 57, 43, 0.35); color: #ffb4b4; border-color: rgba(192, 57, 43, 0.5); }
.sn-title { font-weight: 800; font-size: 18px; line-height: 1.35; margin-bottom: 4px; letter-spacing: 0.02em; }
.sn-sub { font-size: 12px; opacity: 0.82; line-height: 1.45; min-height: 1em; }
.sn-body { padding: 14px 18px 8px; flex: 0 0 auto; }
.sn-modal.sn-margin-wide {
  width: min(680px, 96vw);
  max-height: min(90vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sn-body-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(58vh, 520px);
  overflow-y: auto;
}
.sn-margin-detail { margin-top: 4px; }
.sn-md-summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px;
  padding: 10px 12px; margin-bottom: 10px;
  border-radius: 4px; background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 215, 100, 0.12);
}
.sn-md-row { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.sn-md-row-highlight { grid-column: 1 / -1; }
.sn-md-k { opacity: 0.72; font-weight: 700; letter-spacing: 0.04em; }
.sn-md-v { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sn-md-v-warn { color: #ffe08a; }
.sn-md-v-call { color: #ffb896; }
.sn-md-pos-title {
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  color: #ffd27a; margin-bottom: 8px;
}
.sn-md-pos-list {
  max-height: min(42vh, 360px);
  padding-right: 4px;
  display: flex; flex-direction: column; gap: 8px;
}
.sn-md-pos-card {
  padding: 10px 12px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 215, 100, 0.14);
}
.sn-md-pos-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px;
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sn-md-pos-idx {
  font-size: 11px; font-weight: 800; opacity: 0.55;
  min-width: 1.2em;
}
.sn-md-pos-code { font-weight: 900; font-size: 15px; color: #fff; }
.sn-md-pos-name { font-size: 13px; opacity: 0.88; flex: 1 1 auto; }
.sn-md-pos-shares { font-size: 12px; font-weight: 700; color: #ffd27a; }
.sn-md-pos-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 12px;
}
.sn-md-pos-grid > div { display: flex; flex-direction: column; gap: 2px; }
.sn-md-diff-pct { font-size: 11px; font-weight: 700; }
.sn-md-empty { font-size: 13px; opacity: 0.8; padding: 12px; text-align: center; }
.sn-msg-compact {
  font-size: 13px; line-height: 1.55; margin-bottom: 10px;
  max-height: 5.5em; overflow: hidden;
}
.sn-msg {
  font-size: 14px; line-height: 1.65; white-space: pre-wrap;
  padding: 10px 12px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 215, 100, 0.1);
  color: rgba(234, 240, 255, 0.92);
}
.sn-player-guide {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 180, 80, 0.22);
  max-height: min(36vh, 280px);
  overflow-y: auto;
}
.sn-player-guide-title {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffd699;
}
.sn-player-guide-body {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(234, 240, 255, 0.94);
}
.sn-player-guide-lead {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sn-player-guide-list {
  margin: 0;
  padding-left: 1.25em;
}
.sn-player-guide-list li {
  margin: 6px 0;
}
.sn-player-guide-extra {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 12px;
  opacity: 0.92;
}
.sn-modal.sn-futures-notify .sn-actions {
  justify-content: flex-end;
}
.sn-actions {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  padding: 10px 18px 16px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.sn-btn-ok {
  min-width: 120px; font-size: 15px; letter-spacing: 0.06em;
  background: linear-gradient(180deg, #ffd27a 0%, #d4a017 100%);
  color: #1a1200; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
.sn-mode-call .sn-btn-ok,
.sn-mode-force .sn-btn-ok {
  background: linear-gradient(180deg, #ff8a7a 0%, #c0392b 100%);
  color: #fff;
}
.sn-btn-ok:active { transform: translateY(2px); box-shadow: none; }
.sn-btn-ghost { min-width: 88px; }

/* 融資維持率儀表 */
.sn-gauge-wrap {
  margin-bottom: 12px; padding: 12px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 215, 100, 0.15);
}
.sn-gauge-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sn-gauge-icon { color: #ffd27a; flex-shrink: 0; opacity: 0.95; }
.sn-mode-call .sn-gauge-icon,
.sn-mode-force .sn-gauge-icon { color: #ff8a7a; }
.sn-gauge-label { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: #ffd27a; opacity: 0.9; }
.sn-gauge-value {
  font-size: 36px; font-weight: 900; font-variant-numeric: tabular-nums;
  line-height: 1; color: #fff; text-shadow: 0 0 20px rgba(255, 210, 100, 0.35);
}
.sn-mode-call .sn-gauge-value { color: #ffb896; text-shadow: 0 0 20px rgba(230, 126, 34, 0.4); }
.sn-mode-force .sn-gauge-value { color: #ff8a7a; text-shadow: 0 0 24px rgba(231, 76, 60, 0.5); }
.sn-gauge-value small { font-size: 18px; font-weight: 800; opacity: 0.85; margin-left: 2px; }
.sn-gauge-bar { position: relative; padding-bottom: 22px; }
.sn-gauge-track {
  position: relative; height: 14px; border-radius: 999px; overflow: visible;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.sn-gauge-zone {
  position: absolute; top: 0; bottom: 0; opacity: 0.55;
}
.sn-gauge-zone-danger { left: 0; width: 35%; background: linear-gradient(90deg, #922b21, #c0392b); border-radius: 999px 0 0 999px; }
.sn-gauge-zone-warn { left: 35%; width: 30%; background: linear-gradient(90deg, #d68910, #f39c12); }
.sn-gauge-zone-safe { left: 65%; width: 35%; background: linear-gradient(90deg, #1e8449, #27ae60); border-radius: 0 999px 999px 0; }
.sn-gauge-fill {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 210, 100, 0.5), rgba(255, 210, 100, 0.15));
  pointer-events: none; z-index: 2;
}
.sn-gauge-needle {
  position: absolute; top: 50%; width: 4px; height: 22px; margin-top: -11px;
  margin-left: -2px; border-radius: 2px; background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 16px rgba(255, 210, 100, 0.6);
  z-index: 4;
}
.sn-gauge-marker {
  position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px;
  z-index: 3; opacity: 0.9;
}
.sn-gauge-marker-call { background: #ff8a7a; box-shadow: 0 0 6px rgba(231, 76, 60, 0.6); }
.sn-gauge-marker-safe { background: #7dffb3; box-shadow: 0 0 6px rgba(46, 204, 113, 0.5); }
.sn-gauge-scale {
  position: relative; height: 18px; margin-top: 6px; font-size: 10px; font-weight: 700;
}
.sn-gauge-scale span {
  position: absolute; transform: translateX(-50%); white-space: nowrap;
  opacity: 0.78; color: rgba(234, 240, 255, 0.85);
}
.sn-gauge-status {
  margin-top: 10px; text-align: center; font-size: 13px; font-weight: 800;
  padding: 6px 10px; border-radius: 4px; letter-spacing: 0.04em;
}
.sn-gauge-status-warn { color: #ffe08a; background: rgba(243, 156, 18, 0.15); border: 1px solid rgba(243, 156, 18, 0.35); }
.sn-gauge-status-call { color: #ffb896; background: rgba(230, 126, 34, 0.18); border: 1px solid rgba(230, 126, 34, 0.4); }
.sn-gauge-status-force { color: #ffb4b4; background: rgba(192, 57, 43, 0.22); border: 1px solid rgba(192, 57, 43, 0.45); }

/* ── 持股中心：交易明細彈窗 ── */
.pf-tx-mask {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(20, 30, 60, 0.92) 0%, rgba(0, 0, 0, 0.88) 100%);
  z-index: 9997; padding: 12px; box-sizing: border-box;
}
.pf-tx-modal {
  width: min(760px, 96vw); max-height: min(86vh, 720px);
  border-radius: 4px; color: #eaf0ff; box-sizing: border-box;
  border: 2px solid #3d5a80;
  background: linear-gradient(180deg, #0d1528 0%, #121c32 42%, #0a1020 100%);
  box-shadow: 0 0 0 1px rgba(255, 215, 100, 0.15), 0 24px 60px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: "Microsoft JhengHei UI", "Noto Sans TC", system-ui, sans-serif;
  display: flex; flex-direction: column; overflow: hidden;
}
.pf-tx-hero {
  padding: 14px 18px 12px;
  border-bottom: 1px solid rgba(255, 215, 100, 0.2);
  background: linear-gradient(90deg, rgba(47, 124, 255, 0.28) 0%, transparent 58%);
  flex-shrink: 0; position: relative;
}
.pf-tx-hero::after {
  content: "TX"; position: absolute; right: 16px; top: 14px;
  font-size: 10px; font-weight: 900; letter-spacing: 0.22em; color: rgba(255, 215, 100, 0.32);
}
.pf-tx-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em; margin-bottom: 8px;
  background: rgba(47, 124, 255, 0.22); color: #9fd4ff; border: 1px solid rgba(47, 124, 255, 0.45);
}
.pf-tx-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.pf-tx-title-icon { color: #ffd27a; display: inline-flex; flex-shrink: 0; }
.pf-tx-title { font-weight: 800; font-size: 20px; line-height: 1.35; letter-spacing: 0.02em; }
.pf-tx-sub { font-size: 12px; opacity: 0.82; line-height: 1.45; font-variant-numeric: tabular-nums; }
.pf-tx-body { flex: 1; overflow: auto; padding: 12px 14px 8px; min-height: 120px; }
.pf-tx-actions {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  padding: 10px 18px 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); flex-shrink: 0;
}
.pf-tx-close-btn:not(.mb-btn-3d) {
  min-width: 120px; font-size: 15px; letter-spacing: 0.06em;
  background: linear-gradient(180deg, #ffd27a 0%, #d4a017 100%);
  color: #1a1200; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35); border: none; border-radius: 10px;
  padding: 10px 14px; cursor: pointer; font-weight: 700;
}
.pf-tx-close-btn:not(.mb-btn-3d):active { transform: translateY(2px); box-shadow: none; }
.pf-tx-loading {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 32px 12px; opacity: 0.85; font-size: 14px;
}
.pf-tx-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 36px 16px; text-align: center; opacity: 0.9;
}
.pf-tx-empty .stk-icon-wrap { margin-right: 0; margin-bottom: 12px; color: #ffd27a; opacity: 0.85; }
.pf-tx-empty p { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.pf-tx-empty-hint { font-size: 12px; opacity: 0.65; }
.pf-tx-summary {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px;
}
@media (max-width: 560px) { .pf-tx-summary { grid-template-columns: 1fr; } }
.pf-tx-sum-card {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 215, 100, 0.12);
}
.pf-tx-sum-card .stk-icon-wrap { margin-right: 0; flex-shrink: 0; }
.pf-tx-sum-in .stk-icon-wrap { color: #ffb4b4; }
.pf-tx-sum-out .stk-icon-wrap { color: #7dffb3; }
.pf-tx-sum-count .stk-icon-wrap { color: #ffd27a; }
.pf-tx-sum-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-tx-sum-label { font-size: 11px; font-weight: 700; opacity: 0.72; letter-spacing: 0.04em; }
.pf-tx-sum-val { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.pf-tx-sum-num { color: #ffd27a; }
.pf-tx-list { display: flex; flex-direction: column; gap: 8px; }
.pf-tx-row {
  display: flex; align-items: stretch; gap: 12px; padding: 10px 12px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s, border-color 0.15s;
}
.pf-tx-row:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 215, 100, 0.18); }
.pf-tx-row-in { border-left: 3px solid rgba(231, 76, 60, 0.75); }
.pf-tx-row-out { border-left: 3px solid rgba(46, 204, 113, 0.75); }
.pf-tx-row-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
}
.pf-tx-icon-buy .stk-icon-wrap, .pf-tx-type-buy { color: #ffb4b4; }
.pf-tx-icon-sell .stk-icon-wrap, .pf-tx-type-sell { color: #7dffb3; }
.pf-tx-icon-in .stk-icon-wrap, .pf-tx-type-in { color: #ffb4b4; }
.pf-tx-icon-out .stk-icon-wrap, .pf-tx-type-out { color: #7dffb3; }
.pf-tx-icon-day .stk-icon-wrap, .pf-tx-type-day { color: #ffe08a; }
.pf-tx-icon-force .stk-icon-wrap, .pf-tx-type-force { color: #ff8a7a; }
.pf-tx-icon-margin .stk-icon-wrap, .pf-tx-type-margin { color: #c39bd3; }
.pf-tx-row-main { flex: 1; min-width: 0; }
.pf-tx-row-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.pf-tx-type {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12);
}
.pf-tx-type-buy { background: rgba(231, 76, 60, 0.18); border-color: rgba(231, 76, 60, 0.35); }
.pf-tx-type-sell { background: rgba(46, 204, 113, 0.18); border-color: rgba(46, 204, 113, 0.35); }
.pf-tx-type-day { background: rgba(243, 156, 18, 0.2); border-color: rgba(243, 156, 18, 0.4); color: #ffe08a; }
.pf-tx-type-force { background: rgba(192, 57, 43, 0.25); border-color: rgba(192, 57, 43, 0.45); color: #ffb4b4; }
.pf-tx-type-margin { background: rgba(155, 89, 182, 0.2); border-color: rgba(155, 89, 182, 0.4); color: #e8daef; }
.pf-tx-code {
  font-size: 12px; font-weight: 800; padding: 2px 7px; border-radius: 4px;
  background: rgba(47, 124, 255, 0.2); color: #9fd4ff; font-variant-numeric: tabular-nums;
}
.pf-tx-id { font-size: 10px; opacity: 0.45; font-variant-numeric: tabular-nums; }
.pf-tx-reason { font-size: 13px; line-height: 1.45; margin-bottom: 4px; word-break: break-word; }
.pf-tx-time {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; opacity: 0.72; font-variant-numeric: tabular-nums;
}
.pf-tx-time .stk-icon-wrap { margin-right: 0; opacity: 0.85; }
.pf-tx-amount {
  flex-shrink: 0; align-self: center; font-size: 17px; font-weight: 900;
  font-variant-numeric: tabular-nums; text-align: right; min-width: 5.5em;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.08);
}

/* ── 持股中心：主畫面區塊與持股列 ── */
.pf-block-inner.stk-scroll { min-height: 0; }
.pf-hero-value {
  font-size: clamp(20px, 3.2vh, 28px); font-weight: 900; font-variant-numeric: tabular-nums;
  color: #ffd27a; margin-bottom: 10px; line-height: 1.2; letter-spacing: 0.02em;
}
.pf-summary-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px;
}
@media (min-width: 520px) { .pf-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pf-sum-card {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.32); border: 1px solid rgba(255, 215, 100, 0.14);
  min-width: 0;
}
.pf-sum-card .stk-icon-wrap { margin-right: 0; flex-shrink: 0; color: #ffd27a; opacity: 0.9; }
.pf-sum-card-rise { border-color: rgba(231, 76, 60, 0.35); }
.pf-sum-card-fall { border-color: rgba(46, 204, 113, 0.35); }
.pf-sum-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-sum-label { font-size: 10px; font-weight: 700; opacity: 0.72; letter-spacing: 0.04em; }
.pf-sum-val { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.25; }
.pf-sum-hint { font-size: 10px; opacity: 0.65; line-height: 1.35; }
.pf-margin-panel {
  margin-top: 8px; padding: 10px 12px; border-radius: 6px;
  background: rgba(155, 89, 182, 0.12); border: 1px solid rgba(155, 89, 182, 0.35);
  font-size: 12px; line-height: 1.55;
}
.pf-margin-panel .stk-tag { margin-right: 6px; vertical-align: middle; }
.pf-pie-panel {
  padding: 8px 0; border-radius: 8px;
  background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 215, 100, 0.1);
}
.pf-pie-panel-compact { flex-wrap: nowrap; align-items: flex-start; gap: 8px; }
/* 圓餅大小／圖例字級由持股中心後台「寬（%）」「字體（%）」控制，見 portfolio-page.css */
.pf-pie-panel-compact .stk-legend { min-width: 0; flex: 1; }
.pf-pie-panel-compact .stk-legend-row { margin-bottom: 4px; }
/* 持股中心：區塊內文字色（不要整片黃字） */
#stage .uiContainer.pf-block,
#stage .uiContainer.pf-block .pf-block-inner {
  color: #dce8ff;
}
#stage .uiContainer.pf-block .stk-section-title {
  color: #c5d8f5 !important;
}
#stage .uiContainer.pf-block .stk-section-title .stk-icon-wrap {
  color: #ffd27a;
}
.pf-accent-gold { color: #ffd27a !important; }
.pf-accent-cash { color: #7ed4ff !important; }
.pf-accent-stock { color: #c8b0ff !important; }
.stk-pnl-rise { color: var(--pf-rise, #e74c3c); }
.stk-pnl-fall { color: var(--pf-fall, #2ecc71); }
.stk-pnl-flat { color: var(--pf-flat, #bdc3c7); }
.pf-accent-num { color: #eaf0ff !important; font-weight: 800; }
.pf-sum-hint { color: rgba(200, 214, 240, 0.78); }
.pf-code-link {
  color: #7eb8ff !important;
  text-decoration-color: rgba(126, 184, 255, 0.55);
}
.pf-code-link:hover { color: #a8d4ff !important; }
.pf-pos-name { color: rgba(220, 232, 255, 0.92); }
#stage .pf-block-inner .pf-hero-value { font-size: clamp(14px, 2.2vh, 20px); }
#stage .pf-block-inner .pf-block-value { font-size: clamp(13px, 2vh, 18px); color: #eaf0ff; }
#stage .pf-block-inner .pf-pos-card { font-size: 11px; }
#stage .pf-block-inner .pf-overview-lines { font-size: 11px; color: #c8d6f0; }
.pf-holdings-scroll { overflow-x: auto; padding-bottom: 4px; }
.pf-holdings-grid .stk-hgrid-th,
.pf-holdings-grid .stk-hgrid-td {
  padding: 10px 14px;
}
.pf-holdings-grid .stk-hgrid-th {
  color: #8fa8cc;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: none;
}
.pf-holdings-grid .stk-hgrid-td {
  color: #eaf0ff;
  font-size: 12px;
}
.pf-holdings-grid .stk-hgrid-td.stk-code,
.pf-holdings-grid .stk-hgrid-th.stk-code {
  color: #dce8ff;
}
.pf-holdings-grid {
  min-width: max(100%, 920px);
  column-gap: 4px;
}
.pf-holdings-grid .stk-hgrid-row:not(.stk-hgrid-head) {
  min-height: 40px;
  align-items: center;
}
.pf-holdings-grid .stk-hgrid-row:not(.stk-hgrid-head) {
  border-radius: 4px; transition: background 0.12s, border-color 0.12s;
}
.pf-holdings-grid .stk-hgrid-row:not(.stk-hgrid-head):hover {
  background: rgba(255, 255, 255, 0.04);
}
.pf-code-link {
  background: none; border: none; padding: 0; cursor: pointer; font-weight: 800;
  color: #ffd27a; font-size: inherit; font-family: inherit; text-decoration: underline;
  text-underline-offset: 2px;
}
.pf-code-link:hover { color: #ffe08a; }
.pf-detail-btn:not(.mb-btn-3d) {
  border: 1px solid rgba(255, 215, 100, 0.35); border-radius: 8px; padding: 4px 8px;
  font-size: 11px; font-weight: 700; cursor: pointer; background: rgba(47, 124, 255, 0.18);
  color: #eaf0ff; white-space: nowrap;
}
.pf-detail-btn:not(.mb-btn-3d):hover { background: rgba(47, 124, 255, 0.32); }
.pf-detail-btn.mb-btn-3d {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.pf-status-tag {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px;
  font-size: 10px; font-weight: 800; background: rgba(243, 156, 18, 0.25); color: #ffe08a;
  border: 1px solid rgba(243, 156, 18, 0.4); vertical-align: middle;
}
.pf-lots-mask {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(20, 30, 60, 0.92) 0%, rgba(0, 0, 0, 0.88) 100%);
  z-index: 9998; padding: 12px; box-sizing: border-box;
}
.pf-lots-modal {
  width: min(640px, 96vw); max-height: min(82vh, 680px);
  border-radius: 4px; color: #eaf0ff; box-sizing: border-box;
  border: 2px solid #3d5a80;
  background: linear-gradient(180deg, #0d1528 0%, #121c32 42%, #0a1020 100%);
  box-shadow: 0 0 0 1px rgba(255, 215, 100, 0.15), 0 24px 60px rgba(0, 0, 0, 0.65);
  display: flex; flex-direction: column; overflow: hidden;
}
.pf-lots-hero {
  padding: 14px 18px 12px; border-bottom: 1px solid rgba(255, 215, 100, 0.2);
  background: linear-gradient(90deg, rgba(255, 210, 122, 0.15) 0%, transparent 55%);
  flex-shrink: 0;
}
.pf-lots-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em; margin-bottom: 8px;
  background: rgba(255, 210, 122, 0.15); color: #ffd27a; border: 1px solid rgba(255, 210, 122, 0.35);
}
.pf-lots-body { flex: 1; overflow: auto; padding: 12px 14px; min-height: 100px; }
.pf-lots-list { display: flex; flex-direction: column; gap: 8px; }
.pf-lot-row {
  display: flex; gap: 12px; padding: 10px 12px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.08);
}
.pf-lot-row-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
}
.pf-lot-main { flex: 1; min-width: 0; font-size: 13px; line-height: 1.5; }
.pf-lot-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.pf-pending-orders { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 215, 100, 0.12); }
.pf-pending-list { display: flex; flex-direction: column; gap: 8px; }
.pf-pending-row {
  display: flex; align-items: stretch; gap: 10px; padding: 10px 12px 10px 14px; border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.pf-pending-row:hover {
  border-color: rgba(255, 215, 100, 0.25);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.pf-pending-main { flex: 1; min-width: 0; }
.pf-pending-cancel {
  flex-shrink: 0; align-self: center; border-radius: 8px; padding: 6px 12px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  background: rgba(255, 255, 255, 0.08); color: #eaf0ff; border: 1px solid rgba(255, 255, 255, 0.2);
}
.pf-pending-cancel:hover { background: rgba(255, 255, 255, 0.14); }
.stk-hint { font-size: 12px; opacity: 0.75; margin: 6px 0 0; }
.pf-block-value {
  font-size: clamp(16px, 2.6vh, 22px); font-weight: 800; font-variant-numeric: tabular-nums;
  line-height: 1.25; margin: 4px 0 6px;
}
.pf-overview-lines { font-size: 12px; line-height: 1.65; font-variant-numeric: tabular-nums; }
.pf-overview-lines b { color: #ffd27a; font-weight: 800; }
.pf-pos-card {
  font-size: 12px; line-height: 1.55;
  border-radius: 8px;
}
.pf-pos-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.pf-pos-name { opacity: 0.9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pf-pos-row { margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.pf-mini-list { display: flex; flex-direction: column; gap: 6px; }
.pf-mini-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px; line-height: 1.4;
  transition: border-color 0.12s, background 0.12s;
}
.pf-mini-row:hover {
  border-color: rgba(255, 220, 140, 0.22);
}
.pf-mini-row .stk-icon-wrap { margin-right: 0; flex-shrink: 0; }
.pf-mini-meta { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-rank-num {
  font-weight: 900; color: #ffd27a; min-width: 1.2em; text-align: center; font-size: 11px;
}
.pf-top-rank { flex-wrap: wrap; }

/* ── 玩法說明彈窗（漲跌幅／融資） ── */
.srh-mask { z-index: 9999; }
.srh-mask .srh-modal.stk-modal {
  width: min(1080px, 96vw);
  max-width: 96vw;
}
.srh-modal {
  width: min(1080px, 96vw);
  max-height: min(92vh, 880px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.srh-hero { padding-bottom: 8px; }
.srh-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 4px;
}
.srh-sub { margin: 0 0 10px; font-size: 12px; opacity: 0.85; line-height: 1.45; }
.srh-badge { margin-bottom: 6px; }
.srh-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.srh-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 215, 100, 0.28);
  background: rgba(0, 0, 0, 0.35);
  color: #c8d8ff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.srh-tab:hover { border-color: rgba(255, 215, 100, 0.5); color: #fff; }
.srh-tab:active { transform: translateY(2px); }
.srh-tab--on {
  background: linear-gradient(180deg, rgba(47, 124, 255, 0.45), rgba(20, 50, 120, 0.55));
  border-color: rgba(120, 180, 255, 0.65);
  color: #fff;
  box-shadow: 0 0 16px rgba(47, 124, 255, 0.25);
}
.srh-body-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(62vh, 560px);
  overflow-y: auto;
  padding: 12px 16px 8px;
}
.srh-pane { display: none; }
.srh-pane--on { display: block; }
.srh-section { display: flex; flex-direction: column; gap: 12px; }
.srh-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 560px) {
  .srh-grid-2 { grid-template-columns: 1fr; }
}
.srh-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.32));
  border: 1px solid rgba(255, 215, 100, 0.14);
}
.srh-card--hero {
  border-color: rgba(255, 215, 100, 0.35);
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.12), rgba(0, 0, 0, 0.4));
}
.srh-card--day { border-left: 3px solid #7eb8ff; }
.srh-card--cur { border-left: 3px solid #5dffe0; }
.srh-card--example { border-color: rgba(243, 156, 18, 0.35); }
.srh-card-bd { flex: 1; min-width: 0; }
.srh-card-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.srh-p { margin: 0 0 8px; font-size: 13px; line-height: 1.65; }
.srh-p:last-child { margin-bottom: 0; }
.srh-muted { opacity: 0.78; font-size: 12px; }
.srh-note {
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(243, 156, 18, 0.1);
  border: 1px solid rgba(243, 156, 18, 0.25);
  font-size: 12px;
}
.srh-gold { color: #ffd27a; }
.srh-accent-blue { color: #9fd4ff; }
.srh-accent-cyan { color: #7dffe8; }
.srh-accent-warn { color: #ffe08a; }
.srh-rise { font-weight: 800; }
.srh-list { margin: 0; padding-left: 1.1em; font-size: 12px; line-height: 1.65; }
.srh-list-compact { font-size: 12px; }
.srh-list li { margin-bottom: 4px; }
.srh-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 4px;
  vertical-align: middle;
}
.srh-tag-day { background: rgba(126, 184, 255, 0.2); color: #9fd4ff; }
.srh-tag-cur { background: rgba(93, 255, 224, 0.15); color: #7dffe8; }
.srh-tag-outer { background: rgba(231, 76, 60, 0.18); color: #ffb4a8; }
.srh-tag-inner { background: rgba(46, 204, 113, 0.15); color: #9dffc8; }
.srh-card--vol-outer { border-left: 3px solid rgba(231, 76, 60, 0.75); }
.srh-card--vol-inner { border-left: 3px solid rgba(46, 204, 113, 0.75); }
.srh-vol-demo {
  margin: 10px 0 8px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.srh-vol-demo-total {
  font-size: 15px;
  font-weight: 800;
  color: #9fd4ff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.srh-vol-demo-io {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}
.srh-vol-demo-sep { opacity: 0.35; font-weight: 400; }
.srh-vol-demo-bar {
  display: flex;
  height: 6px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.srh-vol-demo-bar-outer,
.srh-vol-demo-bar-inner {
  display: block;
  height: 100%;
  min-width: 2px;
}
.srh-ex-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 10px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.srh-ex-row {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 0.8fr;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.28);
  align-items: center;
}
.srh-ex-head { opacity: 0.65; font-weight: 700; font-size: 11px; }
.srh-ex-k { font-weight: 700; }
.srh-calc-block {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 215, 100, 0.18);
  background: rgba(0, 0, 0, 0.38);
}
.srh-calc-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 10px;
}
.srh-calc-row { margin-bottom: 8px; }
.srh-calc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
@media (max-width: 560px) {
  .srh-calc-grid { grid-template-columns: 1fr; }
}
.srh-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.8;
  margin-bottom: 4px;
}
.srh-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 215, 100, 0.22);
  background: rgba(0, 0, 0, 0.45);
  color: #eaf0ff;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.srh-input:focus {
  outline: none;
  border-color: rgba(120, 180, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(47, 124, 255, 0.25);
}
.srh-calc-out { margin-top: 6px; }
.srh-out-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 560px) {
  .srh-out-grid { grid-template-columns: 1fr; }
}
.srh-out-item {
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.srh-out-k { display: block; font-size: 10px; opacity: 0.72; margin-bottom: 2px; }
.srh-out-v { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.srh-maint-badge {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.srh-safe { color: #7dffb3; background: rgba(39, 174, 96, 0.15); border: 1px solid rgba(39, 174, 96, 0.35); }
.srh-warn { color: #ffe08a; background: rgba(243, 156, 18, 0.15); border: 1px solid rgba(243, 156, 18, 0.35); }
.srh-call { color: #ffb896; background: rgba(230, 126, 34, 0.18); border: 1px solid rgba(230, 126, 34, 0.4); }
.srh-danger { color: #ffb4b4; background: rgba(192, 57, 43, 0.2); border: 1px solid rgba(192, 57, 43, 0.45); }
.srh-flat { opacity: 0.7; }
.srh-calc-tip { margin-top: 8px; font-size: 11px; }
.srh-actions {
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255, 215, 100, 0.15);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}
.srh-close-btn { min-width: 120px; }
.srh-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 16px;
  opacity: 0.85;
  font-size: 14px;
}

/* ── 股息明細彈窗（覆寫 sn-modal 預設 440px 寬） ── */
.div-detail-mask { z-index: 100011; }
.div-detail-mask .div-detail-modal.sn-modal.stk-modal {
  width: min(1120px, 98vw);
  height: min(88vh, 860px);
  min-height: min(88vh, 860px);
  max-height: min(88vh, 860px);
  border-color: #2d8a5e;
  box-shadow: 0 0 0 1px rgba(125, 255, 179, 0.18), 0 0 32px rgba(46, 204, 113, 0.18),
    0 24px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.sn-modal[data-watermark="DIV"] .sn-hero::after { content: "DIVIDEND"; }
.sn-mode-dividend .sn-hero {
  background: linear-gradient(90deg, rgba(46, 204, 113, 0.32) 0%, rgba(255, 210, 122, 0.14) 42%, transparent 72%);
}
.sn-mode-dividend .sn-badge {
  background: rgba(46, 204, 113, 0.22);
  color: #a8f0c8;
  border-color: rgba(125, 255, 179, 0.45);
}
.div-detail-hd {
  position: relative;
  padding-right: 48px;
  flex-shrink: 0;
}
.div-detail-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.div-detail-title-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(125, 255, 179, 0.22), rgba(255, 210, 122, 0.12));
  border: 1px solid rgba(125, 255, 179, 0.35);
  color: #ffd27a;
}
.div-detail-title {
  font-weight: 800;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0.02em;
}
.div-detail-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 215, 100, 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: #eaf0ff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.div-detail-x:hover {
  border-color: rgba(255, 215, 100, 0.5);
  color: #fff;
}
.div-detail-range-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 6px;
  border-bottom: 1px solid rgba(255, 215, 100, 0.1);
}
.div-detail-range-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0.78;
  color: #ffd27a;
}
.div-detail-range {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
}
.div-detail-range-btn {
  flex: 1 1 0;
  min-width: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 100, 0.22);
  background: rgba(0, 0, 0, 0.32);
  color: rgba(234, 240, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.div-detail-range-btn .stk-icon-wrap { margin-right: 0; color: #9fd4ff; opacity: 0.92; }
.div-detail-range-btn:hover {
  border-color: rgba(255, 215, 100, 0.42);
  color: #fff;
}
.div-detail-range-btn:active { transform: translateY(1px); }
.div-detail-range-btn.is-active {
  border-color: rgba(255, 210, 122, 0.75);
  background: linear-gradient(145deg, rgba(47, 124, 255, 0.28), rgba(255, 210, 122, 0.16));
  color: #ffe08a;
  box-shadow: 0 0 14px rgba(47, 124, 255, 0.18);
}
.div-detail-range-btn.is-active .stk-icon-wrap { color: #ffd27a; }
.div-detail-tabs-wrap {
  flex-shrink: 0;
  padding: 6px 16px 4px;
  border-bottom: 1px solid rgba(125, 255, 179, 0.12);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent);
}
.div-detail-wd-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0.78;
  color: #a8f0c8;
  margin-right: 2px;
}
.div-detail-tabs-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.div-detail-tabs-row .div-detail-tabs {
  flex: 1;
  min-width: 0;
}
.div-detail-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
}
.div-detail-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--div-tab-border, rgba(255, 215, 100, 0.22));
  background: rgba(0, 0, 0, 0.32);
  color: var(--div-tab-text, rgba(234, 240, 255, 0.86));
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.div-detail-tab .stk-icon-wrap { margin-right: 0; color: var(--div-tab-icon, #ffd27a); opacity: 0.9; }
.div-detail-tab:hover {
  border-color: var(--div-tab-border-hover, rgba(255, 215, 100, 0.45));
  color: #fff;
}
.div-detail-tab:active { transform: translateY(1px); }
.div-detail-tab.is-active {
  border-color: var(--div-tab-active-border, rgba(255, 210, 122, 0.75));
  background: linear-gradient(145deg, var(--div-tab-active-bg1, rgba(255, 210, 122, 0.24)), var(--div-tab-active-bg2, rgba(46, 204, 113, 0.12)));
  color: var(--div-tab-active-text, #ffd27a);
  box-shadow: 0 0 14px var(--div-tab-glow, rgba(255, 200, 80, 0.18));
}
.div-detail-tab[data-wd="all"] { --div-tab-icon: #ffd27a; --div-tab-active-text: #ffe08a; }
.div-detail-tab[data-wd="1"] { --div-tab-icon: #7ec8ff; --div-tab-active-border: rgba(126, 200, 255, 0.7); --div-tab-active-text: #9fd4ff; --div-tab-glow: rgba(126, 200, 255, 0.2); }
.div-detail-tab[data-wd="2"] { --div-tab-icon: #c39bd3; --div-tab-active-border: rgba(195, 155, 211, 0.7); --div-tab-active-text: #e8c8f8; --div-tab-glow: rgba(195, 155, 211, 0.2); }
.div-detail-tab[data-wd="3"] { --div-tab-icon: #7dffb3; --div-tab-active-border: rgba(125, 255, 179, 0.7); --div-tab-active-text: #a8f0c8; --div-tab-glow: rgba(125, 255, 179, 0.2); }
.div-detail-tab[data-wd="4"] { --div-tab-icon: #ffd27a; --div-tab-active-border: rgba(255, 210, 122, 0.75); --div-tab-active-text: #ffe08a; }
.div-detail-tab[data-wd="5"] { --div-tab-icon: #ff9f7a; --div-tab-active-border: rgba(255, 159, 122, 0.7); --div-tab-active-text: #ffc8b0; --div-tab-glow: rgba(255, 159, 122, 0.2); }
.div-detail-tab[data-wd="6"] { --div-tab-icon: #9fd4ff; --div-tab-active-border: rgba(159, 212, 255, 0.7); --div-tab-active-text: #c8e8ff; --div-tab-glow: rgba(159, 212, 255, 0.2); }
.div-detail-tab[data-wd="0"] { --div-tab-icon: #ffb4b4; --div-tab-active-border: rgba(255, 180, 180, 0.7); --div-tab-active-text: #ffd0d0; --div-tab-glow: rgba(255, 180, 180, 0.2); }
.div-detail-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  font-variant-numeric: tabular-nums;
}
.div-detail-tab.is-active .div-detail-tab-count {
  background: rgba(0, 0, 0, 0.28);
}
.div-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 16px 4px;
  flex: 0 0 auto;
  min-height: 72px;
}
@media (max-width: 640px) { .div-detail-summary { grid-template-columns: 1fr; } }
.div-detail-sum-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.div-detail-sum-card .stk-icon-wrap { margin-right: 0; flex-shrink: 0; }
.div-detail-sum-count .stk-icon-wrap { color: #ffd27a; }
.div-detail-sum-amt .stk-icon-wrap { color: var(--div-gold, #ffd27a); }
.div-detail-sum-pct .stk-icon-wrap { color: #9fd4ff; }
.div-detail-sum-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.div-detail-sum-label { font-size: 11px; font-weight: 700; opacity: 0.72; letter-spacing: 0.04em; }
.div-detail-sum-val {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: #eaf0ff;
}
.div-detail-sum-amt .div-detail-sum-val { color: var(--div-gold, #ffd27a); }
.div-detail-mask .div-detail-body.sn-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 8px 16px 10px;
}
.div-detail-list { display: flex; flex-direction: column; gap: 10px; }
.div-detail-ft {
  flex: 0 0 auto;
  min-height: 58px;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}
.div-detail-ft #divDetailMore.is-hidden {
  visibility: hidden;
  pointer-events: none;
}
.div-detail-ft .stk-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.div-detail-close-btn {
  min-width: 120px;
  background: linear-gradient(180deg, #ffd27a 0%, #d4a017 100%);
  color: #1a1200;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
.div-detail-close-btn:active { transform: translateY(2px); box-shadow: none; }
.div-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 100%;
  padding: 2.5rem 1rem;
  text-align: center;
  opacity: 0.88;
  font-size: 14px;
  line-height: 1.6;
  box-sizing: border-box;
}
.div-detail-empty .stk-icon-wrap {
  margin-right: 0;
  margin-bottom: 12px;
  color: #ffd27a;
  opacity: 0.85;
}
.div-detail-empty p { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.div-detail-empty-hint { font-size: 12px; opacity: 0.65; }
.div-detail-card {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--div-card-accent, rgba(125, 255, 179, 0.75));
  transition: background 0.15s, border-color 0.15s;
}
.div-detail-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 215, 100, 0.18);
}
.div-detail-card[data-wd="1"] { --div-card-accent: rgba(126, 200, 255, 0.8); }
.div-detail-card[data-wd="2"] { --div-card-accent: rgba(195, 155, 211, 0.8); }
.div-detail-card[data-wd="3"] { --div-card-accent: rgba(125, 255, 179, 0.8); }
.div-detail-card[data-wd="4"] { --div-card-accent: rgba(255, 210, 122, 0.85); }
.div-detail-card[data-wd="5"] { --div-card-accent: rgba(255, 159, 122, 0.8); }
.div-detail-card[data-wd="6"] { --div-card-accent: rgba(159, 212, 255, 0.8); }
.div-detail-card[data-wd="0"] { --div-card-accent: rgba(255, 180, 180, 0.8); }
.div-detail-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffd27a;
}
.div-detail-card-main { flex: 1; min-width: 0; }
.div-detail-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.div-detail-card-title {
  font-weight: 800;
  font-size: 16px;
  line-height: 1.3;
  color: #ffd27a;
}
.div-detail-wd-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--div-card-accent, #a8f0c8);
}
.div-detail-card-amt {
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--div-gold, #ffd27a);
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(255, 210, 122, 0.25);
}
.div-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}
@media (max-width: 560px) { .div-detail-grid { grid-template-columns: 1fr; } }
.div-detail-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.div-detail-cell-lbl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.72;
  letter-spacing: 0.03em;
}
.div-detail-cell-lbl .stk-icon-wrap { margin-right: 0; opacity: 0.9; }
.div-detail-cell-val {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
.div-detail-cell-time .div-detail-cell-lbl .stk-icon-wrap { color: #9fd4ff; }
.div-detail-cell-pct .div-detail-cell-lbl .stk-icon-wrap { color: #7ec8ff; }
.div-detail-cell-pct .div-detail-cell-val { color: var(--div-credit, #7dffb3); }
.div-detail-cell-shares .div-detail-cell-lbl .stk-icon-wrap { color: #ffd27a; }
.div-detail-cell-shares .div-detail-cell-val { opacity: 0.88; font-size: 13px; font-weight: 600; }
