@charset "UTF-8";

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #17231e;
  --muted: #53625b;
  --line: #dbe2e6;
  --forest: #006b43;
  --forest-soft: #e4f4ec;
  --red: #cf172b;
  --red-soft: #ffedf0;
  --green: #007a43;
  --green-soft: #e5f5ec;
  --gold: #8c5a00;
  --gold-soft: #fff3d6;
  --blue: #155bc1;
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-synthesis: none;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; }
p, h1, h2, h3 { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { border: 0; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select { min-width: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
[hidden] { display: none !important; }
input[type="checkbox"] { accent-color: var(--forest); width: 20px; height: 20px; }
.icon { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.up { color: var(--red) !important; }
.down { color: var(--green) !important; }
.label, .fine-print { font-size: 14px; color: var(--muted); }
.fine-print { line-height: 1.8; }
.status-dot, .demo-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--forest); flex-shrink: 0; }
.tag { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 6px; font-size: 13px; }
.tag.positive { background: var(--red-soft); color: var(--red); }
.tag.warning { background: var(--gold-soft); color: var(--gold); }
.tag.neutral { background: var(--forest-soft); color: var(--forest); }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 9px; background: transparent; color: var(--forest); }
.icon-button:hover { background: var(--forest-soft); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; min-height: 46px; border-radius: 8px; font-size: 15px; font-weight: 500; }
.button.primary { background: var(--forest); color: #fff; }
.button.primary:hover { background: #005233; }
.button.secondary { background: var(--forest-soft); color: var(--forest); }
.button:disabled { opacity: .65; cursor: wait; }
.full-width { width: 100%; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; background: transparent; color: var(--forest); font-size: 14px; padding: 5px 0; }
.text-button .icon { width: 18px; height: 18px; }

/* Navigation */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 194px; padding: 30px 20px; border-right: 1px solid var(--line); background: var(--surface); z-index: 30; }
.brand { display: flex; align-items: center; gap: 12px; font-family: "Songti SC", "STSong", "SimSun", serif; font-size: 29px; font-weight: 600; letter-spacing: 2px; color: var(--forest); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--forest); color: #fff; flex-shrink: 0; }
.brand-mark .icon { width: 25px; height: 25px; }
.desktop-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 30px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 49px; padding: 10px 13px; border-radius: 9px; font-size: 16px; color: var(--muted); }
.nav-link.active { color: var(--forest); background: var(--forest-soft); font-weight: 600; }
.nav-link:hover { color: var(--forest); }
.nav-link:last-child { margin-top: 22px; }
.app-shell { margin-left: 194px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 74px; padding: 0 36px; border-bottom: 1px solid var(--line); background: var(--surface); }
.breadcrumb { font-size: 16px; color: var(--ink); font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.date-label { font-size: 14px; color: var(--muted); }
.mobile-brand, .mobile-nav { display: none; }

/* Layout and data overview */
main { max-width: 1520px; margin: auto; padding: 24px 36px 32px; }
.demo-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 11px 14px; margin-bottom: 22px; border: 1px solid #dfc88c; border-radius: 8px; background: var(--gold-soft); font-size: 13px; color: #714a00; }
.demo-dot { background: var(--gold); width: 6px; height: 6px; }
.demo-banner strong { font-weight: 600; white-space: nowrap; }
.demo-banner a { margin-left: auto; white-space: nowrap; color: #714a00; }
.free-banner { background: #eaf2ff; border-color: #a9c4f0; color: #164479; }
.free-banner a { color: #164479; }
.quote-meta { display: block; font-size: 13px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.ticker-item .quote-meta { margin-top: 3px; }
.chart-warning { font-size: 14px; line-height: 1.7; color: #714a00; padding: 10px 12px; background: var(--gold-soft); border-radius: 6px; margin-bottom: 12px; }
.metrics-missing { padding: 18px; color: var(--muted); font-size: 15px; }
.error-banner { padding: 13px 16px; margin: 14px 0; background: var(--red-soft); color: var(--red); border-radius: 8px; font-size: 15px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
h1 { font-size: 25px; font-weight: 600; line-height: 1.4; }
.page-subtitle { font-size: 14px; color: var(--muted); margin-top: 6px; }
.market-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; color: var(--muted); }
.global-ticker { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); margin-bottom: 22px; padding: 20px 5px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ticker-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 0 18px; border-right: 1px solid var(--line); background: transparent; text-align: left; }
.ticker-item:last-child { border-right: 0; }
.ticker-name { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); }
.ticker-country { font-size: 11px; color: var(--muted); }
.ticker-value { font-size: 25px; font-weight: 600; letter-spacing: -.045em; }
.ticker-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ticker-change { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ticker-spark { width: 48px; height: 20px; }
.ticker-spark polyline { fill: none; stroke: currentColor; stroke-width: 2; }
.overview-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 22px; }
.panel { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.panel-heading h2 { font-size: 18px; font-weight: 600; }
.turnover-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.turnover-number { display: flex; align-items: baseline; gap: 10px; margin: 3px 0; }
.turnover-number > span:first-child { font-size: 48px; line-height: 1.4; font-weight: 600; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.turnover-number > span:last-child { font-size: 15px; color: var(--muted); }
.turnover-delta { display: flex; flex-direction: column; gap: 5px; text-align: right; }
.turnover-delta strong { font-size: 25px; font-weight: 600; letter-spacing: -.025em; }
.turnover-comparisons { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 20px 0 24px; }
.turnover-comparisons > div { padding-left: 13px; border-left: 1px solid var(--line); }
.turnover-comparisons > div:first-child { border: 0; padding-left: 0; }
.turnover-comparisons span { display: block; font-size: 13px; color: var(--muted); }
.turnover-comparisons strong { display: block; font-size: 19px; font-weight: 600; margin-top: 5px; }
.volume-insight { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 15px; background: var(--forest-soft); border-radius: 9px; text-align: left; }
.insight-icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 7px; background: var(--forest); color: #fff; font-size: 24px; }
.volume-insight > span:nth-child(2) { flex: 1; }
.volume-insight strong { display: block; font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.volume-insight > span:nth-child(2) > span { display: block; font-size: 14px; color: #275a41; line-height: 1.8; }
.small-arrow { color: var(--forest); font-size: 20px; }
.breadth { margin-top: 24px; }
.breadth-labels { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.breadth-labels strong { color: var(--ink); font-weight: 600; margin-left: 4px; }
.breadth-labels > span:first-child strong { color: var(--red); }
.breadth-labels > span:last-child strong { color: var(--green); }
.breadth-track { display: flex; gap: 3px; height: 8px; margin-top: 10px; overflow: hidden; border-radius: 4px; }
.breadth-up { background: #df1d31; }
.breadth-flat { background: #89969e; }
.breadth-down { background: #008a46; }
.breadth-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 11px; }
.activity-panel { display: flex; flex-direction: column; }
.activity-gauge { width: 100%; max-width: 280px; margin: 6px auto 0; }
.activity-gauge svg { display: block; width: 100%; }
.gauge-track { fill: none; stroke: #e0e7e3; stroke-width: 14; stroke-linecap: round; }
.gauge-fill { fill: none; stroke: #00834b; stroke-width: 14; stroke-linecap: round; stroke-dasharray: 0 100; }
.gauge-value { font-size: 51px; fill: var(--ink); font-weight: 600; }
.gauge-label { font-size: 13px; fill: var(--muted); }
.gauge-extremes { display: flex; justify-content: space-between; margin: 0 15px; font-size: 13px; color: var(--muted); }
.activity-caption { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 19px 0 12px; font-size: 16px; }
.activity-caption strong { font-weight: 600; color: var(--forest); }
.activity-caption > span:last-child { flex-basis: 100%; text-align: center; font-size: 14px; color: var(--muted); }
.activity-panel .fine-print { text-align: center; margin-top: auto; padding-top: 15px; font-size: 13px; }
.focus-quote { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.focus-quote > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.focus-quote strong { font-size: 16px; font-weight: 500; }
.focus-quote .mono { font-size: 25px; font-weight: 600; }
.mini-chart { position: relative; height: 205px; margin-top: 16px; }
.level-preview { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 14px; color: var(--muted); }
.level-preview strong { color: var(--ink); font-size: 15px; margin-left: 3px; font-weight: 500; }
.level-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.level-dot.resistance { background: var(--red); }
.level-dot.support { background: var(--green); }
.next-event { display: flex; align-items: center; gap: 18px; padding: 8px 0; }
.event-date { display: flex; align-items: center; justify-content: center; flex-direction: column; min-width: 72px; padding: 13px 9px; border-radius: 9px; background: var(--forest-soft); }
.event-date strong { font-size: 34px; font-weight: 600; line-height: 1.2; color: var(--forest); }
.event-date span { font-size: 12px; color: var(--forest); margin-top: 6px; }
.next-event h3 { font-size: 18px; font-weight: 600; margin-top: 10px; }
.next-event p { font-size: 14px; color: var(--muted); margin-top: 5px; }
.event-sectors { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.event-sectors span { font-size: 13px; padding: 5px 9px; border-radius: 5px; background: #edf3ff; color: #25599c; }
.weekly-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 15px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.weekly-note .icon { width: 18px; height: 18px; color: var(--forest); }
.connection-label { color: var(--gold); }
.page-footer { margin-top: 22px; font-size: 13px; color: var(--muted); }

/* K-line and technical levels */
.chart-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.segmented { display: flex; gap: 4px; padding: 4px; background: #edf1f4; border-radius: 9px; }
.segmented button { min-height: 42px; padding: 7px 16px; border-radius: 6px; background: transparent; color: var(--muted); font-size: 16px; }
.segmented button.selected { background: var(--forest); color: #fff; font-weight: 500; }
.chart-status { font-size: 13px; color: var(--muted); }
.chart-quote { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.chart-quote h2 { font-size: 20px; font-weight: 600; margin-bottom: 3px; }
.chart-price-block { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; text-align: right; margin-left: auto; }
.chart-price-block strong { font-size: 35px; font-weight: 600; }
.chart-price-block > span { font-size: 18px; font-weight: 500; }
.chart-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; border-block: 1px solid var(--line); padding: 9px 0; }
.period-controls, .range-controls { display: flex; gap: 4px; }
.period-controls button, .range-controls button, .alert-filter button { min-height: 42px; padding: 7px 12px; border-radius: 7px; font-size: 15px; background: transparent; color: var(--muted); }
.period-controls button.selected, .range-controls button.selected, .alert-filter button.selected { background: var(--forest-soft); color: var(--forest); font-weight: 600; }
.range-controls { margin-left: auto; }
.check-label { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 14px; color: var(--muted); }
.check-label input { width: 18px; height: 18px; }
.ma-dot { display: inline-block; width: 14px; height: 3px; background: #af7100; }
.main-chart { position: relative; height: 440px; margin-top: 12px; }
.kline-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.chart-overlay { position: absolute; inset: 0; pointer-events: none; }
.chart-zone { position: absolute; left: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 3px 6px; border-left: 3px solid currentColor; border-radius: 3px; background: transparent; pointer-events: auto; color: var(--red); text-align: left; }
.chart-zone.support { color: var(--green); }
.chart-zone.selected { outline: 1px solid currentColor; outline-offset: -1px; }
.chart-zone strong { padding: 3px 6px; border-radius: 4px; background: #fff; font-size: 14px; font-weight: 600; }
.chart-zone > span:last-child { font-size: 13px; }
.chart-tooltip { position: absolute; top: 15px; left: 14px; padding: 10px 12px; max-width: 290px; border: 1px solid #a8b5ac; border-radius: 8px; background: #fff; color: var(--ink); box-shadow: 0 3px 15px #19291c15; font-size: 14px; line-height: 1.9; z-index: 4; pointer-events: none; }
.chart-tooltip strong { font-weight: 600; }
.chart-crosshair { position: absolute; width: 1px; border-left: 1px dashed #53625b; pointer-events: none; z-index: 3; }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 14px; height: 3px; background: var(--blue); }
.chart-legend .legend-average { background: #af7100; }
.chart-legend .legend-previous { height: 0; border-top: 1px dashed #53625b; background: transparent; }
.zone-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.zone-links button { min-height: 42px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 14px; }
.zone-links button.support { color: var(--green); }
.zone-links button.resistance { color: var(--red); }
.zone-links button.selected { border-color: currentColor; background: #f4f8f5; }
.chart-data-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 11px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.zone-detail { min-height: 145px; padding: 18px; border-radius: 9px; background: #f0f4f2; }
.zone-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.zone-heading h3 { font-size: 18px; font-weight: 600; }
.zone-stars { color: var(--gold); font-size: 15px; }
.zone-distance { margin-left: auto; font-size: 14px; color: var(--muted); }
.zone-detail p { font-size: 16px; color: #334b3c; margin-top: 12px; line-height: 1.9; }
.basis-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.basis-tags span { padding: 4px 9px; border-radius: 5px; background: #dfebe4; color: #24553d; font-size: 14px; }

/* Watchlist, calendar and alerts */
.list-heading, .watch-item { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 115px; gap: 18px; }
.list-heading { padding-bottom: 15px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.list-heading > span:last-child { text-align: right; }
.watch-item { align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.watch-item:last-child { border-bottom: 0; }
.watch-name { display: block; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.watch-symbol { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.watch-rule { font-size: 16px; color: var(--ink); }
.watch-rule small { display: block; margin-top: 5px; font-size: 13px; color: var(--muted); }
.watch-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.watch-actions button { min-height: 42px; padding: 6px 0; font-size: 15px; color: var(--forest); background: transparent; }
.watch-actions .remove { color: #a12727; }
.notice-note { display: flex; align-items: flex-start; gap: 10px; margin: 21px 0; font-size: 14px; color: var(--muted); line-height: 1.9; }
.notice-note .icon { width: 20px; height: 20px; margin-top: 4px; }
.empty-state { text-align: center; padding: 45px 15px; color: var(--muted); }
.empty-state > .icon { width: 35px; height: 35px; }
.empty-state h3 { font-size: 19px; font-weight: 500; margin: 12px; }
.empty-state p { font-size: 15px; }
.calendar-layout { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); align-items: start; gap: 22px; }
.calendar-week-label { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-bottom: 18px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.calendar-week-label > span:first-child { font-size: 16px; font-weight: 500; color: var(--ink); }
.calendar-event { padding: 24px 0; border-bottom: 1px solid var(--line); }
.calendar-event:last-child { border: 0; padding-bottom: 0; }
.calendar-event-top { display: flex; gap: 16px; }
.event-time { min-width: 50px; font-size: 17px; color: var(--ink); font-weight: 600; }
.event-meta { flex: 1; min-width: 0; }
.event-title-line { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px; }
.event-title-line h3 { font-size: 18px; font-weight: 600; }
.importance { font-size: 14px; color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.event-source { display: block; margin-top: 7px; font-size: 13px; color: var(--blue); }
.event-analysis { font-size: 15px; color: #35453b; line-height: 1.9; margin-top: 15px; }
.calendar-event .event-sectors { margin: 13px 0 0; }
.calendar-guide h2 { font-size: 19px; font-weight: 600; margin-bottom: 15px; }
.calendar-guide > p { font-size: 15px; color: var(--muted); line-height: 1.9; }
.scenario { display: flex; gap: 13px; margin-top: 24px; }
.scenario-line { width: 4px; border-radius: 2px; flex-shrink: 0; }
.scenario-line.positive { background: var(--green); }
.scenario-line.negative { background: var(--red); }
.scenario h3 { font-size: 16px; font-weight: 600; }
.scenario p { font-size: 15px; line-height: 1.9; color: var(--muted); margin-top: 6px; }
.calendar-guide .fine-print { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 25px; font-size: 14px; }
.source-link { display: inline-block; margin-top: 17px; font-size: 14px; color: var(--blue); }
.alert-filter { display: flex; gap: 8px; margin-bottom: 18px; }
.alert-card { display: flex; align-items: flex-start; gap: 15px; padding: 23px; margin-bottom: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.alert-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 9px; background: var(--red-soft); color: var(--red); font-size: 26px; }
.alert-icon.event { background: var(--gold-soft); color: var(--gold); }
.alert-content { flex: 1; min-width: 0; }
.alert-content h3 { font-size: 18px; font-weight: 600; }
.alert-content p { margin-top: 8px; font-size: 15px; color: var(--muted); line-height: 1.9; }
.alert-content time { display: block; margin-top: 13px; font-size: 13px; color: var(--muted); }

/* Forms and account */
.settings-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 22px; }
.settings-description { font-size: 15px; color: var(--muted); line-height: 1.9; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; font-size: 15px; color: var(--muted); }
.field input, .field select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #a9b6ae; border-radius: 7px; background: #fff; color: var(--ink); font-size: 16px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 22px 0; font-size: 15px; color: var(--ink); }
.toggle-row input { flex-shrink: 0; }
.source-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.source-row:last-child { border: 0; padding-bottom: 0; }
.source-row strong { font-size: 16px; font-weight: 600; }
.source-row p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.source-state { font-size: 14px; color: var(--gold); white-space: nowrap; }
.source-state.ready { color: var(--green); }
.account-panel p { font-size: 15px; color: var(--muted); line-height: 1.9; }
.account-panel .fine-print { margin-top: 20px; }
.settings-form .button { margin-top: 5px; }
.app-dialog { width: min(92vw,470px); max-height: 90dvh; overflow: auto; padding: 26px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 90px #18271a35; }
.app-dialog::backdrop { background: #19291f80; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 23px; }
.dialog-heading h2 { font-size: 22px; font-weight: 600; }
.two-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.dialog-error { font-size: 15px; color: var(--red); margin-bottom: 14px; }
.app-dialog .fine-print { margin-top: 16px; }
.info-content p { font-size: 16px; color: #34493a; line-height: 1.9; margin-bottom: 15px; }
.info-content ul { font-size: 15px; color: #34493a; line-height: 2; padding-left: 20px; }
.toast { position: fixed; bottom: 28px; left: calc(50% + 97px); transform: translateX(-50%); max-width: 90vw; width: max-content; padding: 13px 20px; border-radius: 9px; background: #005936; color: #fff; font-size: 15px; box-shadow: 0 8px 25px #26382e22; z-index: 100; }
.login-screen { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: var(--bg); z-index: 200; }
.login-card { width: min(100%,390px); padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.login-card > .brand-mark { margin-bottom: 22px; }
.login-card h1 { font-size: 28px; margin-bottom: 25px; color: var(--forest); }

@media (max-width: 1190px) {
  .sidebar { width: 174px; padding-inline: 16px; }
  .app-shell { margin-left: 174px; }
  .topbar { padding-inline: 25px; }
  main { padding-inline: 25px; }
  .ticker-item { padding-inline: 12px; }
  .ticker-value { font-size: 23px; }
  .ticker-country { display: none; }
  .panel { padding: 22px; }
  .overview-grid { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 18px; }
  .toast { left: calc(50% + 87px); }
}

@media (max-width: 1020px) {
  .sidebar { width: 78px; padding: 26px 12px; }
  .brand { justify-content: center; }
  .brand > span:last-child, .desktop-nav .nav-link > span { display: none; }
  .nav-link { justify-content: center; padding-inline: 0; }
  .desktop-nav { margin-top: 25px; }
  .app-shell { margin-left: 78px; }
  .overview-grid { grid-template-columns: minmax(0,1fr); }
  .global-ticker { grid-template-columns: repeat(3,minmax(0,1fr)); row-gap: 20px; }
  .ticker-item:nth-child(3) { border-right: 0; }
  .calendar-layout, .settings-grid { grid-template-columns: minmax(0,1fr); }
  .calendar-guide { display: block; }
  .activity-panel .fine-print { margin-top: 0; }
  .toast { left: calc(50% + 39px); }
}

@media (max-width: 700px) {
  .sidebar, .breadcrumb, .date-label { display: none; }
  .app-shell { margin-left: 0; }
  .topbar { height: 66px; padding: 0 16px; }
  .mobile-brand { display: flex; align-items: center; gap: 10px; font-family: "Songti SC", "STSong", "SimSun", serif; font-size: 28px; font-weight: 600; letter-spacing: 1px; color: var(--forest); }
  .mobile-brand .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
  .topbar-actions { gap: 4px; }
  .mobile-nav { position: fixed; inset: auto 0 0; display: flex; padding: 5px 3px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; z-index: 40; }
  .mobile-nav .nav-link { display: flex; flex: 1; flex-direction: column; gap: 3px; min-height: 58px; padding: 5px 0; border-radius: 0; color: var(--muted); font-size: 13px; }
  .mobile-nav .nav-link.active { background: transparent; color: var(--forest); }
  .mobile-nav .nav-link > span { display: block; }
  .mobile-nav .nav-link:last-child { margin: 0; }
  .mobile-nav .nav-link[data-route="settings"] { display: none; }
  .mobile-nav .icon { width: 24px; height: 24px; }
  main { padding: 16px 16px calc(104px + env(safe-area-inset-bottom)); }
  .demo-banner { gap: 6px; padding: 10px 12px; margin-bottom: 18px; font-size: 13px; }
  .demo-banner > span:nth-of-type(2) { flex-basis: 100%; padding-left: 12px; }
  .demo-banner a { display: none; }
  .page-heading { margin-bottom: 18px; }
  h1 { font-size: 24px; }
  .page-subtitle { font-size: 15px; }
  .market-pill { font-size: 13px; }
  .global-ticker { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 0; padding: 18px 0; margin-bottom: 18px; }
  .ticker-item { gap: 5px; padding: 0 16px; border: 0; }
  .ticker-item:nth-child(2), .ticker-item:nth-child(4) { border-right: 1px solid var(--line); }
  .ticker-item:first-child { grid-column: 1/-1; display: grid; grid-template-columns: 1fr auto; gap: 3px 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .ticker-item:first-child .ticker-name { grid-column: 1; grid-row: 1; }
  .ticker-item:first-child .ticker-value { grid-column: 1; grid-row: 2; font-size: 32px; }
  .ticker-item:first-child .ticker-bottom { grid-column: 2; grid-row: 1/3; flex-direction: column; justify-content: center; gap: 9px; }
  .ticker-name { font-size: 15px; }
  .ticker-value { font-size: 25px; }
  .ticker-change { font-size: 16px; }
  .ticker-spark { width: 42px; height: 18px; }
  .overview-grid { gap: 18px; }
  .panel { padding: 20px; border-radius: 12px; }
  .panel-heading { gap: 8px; margin-bottom: 20px; }
  .panel-heading h2 { font-size: 19px; }
  .panel-heading .text-button { font-size: 14px; }
  .turnover-number > span:first-child { font-size: 46px; }
  .turnover-number > span:last-child { font-size: 15px; }
  .turnover-delta strong { font-size: 24px; }
  .turnover-comparisons { gap: 8px; margin: 20px 0; }
  .turnover-comparisons > div { padding-left: 10px; }
  .turnover-comparisons span { font-size: 13px; }
  .turnover-comparisons strong { font-size: 19px; }
  .volume-insight { gap: 10px; padding: 14px 12px; }
  .volume-insight strong { font-size: 17px; }
  .volume-insight > span:nth-child(2) > span { font-size: 15px; }
  .small-arrow { display: none; }
  .breadth-labels { font-size: 14px; gap: 8px 5px; }
  .breadth-foot { font-size: 14px; }
  .activity-gauge { max-width: 260px; }
  .activity-caption { font-size: 18px; }
  .activity-caption > span:last-child { font-size: 15px; }
  .activity-panel .fine-print { font-size: 14px; }
  .focus-quote .mono { font-size: 27px; }
  .focus-quote .tag { font-size: 14px; }
  .mini-chart { height: 220px; }
  .level-preview { flex-direction: column; gap: 9px; font-size: 16px; }
  .level-preview strong { font-size: 17px; }
  .next-event { gap: 15px; }
  .event-date { min-width: 68px; }
  .next-event h3 { font-size: 19px; }
  .next-event p { font-size: 15px; }
  .weekly-note { font-size: 14px; }
  .connection-label { flex-basis: 100%; padding-left: 26px; }
  .event-sectors span { font-size: 14px; }
  .chart-panel { padding: 17px 12px; }
  .chart-top { gap: 9px; margin-bottom: 22px; }
  .segmented button { font-size: 16px; padding-inline: 12px; }
  .chart-status { font-size: 14px; }
  .chart-quote { padding-inline: 4px; gap: 12px; }
  .chart-quote h2 { font-size: 19px; }
  .chart-price-block { flex-direction: column; align-items: flex-end; gap: 2px; }
  .chart-price-block strong { font-size: 32px; }
  .chart-price-block > span { font-size: 18px; }
  .chart-toolbar { gap: 8px; }
  .period-controls, .range-controls { gap: 2px; }
  .period-controls button, .range-controls button { min-height: 44px; padding-inline: 9px; font-size: 15px; }
  .check-label { font-size: 15px; }
  .main-chart { height: 430px; }
  .chart-zone strong { font-size: 13px; padding-inline: 3px; }
  .chart-zone > span:last-child { display: none; }
  .chart-tooltip { max-width: calc(100% - 8px); left: 4px; top: 5px; padding: 8px; font-size: 14px; }
  .chart-data-caption { font-size: 13px; }
  .zone-detail { padding: 16px; }
  .zone-heading h3 { font-size: 18px; }
  .zone-stars { margin-left: auto; }
  .zone-distance { flex-basis: 100%; margin: 0; font-size: 15px; }
  .zone-detail p { font-size: 16px; }
  .basis-tags span { font-size: 14px; }
  .list-heading { display: none; }
  .watch-item { grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding-block: 21px; }
  .watch-item > div:first-child { grid-column: 1; grid-row: 1; }
  .watch-name { font-size: 19px; }
  .watch-symbol { font-size: 15px; }
  .watch-rule { grid-column: 1/-1; grid-row: 2; font-size: 17px; }
  .watch-rule small { font-size: 14px; }
  .watch-actions { grid-column: 2; grid-row: 1; gap: 17px; }
  .watch-actions button { font-size: 15px; }
  .notice-note { font-size: 15px; }
  .calendar-event-top { flex-wrap: wrap; gap: 10px; }
  .event-time { font-size: 18px; }
  .event-meta { flex-basis: 100%; }
  .event-title-line h3 { font-size: 19px; }
  .event-source { font-size: 14px; }
  .event-analysis { font-size: 16px; }
  .importance { font-size: 14px; }
  .calendar-guide > p, .scenario p { font-size: 16px; }
  .scenario h3 { font-size: 18px; }
  .alert-filter { gap: 4px; }
  .alert-filter button { font-size: 15px; padding-inline: 10px; }
  .alert-card { padding: 18px; gap: 12px; }
  .alert-content h3 { font-size: 18px; }
  .alert-content p { font-size: 16px; }
  .alert-content time { font-size: 14px; }
  .settings-description, .account-panel p, .source-row p { font-size: 15px; }
  .source-row strong { font-size: 17px; }
  .source-state { font-size: 14px; }
  .toggle-row { font-size: 16px; }
  .app-dialog { padding: 22px; }
  .two-fields { gap: 12px; }
  .field { font-size: 16px; }
  .toast { left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); font-size: 15px; }
}

@media (max-width: 360px) {
  main { padding-inline: 12px; }
  .panel { padding: 17px; }
  .chart-panel { padding-inline: 10px; }
  .global-ticker .ticker-item { padding-inline: 13px; }
  .ticker-value { font-size: 23px; }
  .ticker-spark { width: 32px; }
  .turnover-head { align-items: flex-start; }
  .turnover-delta { flex-basis: 100%; text-align: left; flex-direction: row; align-items: center; gap: 10px; }
  .turnover-delta strong { font-size: 23px; }
  .turnover-comparisons span { font-size: 13px; }
  .turnover-comparisons strong { font-size: 18px; }
  .panel-heading { gap: 6px; }
  .next-event { align-items: flex-start; }
  .chart-price-block strong { font-size: 30px; }
  .chart-zone strong { font-size: 12px; }
  .watch-actions { gap: 12px; }
  .source-row { align-items: flex-start; gap: 10px; }
}

/* Positions first: a compact selector and one on-demand chart. */
.heading-inline { display: flex; align-items: baseline; gap: 12px; }
.watchlist-section { margin-top: 32px; padding-top: 25px; border-top: 1px solid var(--line); scroll-margin-top: 18px; }
.watchlist-section .page-heading h2 { font-size: 25px; font-weight: 600; line-height: 1.4; }
#position-empty { padding: 24px 18px; }
.holding-list { display: flex; overflow-x: auto; scroll-snap-type: x proximity; gap: 12px; padding: 2px 2px 8px; margin-bottom: 12px; }
.holding-tile { min-width: 0; flex: 0 0 350px; max-width: 100%; scroll-snap-align: start; padding: 18px; border: 1px solid #b9c8bf; border-radius: 10px; background: #fff; text-align: left; }
.holding-tile.selected { border: 2px solid var(--forest); padding: 17px; background: #f2faf6; }
.holding-title { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.holding-title strong { font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.holding-title .label { overflow-wrap: anywhere; }
.holding-quote { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.holding-quote > strong { font-size: 28px; font-weight: 600; }
.holding-quote > span { font-size: 18px; }
.price-spark { width: 80px; height: 30px; flex-shrink: 0; margin-left: auto; }
.price-spark polyline { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ticker-bottom .price-spark { width: 48px; height: 23px; }
.holding-levels, .stock-levels { font-size: 15px; color: var(--muted); margin-top: 12px; line-height: 1.9; overflow-wrap: anywhere; }
#position-chart { scroll-margin-top: 16px; }
.empty-state h2 { font-size: 21px; font-weight: 600; margin-bottom: 12px; }
.empty-state .button { margin-top: 20px; }
.market-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.market-picker button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); }
.market-picker button.selected { border-color: var(--forest); color: var(--forest); background: var(--forest-soft); font-weight: 600; }
.chart-code { display: block; margin-top: 3px; }
.chart-basic-data, .ma-values { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0 0 16px; }
.chart-basic-data dt, .ma-values dt { color: var(--muted); font-size: 14px; }
.chart-basic-data dd, .ma-values dd { font-size: 17px; margin: 2px 0 0; }
.technical-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 16px; padding-bottom: 14px; font-size: 16px; }
.technical-summary strong { font-weight: 600; color: var(--forest); }
.technical-summary > span { color: var(--muted); }
.chart-loading { opacity: .55; pointer-events: none; }
.ma-details { padding-top: 14px; color: var(--muted); }
.ma-details summary { cursor: pointer; min-height: 36px; font-size: 15px; }
.ma-values { grid-template-columns: repeat(5,minmax(0,1fr)); margin-top: 12px; }
.watchlist-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 20px; }
.group-filter-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; max-width: 100%; }
.group-filter-label select { max-width: 190px; min-height: 44px; padding: 7px 10px; border: 1px solid #a9b6ae; border-radius: 7px; background: #fff; color: var(--ink); font-size: 16px; }
.stock-list { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }
.stock-card { padding: 20px 23px; }
.stock-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.stock-link { min-width: 0; }
.stock-link:hover .watch-name { color: var(--forest); text-decoration: underline; }
.stock-quote { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: flex-end; gap: 3px 16px; text-align: right; }
.stock-quote strong { font-size: 25px; font-weight: 600; }
.stock-quote > span { font-size: 17px; }
.stock-card-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; margin-top: 10px; }
.position-check { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 16px; }
.position-check input { margin: 0; }
.stock-rule { font-size: 14px; color: var(--muted); margin-top: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.stock-card .watch-actions { gap: 18px; }
.stock-card .text-button { font-size: 15px; min-height: 44px; }
.watch-symbol { overflow-wrap: anywhere; }
.group-create-form { display: flex; align-items: flex-end; gap: 12px; }
.group-create-form .field { min-width: 0; flex: 1; margin-bottom: 0; }
.group-create-form .button { flex-shrink: 0; }
.group-edit-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.group-edit-row input { flex: 1; width: 0; min-height: 44px; padding: 7px 10px; border: 1px solid #a9b6ae; border-radius: 7px; font-size: 16px; }
.group-edit-row .label { white-space: nowrap; }
.group-edit-row .remove { color: var(--red); }
@media (max-width: 700px) {
  .watchlist-section { margin-top: 25px; padding-top: 20px; }
  .watchlist-section .page-heading h2 { font-size: 24px; }
  .holding-list { gap: 10px; margin-bottom: 10px; }
  .holding-tile { flex-basis: calc(100% - 20px); padding: 15px; }
  .holding-tile:only-child { flex-basis: 100%; }
  .holding-tile.selected { padding: 14px; }
  .holding-quote { margin-top: 4px; }
  .holding-levels { margin-top: 6px; }
  .chart-basic-data { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 16px; padding-inline: 4px; }
  .ma-values { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .technical-summary { font-size: 16px; padding-inline: 4px; }
  .market-picker { gap: 7px; }
  .market-picker button { padding-inline: 11px; font-size: 15px; }
  .watchlist-toolbar { gap: 8px 18px; }
  .watchlist-toolbar > .segmented { flex-basis: 100%; width: max-content; }
  .stock-card { padding: 17px; }
  .stock-quote { flex-direction: column; gap: 1px; align-items: flex-end; flex-shrink: 0; }
  .stock-quote strong { font-size: 25px; }
  .stock-card-actions { row-gap: 1px; }
  .stock-card .watch-actions { justify-content: flex-start; gap: 18px; flex-wrap: wrap; }
  .stock-levels { font-size: 15px; margin-top: 8px; }
  .stock-rule { font-size: 14px; }
  .chart-data-caption { font-size: 13px; }
  .demo-banner > span:nth-of-type(2) { flex-basis: auto; padding-left: 0; }
}
@media (max-width: 360px) {
  .holding-quote { gap: 5px 10px; }
  .holding-quote .price-spark { width: 55px; }
  .stock-card { padding: 15px; }
  .group-edit-row { gap: 8px; }
  .group-edit-row .label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
