:root {
  --bg: #02070d;
  --bg-2: #04101a;
  --panel: rgba(5, 16, 27, 0.94);
  --panel-2: rgba(7, 21, 34, 0.94);
  --panel-3: rgba(3, 12, 21, 0.96);
  --line: rgba(65, 108, 142, 0.24);
  --line-strong: rgba(72, 131, 174, 0.38);
  --text: #e7f1f8;
  --muted: #8ea0ae;
  --muted-2: #617482;
  --green: #00e887;
  --green-soft: rgba(0, 232, 135, 0.14);
  --red: #ff4c4c;
  --red-soft: rgba(255, 76, 76, 0.14);
  --yellow: #f7c600;
  --yellow-soft: rgba(247, 198, 0, 0.13);
  --blue: #1b8fff;
  --blue-soft: rgba(27, 143, 255, 0.14);
  --cyan: #31d7f2;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.38);
  --radius: 12px;
  --radius-sm: 8px;
  font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 18% -10%, rgba(9, 101, 148, 0.13), transparent 28%),
    radial-gradient(circle at 88% 15%, rgba(0, 232, 135, 0.055), transparent 24%),
    linear-gradient(180deg, #02070d 0%, #020912 38%, #01060b 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(89, 141, 175, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(89, 141, 175, 0.04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.08;
  pointer-events: none;
}
.ambient-one { top: -340px; left: -140px; background: var(--cyan); }
.ambient-two { right: -320px; top: 180px; background: var(--green); }

.site-header {
  min-height: 80px;
  padding: 14px 24px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(1, 7, 13, 0.92);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(15px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-block { direction: ltr; flex: 0 0 auto; }
.brand-line {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-size: 31px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: 1px;
  color: #edf5fa;
  text-shadow: 0 0 20px rgba(49, 215, 242, 0.12);
}
.brand-line .brand-q {
  color: #9feef1;
  font-size: 35px;
  margin-right: -3px;
  transform: skew(-7deg);
}
.brand-line .brand-tr { color: #d6e8f0; }
.brand-line strong {
  margin-left: 7px;
  color: var(--green);
  font-size: 20px;
  letter-spacing: 0;
}
.brand-subtitle {
  margin-top: 8px;
  color: #a9b8c3;
  font-size: 12px;
  letter-spacing: 0.3px;
}

.header-status {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  color: #b6c2cb;
  font-size: 13px;
}
.time-block { color: #8d99a4; font-variant-numeric: tabular-nums; direction: ltr; }
.status-pill,
.title-chip,
.refresh-chip,
.chart-mark {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 15, 25, 0.78);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.018);
  white-space: nowrap;
}
.status-pill b { color: var(--green); font-weight: 650; }
.status-pill[data-tone="stale"] b,
.status-pill[data-tone="stale"] #livePillText { color: var(--yellow); }
.status-pill[data-tone="error"] b,
.status-pill[data-tone="error"] #livePillText { color: var(--red); }
.status-pill[data-tone="connected"] #livePillText { color: var(--green); }
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted-2);
  box-shadow: 0 0 0 4px rgba(97, 116, 130, 0.08);
}
.status-pill[data-tone="connected"] .status-dot { background: var(--green); box-shadow: 0 0 15px rgba(0, 232, 135, 0.7); }
.status-pill[data-tone="stale"] .status-dot { background: var(--yellow); box-shadow: 0 0 15px rgba(247, 198, 0, 0.55); }
.status-pill[data-tone="error"] .status-dot { background: var(--red); box-shadow: 0 0 15px rgba(255, 76, 76, 0.55); }
.cloud-icon { color: #b9c7d1; font-size: 17px; }
.title-chip { color: #eef6fb; padding-inline: 20px; }
.chart-mark { width: 42px; padding: 0; color: #bcd0dc; font-size: 25px; }

.page-shell { padding: 14px 14px 8px; }
.overview-panel,
.content-panel,
.site-footer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(5, 17, 29, 0.95), rgba(2, 12, 21, 0.96));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.018);
}
.overview-panel { padding: 12px; }
.overview-topline {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.section-kicker {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(4, 14, 24, 0.85);
  color: #e4edf3;
  font-size: 14px;
  font-weight: 650;
}
.trophy { color: #a7b7c2; font-size: 17px; }
.overview-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: rgba(4, 14, 24, 0.78);
}
.mini-metric {
  min-width: 175px;
  height: 47px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 15px;
  color: #a8b6c1;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}
.mini-metric:first-child { border-left: 0; }
.mini-metric strong { font-size: 21px; font-variant-numeric: tabular-nums; }
.metric-icon { font-size: 18px; }
.metric-icon.green, .mini-metric:has(.green) strong { color: var(--green); }
.metric-icon.blue, .mini-metric:has(.blue) strong { color: var(--blue); }
.metric-icon.red, .mini-metric:has(.red) strong { color: var(--red); }
.metric-icon.neutral, .mini-metric:has(.neutral) strong { color: #aeb9c3; }
.refresh-chip { justify-self: start; color: #b9c5ce; }
.spin-mark { color: #8ea4b3; display: inline-block; font-size: 21px; }
.live-refreshing .spin-mark { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(-360deg); } }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-height: 430px;
}

.coin-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(69, 111, 143, 0.27);
  border-radius: 9px;
  background:
    radial-gradient(circle at 30% 0%, rgba(18, 83, 119, 0.075), transparent 30%),
    linear-gradient(180deg, rgba(7, 21, 34, 0.98), rgba(2, 12, 21, 0.98));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), inset 0 1px rgba(255, 255, 255, 0.018);
  animation: cardIn 0.36s ease both;
}
.coin-card:nth-child(2) { animation-delay: 0.03s; }
.coin-card:nth-child(3) { animation-delay: 0.06s; }
.coin-card:nth-child(4) { animation-delay: 0.09s; }
.coin-card:nth-child(5) { animation-delay: 0.12s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.card-head {
  min-height: 72px;
  padding: 14px 14px 7px;
  display: grid;
  grid-template-columns: 26px 38px minmax(0, 1fr) 20px;
  align-items: start;
  gap: 8px;
  direction: ltr;
}
.rank-badge {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 6px;
  color: #f2fbff;
  font-size: 12px;
  font-weight: 750;
  background: linear-gradient(150deg, #00b879, #087950);
  box-shadow: 0 0 18px rgba(0, 232, 135, 0.18);
}
.coin-card:nth-child(2) .rank-badge { background: linear-gradient(150deg, #287cff, #1351a9); }
.coin-card:nth-child(3) .rank-badge { background: linear-gradient(150deg, #d6aa14, #745b09); }
.coin-card:nth-child(4) .rank-badge { background: linear-gradient(150deg, #9a49db, #4d2178); }
.coin-card:nth-child(5) .rank-badge { background: linear-gradient(150deg, #20b886, #0c6a4e); }
.token-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #29d5f3, #0a577c 62%, #03283d);
  color: white;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.4px;
  box-shadow: 0 0 18px rgba(49, 215, 242, 0.17);
}
.coin-title { min-width: 0; padding-top: 1px; }
.symbol-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.symbol-row strong { overflow: hidden; text-overflow: ellipsis; color: #f1f5f8; font-size: 14px; }
.coin-subtitle { margin-top: 6px; overflow: hidden; text-overflow: ellipsis; color: #8e9ba6; font-size: 10.5px; white-space: nowrap; }
.favorite-star { color: #ffc400; font-size: 16px; line-height: 1.5; }

.price-block { padding: 0 14px 8px; direction: ltr; text-align: left; }
.price-value {
  color: var(--green);
  font-size: clamp(20px, 1.38vw, 27px);
  line-height: 1.05;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}
.price-value.negative { color: var(--red); }
.price-change { margin-top: 4px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-change.positive { color: var(--green); }
.price-change.negative { color: var(--red); }
.price-change.neutral { color: #98a7b2; }

.chart-box {
  position: relative;
  height: 122px;
  margin: 0 10px 8px;
  border-top: 1px solid rgba(77, 120, 151, 0.23);
  border-bottom: 1px solid rgba(77, 120, 151, 0.2);
  background:
    linear-gradient(rgba(68, 103, 127, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(68, 103, 127, 0.1) 1px, transparent 1px);
  background-size: 100% 32px, 25% 100%;
}
.chart-box canvas { width: 100%; height: 100%; display: block; }
.chart-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #607482;
  font-size: 11px;
  pointer-events: none;
}
.chart-axis-label {
  position: absolute;
  right: 2px;
  top: 2px;
  color: #8495a1;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

.qss-zone {
  min-height: 145px;
  padding: 9px 12px 8px;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(112px, 1.06fr);
  gap: 10px;
  border-top: 1px solid var(--line);
  direction: ltr;
}
.gauge-wrap { min-width: 0; text-align: center; }
.gauge-title { color: #dce6ec; font-size: 11px; font-weight: 650; text-align: left; }
.gauge {
  position: relative;
  width: 100%;
  max-width: 130px;
  margin: 6px auto 0;
}
.gauge svg { width: 100%; height: auto; display: block; overflow: visible; }
.gauge-track { fill: none; stroke: #182837; stroke-width: 9; stroke-linecap: butt; }
.gauge-arc { fill: none; stroke: var(--green); stroke-width: 9; stroke-linecap: butt; transition: stroke-dasharray 0.5s ease, stroke 0.3s ease; }
.gauge-zero { stroke: #50606a; stroke-width: 1; }
.gauge-value {
  position: absolute;
  left: 50%;
  bottom: 13px;
  transform: translateX(-50%);
  color: var(--green);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gauge-value.negative { color: var(--red); }
.gauge-value.neutral { color: #a8b5be; }
.gauge-labels { display: flex; justify-content: space-between; margin-top: -3px; color: #778994; font-size: 8px; }

.qss-list { display: grid; align-content: start; gap: 5px; direction: ltr; }
.qss-row {
  display: grid;
  grid-template-columns: 49px minmax(44px, 1fr) 18px;
  align-items: center;
  gap: 4px;
  min-height: 14px;
  font-size: 10.3px;
  font-variant-numeric: tabular-nums;
}
.qss-label { color: #c8d4dc; }
.qss-number { text-align: right; color: #95a7b2; }
.qss-number.positive { color: var(--green); }
.qss-number.negative { color: var(--red); }
.qss-arrow { text-align: center; font-size: 13px; }
.qss-arrow.up { color: var(--green); }
.qss-arrow.down { color: var(--red); }
.qss-arrow.flat { color: #667987; }

.signal-strip {
  min-height: 33px;
  margin: 0 4px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border: 1px solid rgba(94, 116, 130, 0.28);
  border-radius: 5px;
  background: rgba(13, 25, 34, 0.7);
  color: #94a5af;
  font-size: 10.5px;
  font-weight: 750;
  text-align: center;
  letter-spacing: 0.1px;
  direction: ltr;
}
.signal-strip.green { border-color: rgba(0, 232, 135, 0.36); background: var(--green-soft); color: var(--green); }
.signal-strip.red { border-color: rgba(255, 76, 76, 0.42); background: var(--red-soft); color: var(--red); }
.signal-strip.yellow { border-color: rgba(247, 198, 0, 0.37); background: var(--yellow-soft); color: var(--yellow); }
.signal-strip.blue { border-color: rgba(27, 143, 255, 0.46); background: var(--blue-soft); color: #42a6ff; }

.cycle-status {
  min-height: 36px;
  margin: 0 4px 4px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 28px;
  align-items: center;
  border: 1px solid rgba(80, 112, 132, 0.24);
  border-radius: 5px;
  overflow: hidden;
  color: #a5b4be;
  background: rgba(5, 16, 25, 0.84);
  font-size: 10.5px;
  text-align: center;
}
.cycle-status .state-icon { font-size: 15px; }
.cycle-status .pulse-line { color: #5d7381; font-size: 18px; direction: ltr; }
.cycle-status.green { color: var(--green); border-color: rgba(0, 232, 135, 0.30); background: rgba(0, 232, 135, 0.065); }
.cycle-status.red { color: var(--red); border-color: rgba(255, 76, 76, 0.40); background: rgba(255, 76, 76, 0.075); }
.cycle-status.yellow { color: var(--yellow); border-color: rgba(247, 198, 0, 0.28); background: rgba(247, 198, 0, 0.055); }
.cycle-status.blue { color: #42a6ff; border-color: rgba(27, 143, 255, 0.35); background: rgba(27, 143, 255, 0.06); }
.cycle-history {
  min-height: 21px;
  padding: 2px 8px 6px;
  overflow: hidden;
  color: #758a97;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  direction: ltr;
}

.panel-placeholder { grid-column: 1 / -1; }
.empty-state {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #738896;
  border: 1px dashed rgba(86, 129, 157, 0.27);
  border-radius: 9px;
  background: rgba(4, 14, 23, 0.48);
  text-align: center;
}
.empty-state strong { color: #b7c5ce; font-size: 15px; }
.empty-state span { font-size: 12px; }
.pulse-ring {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(49, 215, 242, 0.14);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}

.lower-grid {
  display: grid;
  grid-template-columns: 1.18fr 1.04fr 0.88fr;
  gap: 10px;
  margin-top: 10px;
}
.content-panel { min-width: 0; padding: 12px; }
.panel-heading {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.panel-heading h2 {
  margin: 0;
  color: #e6edf2;
  font-size: 15px;
  font-weight: 650;
}
.panel-heading h2 span { color: #3aa9ff; }
.panel-meta { color: #2f91d9; font-size: 9px; letter-spacing: 0.2px; direction: ltr; }
.radar-icon { color: #4d6371; font-size: 22px; }
.info-symbol { color: #22a6ff; font-size: 16px; }

.alerts-table-wrap { overflow-x: auto; border: 1px solid rgba(68, 104, 128, 0.22); border-radius: 7px; }
.alerts-table { width: 100%; border-collapse: collapse; min-width: 590px; table-layout: fixed; }
.alerts-table th,
.alerts-table td {
  height: 39px;
  padding: 7px 9px;
  border-bottom: 1px solid rgba(68, 104, 128, 0.18);
  color: #9baab4;
  font-size: 10.5px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.alerts-table th { color: #758894; font-size: 9.5px; font-weight: 600; background: rgba(8, 20, 30, 0.62); }
.alerts-table tr:last-child td { border-bottom: 0; }
.alerts-table td:nth-child(1) { width: 79px; direction: ltr; text-align: left; font-variant-numeric: tabular-nums; }
.alerts-table td:nth-child(2) { width: 92px; direction: ltr; text-align: left; color: #c5d0d7; font-weight: 650; }
.alerts-table td:nth-child(3) { direction: ltr; text-align: left; font-weight: 650; }
.alerts-table .tone-green { color: var(--green); }
.alerts-table .tone-red { color: var(--red); }
.alerts-table .tone-yellow { color: var(--yellow); }
.alerts-table .tone-blue { color: #38a4ff; }
.alerts-table .alert-status-cell { position: relative; padding-right: 24px; }
.alerts-table .alert-status-cell::before {
  content: "";
  position: absolute;
  right: 9px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60727e;
  transform: translateY(-50%);
}
.alerts-table .alert-status-cell.tone-green::before { background: var(--green); box-shadow: 0 0 8px rgba(0,232,135,.55); }
.alerts-table .alert-status-cell.tone-red::before { background: var(--red); box-shadow: 0 0 8px rgba(255,76,76,.55); }
.alerts-table .alert-status-cell.tone-yellow::before { background: var(--yellow); box-shadow: 0 0 8px rgba(247,198,0,.45); }
.alerts-table .alert-status-cell.tone-blue::before { background: var(--blue); box-shadow: 0 0 8px rgba(27,143,255,.55); }
.empty-row td { text-align: center !important; color: #637784 !important; }

.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  direction: ltr;
}
.summary-card {
  min-height: 76px;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(80, 117, 140, 0.23);
  border-radius: 7px;
  background: rgba(4, 15, 24, 0.82);
}
.summary-card .summary-symbol { grid-row: 1 / 3; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; font-size: 16px; }
.summary-card strong { align-self: end; font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; }
.summary-card small { align-self: start; margin-top: 4px; color: #7d8f9b; font-size: 8.7px; direction: rtl; }
.summary-card.green strong, .summary-card.green .summary-symbol { color: var(--green); }
.summary-card.blue strong, .summary-card.blue .summary-symbol { color: var(--blue); }
.summary-card.red strong, .summary-card.red .summary-symbol { color: var(--red); }
.summary-card.yellow strong, .summary-card.yellow .summary-symbol { color: var(--yellow); }
.summary-card.green .summary-symbol { background: var(--green-soft); border: 1px solid rgba(0,232,135,.28); }
.summary-card.blue .summary-symbol { background: var(--blue-soft); border: 1px solid rgba(27,143,255,.28); }
.summary-card.red .summary-symbol { background: var(--red-soft); border: 1px solid rgba(255,76,76,.28); }
.summary-card.yellow .summary-symbol { background: var(--yellow-soft); border: 1px solid rgba(247,198,0,.25); }

.market-health-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.market-health-grid > div {
  min-height: 65px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(79, 112, 134, 0.2);
  border-radius: 7px;
  background: rgba(5, 16, 25, 0.7);
  text-align: center;
}
.market-health-grid span { color: #768995; font-size: 9px; }
.market-health-grid strong { color: #b8c5cd; font-size: 11px; }
.market-health-grid strong.positive { color: var(--green); }
.market-health-grid strong.negative { color: var(--red); }
.market-health-grid strong.warning { color: var(--yellow); }

.about-panel p {
  margin: 0 0 9px;
  color: #95a5b0;
  font-size: 10.7px;
  line-height: 1.65;
}
.about-panel p b { color: #e0e9ef; }
.about-panel .disclaimer { color: #7d8e98; }
.about-panel a { color: #168eea; font-size: 11px; text-decoration: none; direction: ltr; display: inline-block; }
.social-row { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 12px; direction: ltr; }
.social-row span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: white; background: #0a8fdc; font-size: 11px; }
.social-row span:nth-child(2) { background: #00a5d7; }
.social-row span:nth-child(3) { background: #e31e24; }

.site-footer {
  min-height: 48px;
  margin: 8px 14px 12px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 16px;
  color: #687a86;
  font-size: 10px;
}
.site-footer > div:last-child { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; }
.footer-warning { text-align: center; }
.shield { color: var(--green); margin-left: 8px; }

noscript {
  display: block;
  margin: 16px;
  padding: 16px;
  color: #ffd7d7;
  border: 1px solid rgba(255,76,76,.35);
  border-radius: 8px;
  background: rgba(255,76,76,.08);
}

@media (max-width: 1540px) {
  .site-header { padding-inline: 18px; }
  .header-status { gap: 8px; }
  .status-pill, .title-chip { padding-inline: 10px; }
  .mini-metric { min-width: 145px; padding-inline: 10px; }
  .cards-grid { gap: 7px; }
  .card-head { padding-inline: 10px; grid-template-columns: 24px 34px minmax(0,1fr) 16px; }
  .token-mark { width: 33px; height: 33px; }
  .qss-zone { padding-inline: 9px; gap: 6px; }
  .qss-row { grid-template-columns: 43px minmax(40px,1fr) 15px; font-size: 9.7px; }
}

@media (max-width: 1260px) {
  .site-header { align-items: flex-start; }
  .header-status { flex-wrap: wrap; justify-content: flex-start; }
  .time-block { order: 5; width: 100%; text-align: right; }
  .overview-topline { grid-template-columns: 1fr auto; }
  .overview-metrics { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .mini-metric { flex: 1 1 0; min-width: 0; }
  .cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .coin-card:nth-child(4), .coin-card:nth-child(5) { min-height: 0; }
  .lower-grid { grid-template-columns: 1.2fr 1fr; }
  .about-panel { grid-column: 1 / -1; }
  .about-panel .social-row { justify-content: center; }
}

@media (max-width: 900px) {
  .site-header { position: relative; flex-direction: column; align-items: stretch; gap: 12px; }
  .brand-block { align-self: flex-start; }
  .header-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .time-block { order: initial; width: auto; display: flex; align-items: center; justify-content: center; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: rgba(5,15,25,.78); }
  .chart-mark { display: none; }
  .overview-topline { display: flex; flex-wrap: wrap; }
  .section-kicker { flex: 1 1 230px; justify-content: center; }
  .refresh-chip { flex: 0 0 auto; }
  .overview-metrics { order: 3; flex-basis: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-metric { border-left: 0; border-bottom: 1px solid var(--line); }
  .mini-metric:nth-child(odd) { border-left: 1px solid var(--line); }
  .mini-metric:nth-last-child(-n+2) { border-bottom: 0; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lower-grid { grid-template-columns: 1fr; }
  .about-panel { grid-column: auto; }
  .site-footer { grid-template-columns: 1fr; padding-block: 13px; text-align: center; }
  .site-footer > div:last-child { text-align: center; }
}

@media (max-width: 620px) {
  .site-header { padding: 13px 12px; }
  .brand-line { font-size: 27px; }
  .brand-line .brand-q { font-size: 31px; }
  .brand-line strong { font-size: 17px; }
  .header-status { grid-template-columns: 1fr; }
  .title-chip { display: none; }
  .page-shell { padding: 8px 8px 4px; }
  .overview-panel { padding: 8px; }
  .overview-topline { gap: 8px; }
  .section-kicker { min-height: 38px; font-size: 12px; }
  .refresh-chip { min-height: 38px; font-size: 11px; }
  .overview-metrics { display: grid; }
  .mini-metric { min-height: 44px; height: auto; font-size: 10px; padding-inline: 7px; gap: 6px; }
  .mini-metric strong { font-size: 18px; }
  .cards-grid { grid-template-columns: 1fr; gap: 8px; }
  .coin-card { width: 100%; }
  .card-head { padding-inline: 14px; }
  .price-block { padding-inline: 14px; }
  .price-value { font-size: 28px; }
  .chart-box { height: 145px; }
  .qss-zone { grid-template-columns: minmax(0, 1fr) minmax(138px, 1fr); padding-inline: 14px; }
  .qss-row { grid-template-columns: 51px minmax(54px,1fr) 18px; font-size: 10.5px; }
  .lower-grid { margin-top: 8px; gap: 8px; }
  .content-panel { padding: 10px; }
  .summary-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { margin: 6px 8px 10px; }
}

@media (max-width: 390px) {
  .overview-metrics { grid-template-columns: 1fr; }
  .mini-metric:nth-child(n) { border-left: 0; border-bottom: 1px solid var(--line); }
  .mini-metric:last-child { border-bottom: 0; }
  .qss-zone { grid-template-columns: 1fr 1fr; padding-inline: 8px; }
  .gauge-value { font-size: 19px; }
  .qss-row { grid-template-columns: 44px minmax(43px,1fr) 16px; font-size: 9.7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* QSSTR LIVE Stable Cards */
/* Prevent card entrance motion during live data refreshes. */
.coin-card,
.coin-card:nth-child(2),
.coin-card:nth-child(3),
.coin-card:nth-child(4),
.coin-card:nth-child(5) {
    animation: none !important;
    animation-delay: 0s !important;
}

/* QSSTR LIVE stage 3: live gauge updates are immediate and motionless. */
.gauge-arc {
  transition: none !important;
}


/* QSSTR Confirmed Trade Performance — isolated additive styles */
.live-performance-panel {
  margin-top: 10px;
  padding: 16px;
  overflow: hidden;
}
.live-performance-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}
.live-performance-heading h2 {
  margin: 5px 0 6px;
  color: #e7f1f8;
  font-size: 17px;
}
.live-performance-heading p {
  max-width: 760px;
  margin: 0;
  color: #7f929f;
  font-size: 10.5px;
  line-height: 1.7;
}
.live-performance-kicker {
  color: var(--green);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .12em;
}
.live-performance-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(2, 10, 17, .72);
}
.live-performance-tab {
  min-width: 58px;
  min-height: 29px;
  padding: 5px 10px;
  border: 0;
  border-radius: 6px;
  color: #7f919d;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 9.5px;
  font-weight: 700;
}
.live-performance-tab.is-active {
  color: #02110b;
  background: var(--green);
  box-shadow: 0 5px 18px rgba(0, 232, 135, .18);
}
.live-performance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(210px, .55fr) minmax(245px, .75fr);
  gap: 10px;
}
.live-performance-chart-card,
.live-performance-recent,
.live-performance-stat {
  border: 1px solid rgba(72, 131, 174, .22);
  border-radius: 9px;
  background: rgba(3, 13, 22, .74);
}
.live-performance-chart-card { padding: 11px; }
.live-performance-chart-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.live-performance-chart-topline > div { display: flex; align-items: center; gap: 8px; }
.live-performance-chart-topline span { color: #708490; font-size: 9px; }
.live-performance-chart-topline strong { color: #c9d7df; font-size: 10px; }
.live-performance-source {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
}
.live-performance-chart {
  min-height: 156px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(66, 111, 143, .16);
  border-radius: 7px;
  background:
    linear-gradient(rgba(72, 131, 174, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 131, 174, .035) 1px, transparent 1px),
    rgba(1, 8, 14, .72);
  background-size: 30px 30px;
  overflow: hidden;
}
.live-performance-chart svg { width: 100%; height: 156px; display: block; }
.live-performance-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.live-performance-stat {
  min-height: 73px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}
.live-performance-stat span { color: #718692; font-size: 9px; }
.live-performance-stat strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.live-performance-stat.green strong { color: var(--green); }
.live-performance-stat.red strong { color: var(--red); }
.live-performance-stat.blue strong { color: var(--blue); }
.live-performance-stat.yellow strong { color: var(--yellow); }
.live-performance-recent { padding: 10px; }
.live-performance-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: #aebdc6;
  font-size: 10px;
  font-weight: 700;
}
.live-performance-recent-head small { color: #607683; font-size: 8px; }
.live-performance-recent-list { display: grid; gap: 5px; }
.live-performance-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 5px 7px;
  border: 1px solid rgba(73, 109, 132, .17);
  border-radius: 6px;
  background: rgba(6, 18, 29, .7);
  font-size: 8.8px;
}
.live-performance-result b { color: #c7d4dc; direction: ltr; }
.live-performance-result span { color: #70848f; }
.live-performance-result em { font-style: normal; font-weight: 800; }
.live-performance-result.win em { color: var(--green); }
.live-performance-result.loss em { color: var(--red); }
.live-performance-result.open em { color: var(--blue); }
.live-performance-empty {
  min-height: 126px;
  display: grid;
  place-items: center;
  color: #607481;
  text-align: center;
  font-size: 9px;
}
@media (max-width: 1100px) {
  .live-performance-grid { grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr); }
  .live-performance-recent { grid-column: 1 / -1; }
  .live-performance-empty { min-height: 60px; }
}
@media (max-width: 720px) {
  .live-performance-panel { padding: 11px; }
  .live-performance-heading { align-items: stretch; flex-direction: column; }
  .live-performance-tabs { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .live-performance-tab { min-width: 0; }
  .live-performance-grid { grid-template-columns: 1fr; }
  .live-performance-recent { grid-column: auto; }
  .live-performance-chart { min-height: 142px; }
  .live-performance-chart svg { height: 142px; }
}

/* =============================================================================
   QSSTR pinned active opportunities — isolated additive second row
   ============================================================================= */
.pinned-opportunities-section[hidden] {
  display: none !important;
}

.pinned-opportunities-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pinned-opportunities-heading {
  min-height: 46px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pinned-opportunities-heading h2 {
  margin: 3px 0 0;
  color: #e7f1f8;
  font-size: 14px;
  font-weight: 700;
}

.pinned-opportunities-kicker {
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.9px;
}

.pinned-opportunities-count {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid rgba(27, 143, 255, 0.32);
  border-radius: 8px;
  background: rgba(27, 143, 255, 0.08);
  color: #9fb1bd;
  font-size: 11px;
  white-space: nowrap;
}

.pinned-opportunities-count strong {
  color: #42a6ff;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.pinned-cards-grid {
  min-height: 0;
}

.pinned-cards-grid .coin-card {
  border-color: rgba(27, 143, 255, 0.34);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.24),
    inset 0 2px rgba(27, 143, 255, 0.18);
}

.pinned-cards-grid .rank-badge {
  background: linear-gradient(150deg, #287cff, #1351a9);
}

@media (max-width: 620px) {
  .pinned-opportunities-heading {
    align-items: flex-start;
  }

  .pinned-opportunities-heading h2 {
    font-size: 12px;
  }

  .pinned-opportunities-count {
    padding-inline: 9px;
  }
}
/* End QSSTR pinned active opportunities */

/* QSSTR_LIVE_HOME_LINK_STYLE_20260729 */
.home-link {
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #b9c9d3;
  background: rgba(5, 15, 25, 0.78);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.018);
  text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 150ms ease;
}
.home-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.home-link:hover,
.home-link:focus-visible {
  color: var(--green);
  border-color: rgba(48, 231, 170, 0.42);
  background: rgba(48, 231, 170, 0.08);
  outline: none;
}
.home-link:active { transform: translateY(1px); }

@media (max-width: 900px) {
  .home-link { width: 100%; min-width: 0; }
}

