/**
 * intraday.css — 族群觀察「盤中盯盤」（1113，MK Tnouj9rk7o3o6ocSu4zktS）
 * 桌機版面（.idw-*）＋桌機／手機共用的小元件（子頁紅點、異動標籤、持標籤）
 * 手機版面在 css/mobile/mobile-intraday.css（全部包在 @media 裡）
 * 雙主題：一律 var(--lt-X, 深色原值)；JS 組的行內色用 themeColor()
 */

/* ── 共用：子頁紅點、標籤 ── */
.hg-live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lt-rise, #ef5350); margin-right: 6px; vertical-align: 1px; }
.idw-tag { font-size: 10.5px; line-height: 16px; padding: 0 5px; border-radius: 3px; white-space: nowrap; border: 1px solid transparent; flex: none; }
.idw-tag.hold { border-color: rgba(var(--lt-link-rgb, 88,166,255), .6); color: var(--lt-link, #58a6ff); }
.idw-tag.dom  { border-color: rgba(var(--lt-amber-rgb, 210,153,34), .6); color: var(--lt-amber, #d29922); }
.idw-evtag { font-size: 11px; line-height: 17px; padding: 0 7px; border-radius: 4px; white-space: nowrap; border: 1px solid transparent; flex: none; }
.idw-evtag.rise-bg   { color: var(--lt-rise, #ef5350); background: rgba(var(--lt-rise-rgb, 239,83,80), .12); }
.idw-evtag.rise-bg2  { color: var(--lt-rise, #ef5350); background: rgba(var(--lt-rise-rgb, 239,83,80), .16); }
.idw-evtag.fall-bg   { color: var(--lt-fall, #26a69a); background: rgba(var(--lt-fall-rgb, 38,166,154), .12); }
.idw-evtag.rise-line { color: var(--lt-rise, #ef5350); border-color: rgba(var(--lt-rise-rgb, 239,83,80), .6); }
.idw-evtag.fall-line { color: var(--lt-fall, #26a69a); border-color: rgba(var(--lt-fall-rgb, 38,166,154), .6); }
.idw-evtag.amber-line{ color: var(--lt-amber, #d29922); border-color: rgba(var(--lt-amber-rgb, 210,153,34), .6); }
.idw-evtag.note      { color: var(--lt-muted, #8b949e); border-color: var(--lt-line2, #30363d); }
.idw-st { font-size: 11px; line-height: 17px; padding: 0 6px; border-radius: 3px; }
.idw-st.lu { color: var(--lt-rise, #ef5350); background: rgba(var(--lt-rise-rgb, 239,83,80), .16); }
.idw-st.ld { color: var(--lt-fall, #26a69a); background: rgba(var(--lt-fall-rgb, 38,166,154), .16); }
.idw-st.op { color: var(--lt-amber, #d29922); }
.idw-new { font-size: 11px; line-height: 16px; padding: 0 7px; border-radius: 9px; background: var(--lt-rise, #ef5350); color: #fff; }
.idw-new[hidden] { display: none; }

/* ── 桌機版面 ── */
.idw { padding-bottom: 28px; color: var(--lt-text, #e6edf3); font-size: 13px; }
.idw button { font-family: inherit; }
.idw-mu { color: var(--lt-muted, #8b949e); }
.idw-dim { color: var(--lt-text, #c9d1d9); }
.idw-sm { font-size: 11px; }
.idw-sep { color: var(--lt-hint, #484f58); }
.idw-strong { color: var(--lt-text, #c9d1d9); }
.idw em { font-style: normal; color: var(--lt-amber, #d29922); }

.idw-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; }
.idw-eyebrow { font-size: 10px; letter-spacing: .14em; color: var(--lt-muted, #8b949e); }
.idw-titlerow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.idw-title { font-size: 20px; font-weight: 600; }
.idw-seg { display: flex; border: 1px solid var(--lt-line2, #30363d); border-radius: 6px; overflow: hidden; }
.idw-seg button { background: transparent; border: none; color: var(--lt-muted, #8b949e); font-size: 12px; padding: 5px 12px; min-height: 30px; cursor: pointer; }
.idw-seg button span { opacity: .75; }
.idw-seg button.active { background: var(--lt-link, #1f6feb); color: #fff; }
.idw-est { font-size: 11px; padding: 2px 8px; border-radius: 4px; border: 1px solid rgba(var(--lt-amber-rgb, 210,153,34), .6); color: var(--lt-amber, #d29922); }
.idw-headr { display: flex; align-items: center; gap: 14px; }
.idw-evbtn { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--lt-line2, #30363d);
  background: var(--lt-panel, #161b22); color: var(--lt-text, #e6edf3); font-size: 13px; cursor: pointer; }
.idw-evbtn svg { color: var(--lt-rise, #ef5350); }
.idw-evbtn:hover { border-color: var(--lt-muted, #8b949e); }
.idw-evn { color: var(--lt-muted, #8b949e); font-variant-numeric: tabular-nums; }
.idw-meta { text-align: right; font-size: 11.5px; color: var(--lt-muted, #8b949e); line-height: 1.6; }
.idw-meta b { color: var(--lt-text, #e6edf3); font-weight: 600; font-variant-numeric: tabular-nums; }

.idw-state { margin: 0 16px 10px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--lt-line2, #30363d); background: var(--lt-panel, #161b22);
  display: flex; gap: 10px; align-items: flex-start; }
.idw-state .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lt-muted, #8b949e); margin-top: 6px; flex: none; }
.idw-state .t { font-size: 13px; font-weight: 600; }
.idw-state .d { font-size: 12px; color: var(--lt-text, #c9d1d9); margin-top: 3px; line-height: 1.6; }
.idw-state.amber { border-color: rgba(var(--lt-amber-rgb, 210,153,34), .6); background: rgba(var(--lt-amber-rgb, 210,153,34), .08); }
.idw-state.amber .dot { background: var(--lt-amber, #d29922); }

.idw-mk { margin: 0 16px; padding: 9px 14px; background: var(--lt-panel, #161b22); border: 1px solid var(--lt-line, #21262d); border-radius: 8px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.idw-mk:empty { display: none; }
.idw-mk b { font-weight: 600; }
.idw-mkcnt { display: flex; gap: 12px; }
.idw-prog { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--lt-muted, #8b949e); }
.idw-prog .bar { display: inline-block; width: 110px; height: 5px; background: var(--lt-line2, #30363d); border-radius: 3px; overflow: hidden; }
.idw-prog .bar span { display: block; height: 5px; background: var(--lt-link, #58a6ff); }
.idw-note { margin: 6px 16px 0; font-size: 11.5px; color: var(--lt-muted, #8b949e); line-height: 1.6; }

.idw-hold { margin: 12px 16px 0; padding: 10px 14px; background: var(--lt-panel, #161b22); border: 1px solid var(--lt-line, #21262d); border-radius: 8px; }
.idw-holdhd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; font-size: 11px; }
.idw-holdttl { font-size: 12px; font-weight: 600; }
.idw-holdnone { font-size: 12px; }
.idw-holdgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .idw-holdgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.idw-hcard { padding: 8px 10px; border: 1px solid var(--lt-line, #21262d); border-radius: 6px; background: var(--lt-page, #0d1117); min-width: 0; }
.idw-hc1 { display: flex; align-items: baseline; gap: 8px; }
.idw-link { background: none; border: none; padding: 0; color: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.idw-link:hover { color: var(--lt-link, #58a6ff); }
.idw-hchg { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.idw-hchips { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; }
.idw-chip { background: none; border: none; padding: 0; font-size: 11.5px; color: var(--lt-text, #c9d1d9); cursor: pointer; font-variant-numeric: tabular-nums; text-align: left; }
.idw-chip:hover { text-decoration: underline; }
.idw-hcmp { margin-top: 5px; font-size: 11.5px; }
.idw-more { margin-top: 8px; background: transparent; border: 1px solid var(--lt-line2, #30363d); color: var(--lt-muted, #8b949e); border-radius: 6px;
  font-size: 12px; padding: 4px 12px; min-height: 28px; cursor: pointer; }
.idw-more:hover { color: var(--lt-text, #e6edf3); }

.idw-body { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 0; }
.idw-card { background: var(--lt-panel, #161b22); border: 1px solid var(--lt-line, #21262d); border-radius: 8px; overflow: hidden; overflow: clip; }
.idw-empty { padding: 18px 14px; color: var(--lt-muted, #8b949e); font-size: 12.5px; }
.idw-leg, .idw-foot { padding: 8px 12px; border-top: 1px solid var(--lt-line, #21262d); font-size: 11px; color: var(--lt-muted, #8b949e); line-height: 1.6; }

/* 族群表（1113e：全寬、表頭固定、點表頭排序）。寬螢幕不包捲動容器，表頭才黏得住；窄螢幕才左右捲 */
.idw-tbl { min-width: 964px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .idw-tblwrap { overflow-x: auto; } }
.idw-tr { display: grid; grid-template-columns: 28px minmax(170px,1.8fr) 44px 74px 64px 104px 74px 80px 58px 166px; align-items: center;
  width: 100%; text-align: left; border: none; border-top: 1px solid var(--lt-line, #21262d); background: transparent; color: inherit;
  font-size: 12.5px; padding: 0; cursor: pointer; }
.idw-tr > * { padding: 5px 8px; min-width: 0; }
.idw-tr:hover { background: rgba(var(--lt-ink, 255,255,255), .03); }
.idw-tr.sel { background: rgba(var(--lt-link-rgb, 31,111,235), .14); }
.idw-tr.egrp { background: var(--lt-panel2, #11161d); font-weight: 600; }
.idw-tr.egrp.sel { background: rgba(var(--lt-link-rgb, 31,111,235), .14); }
.idw-tr.item .idw-nm { padding-left: 22px; }
.idw-tr.item .n { color: var(--lt-text, #c9d1d9); }
.idw-th { position: sticky; top: 0; z-index: 2; background: var(--lt-panel2, #11161d); font-size: 11px; color: var(--lt-muted, #8b949e); align-items: end; border-top: none; cursor: default; }
.idw-th:hover { background: var(--lt-panel2, #11161d); }
.idw-th > div { padding: 7px 8px; }
.idw-sth { background: transparent; border: none; padding: 7px 8px; font-size: 11px; color: var(--lt-muted, #8b949e); cursor: pointer; text-align: left; white-space: nowrap; }
.idw-sth.r { text-align: right; }
.idw-sth:hover, .idw-sth.on { color: var(--lt-text, #e6edf3); }
.idw .r { text-align: right; }
.idw .b { font-weight: 600; }
.idw-nm { display: flex; align-items: center; gap: 6px; }
.idw-nm .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idw-up { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.idw-up .bar { display: inline-block; width: 46px; height: 5px; background: var(--lt-line2, #30363d); border-radius: 3px; overflow: hidden; flex: none; }
.idw-up .bar span { display: block; height: 5px; background: var(--lt-rise, #ef5350); }
.idw-tr .idw-spk { padding: 3px 8px; }

/* 明細浮窗（1113e D5）*/
.idw-dpov { position: fixed; inset: 0; z-index: 880; }
.idw-dpov[hidden] { display: none; }
.idw-ovbg { position: absolute; inset: 0; width: 100%; height: 100%; border: none; background: rgba(1,4,9,.55); cursor: default; }
.idw-dpbox { position: absolute; top: 24px; right: 24px; bottom: 24px; width: 760px; max-width: calc(100% - 48px); display: flex; flex-direction: column;
  background: var(--lt-panel, #161b22); border: 1px solid var(--lt-line2, #30363d); border-radius: 10px; box-shadow: 0 16px 48px var(--c-shadow, rgba(0,0,0,.55)); overflow: hidden; }
.idw-dphd { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--lt-line, #21262d); flex: none;
  cursor: move; user-select: none; touch-action: none; }
.idw-dphd button { cursor: pointer; }
.idw-dpbox.dragging { box-shadow: 0 20px 56px var(--c-shadow, rgba(0,0,0,.6)); }
.idw-dpbox.dragging .idw-dpbody { pointer-events: none; }
.idw-dpttl { min-width: 0; }
.idw-dname { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.idw-dpnav { margin-left: auto; display: flex; gap: 6px; flex: none; }
.idw-navb { max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; min-height: 32px; padding: 0 10px;
  border: 1px solid var(--lt-line2, #30363d); border-radius: 6px; background: transparent; color: var(--lt-text, #e6edf3); cursor: pointer; }
.idw-navb:disabled, .idw-pg:disabled { opacity: .35; cursor: default; }
.idw-dpbody { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px 16px; }
.idw-dstats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--lt-muted, #8b949e); }
.idw-dstats b { font-weight: 600; }
.idw-dom { margin-top: 8px; font-size: 12px; color: var(--lt-amber, #d29922); line-height: 1.5; }
.idw-dspk { margin-top: 10px; width: 560px; max-width: 100%; }
.idw-hax { position: relative; max-width: 100%; height: 14px; font-size: 10.5px; color: var(--lt-muted, #8b949e); }
.idw-hax span { position: absolute; top: 0; }
.idw-sec { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-top: 14px; padding-top: 10px;
  border-top: 1px solid var(--lt-line, #21262d); font-size: 12px; font-weight: 600; }
.idw-sec .idw-sm { font-weight: 400; }
.idw-linkb { background: none; border: none; padding: 0; font-size: 11.5px; color: var(--lt-link, #58a6ff); cursor: pointer; }
.idw-dist { display: flex; gap: 1px; height: 10px; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.idw-distl { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 2px; margin-top: 4px; }
.idw-bk { border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--lt-muted, #8b949e); font-size: 10.5px; padding: 2px 0; min-height: 30px;
  cursor: pointer; line-height: 1.25; font-variant-numeric: tabular-nums; }
.idw-bk span, .idw-bk b { display: block; }
.idw-bk b { color: var(--lt-text, #e6edf3); font-weight: 600; }
.idw-bk.zero { opacity: .4; }
.idw-bk.on { border-color: var(--lt-link, #1f6feb); }
.idw-capctl { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.idw-seg-s button { font-size: 11.5px; padding: 0 9px; min-height: 26px; }
.idw-pg { min-width: 28px; min-height: 26px; padding: 0 6px; border: 1px solid var(--lt-line2, #30363d); border-radius: 6px; background: transparent;
  color: var(--lt-text, #e6edf3); font-size: 13px; cursor: pointer; }
.idw-dir { font-size: 11.5px; }
.idw-pager { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; }
.idw-pgtxt { min-width: 52px; text-align: center; font-size: 12px; color: var(--lt-muted, #8b949e); font-variant-numeric: tabular-nums; }
.idw-caps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.idw-cap { font-size: 12px; min-height: 28px; padding: 0 10px; border-radius: 15px; border: 1px solid var(--lt-line2, #30363d); background: transparent;
  color: var(--lt-text, #e6edf3); cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.idw-cap .n { opacity: .75; }
.idw-cap.on { background: var(--lt-link, #1f6feb); border-color: var(--lt-link, #1f6feb); color: #fff; }
.idw-mtbl { margin-top: 6px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.idw-mr { display: grid; grid-template-columns: 64px minmax(96px,1fr) 76px 80px 80px 88px 56px; align-items: center; width: 100%; text-align: left;
  border: none; border-top: 1px solid var(--lt-line, #21262d); background: transparent; color: inherit; font-size: 12.5px; padding: 0; cursor: pointer; min-height: 32px; }
.idw-mr > * { padding: 4px 8px; min-width: 0; }
.idw-mr:hover { background: rgba(var(--lt-ink, 255,255,255), .03); }
.idw-mr.idw-th { position: static; border-radius: 4px 4px 0 0; }
.idw-mr.idw-th > div, .idw-mr.idw-th > .idw-sth { padding: 6px 8px; }
.idw-pgbot { display: flex; justify-content: flex-end; padding-top: 8px; border-top: 1px solid var(--lt-line, #21262d); }
.idw-dpfoot { margin-top: 12px; font-size: 11px; color: var(--lt-muted, #8b949e); line-height: 1.6; }

/* 異動浮動視窗 */
.idw-evov { position: fixed; inset: 0; z-index: 900; }
.idw-evov[hidden] { display: none; }
.idw-evbg { position: absolute; inset: 0; width: 100%; height: 100%; border: none; background: rgba(1,4,9,.55); cursor: default; }
.idw-evbox { position: absolute; top: 110px; right: 24px; width: 440px; max-width: calc(100% - 40px); max-height: calc(100vh - 140px); overflow: auto;
  background: var(--lt-panel, #161b22); border: 1px solid var(--lt-line2, #30363d); border-radius: 10px; box-shadow: 0 12px 40px var(--c-shadow, rgba(0,0,0,.5)); }
.idw-evhd { position: sticky; top: 0; z-index: 1; padding: 10px 12px; border-bottom: 1px solid var(--lt-line, #21262d); background: var(--lt-panel, #161b22); }
.idw-evtop { display: flex; align-items: center; gap: 8px; }
.idw-evttl { font-size: 14px; font-weight: 600; }
.idw-x { margin-left: auto; width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--lt-line2, #30363d); background: transparent;
  color: var(--lt-muted, #8b949e); cursor: pointer; font-size: 16px; flex: none; }
.idw-evfs { display: flex; gap: 6px; margin-top: 8px; }
.idw-evf { font-size: 12px; min-height: 28px; padding: 2px 10px; border-radius: 14px; border: 1px solid var(--lt-line2, #30363d); background: transparent;
  color: var(--lt-muted, #8b949e); cursor: pointer; }
.idw-evf.on { border-color: var(--lt-link, #1f6feb); background: var(--lt-link, #1f6feb); color: #fff; }
.idw-ev { display: grid; grid-template-columns: 42px 1fr; gap: 8px; padding: 8px 12px; border: none; border-bottom: 1px solid var(--lt-line, #21262d);
  width: 100%; text-align: left; background: transparent; color: inherit; font-size: 13px; }
button.idw-ev { cursor: pointer; }
button.idw-ev:hover { background: rgba(var(--lt-ink, 255,255,255), .03); }
.idw-evt { font-size: 11.5px; color: var(--lt-muted, #8b949e); font-variant-numeric: tabular-nums; padding-top: 1px; }
.idw-evc { display: block; min-width: 0; }
.idw-ev1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.idw-evtitle { font-weight: 600; }
.idw-evtxt { display: block; margin-top: 3px; font-size: 12px; color: var(--lt-text, #c9d1d9); line-height: 1.5; font-variant-numeric: tabular-nums; }
.idw-evrule { padding: 10px 12px; font-size: 11px; color: var(--lt-muted, #8b949e); line-height: 1.7; }

/* 類股指數排行表（1113f D6）*/
.idw-titlerow .idw-seg[hidden] { display: none; }
.idw-tag.comp { border-color: var(--lt-line2, #30363d); color: var(--lt-muted, #8b949e); }
.idw-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 9px 12px; border-bottom: 1px solid var(--lt-line, #21262d);
  font-size: 12.5px; font-variant-numeric: tabular-nums; }
.idw-sum b { font-weight: 600; }
.idw-sumlg { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--lt-muted, #8b949e); }
.idw-sumlg i { display: inline-block; width: 16px; height: 0; }
.idw-sumlg i.ln { border-top: 2px solid var(--lt-rise, #ef5350); }
.idw-sumlg i.dash { border-top: 1px dashed var(--lt-muted, #8b949e); margin-left: 8px; }
.idw-tr.idw-sx { grid-template-columns: 40px minmax(150px,1.3fr) 104px 84px 82px 200px 80px 166px; min-height: 36px; }
.idw-tr.idw-sx.nomap { cursor: default; }
.idw-dbarh { display: flex; justify-content: space-between; padding: 7px 8px; font-variant-numeric: tabular-nums; }
.idw-dbar .trk { position: relative; display: block; height: 12px; background: var(--lt-panel2, #21262d); border-radius: 2px; }
.idw-dbar .trk i { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--lt-line2, #30363d); }
.idw-dbar .trk b { position: absolute; top: 2px; height: 8px; border-radius: 2px; }
