/* 短線操盤 · 版面樣式（沿用 hub-theme 變數） */
.str-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(12px, 2.4vw, 26px);
}

.str-hdr {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.str-hdr-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.str-hdr-link {
  color: var(--accent, #3257d0);
  text-decoration: none;
  font-weight: 600;
}
.str-hdr-link:hover {
  text-decoration: underline;
}
.str-hdr-market {
  font-size: 12px;
  padding: 6px 12px;
}
.str-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
}
.str-pill.is-warn {
  color: #b45309;
  border-color: #fcd9a8;
  background: #fef6e7;
}

.str-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 14px;
  box-shadow: 0 1px 4px #0000000a;
}

.str-note {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.str-note strong {
  color: var(--ink);
}

/* ── 分頁切換 ── */
.str-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  margin-top: 14px;
  background: var(--paper);
}
.str-tab {
  flex: 1;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-faint);
  background: transparent;
  border: none;
  padding: 12px 8px;
  cursor: pointer;
  transition: 0.15s;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.str-tab + .str-tab {
  border-left: 1px solid var(--line);
}
.str-tab small {
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-faint);
}
.str-tab.is-active {
  color: var(--paper);
  background: var(--ink);
}
.str-tab.is-active small {
  color: #cbd5e1;
}

/* ── 開盤環境 / 強勢族群條 ── */
.str-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
@media (max-width: 760px) {
  .str-context {
    grid-template-columns: 1fr;
  }
}
.str-ctx-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
}
.str-ctx-box h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.str-ctx-box a.str-ctx-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  margin-left: auto;
  font-weight: 600;
}

/* ── 開盤環境 · 美股對台股影響（嵌入美股風向同源） ── */
.str-impact-section {
  margin-bottom: 18px;
}
.str-impact-section:last-of-type {
  margin-bottom: 0;
}
.str-impact-head {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.str-impact-head strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 2px;
}

/* 指數 Strip */
.str-index-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (min-width: 520px) {
  .str-index-strip {
    grid-template-columns: repeat(6, 1fr);
  }
}
.str-index-chip {
  background: var(--paper);
  border-radius: 10px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.str-index-chip:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
}
.str-index-chip .nm {
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 700;
  line-height: 1.2;
  min-height: 26px;
  display: flex;
  align-items: center;
}
.str-index-chip .sym {
  display: none;
}
.str-index-chip .pr {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.str-index-chip .chg {
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.str-index-chip.is-up .chg { color: #16a34a; }
.str-index-chip.is-down .chg { color: #dc2626; }

/* Impact Grid */
.str-impact-grid {
  display: grid;
  gap: 8px;
}
@media (min-width: 520px) {
  .str-impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.str-impact-item {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(248, 250, 252, 0.85);
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  transition: transform 0.15s, border-color 0.15s;
}
.str-impact-item:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.4);
}
.str-impact-item strong {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.str-impact-item span {
  display: block;
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.str-impact-item.is-up {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(240, 253, 244, 0.9);
}
.str-impact-item.is-down {
  border-color: rgba(220, 38, 38, 0.22);
  background: rgba(254, 242, 242, 0.9);
}
.str-impact-item.is-warn {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(255, 251, 235, 0.95);
}
.str-impact-meta {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--ink-faint);
}
.str-impact-foot {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.5;
}
.str-impact-foot a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.str-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.str-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: transform 0.15s, box-shadow 0.15s;
}
.str-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.06);
}
.str-chip.is-strong {
  color: #991b1b;
  border-color: #fecaca;
  background: linear-gradient(to bottom, #fef2f2, #fee2e2);
}
.str-chip .str-chip-num {
  color: inherit;
  opacity: 0.75;
  font-weight: 700;
  margin-left: 4px;
}
.str-chip.is-live {
  color: #1e40af;
  border-color: #bfdbfe;
  background: linear-gradient(to bottom, #eff6ff, #dbeafe);
}
.str-chip.is-live.is-twse-free {
  border-style: dashed;
}
.str-chip.is-seg-am {
  color: #92400e;
  border-color: #fde68a;
  background: linear-gradient(to bottom, #fffbeb, #fef3c7);
}
.str-chip.is-seg-pm {
  color: #5b21b6;
  border-color: #ddd6fe;
  background: linear-gradient(to bottom, #f5f3ff, #ede9fe);
}

.str-industry-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.str-industry-row {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.str-industry-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}
.str-industry-row-head .str-industry-row-label {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.str-session-refresh {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 11px;
  line-height: 1.3;
}
.str-session-refresh:disabled {
  opacity: 0.65;
  cursor: wait;
}
.str-industry-row-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.str-industry-row-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
#strFullDayLabel::before { background: #ef4444; }
#strSessionLabel::before { background: #3b82f6; }

.str-industry-hint {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-faint);
}

.str-finmind-token-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.str-finmind-token {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  flex: 1 1 180px;
  min-width: 0;
}
.str-finmind-token input {
  font: inherit;
  font-size: 12px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
  max-width: 280px;
  background: var(--surface, #fff);
}
.str-finmind-token-hint {
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1.45;
  flex: 1 1 100%;
  max-width: 100%;
}
.str-finmind-token-hint a {
  color: var(--link, #2563eb);
  text-decoration: none;
}
.str-finmind-token-hint a:hover {
  text-decoration: underline;
}
.str-finmind-apply {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 12px;
  align-self: flex-end;
}
.str-finmind-token-status {
  flex: 1 1 100%;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-faint);
}
.str-finmind-token-status.is-ok {
  color: #0f7b46;
  font-weight: 600;
}
.str-finmind-token-status.is-err {
  color: #b91c1c;
  font-weight: 600;
}
.str-finmind-token-status.is-loading {
  color: #1e40af;
}
.str-chip.str-chip--token {
  color: #92400e;
  border-color: #fde68a;
  background: linear-gradient(to bottom, #fffbeb, #fef3c7);
}

#strStrongSessionMount {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
#strStrongSessionMount > .str-chips {
  width: 100%;
}
@media (min-width: 480px) {
  #strStrongSessionMount:has(.str-industry-seg-block) {
    flex-direction: row;
    align-items: flex-start;
  }
  .str-industry-seg-block {
    flex: 1;
    min-width: 0;
  }
  .str-industry-seg-block + .str-industry-seg-block {
    margin-top: 0;
    padding-left: 12px;
    border-left: 1px dashed var(--line);
  }
}

.str-industry-seg-label {
  margin: 0 0 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 4px;
}
.str-industry-seg-label::before {
  content: "🕒";
  font-size: 10px;
  opacity: 0.7;
}

/* ── 篩選列 ── */
.str-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.str-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
}
.str-field > span {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.str-field > span b {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.str-field input[type="range"] {
  width: 100%;
}
.str-field select,
.str-field input[type="search"] {
  font: inherit;
  font-size: 13px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.str-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
}

/* ── 狀態列 ── */
.str-status {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.str-status.is-error {
  color: #b91c1c;
}

/* ── 表格 ── */
.str-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02), 0 1px 3px rgba(0,0,0,0.03);
}
.str-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  table-layout: auto;
}
.str-table th,
.str-table td {
  padding: 11px 14px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
/* 全表欄寬下限（可橫向捲動，不擠壓白話雙行欄） */
.str-table th[data-key="pin"],
.str-table td[data-key="pin"] { min-width: 40px; }
.str-table th[data-key="name"],
.str-table td[data-key="name"] { min-width: 128px; }
.str-table th[data-key="close"],
.str-table td[data-key="close"],
.str-table th[data-key="changePct"],
.str-table td[data-key="changePct"],
.str-table th[data-key="gapPct"],
.str-table td[data-key="gapPct"],
.str-table th[data-key="amplitudePct"],
.str-table td[data-key="amplitudePct"],
.str-table th[data-key="closePosPct"],
.str-table td[data-key="closePosPct"] { min-width: 76px; }
.str-table th[data-key="mtfSummary"],
.str-table td[data-key="mtfSummary"] { min-width: 96px; }
.str-table th[data-key="vpPoc"],
.str-table td[data-key="vpPoc"] { min-width: 108px; }
.str-table th[data-key="alignScore"],
.str-table td[data-key="alignScore"] { min-width: 104px; }
.str-table th[data-key="valueYi"],
.str-table td[data-key="valueYi"] { min-width: 92px; }
.str-table th[data-key="volumeLots"],
.str-table td[data-key="volumeLots"] { min-width: 72px; }
.str-table th[data-key="industry"],
.str-table td[data-key="industry"] { min-width: 168px; }
.str-industry-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.str-table th[data-key="eligible"],
.str-table td[data-key="eligible"],
.str-table th[data-key="risk"],
.str-table td[data-key="risk"] { min-width: 68px; }
.str-table th[data-key="levels"],
.str-table td[data-key="levels"] { min-width: 100px; }
.str-table th[data-key="score"],
.str-table td[data-key="score"] { min-width: 80px; }
.str-table td.str-left,
.str-table th.str-left {
  text-align: left;
  white-space: normal;
}
.str-cell-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  line-height: 1.35;
  min-width: max-content;
}
.str-cell-expert {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-faint);
  line-height: 1.25;
}
.str-th-sub {
  display: block;
  font-size: 9.5px;
  font-weight: 500;
  color: #738096;
  margin-top: 1px;
  line-height: 1.2;
}
.str-analysis-guide {
  margin: 10px 0 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-soft, #f8f9fb);
}
.str-analysis-guide-sum {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  padding: 8px 0;
  list-style: none;
}
.str-analysis-guide-sum::-webkit-details-marker {
  display: none;
}
.str-analysis-guide-body {
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  padding: 0 0 10px;
}
.str-analysis-guide-body p {
  margin: 0 0 6px;
}
.str-analysis-guide-body p:last-child {
  margin-bottom: 0;
}
.str-align-row {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.str-align-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.str-align-dot.ok {
  background: #1aa54b;
}
.str-align-dot.bad {
  background: #c7cdd8;
}
.str-align-dot.na {
  background: #eef0f4;
  opacity: 0.55;
}
.str-cell-cap {
  align-items: flex-end;
}
.str-cap-tier {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}
.str-cap-tier--mega {
  color: #3257d0;
  background: #eef2fd;
}
.str-cap-tier--large {
  color: #5b6472;
  background: #eef0f4;
}
.str-cap-tier--mid_small {
  color: #1aa54b;
  background: #eafaf0;
}
.str-cell-chip {
  max-width: none;
  gap: 3px;
}
.str-chip-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 5px;
  line-height: 1.7;
}
.str-chip-line b {
  display: inline-block;
  width: 28px;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  flex-shrink: 0;
}
.str-table th[data-key="bigPctChg20"],
.str-table td[data-key="bigPctChg20"] {
  min-width: 120px;
}
.str-table th[data-key="marginChg5d"],
.str-table td[data-key="marginChg5d"] {
  min-width: 88px;
}
.str-cell-inst {
  max-width: none;
  gap: 3px;
}
.str-cell-pattern {
  max-width: none;
  gap: 4px;
}
.str-pattern-main,
.str-sq-details {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: flex-start;
}
.str-table th[data-key="trustStreak"],
.str-table td[data-key="trustStreak"] {
  min-width: 168px;
}
.str-table th[data-key="pattern"],
.str-table td[data-key="pattern"] {
  min-width: 120px;
}
.str-cell-chip .str-tag {
  margin-left: 0;
}
.str-cell-inst .str-inst-line {
  flex-wrap: wrap;
  gap: 3px 5px;
}
.str-cell-inst .str-inst-line .str-mono {
  min-width: 0;
  font-size: 11px;
}
.str-table th {
  position: sticky;
  top: 0;
  background: #fdfdfd;
  color: #5b6472;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2px;
  z-index: 1;
  cursor: pointer;
  user-select: none;
  border-bottom: 2px solid var(--line);
  box-shadow: 0 2px 6px rgba(0,0,0,0.015);
}
.str-table th.no-sort {
  cursor: default;
}
.str-table th.sort-active {
  color: var(--ink);
}
.str-table th .str-sort-arrow {
  color: var(--accent);
  font-size: 10px;
}
.str-table tbody tr {
  transition: background-color 0.15s ease;
}
.str-table tbody tr:hover {
  background: #f8fafe;
}
.str-table tbody tr:last-child td {
  border-bottom: none;
}
.str-name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-start;
}
.str-name a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.str-name a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.str-name small {
  color: var(--ink-faint);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.str-up {
  color: #c0392b;
}
.str-down {
  color: #1b8a5a;
}
.str-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* 標籤膠囊 */
.str-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  line-height: 1.5;
}
.str-tag.ok {
  color: #0f7b46;
  background: #e3f5ec;
}
.str-tag.no {
  color: #6b7280;
  background: #eceef1;
}
.str-tag.risk-disposition {
  color: #fff;
  background: #b91c1c;
}
.str-tag.risk-notice {
  color: #92400e;
  background: #fde9c8;
}
.str-tag.risk-notetrans {
  color: #92400e;
  background: #fdf2dc;
}
.str-tag.risk-hot {
  color: #9a3412;
  background: #ffedd5;
}
.str-tag.strong {
  color: #b91c1c;
  background: #fdecec;
}
.str-tag.pattern {
  color: #1e40af;
  background: #e6eefc;
}
/* 法人欄 */
.str-inst-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  line-height: 1.7;
}
.str-inst-line b {
  display: inline-block;
  width: 16px;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
}
.str-inst-line .str-mono {
  min-width: 52px;
  text-align: right;
  font-size: 12px;
}
.str-inst-pv {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 600;
}
.str-tag.inst-buy {
  color: #b91c1c;
  background: #fdecec;
  padding: 2px 6px;
  font-size: 10px;
}
.str-tag.inst-sell {
  color: #0f7b46;
  background: #e3f5ec;
  padding: 2px 6px;
  font-size: 10px;
}
.str-tag.inst-new {
  color: #7c3aed;
  background: #f0e9fe;
  margin-top: 2px;
}
.str-tag.chip-up {
  color: #0f7b46;
  background: #e3f5ec;
  margin-left: 4px;
  font-size: 10px;
  padding: 2px 6px;
}
.str-tag.chip-combo {
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
}
.str-mono.str-warn {
  color: #b91c1c;
  font-weight: 600;
}
.str-score {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  color: var(--ink);
}
.str-score-bar {
  display: inline-block;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #fdba74, #ea580c);
  vertical-align: middle;
  margin-left: 6px;
}

/* ── 時間感知 Banner ── */
.str-time-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 10px 7px 8px;
  border-radius: 11px;
  border: 1px solid var(--line);
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.45;
}
.str-time-banner--premarket {
  background: #fffbeb;
  border-color: #fde68a;
}
.str-time-banner--session {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.str-time-banner--postmarket {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.str-time-banner--evening {
  background: #f5f3ff;
  border-color: #ddd6fe;
}
.str-time-lead {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.str-time-icon {
  font-size: 15px;
  flex-shrink: 0;
  line-height: 1;
}
.str-time-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.07);
  white-space: nowrap;
  flex-shrink: 0;
}
.str-time-msg {
  flex: 1 1 12rem;
  color: var(--ink-soft);
  min-width: 0;
}
.str-time-goto {
  flex-shrink: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(0,0,0,0.06);
  color: var(--ink);
  cursor: pointer;
  transition: 0.15s;
  white-space: nowrap;
}
.str-time-goto:hover {
  background: rgba(0,0,0,0.1);
}
.str-time-goto.is-current {
  background: rgba(15, 123, 70, 0.12);
  border-color: rgba(15, 123, 70, 0.35);
  color: #0f7b46;
}
.str-tab.str-tab--pulse {
  animation: str-tab-pulse 0.7s ease;
}
@keyframes str-tab-pulse {
  0%, 100% { box-shadow: none; }
  40% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.45); }
}

/* ── 方向切換 ── */
.str-dir-field {
  min-width: auto !important;
}
.str-dir-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.str-dir-btn {
  flex: 1;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  background: var(--paper);
  border: none;
  border-right: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: 0.12s;
}
.str-dir-btn:last-child {
  border-right: none;
}
.str-dir-btn:hover {
  background: var(--bg);
}
.str-dir-btn.is-active {
  background: var(--ink);
  color: var(--paper);
}
.str-dir-btn.is-active.is-long {
  background: #b91c1c;
}
.str-dir-btn.is-active.is-short {
  background: #1b8a5a;
}

/* ── 資料狀態小標籤 ── */
.str-ds-chip {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 6px;
  margin-left: 5px;
  cursor: default;
  white-space: nowrap;
}
.str-ds-ok {
  color: #0f7b46;
  background: #e3f5ec;
}
.str-ds-warn {
  color: #92400e;
  background: #fde9c8;
}

/* ── 欄位標題有說明時加底線提示 ── */
.str-table th[title] {
  text-decoration: underline dotted var(--ink-faint);
  cursor: help;
}
.str-table th.no-sort[title] {
  cursor: help;
}

/* 型態「未掃描」提示樣式 */
.str-tag-hint {
  font-style: italic;
  opacity: 0.75;
}

/* 型態量化細節 */
.str-sq-details {
  margin-left: 0;
}
.str-sq-detail {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-faint);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: default;
  white-space: nowrap;
}

/* ── 釘選 ── */
.str-pin-check {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #f59e0b;
}
.str-row-pinned {
  background: #fffbeb !important;
  border-left: 3px solid #f59e0b;
}
.str-row-pinned:hover {
  background: #fef3c7 !important;
}
.str-pin-separator td {
  text-align: center;
  font-size: 11px;
  color: var(--ink-faint);
  padding: 6px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.03em;
}

/* ── 投信新進股整行高亮 ── */
.str-row-new-entry {
  border-left: 3px solid #a78bfa;
}
.str-row-new-entry:hover {
  background: #f7f5f0 !important;
}

/* ── 分數顏色層級 ── */
.str-score--mid {
  color: #b45309;
}
.str-score--high {
  color: #b91c1c;
  font-size: 13.5px;
}

.str-faint {
  color: var(--ink-faint);
}

.str-empty {
  text-align: center;
  color: var(--ink-faint);
  padding: 28px 12px;
}

/* 說明摺疊 */
.str-help {
  margin-top: 16px;
}
.str-help summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
.str-help ul {
  margin: 10px 0 0;
  padding-left: 20px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.str-help code {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 11.5px;
}

/* ── 使用說明分頁 ── */
.str-guide-panel {
  margin-top: 14px;
}
.str-guide-search-wrap {
  margin-bottom: 14px;
}
.str-guide-search {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
}
.str-guide-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #1e3a5f22;
}
.str-guide-section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px #0000000a;
}
.str-guide-section h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}
.str-guide-section .str-guide-lead {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--ink-faint);
}
.str-guide-section p,
.str-guide-section li {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.str-guide-section ul,
.str-guide-section ol {
  margin: 8px 0 0;
  padding-left: 20px;
}
.str-guide-section li + li {
  margin-top: 6px;
}
.str-guide-section strong {
  color: var(--ink);
}
.str-guide-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
@media (max-width: 720px) {
  .str-guide-flow {
    grid-template-columns: 1fr;
  }
}
.str-guide-step {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  background: var(--bg);
}
.str-guide-step h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.str-guide-step p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
}
.str-gloss-group {
  margin-top: 4px;
}
.str-gloss-group + .str-gloss-group {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.str-gloss-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 10px;
}
.str-formula-h3 {
  margin: 16px 0 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.str-formula {
  margin: 8px 0 0;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.str-formula-note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-faint);
}
.str-guide-section code {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 11.5px;
}
.str-gloss-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.str-gloss-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.str-gloss-term {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}
.str-gloss-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 6px;
}
.str-gloss-label {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  line-height: 1.5;
}
.str-gloss-label.pro {
  color: var(--accent);
  background: #e8eef5;
}
.str-gloss-label.plain {
  color: #0f7b46;
  background: #e3f5ec;
}
.str-gloss-text {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.str-gloss-empty {
  text-align: center;
  padding: 24px;
  color: var(--ink-faint);
  font-size: 13px;
}
