:root {
  --bg: #000000;
  --surface: #0c0c0c;
  --surface2: #141414;
  --border: rgba(255, 202, 4, 0.22);
  --gold: #ffca04;
  --gold-deep: #d4a000;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --green: #5ee89a;
  --red: #f87171;
  --blue: #5b8cff;
  --purple: #c084fc;
  --yellow: #ffca04;
  --font: "Noto Sans HK", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
html { overscroll-behavior-y: none; }

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 45% at 50% -10%, rgba(255, 202, 4, 0.07), transparent 55%);
  z-index: 0;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
}

.ptr-slot {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 50%;
  width: 2.15rem;
  height: 2.15rem;
  margin-left: -1.075rem;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s linear;
}
.ptr-slot.show { opacity: 1; }
.ptr-spinner {
  width: 1.28rem;
  height: 1.28rem;
  border: 2px solid rgba(255, 202, 4, 0.22);
  border-top-color: var(--gold);
  border-radius: 50%;
}
.ptr-slot.spin .ptr-spinner { animation: ptr-spin 0.68s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
.topbar.ptr-move,
.layout.ptr-move {
  will-change: transform;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem 0.5rem;
  gap: 0.75rem;
}

.brand { flex: 0 0 auto; }
.brand h1 { font-size: 1.18rem; font-weight: 700; color: var(--gold); letter-spacing: 0.04em; }
.subtitle { font-size: 0.82rem; color: var(--muted); margin-top: 0.1rem; }

.header-spark-wrap {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 11rem;
  height: 2.7rem;
  margin: 0.1rem 0.35rem 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-spark {
  width: 100%;
  height: 100%;
  display: block;
}
.market-badge {
  position: absolute;
  right: 0;
  bottom: -0.15rem;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  line-height: 1.3;
}

.price-block { text-align: right; flex: 0 0 auto; min-width: 5.5rem; }
.price-main { font-size: 1.38rem; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; display: block; }
.price-vs-m5 { font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; font-variant-numeric: tabular-nums; }
.price-vs-m5.up { color: var(--green); }
.price-vs-m5.down { color: var(--red); }

.layout {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0.85rem 1rem calc(6.75rem + env(safe-area-inset-bottom, 0px));
}

.panel { display: none; flex-direction: column; gap: 0.85rem; }
.panel.active { display: flex; }
/* data-tab (set before paint) must beat default .active so refresh keeps the open page */
html[data-tab] .panel,
html[data-tab] .panel.active { display: none; }
html[data-tab="radar"] #panel-radar,
html[data-tab="offers"] #panel-offers,
html[data-tab="chart"] #panel-chart,
html[data-tab="news"] #panel-news,
html[data-tab="calendar"] #panel-calendar { display: flex; }
html[data-tab="radar"] .bottom-nav-item[data-tab="radar"],
html[data-tab="offers"] .bottom-nav-item[data-tab="offers"],
html[data-tab="chart"] .bottom-nav-item[data-tab="chart"],
html[data-tab="news"] .bottom-nav-item[data-tab="news"],
html[data-tab="calendar"] .bottom-nav-item[data-tab="calendar"] { color: var(--gold); }

.radar-disclaimer {
  padding: 0 0.1rem 0.15rem;
  text-align: left;
}
.radar-disclaimer-title {
  margin: 0 0 0.28rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
}
.radar-disclaimer-body {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.65;
}

.gate-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
}
html[data-gate="1"] .gate-modal {
  display: flex !important;
}
html[data-gate="1"] {
  overflow: hidden;
}
.gate-sheet {
  padding-bottom: 1.15rem;
  border-color: #ffe566;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(168, 120, 0, 0.22),
    0 0 0 1px #ffe566,
    0 0 4px #ffca04,
    0 0 10px rgba(255, 202, 4, 0.95),
    0 0 20px rgba(255, 202, 4, 0.75),
    0 0 34px rgba(255, 202, 4, 0.52),
    0 0 48px rgba(212, 160, 0, 0.38);
}
.gate-copy {
  max-height: min(52vh, 28rem);
  overflow-y: auto;
  font-size: 0.86rem;
}
.gate-accept {
  display: block;
  width: 100%;
  margin-top: 1.1rem;
  padding: 0.78rem 1rem;
  border: none;
  border-radius: 10px;
  background: var(--gold);
  color: #2a1c00;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(168, 120, 0, 0.35),
    0 0 0 1px #ffe566,
    0 0 4px #ffca04,
    0 0 10px rgba(255, 202, 4, 0.85),
    0 0 20px rgba(255, 202, 4, 0.55);
}
.gate-accept:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}
.gate-accept:not(:disabled):active {
  opacity: 0.88;
}

.radar-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.85rem 0.65rem 0.85rem;
  overflow: visible;
}

.radar-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0 0.35rem 0.35rem;
}

.radar-title { font-size: 1rem; font-weight: 600; }
.radar-head-copy { min-width: 0; }
.radar-reload {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-top: 0.18rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--gold);
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.3;
  cursor: pointer;
}
.radar-reload-ico { width: 0.9rem; height: 0.9rem; flex-shrink: 0; display: block; }
.radar-reload.busy .radar-reload-ico { animation: ptr-spin 0.68s linear infinite; }
.radar-reload:disabled { opacity: 0.65; }

.radar-times {
  text-align: right;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--muted);
}
.radar-times p { margin: 0; }
.engine-hint {
  font-size: 0.78rem;
  color: #f87171;
  margin-top: 0.25rem;
}

.radar-times strong { color: var(--gold); font-variant-numeric: tabular-nums; }
.countdown-line { margin-top: 0.15rem; color: var(--muted); }
.countdown-line span { color: var(--gold); font-weight: 600; }

.radar-chart-wrap {
  width: 100%;
  height: 340px;
  margin: 0 auto;
  overflow: hidden;
}
.radar-svg { display: block; width: 100%; height: 100%; }
.radar-label-name { fill: var(--muted); font-size: 20px; font-family: var(--font); }
.radar-label-score { fill: var(--gold); font-size: 22px; font-weight: 700; font-family: var(--font); }
.radar-fill { fill: rgba(255, 202, 4, 0.2); stroke: none; }
.radar-stroke { fill: none; stroke: rgba(255, 202, 4, 0.85); stroke-width: 1.5; }

.radar-legend { display: none; }

.info-btn {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 202, 4, 0.4);
  background: transparent;
  color: var(--gold);
  font-size: 0.72rem;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}

.info-btn:active { background: rgba(255, 202, 4, 0.12); }

.metric-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.45rem;
  text-align: center;
}

.metric-card-label {
  font-size: 0.72rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.metric-card-val {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

.metric-card-val.signal-long { color: var(--green); }
.metric-card-val.signal-short { color: var(--red); }
.metric-card-val.signal-wait { color: var(--gold); }

.block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem;
}

.block-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.06em;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.ep-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.ep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.ep-table th {
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  padding: 0.4rem 0.35rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.ep-table td {
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.ep-table tbody tr.row-yellow td { background: rgba(255, 202, 4, 0.18); }
.ep-table tbody tr.row-blue td { background: rgba(91, 140, 255, 0.22); }
.ep-table tbody tr.row-purple td { background: rgba(192, 132, 252, 0.28); }
.ep-table tbody tr.row-gray td { background: rgba(156, 163, 175, 0.12); }

.ep-when { display: flex; flex-direction: column; gap: 0.08rem; line-height: 1.2; }
.ep-when-d { font-size: 0.76rem; color: var(--muted); }
.ep-when-t { font-weight: 650; font-variant-numeric: tabular-nums; }
.ep-when-cal { font-size: 0.68rem; color: var(--gold); font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.ep-tag { display: block; font-size: 0.68rem; color: var(--gold); font-weight: 500; margin-top: 0.12rem; }

.btn-link {
  background: none;
  border: none;
  color: var(--gold);
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
  white-space: nowrap;
}

.snap-grid { display: grid; gap: 0.45rem; }
.snap-grid div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.5rem;
  font-size: 0.9rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
.snap-grid div:last-child { border-bottom: none; }
.snap-grid dt { color: var(--muted); }
.snap-grid dd { color: var(--text); line-height: 1.45; }

.news-list { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.news-list li {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.8rem;
  background: var(--surface2);
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  border: 1px solid var(--border);
}
.news-title {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.45;
}
.news-open {
  display: block;
  align-self: flex-end;
  margin-top: 0.45rem;
  color: var(--gold);
  font-size: 0.75rem;
  text-decoration: none;
}
.news-open:hover { text-decoration: underline; }
.news-more {
  background: none;
  border: none;
  color: var(--gold);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  margin-top: 0.35rem;
  padding: 0;
}

.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.45rem;
  text-align: center;
}
.stat-label { font-size: 0.72rem; color: var(--muted); display: block; margin-bottom: 0.2rem; line-height: 1.35; }
.stat-card strong { font-size: 0.98rem; color: var(--gold); display: block; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.filter-bar select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.78rem;
}

.tag-filters { display: flex; flex-wrap: wrap; gap: 0.35rem; width: 100%; }
.tag-btn {
  font-size: 0.76rem;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tag-btn.on { border-color: var(--gold); color: var(--gold); background: rgba(255, 202, 4, 0.1); }

.records-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  margin-top: 0.15rem;
}
.pager-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 0.28rem; }
.pager-btn {
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}
.pager-btn.on { border-color: var(--gold); color: var(--gold); background: rgba(255, 202, 4, 0.12); }
.pager-ellipsis {
  min-width: 1.1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  user-select: none;
}
.pager-controls {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}
.pager-jump,
.pager-size {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.pager-jump select,
.pager-size select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.3rem 0.4rem;
  font: inherit;
  font-size: 0.72rem;
  max-width: 7.5rem;
}

.chart-box {
  height: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
}
.chart-box-kline {
  height: 380px;
  min-height: 300px;
  background: #000000;
  padding: 0;
  overflow: hidden;
}
.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.chart-symbol {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.tf-row { display: flex; gap: 0.25rem; }
.tf-btn {
  font: inherit;
  font-size: 0.8rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tf-btn.on { border-color: var(--gold); color: var(--gold); background: rgba(255, 202, 4, 0.1); }
.chart-zoom-hint { margin: 0 0 0.4rem; font-size: 0.78rem; }
.news-more-row { text-align: right; margin: 0.35rem 0 0; }
.news-more-row .btn-link { font-size: 0.84rem; }

.cal-board {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.cal-head-row,
.cal-row {
  display: grid;
  grid-template-columns: 3.1rem 5.6rem 3.1rem minmax(0, 1fr);
  column-gap: 0.45rem;
  align-items: center;
  width: 100%;
  border-bottom: 1px solid var(--border);
}
.cal-day-label {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.9rem 0 0.4rem;
}
.cal-day-label:first-child { padding-top: 0.1rem; }
.cal-colh {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25rem 0 0.4rem;
}
.cal-c {
  padding: 0.55rem 0;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.cal-c.num { white-space: nowrap; }
.cal-c.cal-item { overflow-wrap: anywhere; }
.cal-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.84rem;
  padding: 0.45rem 0 0.2rem;
}

.offers-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.15rem 0 1.25rem;
}
.offer-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  -webkit-text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid rgba(255, 202, 4, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(255, 202, 4, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.14) inset;
  transform: translateY(-1px);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}
a.offer-card,
a.offer-card:link,
a.offer-card:visited,
a.offer-card:hover,
a.offer-card:focus,
a.offer-card:active {
  color: inherit;
  text-decoration: none;
  -webkit-text-decoration: none;
}
.offer-card:hover {
  border-color: rgba(255, 202, 4, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 202, 4, 0.18),
    0 14px 34px rgba(255, 202, 4, 0.2),
    0 2px 0 rgba(255, 255, 255, 0.18) inset;
  transform: translateY(-3px);
}
.offer-card:active {
  transform: translateY(1px) scale(0.985);
  border-color: rgba(255, 202, 4, 0.4);
  box-shadow:
    0 0 0 1px rgba(255, 202, 4, 0.12),
    0 4px 14px rgba(255, 202, 4, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
}
.offer-card-media {
  width: 100%;
  aspect-ratio: 750 / 330;
  background: #f0f0f0;
  overflow: hidden;
  line-height: 0;
}
.offer-card-media picture,
.offer-card-media img {
  display: block;
  width: 100%;
  height: 100%;
}
.offer-card-media img {
  object-fit: cover;
  object-position: center;
}
.offer-card-media img:not([src]) {
  min-height: 100%;
  background: #f0f0f0;
}
.offer-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 5.85rem;
  padding: 0.85rem 1.1rem 0.95rem;
  background: #ffffff;
  color: #111111;
  overflow: hidden;
}
.offer-card-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #111111;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.offer-card-desc {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgba(17, 17, 17, 0.62);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-decoration: none;
}
.now-view-notes {
  margin-top: 0.85rem;
}
.now-view-notes .modal-section {
  margin-top: 0.75rem;
}
.now-view-notes .modal-section strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--gold);
  font-size: 0.9rem;
}
.now-view-notes .modal-body {
  font-size: 0.9rem;
}
.cal-c.cal-impact { font-weight: 650; }
.cal-c.cal-impact.i-high { color: #f87171; }
.cal-c.cal-impact.i-medium { color: var(--gold); }
.cal-c.cal-impact.i-low { color: var(--muted); }

.chart-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.news-updated { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.65rem; line-height: 1.55; }
.news-updated strong { color: var(--gold); }
.news-updated strong { color: var(--gold); }

.accordion { display: flex; flex-direction: column; gap: 0.45rem; }
.acc-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.acc-head {
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1.45;
}
.acc-item.open .acc-head { color: var(--gold); }
.acc-body { display: none; padding: 0 1rem 1rem; font-size: 0.82rem; color: var(--muted); line-height: 1.6; }
.acc-item.open .acc-body { display: block; }
.acc-body a { color: var(--gold); }

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  bottom: 0;
  z-index: 20;
  display: flex;
  max-width: 440px;
  margin: 0 auto;
  padding: 0.45rem 0.35rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.92);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.25rem 0;
}

.bottom-nav-item.active { color: var(--gold); }
.bottom-nav-item .icon { font-size: 1.05rem; line-height: 1; display: flex; align-items: center; justify-content: center; min-height: 1.15rem; }
.bottom-nav-item .nav-ico { width: 1.18rem; height: 1.18rem; display: block; }

.fine-print, .muted { font-size: 0.8rem; color: var(--muted); line-height: 1.65; }
.fine-print { padding-bottom: 0.5rem; }
.section-lead { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
}

.modal.hidden { display: none !important; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); }

.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 1.15rem 1rem 1.5rem;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: var(--surface);
  color: var(--muted);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  cursor: pointer;
}

.modal-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.55rem; padding-right: 2rem; color: var(--text); }
.chart-help-list { display: flex; flex-direction: column; gap: 0.55rem; padding-top: 0.2rem; }
.chart-help-row { margin: 0; font-size: 0.9rem; color: var(--muted); line-height: 1.55; }
.chart-help-row strong { color: var(--gold); font-weight: 700; margin-right: 0.45rem; }
.modal-body { font-size: 0.95rem; color: var(--muted); line-height: 1.7; white-space: pre-wrap; }
.modal-section {
  margin: 1.05rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}
.modal-section strong { display: block; color: var(--gold); font-size: 0.72rem; margin-bottom: 0.4rem; letter-spacing: 0.04em; }
.modal-section.writing .modal-body {
  color: var(--muted);
  font-style: italic;
  opacity: 0.85;
}

.radar-help-intro {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 0.9rem;
}

.radar-help-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0 0 0.25rem;
}
.ep-notes {
  margin-top: 1.85rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}
.ep-notes .modal-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.ep-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.75rem;
  margin: 0 0 0.7rem;
}
.ep-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
  margin: 0 0 0.75rem;
}
.ep-stat { margin: 0; }
.ep-stat-val {
  margin: 0.12rem 0 0;
  font-size: 1.12rem;
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.radar-help-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 0.8rem 0.85rem 0.85rem;
}

.radar-help-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
}

.radar-help-def {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.65;
}

.radar-help-refs {
  margin: 0 0 0.45rem;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.55;
}

.radar-help-refs span {
  display: block;
  color: var(--gold);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.12rem;
}

.ep-price-label {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.ep-price-big {
  margin: 0.1rem 0 0;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.ep-move { font-size: 0.72em; font-weight: 650; }
.ep-kv { margin: 0 0 1.1rem; }
.ep-kv p {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  margin: 0.55rem 0;
  color: var(--muted);
}
.ep-kv span { font-size: 0.72rem; letter-spacing: 0.04em; }
.ep-kv strong { color: var(--text); font-size: 1.02rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ep-radar { max-width: 100%; height: 300px; margin: 0 auto 0.85rem; overflow: hidden; }
.news-link { color: var(--text); text-decoration: none; font-weight: 600; }
.news-link:hover { color: var(--gold); }
a.news-more { color: var(--gold); font-size: 0.78rem; text-decoration: none; }

@media (max-width: 380px) {
  .metric-card-val { font-size: 0.98rem; }
  .ep-table { font-size: 0.8rem; }
}
