/* =============================================================
   Beacon — TON Jetton Terminal
   Layout: sidebar rail + hero/ribbon/chart/tabs center + trade right
   Palette: monochrome dark with red/green for trading
   ============================================================= */

:root {
  --bg: #0a0a0a;
  --bg-1: #0f0f0f;
  --bg-2: #141414;
  --bg-3: #1a1a1a;
  --line: #1c1c1c;
  --line-2: #262626;
  --line-3: #333333;
  --text: #ededed;
  --text-2: #a0a0a0;
  --text-3: #6b6b6b;
  --text-4: #4a4a4a;
  --up: #4ade80;
  --up-bg: rgba(74, 222, 128, 0.10);
  --up-bar: rgba(74, 222, 128, 0.45);
  --down: #f87171;
  --down-bg: rgba(248, 113, 113, 0.10);
  --down-bar: rgba(248, 113, 113, 0.45);
  --gold: #f6b73c;

  --font: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;

  --radius: 8px;
  --radius-sm: 4px;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; background: none; border: none; outline: none; color: inherit; }
a { color: inherit; text-decoration: none; }

/* =============================================================
   TOP BAR
   ============================================================= */
.topbar {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  position: sticky; top: 0; z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.logo { width: 20px; height: 20px; color: var(--text); }
.logo svg { width: 100%; height: 100%; }
.brand-name {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand-line { color: var(--text-3); margin-left: -2px; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 380px;
  width: 100%;
  padding: 8px 11px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  transition: border-color 0.12s;
  justify-self: center;
}
.search:focus-within { border-color: var(--line-3); }
.search input {
  flex: 1;
  font-size: 13px;
  color: var(--text);
}
.search input::placeholder { color: var(--text-3); }
.kbd {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  padding: 2px 6px;
  background: var(--bg-3);
  border-radius: 3px;
  border: 1px solid var(--line-2);
}

.topbar-right { display: flex; align-items: center; gap: 8px; }
.ghost-btn {
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  transition: all 0.12s;
}
.ghost-btn:hover { border-color: var(--text-3); }

.icon-btn {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: all 0.12s;
}
.icon-btn:hover { color: var(--text); background: var(--bg-2); }

/* =============================================================
   PAGE GRID — sidebar / center / trade
   ============================================================= */
.page {
  display: grid;
  grid-template-columns: 240px 1fr 320px;
  min-height: calc(100vh - 105px);
}

/* =============================================================
   LEFT RAIL
   ============================================================= */
.rail {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.rail-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.rail-sort { display: flex; gap: 2px; }
.sort-btn {
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  border-radius: 3px;
  transition: all 0.12s;
}
.sort-btn:hover { color: var(--text); }
.sort-btn.active { color: var(--text); background: var(--bg-2); }

.market-list {
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - 160px);
}
.mkt {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.12s;
}
.mkt:hover { background: var(--bg-1); }
.mkt.active { background: var(--bg-2); }
.mkt.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--text);
}
.mkt-ico {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
}
.mkt-ico img { width: 100%; height: 100%; object-fit: cover; }
.mkt-mid { min-width: 0; }
.mkt-sym {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-name {
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-right { text-align: right; }
.mkt-px {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.mkt-ch {
  font-family: var(--mono);
  font-size: 10px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.mkt-ch.up { color: var(--up); }
.mkt-ch.down { color: var(--down); }

.mkt-skel, .act-skel {
  height: 50px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.02), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* =============================================================
   CENTER
   ============================================================= */
.center {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Hero block */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 28px 20px;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.hero-id {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.asset-mark {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  overflow: hidden;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}
.asset-mark img { width: 100%; height: 100%; object-fit: cover; }
.hero-id-text { min-width: 0; }

.asset-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
.asset-sym-inline {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
  letter-spacing: 0;
  padding: 2px 7px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.asset-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3);
}
.asset-sub .sep { color: var(--text-4); }
.addr-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  padding: 2px 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.copy {
  width: 16px; height: 16px;
  display: grid; place-items: center;
  color: var(--text-4);
  border-radius: 2px;
  transition: color 0.12s;
}
.copy:hover { color: var(--text-2); }

.hero-price {
  text-align: right;
  flex-shrink: 0;
}
.price-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
  justify-content: flex-end;
}
.price-val {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.price-delta {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.price-delta.up { color: var(--up); }
.price-delta.down { color: var(--down); }
.price-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-3);
}
.star-inline {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--text-3);
  border-radius: 3px;
  transition: color 0.12s;
}
.star-inline:hover { color: var(--gold); }
.star-inline.on { color: var(--gold); }

/* Compact ribbon (inline metrics) */
.ribbon {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.rib {
  flex: 1;
  padding: 12px 22px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rib:last-child { border-right: none; }
.rib-l {
  font-size: 10.5px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.rib-v {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* =============================================================
   CHART CARD
   ============================================================= */
.chart-card {
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  gap: 14px;
}
.range-pick {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.rng {
  padding: 5px 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  border-right: 1px solid var(--line);
  transition: all 0.12s;
}
.rng:last-child { border-right: none; }
.rng:hover { color: var(--text); background: var(--bg-2); }
.rng.active { color: var(--text); background: var(--bg-2); }

.chart-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.chart-pct {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.chart-pct.up { color: var(--up); }
.chart-pct.down { color: var(--down); }
.chart-sub {
  font-size: 11px;
  color: var(--text-3);
}

.chart-wrap {
  position: relative;
  height: 460px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
#priceCanvas {
  width: 100%;
  height: 360px;
  display: block;
}
.vol-divider {
  height: 1px;
  background: var(--line);
}
#volumeCanvas {
  width: 100%;
  height: 99px;
  display: block;
}
.chart-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  background: rgba(10, 10, 10, 0.7);
  z-index: 5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.chart-overlay[hidden] { display: none; }

/* =============================================================
   BOTTOM CARD — Activity / Ratio
   ============================================================= */
.bottom-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.bottom-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}
.bottom-tabs { display: flex; gap: 24px; }
.bt {
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-3);
  border-bottom: 1.5px solid transparent;
  transition: all 0.12s;
}
.bt:hover { color: var(--text); }
.bt.active {
  color: var(--text);
  border-bottom-color: var(--text);
}
.bottom-tools { display: flex; align-items: center; gap: 12px; }
.muted-mono {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--up);
  letter-spacing: 0.04em;
}

.tab-panel[hidden] { display: none; }

/* Activity */
.act-cols {
  display: grid;
  grid-template-columns: 70px 60px 1fr 1fr 1fr 100px;
  gap: 14px;
  padding: 10px 28px;
  font-size: 10.5px;
  color: var(--text-3);
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.act-cols span:nth-child(3),
.act-cols span:nth-child(4),
.act-cols span:nth-child(5),
.act-cols span:nth-child(6) { text-align: right; }

.act-list { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; }
.act-row {
  display: grid;
  grid-template-columns: 70px 60px 1fr 1fr 1fr 100px;
  gap: 14px;
  padding: 9px 28px;
  border-bottom: 1px solid rgba(28, 28, 28, 0.6);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  align-items: center;
}
.act-row .age { color: var(--text-3); font-size: 11.5px; }
.act-row .side { font-weight: 500; font-size: 11.5px; }
.act-row .side.buy { color: var(--up); }
.act-row .side.sell { color: var(--down); }
.act-row .px, .act-row .sz, .act-row .vl { text-align: right; color: var(--text-2); }
.act-row .vl { color: var(--text); }
.act-row .tr {
  text-align: right;
  font-size: 11px;
  color: var(--text-3);
}
.act-row:hover { background: var(--bg-1); }

/* Ratio panel */
.ratio-wrap {
  padding: 22px 28px;
}
.ratio-windows {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
}
.rw {
  padding: 5px 11px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: all 0.12s;
}
.rw:hover { color: var(--text); }
.rw.active { color: var(--text); background: var(--bg-2); border-color: var(--line-3); }

.ratio-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.ratio-row:last-child { border-bottom: none; }
.ratio-half { display: flex; flex-direction: column; gap: 4px; }
.ratio-label {
  font-size: 11px;
  color: var(--text-3);
}
.ratio-num {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.ratio-num.up { color: var(--up); }
.ratio-num.down { color: var(--down); }
.ratio-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--down-bar);
  overflow: hidden;
}
.ratio-bar-fill {
  height: 100%;
  background: var(--up-bar);
  border-right: 1px solid var(--bg);
  width: 50%;
  transition: width 0.4s ease;
}

/* =============================================================
   RIGHT — TRADE
   ============================================================= */
.trade {
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.trade-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}
.ttab {
  padding: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  border-right: 1px solid var(--line);
  transition: all 0.12s;
  position: relative;
}
.ttab:last-child { border-right: none; }
.ttab:hover { color: var(--text); }
.ttab.active { color: var(--text); background: var(--bg-2); }
.ttab.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1.5px;
}
.ttab[data-side="buy"].active { color: var(--up); }
.ttab[data-side="buy"].active::after { background: var(--up); }
.ttab[data-side="sell"].active { color: var(--down); }
.ttab[data-side="sell"].active::after { background: var(--down); }

.trade-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.trade-field {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.12s;
}
.trade-field:focus-within { border-color: var(--line-3); }
.trade-field-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.tf-label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tf-balance {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
}
.trade-input {
  display: flex;
  align-items: center;
  gap: 10px;
}
.trade-input input {
  flex: 1;
  font-family: var(--mono);
  font-size: 20px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  width: 100%;
}
.trade-input.ro input { color: var(--text-2); }
.tf-token {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 10px;
}
.presets button {
  padding: 5px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: all 0.12s;
}
.presets button:hover {
  color: var(--text);
  border-color: var(--line-3);
}

.trade-arrow {
  display: grid;
  place-items: center;
  height: 22px;
  color: var(--text-4);
  margin: 4px 0;
}

.trade-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 16px 0;
}
.trade-meta > div {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
}
.trade-meta > div span:first-child { color: var(--text-3); }
.trade-meta > div span:last-child {
  color: var(--text-2);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.primary-btn {
  width: 100%;
  padding: 11px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.12s;
}
.primary-btn:hover { background: #fff; }
.primary-btn.buy { background: var(--up); color: #042814; }
.primary-btn.buy:hover { background: #5ee68f; }
.primary-btn.sell { background: var(--down); color: #2b0a0a; }
.primary-btn.sell:hover { background: #ff8080; }

.disclaimer {
  margin-top: 12px;
  font-size: 10.5px;
  color: var(--text-4);
  text-align: center;
  line-height: 1.5;
}

/* =============================================================
   FOOTER
   ============================================================= */
.footbar {
  border-top: 1px solid var(--line);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-3);
}
.muted { color: var(--text-3); }
.footbar a {
  color: var(--text-2);
  transition: color 0.12s;
}
.footbar a:hover { color: var(--text); }

/* =============================================================
   MODAL + TOAST
   ============================================================= */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}
.modal-card {
  position: relative;
  width: 360px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 22px;
  animation: pop 0.18s ease-out;
}
@keyframes pop {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.modal-head h3 {
  font-size: 16px;
  font-weight: 500;
}
.modal-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 18px;
}
.wallets { display: flex; flex-direction: column; gap: 4px; }
.wallet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  font-size: 13px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: all 0.12s;
}
.wallet:hover { border-color: var(--text-3); }
.wallet span { color: var(--text-3); }

.toast[hidden] { display: none; }
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text);
  z-index: 200;
  animation: slideUp 0.2s ease-out;
}
@keyframes slideUp {
  from { transform: translate(-50%, 8px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* =============================================================
   SCROLLBAR
   ============================================================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1280px) {
  .topbar { grid-template-columns: 200px 1fr auto; }
  .page { grid-template-columns: 220px 1fr 300px; }
  .ribbon .rib:nth-child(5) { display: none; }
}
@media (max-width: 1024px) {
  .topbar { grid-template-columns: 1fr; padding: 12px 16px; }
  .search { max-width: 100%; }
  .page { grid-template-columns: 1fr; }
  .rail, .trade { border: none; border-top: 1px solid var(--line); }
  .market-list { max-height: 420px; }
  .ribbon { flex-wrap: wrap; }
  .rib { min-width: 33%; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .hero { padding: 20px 18px 16px; flex-direction: column; }
  .hero-price { text-align: left; }
  .price-main { justify-content: flex-start; }
  .price-sub { justify-content: flex-start; }
  .asset-name { font-size: 20px; }
  .price-val { font-size: 26px; }
  .chart-head { padding: 10px 16px; }
  .chart-wrap { height: 380px; }
  #priceCanvas { height: 290px; }
  .bottom-head { padding: 0 16px; }
  .act-cols, .act-row { grid-template-columns: 60px 50px 1fr 1fr; gap: 8px; padding: 8px 16px; font-size: 11px; }
  .act-cols span:nth-child(5), .act-cols span:nth-child(6),
  .act-row .vl, .act-row .tr { display: none; }
  .ratio-wrap { padding: 18px; }
  .ratio-row { grid-template-columns: 1fr 1fr; }
  .ratio-bar { grid-column: 1 / -1; }
}
