:root {
  --dashboard-max-width: 2200px;
  --dashboard-gutter: 30px;
}

body > main {
  max-width: var(--dashboard-max-width);
  padding-inline: var(--dashboard-gutter);
}

body > header {
  width: calc(min(100%, var(--dashboard-max-width)) - var(--dashboard-gutter) - var(--dashboard-gutter));
  margin: 12px auto 0;
  min-height: 84px;
  height: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(14px, 2.4vw, 44px);
  padding: 12px clamp(16px, 1.5vw, 30px);
  border: 1px solid var(--line);
  border-radius: 12px;
}
header .brand { min-width: 0; gap: 12px; }
header .brand .coin { width: 46px; height: 46px; font-size: 32px; border-radius: 10px; }
header .brand h1 { font-size: clamp(26px, 1.65vw, 34px); margin-bottom: 5px; }
header .brand p { font-size: 14px; letter-spacing: 1px; }
header .market { order: 0; gap: 4px 14px; flex-wrap: wrap; }
header .market strong { font-size: 16px; }
header .market b { font-size: clamp(24px, 1.5vw, 31px); }
header .market > span { display: inline; font-size: 13px; }
header .live-status { gap: 4px; }
header .badge { font-size: 13px; padding: 4px 10px; }
header .live-status small { font-size: 12px; }
header #help { font-size: 14px; padding: 8px 12px; }

@media (max-width: 1200px) {
  :root { --dashboard-gutter: 20px; }
}
@media (max-width: 860px) {
  :root { --dashboard-gutter: 16px; }
}
@media (max-width: 680px) {
  body > header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand status" "market help";
    gap: 9px 10px;
    padding: 12px;
  }
  header .brand { grid-area: brand; gap: 8px; }
  header .brand .coin { width: 35px; height: 35px; font-size: 25px; }
  header .brand h1 { font-size: 24px; margin-bottom: 2px; }
  header .brand p { font-size: 12px; }
  header .market { grid-area: market; gap: 2px 8px; }
  header .market strong { font-size: 14px; }
  header .market b { font-size: 22px; }
  header .market > span { flex-basis: 100%; font-size: 12px; }
  header .live-status { grid-area: status; }
  header #help { grid-area: help; justify-self: end; }
}

.legend .candle-key {
  display: inline-block;
  width: 7px;
  height: 12px;
  vertical-align: -2px;
  border: 1px solid #1e8df9;
}
.legend .candle-key.down { border-color: #de7a2c; background: #de7a2c; }
