/* ============================================================================
   OST Prediction — Unified Market Modal
   Always renders above EVERYTHING (z-index max). Mounted at body level so
   nested overflow:hidden / transform parents in the wallet portal can't trap
   it. Replaces the previous mini-modal that overlapped the wallet portal page.
   ============================================================================ */

.ost-modal {
  position: fixed;
  inset: 0;
  /* Max int32 — beats any other overlay on the page including the wallet
     portal modals, leaflet markers, faucet hub, etc. */
  z-index: 2147483647;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #f4ead4;
}
.ost-modal.is-open { display: flex; }

.ost-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(2, 4, 12, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ost-modal__panel {
  position: relative;
  width: min(1280px, 96vw);
  max-height: 95vh;
  overflow-y: auto;
  /* Reserve scrollbar space so depth/trade refreshes can't shift the layout */
  scrollbar-gutter: stable;
  background: linear-gradient(170deg, #14102a 0%, #0a0c1c 60%, #06080f 100%);
  border: 1px solid rgba(108, 230, 164, 0.18);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  padding: 28px 34px 26px;
}

.ost-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f4ead4;
  font-size: 22px;
  cursor: pointer;
  z-index: 50;
  touch-action: manipulation;
  transition: background 120ms ease, transform 120ms ease;
}
.ost-modal__close:hover { background: rgba(255, 255, 255, 0.14); transform: rotate(90deg); }

.ost-modal__bet-action:disabled,
.ost-modal__bet-action.is-loading {
  cursor: wait;
  opacity: 0.74;
}

/* Header --------------------------------------------------------------- */
.ost-modal__header { margin-bottom: 16px; }
.ost-modal__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ost-modal__tag {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: rgba(108, 230, 164, 0.12);
  border: 1px solid rgba(108, 230, 164, 0.3);
  color: #6ce6a4;
}
.ost-modal__tag--time {
  background: rgba(255, 217, 128, 0.12);
  border-color: rgba(255, 217, 128, 0.3);
  color: #ffd980;
}
.ost-modal__title { font-size: 22px; font-weight: 700; margin: 0 0 6px 0; line-height: 1.25; padding-right: 50px; }
.ost-modal__detail { margin: 0; font-size: 13px; opacity: 0.78; line-height: 1.5; }

/* Main grid ------------------------------------------------------------ */
.ost-modal__main { display: flex; flex-direction: column; gap: 16px; }
.ost-modal__two-col { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .ost-modal__two-col { grid-template-columns: 1fr; } }

/* BTC tile inside modal ------------------------------------------------ */
.ost-modal__btc {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,167,38,0.10), rgba(255,217,128,0.04));
  border: 1px solid rgba(255, 167, 38, 0.3);
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
@media (max-width: 720px) { .ost-modal__btc { grid-template-columns: repeat(2, 1fr); } }
.ost-modal__btc-row { display: flex; flex-direction: column; gap: 2px; }
.ost-modal__btc-row span { font-size: 10px; opacity: 0.6; letter-spacing: 0.06em; text-transform: uppercase; }
.ost-modal__btc-row strong { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; color: #ffd980; }

/* Hero variant — used for the 5-min BTC market: huge live price + countdown */
.ost-modal__btc--hero { display: block; padding: 14px 16px; }
.ost-modal__btc-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ost-modal__btc-hero-live, .ost-modal__btc-hero-clock { display: flex; flex-direction: column; gap: 2px; }
.ost-modal__btc-hero-live span, .ost-modal__btc-hero-clock span {
  font-size: 11px; opacity: 0.65; letter-spacing: 0.08em; text-transform: uppercase;
}
.ost-modal__btc-hero-live strong {
  font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: #ffd980; letter-spacing: -0.01em;
  transition: color .18s ease, text-shadow .25s ease, transform .18s ease;
}
.ost-modal__btc-hero-live strong.is-up   { color: #7ce6a8; text-shadow: 0 0 14px rgba(124,230,168,.45); transform: translateY(-1px); }
.ost-modal__btc-hero-live strong.is-down { color: #ff7c8a; text-shadow: 0 0 14px rgba(255,124,138,.45); transform: translateY(1px); }
.ost-modal__btc-hero-live em {
  font-style: normal; font-size: 13px; opacity: 0.85; font-variant-numeric: tabular-nums;
}
.ost-modal__btc-hero-clock { text-align: right; }
.ost-modal__btc-hero-clock strong {
  font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; color: #ffd980;
}
.ost-modal__btc-hero-clock strong.is-urgent {
  color: #ff7c8a; animation: ost-modal-pulse 0.8s ease-in-out infinite;
}
.ost-modal__btc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ost-modal__btc.is-up   { border-color: rgba(124,230,168,0.55); box-shadow: 0 0 0 1px rgba(124,230,168,.18) inset, 0 8px 28px rgba(124,230,168,.12); }
.ost-modal__btc.is-down { border-color: rgba(255,124,138,0.55); box-shadow: 0 0 0 1px rgba(255,124,138,.18) inset, 0 8px 28px rgba(255,124,138,.12); }
@keyframes ost-modal-pulse { 0%,100%{ opacity:1; transform:scale(1);} 50%{ opacity:.65; transform:scale(1.04);} }
@media (max-width: 720px) {
  .ost-modal__btc--hero { padding: 16px; }
  .ost-modal__btc-hero { gap: 10px; padding-bottom: 10px; margin-bottom: 10px; }
  .ost-modal__btc-hero-live strong { font-size: 34px; }
  .ost-modal__btc-hero-clock strong { font-size: 28px; }
  .ost-modal__btc-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .ost-modal__btc-row strong { font-size: 18px; }
}

/* Live aggregate P/L bar — sits above the per-position list */
.ost-modal__live-pl {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 12px 14px; margin: 8px 0 10px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.ost-modal__live-pl-cell { display: flex; flex-direction: column; gap: 2px; }
.ost-modal__live-pl-cell span { font-size: 10px; opacity: 0.6; letter-spacing: 0.08em; text-transform: uppercase; }
.ost-modal__live-pl-cell strong {
  font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums;
  transition: color .2s ease;
}
.ost-modal__live-pl.is-up {
  background: linear-gradient(135deg, rgba(124,230,168,0.12), rgba(124,230,168,0.04));
  border-color: rgba(124,230,168,0.45);
  box-shadow: 0 0 0 1px rgba(124,230,168,.12) inset;
}
.ost-modal__live-pl.is-up [data-bind="livePlPnl"] { color: #7ce6a8; }
.ost-modal__live-pl.is-down {
  background: linear-gradient(135deg, rgba(255,124,138,0.12), rgba(255,124,138,0.04));
  border-color: rgba(255,124,138,0.45);
  box-shadow: 0 0 0 1px rgba(255,124,138,.12) inset;
}
.ost-modal__live-pl.is-down [data-bind="livePlPnl"] { color: #ff7c8a; }
@media (max-width: 720px) {
  .ost-modal__live-pl {
    position: sticky; top: 0; z-index: 6;
    padding: 14px; gap: 8px;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .ost-modal__live-pl-cell strong { font-size: 22px; }
}

/* Prices --------------------------------------------------------------- */
.ost-modal__prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ost-modal__price {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.ost-modal__price--yes { border-color: rgba(124,230,168,0.35); background: rgba(124,230,168,0.07); }
.ost-modal__price--no  { border-color: rgba(255,124,138,0.35); background: rgba(255,124,138,0.07); }
.ost-modal__price span { font-size: 11px; opacity: 0.7; letter-spacing: 0.05em; text-transform: uppercase; }
.ost-modal__price strong { font-size: 26px; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .ost-modal__price { padding: 16px; min-height: 64px; }
  .ost-modal__price strong { font-size: 32px; }
  .ost-modal__sell-row { flex-wrap: wrap; gap: 8px 10px !important; padding: 10px 0 !important; }
  .ost-modal__sell-row > button[data-act="sell"] {
    width: 100%; margin-left: 0 !important; min-height: 44px; font-size: 14px !important;
    border-radius: 10px !important;
  }
}

/* Chart ---------------------------------------------------------------- */
.ost-modal__chart {
  padding: 12px 14px 8px; border-radius: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
}
.ost-modal__chart-head, .ost-modal__book-head, .ost-modal__trades-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px;
}
.ost-modal__chart-head h4, .ost-modal__book-head h4, .ost-modal__trades-head h4 {
  margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #ffd980;
}
.ost-modal__chart-head span, .ost-modal__book-head span, .ost-modal__trades-head span { font-size: 11px; opacity: 0.6; }
.ost-modal__chart canvas { display: block; width: 100%; height: 280px; }

/* YES/NO toggle for the chart */
.ost-modal__chart-toggle { display: inline-flex; gap: 0; margin-left: 12px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); }
.ost-modal__chart-toggle button {
  appearance: none; border: 0; padding: 4px 12px;
  background: rgba(255,255,255,0.04); color: #f4ead4; cursor: pointer;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  transition: background 100ms ease;
}
.ost-modal__chart-toggle button.is-active.is-yes { background: linear-gradient(135deg, #7ce6a8, #4cc985); color: #0a0a0a; }
.ost-modal__chart-toggle button.is-active.is-no  { background: linear-gradient(135deg, #ff7c8a, #e85565); color: #fff; }
.ost-modal__chart-toggle button:not(.is-active):hover { background: rgba(255,255,255,0.08); }

/* Order book + trades -------------------------------------------------- */
.ost-modal__book, .ost-modal__trades {
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
}
.ost-modal__book-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ost-modal__book-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 6px;
}
.ost-modal__book-label--yes { color: #7ce6a8; }
.ost-modal__book-label--no  { color: #ff7c8a; }
.ost-modal__book-list {
  display: flex; flex-direction: column; gap: 4px;
  /* Fixed min-height so refresh ticks never resize the panel — fixes the
     jittery up/down bouncing of the surrounding tab. */
  min-height: 220px; max-height: 240px; overflow-y: auto;
  scrollbar-gutter: stable;
}
.ost-modal__book-row {
  display: flex; justify-content: space-between; padding: 4px 8px;
  border-radius: 6px; background: rgba(255,255,255,0.03);
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.ost-modal__book-empty { padding: 10px; font-size: 11px; opacity: 0.5; text-align: center; }

.ost-modal__trades-scroll { min-height: 240px; max-height: 280px; overflow-y: auto; scrollbar-gutter: stable; }
.ost-modal__trades-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.ost-modal__trades-table thead { position: sticky; top: 0; background: #0a0c1c; }
.ost-modal__trades-table th, .ost-modal__trades-table td {
  padding: 5px 6px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ost-modal__trades-table th { font-size: 10px; opacity: 0.55; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600; }

/* Bet panel ------------------------------------------------------------ */
.ost-modal__bet {
  padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(108,230,164,0.08), rgba(108,230,164,0.02));
  border: 1px solid rgba(108,230,164,0.25);
}
.ost-modal__bet-head h4 { margin: 0 0 10px 0; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: #6ce6a4; text-transform: uppercase; }
.ost-modal__bet-grid {
  display: grid; gap: 10px;
  grid-template-columns: minmax(180px, auto) minmax(120px, auto) 1fr minmax(160px, auto);
  align-items: end;
}
@media (max-width: 720px) { .ost-modal__bet-grid { grid-template-columns: 1fr 1fr; } }
.ost-modal__bet-toggle {
  display: inline-flex; gap: 0;
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.ost-modal__side-btn {
  appearance: none; border: 0; background: rgba(255,255,255,0.04);
  color: #f4ead4; padding: 10px 18px; font-weight: 700; font-size: 13px;
  cursor: pointer; transition: background 120ms ease;
}
.ost-modal__side-btn--yes.is-active { background: linear-gradient(135deg, #7ce6a8, #4cc985); color: #0a0a0a; }
.ost-modal__side-btn--no.is-active  { background: linear-gradient(135deg, #ff7c8a, #e85565); color: #fff; }
.ost-modal__side-btn:not(.is-active):hover { background: rgba(255,255,255,0.08); }

.ost-modal__bet-stake {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; opacity: 0.75; letter-spacing: 0.04em; text-transform: uppercase;
}
.ost-modal__bet-stake input {
  padding: 9px 12px; border-radius: 8px;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.12);
  color: #f4ead4; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.ost-modal__bet-projected {
  font-size: 12px; opacity: 0.85; font-variant-numeric: tabular-nums; line-height: 1.4;
}
.ost-modal__bet-action {
  appearance: none; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #ffd980, #f5b637);
  color: #0a0a0a; font-weight: 800; font-size: 14px;
  padding: 12px 18px; border-radius: 10px; letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(255, 217, 128, 0.25);
  transition: transform 100ms ease, filter 120ms ease;
}
.ost-modal__bet-action:hover { transform: translateY(-1px); filter: brightness(1.05); }
.ost-modal__bet-action:active { transform: translateY(0); }

.ost-modal__bet-venue {
  display: inline-block; margin-top: 10px;
  font-size: 12px; color: #9ec8ff; text-decoration: none; opacity: 0.85;
}
.ost-modal__bet-venue:hover { opacity: 1; text-decoration: underline; }

/* Toast inside modal --------------------------------------------------- */
.ost-modal__toast {
  position: sticky; bottom: 8px; left: 0; right: 0;
  margin-top: 14px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 12px; font-weight: 600; text-align: center;
  background: rgba(20, 16, 8, 0.95); border: 1px solid rgba(255,217,128,0.35);
  color: #ffd980;
}
.ost-modal__toast.is-ok  { color: #7ce6a8; border-color: rgba(124,230,168,0.45); }
.ost-modal__toast.is-err { color: #ff7c8a; border-color: rgba(255,124,138,0.45); }

/* Make every market card visibly clickable */
.prediction-market-card { cursor: pointer; transition: transform 120ms ease, box-shadow 120ms ease; }
.prediction-market-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.35); }
.prediction-market-card::after {
  content: 'Click for live data, depth, ticks & bet';
  display: block;
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(108, 230, 164, 0.7);
  opacity: 0;
  transition: opacity 120ms ease;
}
.prediction-market-card:hover::after { opacity: 1; }

/* ── Multi-outcome buttons ─ for non-binary markets (Trump/Harris/RFK/etc) ── */
.ost-modal__outcomes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 12px 0; }
.ost-modal__outcome {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer; transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
  font: inherit; color: inherit; text-align: left;
}
.ost-modal__outcome:hover { background: rgba(124,230,168,0.10); border-color: rgba(124,230,168,0.30); }
.ost-modal__outcome.is-active { background: linear-gradient(135deg, rgba(124,230,168,0.22), rgba(76,201,133,0.10)); border-color: rgba(124,230,168,0.55); }
.ost-modal__outcome-label { font-size: 13px; font-weight: 700; flex: 1; }
.ost-modal__outcome-price { font-variant-numeric: tabular-nums; font-weight: 800; color: #f4ead4; }

/* ── Shared positions ticker ─ "Recent ticks" feed across ALL OST users ── */
.ost-modal__shared {
  margin-top: 16px; padding: 12px 14px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
}
.ost-modal__shared-title { display:flex; align-items:center; gap:6px; font-size:11px; letter-spacing:0.08em; text-transform:uppercase; color:#9ba0c8; margin-bottom:8px; }
.ost-modal__shared-title::before { content:''; width:8px; height:8px; border-radius:50%; background:#7ce6a8; box-shadow:0 0 8px #7ce6a8; animation: ostPulseDot 1.5s ease-in-out infinite; }
@keyframes ostPulseDot { 0%,100% { opacity: 0.4 } 50% { opacity: 1 } }
.ost-modal__shared-list { display:flex; flex-direction:column; gap:6px; max-height: 180px; overflow-y:auto; scrollbar-gutter:stable; }
.ost-modal__shared-row { display:flex; align-items:center; gap:8px; padding:6px 10px; border-radius:8px; font-size:12px; background:rgba(0,0,0,0.25); animation: ostFadeIn 280ms ease; }
.ost-modal__shared-row.is-yes { border-left: 3px solid #7ce6a8; }
.ost-modal__shared-row.is-no  { border-left: 3px solid #ff7c8a; }
.ost-modal__shared-wallet { font-family:'JetBrains Mono', monospace; color:#9ba0c8; font-size:11px; }
.ost-modal__shared-side { font-weight:800; padding:1px 6px; border-radius:4px; font-size:10px; }
.ost-modal__shared-row.is-yes .ost-modal__shared-side { background:rgba(124,230,168,0.18); color:#7ce6a8; }
.ost-modal__shared-row.is-no  .ost-modal__shared-side { background:rgba(255,124,138,0.18); color:#ff7c8a; }
.ost-modal__shared-stake { font-weight:700; color:#ffd980; font-variant-numeric:tabular-nums; }
.ost-modal__shared-market { color:#cbd1f0; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ost-modal__shared-time { color:#6b7099; font-size:10px; }
@keyframes ostFadeIn { from { opacity:0; transform: translateY(-4px); } to { opacity:1; transform:none; } }

@media (max-width: 720px) {
  .ost-modal {
    align-items: stretch;
    justify-content: center;
    padding: max(6px, env(safe-area-inset-top)) 6px max(6px, env(safe-area-inset-bottom));
  }
  .ost-modal__panel {
    width: min(100%, 680px);
    max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
    padding: 50px 12px 12px;
    border-radius: 10px;
    font-size: 13px;
  }
  .ost-modal__close {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
    font-size: 22px;
    z-index: 2147483647;
  }
  .ost-modal__main { gap: 10px; }
  .ost-modal__two-col { gap: 10px; }
  .ost-modal__tags { gap: 4px; margin-bottom: 6px; }
  .ost-modal__tag { padding: 2px 7px; border-radius: 6px; font-size: 9px; letter-spacing: 0.04em; }
  .ost-modal__title { font-size: 18px; line-height: 1.2; margin-bottom: 4px; padding-right: 36px; }
  .ost-modal__detail { font-size: 11px; line-height: 1.35; }
  .ost-modal__btc--hero { padding: 10px; }
  .ost-modal__btc-hero { gap: 8px; padding-bottom: 8px; margin-bottom: 8px; }
  .ost-modal__btc-hero-live span, .ost-modal__btc-hero-clock span { font-size: 9px; letter-spacing: 0.05em; }
  .ost-modal__btc-hero-live strong { font-size: 22px; letter-spacing: 0; }
  .ost-modal__btc-hero-live em { font-size: 11px; }
  .ost-modal__btc-hero-clock strong { font-size: 20px; }
  .ost-modal__btc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .ost-modal__btc-row span { font-size: 9px; letter-spacing: 0.04em; }
  .ost-modal__btc-row strong { font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
  .ost-modal__prices { gap: 8px; }
  .ost-modal__price { padding: 9px 10px; min-height: 52px; border-radius: 8px; }
  .ost-modal__price span { font-size: 9px; letter-spacing: 0.04em; }
  .ost-modal__price strong { font-size: 22px; }
  .ost-modal__chart { padding: 9px 10px 7px; border-radius: 8px; }
  .ost-modal__chart-head, .ost-modal__book-head, .ost-modal__trades-head { margin-bottom: 6px; align-items: center; gap: 8px; }
  .ost-modal__chart-head h4, .ost-modal__book-head h4, .ost-modal__trades-head h4 { font-size: 10px; letter-spacing: 0.04em; }
  .ost-modal__chart-head span, .ost-modal__book-head span, .ost-modal__trades-head span { font-size: 9px; }
  .ost-modal__chart-toggle { margin-left: 6px; border-radius: 6px; }
  .ost-modal__chart-toggle button { padding: 3px 8px; font-size: 10px; }
  .ost-modal__chart canvas { height: 150px; }
  .ost-modal__book, .ost-modal__trades, .ost-modal__sell, .ost-modal__shared, .ost-modal__bet { padding: 9px 10px; border-radius: 8px; }
  .ost-modal__book-cols { gap: 8px; }
  .ost-modal__book-list { min-height: 116px; max-height: 138px; }
  .ost-modal__book-row { padding: 3px 6px; font-size: 10px; }
  .ost-modal__trades-scroll { min-height: 126px; max-height: 154px; }
  .ost-modal__trades-table { font-size: 10px; }
  .ost-modal__trades-table th, .ost-modal__trades-table td { padding: 4px 5px; }
  .ost-modal__bet-head h4 { font-size: 10px; margin-bottom: 7px; }
  .ost-modal__bet-grid { grid-template-columns: 1fr; gap: 8px; }
  .ost-modal__bet-toggle, .ost-modal__side-btn, .ost-modal__bet-action { width: 100%; }
  .ost-modal__side-btn { padding: 8px 10px; font-size: 12px; }
  .ost-modal__bet-stake { font-size: 9px; }
  .ost-modal__bet-stake input { padding: 8px 10px; font-size: 13px; }
  .ost-modal__bet-projected { font-size: 11px; }
  .ost-modal__bet-action { padding: 10px 12px; font-size: 12px; border-radius: 8px; }
  .ost-modal__shared-list { max-height: 112px; gap: 4px; }
  .ost-modal__shared-row { padding: 5px 7px; gap: 6px; font-size: 10px; }
  .ost-modal__outcomes { grid-template-columns: 1fr; gap: 6px; margin: 8px 0; }
  .ost-modal__outcome { padding: 8px 10px; border-radius: 8px; }
  .ost-modal__outcome-label { font-size: 11px; }
  .ost-modal__live-pl { position: static; padding: 8px 10px; gap: 6px; }
  .ost-modal__live-pl-cell strong { font-size: 14px; }
}
