/* 台股資金地圖 · 一個世界 — the map is the whole page; a slim top bar, a floating panel, and a legend. */
:root {
  color-scheme: dark;
  --bg: #070A0F; --bg-2: #0F151D; --bg-3: #151D27; --bg-4: #1B2531; --line: rgba(148,163,184,.12); --line-2: rgba(148,163,184,.24);
  --fg: #E7ECF2; --fg-2: #A7B3C1; --fg-3: #74808F; --buy: #3DDCCB; --sell: #FFA940; --gold: #F3C65E; --ai: #B59CFF; --up: #FF5A5A; --down: #4BD37B;
  --font-ui: 'IBM Plex Sans', 'Noto Sans TC', -apple-system, 'Segoe UI', 'PingFang TC', 'Microsoft JhengHei', sans-serif; --font-display: 'Noto Serif TC', Georgia, serif; --font-mono: 'IBM Plex Mono', Menlo, Consolas, monospace;
  --panel-full: clamp(440px, 36vw, 620px); --panel-w: var(--panel-full); --top-h: 52px; --nav-h: 56px; /* r31: --panel-full = the panel's own width; --panel-w = the room it takes on the right (only the tab's gutter while it is collapsed) */
}
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: calc(13px * var(--fz, 1))/1.5 var(--font-ui); overflow: hidden; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--buy); outline-offset: 2px; }
.buy-c { color: var(--buy); } .sell-c { color: var(--sell); } .gold-c { color: var(--gold); } .up { color: var(--up); } .down { color: var(--down); }
#app { position: fixed; inset: 0; }
#stage { position: absolute; inset: 0; }
#map { position: absolute; inset: 0; }
.flow-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.maplibregl-map { font-family: var(--font-ui); }
.maplibregl-ctrl-top-right { top: calc(var(--top-h) + 10px) !important; }
.maplibregl-ctrl-attrib { background: rgba(10,14,20,.75) !important; color: var(--fg-3); font-size: calc(10px * var(--fz, 1)); } .maplibregl-ctrl-attrib a { color: var(--fg-2); }
.maplibregl-ctrl-group { background: rgba(15,21,29,.95) !important; border: 1px solid var(--line-2); box-shadow: none !important; } .maplibregl-ctrl-group button { filter: invert(.85); }
/* marker wrappers: MapLibre writes inline opacity/transform on the marker element, so our styles live one level down */
.w-wrap { pointer-events: none; } .w-wrap > * { pointer-events: auto; }
/* company beacons (national + city zoom): a beam whose height is today's net amount, label at the top */
.w-beacon { --c: var(--buy); position: relative; width: 16px; height: var(--h); border: 0; padding: 0; cursor: pointer; }
.w-beacon.sell { --c: var(--sell); } .w-beacon.on { --c: #fff; }
.w-beacon .beam { position: absolute; left: 7px; bottom: 5px; width: 2px; height: calc(var(--h) - 5px); background: linear-gradient(to top, var(--c), color-mix(in srgb, var(--c) 35%, transparent) 70%, transparent); }
.w-beacon.story .beam { width: 3px; left: 6.5px; box-shadow: 0 0 10px var(--c); }
.w-beacon i { position: absolute; left: 3px; bottom: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 16px var(--c), 0 0 3px #fff inset; }
.w-beacon.story i { width: 12px; height: 12px; left: 2px; bottom: -1px; }
.w-beacon b, .w-beacon small { position: absolute; left: 14px; white-space: nowrap; text-shadow: 0 1px 2px #000, 0 0 8px #000; text-align: left; }
.w-beacon b { bottom: calc(var(--h) - 9px); font-size: calc(12.5px * var(--fz, 1)); font-weight: 600; color: #fff; }
.w-beacon small { bottom: calc(var(--h) - 24px); font: calc(11px * var(--fz, 1)) var(--font-mono); color: var(--c); }
.w-beacon.left b, .w-beacon.left small { left: auto; right: 14px; text-align: right; }
.w-beacon:hover b { text-decoration: underline; text-underline-offset: 3px; }
/* street labels on top of buildings */
.w-label { --c: var(--fg-2); position: relative; display: inline-flex; align-items: baseline; gap: 7px; padding: 3px 9px; border-radius: 7px; background: rgba(10,14,20,.86); border: 1px solid var(--line-2); white-space: nowrap; font-size: calc(12px * var(--fz, 1)); color: var(--fg); cursor: pointer; }
.w-label.buy { --c: var(--buy); } .w-label.sell { --c: var(--sell); } .w-label.geo { border-color: rgba(243,198,94,.7); } .w-label.on { border-color: #fff; background: rgba(20,27,36,.96); }
.w-label.branch { font-size: calc(10.5px * var(--fz, 1)); padding: 2px 7px; color: var(--fg-2); } .w-label.branch.geo::before { content: '地緣'; font-size: calc(9.5px * var(--fz, 1)); color: var(--gold); border: 1px solid rgba(243,198,94,.7); border-radius: 3px; padding: 0 3px; margin-right: 2px; }
.w-label b { font-weight: 600; } .w-label small { font: calc(11px * var(--fz, 1)) var(--font-mono); color: var(--c); }
.w-label::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: 7px; background: var(--line-2); }
.w-zoomed .w-city { opacity: 0; pointer-events: none; }
/* city nodes */
.w-city { position: relative; width: var(--r); height: var(--r); border-radius: 50%; border: 0; padding: 0; cursor: pointer; transition: opacity .3s; }
.w-city i { position: absolute; inset: 0; border-radius: 50%; background: var(--g); opacity: .28; box-shadow: 0 0 22px var(--g); }
.w-city::before { content: ''; position: absolute; inset: 32%; border-radius: 50%; background: var(--g); opacity: .95; border: 2px solid rgba(10,14,20,.9); }
.w-city b, .w-city small { position: absolute; left: calc(100% + 6px); white-space: nowrap; text-shadow: 0 1px 2px #000, 0 0 6px #000; }
.w-city.left b, .w-city.left small { left: auto; right: calc(100% + 6px); text-align: right; }
.w-city b { top: calc(50% - 15px); font-size: calc(12.5px * var(--fz, 1)); } .w-city small { top: calc(50% + 1px); font: calc(11px * var(--fz, 1)) var(--font-mono); color: var(--fg-2); }
.w-city.buy small { color: var(--buy); } .w-city.sell small { color: var(--sell); }
.w-city.on::before { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.5); }
/* top bar */
#topbar { position: absolute; top: 0; left: 0; right: 0; height: calc(var(--top-h) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 14px 0; display: flex; align-items: center; gap: 10px; background: linear-gradient(to bottom, rgba(7,10,15,.94), rgba(7,10,15,.55)); z-index: 20; }
.brand { display: flex; flex-direction: column; line-height: 1.1; margin-right: 4px; } .brand b { font-size: calc(15px * var(--fz, 1)); letter-spacing: .02em; white-space: nowrap; } .brand span { font-size: calc(9.5px * var(--fz, 1)); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.date-chip { font-family: var(--font-mono); font-size: calc(12.5px * var(--fz, 1)); padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: rgba(15,21,29,.9); white-space: nowrap; } .date-chip .short, .icon-btn .short { display: none; }
.demo { font-size: calc(10px * var(--fz, 1)); letter-spacing: .1em; font-weight: 600; color: var(--gold); border: 1px solid rgba(243,198,94,.55); border-radius: 4px; padding: 2px 6px; }
.search { position: relative; flex: 1 1 auto; max-width: 420px; min-width: 0; }
.search > svg { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--fg-3); pointer-events: none; }
.search input { width: 100%; height: 34px; background: rgba(15,21,29,.92); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px 0 32px; color: var(--fg); font: calc(13px * var(--fz, 1)) var(--font-ui); }
.search input::placeholder { color: var(--fg-3); } .search input:focus { border-color: var(--buy); outline: none; }
.search-results { position: absolute; top: 40px; left: 0; right: 0; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 34px rgba(0,0,0,.45); max-height: 380px; overflow-y: auto; padding: 6px; z-index: 40; }
.sr { width: 100%; display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; text-align: left; } .sr:hover, .sr.active { background: var(--bg-3); }
.sr .kind { font-size: calc(10px * var(--fz, 1)); letter-spacing: .06em; color: var(--fg-3); border: 1px solid var(--line-2); border-radius: 4px; text-align: center; padding: 1px 0; } .sr .lab { font-weight: 500; } .sr .sub { color: var(--fg-3); font-size: calc(11px * var(--fz, 1)); }
.sr-empty { padding: 12px; color: var(--fg-3); font-size: calc(12px * var(--fz, 1)); }
.spacer { flex: 1; }
.icon-btn { height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--fg-2); font-size: calc(12px * var(--fz, 1)); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; background: rgba(15,21,29,.85); text-decoration: none; }
.icon-btn:hover { background: var(--bg-3); color: var(--fg); } .icon-btn.primary { background: rgba(61,220,203,.16); color: var(--buy); border-color: rgba(61,220,203,.45); }
#mode-chip { position: absolute; left: 14px; top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 10px); z-index: 10; font: 500 calc(10.5px * var(--fz, 1)) var(--font-mono); letter-spacing: .06em; color: var(--fg-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 3px 7px; background: rgba(7,10,15,.8); }
#mode-chip.ok { color: var(--buy); border-color: rgba(61,220,203,.45); }
#hint { position: absolute; left: 14px; top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 38px); z-index: 10; font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); background: rgba(7,10,15,.8); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; max-width: 360px; }
#hint b { color: var(--fg); }
/* panel */
#panel { position: absolute; right: 14px; top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 12px); bottom: 64px; width: var(--panel-full); background: rgba(15,21,29,.95); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; z-index: 10; }
.tabs { display: flex; gap: 4px; padding: 8px 10px 0; flex: none; } .tabs button { flex: 1; height: 32px; border-radius: 8px; font-size: calc(12.5px * var(--fz, 1)); color: var(--fg-2); } .tabs button.active { background: rgba(61,220,203,.14); color: var(--buy); }
#panel-scroll { overflow-y: auto; padding: 10px 14px 18px; scrollbar-width: thin; min-height: 0; }
body[data-tab="today"] .sec[data-tab]:not([data-tab="today"]), body[data-tab="rank"] .sec[data-tab]:not([data-tab="rank"]), body[data-tab="table"] .sec[data-tab]:not([data-tab="table"]) { display: none; }
body[data-tab="sel"] #panel-body { display: none; } body:not([data-tab="sel"]) #sel-body { display: none; }
.sec { padding-block: 12px; border-top: 1px solid var(--line); } .sec:first-child { border-top: 0; padding-top: 4px; }
.sec h2 { margin: 0 0 8px; font-size: calc(13.5px * var(--fz, 1)); font-weight: 600; display: flex; gap: 8px; align-items: baseline; } .sec h2 small, h4 small { font-weight: 400; color: var(--fg-3); font-size: calc(11px * var(--fz, 1)); }
.eyebrow { font: 500 calc(11px * var(--fz, 1)) var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.display { font-family: var(--font-display); font-weight: 700; font-size: calc(24px * var(--fz, 1)); line-height: 1.25; margin: 4px 0 6px; }
.lede { margin: 0 0 8px; color: var(--fg-2); font-size: calc(12.5px * var(--fz, 1)); }
.hooks { display: flex; flex-wrap: wrap; gap: 6px; } .hook { font-size: calc(12px * var(--fz, 1)); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-2); background: var(--bg-3); } .hook:hover { color: var(--fg); border-color: var(--buy); }
.ev { width: 100%; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 9px; border-radius: 10px; border: 1px solid transparent; text-align: left; align-items: start; }
.ev:hover { background: var(--bg-3); border-color: var(--line); } .ev.top { background: linear-gradient(135deg, rgba(243,198,94,.1), transparent 60%); border-color: rgba(243,198,94,.3); }
.ev-emoji { font-size: calc(18px * var(--fz, 1)); text-align: center; } .ev-title, .ev-detail { display: block; } .ev-title { font-weight: 500; font-size: calc(13px * var(--fz, 1)); line-height: 1.4; } .ev-detail { color: var(--fg-2); font-size: calc(11.5px * var(--fz, 1)); margin-top: 2px; }
.ev-meta { display: flex; gap: 6px; margin-top: 5px; align-items: center; } .tag { font-size: calc(10.5px * var(--fz, 1)); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--fg-2); } .imp { font-size: calc(10.5px * var(--fz, 1)); color: var(--fg-3); font-family: var(--font-mono); }
.row { width: 100%; display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; padding: 5px 4px; border-radius: 6px; text-align: left; }
.row:hover, .row.active { background: var(--bg-3); } .row .n { color: var(--fg-3); font-family: var(--font-mono); font-size: calc(11px * var(--fz, 1)); } .row .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.row .lab { font-size: calc(12.5px * var(--fz, 1)); min-width: 0; } .row .sub { display: block; font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); } .row .val { font-family: var(--font-mono); font-size: calc(12.5px * var(--fz, 1)); font-variant-numeric: tabular-nums; }
.badge { font-style: normal; font-size: calc(10px * var(--fz, 1)); padding: 1px 5px; border-radius: 4px; border: 1px solid; margin-left: 4px; vertical-align: 1px; } .badge.geo { color: var(--gold); border-color: rgba(243,198,94,.6); } .badge.gold { color: var(--gold); border-color: var(--gold); background: rgba(243,198,94,.12); }
.rk { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 10px; } .rk-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; } .rk-head h3 { margin: 0; font-size: calc(13px * var(--fz, 1)); font-weight: 600; } .rk-head h3 small { font-weight: 400; color: var(--fg-3); font-size: calc(11px * var(--fz, 1)); margin-left: 4px; }
.rk-empty { color: var(--fg-3); font-size: calc(12px * var(--fz, 1)); padding: 4px; }
.wx { width: 100%; display: grid; grid-template-columns: 76px 1fr 72px 76px; align-items: center; gap: 8px; height: 30px; padding: 0 6px; border-radius: 6px; text-align: left; } .wx:hover { background: var(--bg-3); }
.wx-name { font-size: calc(12.5px * var(--fz, 1)); font-weight: 500; } .wx-bar { position: relative; height: 6px; background: var(--bg-4); border-radius: 3px; overflow: hidden; } .wx-bar::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-2); }
.wx-bar i { position: absolute; top: 0; height: 100%; border-radius: 3px; background: var(--buy); } .wx-bar i.neg { background: var(--sell); } .wx-val { font-family: var(--font-mono); font-size: calc(12px * var(--fz, 1)); text-align: right; } .wx-state { font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); text-align: right; }
.wx.hot .wx-state, .wx.warm .wx-state { color: var(--buy); } .wx.cool .wx-state, .wx.cold .wx-state { color: var(--sell); }
.cred { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px; margin-top: 8px; } .cred b { color: var(--fg-2); font-weight: 500; }
.empty { color: var(--fg-2); font-size: calc(12.5px * var(--fz, 1)); padding-top: 6px; } .hint { color: var(--fg-3); font-size: calc(11.5px * var(--fz, 1)); }
.card + .card { margin-top: 12px; } .card h3 { margin: 4px 0 8px; font-size: calc(16px * var(--fz, 1)); } .card h4 { margin: 12px 0 6px; font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); font-weight: 500; }
.price-line { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 8px; } .price-line .px { font-family: var(--font-mono); font-size: calc(22px * var(--fz, 1)); font-weight: 500; } .price-line .chg { font-family: var(--font-mono); font-size: calc(12.5px * var(--fz, 1)); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .kpi { background: var(--bg-3); border-radius: 10px; padding: 8px 10px; } .kpi .k { font-size: calc(10.5px * var(--fz, 1)); color: var(--fg-3); } .kpi .v { font-family: var(--font-mono); font-size: calc(15px * var(--fz, 1)); font-weight: 500; margin-top: 2px; } .kpi .d { font-size: calc(10.5px * var(--fz, 1)); color: var(--fg-3); }
.lst { display: flex; flex-direction: column; gap: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; } .chip { font-size: calc(11.5px * var(--fz, 1)); padding: 3px 8px; border-radius: 6px; background: var(--bg-4); color: var(--fg-2); } .chip.buy { color: var(--buy); } .chip.sell { color: var(--sell); } .chip.on { outline: 1px solid var(--fg-2); }
.ai { border-left: 3px solid var(--ai); background: rgba(181,156,255,.07); padding: 8px 12px; border-radius: 0 10px 10px 0; margin-top: 12px; font-size: calc(12px * var(--fz, 1)); }
.ai-agent { font: 500 calc(11px * var(--fz, 1)) var(--font-mono); letter-spacing: .08em; color: var(--ai); margin-bottom: 4px; } .ai ul { margin: 0 0 6px; padding-left: 16px; color: var(--fg-2); } .ai p { margin: 0 0 4px; } .ai .caution { font-size: calc(10.5px * var(--fz, 1)); color: var(--fg-3); }
.btn { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--fg-2); font-size: calc(12px * var(--fz, 1)); text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--bg-3); color: var(--fg); } .btn.primary { background: rgba(61,220,203,.14); color: var(--buy); border-color: rgba(61,220,203,.45); } .btn.gold { background: rgba(243,198,94,.12); color: var(--gold); border-color: rgba(243,198,94,.5); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
table.flows { width: 100%; border-collapse: collapse; font-size: calc(11.5px * var(--fz, 1)); font-variant-numeric: tabular-nums; } table.flows th, table.flows td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; } table.flows th { color: var(--fg-3); font-weight: 500; cursor: pointer; } table.flows th.on { color: var(--buy); } table.flows td:first-child, table.flows th:first-child, table.flows td:nth-child(2), table.flows th:nth-child(2) { text-align: left; } table.flows td.mono { font-family: var(--font-mono); } table.flows tr { cursor: pointer; } table.flows tr:hover td { background: var(--bg-3); }
.meme { display: inline-block; font-size: calc(10px * var(--fz, 1)); font-weight: 600; letter-spacing: .04em; color: var(--gold); border: 1px solid rgba(243,198,94,.55); border-radius: 4px; padding: 0 5px; vertical-align: 1px; background: rgba(243,198,94,.08); }
.meme.big { font-size: calc(11.5px * var(--fz, 1)); padding: 2px 8px; margin-bottom: 6px; }
.headline { width: 100%; text-align: left; padding: 10px 12px 8px; border-radius: 12px; border: 1px solid rgba(243,198,94,.25); background: linear-gradient(135deg, rgba(243,198,94,.1), rgba(61,220,203,.05) 70%); margin: 8px 0 10px; }
.headline:hover { border-color: rgba(243,198,94,.6); } .headline .display { margin: 2px 0 6px; font-size: calc(21px * var(--fz, 1)); } .headline .lede { margin: 0; }
.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.award { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-3); text-align: left; min-width: 0; }
.award:hover { border-color: var(--line-2); background: var(--bg-4); }
.aw-emoji { font-size: calc(18px * var(--fz, 1)); } .aw-title { font: 500 calc(10.5px * var(--fz, 1)) var(--font-mono); letter-spacing: .08em; color: var(--fg-3); text-transform: uppercase; } .aw-label { font-size: calc(12.5px * var(--fz, 1)); font-weight: 500; line-height: 1.3; } .aw-value { font-family: var(--font-mono); font-size: calc(12px * var(--fz, 1)); }
.row.fu .n { font-size: calc(13px * var(--fz, 1)); }
.sec.my { border: 1px solid rgba(243,198,94,.3); border-radius: 12px; padding: 10px 12px; margin-top: 10px; background: rgba(243,198,94,.04); }
.record { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: calc(12.5px * var(--fz, 1)); } .record b { color: var(--gold); font-weight: 600; } .record .hint { flex-basis: 100%; }
.star { float: right; font-size: calc(11px * var(--fz, 1)); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-2); margin-top: 2px; } .star.on { color: var(--gold); border-color: rgba(243,198,94,.6); background: rgba(243,198,94,.1); }
.habit { margin: 0 0 6px; font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); }
.pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 10px; font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); }
.pick { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); background: var(--bg-3); }
.pick.buy.on { color: var(--buy); border-color: var(--buy); background: rgba(61,220,203,.14); } .pick.sell.on { color: var(--sell); border-color: var(--sell); background: rgba(255,169,64,.14); } .pick:hover { color: var(--fg); }
.pick-row .hint { flex-basis: 100%; }
.pick-row .door { flex-basis: 100%; font-family: var(--font-mono); font-size: calc(11.5px * var(--fz, 1)); color: var(--fg-2); } .pick-row .door:empty { display: none; }
/* r9 全站站隊：面板區塊 ＋ 門口人數牌 */
.sec.crowd { border: 1px solid rgba(61,220,203,.25); border-radius: 12px; padding: 10px 12px; margin-top: 10px; background: rgba(61,220,203,.04); }
.sec.crowd .record b { color: var(--buy); } .sec.crowd .record em { font-style: normal; font-family: var(--font-mono); } .sec.crowd .hint { margin: 8px 0 0; }
.w-label.crowd { font-size: calc(11px * var(--fz, 1)); padding: 2px 7px; gap: 6px; border-color: rgba(61,220,203,.45); } .w-label.crowd b { font-family: var(--font-mono); font-weight: 600; color: var(--buy); } .w-label.crowd small { color: var(--sell); } .w-label.crowd.sell { border-color: rgba(255,169,64,.5); }
a.ext { color: var(--buy); text-decoration: none; } a.ext:hover { text-decoration: underline; }
.ev-title .meme { margin-right: 2px; }
.sec.top { padding-top: 2px; }
.kpis3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 8px; } .kpis3 .kpi { padding: 7px 9px; } .kpis3 .kpi .v { font-size: calc(14px * var(--fz, 1)); } .kpis3 .kpi .k { font-size: calc(10px * var(--fz, 1)); }
.secnav { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 2px; }
.secnav button { font-size: calc(11.5px * var(--fz, 1)); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-2); background: var(--bg-3); } .secnav button:hover { color: var(--fg); border-color: var(--buy); }
details.sec > summary { list-style: none; cursor: pointer; } details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary h2 { margin: 0; } details.sec[open] > summary h2 { margin-bottom: 8px; }
details.sec > summary h2::after { content: '▾'; margin-left: auto; color: var(--fg-3); font-size: calc(12px * var(--fz, 1)); } details.sec:not([open]) > summary h2::after { content: '▸'; }
.more-btn { margin-top: 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .col-h { font-size: calc(11px * var(--fz, 1)); font-weight: 600; margin: 0 0 4px 4px; letter-spacing: .02em; }
.price-line a.ext { margin-left: auto; font-size: calc(11.5px * var(--fz, 1)); }
.card .kpi .d { line-height: 1.35; margin-top: 2px; }
/* legend */
#legend { position: absolute; left: 14px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: calc(11.5px * var(--fz, 1)); color: var(--fg-2); background: rgba(15,21,29,.9); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; z-index: 10; max-width: calc(100% - var(--panel-w) - 60px); }
.lg { display: inline-flex; align-items: center; gap: 6px; } .lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; } .lg i.strip { width: 14px; height: 3px; background: var(--gold); } .lg i.line { width: 14px; height: 3px; }
button.lg.on { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
#tooltip { position: absolute; z-index: 30; pointer-events: none; background: rgba(15,21,29,.96); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); max-width: 260px; } #tooltip b { color: var(--fg); }
#toasts { position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 40; pointer-events: none; }
.toast { background: rgba(15,21,29,.97); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 14px; font-size: calc(12.5px * var(--fz, 1)); transition: opacity .4s; max-width: 80vw; }
#modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5,8,12,.72); }
#modal .card { width: min(880px, 100%); max-height: calc(100% - 32px); overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 20px 22px; font-size: calc(13px * var(--fz, 1)); position: relative; }
#modal .card p { color: var(--fg-2); }
.modal-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--fg-2); }
.share { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; } .share img { max-width: 100%; max-height: 66vh; border-radius: 8px; border: 1px solid var(--line); display: block; margin: 0 auto; }
textarea.caption { width: 100%; min-height: 120px; resize: vertical; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 8px; color: var(--fg); font: calc(12px * var(--fz, 1))/1.5 var(--font-ui); padding: 8px 10px; }
#bottomnav { display: none; }
@media (max-width: 1180px) { :root { --panel-full: clamp(360px, 38vw, 440px); } } /* r34: 1280 → 461, 1440 → 518, 1600 → 576, ≥1723 → 620 px (was 430／460／360) */
@media (max-width: 860px) {
  :root { --panel-full: 100%; }
  .brand span, #night-btn, .search, #hint { display: none; }
  #topbar { gap: 6px; padding-inline: 10px; } .brand b { font-size: calc(14px * var(--fz, 1)); } .date-chip { font-size: calc(11.5px * var(--fz, 1)); padding: 5px 7px; } .date-chip .long, .date-chip .suffix, .icon-btn .long { display: none; } .date-chip .short, .icon-btn .short { display: inline; } .icon-btn { padding: 0 8px; }
  #mode-chip { display: none; }
  #panel { left: 0; right: 0; top: auto; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); width: 100%; height: 58vh; border-radius: 16px 16px 0 0; transform: translateY(calc(100% + var(--nav-h))); transition: transform .3s; z-index: 30; }
  body[data-nav="panel"] #panel { transform: translateY(0); }
  #legend { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 8px); left: 8px; right: 8px; max-width: none; font-size: calc(10.5px * var(--fz, 1)); gap: 4px 8px; padding: 6px 8px; }
  .maplibregl-ctrl-top-right { display: none; }
  #bottomnav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: rgba(10,14,20,.97); border-top: 1px solid var(--line); z-index: 40; }
  #bottomnav button { font-size: calc(11.5px * var(--fz, 1)); color: var(--fg-3); } #bottomnav button.active { color: var(--buy); }
  #toasts { bottom: calc(var(--nav-h) + 70px); } .share { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* r12: industry chip bar (under the top bar), daily % change, news */
#indbar { position: absolute; top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 8px); left: 14px; right: calc(var(--panel-w) + 28px); display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; z-index: 11; padding: 2px 0; }
#indbar::-webkit-scrollbar { display: none; }
.ich-l { font: 500 calc(10.5px * var(--fz, 1)) var(--font-mono); letter-spacing: .08em; color: var(--fg-3); flex: none; }
.ich { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(15,21,29,.88); color: var(--fg-2); font-size: calc(12px * var(--fz, 1)); white-space: nowrap; }
.ich i { width: 8px; height: 8px; border-radius: 2px; } .ich:hover { color: var(--fg); border-color: var(--fg-3); } .ich.on { color: var(--fg); border-color: var(--buy); background: rgba(61,220,203,.14); }
#mode-chip { top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 44px); } #hint { top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 72px); }
.indsq { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.w-beacon b u { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--ic); margin-right: 5px; vertical-align: 1px; text-decoration: none; }
.pc { font-style: normal; font-family: var(--font-mono); margin-left: 4px; } .pc.up { color: var(--up); } .pc.dn { color: var(--down); }
.w-label .pc { font-size: calc(11px * var(--fz, 1)); }
.w-beacon.news b::after { content: ' 📰'; }
.w-label.news { border-color: rgba(243,198,94,.75); background: rgba(20,24,30,.94); max-width: 280px; white-space: normal; font-size: calc(11.5px * var(--fz, 1)); line-height: 1.35; }
.row.mv .n { width: 58px; font-size: calc(11.5px * var(--fz, 1)); } .row.mv { grid-template-columns: 58px 1fr auto; } .row .nh { display: block; font-size: calc(11px * var(--fz, 1)); color: var(--fg-2); margin-top: 1px; }
.newsl { display: flex; flex-direction: column; gap: 6px; }
.nr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; font-size: calc(12px * var(--fz, 1)); line-height: 1.4; } .nr .nt { color: var(--fg-3); font: calc(11px * var(--fz, 1)) var(--font-mono); padding-top: 1px; white-space: nowrap; min-width: 11ch; }  /* r47 日期欄不寫死 px：r34 把 --fz 調成 1.15（1.1 手機）之後，「10/19 23:59」在 82px／70px 裡裝不下，nowrap 的字就溢出欄位壓到標題（使用者 10-19）。auto 跟著內容長，min-width 11ch（最長的日期、用 .nt 自己的等寬字量）讓每一列對齊；第二欄 minmax(0,1fr) 是不讓 360px 手機橫向捲動 */
.nr a { color: var(--fg); text-decoration: none; } .nr a:hover { text-decoration: underline; text-underline-offset: 3px; }
.nr .nb { font-style: normal; font-size: calc(10px * var(--fz, 1)); color: var(--fg-3); border: 1px solid var(--line-2); border-radius: 3px; padding: 0 4px; white-space: nowrap; }
@media (max-width: 860px) { #indbar { left: 8px; right: 8px; top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 4px); } }
.w-beacon.boom b::before { content: '🎆'; margin-right: 3px; } .w-beacon.rain b::before { content: '🌧'; margin-right: 3px; }
/* r13: labels above effects; counterparty pins */
.maplibregl-marker { z-index: 3; }
#edgepins { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.epin { position: absolute; left: 0; top: 0; pointer-events: auto; display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 9px 3px 9px; border-radius: 7px; border: 1px solid var(--line-2); background: rgba(10,14,20,.9); color: var(--fg); font-size: calc(11.5px * var(--fz, 1)); white-space: nowrap; translate: -50% -130%; cursor: pointer; }
.epin.buy { border-color: rgba(61,220,203,.65); } .epin.sell { border-color: rgba(255,169,64,.65); }
.epin b { font-weight: 600; } .epin small { font: calc(11px * var(--fz, 1)) var(--font-mono); } .epin.buy small { color: var(--buy); } .epin.sell small { color: var(--sell); }
.epin i { position: absolute; width: 8px; height: 8px; background: inherit; border: inherit; border-width: 0 1px 1px 0; transform: rotate(45deg); left: calc(50% - 4px); bottom: -5px; }
.epin[data-edge="t"] { translate: -50% 30%; } .epin[data-edge="t"] i { bottom: auto; top: -5px; transform: rotate(-135deg); }
.epin[data-edge="b"] { translate: -50% -130%; }
.epin[data-edge="l"] { translate: 0 -50%; } .epin[data-edge="l"] i { left: -5px; bottom: calc(50% - 4px); transform: rotate(135deg); }
.epin[data-edge="r"] { translate: -100% -50%; } .epin[data-edge="r"] i { left: auto; right: -5px; bottom: calc(50% - 4px); transform: rotate(-45deg); }
/* r13: tone, counterparty labels, industry view */
.w-label.news.bad { border-color: rgba(255,122,61,.85); } .w-label.news.good { border-color: rgba(47,191,113,.85); }
.w-beacon.news.bad b::after { content: '☄️'; margin-left: 3px; } .w-beacon.news.good b::after { content: '💸'; margin-left: 3px; }
.w-label.branch.cp { font-size: calc(11.5px * var(--fz, 1)); color: var(--fg); padding: 3px 9px; } .w-label.branch.cp.buy { border-color: rgba(61,220,203,.75); } .w-label.branch.cp.sell { border-color: rgba(255,169,64,.75); }
.w-label.branch.cp small { font-family: var(--font-mono); } .w-label.branch.cp.buy small { color: var(--buy); } .w-label.branch.cp.sell small { color: var(--sell); }
.w-label.stock.cp { box-shadow: 0 0 0 2px rgba(61,220,203,.25); }
.w-ind .w-beacon b { font-size: calc(12.5px * var(--fz, 1)); } .w-ind .w-beacon { --h: calc(var(--h) + 0px); }
/* r13: tone chips, brand CTA */
:root { --accent: #1f6feb; }
.tone { font-style: normal; font-size: calc(10px * var(--fz, 1)); border-radius: 3px; padding: 0 4px; white-space: nowrap; margin-left: 4px; }
.tone.good { color: #3ED488; border: 1px solid rgba(62,212,136,.6); } .tone.bad { color: #FF8A5B; border: 1px solid rgba(255,138,91,.6); }
.icon-btn.cta, .btn.cta { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 0 14px rgba(31,111,235,.45); }
.icon-btn.cta:hover, .btn.cta:hover { background: #3b82f6; color: #fff; }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 2px; font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); }
@media (max-width: 860px) { #night-btn { display: none; } .icon-btn.cta { padding: 0 8px; } }
/* r13: crowded beacons keep only the beam; phone legend is one scrolling strip */
.w-beacon.nolabel b, .w-beacon.nolabel small { display: none; }
@media (max-width: 860px) { #legend { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; } #legend::-webkit-scrollbar { display: none; } #legend .lg { flex: none; } }
/* r14: filters, legend card, back button, panel wrapping, market data */
#indbar { gap: 8px; overflow: visible; }
.dd { position: relative; display: inline-flex; align-items: center; flex: none; }
.ddb { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(15,21,29,.9); color: var(--fg-2); font-size: calc(12px * var(--fz, 1)); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ddb.on { color: var(--fg); border-color: rgba(61,220,203,.55); background: rgba(61,220,203,.1); } .ddb .car { font-size: calc(10px * var(--fz, 1)); color: var(--fg-3); } .ddb .indsq { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 2px; }
.ddx { height: 28px; width: 24px; margin-left: -6px; border-radius: 0 999px 999px 0; border: 1px solid var(--line-2); border-left: 0; background: rgba(15,21,29,.9); color: var(--fg-3); font-size: calc(14px * var(--fz, 1)); } .ddx:hover { color: var(--fg); }
.ddm { position: absolute; top: 34px; left: 0; z-index: 40; min-width: 240px; max-width: 320px; max-height: min(60vh, 460px); overflow: auto; background: rgba(12,17,24,.98); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.ddi { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; border-radius: 8px; text-align: left; font-size: calc(12.5px * var(--fz, 1)); color: var(--fg-2); }
.ddi:hover { background: var(--bg-3); color: var(--fg); } .ddi.on { color: var(--fg); background: rgba(61,220,203,.1); } .ddi small { color: var(--fg-3); margin-left: 6px; font-size: calc(10.5px * var(--fz, 1)); } .ddi .indsq { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; } .ddi .val { font-family: var(--font-mono); font-size: calc(11.5px * var(--fz, 1)); }
.ddq { width: calc(100% - 4px); margin: 2px 2px 6px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg); padding: 0 10px; font: calc(12.5px * var(--fz, 1)) var(--font-ui); }
.ddn { font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); white-space: nowrap; }
#legend-btn { position: absolute; left: 14px; bottom: 14px; z-index: 11; height: 30px; } #legend-btn.on { color: var(--fg); border-color: rgba(61,220,203,.55); }
#legend { display: none; left: 14px; bottom: 52px; right: auto; max-width: 320px; max-height: min(62vh, 520px); overflow: auto; flex-direction: column; gap: 4px; padding: 10px 12px 12px; z-index: 11; }
body[data-legend="1"] #legend { display: flex; }
#legend .lgh { font: 500 calc(10.5px * var(--fz, 1)) var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); margin: 6px 0 2px; } #legend .lgh:first-child { margin-top: 0; }
#legend .lgr { display: flex; flex-wrap: wrap; gap: 4px 12px; } #legend .lgp { font-size: calc(12px * var(--fz, 1)); line-height: 1.45; color: var(--fg-2); } #legend .lgp b { color: var(--fg); }
.back { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; margin: 0 0 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--fg-2); font-size: calc(12px * var(--fz, 1)); } .back:hover { color: var(--fg); }
.addr { font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); margin: -2px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-block; white-space: nowrap; }
h4 small { display: block; font-weight: 400; font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); line-height: 1.35; margin-top: 2px; }
.nr .nt { font-size: calc(10.5px * var(--fz, 1)); } .nr .nb, .nr .tone { display: inline-block; margin-top: 3px; }  /* r47：欄寬和 nowrap 改到上面那一條（這條其實不在 @media 裡，所以是全域生效的） */
.two .row .lab { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .two .row { grid-template-columns: 14px 1fr auto; gap: 6px; }
.kpi .d { font-size: calc(10.5px * var(--fz, 1)); line-height: 1.35; } .kpi .v { font-size: calc(15px * var(--fz, 1)); }
.pick-row .hint { flex-basis: 100%; }
.mkt { margin: 2px 0 8px; } .mk { background: var(--bg-3); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; } .mk-h { font-size: calc(12.5px * var(--fz, 1)); font-weight: 600; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; } .mk-h small { font-weight: 400; font-size: calc(10.5px * var(--fz, 1)); color: var(--fg-3); }
.ohlc { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); margin: 4px 0 2px; } .ohlc b { color: var(--fg); font-family: var(--font-mono); font-weight: 500; } .ohlc .up { color: var(--up); } .ohlc .dn, .ohlc .down { color: var(--down); }
canvas.kl { display: block; width: 100%; height: 150px; margin-top: 4px; }
/* r48 走勢圖的指標圖例＝可以按的小籌（MA5／MA20／MA60／布林）。說明收在頂列的「?」裡（r34 瘦身規則）。 */
.kl-lg { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 5px 0 1px; }
.kl-lg .kl-c { display: inline-flex; align-items: center; gap: 4px; font-size: calc(10.5px * var(--fz, 1)); line-height: 1; padding: 3px 7px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--fg-3); background: transparent; }
.kl-lg .kl-c i { width: 12px; height: 2px; border-radius: 2px; opacity: .45; flex: none; }
.kl-lg .kl-c.on { color: var(--fg); border-color: var(--line-2); background: var(--bg-4); }
.kl-lg .kl-c.on i { opacity: 1; }
.kl-lg .kl-c.na { opacity: .5; cursor: default; }
.kl-lg .kl-c em { font-style: normal; color: var(--fg-3); font-size: calc(9.5px * var(--fz, 1)); }
.kl-lg .kl-c:not(.na):hover { color: var(--fg); border-color: var(--buy); } .mk-src { font-size: calc(10px * var(--fz, 1)); color: var(--fg-3); margin-top: 2px; }
.mk .kpis { margin-top: 6px; } .mk .kpi { background: var(--bg-4); } .mk a.ext { display: inline-block; margin-top: 6px; font-size: calc(11.5px * var(--fz, 1)); }
.mk.lock p { margin: 4px 0 8px; font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); line-height: 1.45; } .mk.lock .btn.cta { height: 30px; }
@media (max-width: 860px) { #legend-btn { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 10px); } #legend { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 48px); left: 8px; right: 8px; max-width: none; flex-wrap: nowrap; white-space: normal; } .ddm { max-width: calc(100vw - 24px); } }
/* r14: intraday headlines (官網版): news rows tagged 盤中; the beacon / news label of a company whose title just arrived pulses for 20 s */
.nr .nb.live, #tooltip .nb.live { color: #FFD166; border-color: rgba(255,209,102,.65); font-style: normal; font-size: calc(10px * var(--fz, 1)); border: 1px solid; border-radius: 3px; padding: 0 4px; white-space: nowrap; }
.w-label.news.live { animation: tcm-live .7s ease-in-out 12 alternate; }
.w-beacon.live b { animation: tcm-live-t .7s ease-in-out 12 alternate; }
@keyframes tcm-live { from { box-shadow: 0 0 0 1px rgba(255,255,255,.9), 0 0 22px rgba(255,255,255,.75); } to { box-shadow: 0 0 0 0 transparent, 0 0 2px transparent; } }
@keyframes tcm-live-t { from { text-shadow: 0 0 14px #fff, 0 0 4px #fff, 0 1px 2px #000; } to { text-shadow: 0 1px 2px #000, 0 0 8px #000; } }
/* r16: analysis layer — roster of status cards (left column on desktops, bottom strip on phones), leader lines live on the flow overlay */
#roster { position: absolute; left: 14px; top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 50px); bottom: 58px; width: 190px; z-index: 11; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
#roster > * { pointer-events: auto; }
#roster .rh { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 8px; border-radius: 9px; background: rgba(10,14,20,.92); border: 1px solid var(--line-2); font-size: calc(11.5px * var(--fz, 1)); color: var(--fg-2); flex: none; }
#roster .rh .rt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; } #roster .rh b { color: var(--fg); font-weight: 600; font-size: calc(12.5px * var(--fz, 1)); white-space: nowrap; } #roster .rh small { font-size: calc(10.5px * var(--fz, 1)); color: var(--fg-3); white-space: nowrap; }
#roster .rs { display: inline-flex; gap: 2px; flex: none; } #roster .rs button { font-size: calc(10.5px * var(--fz, 1)); padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-3); line-height: 1.5; } #roster .rs button.on { color: var(--buy); border-color: rgba(61,220,203,.55); background: rgba(61,220,203,.12); }
#roster .rl { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; scrollbar-width: none; min-height: 0; flex: 1 1 auto; } #roster .rl::-webkit-scrollbar { display: none; }
.rc { position: relative; display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 4px 8px 4px 9px; border-radius: 9px; background: rgba(10,14,20,.92); border: 1px solid var(--line-2); border-left-width: 3px; border-left-color: var(--fg-3); text-align: left; color: var(--fg); line-height: 1.3; flex: none; }
.rc.buy { border-left-color: var(--buy); } .rc.sell { border-left-color: var(--sell); }
.rc:hover, .rc.hot { border-color: #fff; background: rgba(20,27,36,.98); } .rc.on { box-shadow: 0 0 0 2px rgba(243,198,94,.8); border-left-color: var(--gold); }
.rc .r1 { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: calc(12px * var(--fz, 1)); font-weight: 600; white-space: nowrap; min-width: 0; } .rc .r1 b { overflow: hidden; text-overflow: ellipsis; min-width: 0; } .rc .r1 .pc { margin: 0; flex: none; font-size: calc(11px * var(--fz, 1)); font-weight: 500; } .rc .r1 .crown { font-style: normal; font-size: calc(11px * var(--fz, 1)); flex: none; }
.rc .r2 { display: flex; align-items: baseline; gap: 6px; font: calc(11px * var(--fz, 1)) var(--font-mono); color: var(--fg-2); white-space: nowrap; min-width: 0; } .rc .r2 .amt { font-weight: 500; } .rc .r2 .ic { font-size: calc(11px * var(--fz, 1)); } .rc .r2 .gr { color: var(--fg-3); font-size: calc(10.5px * var(--fz, 1)); overflow: hidden; text-overflow: ellipsis; }
.rc .r2 .cw { margin-left: auto; font-size: calc(10.5px * var(--fz, 1)); color: var(--fg-3); } .rc .r2 .cw b { color: var(--buy); font-weight: 600; } .rc .r2 .cw i { font-style: normal; color: var(--sell); margin-left: 3px; }
.rc.more { color: var(--fg-3); cursor: default; border-left-color: var(--line-2); } .rc.more .r1 b { color: var(--fg-2); font-weight: 500; }
#roster.compact .rc { flex-direction: row; align-items: baseline; gap: 6px; padding: 2px 7px 2px 8px; } #roster.compact .rc .r1 { flex: 1 1 auto; } #roster.compact .rc .r2 { flex: none; } #roster.compact .rc .r2 .cw, #roster.compact .rc .r2 .gr { display: none; }
body.tcm-ana #mode-chip { display: none; } .w-ana .w-city { opacity: 0; pointer-events: none; } /* the all-market county dots are noise in the analysis layer */
.w-ana.w-ind .w-beacon b, .w-ana.w-ind .w-beacon small { display: none; } /* industry members read from the roster; the beam stays as the anchor of the leader line */
.w-ana .w-beacon i { width: 12px; height: 12px; left: 2px; bottom: -1px; }
.w-ana .w-beacon.glow .beam { width: 4px; left: 6px; background: linear-gradient(to top, #fff, rgba(255,255,255,.35) 70%, transparent); box-shadow: 0 0 12px #fff; } .w-ana .w-beacon.glow i { background: #fff; box-shadow: 0 0 22px #fff, 0 0 6px #fff; }
#roster .rs1 { display: none; font-size: calc(10px * var(--fz, 1)); padding: 0 6px; border-radius: 999px; border: 1px solid rgba(61,220,203,.55); color: var(--buy); background: rgba(61,220,203,.12); white-space: nowrap; line-height: 1.7; }
.epin.ana { border-color: rgba(243,198,94,.7); } .epin.ana b { color: var(--gold); } .epin.ana small { color: var(--fg-2); font-family: var(--font-ui); }
@media (max-width: 860px) {
  #roster { left: 8px; right: 8px; top: auto; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 8px); width: auto; flex-direction: column; gap: 4px; }
  #roster .rh { align-self: flex-start; flex-direction: row; align-items: center; justify-content: flex-start; height: 24px; padding: 0 4px 0 8px; gap: 8px; max-width: calc(100% - 70px); } #roster .rh .rt { flex-direction: row; align-items: baseline; gap: 6px; } #roster .rh b { font-size: calc(12px * var(--fz, 1)); overflow: hidden; text-overflow: ellipsis; max-width: 130px; } #roster .rs { display: none; } #roster .rs1 { display: inline-block; }
  #roster .rl { flex-direction: row; overflow-x: auto; overflow-y: hidden; flex: none; height: 58px; min-width: 0; } .rc { width: 148px; height: 100%; justify-content: center; padding: 4px 7px 4px 8px; }
  .rc[data-k="branch"] .r2 .cw { display: none; } /* phones: the turnover needs the room; the holdings count is in the card's title */
  body.tcm-ana #legend-btn { left: auto; right: 8px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 70px); height: 24px; padding: 0 9px; font-size: calc(11px * var(--fz, 1)); } body.tcm-ana #legend { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 100px); }
  #roster.compact .rc { flex-direction: column; align-items: stretch; padding: 4px 8px 4px 9px; } #roster.compact .rc .r2 .cw, #roster.compact .rc .r2 .gr { display: inline; }
}
/* r17: live quotes chip, market line */
.live-chip { display: inline-flex; align-items: center; gap: 6px; font: 500 calc(11.5px * var(--fz, 1)) var(--font-mono); padding: 5px 9px; border-radius: 8px; border: 1px solid rgba(255,209,102,.55); color: #FFD166; background: rgba(255,209,102,.08); white-space: nowrap; }
.live-chip i { width: 7px; height: 7px; border-radius: 50%; background: #FFD166; box-shadow: 0 0 8px #FFD166; animation: tcm-blink 1.6s ease-in-out infinite; }
@keyframes tcm-blink { 50% { opacity: .25; } }
.price-line .nb.live { font-style: normal; font-size: calc(10.5px * var(--fz, 1)); color: #FFD166; border: 1px solid rgba(255,209,102,.65); border-radius: 3px; padding: 0 5px; white-space: nowrap; align-self: center; }
.mline { font-size: calc(11.5px * var(--fz, 1)); color: var(--fg-2); line-height: 1.55; margin: -2px 0 8px; } .mline b { color: var(--fg); font-weight: 600; } .mline .wx-tag { margin-left: 6px; color: var(--fg); white-space: nowrap; } .mline .src { display: block; color: var(--fg-3); font-size: calc(10.5px * var(--fz, 1)); }
@media (max-width: 860px) { .live-chip { display: none; } }
/* r18: timeline, search head, personality, phone bottom sheet */
#timeline { position: absolute; left: 64px; right: calc(var(--panel-w) + 28px); bottom: 12px; height: 42px; z-index: 12; display: flex; align-items: center; gap: 8px; padding: 0 8px; border-radius: 12px; background: rgba(10,14,20,.94); border: 1px solid var(--line-2); }
#timeline .tl-play, #timeline .tl-now, #timeline .tl-x { height: 28px; min-width: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--fg-2); font-size: calc(12px * var(--fz, 1)); flex: none; }
#timeline .tl-play { color: var(--buy); border-color: rgba(61,220,203,.5); } #timeline .tl-now:disabled { opacity: .4; cursor: default; }
#timeline .tl-track { position: relative; flex: 1 1 auto; height: 32px; min-width: 0; }
#timeline .tl-spark { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#timeline .tl-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
#timeline .tl-range::-webkit-slider-runnable-track { height: 32px; background: transparent; } #timeline .tl-range::-moz-range-track { height: 32px; background: transparent; }
#timeline .tl-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 32px; border-radius: 6px; background: rgba(243,198,94,.3); border: 2px solid var(--gold); }
#timeline .tl-range::-moz-range-thumb { width: 12px; height: 28px; border-radius: 6px; background: rgba(243,198,94,.3); border: 2px solid var(--gold); }
#timeline .tl-date { font: 500 calc(12px * var(--fz, 1)) var(--font-mono); color: var(--fg); white-space: nowrap; flex: none; min-width: 132px; } #timeline .tl-date small { color: var(--gold); font-size: calc(10.5px * var(--fz, 1)); }
.date-chip { cursor: pointer; } .date-chip:hover, body.tl-open .date-chip { border-color: var(--gold); } .date-chip .cal { margin-left: 8px; color: var(--gold); font-size: calc(11px * var(--fz, 1)); font-family: var(--font-ui); }
.sr-head { font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); padding: 4px 8px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; } .sr .sub .up { color: var(--up); } .sr .sub .down { color: var(--down); }
.kpis.persona .kpi .v { font-size: calc(14px * var(--fz, 1)); }
.w-label.persona { font-size: calc(11px * var(--fz, 1)); color: var(--gold); border-color: rgba(243,198,94,.55); background: rgba(22,19,10,.92); }
.grab { display: none; }
@media (max-width: 860px) {
  #timeline { left: 8px; right: 8px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 8px); } body.tl-open.tcm-ana #timeline { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 100px); }
  body.tl-open:not(.tcm-ana) #legend-btn { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 58px); } #timeline .tl-date { min-width: 0; font-size: calc(11px * var(--fz, 1)); } #timeline .tl-date .wd { display: none; } #timeline .tl-x { display: none; } .date-chip .cal { display: none; }
  #panel { height: var(--sheet-h, 46vh); transition: transform .3s, height .25s; }
  body[data-sheet="full"] { --sheet-h: calc(100vh - 128px); }
  @supports (height: 100dvh) { body[data-sheet="full"] { --sheet-h: calc(100dvh - 128px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); } }
  .grab { display: flex; justify-content: center; align-items: center; height: 22px; flex: none; touch-action: none; cursor: grab; } .grab i { width: 44px; height: 5px; border-radius: 3px; background: var(--line-2); }
}
/* r19: community API blocks (官網版), minute chart */
.mk-h .mk-sw { margin-left: auto; font-size: calc(11px * var(--fz, 1)); font-weight: 500; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-2); } .mk-h .mk-sw:hover { color: var(--fg); border-color: var(--buy); }
.nickrow { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); } .nickrow b { color: var(--fg); }
.nick-in { flex: 1 1 auto; min-width: 0; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg); padding: 0 10px; font: calc(12.5px * var(--fz, 1)) var(--font-ui); } .nick-in:focus { border-color: var(--buy); outline: none; }
.rk.lb .seg { display: inline-flex; gap: 2px; } .rk.lb .seg button { font-size: calc(11px * var(--fz, 1)); padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-3); } .rk.lb .seg button.on { color: var(--buy); border-color: rgba(61,220,203,.55); background: rgba(61,220,203,.12); }
.lbr { display: grid; grid-template-columns: 18px 1fr auto; gap: 6px; align-items: baseline; padding: 3px 4px; font-size: calc(12px * var(--fz, 1)); } .lbr .n { color: var(--fg-3); font-family: var(--font-mono); font-size: calc(11px * var(--fz, 1)); } .lbr .lab { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lbr .val { font-family: var(--font-mono); } .lbr .val small { margin-left: 4px; color: var(--fg-3); font-size: calc(10.5px * var(--fz, 1)); }
.lb-me { font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); margin: 8px 0 0; } .lb-me b, .record b + span b { color: var(--gold); font-weight: 600; }
.sec.crowd .record .chip { margin-left: 6px; }
.inbox { border: 1px solid rgba(243,198,94,.35); border-radius: 10px; padding: 8px 10px; margin: 0 0 10px; background: rgba(243,198,94,.05); }
.alert-it { display: block; width: 100%; text-align: left; padding: 6px 4px; border-top: 1px solid var(--line); } .alert-it:first-of-type { border-top: 0; } .alert-it b { font-size: calc(12.5px * var(--fz, 1)); } .alert-it ul { margin: 2px 0 0; padding-left: 16px; font-size: calc(11.5px * var(--fz, 1)); color: var(--fg-2); } .alert-it:hover b { text-decoration: underline; text-underline-offset: 3px; }
.presence-chip { font-size: calc(11.5px * var(--fz, 1)); color: var(--fg-2); padding: 5px 9px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(15,21,29,.9); white-space: nowrap; }
#presence-line { display: block; font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); margin: -2px 0 6px; } #presence-line:empty { display: none; }
@media (max-width: 1180px) { .presence-chip { display: none; } }
@media (max-width: 1400px) { .live-chip:not([hidden]) ~ .presence-chip { display: none; } } /* trading hours: the quote chip keeps the bar, the panel line still has the count */
/* r19 on the full market: text that only applies to one data mode */
body.tcm-full .only-classic { display: none; } body:not(.tcm-full) .only-full { display: none; }
/* r19 on the full market: 20 one-line cards keep the name readable — the code goes (it stays in the tooltip); the phone strip never uses compact */
#roster .rc .cd { font-style: normal; } #roster.compact .rc .r1 .cd { display: none; }

/* r33 手機搜尋（≤860 px；使用者 10-15「新增手機板的搜尋功能」）: the top bar's magnifier opens a full-width sheet from the top with the same
   search as the desktop box (one.js searchHits / srItem). The sheet is sized to the visual viewport (one.js msFit → --ms-top / --ms-h), so its
   list ends above the on-screen keyboard; a strip of the dimmed map stays under it (a tap there closes it). Desktop never shows any of it. */
#msearch-btn { display: none; }
#msearch { position: fixed; left: 0; right: 0; top: var(--ms-top, 0px); height: var(--ms-h, 100%); z-index: 46; } /* over the bottom nav (40) and the new-column banner (45), under the modals (50+) */
#msearch .ms-scrim { position: absolute; inset: 0; background: rgba(5,8,12,.66); animation: ms-fade .18s ease-out both; }
#msearch .ms-sheet { position: relative; display: flex; flex-direction: column; max-height: calc(100% - 40px); background: var(--bg-2); border-bottom: 1px solid var(--line-2); border-radius: 0 0 16px 16px; box-shadow: 0 18px 44px rgba(0,0,0,.55); padding-top: env(safe-area-inset-top, 0px); animation: ms-in .18s ease-out both; }
@keyframes ms-in { from { transform: translateY(-14px); } } @keyframes ms-fade { from { opacity: 0; } }
.ms-head { flex: none; display: flex; align-items: center; gap: 4px; padding: 8px max(10px, env(safe-area-inset-right, 0px)) 8px max(4px, env(safe-area-inset-left, 0px)); }
.ms-x { flex: none; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--fg-2); } .ms-x svg { width: 22px; height: 22px; } .ms-x:active { background: var(--bg-3); }
.ms-field { position: relative; flex: 1 1 auto; min-width: 0; }
.ms-field > svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--fg-3); pointer-events: none; }
#msearch-input { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--fg); font: calc(16px * var(--fz, 1)) var(--font-ui); padding: 0 44px 0 38px; -webkit-appearance: none; appearance: none; } /* 16 px: iOS zooms the page into any smaller field */
#msearch-input::placeholder { color: var(--fg-3); } #msearch-input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
#msearch-input:focus { outline: none; border-color: var(--buy); box-shadow: 0 0 0 3px rgba(61,220,203,.22); }
.ms-clear { position: absolute; right: 2px; top: 2px; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--fg-2); } .ms-clear svg { width: 18px; height: 18px; }
.ms-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 max(8px, env(safe-area-inset-right, 0px)) 12px max(8px, env(safe-area-inset-left, 0px)); }
.ms-list { display: flex; flex-direction: column; gap: 2px; }
.ms-list .sr { grid-template-columns: 50px 1fr; gap: 12px; min-height: 54px; padding: 8px 10px; border-radius: 10px; }
.ms-list .sr .kind { font-size: calc(11px * var(--fz, 1)); padding: 2px 0; } .ms-list .sr .lab { font-size: calc(15px * var(--fz, 1)); } .ms-list .sr .sub { font-size: calc(12px * var(--fz, 1)); line-height: 1.45; } .ms-list .sr:active { background: var(--bg-4); }
.ms-note .sr-head { font-size: calc(12px * var(--fz, 1)); padding: 6px 10px 8px; margin-bottom: 2px; } .ms-note .ms-none { margin: 12px 10px 4px; font-size: calc(14px * var(--fz, 1)); color: var(--fg); }
.ms-help { padding: 0 4px 4px; } .ms-tip { margin: 6px 4px 12px; font-size: calc(13.5px * var(--fz, 1)); line-height: 1.6; color: var(--fg-2); } .ms-tip2 { margin: 14px 4px 2px; font-size: calc(12px * var(--fz, 1)); line-height: 1.6; color: var(--fg-3); }
.ms-ex { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-ex button { min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--fg); font-size: calc(14px * var(--fz, 1)); } .ms-ex button:active { border-color: var(--buy); }
.ms-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { #msearch .ms-sheet, #msearch .ms-scrim { animation: none; } }
@media (max-width: 860px) {
  /* room for the magnifier: the bar was already 9 px too wide at 360 px (the ? was cut off) → tighter gaps and buttons; under 385 px the
     date chip also drops its weekday (10/14 instead of 10/14 (三)) */
  #topbar { gap: 4px; padding-inline: 8px; } #topbar .icon-btn { padding: 0 6px; }
  #topbar #msearch-btn { display: inline-flex; justify-content: center; position: relative; width: 34px; padding: 0; color: var(--fg); }
  #msearch-btn svg { width: 17px; height: 17px; }
  #msearch-btn::after { content: ''; position: absolute; left: -3px; right: -3px; top: -7px; bottom: -7px; } /* from the padding box: a 38 × 44 target, 2 px into each 4 px gap */
  #msearch-btn[aria-expanded="true"] { color: var(--buy); border-color: rgba(61,220,203,.55); }
}
@media (max-width: 384px) { .date-chip .wd { display: none; } .date-chip { padding-inline: 5px; } .brand { margin-right: 0; } #topbar { padding-inline: 6px; } }
@media (max-width: 352px) { .brand b { font-size: calc(13px * var(--fz, 1)); } } /* folding phones' outer screens (≈344 px) */
@media (max-width: 335px) { .brand b { font-size: calc(12px * var(--fz, 1)); } #topbar { gap: 2px; } } /* 320 px: the old bar already overflowed by 49 px */

/* r27 套牢族（估算）: the tap card, the park / airport name tags, the stock-card line */
#trapcard { position: absolute; z-index: 32; width: 340px; max-width: calc(100% - 16px); background: rgba(15,21,29,.97); border: 1px solid rgba(201,160,106,.55); border-radius: 12px; padding: 10px 12px 9px; box-shadow: 0 14px 36px rgba(0,0,0,.45); font-size: calc(12.5px * var(--fz, 1)); color: var(--fg-2); max-height: 70vh; overflow-y: auto; }
#trapcard[hidden] { display: none; }
#trapcard .tc-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; } #trapcard .tc-h b { color: #E6C79A; font-size: calc(13.5px * var(--fz, 1)); } #trapcard .tc-h span { color: var(--fg); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#trapcard .tc-x { width: 26px; height: 26px; border-radius: 6px; color: var(--fg-3); } #trapcard .tc-x:hover { background: var(--bg-3); color: var(--fg); }
#trapcard .tc-s { border-top: 1px solid var(--line); padding: 7px 0 6px; } #trapcard .tc-n { display: flex; align-items: baseline; gap: 8px; } #trapcard .tc-n em { font-style: normal; color: var(--fg-3); font-size: calc(11.5px * var(--fz, 1)); margin-left: auto; white-space: nowrap; }
#trapcard .tc-co { color: var(--fg); font-weight: 600; font-size: calc(13px * var(--fz, 1)); padding: 0; text-align: left; } #trapcard .tc-co small { color: var(--fg-3); font: calc(11px * var(--fz, 1)) var(--font-mono); } #trapcard .tc-co:hover { color: var(--buy); }
#trapcard .tc-k { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 3px; } #trapcard .tc-k b { color: var(--fg); font-family: var(--font-mono); font-weight: 600; } #trapcard .dn { color: var(--down); font-family: var(--font-mono); } #trapcard .up { color: var(--up); font-family: var(--font-mono); }
#trapcard .tc-l { color: var(--fg-3); font-size: calc(11.5px * var(--fz, 1)); margin-top: 2px; } #trapcard .tc-p { color: var(--fg-2); font-size: calc(11.5px * var(--fz, 1)); margin-top: 3px; line-height: 1.4; } #trapcard .tc-m { color: var(--fg-3); font-size: calc(11.5px * var(--fz, 1)); padding-top: 4px; }
#trapcard .tc-f { margin: 6px 0 0; font-size: calc(10.5px * var(--fz, 1)); line-height: 1.45; color: var(--fg-3); border-top: 1px solid var(--line); padding-top: 6px; }
#trapcard.sheet { position: fixed; left: 8px; right: 8px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom, 0px)); top: auto; width: auto; max-height: 52vh; }
.w-label.trap { font-size: calc(11px * var(--fz, 1)); padding: 2px 8px; border-color: rgba(201,160,106,.6); background: rgba(24,19,13,.9); } .w-label.trap b { font-weight: 600; color: #E6C79A; } .w-label.trap small { color: var(--fg-2); font-family: var(--font-ui); }
.trapline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 10px 0 2px; padding: 8px 10px; border: 1px solid rgba(201,160,106,.35); border-radius: 10px; background: rgba(40,30,18,.25); font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); }
.trapline b { color: #E6C79A; font-weight: 600; } .trapline .btn { margin-left: auto; } .trapline small { flex-basis: 100%; color: var(--fg-3); font-size: calc(10.5px * var(--fz, 1)); }
#trapcard .tc-r { display: grid; grid-template-columns: 52px 1fr; gap: 6px; padding: 2px 0; } #trapcard .tc-r b { color: var(--fg-3); font-weight: 500; } #trapcard .tc-r span { color: var(--fg); }
#trapcard .tc-btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
/* r28 參觀模式: the top-bar switch lights up (gold) while the flow lines are put away */
#tour-btn.on { background: rgba(243,198,94,.16); color: var(--gold); border-color: rgba(243,198,94,.55); } #tour-btn.on:hover { background: rgba(243,198,94,.24); color: var(--gold); }
/* phones: the top bar is already full at 360–390 px (one more button overflowed by 43 px), so the switch drops to the right end of the filter row */
#tour-btn i { font-style: normal; }
/* narrow desktops: the search box keeps its room — 「🚶 參觀」 up to 1180 px, the icon alone at 861–960 px (the name stays in the tooltip) */
@media (min-width: 861px) and (max-width: 1180px) { #tour-btn .long { display: none; } #tour-btn .short { display: inline; } }
@media (min-width: 861px) and (max-width: 960px) { #tour-btn .short { display: none; } }
/* phones: the top bar is already full at 360–390 px (one more button overflowed by 43 px), so the switch drops to the right end of the filter row */
@media (max-width: 860px) { #tour-btn { position: absolute; top: calc(100% + 4px); right: 8px; height: 30px; } #indbar { right: 82px; } body[data-nav="panel"][data-sheet="full"] #tour-btn { visibility: hidden; } } /* the full sheet (z 30) would cut it in half */
/* r31 收合右側面板 (desktop ≥861 px; phones keep the r18 half / full sheet): a tab on the panel's left edge slides out with it and stays at the
   window's right edge (‹ 面板). While collapsed --panel-w is only that gutter, so everything placed "left of the panel" — the filter row, the
   timeline, the 跑馬燈, the new-column banner, the camera padding and the analysis-layer rectangle in world.js — gets the whole width; the panel
   keeps its own width (--panel-full) so its content never reflows and keeps its scroll. <html data-panel="off"> comes from the inline script in
   index.html before the first paint; transitions only run once one.js has booted (data-panel-anim), so a remembered state never animates in. */
#panel-tab { display: none; }
@media (min-width: 861px) {
  :root[data-panel="off"] { --panel-w: 30px; }
  #panel-tab { position: absolute; z-index: 11; top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 120px); /* 172 px: 11 px under the zoom buttons the collapsed panel uncovers (they end at 161) */ right: calc(13px + var(--panel-full)); width: 22px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 0; border: 1px solid var(--line-2); border-right: 0; border-radius: 10px 0 0 10px; background: rgba(15,21,29,.95); color: var(--fg-2); box-shadow: -4px 4px 14px rgba(0,0,0,.3); }
  #panel-tab:hover { color: var(--fg); background: rgba(27,37,49,.97); border-color: rgba(148,163,184,.45); }
  #panel-tab:focus-visible { outline: 2px solid var(--buy); outline-offset: -3px; }
  #panel-tab svg { width: 12px; height: 12px; flex: none; }
  #panel-tab .pt-l { display: none; writing-mode: vertical-rl; font-size: calc(11.5px * var(--fz, 1)); letter-spacing: .16em; line-height: 1; }
  #panel-tab .cl-dot { position: absolute; top: -7px; left: -8px; margin: 0; }
  :root:not([data-panel="off"]) #panel-tab .cl-dot { display: none; } /* open: the 專欄 tab itself carries the red count */
  :root[data-panel="off"] #panel { transform: translateX(calc(100% + 16px)); visibility: hidden; }
  :root[data-panel="off"] #panel-tab { transform: translateX(calc(13px + var(--panel-full))); width: 30px; height: 80px; color: var(--fg); border-color: rgba(148,163,184,.4); }
  :root[data-panel="off"] #panel-tab svg { transform: rotate(180deg); }
  :root[data-panel="off"] #panel-tab .pt-l { display: block; }
  :root[data-panel-anim] #panel { transition: transform .26s cubic-bezier(.2,.7,.25,1), visibility 0s; }
  :root[data-panel-anim][data-panel="off"] #panel { transition: transform .26s cubic-bezier(.2,.7,.25,1), visibility 0s linear .26s; } /* hidden (out of the tab order) once it has slid away */
  :root[data-panel-anim] #panel-tab { transition: transform .26s cubic-bezier(.2,.7,.25,1), width .26s, height .26s; }
  :root[data-panel-anim] #panel-tab svg { transition: transform .26s; }
}
/* r34 瘦身（使用者 10-16：手機選產業後懸浮卡片太雜、新聞卡太長；桌機面板再寬一點；字放大；去掉過多的說明與圖例解釋）——
   --fz scales every px font size in one.css／columns.css／talk.css／sector.js／town_life.js (calc(N px * var(--fz, 1)), 1 everywhere else),
   so only the panel, the legend and the about window grow; the map's own labels keep their size. */
#panel { --fz: 1.15; font-size: calc(13px * var(--fz, 1)); }
#legend { --fz: 1.1; } #modal .card { --fz: 1.08; }
.sec h2 { white-space: nowrap; min-width: 0; } .sec h2 small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 「今日公司動態」never breaks; a long note ellipsizes */
.row .nh { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } /* headlines in lists: two lines at most (the stock card has the full list) */
.qhelp { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); color: var(--fg-3); font: 600 calc(11.5px * var(--fz, 1))/1 var(--font-ui); cursor: pointer; }
.qhelp:hover, .qhelp[aria-expanded="true"] { color: var(--fg); border-color: rgba(61,220,203,.55); background: rgba(61,220,203,.1); }
.help-box { margin: 6px 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--bg-3); color: var(--fg-2); font-size: calc(11.5px * var(--fz, 1)); line-height: 1.6; }
.help-box p { margin: 0 0 6px; } .help-box p:last-child { margin-bottom: 0; } .help-box b { color: var(--fg); font-weight: 600; }
#legend .lgt { display: flex; align-items: center; justify-content: space-between; gap: 8px; } #legend .lgt .lgh { margin: 0; }
#legend .lgr { gap: 4px 10px; } #legend .help-box { margin: 4px 0 2px; }
@media (max-width: 860px) {
  #panel { --fz: 1.1; }
  #bottomnav { --fz: 1.1; }
  .ddn { display: none; } /* 「地圖只留這個產業的公司」ran under the 參觀 button; the card strip's title says it */
  .row .nh { -webkit-line-clamp: 1; }
  .w-label.news { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: 196px; font-size: 11px; padding: 3px 8px; } /* two lines, two tags at most (world.js); tap = the company card with the whole headline */
  .epin { padding: 2px 7px; font-size: 11px; gap: 4px; } .epin small { font-size: 10.5px; }
  #anadock { position: absolute; left: 8px; right: 8px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 98px); z-index: 11; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  #anadock::-webkit-scrollbar { display: none; }
  #anadock .epin.dk, #anadock .dkf { position: static; translate: none; transform: none !important; flex: none; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; }
  #anadock .epin.dk i { display: none; }
  #anadock .dkf { border: 1px solid rgba(61,220,203,.55); background: rgba(10,14,20,.92); color: var(--fg); } #anadock .dkf small { color: var(--fg-3); font: 11px var(--font-mono); } #anadock .dkf[aria-pressed="true"] { background: rgba(61,220,203,.14); }
  body.tcm-ana #legend { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 130px); }
}

/* r37 資訊卡五大分類＋頂列簡化（使用者 10-16：資訊卡太雜 → 五個大分類、點分類展開子類別、點進去才顯示；產業＋券商合成「篩選」；
   圖例＋說明合成一顆「?」；參觀模式收進「檢視」；手機地圖只寫名稱與漲跌幅）。The rules above are kept; this block overrides what moved. */
/* -- tabs: 總覽 分點 產業 社群 我的 (+ 選取 while something is picked) -- */
.tabs { gap: 2px; padding: 8px 8px 0; }
.tabs button { padding: 0 4px; }
.tabs #sel-title { flex: 1.5; color: var(--gold); } .tabs #sel-title.active { background: rgba(243,198,94,.14); color: var(--gold); }
body[data-tab="sel"] #panel-body, body[data-tab="col"] #panel-body { display: none; }
/* -- a category: an always-on top (總覽: the day's numbers; 分點: counts; 我的: who you are), then its sub-sections -- */
.cat-top { padding: 2px 0 10px; }
.ov-k { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.ov-k .kpi { display: block; width: 100%; text-align: left; padding: 7px 10px; min-width: 0; }
.ov-k button.kpi { cursor: pointer; } .ov-k button.kpi:hover { background: var(--bg-4); }
.ov-k .kpi.wide { grid-column: 1 / -1; }
.ov-k .kpi .v { font-size: calc(15px * var(--fz, 1)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-k button.kpi .v { font-family: var(--font-ui); font-weight: 600; }
.ov-k .kpi .d { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-stat { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); }
.cat-stat b { font-family: var(--font-mono); font-weight: 500; color: var(--fg); }
.cat-note { margin: 0 0 8px; font-size: calc(11.5px * var(--fz, 1)); line-height: 1.5; color: var(--fg-3); } /* 社群: always on top, not inside a sub-section (those fold) */
.subs { display: flex; flex-direction: column; gap: 6px; }
.isub { border: 1px solid var(--line); border-radius: 12px; background: rgba(21,29,39,.55); }
.isub.open { border-color: var(--line-2); background: rgba(21,29,39,.9); }
.sub-h { width: 100%; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto 12px; align-items: center; gap: 8px; min-height: 52px; padding: 8px 10px 8px 8px; border-radius: 12px; text-align: left; }
.sub-h:hover { background: var(--bg-3); } .isub.open > .sub-h { border-radius: 12px 12px 0 0; }
.sub-ic { font-size: calc(16px * var(--fz, 1)); line-height: 1; text-align: center; }
.sub-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sub-tx b { font-size: calc(13.5px * var(--fz, 1)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-n { font-style: normal; font-family: var(--font-mono); font-size: calc(11px * var(--fz, 1)); font-weight: 500; color: var(--fg-2); background: var(--bg-4); border-radius: 999px; padding: 0 7px; margin-left: 4px; vertical-align: 1px; }
.sub-n.new { background: #E5484D; color: #fff; }
.sub-s { font-size: calc(11.5px * var(--fz, 1)); color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.isub.zero .sub-tx b, .isub.zero .sub-ic { opacity: .6; }
.sub-viz { display: block; width: 64px; height: 20px; flex: none; }
.sub-car::before { content: '▸'; color: var(--fg-3); font-size: calc(12px * var(--fz, 1)); font-style: normal; } .isub.open .sub-car::before { content: '▾'; }
.sub-b { padding: 0 12px 12px; border-top: 1px solid var(--line); }
.sub-b > :first-child { margin-top: 10px; }
.sub-b h4 { margin: 12px 0 6px; font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); font-weight: 500; }
.sub-b h4 small { display: inline; margin-left: 4px; }
.sub-rule { margin: 0 0 6px; font-size: calc(11px * var(--fz, 1)); line-height: 1.5; color: var(--fg-3); }
.sub-empty { margin: 4px 0 6px; font-size: calc(12px * var(--fz, 1)); line-height: 1.55; color: var(--fg-3); }
.row.ev2 { grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; padding: 6px 4px; }
.row.ev2 .n { font-size: calc(14px * var(--fz, 1)); line-height: 1.3; } .row.ev2 .lab { line-height: 1.4; }
.row.ev2 .sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sub-b .headline { margin: 10px 0 8px; } .sub-b .sub-list { margin-top: 6px; }
.sub-b .cl-sec { border: 0; padding: 0; } .sub-b .cl-sec > h2 { display: none; }
.sub-b .awards { margin-top: 10px; }
#sub-rot > .sub-b { padding: 0 1px 10px; } /* the rotation chart keeps the panel width (r34: ≥ panel − 40) */
.ig { margin-top: 10px; } .ig + .ig { border-top: 1px solid var(--line); padding-top: 8px; }
.ig-h { display: flex; align-items: center; gap: 6px; width: 100%; padding: 2px 4px 4px; font-size: calc(12.5px * var(--fz, 1)); text-align: left; }
.ig-h .indsq { width: 10px; height: 10px; margin-right: 0; } .ig-h small { color: var(--fg-3); font-size: calc(11px * var(--fz, 1)); } .ig-h span { margin-left: auto; color: var(--buy); font-size: calc(11px * var(--fz, 1)); } .ig-h:hover b { text-decoration: underline; text-underline-offset: 3px; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--bg-4); flex: none; }
.seg button { font-size: calc(11.5px * var(--fz, 1)); padding: 2px 10px; border-radius: 999px; color: var(--fg-2); white-space: nowrap; } .seg button:hover { color: var(--fg); }
.seg button.on { background: rgba(61,220,203,.18); color: var(--buy); }
.seg-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); }
.row.tk-r .lab b { font-weight: 600; }
.promo { margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(31,111,235,.45); background: linear-gradient(135deg, rgba(31,111,235,.14), rgba(15,21,29,.6) 70%); }
.promo-k { font: 500 calc(10.5px * var(--fz, 1)) var(--font-mono); letter-spacing: .08em; color: #8DB6FF; }
.promo b { display: block; margin: 3px 0 4px; font-size: calc(14px * var(--fz, 1)); }
.promo p { margin: 0; font-size: calc(12px * var(--fz, 1)); line-height: 1.6; color: var(--fg-2); }
.promo .btn-row { margin-top: 10px; } .promo small { display: block; margin-top: 8px; font-size: calc(10.5px * var(--fz, 1)); color: var(--fg-3); }
.me-id { display: flex; align-items: center; gap: 10px; }
.me-av { width: 46px; height: 46px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg-3); overflow: hidden; }
.me-av:hover { border-color: rgba(243,198,94,.6); } .me-av .tm-plus { font-size: calc(18px * var(--fz, 1)); color: var(--fg-3); }
.me-id b { display: block; font-size: calc(14px * var(--fz, 1)); } .me-id small { font-size: calc(11.5px * var(--fz, 1)); color: var(--fg-3); }
.me-top .life-rare { margin-top: 10px; }
.sub-b .life-dex { margin-top: 10px; border: 0; padding: 0; background: none; } .sub-b .life-dex > summary { display: none; }
.sub-b .inbox { margin-top: 10px; }
/* -- the row under the top bar: 篩選 + its chips … 檢視 -- */
#indbar .spacer { flex: 1 1 auto; min-width: 4px; }
.fbtn svg, .vbtn svg { width: 14px; height: 14px; flex: none; }
.fbtn .fn { font-style: normal; display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--buy); color: #04201D; font: 600 calc(10.5px * var(--fz, 1))/1 var(--font-mono); }
.fbtn[aria-expanded="true"], .vbtn[aria-expanded="true"] { color: var(--fg); border-color: rgba(61,220,203,.55); }
.vbtn i { font-style: normal; }
.vbtn.on { background: rgba(243,198,94,.16); color: var(--gold); border-color: rgba(243,198,94,.55); }
.fchip { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; }
.fchip .fc { display: inline-flex; align-items: center; height: 28px; min-width: 0; max-width: 170px; padding: 0 8px 0 10px; border-radius: 999px 0 0 999px; border: 1px solid rgba(61,220,203,.55); border-right: 0; background: rgba(61,220,203,.1); color: var(--fg); font-size: calc(12px * var(--fz, 1)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fchip .fc .indsq { width: 9px; height: 9px; margin-right: 5px; border-radius: 2px; flex: none; }
.fchip .ddx { margin-left: 0; border-color: rgba(61,220,203,.55); background: rgba(61,220,203,.1); }
/* -- pop-ups: 篩選 (industry | broker side by side) and 檢視 -- */
#fpop, #viewmenu { position: absolute; z-index: 42; background: rgba(12,17,24,.98); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 16px 44px rgba(0,0,0,.5); }
#fpop { left: 14px; top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 44px); width: min(580px, calc(100vw - var(--panel-w) - 56px)); padding: 10px; }
.fp-head { display: flex; align-items: center; gap: 10px; margin: 0 2px 8px; } .fp-head b { font-size: calc(13px * var(--fz, 1)); }
.fp-x { margin-left: auto; height: 28px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--fg-2); font-size: calc(12px * var(--fz, 1)); } .fp-x:hover { color: var(--fg); }
.fp-seg { display: none; } .fdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--buy); vertical-align: 2px; }
.fp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fp-col { min-width: 0; display: flex; flex-direction: column; }
.fp-col h5 { margin: 0 0 6px 4px; font-size: calc(11.5px * var(--fz, 1)); font-weight: 600; color: var(--fg-2); } .fp-col h5 small { font-weight: 400; color: var(--fg-3); margin-left: 4px; }
.fp-col .ddl { max-height: min(56vh, 460px); overflow: auto; scrollbar-width: thin; }
.fp-col .sxb { width: 100%; justify-content: center; margin: 0 0 6px; flex: none; }
#fpop .sxb .long { display: inline; } #fpop .sxb .short { display: none; } /* sector.js shortens it for the old phone filter row; the pop-up has room */
.fp-col .ddi > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#viewmenu { right: calc(var(--panel-w) + 28px); top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 44px); width: 310px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
#viewmenu[hidden] { display: none; }
.vm-h { font: 500 calc(10.5px * var(--fz, 1)) var(--font-mono); letter-spacing: .06em; color: var(--fg-3); padding: 2px 6px 4px; }
.vm-it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 10px; text-align: left; color: var(--fg-2); }
button.vm-it:hover { background: var(--bg-3); color: var(--fg); }
.vm-it > i { font-style: normal; font-size: calc(16px * var(--fz, 1)); width: 22px; text-align: center; flex: none; }
.vm-it > span:not(.seg) { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.vm-it b { font-size: calc(12.5px * var(--fz, 1)); font-weight: 600; color: var(--fg); } .vm-it small { font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); }
.vm-it .sw { flex: none; position: relative; width: 34px; height: 20px; border-radius: 10px; background: var(--bg-4); border: 1px solid var(--line-2); }
.vm-it .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--fg-3); transition: transform .15s; }
#viewmenu #tour-btn { position: static; height: auto; background: none; border: 0; } /* r28's phone rule placed the old top-bar button absolutely */
#viewmenu #tour-btn:hover { background: var(--bg-3); }
#viewmenu #tour-btn.on .sw { background: rgba(243,198,94,.25); border-color: rgba(243,198,94,.6); } #viewmenu #tour-btn.on .sw::after { transform: translateX(14px); background: var(--gold); }
#viewmenu #night-btn { display: flex; } /* the phone rule hid the old top-bar ☀ button */
/* -- the 說明 card (legend + how-to) from the top bar's「?」 -- */
#help-btn.on { color: var(--fg); border-color: rgba(61,220,203,.55); background: rgba(61,220,203,.1); }
#legend { display: none; left: auto; right: 14px; bottom: auto; top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 4px); width: min(400px, calc(100vw - 28px)); max-width: none; max-height: calc(100vh - var(--top-h) - 36px); overflow: hidden; flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 0; z-index: 44; white-space: normal; background: rgba(12,17,24,.98); border-color: var(--line-2); box-shadow: 0 16px 44px rgba(0,0,0,.5); }
body[data-legend="1"] #legend { display: flex; }
.hp-head { display: flex; align-items: center; gap: 10px; flex: none; padding: 10px 12px 8px; border-bottom: 1px solid var(--line); } .hp-head b { font-size: calc(13px * var(--fz, 1)); color: var(--fg); }
.hp-x { margin-left: auto; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--fg-2); } .hp-x:hover { color: var(--fg); }
.hp-pane { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; padding: 10px 12px 12px; scrollbar-width: thin; }
.hp-about { display: block; font-size: calc(12px * var(--fz, 1)); line-height: 1.65; color: var(--fg-2); }
.hp-about h3 { display: none; } .hp-about p { margin: 0 0 10px; } .hp-about b { color: var(--fg); } .hp-about .hint { margin-bottom: 0; }
/* -- bottom-left: the old 圖例 button is gone, so 💬 and the timeline move left -- */
#timeline { left: 14px; }
/* -- r39 分點分類摘要／今日頭條／篩選到分點（使用者 10-16 22:4x）-- */
.dg-focus { margin-top: 10px; }
.dg-focus h4, .sub-b h4.dg-sh { margin: 0 0 6px; font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); font-weight: 600; }
.dg-tops { gap: 2px; }
.row.dg-top { grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; padding: 6px 4px; }
.row.dg-top .n { font-size: calc(14px * var(--fz, 1)); line-height: 1.3; }
.row.dg-top .lab b, .row.dg-g .lab b, .row.dg-xs .lab b { font-weight: 600; color: var(--fg); }
.row.dg-top .sub, .row.dg-g .sub { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.dg-ct { display: inline-flex; gap: 6px; margin-left: 6px; font-family: var(--font-mono); font-size: calc(10.5px * var(--fz, 1)); } .dg-ct i { font-style: normal; }
.dg-k { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.dg-p { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: calc(11.5px * var(--fz, 1)); color: var(--fg-2); }
.dg-p i { font-style: normal; } .dg-p.buy i { color: var(--buy); } .dg-p.sell i { color: var(--sell); }
.dg-p b { font-family: var(--font-mono); color: var(--fg); font-weight: 600; }
.dg-p em { font-style: normal; font-family: var(--font-mono); margin-left: 4px; } .dg-p.buy em { color: var(--buy); } .dg-p.sell em { color: var(--sell); }
.dg-cls { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; flex-wrap: wrap; }
.dg-h { font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); font-weight: 500; }
.dg-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .dg-seg::-webkit-scrollbar { display: none; }
.row.dg-g { position: relative; overflow: hidden; grid-template-columns: minmax(0, 1fr) auto; }
.row.dg-g.static { cursor: default; } .row.dg-g.static:hover { background: transparent; }
.row.dg-g > .lab, .row.dg-g > .val { position: relative; }
.dg-bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(61,220,203,.10); pointer-events: none; } .dg-bar.neg { background: rgba(255,169,64,.10); }
.sub-b h4.dg-grp { margin-top: 16px; padding-top: 10px; border-top: 1px dashed var(--line-2); } .sub-b > h4.dg-grp:first-child, .sub-b > .sub-rule + h4.dg-grp { margin-top: 10px; padding-top: 0; border-top: 0; }
details.dg-det { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
details.dg-det > summary { cursor: pointer; list-style: none; font-size: calc(12px * var(--fz, 1)); color: var(--fg-2); padding: 4px 2px; border-radius: 6px; }
details.dg-det > summary::-webkit-details-marker, details.dg-x > summary::-webkit-details-marker { display: none; }
details.dg-det > summary::before { content: '▸'; display: inline-block; width: 14px; color: var(--fg-3); } details.dg-det[open] > summary::before { content: '▾'; }
details.dg-det > summary small { margin-left: 8px; color: var(--fg-3); font-size: calc(11px * var(--fz, 1)); }
details.dg-det > summary:hover { color: var(--fg); background: var(--bg-3); }
details.dg-det h5, .dg-xb h5 { margin: 8px 0 4px; font-size: calc(11.5px * var(--fz, 1)); font-weight: 600; color: var(--fg-2); } details.dg-det h5 small { margin-left: 4px; color: var(--fg-3); font-weight: 400; }
.dg-xl { display: flex; flex-direction: column; gap: 2px; }
details.dg-x { border-radius: 8px; } details.dg-x[open] { background: rgba(255,255,255,.025); }
details.dg-x > summary { list-style: none; cursor: pointer; }
.row.dg-xs { grid-template-columns: minmax(0, 1fr) auto 14px; }
.row.dg-xs .sub { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.dg-car::before { content: '▸'; font-style: normal; color: var(--fg-3); font-size: calc(11px * var(--fz, 1)); } details.dg-x[open] .dg-car::before { content: '▾'; }
.dg-xb { padding: 2px 6px 8px 10px; border-left: 2px solid rgba(243,198,94,.35); margin: 0 0 4px 6px; }
.dg-xb .chips { margin-bottom: 4px; } .dg-xb .btn-row { margin-top: 6px; }
.row.dg-go .lab { color: var(--fg-2); font-size: calc(12px * var(--fz, 1)); } .row.dg-go:hover .lab { color: var(--fg); }
.sub-b h4.dg-sh { margin-top: 12px; } .sub-b h4.dg-sh b { font-family: var(--font-mono); color: var(--fg); } .sub-b h4.dg-sh small { color: var(--fg-3); }
.win-rule { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 8px; margin: 6px 0 4px; } .win-rule > .sub-rule { flex: 1 1 0; min-width: 0; margin: 2px 0 0; } .win-rule > .help-box { flex: 1 1 100%; margin: 2px 0 4px; } /* r39b */
.badge.dim { color: var(--fg-3); border-color: var(--line-2); font-weight: 400; }
/* 今日頭條: headlines only, each with its time */
.row.mv.hl { grid-template-columns: 58px minmax(0, 1fr) auto; align-items: start; }
.row.hl .hl-t { font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); white-space: nowrap; padding-top: 1px; }
.row.hl .lab b { font-weight: 600; }
a.row.mk { text-decoration: none; color: inherit; } a.row.mk .n { color: var(--gold); font-size: calc(11px * var(--fz, 1)); } a.row.mk .nh { color: var(--fg); -webkit-line-clamp: 2; }
/* 篩選 → 分點 */
.ddr { display: flex; align-items: stretch; gap: 2px; border-radius: 8px; } .ddr .ddi { flex: 1 1 auto; min-width: 0; } .ddr.on .ddi { color: var(--fg); background: rgba(243,198,94,.12); }
.ddstar { flex: none; width: 32px; border-radius: 8px; color: var(--fg-3); font-size: calc(14px * var(--fz, 1)); } .ddstar:hover { background: var(--bg-3); color: var(--gold); } .ddstar.on { color: var(--gold); }
.ddi.back { color: var(--fg-3); } .ddi.back:hover { color: var(--fg); }
.ddh { margin: 8px 4px 4px; font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); font-weight: 600; } .ddh small { font-weight: 400; margin-left: 4px; }
.fchip.br .fc { border-color: rgba(243,198,94,.6); background: rgba(243,198,94,.1); } .fchip.br .ddx { border-color: rgba(243,198,94,.6); background: rgba(243,198,94,.1); }
#fpop .fp-col .ddl .sub-empty { margin: 8px 6px; }
.fp-col .ddi .val { flex: none; white-space: nowrap; } .fp-col .ddr .ddi small { overflow: hidden; text-overflow: ellipsis; }
/* r49 籌碼篩選器（分點 › 籌碼篩選器）：四個條件各一個開關 + 選項列；字級照 r34 的 calc(N px * var(--fz, 1)) */
.btn.sm { height: 24px; padding: 0 8px; font-size: calc(11px * var(--fz, 1)); }
.scr { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 10px; }
.scr-dir { margin: 2px 0 6px; }
.scr-c { border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); overflow: hidden; }
.scr-c.on { border-color: rgba(61,220,203,.45); background: rgba(61,220,203,.05); }
.scr-c.scr-bs.on { border-color: rgba(243,198,94,.5); background: rgba(243,198,94,.06); }
.scr-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 9px; text-align: left; color: var(--fg-2); }
button.scr-h:hover { background: var(--bg-3); color: var(--fg); }
.scr-hs { color: var(--fg-2); }
.scr-no { flex: none; width: 20px; text-align: center; font-style: normal; font-size: calc(12.5px * var(--fz, 1)); color: var(--fg-3); }
.scr-c.on .scr-no { color: var(--buy); } .scr-c.scr-bs.on .scr-no { color: var(--gold); }
.scr-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.scr-t b { font-size: calc(12.5px * var(--fz, 1)); font-weight: 600; color: var(--fg); }
.scr-t small { font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr-h .sw { flex: none; position: relative; width: 34px; height: 20px; border-radius: 10px; background: var(--bg-4); border: 1px solid var(--line-2); }
.scr-h .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--fg-3); transition: transform .15s; }
.scr-c.on .scr-h .sw { background: rgba(61,220,203,.22); border-color: rgba(61,220,203,.6); }
.scr-c.on .scr-h .sw::after { transform: translateX(14px); background: var(--buy); }
.scr-o { display: flex; flex-wrap: wrap; gap: 5px 6px; padding: 0 9px 8px 29px; }
.scr-o .chips { flex: 1 1 100%; }
.scr-seg { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow-x: auto; }   /* .seg 底是 flex:none；--fz 1.3 時 ④ 五個選項會超出面板 */
.scr-note { flex: 1 1 100%; margin: 2px 0 0; font-size: calc(10.5px * var(--fz, 1)); line-height: 1.55; color: var(--fg-3); }
.scr-note b { color: var(--fg-2); font-weight: 600; }
.scr-bs .scr-h { cursor: default; }
.sub-b h4.scr-rh { margin-top: 12px; } .sub-b h4.scr-rh small { color: var(--fg-3); font-family: var(--font-mono); }
.scr-sort button { padding: 2px 8px; }
/* r54b 一鍵選條件與「自訂條件 ▸」（使用者 10-20：篩選器有點複雜，怕大家不會用）；排序鈕多到八個就換行，不橫向捲 */
.scr-pre { margin: 6px 0 2px; } .scr-pre > span:first-child { color: var(--fg-3); }
.scr-adv { display: flex; align-items: center; gap: 8px; width: 100%; margin: 6px 0 4px; padding: 7px 9px; border: 1px dashed var(--line-2); border-radius: 10px; background: var(--bg-2); color: var(--fg-2); text-align: left; }
.scr-adv:hover { background: var(--bg-3); color: var(--fg); }
.scr-adv b { flex: none; font-size: calc(12px * var(--fz, 1)); font-weight: 600; color: var(--fg); }
.scr-adv small { flex: 1 1 auto; min-width: 0; font-size: calc(11px * var(--fz, 1)); color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr-seg.scr-sort, .scr-pre .scr-seg { flex-wrap: wrap; overflow-x: visible; }   /* 手機 390 第三個預設鈕會被切掉 → 換行 */
.row.scr-r, .row.scr-p { grid-template-columns: 40px minmax(0, 1fr) auto; }   /* 18px 裝不下「17 日」 */
.row.scr-r .n { font-family: var(--font-mono); font-size: calc(11.5px * var(--fz, 1)); white-space: nowrap; }
.row.scr-r .sub, .row.scr-p .sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row.scr-p .n { font-family: var(--font-mono); }
/* 公司卡上的籌碼摘要 */
.scr-line { margin: 10px 0 6px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); }
.scr-lh { font: 500 calc(11px * var(--fz, 1)) var(--font-mono); letter-spacing: .06em; color: var(--fg-3); margin-bottom: 4px; }
.scr-lh small { font-family: var(--font-ui); letter-spacing: 0; margin-left: 4px; }
.scr-line ul { margin: 0; padding-left: 16px; color: var(--fg-2); font-size: calc(11.5px * var(--fz, 1)); line-height: 1.65; }
.scr-line ul b { color: var(--fg); font-weight: 600; font-family: var(--font-mono); }
.scr-line .caution { margin: 5px 0 0; font-size: calc(10.5px * var(--fz, 1)); line-height: 1.55; color: var(--fg-3); }
.scr-line .lk { color: var(--buy); font-size: calc(10.5px * var(--fz, 1)); text-decoration: underline; margin-left: 2px; }
/* r54 公司卡的集保大戶摘要與逐週小表（週頻；標題旁兩個日期分開寫） */
.scr-line.td { border-color: rgba(181,156,255,.35); }
.scr-line.td .scr-lh small { white-space: normal; }
.td-wk { width: 100%; border-collapse: collapse; margin: 6px 0 2px; font-size: calc(11px * var(--fz, 1)); font-family: var(--font-mono); }
.td-wk th { text-align: right; font-weight: 500; color: var(--fg-3); padding: 2px 4px; border-bottom: 1px solid var(--line-2); font-family: var(--font-ui); white-space: nowrap; }
.td-wk th:first-child, .td-wk td:first-child { text-align: left; }
.td-wk td { text-align: right; padding: 2px 4px; color: var(--fg-2); white-space: nowrap; }
.td-wk td small { font-size: calc(10px * var(--fz, 1)); margin-left: 2px; }
.td-wk td small.up { color: var(--up); } .td-wk td small.down { color: var(--down); }
.scr-note.td-note b { color: var(--sell); }
/* 篩選 → 分點列的「＋」（分點集合）與集合提示 */
.ddset { flex: none; width: 30px; border-radius: 8px; color: var(--fg-3); font-size: calc(13px * var(--fz, 1)); }
.ddset:hover { background: var(--bg-3); color: var(--buy); } .ddset.on { color: var(--buy); }
.ddr.inset { outline: 1px solid rgba(61,220,203,.35); }
.fp-set { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 2px 2px; font-size: calc(10.5px * var(--fz, 1)); line-height: 1.5; color: var(--fg-3); }
.fp-set b { color: var(--fg-2); font-weight: 600; } .fp-set .chips { gap: 4px; } .fp-set .chip.br .fc { color: var(--gold); }
/* -- phones -- */
@media (max-width: 860px) {
  .tabs { display: none; } /* the bottom menu is the phone's tab bar (same five + 選取) */
  #bottomnav { display: flex; } #bottomnav button { flex: 1 1 0; min-width: 0; padding: 0 1px; white-space: nowrap; }
  #bottomnav button[data-tab="sel"] { color: var(--gold); }
  #timeline { left: 8px; }
  #indbar { right: 8px; } /* the r28 參觀 button no longer sits at its right end (it is in 檢視) */
  #fpop { left: 8px; right: 8px; width: auto; top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 40px); }
  .fp-seg { display: inline-flex; } .fp-cols { grid-template-columns: 1fr; } .fp-cols[data-seg="ind"] #dd-brk, .fp-cols[data-seg="brk"] #dd-ind { display: none; }
  .fp-col h5 { display: none; } .fp-col .ddl { max-height: min(52vh, 420px); } .fp-col .ddi { min-height: 40px; }
  #viewmenu { right: 8px; width: min(310px, calc(100vw - 16px)); top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 40px); }
  .vm-it { min-height: 46px; }
  #legend, body.tcm-ana #legend { left: 8px; right: 8px; width: auto; top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 4px); bottom: auto; max-height: calc(100vh - var(--top-h) - var(--nav-h) - 24px); padding: 0; font-size: calc(10.5px * var(--fz, 1)); }
  @supports (height: 100dvh) { #legend, body.tcm-ana #legend { max-height: calc(100dvh - var(--top-h) - var(--nav-h) - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); } }
  #legend .lgr { flex-wrap: wrap; } #legend .lg { flex: none; }
  .sub-viz { width: 52px; height: 18px; }
  /* r37 使用者 10-16「手機板的畫面很小，公司房子顯示名稱跟漲跌幅就好，金額不要顯示…手機板不用顯示每間公司買賣多少了，看資訊卡就夠了」:
     the map's labels, beacons, flow name tags, county dots and the analysis roster keep names and % only (world.js marks the amounts .amt;
     its 3D signs and branch tickers drop them on phones). The flow lines and particles stay. */
  .w-beacon small .amt, .w-label .amt, .epin .amt, .w-city small, #roster .rc .r2 .amt, #roster .rc .r2 .gr { display: none; }
  .ddstar { width: 40px; } .row.mv.hl { grid-template-columns: 52px minmax(0, 1fr) auto; } /* r39 */
  .ddstar, .ddset { width: 36px; } /* r49 */
  .scr-o { padding-left: 9px; } .scr-h { min-height: 44px; } .scr-seg { flex: 1 1 100%; justify-content: flex-start; overflow-x: auto; }
  .scr-sort { flex: 1 1 100%; overflow-x: auto; }
}
