:root {
  color-scheme: light;
  --ink: #222338;
  --muted: #73758e;
  --soft-muted: #9698ab;
  --line: rgba(119, 116, 169, .18);
  --violet: #9591ff;
  --lavender: #baa9e8;
  --grey-violet: #7b79b8;
  --pink: #fccdda;
  --rose: #f2a4bc;
  --aqua: #a8e9e3;
  --up: #d94a67;
  --up-soft: rgba(217, 74, 103, .11);
  --down: #32a47d;
  --down-soft: rgba(50, 164, 125, .12);
  --glass: linear-gradient(135deg, rgba(255,255,255,.82) 0%, rgba(255,255,255,.61) 48%, rgba(238,242,255,.57) 100%);
  --glass-strong: linear-gradient(135deg, rgba(255,255,255,.88), rgba(250,247,255,.72) 56%, rgba(236,250,250,.65));
  --shadow: 0 14px 36px -27px rgba(76, 67, 134, .54), inset 0 1px 0 rgba(255,255,255,.9);
  --radius-xl: 26px;
  --radius-lg: 21px;
  --radius-md: 16px;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-optical-sizing: auto;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: #f7f5fb;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 5% 4%, rgba(252,205,221,.68) 0, rgba(252,205,221,0) 36rem),
    radial-gradient(ellipse at 92% 8%, rgba(149,145,255,.43) 0, rgba(149,145,255,0) 38rem),
    radial-gradient(ellipse at 94% 78%, rgba(168,233,227,.52) 0, rgba(168,233,227,0) 34rem),
    linear-gradient(145deg, #fbf7fb 2%, #f4f1fc 48%, #eff8f8 100%);
}
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:focus-visible, a:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid rgba(123,121,184,.64); outline-offset: 3px; }

.ambient { position: fixed; z-index: -1; pointer-events: none; }
.ambient-one { top: 7rem; left: -11rem; width: 22rem; height: 22rem; border-radius: 50%; background: radial-gradient(circle, rgba(242,164,188,.2), transparent 70%); }
.ambient-two { right: -13rem; bottom: -10rem; width: 28rem; height: 28rem; border-radius: 50%; background: radial-gradient(circle, rgba(149,145,255,.15), transparent 72%); }
.app-shell { position: relative; width: min(1460px, calc(100% - 56px)); margin: 0 auto; padding: 27px 0 24px; }
.glass-panel, .metric-card, .sector-card, .leader-card, .empty-panel, .dialog-panel {
  border: 1px solid rgba(255,255,255,.83);
  background: var(--glass);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px) saturate(116%);
  backdrop-filter: blur(8px) saturate(116%);
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 2px 3px 20px; }
.brand { display: inline-flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; overflow: hidden; background: transparent; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { color: #57585b; font-size: 20px; letter-spacing: .035em; font-weight: 730; }
.brand-copy small { color: var(--soft-muted); font-size: 9px; font-weight: 700; letter-spacing: .2em; }
.topbar-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.preview-pill, .data-date { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.82); border-radius: 999px; background: rgba(255,255,255,.52); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #67bc9b; box-shadow: 0 0 0 3px rgba(103,188,155,.14); }
.primary-nav { display: flex; flex-wrap: nowrap; align-items: center; gap: 5px; padding: 7px; overflow-x: auto; scrollbar-color: rgba(123,121,184,.42) transparent; scrollbar-width: thin; border-radius: 19px; }
.primary-nav::-webkit-scrollbar { height: 5px; }
.primary-nav::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(123,121,184,.42); }
.nav-link { position: relative; display: inline-flex; flex: 0 0 auto; justify-content: center; align-items: center; min-width: max-content; min-height: 43px; padding: 0 28px; border: 1px solid transparent; border-radius: 14px; color: #656780; font-size: 16px; font-weight: 650; white-space: nowrap; transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.nav-link:hover { color: var(--grey-violet); background: rgba(255,255,255,.52); transform: translateY(-1px); }
.nav-link[aria-current="page"] { color: #5f5b9e; border-color: rgba(149,145,255,.22); background: linear-gradient(135deg, rgba(149,145,255,.22), rgba(252,205,221,.27) 62%, rgba(168,233,227,.19)); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.page-container { min-height: 400px; padding-top: 26px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 0 2px 18px; }
.eyebrow { margin-bottom: 7px; color: var(--grey-violet); font-size: 10px; letter-spacing: .2em; font-weight: 750; }
.page-heading h1 { margin: 0; color: #57585b; font-size: clamp(21px, 2.4vw, 29px); line-height: 1.15; letter-spacing: .02em; }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.updated-at { color: var(--muted); font-size: 11px; text-align: right; line-height: 1.6; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.metric-card { min-height: 174px; padding: 20px 21px 18px; border-radius: var(--radius-xl); }
.metric-label { display: flex; align-items: center; gap: 8px; color: #72738c; font-size: 12px; font-weight: 700; letter-spacing: .055em; }
.metric-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(140deg, var(--violet), var(--rose)); box-shadow: 0 0 0 4px rgba(149,145,255,.1); }
.metric-value { margin-top: 18px; font-size: clamp(27px, 3vw, 39px); line-height: 1; font-weight: 720; letter-spacing: -.045em; color: #292942; }
.metric-sub { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.metric-date { margin-top: 14px; color: var(--soft-muted); font-size: 10px; }
.positive { color: var(--up) !important; }
.negative { color: var(--down) !important; }
.neutral { color: var(--muted) !important; }
.reference-card { padding: 17px 18px 15px; }
.reference-card .metric-label { margin-bottom: 10px; }
.reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.reference-item { min-width: 0; padding: 9px 10px; border: 1px solid rgba(148,145,190,.12); border-radius: 13px; background: rgba(255,255,255,.4); }
.reference-name { color: var(--muted); font-size: 10px; }
.reference-value { margin-top: 4px; font-size: 15px; font-weight: 700; }
.reference-foot { display: flex; justify-content: space-between; gap: 6px; margin-top: 3px; color: var(--soft-muted); font-size: 9px; }
.section-block { margin-top: 23px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 2px 13px; }
.section-heading h2 { margin: 0; color: #57585b; font-size: clamp(21px, 2.4vw, 29px); line-height: 1.15; letter-spacing: .02em; }
.title-with-icon { display: inline-flex; align-items: center; gap: 10px; }
.heading-icon { width: .86em; height: .86em; flex: 0 0 auto; color: #8c87e7; stroke: currentColor; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.range-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid rgba(255,255,255,.9); border-radius: 999px; background: rgba(255,255,255,.48); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.range-button { min-height: 33px; padding: 0 14px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 650; transition: background-color .16s ease, color .16s ease, transform .16s ease; }
.range-button:hover { color: var(--grey-violet); transform: translateY(-1px); }
.range-button[aria-pressed="true"] { color: #fff; background: linear-gradient(110deg, #8c87e7, #b49fe6 55%, #e3a9cb); box-shadow: 0 5px 14px -9px rgba(109,96,193,.9), inset 0 1px 0 rgba(255,255,255,.35); }
.sector-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.sector-card { position: relative; display: flex; min-height: 204px; flex-direction: column; align-items: stretch; overflow: hidden; padding: 20px 21px 18px; border-radius: var(--radius-xl); text-align: left; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.sector-card::before { content: ""; position: absolute; z-index: 2; inset: 0 auto 0 0; width: 4px; background: var(--flow-accent, linear-gradient(var(--violet), var(--pink))); opacity: .8; }
.sector-card::after { content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none; border-radius: inherit; }
.sector-card > * { position: relative; z-index: 1; }
.sector-card[data-sign="positive"] { --flow-accent: linear-gradient(180deg, #e88b9c, #d94a67); background: linear-gradient(128deg, rgba(217,74,103,var(--flow-strength,.1)), rgba(255,255,255,.7) 65%, rgba(238,242,255,.58)); }
.sector-card[data-sign="negative"] { --flow-accent: linear-gradient(180deg, #8bd6bd, #32a47d); background: linear-gradient(128deg, rgba(50,164,125,var(--flow-strength,.1)), rgba(255,255,255,.7) 65%, rgba(238,242,255,.58)); }
.sector-card:hover { transform: translateY(-2px); border-color: rgba(149,145,255,.34); box-shadow: 0 20px 38px -28px rgba(76,67,134,.7), inset 0 1px 0 #fff; }
.sector-card:active { transform: translateY(0); }
.sector-topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sector-name { font-size: 16px; font-weight: 750; }
.sector-count { margin-top: 4px; color: var(--muted); font-size: 10px; }
.sector-open { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.94); border-radius: 11px; color: var(--grey-violet); background: linear-gradient(135deg, rgba(149,145,255,.14), rgba(252,205,221,.24), rgba(168,233,227,.22)); font-size: 17px; }
.sector-amount { margin-top: 24px; font-size: clamp(27px, 3vw, 35px); line-height: 1; font-weight: 740; letter-spacing: -.04em; }
.sector-metrics { display: flex; flex-wrap: wrap; gap: 9px 22px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.sector-metrics strong { color: var(--ink); font-size: 12px; font-weight: 700; }
.sector-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 15px; color: var(--soft-muted); font-size: 10px; }
.incomplete-note { color: #92784b; }
.leader-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.leader-card { overflow: hidden; padding: 0; border-radius: var(--radius-xl); }
.leader-head { display: flex; justify-content: space-between; align-items: center; padding: 15px 18px 13px; border-bottom: 1px solid rgba(117,116,158,.12); }
.leader-head strong { font-size: 14px; }
.leader-head span { color: var(--muted); font-size: 10px; }
.leader-list { display: grid; }
.leader-row { display: grid; grid-template-columns: 31px minmax(90px,1fr) minmax(105px,auto); align-items: center; gap: 10px; min-height: 47px; padding: 6px 17px; border-bottom: 1px solid rgba(117,116,158,.09); }
.leader-row:last-child { border-bottom: 0; }
.rank-number { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(149,145,255,.16); border-radius: 9px; color: var(--grey-violet); background: rgba(255,255,255,.49); font-size: 10px; font-weight: 750; }
.stock-link { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 0; border: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.stock-link:hover .stock-name { color: var(--grey-violet); }
.stock-name { overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.stock-code { color: var(--soft-muted); font-size: 10px; }
.rank-amount { font-size: 12px; font-weight: 700; text-align: right; white-space: nowrap; }
.rank-change { color: var(--muted); font-size: 10px; text-align: right; white-space: nowrap; }
.no-data { color: var(--soft-muted); }
.data-footnote { display: flex; justify-content: space-between; gap: 14px; margin-top: 13px; color: var(--soft-muted); font-size: 10px; line-height: 1.55; }
.loading-state, .empty-panel, .error-panel { display: grid; place-items: center; min-height: 260px; padding: 32px; border-radius: var(--radius-xl); text-align: center; }
.loading-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.9); border-radius: 14px; color: #fff; background: linear-gradient(135deg, #8d87e7, #bd9ce3 55%, #f0acc9); font-size: 20px; font-weight: 750; }
.loading-state p, .empty-panel p, .error-panel p { margin: 11px 0 0; color: var(--muted); font-size: 13px; }
.empty-panel h1, .empty-panel h2 { margin: 0; font-size: 25px; }
.empty-mark { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 13px; border: 1px solid rgba(255,255,255,.92); border-radius: 16px; color: var(--grey-violet); background: linear-gradient(135deg, rgba(149,145,255,.2), rgba(252,205,221,.3), rgba(168,233,227,.24)); font-size: 18px; }
.blank-stock { width: min(720px, 100%); margin: 18px auto 0; padding: 28px; border-radius: var(--radius-xl); text-align: center; }
.back-link { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; margin-bottom: 18px; padding: 0 13px; border: 1px solid rgba(255,255,255,.88); border-radius: 13px; color: var(--grey-violet); background: rgba(255,255,255,.45); font-size: 12px; font-weight: 700; }
.stock-detail-title { display: flex; justify-content: center; align-items: baseline; gap: 10px; margin: 0; font-size: 26px; }
.stock-detail-title span { color: var(--soft-muted); font-size: 13px; font-weight: 500; }
.page-footer { display: flex; justify-content: space-between; gap: 14px; margin: 28px 3px 0; color: var(--soft-muted); font-size: 10px; }

.sector-dialog { width: min(1100px, calc(100% - 32px)); max-width: 1100px; max-height: min(88vh, 850px); padding: 0; overflow: auto; border: 1px solid rgba(255,255,255,.94); border-radius: 28px; color: var(--ink); background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(248,246,255,.95) 58%, rgba(239,250,249,.94)); box-shadow: 0 30px 80px -34px rgba(45,40,82,.46), inset 0 1px 0 #fff; }
.sector-dialog::backdrop { background: rgba(43,42,64,.36); }
.dialog-content { padding: 26px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.dialog-head h2 { margin: 0; font-size: 23px; }
.dialog-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.dialog-close { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.94); border-radius: 13px; color: var(--muted); background: linear-gradient(135deg, rgba(149,145,255,.12), rgba(252,205,221,.18)); cursor: pointer; font-size: 19px; }
.dialog-stats { display: grid; grid-template-columns: 1.2fr repeat(2, 1fr); gap: 11px; margin-top: 17px; }
.dialog-stat { min-height: 87px; padding: 14px; border: 1px solid rgba(255,255,255,.91); border-radius: 17px; background: rgba(255,255,255,.58); box-shadow: inset 0 1px 0 #fff; }
.dialog-stat small { color: var(--muted); font-size: 10px; }
.dialog-stat strong { display: block; margin-top: 9px; font-size: 18px; }
.flow-chart-wrap { margin-top: 14px; padding: 17px 17px 11px; border: 1px solid rgba(255,255,255,.94); border-radius: 20px; background: rgba(255,255,255,.57); }
.chart-title { margin-bottom: 11px; color: var(--muted); font-size: 11px; font-weight: 700; }
.flow-chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-zero { stroke: rgba(119,116,169,.28); stroke-width: 1; }
.chart-labels { display: flex; justify-content: space-between; margin-top: 5px; color: var(--soft-muted); font-size: 9px; }
.stock-list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin: 18px 2px 9px; }
.stock-list-head h3 { margin: 0; font-size: 15px; }
.stock-list-head span { color: var(--muted); font-size: 10px; }
.stock-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.stock-card { display: grid; grid-template-columns: minmax(120px,1fr) minmax(108px,auto) minmax(72px,auto); align-items: center; gap: 10px; min-height: 58px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.96); border-radius: 17px; background: linear-gradient(130deg, rgba(255,255,255,.79), rgba(246,244,255,.65) 58%, rgba(237,250,248,.55)); box-shadow: inset 0 1px 0 #fff, 0 5px 15px -13px rgba(77,68,127,.45); }
.stock-card .stock-link { min-height: 40px; }
.stock-card-flow { font-size: 12px; font-weight: 730; text-align: right; white-space: nowrap; }
.stock-card-change { color: var(--muted); font-size: 10px; text-align: right; white-space: nowrap; }
.dialog-note { margin-top: 12px; color: var(--soft-muted); font-size: 10px; line-height: 1.55; }

@media (max-width: 1100px) {
  .app-shell { width: min(100% - 36px, 960px); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leader-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app-shell { width: calc(100% - 26px); padding-top: 16px; }
  .topbar { align-items: flex-start; padding-bottom: 14px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-copy strong { font-size: 16px; }
  .brand-copy small { font-size: 8px; }
  .topbar-meta { flex-direction: column; align-items: flex-end; gap: 5px; font-size: 10px; }
  .preview-pill, .data-date { padding: 6px 9px; }
  .primary-nav { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 4px; padding: 5px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
  .nav-link { flex: 0 0 auto; min-height: 39px; padding: 0 14px; border-radius: 12px; font-size: 13px; }
  .page-container { padding-top: 21px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .updated-at { text-align: left; }
  .metric-grid { gap: 9px; }
  .metric-card { min-height: 145px; padding: 16px 15px; border-radius: 20px; }
  .metric-value { font-size: 27px; }
  .metric-label { font-size: 10px; }
  .sector-grid, .leader-grid { grid-template-columns: 1fr; gap: 10px; }
  .sector-card { min-height: 185px; padding: 17px; border-radius: 21px; }
  .sector-amount { margin-top: 20px; font-size: 31px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .range-switch { align-self: stretch; justify-content: space-between; }
  .range-button { flex: 1; padding: 0 7px; }
  .leader-row { grid-template-columns: 27px minmax(80px,1fr) minmax(88px,auto); gap: 6px; padding: 7px 11px; }
  .data-footnote, .page-footer { flex-direction: column; }
  .dialog-content { padding: 18px 14px; }
  .sector-dialog { width: calc(100% - 18px); border-radius: 22px; }
  .dialog-stats { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .dialog-stat { min-height: 77px; padding: 10px 8px; }
  .dialog-stat strong { font-size: 14px; }
  .stock-list { grid-template-columns: 1fr; }
  .stock-card { grid-template-columns: minmax(110px,1fr) minmax(90px,auto) 62px; gap: 7px; }
}
@media (max-width: 390px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 132px; }
  .leader-row { grid-template-columns: 24px minmax(60px,1fr) minmax(78px,auto); }
  .stock-code { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.sector-amount small { font-size: 11px; font-weight: 650; letter-spacing: 0; }
.ranking-heading { align-items: flex-end; }
.ranking-switch { flex: 0 0 auto; }
.leader-list { max-height: none; overflow: visible; }
.leader-card { min-width: 0; }
.leader-empty, .insider-no-data { padding: 25px 18px; color: var(--muted); font-size: 12px; text-align: center; }
.flow-chart-wrap { padding: 12px 13px 9px; }
.chart-title { margin-bottom: 5px; }
.chart-frame { position: relative; }
.flow-chart { max-height: 150px; }
.flow-bar { cursor: crosshair; outline: none; transition: opacity .12s ease; }
.flow-bar:hover, .flow-bar:focus-visible { opacity: 1; stroke: rgba(78,70,132,.5); stroke-width: 2; }
.chart-tooltip { position: absolute; z-index: 5; max-width: calc(100% - 12px); padding: 9px 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; color: #fff; background: rgba(34,38,58,.96); box-shadow: 0 10px 24px -12px rgba(25,27,47,.75); font-size: 12px; font-weight: 750; line-height: 1.2; white-space: nowrap; pointer-events: none; transform: translateX(-50%); }
.chart-tooltip.positive { color: #ffbac9 !important; }
.chart-tooltip.negative { color: #8ce0c2 !important; }
.chart-tooltip[hidden] { display: none; }
.action-button, .filter-pill, .remove-stock { min-height: 36px; padding: 0 13px; border: 1px solid rgba(255,255,255,.92); border-radius: 13px; color: #5f5b9e; background: linear-gradient(130deg, rgba(149,145,255,.17), rgba(252,205,221,.24), rgba(168,233,227,.17)); box-shadow: inset 0 1px 0 rgba(255,255,255,.85); cursor: pointer; font: inherit; font-size: 12px; font-weight: 680; }
.action-button:hover, .filter-pill:hover, .remove-stock:hover { border-color: rgba(149,145,255,.4); }
.action-button.subtle { color: var(--muted); background: rgba(255,255,255,.46); }
.action-button.selected { color: #fff; background: linear-gradient(110deg, #8c87e7, #b49fe6 55%, #e3a9cb); }
.insider-mode .action-button { min-height: 44px; padding: 0 18px; font-size: 13px; }
.watchlist-panel, .insider-panel { padding: 20px; border-radius: var(--radius-xl); }
.watchlist-toolbar, .insider-toolbar, .watchlist-table-head, .insider-table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.watchlist-actions, .insider-mode, .insider-controls, .filter-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.watchlist-update { color: var(--muted); font-size: 12px; white-space: nowrap; }
.list-create-form { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 14px; padding: 13px; border: 1px solid rgba(255,255,255,.88); border-radius: 16px; background: rgba(255,255,255,.45); }
.list-create-form label, .stock-picker label, .list-picker-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.list-create-form input, .stock-picker input, .list-picker, .insider-search { min-height: 40px; padding: 0 12px; border: 1px solid rgba(149,145,255,.25); border-radius: 12px; color: var(--ink); background: rgba(255,255,255,.8); font: inherit; font-size: 13px; outline: none; }
.list-create-form input:focus, .stock-picker input:focus, .list-picker:focus, .insider-search:focus { border-color: rgba(126,119,221,.72); box-shadow: 0 0 0 3px rgba(149,145,255,.13); }
.list-picker-label { display: block; margin-top: 17px; }
.list-picker { width: min(360px,100%); margin-top: 7px; }
.stock-picker { position: relative; max-width: 560px; margin-top: 16px; }
.stock-picker label { display: block; margin-bottom: 7px; }
.stock-picker input { width: 100%; }
.watchlist-input-row { display: grid; grid-template-columns: minmax(220px,.75fr) minmax(320px,1.25fr); align-items: end; gap: 14px; width: min(100%,940px); margin-top: 16px; }
.watchlist-input-row .list-picker-label { margin: 0 0 7px; }
.watchlist-input-row .list-picker { width: 100%; max-width: none; margin: 0; }
.watchlist-input-row .stock-picker { max-width: none; margin-top: 0; }
.watchlist-input-row .suggestions { top: calc(100% + 5px); }
.suggestions { position: absolute; z-index: 6; top: 70px; right: 0; left: 0; max-height: 270px; overflow: auto; border: 1px solid rgba(255,255,255,.98); border-radius: 14px; background: rgba(255,255,255,.98); box-shadow: 0 18px 38px -20px rgba(51,48,89,.45); }
.suggestions[hidden] { display: none; }
.suggestion-item { display: flex; width: 100%; min-height: 44px; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 13px; border: 0; border-bottom: 1px solid rgba(117,116,158,.09); color: var(--ink); background: transparent; cursor: pointer; text-align: left; }
.suggestion-item:hover { background: rgba(149,145,255,.1); }
.suggestion-item small, .suggestion-empty { color: var(--muted); font-size: 11px; }
.suggestion-empty { padding: 14px; }
.watchlist-table-head, .insider-table-head { margin: 20px 1px 10px; }
.watchlist-table-head h2, .insider-table-head h2 { margin: 0; font-size: 17px; }
.watchlist-table-head span, .insider-table-head span { color: var(--muted); font-size: 11px; }
.table-scroll { width: 100%; overflow: auto; border: 1px solid rgba(255,255,255,.87); border-radius: 15px; background: rgba(255,255,255,.54); }
.watch-table { width: 100%; min-width: 1120px; border-collapse: collapse; font-size: 14px; }
.watch-table th, .watch-table td { padding: 10px 11px; border-bottom: 1px solid rgba(117,116,158,.1); text-align: right; white-space: nowrap; }
.watch-table th:first-child, .watch-table td:first-child { width: 48px; min-width: 48px; max-width: 48px; text-align: center; }
.watch-table th:nth-child(2), .watch-table td:nth-child(2) { min-width: 150px; text-align: left; }
.watch-table th { color: var(--muted); background: rgba(255,255,255,.48); font-size: 13px; }
.watch-table tr:last-child td { border-bottom: 0; }
.sort-button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; min-width: max-content; padding: 2px 0; border: 0; color: inherit; background: transparent; cursor: pointer; font: inherit; font-weight: 700; white-space: nowrap; }
.sort-button span { display: inline-flex; flex: 0 0 1.2em; justify-content: center; min-width: 1.2em; color: var(--grey-violet); font-size: 12px; line-height: 1; }
.watch-table .stock-link { gap: 5px; }
.watch-table .stock-name { max-width: 78px; }
.watch-table .stock-code { display: inline; }
.remove-stock { min-height: 27px; padding: 0 8px; color: var(--muted); font-size: 10px; }
.watchlist-empty { display: flex; min-height: 190px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 12px; text-align: center; }
.watchlist-empty strong { color: var(--ink); font-size: 14px; }
.watchlist-empty.large { min-height: 250px; }
.watchlist-sync-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border: 1px solid rgba(91,84,160,.16); border-radius: 12px; background: rgba(255,255,255,.46); color: var(--muted); font-size: 12px; }
.watchlist-sync-note strong { color: var(--ink); }
.watchlist-sync-note span { overflow-wrap: anywhere; }
.watchlist-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.insider-controls { justify-content: space-between; margin-top: 16px; }
.filter-pill { min-height: 42px; padding: 0 15px; color: var(--muted); background: rgba(255,255,255,.54); font-size: 13px; }
.filter-pill[aria-pressed="true"] { color: #fff; background: linear-gradient(110deg, #8c87e7, #b49fe6 55%, #e3a9cb); }
.insider-search { width: min(330px,100%); }
.insider-table { min-width: 900px; }
.insider-table td small { display: block; margin-top: 3px; color: var(--soft-muted); font-size: 9px; }
.data-footnote { align-items: center; }
@media (max-width: 760px) {
  .ranking-heading { gap: 10px; }
  .ranking-switch { width: 100%; }
  .watchlist-panel, .insider-panel { padding: 14px 11px; }
  .watchlist-toolbar, .insider-toolbar { align-items: flex-start; flex-direction: column; }
  .watchlist-update { white-space: normal; }
  .watchlist-input-row { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 8px; }
  .list-create-form { align-items: stretch; }
  .list-create-form input { flex: 1 1 100%; }
  .insider-controls { align-items: stretch; }
  .filter-pills { width: 100%; }
  .insider-search { width: 100%; }
  .chart-tooltip { font-size: 11px; }
}
.insider-status { display: flex; flex-direction: column; gap: 5px; margin: 14px 0 12px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.9); border-radius: 14px; color: var(--muted); background: linear-gradient(125deg, rgba(255,255,255,.69), rgba(225,223,255,.28), rgba(227,250,245,.28)); font-size: 11px; line-height: 1.6; }
.insider-status strong { color: var(--ink); font-size: 12px; }


/* v03.1 stock search/detail additions — isolated from the locked baseline rules above. */
.v031-panel, .v031-overview, .v031-core-card, .v031-position-card { border-radius: var(--radius-xl); padding: 20px; }
.v031-load-panel { min-height: 150px; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); text-align: center; }
.v031-load-panel p { margin: 0; font-weight: 650; }
.v031-load-panel small, .v031-search-empty, .v031-result-note, .v031-source-line { color: var(--soft-muted); font-size: 11px; line-height: 1.65; }
.v031-search-panel { margin-bottom: 17px; }
.v031-search-title, .v031-section-title, .v031-overview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.v031-search-title h2, .v031-section-title h2, .v031-core-card h2 { margin: 0; color: #57585b; font-size: 19px; font-weight: 750; }
.v031-search-title p, .v031-section-title p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.v031-search-form { display: flex; gap: 10px; margin: 18px 0 11px; }
.v031-search-input-wrap { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; min-height: 48px; padding: 0 15px; border: 1px solid rgba(255,255,255,.92); border-radius: 15px; background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(233,230,255,.42), rgba(226,249,246,.32)); box-shadow: inset 0 1px 0 rgba(255,255,255,.84), 0 5px 16px -14px rgba(87,77,145,.7); }
.v031-search-input-wrap > span { color: var(--grey-violet); font-size: 22px; line-height: 1; }
.v031-search-input-wrap input { width: 100%; min-width: 0; padding: 9px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; font-size: 14px; }
.v031-search-input-wrap input::placeholder { color: var(--soft-muted); }
.v031-search-form .primary-button, .v031-add-selected > .primary-button { min-width: 118px; border: 1px solid rgba(255,255,255,.8); border-radius: 15px; padding: 0 18px; color: #fff; font-weight: 720; background: linear-gradient(135deg, #817be2, #a89be8 48%, #eaa9c1); box-shadow: 0 10px 22px -15px rgba(91,75,166,.7), inset 0 1px 0 rgba(255,255,255,.5); cursor: pointer; }
.v031-search-results { min-height: 38px; }
.v031-search-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 14px; border: 1px dashed rgba(123,121,184,.24); border-radius: 14px; background: rgba(255,255,255,.34); }
.v031-results-list, .v031-add-matches { display: grid; gap: 6px; max-height: 360px; overflow: auto; padding: 3px; }
.stock-search-result, .v031-recent-row, .v031-strong-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 1px solid rgba(255,255,255,.82); border-radius: 14px; padding: 10px 13px; text-align: left; background: linear-gradient(120deg, rgba(255,255,255,.63), rgba(235,232,255,.33), rgba(226,248,246,.3)); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); cursor: pointer; transition: transform .14s ease, border-color .14s ease, background .14s ease; }
.stock-search-result:hover, .v031-recent-row:hover, .v031-strong-row:hover { transform: translateY(-1px); border-color: rgba(149,145,255,.42); background: linear-gradient(120deg, rgba(255,255,255,.86), rgba(235,232,255,.5), rgba(226,248,246,.45)); }
.v031-stock-id, .v031-stock-quote, .v031-recent-row > span, .v031-strong-name { display: grid; gap: 3px; }
.v031-stock-id { flex: 1; min-width: 0; }
.v031-stock-id strong, .v031-recent-row strong, .v031-strong-name strong { overflow: hidden; color: #383850; font-size: 13px; font-weight: 730; text-overflow: ellipsis; white-space: nowrap; }
.v031-stock-id small, .v031-recent-row small, .v031-strong-name small { color: var(--soft-muted); font-size: 10px; }
.v031-stock-quote { min-width: 68px; text-align: right; }
.v031-stock-quote strong { font-size: 12px; }
.v031-stock-quote small { font-size: 10px; }
.v031-live-dot, .v031-ready-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #61b991; box-shadow: 0 0 0 4px rgba(97,185,145,.13); }
.v031-result-note { margin: 8px 3px 0; }
.v031-count, .v031-date-badge, .v031-status-pill { flex: 0 0 auto; border: 1px solid rgba(255,255,255,.88); border-radius: 999px; padding: 6px 10px; color: #69689a; background: linear-gradient(120deg, rgba(252,205,221,.32), rgba(186,169,232,.25), rgba(168,233,227,.28)); font-size: 10px; font-weight: 700; }
.v031-search-columns { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 16px; align-items: start; }
.v031-section-title { align-items: center; margin-bottom: 13px; }
.v031-recent-list, .v031-strong-list { display: grid; gap: 7px; }
.v031-recent-row { justify-content: space-between; min-height: 52px; }
.v031-recent-row > span:last-child { text-align: right; }
.v031-strong-row { display: grid; grid-template-columns: 32px minmax(75px,1fr) 75px 80px; gap: 8px; min-height: 38px; padding: 6px 9px; }
.v031-rank { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 9px; color: #7169ae; background: linear-gradient(135deg, rgba(252,205,221,.58), rgba(186,169,232,.4), rgba(168,233,227,.38)); font-size: 11px; font-weight: 800; }
.v031-strong-row > strong { text-align: right; font-size: 11px; }
.v031-source-line { margin-top: 9px; }
.v031-code-title { margin-left: 6px; color: #817be2; font-size: .62em; font-weight: 700; }
.v031-detail-heading { align-items: center; }
.v031-detail-heading > .action-button { flex: 0 0 auto; }
.v031-overview { margin-bottom: 16px; }
.v031-overview-head { align-items: center; }
.v031-kicker { display: block; margin-bottom: 8px; color: var(--grey-violet); font-size: 10px; font-weight: 760; letter-spacing: .08em; }
.v031-taxonomy { display: flex; flex-wrap: wrap; gap: 6px; }
.v031-tag, .v031-taxonomy-empty, .v031-evidence-tag { display: inline-flex; align-items: center; min-height: 24px; border: 1px solid rgba(255,255,255,.85); border-radius: 999px; padding: 3px 9px; color: #696892; background: linear-gradient(120deg, rgba(252,205,221,.31), rgba(186,169,232,.23), rgba(168,233,227,.22)); font-size: 10px; }
.v031-tag-group { color: #588c83; }
.v031-taxonomy-empty { color: var(--soft-muted); background: rgba(255,255,255,.34); }
.v031-main-quote { display: flex; align-items: baseline; gap: 10px; margin: 15px 0 17px; }
.v031-main-quote > strong { color: #292942; font-size: clamp(32px,4vw,48px); font-weight: 760; letter-spacing: -.045em; }
.v031-main-quote > span:first-of-type { color: var(--muted); font-size: 13px; }
.v031-main-quote > span:last-child { margin-left: 4px; font-size: 15px; font-weight: 720; }
.v031-metric-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.v031-metric-card { min-height: 78px; display: grid; align-content: start; gap: 6px; padding: 12px 13px; border: 1px solid rgba(255,255,255,.78); border-radius: 15px; background: linear-gradient(135deg, rgba(255,255,255,.56), rgba(230,227,255,.28), rgba(225,248,245,.25)); }
.v031-metric-card > span { color: var(--muted); font-size: 10px; font-weight: 680; }
.v031-metric-card > strong { color: #41415d; font-size: 14px; font-weight: 730; }
.v031-metric-card > small { color: var(--soft-muted); font-size: 9px; line-height: 1.5; }
.v031-core-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.v031-core-card { padding: 17px; }
.v031-core-card.resistance { background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(252,205,221,.24), rgba(238,242,255,.42)); }
.v031-core-card.breakout { background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(186,169,232,.24), rgba(168,233,227,.27)); }
.v031-core-card.support { background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(168,233,227,.27), rgba(238,242,255,.42)); }
.v031-core-card h2 { margin-bottom: 13px; }
.v031-level-item { padding: 12px 0; border-top: 1px solid rgba(123,121,184,.12); }
.v031-level-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 680; }
.v031-level-price { display: block; margin-top: 5px; color: #41415d; font-size: 21px; font-weight: 760; letter-spacing: -.02em; }
.v031-level-price.is-null { color: #77798c; font-size: 16px; letter-spacing: 0; }
.v031-level-item p, .v031-core-card > p { margin: 5px 0 0; color: var(--soft-muted); font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.v031-evidence-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.v031-evidence-tag { min-height: 21px; padding: 2px 7px; font-size: 9px; }
.v031-breakout-price { margin: 17px 0 9px; color: #5e589b; font-size: 28px; font-weight: 780; }
.v031-prev-trigger { margin-top: 13px !important; padding-top: 10px; border-top: 1px solid rgba(123,121,184,.14); }
.v031-missing { color: #8b7581 !important; }
.v031-band-note { margin-top: 8px; padding: 8px 9px; border: 1px solid rgba(255,255,255,.7); border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.3); font-size: 10px; line-height: 1.5; }
.v031-status-pill { color: #8a7182; }
.v031-position-card { margin-bottom: 16px; }
.v031-zone-pill { flex: 0 0 auto; border: 1px solid rgba(255,255,255,.84); border-radius: 999px; padding: 7px 12px; color: #5d598f; background: linear-gradient(120deg, rgba(252,205,221,.46), rgba(186,169,232,.35), rgba(168,233,227,.36)); font-size: 11px; font-weight: 760; }
.v031-zone-pill.hot { color: #9b5c70; background: linear-gradient(120deg, rgba(252,205,221,.6), rgba(242,164,188,.4)); }
.v031-zone-pill.observer { color: #665f9e; }
.v031-zone-pill.new-high { color: #4b9489; }
.v031-position-track { position: relative; display: flex; height: 14px; overflow: visible; margin: 24px 8px 10px; border: 1px solid rgba(255,255,255,.88); border-radius: 999px; background: rgba(123,121,184,.1); box-shadow: inset 0 1px 3px rgba(73,68,126,.1); }
.v031-zone-segment { height: 100%; }
.v031-zone-segment.sweet { border-radius: 999px 0 0 999px; background: linear-gradient(90deg, #f3bfd0, #e4c8e8); }
.v031-zone-segment.observer { border-radius: 0 999px 999px 0; background: linear-gradient(90deg, #c6b7eb, #a9e3dc); }
.v031-position-marker { position: absolute; top: -8px; width: 5px; height: 28px; border: 1px solid white; border-radius: 5px; background: #5c548f; box-shadow: 0 2px 8px rgba(59,50,111,.42); transform: translateX(-50%); }
.v031-position-axis { display: flex; justify-content: space-between; gap: 6px; color: var(--soft-muted); font-size: 9px; }
.v031-distance-row { display: flex; flex-wrap: wrap; gap: 9px 22px; margin-top: 14px; color: var(--muted); font-size: 10px; }
.v031-distance-row b { margin-left: 4px; color: #5e598f; }
.v031-position-empty { display: grid; gap: 7px; padding: 20px 14px; border: 1px dashed rgba(123,121,184,.22); border-radius: 15px; color: #6b6986; background: rgba(255,255,255,.3); font-size: 13px; font-weight: 700; text-align: center; }
.v031-position-empty small { color: var(--soft-muted); font-size: 10px; font-weight: 450; line-height: 1.5; }
.v031-audit { margin-bottom: 16px; }
.v031-audit summary { color: #5f5b95; font-size: 13px; font-weight: 730; cursor: pointer; }
.v031-audit-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.v031-audit-grid > div { display: grid; gap: 5px; padding: 11px; border: 1px solid rgba(255,255,255,.76); border-radius: 13px; background: rgba(255,255,255,.28); }
.v031-audit-grid strong { color: #625e94; font-size: 10px; }
.v031-audit-grid span { color: var(--muted); font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.v031-pending-panel { display: grid; gap: 12px; }
.v031-pending-panel > p { max-width: 850px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.stock-add-dialog { width: min(760px, calc(100vw - 24px)); max-height: min(88vh, 900px); overflow: auto; }
.stock-add-dialog .dialog-content { padding: 20px; }
.v031-add-matches { max-height: 210px; margin: 6px 0 12px; }
.v031-add-selected { padding: 15px; border: 1px solid rgba(255,255,255,.82); border-radius: 17px; background: linear-gradient(135deg, rgba(255,255,255,.6), rgba(235,232,255,.28), rgba(226,248,246,.26)); }
.v031-add-selected h3 { margin: 0; color: #57585b; font-size: 17px; }
.v031-add-selected h4 { margin: 16px 0 8px; color: #67658f; font-size: 11px; }
.v031-selected-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.v031-category-add-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 7px; margin-top: 10px; }
.v031-category-add-row select, .v031-category-add-row input { min-width: 0; min-height: 39px; border: 1px solid rgba(255,255,255,.9); border-radius: 11px; padding: 7px 9px; color: var(--ink); background: rgba(255,255,255,.62); font: inherit; font-size: 10px; }
.v031-form-message { margin: 11px 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,.8); border-radius: 12px; color: #5b826f; background: rgba(224,247,238,.45); font-size: 10px; line-height: 1.6; }
.v031-form-message.warning { color: #866d7e; background: rgba(252,205,221,.3); }
.v031-form-message.error { color: #a2495d; background: rgba(252,205,221,.55); }
.v031-add-selected > .primary-button { min-height: 42px; }
@media (max-width: 760px) {
  .v031-panel, .v031-overview, .v031-core-card, .v031-position-card { padding: 15px 13px; border-radius: 20px; }
  .v031-search-columns { grid-template-columns: 1fr; }
  .v031-search-title { align-items: center; }
  .v031-search-title h2, .v031-section-title h2, .v031-core-card h2 { font-size: 17px; }
  .v031-search-form { gap: 7px; }
  .v031-search-form .primary-button { min-width: 90px; padding: 0 10px; }
  .v031-strong-row { grid-template-columns: 28px minmax(70px,1fr) 62px 72px; gap: 5px; padding: 6px 7px; }
  .v031-strong-name strong { font-size: 11px; }
  .v031-strong-name small { font-size: 9px; }
  .v031-strong-row > strong { font-size: 10px; }
  .v031-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .v031-metric-card { min-height: 70px; padding: 10px; }
  .v031-metric-card > strong { font-size: 12px; }
  .v031-core-grid { grid-template-columns: 1fr; gap: 10px; }
  .v031-audit-grid { grid-template-columns: 1fr; }
  .v031-distance-row { display: grid; grid-template-columns: 1fr; gap: 7px; }
  .v031-category-add-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .v031-category-add-row select { grid-column: 1 / -1; }
  .v031-category-add-row button { min-height: 39px; }
  .v031-overview-head { align-items: flex-start; flex-direction: column; }
  .v031-detail-heading { align-items: flex-start; }
  .v031-detail-heading h1 { font-size: 26px; }
  .v031-date-badge { white-space: normal; }
  .stock-add-dialog .dialog-content { padding: 15px 12px; }
}
@media (max-width: 390px) {
  .v031-search-title .action-button { padding: 8px 10px; font-size: 10px; }
  .v031-search-empty { align-items: flex-start; flex-direction: column; }
  .v031-main-quote { flex-wrap: wrap; gap: 6px; }
  .v031-main-quote > strong { font-size: 36px; }
  .v031-main-quote > span:last-child { width: 100%; margin-left: 0; }
  .v031-strong-row { grid-template-columns: 24px minmax(58px,1fr) 54px 63px; gap: 4px; }
  .v031-stock-quote { min-width: 54px; }
  .v031-level-price { font-size: 19px; }
  .v031-level-price.is-null { font-size: 14px; }
}

.v031-gap-coverage { margin-top: 12px; padding: 9px 11px; border: 1px solid rgba(255,255,255,.78); border-radius: 12px; color: #7b6b7a; background: linear-gradient(120deg, rgba(252,205,221,.26), rgba(186,169,232,.2), rgba(168,233,227,.22)); font-size: 10px; line-height: 1.6; }

/* 股票期貨資格只在主檔明確為 true 時顯示。 */
.stock-futures-marker { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 4px; padding: 0 3px; border: 1px solid rgba(149,145,255,.32); border-radius: 6px; color: #625da3; background: linear-gradient(120deg,rgba(149,145,255,.14),rgba(252,205,221,.24)); font-size: 9px; font-weight: 800; line-height: 1; vertical-align: 1px; }
.stock-code.has-futures { white-space: nowrap; }
@media (max-width: 760px) {
  .leader-grid { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 7px; }
  .leader-card { min-width: 0; }
  .leader-head { align-items: flex-start; flex-direction: column; gap: 3px; padding: 11px 8px; }
  .leader-head strong { font-size: 12px; }
  .leader-head span { font-size: 9px; }
  .leader-row { grid-template-columns: 22px minmax(0,1fr); gap: 5px; padding: 7px 6px; }
  .leader-row:nth-child(n+21) { display: none; }
  .leader-row > .stock-link { min-width: 0; flex-wrap: wrap; gap: 2px 4px; }
  .leader-row > .rank-amount { grid-column: 2; justify-self: start; font-size: 10px; text-align: left; white-space: normal; }
  .rank-number { width: 21px; height: 21px; font-size: 9px; }
  .leader-row .stock-name { max-width: 100%; font-size: 10px; }
  .leader-row .stock-code { font-size: 9px; }
  .leader-row .stock-futures-marker { min-width: 14px; height: 14px; margin-left: 1px; font-size: 8px; }
}

@media (max-width: 760px) {
  .ranking-heading { align-items: flex-start; text-align: left; }
  .ranking-heading > div { width: 100%; text-align: left; }
}


/* NitaStock 2026-10-11: authoritative table layout for insider data. */
.insider-table-scroll { overflow-x: auto; }
.insider-table { width: 100%; min-width: 1180px; table-layout: fixed; }
.insider-table th, .insider-table td { min-height: 48px; padding: 12px 14px; vertical-align: middle; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.insider-table th:nth-child(1), .insider-table td:nth-child(1) { width: 128px; min-width: 128px; max-width: none; text-align: left; }
.insider-table th:nth-child(2), .insider-table td:nth-child(2) { width: 220px; min-width: 220px; max-width: none; text-align: left; }
.insider-table th:nth-child(3), .insider-table td:nth-child(3) { width: 240px; min-width: 240px; max-width: none; text-align: left; }
.insider-table th:nth-child(4), .insider-table td:nth-child(4) { width: 240px; min-width: 240px; max-width: none; text-align: left; }
.insider-table th:nth-child(n+5), .insider-table td:nth-child(n+5) { width: 155px; min-width: 155px; text-align: right; }
.insider-table .stock-link { max-width: 100%; align-items: flex-start; flex-wrap: wrap; white-space: normal; }
.insider-table .stock-name { max-width: none; overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.insider-table .stock-code { white-space: nowrap; }
.insider-table .sort-button { width: 100%; justify-content: flex-start; padding: 4px 0; white-space: normal; text-align: left; }
.insider-table th:nth-child(n+5) .sort-button { justify-content: flex-end; text-align: right; }
.insider-person-name { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .insider-table { min-width: 1180px; }
  .insider-table th:nth-child(2), .insider-table td:nth-child(2) { position: sticky; left: 0; z-index: 3; background: rgba(250, 249, 255, .97); box-shadow: 8px 0 12px -12px rgba(48, 43, 91, .8); }
  .insider-table thead th:nth-child(2) { z-index: 5; background: rgba(239, 237, 255, .98); }
}


/* NitaStock final: self-watchlist columns use their own readable layout. */
.watchlist-table-scroll { overflow-x: auto; }
.watchlist-table { width: max(100%, 1480px); min-width: 1480px; table-layout: fixed; }
.watchlist-table th, .watchlist-table td { padding: 12px 14px; min-height: 48px; white-space: normal; vertical-align: middle; line-height: 1.45; overflow-wrap: anywhere; }
.watchlist-table th:nth-child(1), .watchlist-table td:nth-child(1) { width: 240px; min-width: 240px; max-width: none; text-align: left; }
.watchlist-table th:nth-child(2), .watchlist-table td:nth-child(2) { width: 145px; min-width: 145px; max-width: none; text-align: right; }
.watchlist-table th:nth-child(3), .watchlist-table td:nth-child(3) { width: 135px; min-width: 135px; text-align: right; }
.watchlist-table th:nth-child(4), .watchlist-table td:nth-child(4) { width: 145px; min-width: 145px; text-align: right; }
.watchlist-table th:nth-child(n+5), .watchlist-table td:nth-child(n+5) { width: 165px; min-width: 165px; text-align: right; }
.watchlist-table th:last-child, .watchlist-table td:last-child { width: 105px; min-width: 105px; }
.watchlist-table .stock-link { width: 100%; max-width: none; justify-content: flex-start; align-items: flex-start; flex-wrap: wrap; white-space: normal; gap: 6px 8px; }
.watchlist-table .stock-name { max-width: none; overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.watchlist-table .stock-code { white-space: nowrap; }
.watchlist-table .sort-button { white-space: normal; }
@media (max-width: 760px) {
  .watchlist-table { min-width: 1480px; }
}


/* NitaStock final: readable watchlist and insider identity typography. */
.watchlist-table { width: max(100%, 1200px); min-width: 1200px; }
.watchlist-table th:nth-child(1), .watchlist-table td:nth-child(1) { width: 190px; min-width: 190px; }
.watchlist-table th:nth-child(2), .watchlist-table td:nth-child(2) { width: 105px; min-width: 105px; }
.watchlist-table th:nth-child(3), .watchlist-table td:nth-child(3) { width: 95px; min-width: 95px; }
.watchlist-table th:nth-child(4), .watchlist-table td:nth-child(4) { width: 105px; min-width: 105px; }
.watchlist-table th:nth-child(n+5), .watchlist-table td:nth-child(n+5) { width: 130px; min-width: 130px; }
.watchlist-table th:last-child, .watchlist-table td:last-child { width: 80px; min-width: 80px; }
.watchlist-table .stock-name { font-size: 17px; font-weight: 760; }
.watchlist-table .stock-code { font-size: 15px; font-weight: 700; color: var(--muted); }
.insider-table .stock-name { font-size: 16px; font-weight: 760; }
.insider-table .stock-code { font-size: 15px; font-weight: 700; color: var(--muted); }
.watchlist-toast { display: inline-flex; width: fit-content; margin: 10px 0 0; padding: 6px 10px; border-radius: 9px; font-size: 12px; font-weight: 750; }
.watchlist-toast.success { color: #16724f; background: #e3f8ed; border: 1px solid #9cdbba; }
.watchlist-toast.error { color: #a22d46; background: #fff0f3; border: 1px solid #e8a9b7; }
.sync-watchlist-button { color: #4b478a; }
@media (min-width: 761px) {
  .watchlist-table-scroll { overflow-x: hidden; }
}


/* 2026-10-11 requested UI rebuild: only affected components. */
.stock-overview-card { padding: 20px 24px 18px; }
.stock-overview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 4px 0 18px; border-bottom: 1px solid var(--line); }
.stock-identity-block { min-width: 0; }
.stock-identity-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 46px; }
.stock-detail-name { font-size: clamp(26px, 3vw, 38px); line-height: 1.1; color: #222338; white-space: nowrap; }
.stock-detail-code { font-size: clamp(22px, 2.5vw, 32px); color: #77798d; font-weight: 650; }
.stock-market-tag, .stock-taxonomy-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 8px; background: rgba(149,145,255,.12); color: #68649c; font-size: 13px; font-weight: 700; white-space: nowrap; }
.stock-taxonomy-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 9px; }
.stock-taxonomy-tag.is-missing { color: var(--muted); background: rgba(115,117,142,.1); }
.detail-watch-heart { width: 39px; height: 39px; border: 0; border-radius: 50%; background: transparent; color: #9a9bab; font-size: 34px; line-height: 1; cursor: pointer; }
.detail-watch-heart:hover, .detail-watch-heart:focus-visible { color: #df7198; background: rgba(242,164,188,.16); }
.stock-price-block { display: grid; grid-template-columns: auto auto auto; align-items: baseline; justify-content: end; column-gap: 8px; min-width: 300px; text-align: right; }
.stock-main-close { font-size: clamp(34px, 4vw, 56px); line-height: 1; font-weight: 780; }
.stock-price-unit { font-size: 16px; color: var(--muted); }
.stock-main-change { font-size: clamp(18px, 2vw, 26px); font-weight: 730; white-space: nowrap; }
.stock-price-up { color: var(--up) !important; }
.stock-price-down { color: var(--down) !important; }
.stock-price-flat { color: #20202a !important; }
.stock-official-date { grid-column: 1 / -1; margin-top: 9px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.stock-kpi-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.stock-kpi-grid .v032-kpi-card { min-height: 126px; padding: 14px 16px; border-radius: 15px; }
.stock-kpi-grid .v032-kpi-line { min-height: 29px; }
.stock-kpi-grid .v032-kpi-line strong { font-size: 18px; }
.v031-core-card h2 { font-size: clamp(20px, 2.2vw, 27px); }
.v031-core-card .v031-level-label, .v031-core-card .level-label, .v031-core-card [class*="level"] strong { font-size: 17px; }
.detail-watchlist-dialog { padding: 0; border: 0; border-radius: 24px; background: transparent; max-width: min(520px, calc(100% - 28px)); }
.detail-watchlist-dialog::backdrop { background: rgba(24,24,40,.48); backdrop-filter: blur(4px); }
.detail-watchlist-card { position: relative; padding: 30px; border: 1px solid rgba(255,255,255,.9); border-radius: 24px; background: #fff; box-shadow: 0 24px 70px rgba(45,39,90,.25); }
.detail-watchlist-card h2 { margin: 0; font-size: 28px; }
.detail-watchlist-stock { margin: 10px 0 22px; font-size: 22px; font-weight: 700; }
.detail-watchlist-options { display: grid; gap: 10px; margin-bottom: 18px; }
.detail-watchlist-option { padding: 14px 16px; border: 1px solid rgba(149,145,255,.25); border-radius: 13px; background: rgba(149,145,255,.1); color: #5f5b9e; font-size: 17px; font-weight: 700; cursor: pointer; text-align: left; }
.detail-watchlist-option:hover { background: rgba(149,145,255,.2); }
@media (max-width: 760px) {
  .stock-overview-head { display: block; }
  .stock-price-block { grid-template-columns: auto auto 1fr; justify-content: start; margin-top: 16px; text-align: left; min-width: 0; }
  .stock-official-date { text-align: left; }
  .stock-detail-name { font-size: 29px; }
  .stock-detail-code { font-size: 25px; }
  .stock-kpi-grid { grid-template-columns: 1fr; }
  .stock-kpi-grid .v032-kpi-card { min-height: 112px; }
}


/* 2026-10-11 confirmed batch: preserve full subgroup data on desktop and compact tables. */
.v032-kline-periods { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.v032-kline-periods .range-button.is-disabled { opacity: .55; cursor: not-allowed; }
.stock-price-flat { color: #20212b !important; }
.stock-price-up { color: #d94a67 !important; }
.stock-price-down { color: #23966f !important; }
@media (max-width: 760px) {
  .watchlist-table th:nth-child(1), .watchlist-table td:nth-child(1) { width: 168px; min-width: 168px; }
  .watchlist-table { min-width: 1120px; }
  .insider-table th:nth-child(2), .insider-table td:nth-child(2) { width: 190px; min-width: 190px; }
}

/* 2026-10-11 v2 confirmed requirements */
.detail-watch-heart.is-active { color:#e14d86; font-weight:900; }
.stock-price-inline { display:flex; align-items:baseline; flex-wrap:wrap; gap:5px 8px; }
.stock-price-inline .stock-official-date { flex-basis:100%; }
.v4-money-detail-chart { min-height:170px; display:flex; align-items:flex-end; justify-content:center; gap:5px; padding:18px 10px 10px; border:1px solid rgba(149,145,255,.18); border-radius:16px; background:rgba(255,255,255,.45); }
.v4-money-detail-chart .flow-bar { width:clamp(10px, 4vw, 26px); min-height:4px; border-radius:5px 5px 2px 2px; }
.v4-money-detail-chart .flow-in { background:#d94b69; }
.v4-money-detail-chart .flow-out { background:#37a78f; }
.v4-money-detail-chart .is-unknown { background:#aaa8b5; opacity:.55; }
@media (max-width:760px) {
 .stock-overview-head { display:flex; flex-direction:column; gap:10px; }
 .stock-price-inline { order:-1; width:100%; }
 .stock-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
 .stock-kpi-grid .v032-kpi-card { min-height:88px; padding:10px 8px; }
 .stock-kpi-grid .v032-kpi-line { min-height:22px; }
 .stock-kpi-grid .v032-kpi-line strong { font-size:14px; }
 .stock-kpi-grid .v032-kpi-line span { font-size:10px; }
 .detail-watchlist-card { padding:22px; }
 .detail-watchlist-card h2 { font-size:23px; }
 .detail-watchlist-option { padding:11px 13px; font-size:15px; }
 .detail-watchlist-card > .dialog-close { position:absolute; top:9px; right:9px; width:28px; height:28px; padding:0; font-size:20px; }
 .watchlist-table th:nth-child(1), .watchlist-table td:nth-child(1) { width:168px; min-width:168px; }
 .insider-table th:nth-child(2), .insider-table td:nth-child(2) { width:185px; min-width:185px; }
}
/* 2026-10-11 final user-requested rules */
@media (min-width:761px) {
}
.v031-inline-code { font-style:normal; color:var(--muted); font-weight:700; }
.v031-stock-id strong, .v031-recent-row strong { font-size:15px; }
.v031-stock-id small, .v031-recent-row small { font-size:12px; }
.v031-stock-quote strong { font-size:16px; }
.v032-kline-periods .is-unavailable { opacity:.58; cursor:pointer; }
.v032-kline-periods .is-unavailable:hover { opacity:.9; }
.v031-core-grid > .v031-core-card { background:var(--glass-strong); }
@media (max-width:760px) {
  .stock-overview-head { display:flex; flex-direction:row; flex-wrap:wrap; align-items:baseline; gap:6px 10px; }
  .stock-identity-block { flex:1 1 auto; min-width:0; }
  .stock-price-inline { order:initial; width:auto; flex:0 0 auto; margin:0; }
  .stock-detail-name { font-size:23px; }
  .stock-detail-code { font-size:20px; }
  .stock-main-close { font-size:27px; }
  .stock-main-change { font-size:16px; }
  .stock-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .stock-kpi-grid .v032-kpi-card { min-height:88px; padding:9px 7px; }
  .stock-kpi-grid .v032-kpi-line strong { font-size:14px; }
  .stock-kpi-grid .v032-kpi-line span { font-size:10px; }
  .detail-watchlist-card { padding:22px; }
  .detail-watchlist-card h2 { font-size:23px; }
  .detail-watchlist-option { padding:11px 13px; font-size:15px; }
  .detail-watchlist-card > .dialog-close { top:7px; right:7px; width:27px; height:27px; font-size:18px; }
  .insider-table th:nth-child(2), .insider-table td:nth-child(2) { width:165px; min-width:165px; }
}

/* 2026-10-12 complete requested batch: final, scoped overrides. */
@media (min-width: 761px) {
  .stock-detail-name { font-size: clamp(23px, 2.2vw, 31px); }
  .stock-detail-code { font-size: clamp(20px, 1.9vw, 27px); }
  .stock-futures-marker { font-size: 17px; }
  .stock-main-close { font-size: clamp(28px, 3vw, 42px); }
  .v031-core-grid > .v031-core-card { background: var(--glass-strong); }
}
@media (max-width: 760px) {
  .stock-overview-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 8px; }
  .stock-identity-block { min-width: 0; }
  .stock-identity-line { flex-wrap: nowrap; gap: 5px; min-width: 0; }
  .stock-detail-name { font-size: 20px; overflow: hidden; text-overflow: ellipsis; }
  .stock-detail-code { font-size: 17px; }
  .stock-futures-marker { font-size: 16px; }
  .detail-watch-heart { width: 30px; height: 30px; font-size: 27px; flex: 0 0 auto; }
  .stock-price-block.stock-price-inline { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 2px 4px; min-width: 0; margin-top: 0; text-align: right; }
  .stock-main-close { font-size: 22px; }
  .stock-main-change { font-size: 13px; }
  .stock-price-unit { font-size: 12px; }
  .stock-price-inline .stock-official-date { flex-basis: 100%; font-size: 10px; white-space: nowrap; }
  .stock-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
  .stock-kpi-grid .v032-kpi-card { min-height: 78px; padding: 7px 6px; border-radius: 12px; }
  .stock-kpi-grid .v032-kpi-line { min-height: 19px; }
  .stock-kpi-grid .v032-kpi-line span { font-size: 9px; }
  .stock-kpi-grid .v032-kpi-line strong { font-size: 12px; }
  .stock-kpi-grid .v032-sweet-card small { font-size: 9px; }
  .insider-table th:nth-child(2), .insider-table td:nth-child(2) { width: 140px; min-width: 140px; }
}

/* 2026-10-12 requested correction: no legacy tile gate and stable mobile detail/search layout. */
.stock-futures-marker { box-sizing: border-box; min-width: 22px; height: 22px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; overflow: hidden; white-space: nowrap; }
.stock-taxonomy-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.stock-taxonomy-line .stock-official-date { margin: 0 0 0 auto; flex: 0 0 auto; text-align: right; white-space: nowrap; }
@media (max-width: 760px) {
  .stock-overview-head { display: block !important; }
  .stock-identity-block { display: block !important; min-width: 0; width: 100%; }
  .stock-identity-line { display: flex !important; flex-wrap: nowrap !important; align-items: center; min-width: 0; }
  .stock-detail-name { display: inline-block !important; visibility: visible !important; flex: 0 1 auto; min-width: 0; max-width: 45vw; font-size: 20px !important; overflow: hidden; text-overflow: ellipsis; }
  .stock-detail-code { flex: 0 0 auto; font-size: 17px !important; }
  .stock-futures-marker { flex: 0 0 22px; width: 22px; height: 22px; font-size: 13px !important; }
  .stock-taxonomy-line { flex-wrap: nowrap; width: 100%; min-width: 0; overflow: hidden; }
  .stock-taxonomy-line .stock-official-date { margin-left: auto; font-size: 9px; flex: 0 0 auto; }
  .stock-price-block.stock-price-inline { margin-top: 8px; justify-content: flex-start; width: 100%; }
}

/* 2026-10-12 money subgroup detail final: latest amount inline and all returned daily bars. */
.v4-money-latest-line { display:flex; align-items:baseline; gap:10px; margin:12px 0 10px; padding:0; }
.v4-money-latest-line span { color:var(--muted); font-size:13px; font-weight:700; }
.v4-money-latest-line strong { font-size:24px; line-height:1; }
.v4-money-latest-line strong.positive { color:var(--up); }
.v4-money-latest-line strong.negative { color:var(--down); }
.v4-money-latest-line strong.neutral { color:var(--muted); }
.v4-money-latest-line small { margin-left:auto; color:var(--muted); font-size:11px; }
.v4-money-incomplete-note { margin:4px 0 8px; color:var(--muted); font-size:11px; }
.v4-money-detail-chart { position:relative; min-height:210px; height:210px; padding:12px 10px 28px; border:0; border-radius:0; background:transparent; }
.v4-money-bars { display:flex; align-items:flex-end; gap:clamp(2px,.55vw,8px); width:100%; height:100%; border-bottom:1px solid rgba(103,99,151,.25); overflow-x:auto; }
.v4-money-day { display:flex; flex:1 0 20px; min-width:20px; height:100%; flex-direction:column; align-items:center; justify-content:flex-end; gap:4px; }
.v4-money-day .flow-bar { display:block; width:min(30px,100%); min-height:4px; border-radius:5px 5px 2px 2px; cursor:crosshair; }
.v4-money-day .flow-in { background:#d94b69; }
.v4-money-day .flow-out { background:#37a78f; }
.v4-money-day .is-unknown { background:#aaa8b5; opacity:.55; }
.v4-money-day small { color:var(--muted); font-size:9px; white-space:nowrap; }
@media (max-width:760px) { .v4-money-latest-line strong { font-size:20px; } .v4-money-detail-chart { min-height:190px; height:190px; padding-left:4px; padding-right:4px; } .v4-money-day { min-width:18px; } .v4-money-day small { font-size:8px; } }

/* 2026-10-12 requested desktop-only Money subgroup constituent typography. */
@media (min-width: 761px) {
  .subgroup-stock-card .subgroup-stock-link .stock-name { font-size: 17px; font-weight: 800; }
  .subgroup-stock-card .subgroup-stock-link .stock-code { font-size: 15px; font-weight: 700; }
}
/* NitaStock approved Babies result table: real table layout shared by desktop and mobile. */
.baby-result-table-wrap { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.baby-result-table { width:100%; min-width:1160px; border-collapse:collapse; table-layout:fixed; }
.baby-result-table th, .baby-result-table td { box-sizing:border-box; padding:.7rem .55rem; border-bottom:1px solid rgba(100,90,130,.14); text-align:right; vertical-align:middle; white-space:nowrap; }
.baby-result-table th:first-child, .baby-result-table td:first-child { width:42px; text-align:center; }
.baby-result-table th:nth-child(2), .baby-result-table td:nth-child(2) { width:190px; text-align:left; }
.baby-result-table td:nth-child(2) .baby-result-stock-link { width:100%; align-items:flex-start; text-align:left; }
.baby-result-table th:nth-child(3), .baby-result-table td:nth-child(3) { width:90px; text-align:right; }
.baby-result-table th:nth-child(n+3), .baby-result-table td:nth-child(n+3) { width:125px; }
.baby-result-table thead th { font-weight:800; background:rgba(255,255,255,.38); position:sticky; top:0; z-index:2; }
.baby-sort-button { border:0; background:transparent; color:inherit; font:inherit; cursor:pointer; padding:0; white-space:nowrap; }
.baby-select-cell input { width:16px; height:16px; }
.baby-result-stock-link { display:flex; flex-direction:column; align-items:flex-start; border:0; background:transparent; cursor:pointer; text-align:left; font:inherit; padding:0; }
.baby-result-stock-link strong { font-size:1.02rem; line-height:1.25; }
.baby-result-stock-link em { font-style:normal; font-weight:700; color:#6b7280; }
.baby-result-stock-link small { color:#6b7280; margin-top:.12rem; }
@media (max-width:760px) {
  .baby-result-table-wrap { margin-inline:-.25rem; width:calc(100% + .5rem); }
  .baby-result-table { min-width:1160px; }
  .baby-result-table th, .baby-result-table td { padding:.62rem .42rem; }
  .baby-result-stock-link strong { font-size:.98rem; }
}
/* Tile labels are primary content, including desktop; tooltip is secondary only. */

.baby-futures-tag{display:inline-block;margin-left:.28rem;padding:.05rem .28rem;border-radius:.35rem;color:#584e92;background:rgba(110,96,180,.14);font-size:.78em}

/* Final leaderboard typography contract: keep this block last so legacy rules cannot override it. */
.leader-card .leader-head strong { font-size: 18px; }
.leader-card .leader-row .stock-name { font-size: 18px; }
.leader-card .leader-row .stock-code { font-size: 14px; }
.leader-card .leader-row .rank-amount { font-size: 16px; }
.leader-partial-note { font-size: 10px; font-weight: 400; color: rgba(80,80,105,.72); margin-left: 4px; }
@media (max-width: 760px) {
  .leader-card .leader-head strong { font-size: 18px; }
  .leader-card .leader-row .stock-name { font-size: 14px; }
  .leader-card .leader-row .stock-code { font-size: 12px; }
  .leader-card .leader-row .rank-amount { font-size: 12px; }
  .leader-partial-note { font-size: 10px; }
}

/* NitaStock final UI contract: requested field widths, typography and status colors. */
.baby-result-table th:nth-child(2), .baby-result-table td:nth-child(2) { width:150px !important; min-width:150px !important; text-align:left; }
.baby-result-table th:nth-child(3), .baby-result-table td:nth-child(3) { width:60px !important; min-width:60px !important; }
.watchlist-table th:nth-child(1), .watchlist-table td:nth-child(1) { width:160px !important; min-width:160px !important; }
.watchlist-table th:nth-child(2), .watchlist-table td:nth-child(2) { width:80px !important; min-width:80px !important; }
.money-compass-meta { display:block; }
.money-compass-summary-line { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.money-compass-period-line { margin-top:4px; }
.v4-money-detail-title-line { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.v4-money-detail-title-line .v4-money-latest-line { margin:0; flex:0 0 auto; }
.v4-money-detail-title-line .v4-money-latest-line strong { font-size:20px; }
@media (max-width:760px) {
  .insider-table th:nth-child(1), .insider-table td:nth-child(1) { width:70px !important; min-width:70px !important; }
  .insider-table th:nth-child(2), .insider-table td:nth-child(2) { width:110px !important; min-width:110px !important; }
  .v4-money-detail-title-line { align-items:flex-start; gap:6px; }
  .v4-money-detail-title-line h2 { min-width:0; font-size:20px; }
  .v4-money-detail-title-line .v4-money-latest-line { flex-wrap:wrap; justify-content:flex-end; gap:4px; }
  .v4-money-detail-title-line .v4-money-latest-line strong { font-size:17px; }
}
.baby-result-table td:nth-child(3).positive, .watchlist-table td:nth-child(2).positive { color:var(--up) !important; }
.baby-result-table td:nth-child(3).negative, .watchlist-table td:nth-child(2).negative { color:var(--down) !important; }
.baby-result-table td:nth-child(3).neutral, .watchlist-table td:nth-child(2).neutral { color:var(--muted) !important; }
@media (min-width:761px) { .baby-mode-row { padding-block:4px !important; } .baby-mode-toolbar { padding-block:4px !important; } }


/* Sector funds page */
.sector-funds-toolbar { margin: 15px 0 0; padding: 0; }
.sector-funds-mode { display:flex; align-items:center; gap:8px; justify-content:flex-end; }
.sector-funds-mode-label { color:var(--muted); font-size:13px; font-weight:700; margin-right:auto; }
.sector-market-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.sector-funds-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:30px; }
.sector-market-card { border-radius:var(--radius-xl); padding:18px; }
.sector-funds-panel { border-radius:var(--radius-xl); padding:18px 25px; }
.sector-market-card { min-width:0; }
.sector-funds-card-title, .sector-funds-panel .section-heading { display:flex; justify-content:flex-start; align-items:center; gap:12px; }
.sector-funds-card-title h2, .sector-funds-panel h2 { margin:0; font-size:18px; }
.sector-funds-card-title strong { font-size:20px; }
.sector-funds-bars { display:flex; align-items:flex-end; gap:10px; height:94px; margin:17px 0 10px; padding:0 3px 5px; border-bottom:1px solid var(--line); }
.sector-funds-bar { display:block; flex:0 0 20px; width:20px; min-width:20px; max-width:20px; border-radius:4px 4px 1px 1px; background:var(--up); opacity:.92; }
.sector-funds-bar.negative { background:var(--down); }
.sector-funds-bar.unknown { background:#a9aaba; opacity:.4; }
.sector-funds-bar.market-bar { cursor:pointer; outline:none; }
.sector-funds-bar.market-bar:hover, .sector-funds-bar.market-bar:focus-visible { opacity:1; box-shadow:0 0 0 2px rgba(78,70,132,.3); }
.sector-market-tooltip { display:inline-block; margin:0 0 6px 3px; padding:3px 6px; border:1px solid rgba(123,121,184,.35); border-radius:7px; color:var(--ink); background:var(--glass-strong); box-shadow:0 4px 12px -8px rgba(61,53,99,.5); font-size:10px; font-weight:700; line-height:1.2; white-space:nowrap; }
.sector-market-tooltip.positive { border-color:rgba(217,74,103,.38); }
.sector-market-tooltip.negative { border-color:rgba(50,164,125,.38); }
.sector-market-tooltip[hidden] { display:none; }
.sector-market-tooltip .market-tooltip-date { color:var(--muted); }
.sector-market-tooltip .market-tooltip-amount.positive { color:var(--up); }
.sector-market-tooltip .market-tooltip-amount.negative { color:var(--down); }
.sector-market-tooltip .market-tooltip-amount.neutral { color:var(--muted); }
.sector-investors { display:flex; flex-wrap:wrap; gap:8px; }
.sector-investors span { padding:6px 9px; border:1px solid rgba(123,121,184,.28); border-radius:999px; color:var(--muted); font-size:11px; background:var(--glass-strong); box-shadow:inset 0 1px 0 rgba(255,255,255,.8); }
.sector-investors b { margin-left:4px; }
.sector-funds-panel { margin-top:15px; }
.sector-funds-columns { margin-top:10px; }
.v032-institutional-summary { display:flex; flex-direction:column; gap:8px; width:100%; }
.v032-institutional-row { display:flex; align-items:baseline; justify-content:space-between; gap:8px; font-size:14px; }
.v032-institutional-row > span { color:var(--muted); }
.v032-institutional-row > strong { white-space:nowrap; font-size:15px; }
.stock-kpi-grid .v032-sweet-card .v032-institutional-summary { gap:0; }
.stock-kpi-grid .v032-sweet-card .v032-institutional-row { min-height:29px; font-size:inherit; }
.stock-kpi-grid .v032-sweet-card .v032-institutional-row > span { font-size:inherit; }
.stock-kpi-grid .v032-sweet-card .v032-institutional-row > strong { font-size:18px; }
@media (max-width:760px) {
  .stock-kpi-grid .v032-sweet-card .v032-institutional-row { min-height:19px; }
  .stock-kpi-grid .v032-sweet-card .v032-institutional-row > span { font-size:9px; }
  .stock-kpi-grid .v032-sweet-card .v032-institutional-row > strong { font-size:12px; }
}
.sector-funds-rank { min-width:0; }
.sector-funds-rank h3 { margin:8px 0; color:var(--muted); font-size:14px; }
.sector-funds-row { display:grid; grid-template-columns:40% 40% 20%; align-items:center; gap:0; width:100%; min-height:58px; padding:9px 0; border:0; border-bottom:1px solid rgba(117,116,158,.1); color:var(--ink); background:transparent; text-align:left; cursor:pointer; }
.sector-funds-row:hover { background:rgba(255,255,255,.42); }
.sector-funds-row strong { display:block; font-size:13px; }
.sector-funds-row small { display:block; min-height:15px; margin-top:3px; color:var(--muted); font-size:10px; }
.sector-funds-row > span:first-child { text-align:left; }
.sector-funds-row > b { white-space:nowrap; font-size:13px; text-align:right; }
.sector-funds-mini-bars { display:flex; align-items:flex-end; gap:2px; height:30px; }
.sector-funds-mini-bars .sector-funds-bars { height:30px; margin:0; padding:0; border:0; gap:4px; }
.sector-funds-mini-bars .sector-funds-bar { flex:0 0 10px; width:10px; min-width:5px; max-width:10px; border-radius:2px 2px 0 0; }
@media (max-width: 760px) {
  .sector-market-grid { grid-template-columns:1fr; gap:10px; }
  .sector-funds-columns { display:flex; overflow-x:auto; gap:6px; padding-bottom:4px; }
  .sector-funds-rank { flex:0 0 261px; }
  .sector-market-card { padding:14px; border-radius:20px; }
  .sector-funds-panel { padding:14px 3px; border-radius:20px; }
  .sector-funds-panel .section-heading { justify-content:flex-start; text-align:left; }
  .sector-funds-toolbar { padding:0; }
  .sector-funds-mode { justify-content:stretch; gap:4px; }
  .sector-funds-mode .action-button { flex:1; min-width:0; padding:0 6px; }
  .sector-funds-mode-label { font-size:11px; margin-right:2px; }
  .sector-funds-card-title h2 { font-size:15px; }
  .sector-funds-card-title strong { font-size:17px; }
  .sector-funds-row { grid-template-columns:40% 35% minmax(60px,25%); gap:0; }
  .sector-funds-row strong { font-size:12px; }
  .sector-funds-row > b { font-size:12px; text-align:left; }
  .sector-funds-mini-bars .sector-funds-bars { gap:2px; }
  .sector-funds-mini-bars .sector-funds-bar { flex:0 0 4px; width:4px; min-width:4px; max-width:4px; }
}
.sector-funds-row.is-return { grid-template-columns:minmax(0,1fr) auto; }
@media (max-width:760px) { .sector-funds-row.is-return { grid-template-columns:minmax(0,1fr) auto; } }

/* Limit Baby: gradient-only controls and a compact, responsive market-breadth view. */
.limit-baby-page-heading { align-items:center; }
.limit-baby-mode-switch { display:flex; align-items:center; justify-content:flex-end; gap:7px; flex-wrap:wrap; }
.limit-baby-mode-switch .action-button { min-height:34px; padding-inline:13px; }
.limit-baby-overview-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(340px,1fr); gap:15px; align-items:stretch; }
.limit-baby-breadth-card { min-width:0; padding:21px; border-radius:var(--radius-xl); background:linear-gradient(135deg,rgba(255,244,250,.94) 0%,rgba(239,239,255,.91) 57%,rgba(226,250,247,.87) 100%); }
.limit-baby-card-heading, .limit-baby-list-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.limit-baby-card-heading h2, .limit-baby-list-heading h2 { margin:0; color:#57585b; font-size:clamp(20px,2.1vw,27px); }
.limit-baby-card-heading p, .limit-baby-list-heading p { margin:6px 0 0; color:var(--muted); font-size:12px; }
.limit-baby-date { flex:0 0 auto; color:var(--muted); font-size:11px; white-space:nowrap; }
.limit-baby-pie-wrap { display:grid; grid-template-columns:minmax(190px,250px) minmax(160px,1fr); align-items:center; justify-content:center; gap:25px; max-width:620px; margin:22px auto 0; }
.limit-baby-pie { position:relative; isolation:isolate; display:grid; place-items:center; width:min(100%,245px); aspect-ratio:1; margin:auto; border-radius:50%; background:transparent; filter:saturate(1.02); animation:limit-baby-pie-reveal .95s cubic-bezier(.2,.78,.25,1) both; }
.limit-baby-pie::before { content:""; position:absolute; z-index:0; inset:0; border-radius:50%; background:var(--limit-baby-pie); -webkit-mask:radial-gradient(circle at center, transparent 0 54%, #000 54.5% 100%); mask:radial-gradient(circle at center, transparent 0 54%, #000 54.5% 100%); }
.limit-baby-pie::after { content:""; position:absolute; z-index:0; inset:23%; border:1px solid rgba(255,255,255,.82); border-radius:50%; background:transparent; }
.limit-baby-major-lift { position:absolute; z-index:1; inset:-1.5%; border-radius:50%; background:var(--limit-baby-major); -webkit-mask:radial-gradient(circle at center, transparent 0 54%, #000 54.5% 100%); mask:radial-gradient(circle at center, transparent 0 54%, #000 54.5% 100%); transform:translateY(-4px) scale(1.025); filter:drop-shadow(0 6px 4px rgba(76,67,134,.3)); pointer-events:none; }
.limit-baby-pie-center { position:relative; z-index:2; display:grid; place-items:center; gap:3px; }
.limit-baby-pie-center strong { color:#57585b; font-size:clamp(29px,4vw,44px); line-height:1; letter-spacing:-.06em; }
.limit-baby-pie-center span { color:var(--muted); font-size:10px; }
.limit-baby-legend { display:grid; gap:12px; min-width:0; }
.limit-baby-legend span { display:grid; grid-template-columns:10px minmax(0,1fr) auto; align-items:center; gap:7px; color:#57585b; font-size:13px; font-weight:700; }
.limit-baby-legend small { color:var(--muted); font-size:11px; font-weight:600; }
.limit-baby-dot { width:9px; height:9px; border-radius:50%; box-shadow:0 0 0 3px rgba(255,255,255,.62); }
.limit-baby-dot.up, .limit-baby-dot.down, .limit-baby-dot.flat { background:linear-gradient(90deg,#7d76d7 0%,#958de2 42%,#b4a9e9 70%,#dcd7f3 100%); }
.limit-baby-stats-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; align-content:start; }
.limit-baby-stat-card { min-width:0; min-height:127px; display:flex; flex-direction:column; justify-content:space-between; padding:17px 16px 14px; border:1px solid rgba(255,255,255,.83); border-radius:var(--radius-lg); background:linear-gradient(135deg,rgba(255,244,250,.94) 0%,rgba(239,239,255,.91) 57%,rgba(226,250,247,.87) 100%); box-shadow:var(--shadow); }
.limit-baby-stat-card span { color:var(--muted); font-size:12px; font-weight:700; }
.limit-baby-stat-card strong { margin-top:13px; font-size:clamp(25px,3vw,36px); line-height:1; letter-spacing:-.05em; }
.limit-baby-stat-card small { margin-top:8px; color:var(--soft-muted); font-size:10px; }
.limit-baby-stat-card.is-clickable { cursor:pointer; transition:transform .16s ease, box-shadow .16s ease; }
.limit-baby-stat-card.is-clickable:hover, .limit-baby-stat-card.is-clickable:focus-visible { transform:translateY(-2px); box-shadow:0 12px 28px rgba(90,75,135,.18); outline:none; }
.limit-baby-detail-panel { margin-top:16px; overflow:hidden; }
.limit-baby-detail-heading { display:flex; align-items:baseline; gap:18px; margin-left:50px; }
.limit-baby-detail-heading h2 { margin:0; color:#57585b; font-size:clamp(18px,2vw,25px); line-height:1.2; }
.limit-baby-detail-heading span { color:var(--muted); font-size:12px; white-space:nowrap; }
.limit-baby-data-note { margin:0 0 13px; padding:10px 13px; border:1px solid rgba(149,145,255,.21); border-radius:13px; color:var(--muted); background:linear-gradient(110deg,rgba(149,145,255,.1),rgba(252,205,221,.12),rgba(168,233,227,.12)); font-size:11px; line-height:1.55; }
.limit-baby-list-panel { min-width:0; padding:21px; border-radius:var(--radius-xl); }
.limit-baby-groups { display:grid; gap:13px; margin-top:20px; }
.limit-baby-group { min-width:0; padding:14px; border:1px solid rgba(255,255,255,.78); border-radius:18px; background:rgba(255,255,255,.37); }
.limit-baby-group-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding-bottom:10px; border-bottom:1px solid rgba(119,116,169,.14); }
.limit-baby-group-head h2 { margin:0; color:#57585b; font-size:16px; }
.limit-baby-group-head span { color:var(--muted); font-size:11px; }
.limit-baby-stock-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(128px,1fr)); gap:7px; padding-top:11px; }
.limit-baby-stock-card { min-width:0; display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-rows:auto auto; align-items:baseline; gap:2px 7px; padding:9px 10px; border:1px solid rgba(149,145,255,.16); border-radius:12px; color:var(--ink); background:linear-gradient(135deg,rgba(255,244,250,.94) 0%,rgba(239,239,255,.89) 57%,rgba(226,250,247,.82) 100%); text-align:left; cursor:pointer; transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.limit-baby-stock-card:hover,.limit-baby-stock-card:focus-visible { border-color:rgba(149,145,255,.42); box-shadow:0 9px 20px -16px rgba(76,67,134,.8); transform:translateY(-1px); }
.limit-baby-stock-card strong { color:#5f5b9e; font-size:13px; }
.limit-baby-stock-card span { min-width:0; overflow:hidden; color:#57585b; font-size:12px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.limit-baby-stock-card small { grid-column:1 / -1; color:var(--muted); font-size:9px; }
.limit-baby-no-groups { display:grid; place-items:center; gap:7px; min-height:220px; color:var(--muted); text-align:center; }
.limit-baby-no-groups strong { color:#57585b; font-size:17px; }
.limit-baby-no-groups span:last-child { font-size:11px; }
@keyframes limit-baby-pie-reveal { from { opacity:.28; transform:rotate(-90deg) scale(.72); } to { opacity:1; transform:rotate(0deg) scale(1); } }
@media (max-width:760px) {
  .limit-baby-page-heading { align-items:flex-start; flex-direction:column; gap:13px; }
  .limit-baby-mode-switch { width:100%; justify-content:stretch; gap:4px; }
  .limit-baby-mode-switch .action-button { flex:1; min-width:0; padding-inline:7px; font-size:11px; }
  .limit-baby-overview-grid { grid-template-columns:1fr; gap:10px; }
  .limit-baby-breadth-card, .limit-baby-list-panel { padding:15px 13px; border-radius:20px; }
  .limit-baby-card-heading h2, .limit-baby-list-heading h2 { font-size:20px; }
  .limit-baby-card-heading p, .limit-baby-list-heading p { font-size:11px; }
  .limit-baby-pie-wrap { grid-template-columns:minmax(145px,1fr) minmax(125px,1fr); gap:13px; margin-top:17px; }
  .limit-baby-pie { width:min(100%,180px); }
  .limit-baby-pie::after { inset:23%; }
  .limit-baby-legend { gap:9px; }
  .limit-baby-legend span { font-size:11px; }
  .limit-baby-legend small { font-size:10px; }
  .limit-baby-stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .limit-baby-stat-card { min-height:102px; padding:12px 11px 10px; border-radius:16px; }
  .limit-baby-stat-card strong { margin-top:8px; font-size:27px; }
  .limit-baby-stat-card small { margin-top:5px; font-size:9px; }
  .limit-baby-group { padding:10px; border-radius:15px; }
  .limit-baby-group-head h2 { font-size:14px; }
  .limit-baby-stock-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
  .limit-baby-stock-card { padding:8px; }
}
