:root { color-scheme: light; font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", sans-serif; color: #16233a; background: #f4f6fa; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; overflow-x: hidden; }
button, input, select { font: inherit; }
button, select, input { min-height: 44px; }
button { cursor: pointer; }
a { color: inherit; }
.page-width { width: min(100% - 24px, 920px); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 10px; border-radius: 8px; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.app-header { background: #10233f; color: #fff; padding: 18px 0 10px; }
.header-row, .status-row, .section-heading, .dialog-heading, .search-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow { margin: 0 0 4px; color: #b9c9df; font-size: .78rem; font-weight: 700; letter-spacing: .05em; }
h1, h2, p { margin-top: 0; } h1 { margin-bottom: 0; font-size: clamp(1.45rem, 5vw, 2rem); } h2 { margin-bottom: 0; font-size: 1.1rem; }
.status-row { color: #c5d1e2; font-size: .82rem; padding-top: 12px; }
.tools { background: #fff; border: 1px solid #e0e6ef; border-radius: 0 0 16px 16px; padding: 14px; box-shadow: 0 7px 20px #10233f0d; }
.search-label, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search-row { border: 1px solid #c8d1df; border-radius: 12px; padding-left: 12px; } .search-row:focus-within { outline: 3px solid #a9c2e8; outline-offset: 2px; }
.search-row input { width: 100%; border: 0; outline: 0; background: transparent; }
.icon-button { width: 44px; border: 0; border-radius: 10px; background: transparent; color: #40516a; font-size: 1.5rem; line-height: 1; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-bottom: 2px; }
.chip, .button, .text-button { border: 0; border-radius: 999px; font-weight: 800; white-space: nowrap; }
.chip { min-height: 44px; padding: 0 12px; background: #edf1f6; color: #42526a; font-size: .83rem; }.chip.is-active { background: #fee9e7; color: #b72e28; }.chip-filter { margin-left: auto; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 0; }.metric { min-width: 0; border: 1px solid #e0e6ef; border-radius: 12px; background: #fff; padding: 11px; }.metric span { display: block; color: #6c7890; font-size: .75rem; }.metric strong { display: block; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; font-size: 1rem; }
.ranking-section { padding-bottom: 18px; }.section-heading { padding: 6px 2px 10px; }.text-button { min-height: 44px; background: transparent; color: #1d5eb5; padding: 0 8px; }.ranking-status { margin: 0 0 10px; color: #68768d; font-size: .88rem; }.ranking-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.stock-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; border: 1px solid #dce3ed; border-radius: 13px; background: #fff; padding: 12px; box-shadow: 0 3px 10px #10233f08; }.rank { display: grid; place-items: center; min-height: 28px; border-radius: 7px; background: #fff0ed; color: #b72e28; font-size: .75rem; font-weight: 900; }.stock-link { text-decoration: none; font-weight: 900; }.stock-name { display: block; margin-top: 3px; color: #6b7890; font-size: .82rem; font-weight: 500; }.market { display: inline-block; margin-left: 5px; color: #6b7890; font-size: .72rem; font-weight: 700; }.sparkline { display: block; width: 100%; height: 30px; margin-top: 8px; }.change { color: #bd302b; font-weight: 900; text-align: right; white-space: nowrap; }.change.down { color: #078467; }.retail { display: block; margin-top: 5px; color: #078467; font-size: .76rem; text-align: right; }.retail.up { color: #bd302b; }
.button { min-height: 44px; padding: 0 15px; background: #c73530; color: #fff; }.button-quiet { background: #eaf0f9; color: #193e70; }.app-header .button-quiet { background: #294563; color: #fff; }
dialog { width: min(100%, 520px); max-width: 520px; margin: auto 0 0; border: 0; border-radius: 20px 20px 0 0; padding: 18px 18px 24px; box-shadow: 0 -8px 30px #10233f40; }dialog::backdrop { background: #10233f99; }dialog form { display: grid; gap: 13px; }dialog label { display: grid; gap: 5px; color: #35455e; font-size: .88rem; font-weight: 800; }dialog select, dialog input[type="number"] { border: 1px solid #c8d1df; border-radius: 9px; padding: 0 10px; background: #fff; } .dialog-handle { width: 42px; height: 4px; border-radius: 4px; margin: -7px auto 0; background: #c3ccd9; }.dialog-note { margin: 0; color: #68768d; font-size: .82rem; }.check-label { display: flex; align-items: center; min-height: 44px; }.check-label input { min-height: 20px; width: 20px; }.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.ios-tip { position: fixed; right: 12px; bottom: 12px; left: 12px; z-index: 5; border: 1px solid #b9c9df; border-radius: 13px; background: #fff; box-shadow: 0 8px 28px #10233f33; padding: 14px; }.ios-tip p { margin-bottom: 8px; }.footer { border-top: 1px solid #dce3ed; padding: 18px 0 30px; color: #647188; font-size: .8rem; }.footer p { margin-bottom: 8px; }.footer a { color: #1d5eb5; }
.detail-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }.back-link { min-height: 44px; display: inline-flex; align-items: center; color: #fff; font-weight: 800; text-decoration: none; }.quote-value { margin: 0; color: #fff; font-weight: 900; text-align: right; }.detail-main { padding-top: 16px; padding-bottom: 18px; }.offline-indicator { border: 1px solid #d4a42d; border-radius: 10px; background: #fff7dc; color: #765100; padding: 10px; font-weight: 700; }.threshold-section, .chart-section, .table-section { margin-top: 14px; border: 1px solid #dce3ed; border-radius: 14px; background: #fff; padding: 14px; }.threshold-section h2 { margin-bottom: 12px; }.threshold-groups { display: grid; gap: 12px; }.threshold-groups fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }.threshold-groups legend { margin-bottom: 6px; color: #42526a; font-size: .86rem; font-weight: 800; }.segmented { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }.segmented button, .tabs button { min-height: 44px; border: 1px solid #c8d1df; border-radius: 9px; background: #f8fafc; color: #40516a; font-weight: 800; }.segmented [aria-pressed="true"] { border-color: #c73530; background: #fee9e7; color: #a92c28; }.tabs { display: flex; gap: 7px; justify-content: center; margin: 10px 0; }.tabs [aria-selected="true"] { border-color: #10233f; background: #10233f; color: #fff; }.chart-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 13px; color: #506078; font-size: .82rem; }.chart-legend span::before { content: ""; display: inline-block; width: 12px; height: 3px; margin-right: 4px; vertical-align: middle; }.legend-big::before { background: #c73530; }.legend-retail::before { background: #078467; }.legend-close::before { background: #6c7890; }.ownership-chart { display: block; width: 100%; height: auto; margin-top: 5px; }.chart-axis { fill: #647188; font-size: 11px; }.chart-tooltip { min-height: 24px; margin-top: 5px; color: #42526a; font-size: .86rem; text-align: center; }.table-note { color: #68768d; font-size: .8rem; }.table-scroll { overflow-x: auto; }.table-scroll table { width: 100%; min-width: 570px; border-collapse: collapse; }.table-scroll th, .table-scroll td { border-bottom: 1px solid #e3e8f0; padding: 10px 8px; text-align: right; white-space: nowrap; }.table-scroll th:first-child, .table-scroll td:first-child { text-align: left; }.table-scroll th { color: #526177; font-size: .82rem; }.is-up { color: #bd302b; font-weight: 800; }.is-down { color: #078467; font-weight: 800; }
@media (min-width: 720px) { .app-header { padding-top: 24px; }.tools { border-radius: 16px; margin-top: 18px; }.summary { gap: 12px; }.metric { padding: 14px; }.ranking-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }.stock-row { min-height: 140px; } dialog { margin: auto; border-radius: 18px; } }
