body[data-public-page="prediction"] .public-main {
  width: min(1920px, calc(100% - 20px));
  padding: 12px 0 28px;
}

.prediction-native-workbench {
  --prediction-up: var(--green);
  --prediction-down: var(--red);
  --prediction-focus: var(--lime);
  width: 100%;
  margin-inline: auto;
  gap: 8px;
}

.prediction-native-workbench .panel {
  min-width: 0;
}

.prediction-native-workbench input,
.prediction-native-workbench select {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #090f15;
  color: var(--text);
  padding: 0 10px;
  outline: 0;
}

.prediction-native-workbench input:focus,
.prediction-native-workbench select:focus {
  border-color: var(--prediction-focus);
  box-shadow: 0 0 0 2px rgba(199, 245, 100, .11);
}

.prediction-blocker {
  min-height: 44px;
  margin-bottom: 0;
  padding: 9px 12px;
  border: 1px solid rgba(247, 191, 89, .28);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(247, 191, 89, .07);
  color: #d9e2ea;
}

.prediction-blocker strong { color: var(--amber); white-space: nowrap; }
.prediction-blocker span { flex: 1; color: var(--muted); }
.prediction-blocker[data-state="ready"] {
  border-color: rgba(66, 211, 146, .28);
  background: rgba(66, 211, 146, .07);
}
.prediction-blocker[data-state="ready"] strong { color: var(--green); }
.prediction-blocker[data-state="blocked"] {
  border-color: rgba(255, 105, 120, .32);
  background: rgba(255, 105, 120, .07);
}
.prediction-blocker[data-state="blocked"] strong { color: var(--red); }

.prediction-workspace-tabs {
  min-height: 42px;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.prediction-workspace-tabs::-webkit-scrollbar { display: none; }
.prediction-workspace-tabs button {
  min-width: max-content;
  height: 32px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}
.prediction-workspace-tabs button[aria-selected="true"] {
  border-color: rgba(199, 245, 100, .42);
  background: rgba(199, 245, 100, .09);
  color: var(--text);
}
.prediction-workspace-tabs button:focus-visible {
  outline: 2px solid var(--prediction-focus);
  outline-offset: 1px;
}

.prediction-workbench-layout {
  display: grid;
  grid-template-columns: minmax(260px, .74fr) minmax(500px, 1.7fr) minmax(270px, .82fr);
  align-items: stretch;
  gap: 12px;
  height: clamp(640px, calc(100vh - 264px), 820px);
}

.prediction-native-workbench[data-workspace-tab="explorer"] .prediction-workbench-layout {
  grid-template-columns: minmax(340px, .82fr) minmax(620px, 1.8fr);
}
.prediction-native-workbench[data-workspace-tab="explorer"] .prediction-ticket { display: none; }

.prediction-event-browser,
.prediction-market-detail,
.prediction-ticket {
  min-height: 0;
  height: 100%;
  padding: 14px;
}
.prediction-event-browser { display: flex; flex-direction: column; }
.prediction-market-detail,
.prediction-ticket { overflow: auto; overscroll-behavior: contain; }

.prediction-pane-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.prediction-pane-heading h2,
.prediction-automation h2,
.prediction-recorder h2 { margin: 3px 0 0; font-size: 16px; }

.prediction-search { display: block; margin-bottom: 9px; }
.prediction-search input { width: 100%; }
.prediction-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prediction-event-count {
  padding: 10px 1px 7px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.prediction-event-list {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.prediction-event-row {
  width: 100%;
  margin: 0 0 7px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  background: #0a1016;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.prediction-event-row:hover,
.prediction-event-row.is-active { border-color: rgba(199, 245, 100, .55); background: #101821; }
.prediction-event-row > span,
.prediction-event-row > small { display: flex; justify-content: space-between; gap: 8px; }
.prediction-event-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-event-row small { color: var(--muted); font-variant-numeric: tabular-nums; }
.prediction-event-row [data-phase="current"] { color: var(--green); }
.prediction-event-row [data-phase="next"] { color: var(--amber); }
.prediction-event-row [data-phase="previous"] { color: var(--muted); }
.prediction-event-unsupported { color: var(--amber); }

/* The selected asset/period is the primary switch, just like the standalone
   desk.  Keep the optional sibling list short and scannable when a provider
   returns multiple markets for one period. */
.prediction-updown-sidebar .prediction-event-row {
  margin-bottom: 5px;
  padding: 8px;
  gap: 5px;
  border-radius: 6px;
  font-size: 10px;
}
.prediction-updown-sidebar .prediction-event-row small { font-size: 9px; }

.prediction-empty-detail {
  height: 100%;
  min-height: 400px;
  display: grid;
  place-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}
.prediction-empty-detail strong { color: var(--text); font-size: 16px; }

.prediction-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.prediction-detail-header h2 { margin: 2px 0; font-size: 15px; }
.prediction-detail-header p { margin: 0; color: var(--muted); }
.prediction-detail-actions { display: grid; justify-items: end; gap: 7px; }

.prediction-identity-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}
.prediction-identity-strip span {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #090f15;
  color: var(--muted);
  font-size: 10px;
}
.prediction-identity-strip b {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.prediction-reference-panel {
  margin: 9px 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #080e14;
}
.prediction-reference-heading { display: flex; justify-content: space-between; color: var(--muted); }
.prediction-reference-heading strong { color: var(--text); }
.prediction-reference-heading > span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.prediction-reference-heading em { color: var(--muted); font-size: 9px; font-style: normal; white-space: nowrap; }
.prediction-history-period { max-width: 210px; height: 24px; padding: 2px 22px 2px 7px; font-size: 9px; }
.prediction-reference-chart { width: 100%; height: 132px; margin-top: 7px; }
.prediction-reference-chart polyline { fill: none; stroke: var(--lime); stroke-width: 2; vector-effect: non-scaling-stroke; }
.prediction-reference-chart .prediction-chart-area { fill: rgba(199, 245, 100, .08); stroke: none; }

.prediction-outcome-tabs,
.prediction-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.prediction-outcome-tabs { margin-bottom: 7px; }
.prediction-outcome-tabs button,
.prediction-segmented button,
.prediction-management-tabs button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b1218;
  color: var(--muted);
  cursor: pointer;
}
.prediction-outcome-tabs button.is-active,
.prediction-segmented button.is-active,
.prediction-management-tabs button[aria-selected="true"] {
  border-color: var(--lime);
  color: var(--text);
  background: rgba(199, 245, 100, .08);
}

.prediction-book-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.prediction-book-side { min-width: 0; border: 1px solid var(--line-soft); border-radius: 7px; overflow: hidden; }
.prediction-book-side > strong { display: block; padding: 7px 9px; background: #0a1118; }
.prediction-book-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px 9px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.prediction-book-row span:last-child { text-align: right; }
.prediction-book-bids .prediction-book-row span:first-child { color: var(--green); }
.prediction-book-asks .prediction-book-row span:first-child { color: var(--red); }

.prediction-ticket { display: flex; flex-direction: column; gap: 10px; }
.prediction-ticket label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.prediction-ticket .prediction-pane-heading { margin-bottom: 0; }
.prediction-quote-preview {
  min-height: 72px;
  padding: 9px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.prediction-quote-preview[data-state="ready"] { border-style: solid; border-color: rgba(66, 211, 146, .45); }
.prediction-quote-preview[data-state="error"] { border-style: solid; border-color: rgba(255, 91, 113, .48); }
.prediction-quote-preview strong { color: var(--green); }
.prediction-quote-preview[data-state="error"] strong { color: var(--red); }
.prediction-ticket-boundary { color: var(--muted); line-height: 1.45; }
.prediction-ticket .button { width: 100%; }
.prediction-ticket .button:disabled { opacity: .45; cursor: not-allowed; }

.prediction-watchlist-layout {
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(520px, 1.55fr) minmax(260px, .72fr);
  gap: 12px;
  height: clamp(640px, calc(100vh - 264px), 820px);
}
.prediction-watchlist-layout > .panel {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 14px;
  overflow: auto;
  overscroll-behavior: contain;
}
.prediction-watch-hotspots,
.prediction-observation-pool { display: flex; flex-direction: column; }
.prediction-watch-state {
  display: grid;
  gap: 3px;
  margin-bottom: 9px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  color: var(--muted);
}
.prediction-watch-state strong { color: var(--amber); }
.prediction-watch-state[data-state="available"] strong { color: var(--green); }
.prediction-hotspot-list,
.prediction-observation-list { min-height: 0; overflow: auto; }
.prediction-hotspot-list { flex: 1 1 auto; }
.prediction-observation-list { flex: 1 1 auto; }
.prediction-hotspot-row,
.prediction-observation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0a1016;
}
.prediction-hotspot-row.is-active { border-color: rgba(199, 245, 100, .55); background: #101821; }
.prediction-hotspot-row > button:first-child,
.prediction-observation-row > button:first-child {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.prediction-hotspot-row > button:first-child strong,
.prediction-observation-row > button:first-child strong,
.prediction-hotspot-row > button:first-child span,
.prediction-observation-row > button:first-child span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-hotspot-row > button:first-child span,
.prediction-observation-row > button:first-child span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.prediction-watch-degraded {
  min-height: 140px;
  padding: 14px;
  display: grid;
  place-content: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}
.prediction-watch-degraded strong { color: var(--amber); }
.prediction-watch-boundary { margin: 0 0 10px; color: var(--muted); line-height: 1.45; }
.prediction-watch-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.prediction-watch-detail-head h3 { margin: 4px 0 6px; font-size: 19px; }
.prediction-watch-detail-head p { margin: 0; color: var(--muted); }
.prediction-recorder-history { max-height: 390px; overflow: auto; }
.prediction-recorder-history > div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(54px, .5fr) minmax(120px, .9fr);
  gap: 8px;
  padding: 7px 2px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.prediction-recorder-history > div strong { color: var(--text); }
.prediction-recorder-history > div span:last-child { text-align: right; }

.prediction-lifecycle-grid {
  display: grid;
  grid-template-columns: minmax(480px, 1.7fr) minmax(270px, .75fr) minmax(230px, .6fr);
  gap: 12px;
  height: clamp(620px, calc(100vh - 264px), 820px);
  margin-top: 0;
}
.prediction-lifecycle-grid > .panel { min-height: 0; height: 100%; padding: 14px; overflow: auto; }
.prediction-management { display: flex; flex-direction: column; }
.prediction-management-tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line-soft); padding-bottom: 8px; }
.prediction-management-tabs button { min-width: 76px; padding-inline: 12px; }
.prediction-management-body { min-height: 0; max-height: none; flex: 1 1 auto; overflow: auto; }
.prediction-management-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.4fr) repeat(3, minmax(72px, .7fr)) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.prediction-management-row strong { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-management-row button { height: 28px; }
.prediction-wallet-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
}
.prediction-wallet-summary strong { color: var(--text); font-variant-numeric: tabular-nums; }
.prediction-action-state { color: var(--amber); font-size: 10px; }

.prediction-toggle {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.prediction-toggle span { display: grid; gap: 3px; }
.prediction-toggle small { color: var(--muted); line-height: 1.35; }
.prediction-toggle input { width: 20px; height: 20px; padding: 0; accent-color: var(--lime); }
.prediction-autotp-profit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 5px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
}
.prediction-autotp-profit label { display: grid; gap: 3px; color: var(--muted); font-size: 10px; }
.prediction-autotp-profit input { height: 29px; font-variant-numeric: tabular-nums; }
.prediction-autotp-profit small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.prediction-recorder-state { display: grid; gap: 5px; margin-top: 12px; color: var(--muted); }
.prediction-recorder-state strong[data-state="HEALTHY"] { color: var(--green); }
.prediction-recorder-state strong[data-state="DEGRADED"] { color: var(--amber); }
.prediction-recorder-state strong[data-state="FAILED"] { color: var(--red); }
.prediction-table-empty { min-height: 120px; display: grid; place-items: center; color: var(--muted); text-align: center; }

@media (max-width: 1180px) {
  body[data-public-page="prediction"] .public-main { width: calc(100% - 24px); }
  .prediction-workbench-layout {
    grid-template-columns: minmax(240px, .72fr) minmax(440px, 1.4fr);
    height: auto;
    min-height: 640px;
  }
  .prediction-native-workbench[data-workspace-tab="explorer"] .prediction-workbench-layout {
    grid-template-columns: minmax(300px, .78fr) minmax(440px, 1.4fr);
  }
  .prediction-ticket { grid-column: 1 / -1; min-height: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prediction-ticket .prediction-pane-heading,
  .prediction-ticket .prediction-quote-preview,
  .prediction-ticket .prediction-ticket-boundary { grid-column: 1 / -1; }
  .prediction-lifecycle-grid { height: auto; min-height: 620px; grid-template-columns: 1.5fr 1fr; }
  .prediction-recorder { grid-column: 1 / -1; }
  .prediction-watchlist-layout { height: auto; min-height: 640px; grid-template-columns: minmax(280px, .8fr) minmax(440px, 1.4fr); }
  .prediction-observation-pool { grid-column: 1 / -1; min-height: 260px; }
}

@media (max-width: 760px) {
  body[data-public-page="prediction"] .public-main { width: calc(100% - 20px); padding-top: 10px; }
  .prediction-native-workbench { grid-template-columns: minmax(0, 1fr); }
  .prediction-native-workbench > * {
    min-width: 0;
    max-width: 100%;
  }
  .prediction-blocker { align-items: flex-start; flex-wrap: wrap; }
  .prediction-blocker strong,
  .prediction-blocker span { flex: 1 1 100%; white-space: normal; }
  .prediction-workbench-layout { display: flex; flex-direction: column; }
  .prediction-event-browser,
  .prediction-market-detail,
  .prediction-ticket { min-height: auto; }
  .prediction-event-list { max-height: 320px; }
  .prediction-market-detail { min-height: 560px; }
  .prediction-identity-strip { grid-template-columns: 1fr 1fr; }
  .prediction-book-columns { grid-template-columns: 1fr; }
  .prediction-ticket { display: flex; }
  .prediction-lifecycle-grid { display: flex; flex-direction: column; }
  .prediction-lifecycle-grid > .panel { height: auto; min-height: 220px; }
  .prediction-watchlist-layout { display: flex; flex-direction: column; height: auto; }
  .prediction-watchlist-layout > .panel { height: auto; min-height: 320px; }
  .prediction-watch-detail-head { display: grid; }
  .prediction-recorder-history > div { grid-template-columns: 1fr .5fr; }
  .prediction-recorder-history > div span:last-child { grid-column: 1 / -1; text-align: left; }
  .prediction-management-row { grid-template-columns: minmax(100px, 1.2fr) repeat(2, .7fr); }
  .prediction-management-row > :nth-child(4) { display: none; }
}

@media (max-width: 430px) {
  .prediction-native-workbench { margin-inline: -2px; width: calc(100% + 4px); }
  .prediction-source { width: 100%; min-width: 0; min-height: 38px; padding: 6px 8px; }
  .prediction-source small { display: none; }
  .prediction-native-workbench input,
  .prediction-native-workbench select { height: 34px; }
  .prediction-filters { grid-template-columns: 1fr; }
  .prediction-event-list { max-height: 284px; }
  .prediction-native-workbench[data-workspace-tab="updown"] .prediction-market-detail {
    order: 1;
    flex: 0 0 330px;
    min-height: 330px;
    height: 330px;
    overflow: auto;
  }
  .prediction-native-workbench[data-workspace-tab="updown"] .prediction-ticket {
    order: 2;
    min-height: 560px;
    height: auto;
  }
  .prediction-native-workbench[data-workspace-tab="updown"] .prediction-event-browser {
    order: 3;
    min-height: 400px;
    height: auto;
  }
  .prediction-native-workbench[data-workspace-tab="updown"] [data-prediction-detail-content] {
    display: flex;
    flex-direction: column;
  }
  .prediction-native-workbench[data-workspace-tab="updown"] .prediction-detail-header { order: 1; }
  .prediction-native-workbench[data-workspace-tab="updown"] [data-prediction-detail-content] > .prediction-blocker { order: 2; }
  .prediction-native-workbench[data-workspace-tab="updown"] .prediction-outcome-tabs { order: 3; }
  .prediction-native-workbench[data-workspace-tab="updown"] .prediction-book-columns { order: 4; }
  .prediction-native-workbench[data-workspace-tab="updown"] .prediction-identity-strip { order: 5; }
  .prediction-native-workbench[data-workspace-tab="updown"] .prediction-reference-panel { order: 6; }
  .prediction-detail-header { display: flex; padding-bottom: 7px; }
  .prediction-detail-header .section-kicker,
  .prediction-detail-header p { display: none; }
  .prediction-detail-header h2 { margin: 0; font-size: 17px; }
  .prediction-detail-actions { display: flex; align-items: center; }
  .prediction-detail-actions .button { display: none; }
  .prediction-identity-strip { grid-template-columns: 1fr; }
  .prediction-market-detail { padding-inline: 10px; }
  .prediction-book-row { padding-inline: 7px; }
  .prediction-management-tabs { overflow-x: auto; }
  .prediction-management-row { grid-template-columns: minmax(100px, 1fr) .7fr auto; }
  .prediction-management-row > :nth-child(3),
  .prediction-management-row > :nth-child(4) { display: none; }
}

/* v6 high-density desk: the outer shell is fixed like Trade; every data pane owns its scroll. */
body[data-public-page="prediction"] .public-main {
  width: 100%;
  height: calc(100vh - 56px);
  margin: 0;
  padding: 7px 10px 9px;
  overflow: hidden;
}
.prediction-native-workbench {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  gap: 6px;
}
.prediction-commandbar {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 3px 5px 3px 6px;
  overflow: hidden;
}
.prediction-commandbar .prediction-workspace-tabs {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
}
.prediction-commandbar .prediction-workspace-tabs button {
  height: 30px;
  padding-inline: 15px;
}
.prediction-commandbar .prediction-source {
  min-width: 190px;
  max-width: 260px;
  min-height: 32px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
}
.prediction-commandbar .prediction-source small { margin-top: 1px; }
.prediction-native-workbench > .prediction-blocker {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 10px;
}
.prediction-workbench-layout {
  min-height: 0;
  height: auto;
  /* Match the standalone desk proportions: the event selector and trading
     column stay wide enough for trader scanning while the two center charts
     keep a usable canvas at 1440px and above. */
  grid-template-columns: minmax(360px, 31fr) minmax(560px, 39fr) minmax(420px, 30fr);
  gap: 7px;
}
.prediction-updown-sidebar,
.prediction-market-detail,
.prediction-trade-column {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 9px;
}
.prediction-updown-sidebar {
  display: grid;
  grid-template-rows: max-content max-content minmax(100px, 1fr) minmax(130px, 1.2fr) max-content;
  gap: 5px;
  overflow: hidden;
}
.prediction-updown-sidebar .prediction-pane-heading,
.prediction-trade-column .prediction-pane-heading { margin: 0; }
.prediction-updown-sidebar .prediction-pane-heading h2,
.prediction-trade-column .prediction-pane-heading h2 { font-size: 14px; }
.prediction-updown-sidebar .prediction-event-list {
  min-height: 0;
  overflow: auto;
}
.prediction-current-event {
  min-width: 0;
  min-height: 38px;
  padding: 6px 7px;
  border: 1px solid rgba(37, 196, 138, .28);
  border-radius: 6px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  background: rgba(37, 196, 138, .055);
  font-size: 9px;
  color: var(--muted);
}
.prediction-current-event strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prediction-current-event b {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.prediction-button-filter {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}
.prediction-select-filter {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}
.prediction-select-filter select {
  min-width: 0;
  width: 100%;
  height: 28px;
  padding: 3px 28px 3px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(10, 18, 27, .78);
  color: var(--text);
  font: inherit;
}
.prediction-button-filter > div {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 3px;
  overflow: hidden;
}
.prediction-button-filter button,
.prediction-phase-summary button {
  min-width: 0;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(10, 18, 27, .7);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.prediction-button-filter button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  flex: 1 1 auto;
}
.prediction-button-filter button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prediction-button-filter button b { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.prediction-button-filter button.is-active,
.prediction-phase-summary button.is-active {
  border-color: rgba(37, 196, 138, .55);
  background: rgba(37, 196, 138, .12);
  color: var(--text);
}
.prediction-phase-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.prediction-phase-summary button {
  min-width: 0;
  padding: 5px 6px;
  display: flex;
  justify-content: space-between;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}
.prediction-phase-summary button > span { overflow: hidden; text-overflow: ellipsis; }
.prediction-phase-summary b { color: var(--text); font-variant-numeric: tabular-nums; }
.prediction-desk-selector { display: grid; gap: 5px; min-width: 0; }
.prediction-account-brief {
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 5px;
  overflow: hidden;
}
.prediction-account-brief .prediction-subhead { margin: 0; }
.prediction-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.prediction-account-grid > div {
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(119, 145, 170, .16);
  border-radius: 5px;
  background: rgba(9, 17, 25, .72);
}
.prediction-account-grid span,
.prediction-account-grid strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-account-grid span { color: var(--muted); font-size: 8px; }
.prediction-account-grid strong { margin-top: 3px; color: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; }
.prediction-exposure {
  min-height: 0;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 5px;
  overflow: hidden;
}
.prediction-subhead {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .04em;
}
.prediction-subhead strong { color: #b9c9d8; font-size: 10px; }
[data-prediction-exposure] { min-height: 0; overflow: auto; }
.prediction-exposure-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7ch 8ch;
  gap: 6px;
  padding: 5px 1px;
  border-bottom: 1px solid rgba(119, 145, 170, .11);
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.prediction-exposure-row strong { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.prediction-exposure-row span { text-align: right; }
.prediction-market-detail {
  overflow: hidden;
  overscroll-behavior: contain;
}
.prediction-market-detail [data-prediction-detail-content]:not([hidden]) {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
}
.prediction-detail-header { padding-bottom: 7px; }
.prediction-detail-header h2 { margin: 2px 0; font-size: 15px; }
.prediction-detail-header p { margin: 0; }
.prediction-detail-titleline { min-width: 0; }
.prediction-detail-titleline h2,
.prediction-detail-titleline p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-detail-header.is-stale { opacity: .78; }
.prediction-detail-countdown {
  min-width: 82px;
  padding: 4px 7px;
  border: 1px solid rgba(247, 191, 89, .32);
  border-radius: 6px;
  background: rgba(247, 191, 89, .07);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.prediction-detail-countdown span { display: block; color: var(--muted); font-size: 8px; }
.prediction-detail-countdown strong { display: block; color: var(--text); font-size: 20px; line-height: 1.05; letter-spacing: .02em; }
.prediction-detail-countdown.urgent { border-color: rgba(255, 105, 120, .58); background: rgba(255, 105, 120, .12); }
.prediction-detail-countdown.urgent strong { color: var(--red); }
.prediction-identity-strip { margin: 6px 0; }
.prediction-chart-grid {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 7px;
}
.prediction-chart-panel {
  min-height: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 4px;
  background: rgba(5, 11, 17, .62);
}
.prediction-chart-panel .prediction-reference-heading { margin: 0; }
.prediction-reference-chart { min-height: 0; height: 100%; }
.prediction-candle-chart .prediction-candle-wick { stroke: #7b8fa4; stroke-width: .32; }
.prediction-candle-chart .prediction-candle-up { fill: var(--green); }
.prediction-candle-chart .prediction-candle-down { fill: var(--red); }
.prediction-reference-stats {
  margin: 4px 0 6px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.prediction-reference-stats span {
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid rgba(119, 145, 170, .14);
  border-radius: 4px;
  color: var(--muted);
  font-size: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prediction-reference-stats b { margin-left: 4px; color: var(--text); font-variant-numeric: tabular-nums; }
.prediction-reference-tools {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 4px;
}
.prediction-reference-tools > span {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prediction-reference-intervals { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
.prediction-reference-intervals button {
  min-height: 21px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(10, 18, 27, .8);
  color: var(--muted);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}
.prediction-reference-intervals button:hover,
.prediction-reference-intervals button.is-active { border-color: rgba(199, 245, 100, .6); color: var(--text); background: rgba(199, 245, 100, .09); }
.prediction-candle-chart .prediction-anchor-line {
  stroke: var(--accent);
  stroke-width: .45;
  stroke-dasharray: 2 1.5;
}
.prediction-candle-chart .prediction-window-line {
  stroke: rgba(221, 230, 239, .52);
  stroke-width: .35;
  stroke-dasharray: 1.5 1.5;
}
.prediction-candle-chart .prediction-window-shade { fill: rgba(86, 140, 196, .08); }
.prediction-candle-chart .prediction-window-label {
  fill: #d7e1ea;
  font-size: 3.5px;
  paint-order: stroke;
  stroke: #081019;
  stroke-width: .8px;
  text-anchor: middle;
}
.prediction-candle-chart .prediction-chart-legend text { fill: #6f8599; font-size: 3.2px; letter-spacing: .05em; }
.prediction-legend-window { fill: rgba(86, 140, 196, .38); }
.prediction-legend-anchor { stroke: var(--accent); stroke-width: .65; stroke-dasharray: 2 1; }
.prediction-legend-up { fill: var(--green); }
.prediction-legend-down { fill: var(--red); }
.prediction-reference-chart .prediction-latest-label {
  fill: #f0f6fb;
  font-size: 4px;
  font-variant-numeric: tabular-nums;
  paint-order: stroke;
  stroke: #081019;
  stroke-width: .9px;
  text-anchor: end;
}
.prediction-candle-chart .prediction-chart-legend text {
  fill: #6f8599;
  font-size: 3.2px;
  letter-spacing: .05em;
}
.prediction-chart-axis { stroke: rgba(119, 145, 170, .46); stroke-width: 1; }
.prediction-chart-grid-line,
.prediction-trajectory-grid { stroke: rgba(119, 145, 170, .22); stroke-width: 1; stroke-dasharray: 5 5; }
.prediction-chart-grid-vertical,
.prediction-trajectory-grid-vertical { stroke-dasharray: 3 6; opacity: .72; }
.prediction-chart-axis-label,
.prediction-trajectory-axis-label {
  fill: #7890a3;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  paint-order: stroke;
  stroke: #081019;
  stroke-width: 2px;
}
.prediction-anchor-dot { fill: var(--amber); }
.prediction-trajectory-window { fill: rgba(86, 140, 196, .08); }
.prediction-trajectory-mid { stroke: rgba(126, 182, 228, .5); stroke-width: 1.2; stroke-dasharray: 4 5; }
.prediction-trajectory-event-line { stroke: rgba(247, 191, 89, .72); stroke-width: 1.1; stroke-dasharray: 4 4; }
.prediction-trajectory-close-line { stroke: rgba(138, 180, 255, .72); }
.prediction-trajectory-open-label,
.prediction-trajectory-close-label { fill: var(--amber); font-size: 10px; font-weight: 750; }
.prediction-trajectory-close-label { fill: #8ab4ff; }
.prediction-trajectory-axis { stroke: rgba(119, 145, 170, .46); stroke-width: 1; }
.prediction-trajectory-line { fill: none; stroke: var(--lime); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.prediction-trajectory-dot { fill: var(--lime); stroke: #081019; stroke-width: 1.4; }
.prediction-trajectory-metrics {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
}
.prediction-trajectory-metrics span {
  min-width: 0;
  padding: 3px 4px;
  border: 1px solid rgba(119, 145, 170, .14);
  border-radius: 4px;
  color: var(--muted);
  font-size: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prediction-trajectory-metrics small,
.prediction-trajectory-metrics b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-trajectory-metrics b { margin-top: 2px; color: var(--text); font-size: 9px; font-variant-numeric: tabular-nums; }
.prediction-event-chart .prediction-fixed-axis line {
  stroke: rgba(119, 145, 170, .24);
  stroke-width: .3;
  stroke-dasharray: 1.3 1.3;
}
.prediction-trade-column {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(128px, .72fr);
  grid-template-rows: auto auto minmax(170px, 1fr) auto;
  gap: 7px;
  overflow: auto;
  overscroll-behavior: contain;
}
.prediction-trade-column > .prediction-outcome-tabs,
.prediction-trade-column > .prediction-ticket-exposure,
.prediction-trade-column > .prediction-ticket-compact { grid-column: 1 / -1; }
.prediction-trade-column > .prediction-notional-book { grid-column: 1; min-width: 0; }
.prediction-trade-column > .prediction-tas { grid-column: 2; min-width: 0; }
.prediction-trade-column > .prediction-outcome-tabs {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.prediction-trade-column > .prediction-outcome-tabs button {
  min-height: 34px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.prediction-ticket-context {
  min-width: 0;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  background: #091119;
}
.prediction-ticket-context strong,
.prediction-ticket-context span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prediction-ticket-context strong { color: var(--text); font-size: 10px; }
.prediction-ticket-context span { color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; text-align: right; }
.prediction-ticket-context[data-state="ready"] { border-color: rgba(66, 211, 146, .34); }
.prediction-ticket-context[data-state="blocked"] { border-color: rgba(247, 191, 89, .32); }
.prediction-ticket-context[data-state="stale"] { border-color: rgba(247, 191, 89, .28); opacity: .78; }
.prediction-ticket-exposure {
  min-width: 0;
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid rgba(119, 145, 170, .18);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(14, 25, 35, .78);
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}
.prediction-ticket-exposure[hidden] { display: none; }
.prediction-ticket-exposure strong { color: #9dafc0; font-size: 8px; white-space: nowrap; }
.prediction-ticket-exposure span { min-width: 0; overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.prediction-notional-book,
.prediction-tas {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
[data-prediction-book],
[data-prediction-tas] { min-height: 0; overflow: auto; }
[data-prediction-book] { overflow: hidden; }
.prediction-book-head,
.prediction-notional-row,
.prediction-tas-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  min-height: 22px;
  align-items: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.prediction-book-head { position: sticky; z-index: 2; top: 0; color: #64798d; background: #091119; font-size: 10px; }
.prediction-book-head-four,
.prediction-book-four-row { grid-template-columns: minmax(0, .78fr) minmax(0, 1fr) minmax(0, .78fr) minmax(0, 1fr); }
.prediction-book-head-six,
.prediction-book-six-row { grid-template-columns: minmax(0, .82fr) minmax(0, .72fr) minmax(0, 1.05fr) minmax(0, .82fr) minmax(0, .72fr) minmax(0, 1.05fr); }
.prediction-book-head-four span:nth-child(1),
.prediction-book-head-four span:nth-child(2) { color: var(--green); }
.prediction-book-head-four span:nth-child(3),
.prediction-book-head-four span:nth-child(4) { color: var(--red); }
.prediction-book-head-six span:nth-child(-n+3) { color: var(--green); }
.prediction-book-head-six span:nth-child(n+4) { color: var(--red); }
.prediction-notional-row { position: relative; isolation: isolate; }
.prediction-notional-row::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px 0 1px auto;
  width: var(--prediction-depth, 0%);
  background: rgba(46, 204, 154, .09);
}
.prediction-depth-0 { --prediction-depth: 0%; }
.prediction-depth-1 { --prediction-depth: 5%; }
.prediction-depth-2 { --prediction-depth: 10%; }
.prediction-depth-3 { --prediction-depth: 15%; }
.prediction-depth-4 { --prediction-depth: 20%; }
.prediction-depth-5 { --prediction-depth: 25%; }
.prediction-depth-6 { --prediction-depth: 30%; }
.prediction-depth-7 { --prediction-depth: 35%; }
.prediction-depth-8 { --prediction-depth: 40%; }
.prediction-depth-9 { --prediction-depth: 45%; }
.prediction-depth-10 { --prediction-depth: 50%; }
.prediction-depth-11 { --prediction-depth: 55%; }
.prediction-depth-12 { --prediction-depth: 60%; }
.prediction-depth-13 { --prediction-depth: 65%; }
.prediction-depth-14 { --prediction-depth: 70%; }
.prediction-depth-15 { --prediction-depth: 75%; }
.prediction-depth-16 { --prediction-depth: 80%; }
.prediction-depth-17 { --prediction-depth: 85%; }
.prediction-depth-18 { --prediction-depth: 90%; }
.prediction-depth-19 { --prediction-depth: 95%; }
.prediction-depth-20 { --prediction-depth: 100%; }
.prediction-notional-row[data-side="ask"]::before { background: rgba(255, 105, 120, .09); }
.prediction-notional-row span,
.prediction-tas-row span { text-align: right; }
.prediction-book-four-row { min-height: 23px; gap: 5px; }
.prediction-book-four-row::before { display: none; }
.prediction-book-four-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-book-grid { min-height: 115px; }
.prediction-book-six-row { min-height: 23px; gap: 4px; }
.prediction-book-six-row::before { display: none; }
.prediction-book-six-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-book-shares { color: #b9c7d4; font-variant-numeric: tabular-nums; }
.prediction-book-meta,
.prediction-tas-meta {
  min-width: 0;
  padding: 3px 5px;
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prediction-book-meta strong[data-state="stale"],
.prediction-tas-meta strong[data-state="stale"] { color: var(--amber); }
.prediction-book-meta strong[data-state="fresh"],
.prediction-tas-meta strong[data-state="fresh"] { color: var(--green); }
.prediction-book-meta em { color: var(--amber); font-style: normal; }
.prediction-book-disclaimer { padding: 2px 5px 4px; color: #74889a; font-size: 7px; line-height: 1.25; }
.prediction-tas-row {
  grid-template-columns: minmax(0, 1fr) minmax(34px, .65fr) minmax(54px, .9fr);
  min-height: 22px;
  font-size: 10px;
  gap: 4px;
}
.prediction-book-price { font-variant-numeric: tabular-nums; }
.prediction-book-bid-price { color: var(--green); }
.prediction-book-ask-price { color: var(--red); }
.prediction-book-notional {
  position: relative;
  isolation: isolate;
  color: var(--text);
  font-weight: 650;
}
.prediction-book-notional::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 2px 0;
  width: var(--prediction-depth, 0%);
  border-radius: 2px;
}
.prediction-book-bid-notional::before { background: rgba(46, 204, 154, .15); }
.prediction-book-ask-notional::before { background: rgba(255, 105, 120, .15); }
.prediction-notional-row[data-side="bid"] span:first-child { color: var(--green); }
.prediction-notional-row[data-side="ask"] span:first-child,
.prediction-tas-row[data-side="SELL"] span:first-child { color: var(--red); }
.prediction-tas-row[data-side="BUY"] span:first-child { color: var(--green); }
.prediction-tas-row[data-move="up"] span:first-child { color: var(--green); }
.prediction-tas-row[data-move="down"] span:first-child { color: var(--red); }
.prediction-ticket-compact {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}
.prediction-ticket-compact > .prediction-pane-heading,
.prediction-ticket-compact > .prediction-estimated-cost,
.prediction-ticket-compact > .prediction-quote-preview,
.prediction-ticket-compact > .prediction-hotkey-hint,
.prediction-ticket-compact > .prediction-ticket-boundary,
.prediction-ticket-compact > [data-prediction-submit-host] { grid-column: 1 / -1; }
.prediction-submit-host { display: grid; }
.prediction-ticket-badges { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.prediction-hotkey-state {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid rgba(66, 211, 146, .35);
  border-radius: 5px;
  color: var(--green);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.prediction-hotkey-state {
  border: 1px solid rgba(247, 191, 89, .4);
  background: rgba(247, 191, 89, .06);
  color: var(--amber);
  cursor: pointer;
  font: inherit;
  font-size: 8px;
}
.prediction-hotkey-state[data-state="armed"] { border-color: rgba(66, 211, 146, .45); background: rgba(66, 211, 146, .06); color: var(--green); }
.prediction-hotkey-state[data-state="paused"] { border-color: rgba(119, 145, 170, .35); background: transparent; color: var(--muted); }
.prediction-hotkey-state[data-state="prepared"] { border-color: rgba(199, 245, 100, .5); color: var(--lime); }
.prediction-hotkey-state[data-state="paused"] { border-color: rgba(247, 191, 89, .35); color: var(--amber); }
.prediction-hotkey-mode {
  min-height: 20px;
  padding: 2px 5px;
  border: 1px solid rgba(119, 145, 170, .22);
  border-radius: 5px;
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.prediction-ticket-compact label { display: grid; gap: 3px; color: var(--muted); font-size: 10px; }
.prediction-ticket-compact input { height: 32px; }
.prediction-estimated-cost {
  min-width: 0;
  min-height: 31px;
  padding: 4px 7px;
  border: 1px solid rgba(119, 145, 170, .18);
  border-radius: 5px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 6px;
  background: rgba(14, 25, 35, .72);
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.prediction-estimated-cost strong { color: var(--text); text-align: right; }
.prediction-estimated-cost small { grid-column: 1 / -1; color: #74889a; font-size: 7px; }
.prediction-estimated-cost[data-state="ready"] { border-color: rgba(66, 211, 146, .3); }
.prediction-ticket-compact .prediction-segmented button { min-height: 30px; }
.prediction-ticket-compact .prediction-quote-preview {
  min-height: 44px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
}
.prediction-ticket-compact .prediction-quote-preview strong { grid-column: 1 / -1; }
.prediction-ticket-compact .button { min-height: 31px; }
.prediction-hotkey-hint {
  min-width: 0;
  color: #8396a8;
  font-size: 8px;
  line-height: 1.35;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.prediction-hotkey-settings-toggle { width: auto !important; justify-self: start; }
.prediction-hotkey-settings-panel {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(119, 145, 170, .2);
  border-radius: 6px;
  background: rgba(7, 14, 21, .985);
  box-shadow: 0 14px 35px rgba(0, 0, 0, .45);
  overflow: auto;
}
.prediction-hotkey-settings-panel[hidden] { display: none; }
.prediction-hotkey-settings-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prediction-hotkey-settings-head button { grid-column: auto; min-height: 25px; }
.prediction-hotkey-settings-hints { display: flex; flex-wrap: wrap; gap: 4px; }
.prediction-hotkey-settings-hints span {
  padding: 2px 5px;
  border: 1px solid rgba(119, 145, 170, .18);
  border-radius: 4px;
  color: var(--muted);
  font-size: 8px;
}
.prediction-hotkey-preset-editor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.prediction-hotkey-behavior-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.prediction-hotkey-settings-panel label { display: grid; gap: 3px; min-width: 0; color: var(--muted); font-size: 9px; }
.prediction-hotkey-settings-panel select { min-width: 0; height: 29px; }
.prediction-hotkey-settings-check { display: flex !important; align-items: center; gap: 5px; }
.prediction-hotkey-settings-check input { width: 16px; height: 16px; accent-color: var(--lime); }
.prediction-hotkey-settings-panel > button { width: auto !important; }
.prediction-explorer-layout,
.prediction-watchlist-layout,
.prediction-lifecycle-grid {
  min-height: 0;
  height: auto;
  gap: 7px;
}
.prediction-explorer-layout {
  display: grid;
  grid-template-columns: minmax(210px, 16fr) minmax(420px, 32fr) minmax(480px, 52fr);
}
.prediction-explorer-layout > .panel,
.prediction-watchlist-layout > .panel,
.prediction-lifecycle-grid > .panel { min-height: 0; height: 100%; overflow: auto; }
.prediction-explorer-taxonomy,
.prediction-explorer-browser { padding: 9px; overflow: hidden !important; }
.prediction-explorer-taxonomy { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 6px; }
.prediction-explorer-browser { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; gap: 6px; }
.prediction-explorer-taxonomy .prediction-pane-heading,
.prediction-explorer-browser .prediction-pane-heading { margin-bottom: 0; }
.prediction-explorer-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
.prediction-explorer-search-row .prediction-search { min-width: 0; margin: 0; }
.prediction-explorer-search-row input { height: 32px; }
.prediction-explorer-search-row .button { min-height: 32px; }
.prediction-explorer-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.prediction-explorer-filters select { height: 30px; padding-inline: 6px; font-size: 9px; }
.prediction-explorer-detail { padding: 11px; }
.prediction-explorer-list { min-height: 0; overflow: auto; }
.prediction-explorer-category-tree { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.prediction-explorer-category-group > div { border-left: 1px solid rgba(119, 145, 170, .2); margin-left: 8px; }
.prediction-explorer-category {
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  border: 0;
  border-bottom: 1px solid rgba(119, 145, 170, .12);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.prediction-explorer-category.is-child { min-height: 27px; padding-left: 11px; font-size: 9px; }
.prediction-explorer-category span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-explorer-category b { color: #6f8498; font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.prediction-explorer-category:hover,
.prediction-explorer-category.is-active { background: rgba(199, 245, 100, .08); color: var(--text); }
.prediction-explorer-category.is-active b { color: var(--accent); }
.prediction-explorer-pager {
  min-height: 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
}
.prediction-explorer-pager span { color: var(--muted); font-size: 9px; text-align: center; font-variant-numeric: tabular-nums; }
.prediction-explorer-pager .button { min-height: 27px; }
.prediction-explorer-description { margin: 7px 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.prediction-explorer-card {
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.prediction-explorer-card.is-active { background: rgba(199, 245, 100, .07); }
.prediction-explorer-card strong { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-explorer-card > span { overflow: hidden; color: #8194a6; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.prediction-explorer-card small { display: flex; justify-content: space-between; gap: 7px; color: #63798e; font-size: 8px; }
.prediction-explorer-card small span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-watch-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(78px, .8fr)) minmax(130px, 1.25fr);
  gap: 5px;
  margin-bottom: 7px;
}
.prediction-watch-filters select,
.prediction-watch-filters input { height: 32px; padding-inline: 7px; font-size: 9px; }
.prediction-watch-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  min-width: 0;
}
.prediction-watch-search-row .button { height: 32px; min-width: 48px; padding-inline: 9px; }
.prediction-hotspot-row small { color: #72879b; font-size: 8px; font-variant-numeric: tabular-nums; }

/* v12 generic watch desk mirrors the standalone Hot workspace without creating
   a second trading state machine: the same book/TAS/ticket column is re-homed
   by the controller between Up/Down and Watch. */
.prediction-watchlist-layout {
  height: 100%;
  grid-template-columns: minmax(360px, 31fr) minmax(560px, 39fr) minmax(420px, 30fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas:
    "hot detail trade";
  align-items: stretch;
}
.prediction-watch-hotspots { grid-area: hot; }
.prediction-watch-detail { grid-area: detail; }
.prediction-watchlist-layout > .prediction-trade-column { grid-area: trade; }
.prediction-watch-hotspots,
.prediction-watch-detail {
  padding: 9px !important;
  overflow: hidden !important;
}
.prediction-watch-hotspots .prediction-pane-heading,
.prediction-watch-detail .prediction-pane-heading { margin-bottom: 6px; }
.prediction-watch-hotspots .prediction-watch-filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.prediction-watch-hotspots .prediction-watch-search-row { grid-column: 1 / -1; }
.prediction-watch-state {
  min-height: 37px;
  margin-bottom: 5px;
  padding: 5px 7px;
  font-size: 9px;
}
.prediction-watch-boundary { margin-bottom: 5px; font-size: 9px; }
.prediction-watch-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
[data-prediction-watch-detail] {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  overflow: auto;
  overscroll-behavior: contain;
}
.prediction-watch-detail-head { gap: 8px; }
.prediction-watch-detail-head h3 {
  margin: 2px 0 3px;
  font-size: 14px;
  line-height: 1.2;
}
.prediction-watch-detail-head p { font-size: 9px; }
.prediction-watch-summary {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: 5px;
}
.prediction-watch-summary > div {
  min-width: 0;
  min-height: 58px;
  padding: 6px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  display: grid;
  align-content: center;
  gap: 2px;
  background: #091119;
  color: var(--muted);
}
.prediction-watch-summary span,
.prediction-watch-summary small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.prediction-watch-summary strong {
  overflow: hidden;
  color: var(--text);
  font: 760 14px ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}
.prediction-watch-score-card { border-color: rgba(199, 245, 100, .34) !important; }
.prediction-watch-score-card strong { color: var(--accent); font-size: 20px; }
.prediction-watch-method {
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  display: grid;
  grid-template-columns: auto auto repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 5px 8px;
  background: rgba(9, 17, 25, .72);
  color: var(--muted);
  font-size: 8px;
}
.prediction-watch-method > strong { color: #9dafc0; white-space: nowrap; }
.prediction-watch-method > em { color: #71869a; font-style: normal; white-space: nowrap; }
.prediction-watch-method > span { min-width: 0; display: flex; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.prediction-watch-method small { overflow: hidden; text-overflow: ellipsis; }
.prediction-watch-method b { color: var(--accent); font-variant-numeric: tabular-nums; }
.prediction-watch-breakdown { display: grid; gap: 4px; }
.prediction-watch-breakdown-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 8px;
}
.prediction-watch-breakdown-row > i {
  height: 4px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(119, 145, 170, .14);
}
.prediction-watch-breakdown-row > i > b { display: block; height: 100%; background: var(--accent); }
.prediction-score-bar-0 { width: 0%; }
.prediction-score-bar-1 { width: 5%; }
.prediction-score-bar-2 { width: 10%; }
.prediction-score-bar-3 { width: 15%; }
.prediction-score-bar-4 { width: 20%; }
.prediction-score-bar-5 { width: 25%; }
.prediction-score-bar-6 { width: 30%; }
.prediction-score-bar-7 { width: 35%; }
.prediction-score-bar-8 { width: 40%; }
.prediction-score-bar-9 { width: 45%; }
.prediction-score-bar-10 { width: 50%; }
.prediction-score-bar-11 { width: 55%; }
.prediction-score-bar-12 { width: 60%; }
.prediction-score-bar-13 { width: 65%; }
.prediction-score-bar-14 { width: 70%; }
.prediction-score-bar-15 { width: 75%; }
.prediction-score-bar-16 { width: 80%; }
.prediction-score-bar-17 { width: 85%; }
.prediction-score-bar-18 { width: 90%; }
.prediction-score-bar-19 { width: 95%; }
.prediction-score-bar-20 { width: 100%; }
.prediction-watch-breakdown-row > strong { color: #90a2b4; text-align: right; font-variant-numeric: tabular-nums; }
.prediction-watch-outcomes {
  min-height: 43px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.prediction-watch-outcome {
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 7px;
  background: #091119;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}
.prediction-watch-outcome strong { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.prediction-watch-outcome small { grid-column: 1 / -1; color: #71869a; font-size: 8px; text-align: right; }
.prediction-watch-outcome.is-active { border-color: rgba(199, 245, 100, .48); background: rgba(199, 245, 100, .07); }
.prediction-watch-replay { min-height: 210px; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.prediction-watch-replay .prediction-reference-chart { min-height: 180px; }
.prediction-watchlist-layout > .prediction-trade-column {
  height: 100%;
  padding: 9px;
}

@media (max-width: 1180px) {
  body[data-public-page="prediction"] { overflow: auto; }
  body[data-public-page="prediction"] .public-main {
    width: calc(100% - 20px);
    height: auto;
    min-height: calc(100vh - 56px);
    overflow: visible;
  }
  .prediction-native-workbench { height: auto; grid-template-rows: auto auto; }
  .prediction-workbench-layout { grid-template-columns: minmax(250px, .72fr) minmax(450px, 1.3fr); height: auto; min-height: 720px; }
  .prediction-market-detail { overflow: auto; }
  .prediction-market-detail [data-prediction-detail-content]:not([hidden]) {
    height: auto;
    display: block;
    overflow: visible;
  }
  .prediction-chart-grid {
    height: auto;
    grid-template-rows: 320px 240px;
  }
  .prediction-trade-column { grid-column: 1 / -1; min-height: 650px; }
  .prediction-explorer-layout { grid-template-columns: minmax(190px, .5fr) minmax(340px, 1fr) minmax(400px, 1.2fr); min-height: 700px; }
  .prediction-watchlist-layout {
    height: auto;
    min-height: 1180px;
    grid-template-columns: minmax(290px, .72fr) minmax(430px, 1.28fr);
    grid-template-rows: minmax(390px, auto) 620px;
    grid-template-areas:
      "hot detail"
      "trade trade";
  }
  .prediction-watchlist-layout > .prediction-trade-column { min-height: 620px; }
  .prediction-lifecycle-grid { height: auto; }
}

@media (max-width: 760px) {
  .prediction-commandbar { grid-template-columns: minmax(0, 1fr); height: auto; }
  .prediction-commandbar .prediction-source { display: none; }
  .prediction-workbench-layout,
  .prediction-explorer-layout { display: flex; flex-direction: column; min-height: 0; }
  .prediction-updown-sidebar { min-height: 620px; }
  .prediction-market-detail { min-height: 680px; }
  .prediction-trade-column { min-height: 760px; }
  .prediction-explorer-layout > .panel { min-height: 520px; }
  .prediction-watch-filters { grid-template-columns: 1fr 1fr; }
  .prediction-hotkey-hint { white-space: normal; }
}

@media (max-width: 430px) {
  body[data-public-page="prediction"] .public-main { width: calc(100% - 10px); padding-inline: 0; }
  .prediction-native-workbench { width: 100%; margin: 0; }
  .prediction-native-workbench > .prediction-blocker { font-size: 9px; }
  .prediction-updown-sidebar { order: 1; min-height: 590px; }
  .prediction-market-detail { order: 2; min-height: 590px; height: auto; }
  .prediction-trade-column { order: 3; min-height: 790px; }
  .prediction-chart-grid { grid-template-rows: 250px 210px; }
  .prediction-watch-filters { grid-template-columns: 1fr; }
  .prediction-ticket-compact { grid-template-columns: 1fr; }
  .prediction-ticket-compact > * { grid-column: 1 / -1; }
}

/* v11 mobile desk: keep the shell fixed and page the dense panes sideways.
   Each pane owns its vertical scroll, so Explorer rows and the order ticket
   never turn the whole portal into a multi-screen document. */
@media (max-width: 760px) {
  body[data-public-page="prediction"] {
    --prediction-mobile-topbar: 62px;
    --prediction-mobile-nav: 58px;
    overflow: hidden;
  }
  body[data-public-page="prediction"] .public-main {
    width: 100%;
    height: calc(100dvh - var(--prediction-mobile-topbar) - var(--prediction-mobile-nav));
    min-height: 0;
    padding: 5px;
    overflow: hidden;
  }
  .prediction-native-workbench {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    grid-template-rows: 38px minmax(0, 1fr);
    gap: 5px;
  }
  .prediction-commandbar {
    height: 38px;
    grid-template-columns: minmax(0, 1fr);
  }
  .prediction-commandbar .prediction-source { display: none; }
  .prediction-commandbar .prediction-workspace-tabs button {
    height: 28px;
    padding-inline: 11px;
  }
  .prediction-native-workbench > .prediction-blocker {
    min-height: 30px;
    max-height: 48px;
    padding: 4px 7px;
    overflow: auto;
  }
  .prediction-workbench-layout,
  .prediction-explorer-layout,
  .prediction-watchlist-layout,
  .prediction-lifecycle-grid {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: row;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    overflow-anchor: none;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }
  .prediction-workbench-layout > .panel,
  .prediction-explorer-layout > .panel,
  .prediction-watchlist-layout > .panel,
  .prediction-lifecycle-grid > .panel {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    scroll-snap-align: start;
  }
  .prediction-native-workbench[data-workspace-tab="updown"] .prediction-market-detail {
    order: 1;
    flex-basis: 100%;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  .prediction-native-workbench[data-workspace-tab="updown"] .prediction-trade-column {
    order: 2;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(170px, 1fr) minmax(110px, .6fr) auto;
  }
  .prediction-trade-column > * { grid-column: 1 / -1 !important; }
  .prediction-native-workbench[data-workspace-tab="updown"] .prediction-updown-sidebar {
    order: 3;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  .prediction-native-workbench[data-workspace-tab="updown"]
  .prediction-market-detail [data-prediction-detail-content]:not([hidden]) {
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
  }
  .prediction-native-workbench[data-workspace-tab="updown"] .prediction-chart-grid {
    min-height: 0;
    height: 100%;
    grid-template-rows: minmax(0, 1.35fr) minmax(0, 1fr);
  }
  .prediction-explorer-layout > .panel,
  .prediction-watchlist-layout > .panel,
  .prediction-lifecycle-grid > .panel { overflow-y: auto; }
  .prediction-explorer-browser {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    overflow: hidden !important;
  }
  .prediction-explorer-list { max-height: none; overflow-y: auto; }
  .prediction-watch-filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body[data-public-page="prediction"] { --prediction-mobile-nav: 96px; }
}

/* Phase 4/5 closeout: compact decision/status surfaces and bounded management
   details.  They remain inside the DMA shell and never become a second data
   or execution authority. */
.prediction-status-strip {
  position: relative;
  min-width: 0;
  min-height: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 4px;
  overflow: visible;
  z-index: 4;
}
body[data-public-page="prediction"] .prediction-native-workbench { grid-template-rows: 42px minmax(0, 1fr); }
.prediction-desk-status {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding-top: 5px;
  border-top: 1px solid var(--line-soft);
}
.prediction-desk-status .prediction-blocker {
  min-width: 0;
  min-height: 30px;
  padding: 5px 7px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 6px;
  font-size: 8px;
}
.prediction-desk-status .prediction-blocker strong,
.prediction-desk-status .prediction-blocker span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prediction-desk-status .prediction-blocker .button { grid-column: 1 / -1; min-height: 24px; }
.prediction-status-item {
  min-width: 0;
  min-height: 30px;
  padding: 3px 7px;
  border: 1px solid rgba(119, 145, 170, .2);
  border-radius: 5px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  background: rgba(8, 16, 24, .78);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  font-size: 8px;
}
.prediction-status-item span,
.prediction-status-item b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-status-item b { color: var(--text); text-align: right; font-size: 9px; font-variant-numeric: tabular-nums; }
.prediction-status-item[data-state="live"] { border-color: rgba(66, 211, 146, .28); }
.prediction-status-item[data-state="live"] b { color: var(--green); }
.prediction-status-item[data-state="stale"] { border-color: rgba(247, 191, 89, .36); }
.prediction-status-item[data-state="stale"] b { color: var(--amber); }
.prediction-status-item[data-state="blocked"],
.prediction-status-item[data-state="offline"] { border-color: rgba(255, 105, 120, .28); }
.prediction-status-item[data-state="blocked"] b,
.prediction-status-item[data-state="offline"] b { color: var(--amber); }
.prediction-status-item[aria-pressed="true"] { outline: 1px solid rgba(199, 245, 100, .6); }
.prediction-status-detail {
  position: absolute;
  top: calc(100% + 3px);
  right: 0;
  left: 0;
  min-height: 25px;
  padding: 5px 8px;
  border: 1px solid rgba(199, 245, 100, .28);
  border-radius: 5px;
  background: #0b151e;
  color: var(--muted);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .24);
  font-size: 9px;
  line-height: 1.35;
}
.prediction-ticket-context { grid-template-columns: 1fr; gap: 3px; }
.prediction-ticket-context-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: center; }
.prediction-ticket-decision { min-width: 0; display: flex; align-items: center; gap: 5px; font-size: 8px; line-height: 1.25; }
.prediction-ticket-decision b { flex: 0 0 auto; color: var(--amber); }
.prediction-ticket-decision span { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.prediction-ticket-decision[data-state="ready"] b { color: var(--green); }
.prediction-ticket-decision[data-state="empty"] b { color: var(--muted); }
.prediction-mobile-pager { display: none; }

.prediction-management-insights {
  min-width: 0;
  margin: 8px 0;
  padding: 7px;
  border: 1px solid rgba(119, 145, 170, .18);
  border-radius: 7px;
  background: rgba(6, 13, 20, .6);
}
.prediction-management-insights-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text); font-size: 10px; }
.prediction-management-insights-head .button { min-height: 26px; height: 26px; padding-inline: 8px; font-size: 9px; }
.prediction-management-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 6px; }
.prediction-management-stats span { min-width: 0; padding: 4px 5px; border: 1px solid rgba(119, 145, 170, .14); border-radius: 4px; color: var(--muted); font-size: 8px; }
.prediction-management-stats small, .prediction-management-stats b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-management-stats b { margin-top: 2px; color: var(--text); font-size: 10px; font-variant-numeric: tabular-nums; }
.prediction-trade-log { max-height: 116px; margin-top: 5px; overflow: auto; }
.prediction-trade-log-row { display: grid; grid-template-columns: 90px minmax(80px, 1fr) minmax(110px, 1.2fr); gap: 5px; padding: 3px 0; border-top: 1px solid rgba(119, 145, 170, .1); color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.prediction-trade-log-row strong { min-width: 0; overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.prediction-trade-log-row span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-notification-settings { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 8px; }
.prediction-notification-settings label { display: inline-flex; align-items: center; gap: 4px; }
.prediction-notification-settings input { width: 14px; height: 14px; padding: 0; accent-color: var(--lime); }
.prediction-notification-settings small { flex: 1 1 100%; color: var(--muted-2); }

/* Prediction portfolio control v34: semantic tables, tiered freshness and a compact side rail. */
.prediction-lifecycle-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, .34fr);
  grid-template-rows: minmax(0, 1fr) auto;
}
.prediction-lifecycle-grid > .prediction-management {
  grid-column: 1;
  grid-row: 1 / 3;
  overflow: hidden;
}
.prediction-lifecycle-grid > .prediction-automation { grid-column: 2; grid-row: 1; overflow: auto; }
.prediction-lifecycle-grid > .prediction-recorder {
  grid-column: 2;
  grid-row: 2;
  height: auto;
  min-height: 108px;
  max-height: 150px;
  overflow: auto;
}
.prediction-management-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.prediction-management-heading h2 { margin: 3px 0 0; font-size: 18px; }
.prediction-management-heading p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.35; }
.prediction-management-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.prediction-management-heading-actions .button { display: inline-flex; align-items: center; gap: 5px; min-height: 31px; }
.prediction-management-heading-actions .button[data-loading="true"] > span:first-child { animation: prediction-spin .8s linear infinite; }
@keyframes prediction-spin { to { transform: rotate(360deg); } }
.prediction-management-health {
  min-width: 142px;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid rgba(119, 145, 170, .2);
  border-radius: 6px;
  background: rgba(6, 13, 20, .58);
}
.prediction-management-health i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px rgba(119, 145, 170, .09); }
.prediction-management-health span { min-width: 0; display: grid; gap: 1px; }
.prediction-management-health strong,
.prediction-management-health small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-management-health strong { color: var(--text); font-size: 9px; }
.prediction-management-health small { color: var(--muted); font-size: 7px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.prediction-management-health[data-state="live"] i { background: var(--green); box-shadow: 0 0 0 3px rgba(66, 211, 146, .12); }
.prediction-management-health[data-state="cached"] i,
.prediction-management-health[data-state="stale"] i { background: var(--amber); box-shadow: 0 0 0 3px rgba(247, 191, 89, .12); }
.prediction-management-health[data-state="error"] i { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 91, 113, .12); }
.prediction-management-health[data-state="loading"] i { animation: prediction-pulse 1s ease-in-out infinite; }
@keyframes prediction-pulse { 50% { opacity: .35; } }

.prediction-management > .prediction-management-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 9px 0;
}
.prediction-management > .prediction-management-stats > span {
  min-height: 63px;
  padding: 7px 8px;
  border-color: rgba(119, 145, 170, .18);
  background: linear-gradient(145deg, rgba(15, 26, 36, .88), rgba(8, 16, 24, .72));
}
.prediction-management > .prediction-management-stats small { color: var(--muted); font-size: 8px; }
.prediction-management > .prediction-management-stats b { margin-top: 4px; color: var(--text); font-size: 15px; line-height: 1.05; text-align: right; font-variant-numeric: tabular-nums; }
.prediction-management > .prediction-management-stats em { display: block; margin-top: 5px; overflow: hidden; color: var(--muted-2); font-size: 7px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.prediction-management > .prediction-management-stats span[data-state="active"] b,
.prediction-management > .prediction-management-stats span[data-state="live"] b,
.prediction-management > .prediction-management-stats span[data-state="success"] b { color: var(--green); }
.prediction-management > .prediction-management-stats span[data-state="stale"] b { color: var(--amber); }
.prediction-management > .prediction-management-stats span[data-state="error"] b { color: var(--red); }

.prediction-management-tabs { align-items: center; gap: 3px; padding-bottom: 7px; }
.prediction-management-tabs button {
  min-width: 0;
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 10px;
  border-color: transparent;
  background: transparent;
  font-size: 9px;
}
.prediction-management-tabs button[aria-selected="true"] { border-color: rgba(199, 245, 100, .44); background: rgba(199, 245, 100, .08); }
.prediction-management-tabs button b { min-width: 20px; padding: 1px 5px; border-radius: 9px; background: rgba(119, 145, 170, .14); color: var(--muted); font-size: 7px; font-variant-numeric: tabular-nums; }
.prediction-management-tabs button[aria-selected="true"] b { background: rgba(199, 245, 100, .15); color: var(--lime); }
.prediction-management-toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) 130px; gap: 6px; padding: 7px 0; }
.prediction-management-toolbar label { min-width: 0; }
.prediction-management-toolbar .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.prediction-management-toolbar input,
.prediction-management-toolbar select { width: 100%; min-width: 0; height: 30px; font-size: 9px; }
.prediction-management-search { position: relative; }
.prediction-management-search::before { content: "⌕"; position: absolute; left: 9px; top: 6px; z-index: 1; color: var(--muted); font-size: 13px; }
.prediction-management-search input { padding-left: 27px; }
.prediction-management-body { min-height: 0; border: 1px solid rgba(119, 145, 170, .16); border-radius: 7px; background: rgba(5, 11, 17, .52); overflow: auto; overscroll-behavior: contain; }
.prediction-management-table { min-width: 760px; color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.prediction-management-table-head,
.prediction-management-data-row { display: grid; align-items: center; gap: 8px; padding: 0 9px; }
.prediction-management-table-head { position: sticky; top: 0; z-index: 2; min-height: 29px; border-bottom: 1px solid rgba(119, 145, 170, .22); background: #0b151e; color: var(--muted-2); font-size: 7px; letter-spacing: .035em; text-transform: uppercase; }
.prediction-management-data-row { min-height: 51px; border-bottom: 1px solid rgba(119, 145, 170, .1); transition: background .14s ease; }
.prediction-management-data-row:hover { background: rgba(119, 145, 170, .055); }
.prediction-management-data-row:last-child { border-bottom: 0; }
.prediction-management-table[data-layout="orders"] { min-width: 880px; }
.prediction-management-table[data-layout="orders"] > * { grid-template-columns: minmax(150px, 1.6fr) 90px 64px 96px 72px 78px 166px 70px; }
.prediction-management-table [data-prediction-order-cancel-result] {
  display: block; max-width: 166px; padding: 3px 0; white-space: normal;
  overflow-wrap: anywhere; line-height: 1.5; font-size: 10px; color: var(--amber);
}
.prediction-management-table [data-prediction-order-cancel-result][data-status="REJECTED"] { color: #ff8294; }
.prediction-management-table[data-layout="positions"] { min-width: 840px; }
.prediction-management-table[data-layout="positions"] > * { grid-template-columns: minmax(155px, 1.6fr) 90px 88px 76px 76px 88px 94px 86px; }
.prediction-management-table[data-layout="settlements"] { min-width: 800px; }
.prediction-management-table[data-layout="settlements"] > * { grid-template-columns: minmax(190px, 1.7fr) 100px 90px 95px 110px 112px 90px; }
.prediction-management-table[data-layout="wallet"] { min-width: 720px; }
.prediction-management-table[data-layout="wallet"] > * { grid-template-columns: minmax(170px, 1.4fr) 72px 112px 112px 100px 88px; }
.prediction-management-table[data-layout="history"] { min-width: 880px; }
.prediction-management-table[data-layout="history"] > * { grid-template-columns: minmax(190px, 1.7fr) 105px 82px 92px 100px 112px 118px; }
.prediction-management-market { min-width: 0; display: grid; gap: 3px; }
.prediction-management-market strong,
.prediction-management-market small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-management-market strong { color: var(--text); font-size: 9px; }
.prediction-management-market small { color: var(--muted-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 7px; }
.prediction-management-number { min-width: 0; color: var(--text); text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
span.prediction-management-number { display: grid; gap: 2px; }
.prediction-management-number small { color: var(--muted-2); font-size: 7px; font-weight: 400; }
.prediction-management-side,
.prediction-management-status { display: inline-flex; width: fit-content; align-items: center; min-height: 20px; padding: 2px 6px; border: 1px solid rgba(119, 145, 170, .18); border-radius: 10px; color: var(--muted); background: rgba(119, 145, 170, .06); font-size: 7px; white-space: nowrap; }
.prediction-management-side[data-tone="buy"] { border-color: rgba(66, 211, 146, .25); color: var(--green); background: rgba(66, 211, 146, .07); }
.prediction-management-side[data-tone="sell"] { border-color: rgba(255, 91, 113, .25); color: var(--red); background: rgba(255, 91, 113, .07); }
.prediction-management-status[data-tone="success"] { border-color: rgba(66, 211, 146, .25); color: var(--green); }
.prediction-management-status[data-tone="active"] { border-color: rgba(91, 166, 255, .28); color: #7cb5ff; }
.prediction-management-status[data-tone="attention"] { border-color: rgba(247, 191, 89, .32); color: var(--amber); }
.prediction-management-status[data-tone="muted"] { color: var(--muted-2); }
.prediction-management-state-cell { min-width: 0; display: grid; justify-items: start; gap: 3px; }
.prediction-management-state-cell > strong { color: var(--text); }
.prediction-management-state-cell small { color: var(--muted-2); white-space: nowrap; }
.prediction-management-pnl { display: grid; justify-items: end; gap: 2px; }
.prediction-management-pnl strong { color: var(--muted); }
.prediction-management-pnl small { color: var(--muted-2); }
.prediction-management-pnl[data-tone="positive"] strong { color: var(--green); }
.prediction-management-pnl[data-tone="negative"] strong { color: var(--red); }
.prediction-management-action { display: flex; justify-content: flex-end; }
.prediction-management-action .button { min-width: 72px; height: 27px; padding-inline: 7px; font-size: 8px; }
.prediction-management-danger { border-color: rgba(255, 91, 113, .28) !important; color: #ff8294 !important; }
.prediction-management-danger:hover { background: rgba(255, 91, 113, .09) !important; }
.prediction-management-no-action { color: var(--muted-2); font-size: 7px; }
.prediction-management-available { color: var(--green); }
.prediction-management-body .prediction-table-empty { min-height: 190px; align-content: center; gap: 6px; }
.prediction-management-body .prediction-table-empty strong { color: var(--text); font-size: 10px; }
.prediction-management-body .prediction-table-empty span { color: var(--muted-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; }
.prediction-wallet-summary { padding: 8px 10px; border-top: 1px solid var(--line-soft); border-bottom: 0; font-size: 8px; }

.prediction-management-insights { flex: 0 0 auto; margin: 7px 0 0; padding: 0; background: rgba(6, 13, 20, .48); }
.prediction-management-insights > summary { min-height: 31px; display: flex; align-items: center; gap: 7px; padding: 5px 8px; color: var(--muted); cursor: pointer; list-style: none; font-size: 8px; }
.prediction-management-insights > summary::-webkit-details-marker { display: none; }
.prediction-management-insights > summary::before { content: "›"; color: var(--lime); font-size: 13px; transition: transform .14s ease; }
.prediction-management-insights[open] > summary::before { transform: rotate(90deg); }
.prediction-management-insights > summary b { min-width: 20px; padding: 1px 5px; border-radius: 9px; background: rgba(119, 145, 170, .14); color: var(--text); font-size: 7px; text-align: center; }
.prediction-management-insights-head { padding: 6px 8px 0; }
.prediction-trade-log { max-height: 96px; margin: 5px 8px 0; }
.prediction-notification-settings { margin: 6px 8px 8px; }
.prediction-recorder-state { margin-top: 8px; font-size: 8px; }
.prediction-recorder-state span:last-child { display: none; }

@media (max-width: 1180px) {
  .prediction-lifecycle-grid { grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr); }
  .prediction-management > .prediction-management-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .prediction-lifecycle-grid { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .prediction-lifecycle-grid > .prediction-management,
  .prediction-lifecycle-grid > .prediction-automation,
  .prediction-lifecycle-grid > .prediction-recorder { width: 100%; max-height: none; height: auto; min-height: 220px; }
  .prediction-management { min-height: 680px !important; }
  .prediction-management-heading { display: grid; }
  .prediction-management-heading-actions { justify-content: space-between; }
  .prediction-management > .prediction-management-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prediction-management-toolbar { grid-template-columns: minmax(0, 1fr) 112px; }
}

@media (max-width: 430px) {
  .prediction-lifecycle-grid { height: 100%; display: flex; flex-direction: row; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; }
  .prediction-lifecycle-grid > .prediction-management,
  .prediction-lifecycle-grid > .prediction-automation,
  .prediction-lifecycle-grid > .prediction-recorder { flex: 0 0 100%; width: 100%; min-width: 0; height: 100%; min-height: 0 !important; max-height: 100%; scroll-snap-align: start; }
  .prediction-management-heading p { display: none; }
  .prediction-management-health { min-width: 0; flex: 1 1 auto; }
  .prediction-management > .prediction-management-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prediction-management > .prediction-management-stats > span:last-child { grid-column: 1 / -1; min-height: 50px; }
  .prediction-management-tabs { overflow-x: auto; }
  .prediction-management-tabs button { flex: 0 0 auto; }
  .prediction-management-toolbar { grid-template-columns: minmax(0, 1fr) 105px; }
  .prediction-management-body { min-height: 0; }
}

.prediction-autotp-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.prediction-autotp-fields label { display: grid; gap: 3px; min-width: 0; color: var(--muted); font-size: 9px; }
.prediction-autotp-fields input, .prediction-autotp-fields select { width: 100%; min-width: 0; height: 29px; font-variant-numeric: tabular-nums; }
.prediction-autotp-fields > button { min-height: 29px; height: 29px; }
.prediction-autotp-copy { grid-column: 1 / -1; color: var(--muted); font-size: 8px; line-height: 1.35; }
.prediction-autotp-events { max-height: 150px; margin-top: 8px; overflow: auto; }
.prediction-autotp-events-head { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 4px; color: var(--muted); font-size: 8px; }
.prediction-autotp-events-head strong { color: var(--text); }
.prediction-autotp-event-row { display: grid; grid-template-columns: minmax(80px, .9fr) minmax(74px, .8fr) minmax(90px, 1.2fr); gap: 5px; padding: 4px 0; border-top: 1px solid rgba(119, 145, 170, .1); color: var(--muted); font-size: 8px; }
.prediction-autotp-event-row strong, .prediction-autotp-event-row span, .prediction-autotp-event-row small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-autotp-event-row strong { color: var(--text); }
.prediction-autotp-event-row span { color: var(--amber); }
.prediction-autotp-event-row small { color: var(--muted-2); }
.prediction-filter-catalog { display: block; margin-top: 1px; color: var(--muted-2); font-size: 7px; font-weight: 500; }
.prediction-filter-check { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; color: var(--muted); font-size: 9px; }
.prediction-filter-check input { width: 14px; height: 14px; padding: 0; accent-color: var(--lime); }
.prediction-event-identities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-bottom: 8px; }
.prediction-event-identities div { min-width: 0; padding: 5px 6px; border: 1px solid rgba(119, 145, 170, .16); border-radius: 5px; color: var(--muted); font-size: 8px; }
.prediction-event-identities span, .prediction-event-identities strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-event-identities strong { margin-top: 2px; color: var(--text); font-variant-numeric: tabular-nums; }
.prediction-generic-outcomes { display: grid; gap: 6px; }
.prediction-generic-outcome { min-width: 0; padding: 7px; border: 1px solid rgba(119, 145, 170, .18); border-radius: 6px; background: rgba(6, 13, 20, .5); }
.prediction-generic-outcome header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 7px; }
.prediction-generic-outcome header span { color: var(--muted); font-size: 8px; }
.prediction-generic-outcome header b { color: var(--lime); font-variant-numeric: tabular-nums; }
.prediction-generic-book { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 8px; margin-top: 5px; color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.prediction-generic-book small { grid-column: 1 / -1; color: var(--muted-2); }
.prediction-event-row-readonly { opacity: .68; }
.prediction-phase-notice { display: block; min-width: 0; color: var(--amber); font-size: 8px; line-height: 1.3; }

@media (max-width: 760px) {
  body[data-public-page="prediction"] .prediction-native-workbench { grid-template-rows: 38px minmax(0, 1fr); position: relative; }
  body[data-public-page="prediction"] .prediction-status-strip { min-height: 34px; overflow: visible; }
  .prediction-status-item { min-height: 30px; }
  .prediction-workbench-layout { padding-bottom: 22px; }
  .prediction-mobile-pager { position: absolute; right: 7px; bottom: 2px; left: 7px; z-index: 8; display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 20px; padding: 2px 5px; border: 1px solid rgba(119, 145, 170, .2); border-radius: 6px; background: rgba(5, 11, 17, .94); }
  .prediction-mobile-pager button { width: 20px; height: 16px; padding: 0; border: 1px solid rgba(119, 145, 170, .32); border-radius: 4px; background: transparent; color: var(--muted); font-size: 8px; cursor: pointer; }
  .prediction-mobile-pager button.is-active { border-color: var(--lime); color: var(--text); background: rgba(199, 245, 100, .12); }
  .prediction-mobile-pager span { min-width: 34px; color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; text-align: center; }
  .prediction-management-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prediction-autotp-fields { grid-template-columns: 1fr; }
  .prediction-autotp-copy { grid-column: auto; }
  .prediction-event-identities { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  body[data-public-page="prediction"] { --prediction-mobile-nav: 104px; }
  body[data-public-page="prediction"] .prediction-reference-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
  body[data-public-page="prediction"] .prediction-reference-stats span { display: block; min-height: 35px; padding: 4px 3px; font-size: 0; white-space: normal; }
  body[data-public-page="prediction"] .prediction-reference-stats span::before { content: attr(data-short-label); display: block; overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
  body[data-public-page="prediction"] .prediction-reference-stats b { display: block; margin: 3px 0 0; overflow: visible; color: var(--text); font-size: 9px; line-height: 1.05; text-overflow: clip; white-space: nowrap; }
  body[data-public-page="prediction"] .prediction-ticket-context-main { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  body[data-public-page="prediction"] .prediction-ticket-context-main span { text-align: left; }
  body[data-public-page="prediction"] .prediction-ticket-decision { align-items: flex-start; }
  body[data-public-page="prediction"] .prediction-ticket-decision span { white-space: normal; }
  body[data-public-page="prediction"] .prediction-management-insights { padding: 6px; }
  body[data-public-page="prediction"] .prediction-trade-log-row { grid-template-columns: 68px minmax(72px, 1fr) minmax(92px, 1fr); }
}

/* v38 mobile terminal: one authoritative mobile layout after the historical
   responsive layers above. The pager owns a real grid row instead of covering
   trading content, and every workspace uses the same swipe/page contract. */
@media (max-width: 760px) {
  body[data-public-page="prediction"] .public-main {
    width: 100%;
    height: calc(100dvh - var(--prediction-mobile-topbar) - var(--prediction-mobile-nav));
    min-height: 0;
    padding: 4px;
    overflow: hidden;
  }

  body[data-public-page="prediction"] .prediction-native-workbench {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 44px minmax(0, 1fr) 38px;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  body[data-public-page="prediction"] .prediction-commandbar {
    grid-row: 1;
    grid-column: 1;
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 4px;
    border-radius: 8px;
    overflow: hidden;
  }
  body[data-public-page="prediction"] .prediction-commandbar .prediction-workspace-tabs {
    min-height: 36px;
    gap: 4px;
    padding: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }
  body[data-public-page="prediction"] .prediction-commandbar .prediction-workspace-tabs button {
    flex: 0 0 auto;
    min-width: 96px;
    height: 34px;
    padding: 0 12px;
    scroll-snap-align: start;
    font-size: 10px;
  }

  body[data-public-page="prediction"] .prediction-workbench-layout,
  body[data-public-page="prediction"] .prediction-explorer-layout,
  body[data-public-page="prediction"] .prediction-watchlist-layout,
  body[data-public-page="prediction"] .prediction-lifecycle-grid {
    grid-row: 2;
    grid-column: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: row;
    gap: 5px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overflow-anchor: none;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  body[data-public-page="prediction"] .prediction-workbench-layout::-webkit-scrollbar,
  body[data-public-page="prediction"] .prediction-explorer-layout::-webkit-scrollbar,
  body[data-public-page="prediction"] .prediction-watchlist-layout::-webkit-scrollbar,
  body[data-public-page="prediction"] .prediction-lifecycle-grid::-webkit-scrollbar { display: none; }

  body[data-public-page="prediction"] .prediction-workbench-layout > .panel,
  body[data-public-page="prediction"] .prediction-explorer-layout > .panel,
  body[data-public-page="prediction"] .prediction-watchlist-layout > .panel,
  body[data-public-page="prediction"] .prediction-lifecycle-grid > .panel {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    padding: 9px;
    border-radius: 8px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  body[data-public-page="prediction"] .prediction-mobile-pager {
    position: static;
    grid-row: 3;
    grid-column: 1;
    width: 100%;
    min-height: 38px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: center;
    gap: 4px;
    padding: 3px 5px;
    border: 1px solid rgba(119, 145, 170, .24);
    border-radius: 8px;
    background: rgba(7, 14, 21, .98);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .18);
  }
  body[data-public-page="prediction"] .prediction-mobile-pager button {
    width: auto;
    min-width: 0;
    height: 30px;
    padding: 0 7px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: rgba(119, 145, 170, .06);
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[data-public-page="prediction"] .prediction-mobile-pager button.is-active {
    border-color: rgba(199, 245, 100, .52);
    color: var(--text);
    background: rgba(199, 245, 100, .1);
  }
  body[data-public-page="prediction"] .prediction-mobile-pager span {
    min-width: 37px;
    padding-left: 2px;
    color: var(--muted-2);
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    text-align: right;
  }

  /* Up/Down page 1: identity first, then stable metrics and both charts. */
  body[data-public-page="prediction"] .prediction-native-workbench[data-workspace-tab="updown"] .prediction-market-detail {
    order: 1;
    padding: 8px;
    overflow: hidden;
  }
  body[data-public-page="prediction"] .prediction-native-workbench[data-workspace-tab="updown"] .prediction-trade-column { order: 2; }
  body[data-public-page="prediction"] .prediction-native-workbench[data-workspace-tab="updown"] .prediction-updown-sidebar { order: 3; }
  body[data-public-page="prediction"] .prediction-market-detail [data-prediction-detail-content]:not([hidden]) {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 5px;
    overflow: hidden;
  }
  body[data-public-page="prediction"] .prediction-market-detail .prediction-detail-header {
    order: 1;
    min-height: 45px;
    gap: 7px;
    padding: 0 0 6px;
  }
  body[data-public-page="prediction"] .prediction-detail-titleline { align-self: center; }
  body[data-public-page="prediction"] .prediction-detail-titleline h2 {
    margin: 0;
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  body[data-public-page="prediction"] .prediction-detail-countdown {
    min-width: 72px;
    padding: 4px 6px;
  }
  body[data-public-page="prediction"] .prediction-detail-countdown strong { font-size: 17px; }
  body[data-public-page="prediction"] .prediction-reference-stats {
    order: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
  }
  body[data-public-page="prediction"] .prediction-reference-stats span {
    min-height: 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    font-size: 8px;
    white-space: nowrap;
  }
  body[data-public-page="prediction"] .prediction-reference-stats span::before { display: none; }
  body[data-public-page="prediction"] .prediction-reference-stats b {
    margin: 0;
    overflow: hidden;
    font-size: 9px;
    text-align: right;
    text-overflow: ellipsis;
  }
  body[data-public-page="prediction"] .prediction-market-detail > [data-prediction-detail-content] > .prediction-blocker {
    order: 3;
    min-height: 36px;
    margin: 0;
    padding: 6px 8px;
    font-size: 9px;
  }
  body[data-public-page="prediction"] .prediction-market-detail .prediction-chart-grid {
    order: 4;
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(190px, 1.25fr) minmax(155px, 1fr);
    gap: 5px;
  }
  body[data-public-page="prediction"] .prediction-chart-panel {
    min-height: 0;
    padding: 5px;
    gap: 3px;
    overflow: hidden;
  }
  body[data-public-page="prediction"] .prediction-reference-heading {
    min-width: 0;
    align-items: center;
    gap: 6px;
  }
  body[data-public-page="prediction"] .prediction-reference-heading strong {
    flex: 0 0 auto;
    font-size: 10px;
  }
  body[data-public-page="prediction"] .prediction-reference-tools { gap: 2px; }
  body[data-public-page="prediction"] [data-prediction-reference-meta] { display: none; }
  body[data-public-page="prediction"] .prediction-reference-intervals {
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow-x: auto;
  }
  body[data-public-page="prediction"] .prediction-reference-intervals button {
    min-width: 27px;
    min-height: 22px;
    padding: 2px 5px;
  }
  body[data-public-page="prediction"] .prediction-trajectory-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
  }
  body[data-public-page="prediction"] .prediction-trajectory-metrics span { padding: 3px 4px; }

  /* Up/Down page 2: trading controls before market depth on a narrow screen. */
  body[data-public-page="prediction"] .prediction-trade-column {
    padding: 9px;
    display: flex;
    flex-direction: column;
    align-content: start;
    gap: 7px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  body[data-public-page="prediction"] .prediction-trade-column > * {
    flex: 0 0 auto;
    width: 100%;
  }
  body[data-public-page="prediction"] .prediction-trade-column > .prediction-outcome-tabs { order: 1; }
  body[data-public-page="prediction"] .prediction-trade-column > .prediction-ticket-exposure { order: 2; }
  body[data-public-page="prediction"] .prediction-trade-column > .prediction-ticket-compact { order: 3; }
  body[data-public-page="prediction"] .prediction-trade-column > .prediction-notional-book { order: 4; min-height: 185px; }
  body[data-public-page="prediction"] .prediction-trade-column > .prediction-tas { order: 5; min-height: 150px; }
  body[data-public-page="prediction"] .prediction-trade-column > .prediction-outcome-tabs button {
    min-width: 0;
    min-height: 39px;
    align-items: center;
    padding: 0 10px;
    font-size: 10px;
  }
  body[data-public-page="prediction"] .prediction-trade-column > .prediction-outcome-tabs b {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
  }
  body[data-public-page="prediction"] .prediction-ticket-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding-top: 8px;
  }
  body[data-public-page="prediction"] .prediction-ticket-compact > .prediction-pane-heading {
    display: grid;
    gap: 5px;
  }
  body[data-public-page="prediction"] .prediction-ticket-badges {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  body[data-public-page="prediction"] .prediction-ticket-compact > .prediction-segmented,
  body[data-public-page="prediction"] .prediction-ticket-compact > [data-prediction-submit],
  body[data-public-page="prediction"] .prediction-ticket-compact > [data-prediction-submit-host] { grid-column: 1 / -1; }
  body[data-public-page="prediction"] .prediction-order-type-row { display: none !important; }
  body[data-public-page="prediction"] .prediction-ticket-compact label { min-width: 0; }
  body[data-public-page="prediction"] .prediction-ticket-compact input {
    width: 100%;
    min-width: 0;
    height: 38px;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
  }
  body[data-public-page="prediction"] .prediction-ticket-compact > [data-prediction-submit],
  body[data-public-page="prediction"] .prediction-ticket-compact > [data-prediction-submit-host] .button { min-height: 40px; }
  body[data-public-page="prediction"] .prediction-ticket-compact .prediction-quote-preview[data-state="empty"] {
    min-height: 44px;
    grid-template-columns: minmax(0, 1fr);
    padding: 7px 8px;
    font-size: 10px;
    line-height: 1.35;
  }
  body[data-public-page="prediction"] .prediction-ticket-compact .prediction-quote-preview[data-state="empty"] > * {
    grid-column: 1 / -1;
  }
  body[data-public-page="prediction"] .prediction-hotkey-hint { display: none; }
  body[data-public-page="prediction"] .prediction-ticket-boundary { font-size: 8px; line-height: 1.4; }

  /* Queue, watchlist and explorer keep their own vertical scroll surfaces. */
  body[data-public-page="prediction"] .prediction-updown-sidebar {
    padding: 9px;
    overflow: hidden;
  }
  body[data-public-page="prediction"] .prediction-watch-hotspots {
    display: flex;
    flex-direction: column;
    padding: 9px !important;
    overflow: hidden !important;
  }
  body[data-public-page="prediction"] .prediction-watch-hotspots .prediction-watch-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  body[data-public-page="prediction"] .prediction-watch-hotspots .prediction-watch-search-row { grid-column: 1 / -1; }
  body[data-public-page="prediction"] .prediction-watch-filters select,
  body[data-public-page="prediction"] .prediction-watch-filters input,
  body[data-public-page="prediction"] .prediction-watch-search-row .button { height: 36px; }
  body[data-public-page="prediction"] .prediction-hotspot-row { padding: 8px; margin-bottom: 6px; }
  body[data-public-page="prediction"] .prediction-hotspot-row > button:first-child strong {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.3;
  }
  body[data-public-page="prediction"] .prediction-watch-detail {
    padding: 9px !important;
    overflow: hidden !important;
  }
  body[data-public-page="prediction"] .prediction-watch-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-public-page="prediction"] .prediction-watch-method {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-public-page="prediction"] .prediction-watch-method > strong,
  body[data-public-page="prediction"] .prediction-watch-method > em { grid-column: 1 / -1; }
  body[data-public-page="prediction"] .prediction-watch-replay { min-height: 240px; }

  body[data-public-page="prediction"] .prediction-explorer-taxonomy,
  body[data-public-page="prediction"] .prediction-explorer-browser { padding: 9px; }
  body[data-public-page="prediction"] .prediction-explorer-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  body[data-public-page="prediction"] .prediction-explorer-filters .prediction-filter-check { min-height: 34px; }
  body[data-public-page="prediction"] .prediction-explorer-filters select { height: 34px; }
  body[data-public-page="prediction"] .prediction-explorer-card { padding: 9px 8px; }
  body[data-public-page="prediction"] .prediction-explorer-card strong {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.3;
  }

  /* Management page 1 remains scan-first; automation and recorder are pages 2/3. */
  body[data-public-page="prediction"] .prediction-lifecycle-grid > .prediction-management,
  body[data-public-page="prediction"] .prediction-lifecycle-grid > .prediction-automation,
  body[data-public-page="prediction"] .prediction-lifecycle-grid > .prediction-recorder {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto;
  }
  body[data-public-page="prediction"] .prediction-management { padding: 9px; overflow: hidden !important; }
  body[data-public-page="prediction"] .prediction-management-heading { display: grid; gap: 7px; padding-bottom: 7px; }
  body[data-public-page="prediction"] .prediction-management-heading p { display: none; }
  body[data-public-page="prediction"] .prediction-management-heading-actions { justify-content: space-between; }
  body[data-public-page="prediction"] .prediction-management-health { min-width: 0; flex: 1 1 auto; }
  body[data-public-page="prediction"] .prediction-management > .prediction-management-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin: 7px 0;
  }
  body[data-public-page="prediction"] .prediction-management > .prediction-management-stats > span {
    min-height: 52px;
    padding: 6px 7px;
  }
  body[data-public-page="prediction"] .prediction-management > .prediction-management-stats > span:last-child {
    grid-column: 1 / -1;
  }
  body[data-public-page="prediction"] .prediction-management-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }
  body[data-public-page="prediction"] .prediction-management-tabs::-webkit-scrollbar { display: none; }
  body[data-public-page="prediction"] .prediction-management-tabs button { flex: 0 0 auto; min-width: 68px; }
  body[data-public-page="prediction"] .prediction-management-toolbar {
    grid-template-columns: minmax(0, 1fr) 106px;
    gap: 5px;
  }
  body[data-public-page="prediction"] .prediction-management-body { min-height: 0; }
}

@media (max-width: 390px) {
  body[data-public-page="prediction"] .prediction-commandbar .prediction-workspace-tabs button {
    min-width: 91px;
    padding-inline: 9px;
  }
  body[data-public-page="prediction"] .prediction-mobile-pager button { padding-inline: 5px; font-size: 9px; }
  body[data-public-page="prediction"] .prediction-reference-stats span { padding-inline: 6px; }
  body[data-public-page="prediction"] .prediction-reference-stats b { font-size: 8px; }
  body[data-public-page="prediction"] .prediction-ticket-compact { grid-template-columns: minmax(0, 1fr); }
  body[data-public-page="prediction"] .prediction-ticket-compact > * { grid-column: 1 / -1; }
  body[data-public-page="prediction"] .prediction-watch-hotspots .prediction-watch-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Reference values stay readable in the narrow center pane and on phones. */
body[data-public-page="prediction"] .prediction-reference-stats span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}
body[data-public-page="prediction"] .prediction-reference-stats span::before { display: none; }
body[data-public-page="prediction"] .prediction-reference-stats b {
  display: block;
  width: 100%;
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow: visible;
  text-overflow: clip;
}
@media (max-width: 760px) {
  body[data-public-page="prediction"] .prediction-reference-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-public-page="prediction"] .prediction-reference-stats b { font-size: 16px; }
}
.prediction-market-detail { container-type: inline-size; }
@container (max-width: 620px) {
  .prediction-reference-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* AutoTP status distinguishes checking from confirmed protection. */
.prediction-autotp-summary { padding: 6px 0; color: var(--muted, #99aaba); font-variant-numeric: tabular-nums; min-height: 24px; }

/* Up/Down account desk: intrinsic controls, independently scrolling account lists. */
.prediction-account-brief { align-content: start; }
.prediction-account-grid { align-content: start; }
.prediction-account-grid span { font-size: 10px; }
.prediction-account-grid strong { font-size: 14px; text-align: right; }
.prediction-desk-orders { display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-height: 0; overflow: hidden; padding-top: 7px; border-top: 1px solid var(--line); gap: 5px; }
[data-prediction-desk-orders], [data-prediction-exposure] { min-height: 0; overflow: auto; scrollbar-gutter: stable; }
.prediction-desk-health { font-size: 10px; min-height: 14px; color: var(--muted); }
.prediction-desk-health[data-state="stale"], .prediction-desk-health[data-state="partial"] { color: #e8b967; }
.prediction-desk-row { display: grid; grid-template-columns: minmax(0, 1fr) 14ch; gap: 4px 8px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 11px; font-variant-numeric: tabular-nums; }
.prediction-desk-row strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.prediction-desk-row small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.prediction-desk-row > :nth-child(even) { text-align: right; white-space: nowrap; }
.prediction-desk-row[data-current="true"] { border-left: 2px solid var(--green); padding-left: 6px; }
.prediction-desk-row[data-unconfirmed="true"] { opacity: .65; }
@media (max-width: 760px) {
  body[data-public-page="prediction"] .prediction-updown-sidebar { overflow-y: auto !important; grid-template-rows: max-content max-content minmax(130px, 1fr) minmax(150px, 1.2fr) max-content; }
}

.prediction-account-grid > [data-state="stale"] strong, .prediction-account-grid > [data-state="partial"] strong, [data-prediction-account-meta][data-state="stale"] { color: #e8b967; }

/* Healthy account lists use the title row; only degraded state needs a label. */
.prediction-desk-orders, .prediction-exposure { grid-template-rows: auto minmax(0, 1fr); }
.prediction-desk-heading-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.prediction-desk-heading-right .prediction-desk-health { min-height: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prediction-desk-heading-right > span { min-width: 3ch; text-align: right; font-variant-numeric: tabular-nums; }

/* Stable trading UI: changing text never owns control geometry. */
body[data-public-page="prediction"] .prediction-commandbar { grid-template-columns: minmax(0, 1fr) 28px 200px; gap: 8px; }
body[data-public-page="prediction"] .prediction-commandbar .prediction-source { width: 200px; min-width: 0; max-width: none; text-align: right; overflow: hidden; }
body[data-public-page="prediction"] .prediction-source small { display: none; }
body[data-public-page="prediction"] .prediction-reference-heading { align-items: center; gap: 8px; flex-wrap: wrap; }
body[data-public-page="prediction"] .prediction-reference-heading strong { font-size: 14px; }
body[data-public-page="prediction"] .prediction-reference-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
body[data-public-page="prediction"] .prediction-history-controls { display: grid; grid-template-columns: minmax(0, 200px) 52px 28px; width: 292px; flex: 0 0 292px; gap: 6px; margin-left: auto; }
body[data-public-page="prediction"] .prediction-history-controls select { width: 100%; max-width: none; height: 30px; font-size: 12px; }
body[data-public-page="prediction"] .prediction-history-state { display: block; width: 52px; overflow: hidden; text-overflow: ellipsis; text-align: right; font-size: 12px; }
body[data-public-page="prediction"] .prediction-reference-intervals button { min-width: 30px; font-size: 12px; height: 28px; }
body[data-public-page="prediction"] .prediction-help { position: relative; display: inline-block; flex: 0 0 28px; width: 28px; height: 28px; margin: 0; padding: 0; border: 0; }
body[data-public-page="prediction"] .prediction-help > summary { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; list-style: none; }
body[data-public-page="prediction"] .prediction-help > summary::-webkit-details-marker { display: none; }
body[data-public-page="prediction"] .prediction-help > summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
body[data-public-page="prediction"] .prediction-help[open] > summary { color: var(--text); border-color: var(--lime); }
body[data-public-page="prediction"] .prediction-help-content { position: fixed; inset: auto; box-sizing: border-box; margin: 0; padding: 14px; width: min(360px, calc(100vw - 24px)); max-height: min(420px, calc(100vh - 40px)); overflow: auto; color: #c9d5e0; background: #102030; border: 1px solid #405366; border-radius: 10px; box-shadow: 0 10px 32px #0009; font-size: 13px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; z-index: 1000; text-align: left; }
body[data-public-page="prediction"] .prediction-help-content p { margin: 8px 0; font-size: inherit; line-height: inherit; }
body[data-public-page="prediction"] .prediction-help-content span { font-size: inherit; white-space: normal; }
body[data-public-page="prediction"] .prediction-help-content strong { font-size: 14px; color: var(--text); }
body[data-public-page="prediction"] .prediction-desk-status .prediction-blocker[data-state="ready"] { display: none; }
body[data-public-page="prediction"] .prediction-trajectory-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body[data-public-page="prediction"] .prediction-trajectory-metrics > span:first-child,
body[data-public-page="prediction"] .prediction-trajectory-metrics > span:last-child { display: none; }
body[data-public-page="prediction"] .prediction-trajectory-metrics small { font-size: 12px; }
body[data-public-page="prediction"] .prediction-trajectory-metrics b { font-size: 14px; text-align: right; }
body[data-public-page="prediction"] .prediction-native-workbench :is(input, select, label, .prediction-filter-row, .prediction-phase-tabs button, .prediction-period-tabs button, .prediction-desk-row, .prediction-account-grid span, .prediction-status-tile, .prediction-watch-card, .prediction-explorer-card, .prediction-management-row, .prediction-management-stats span, .prediction-automation, .prediction-recorder) { font-size: 13px; }
body[data-public-page="prediction"] .prediction-native-workbench :is(.prediction-desk-row small, .prediction-account-brief-heading, .prediction-exposure-heading, .prediction-desk-health, .prediction-management-health, .prediction-autotp-summary, .prediction-autotp-copy, .prediction-watch-card small, .prediction-explorer-card small, .prediction-management-row small, .prediction-watch-state, .prediction-subhead, .prediction-ticket-exposure, .prediction-hotkey-state, .prediction-ticket-badges .data-badge) { font-size: 12px; }
body[data-public-page="prediction"] .prediction-native-workbench :is(.prediction-account-grid strong, .prediction-management-stats strong) { font-size: 16px; }
body[data-public-page="prediction"] .prediction-native-workbench :is(.prediction-desk-heading-right, .prediction-detail-countdown, .prediction-management-tabs b, .prediction-data-badge) { font-variant-numeric: tabular-nums; }
body[data-public-page="prediction"] .prediction-desk-heading-right { width: 140px; flex: 0 0 140px; }
body[data-public-page="prediction"] .prediction-ticket-badges { flex-wrap: wrap; justify-content: flex-end; }
body[data-public-page="prediction"] .prediction-ticket-badges .prediction-hotkey-mode { display: none; }
body[data-public-page="prediction"] details.prediction-watch-method { display: block; font-size: 13px; }
body[data-public-page="prediction"] details.prediction-watch-method > summary { cursor: pointer; color: var(--muted); padding: 4px 0; }
body[data-public-page="prediction"] details.prediction-watch-method > strong { display: none; }
body[data-public-page="prediction"] details.prediction-watch-method > span { padding: 5px 0; }
body[data-public-page="prediction"] .prediction-watch-replay .prediction-reference-heading > span { display: none; }
@media (max-width: 1200px) {
 body[data-public-page="prediction"] .prediction-commandbar { grid-template-columns: minmax(0, 1fr) 28px; }
 body[data-public-page="prediction"] .prediction-commandbar .prediction-source { display: none; }
}
@media (max-width: 760px) {
 body[data-public-page="prediction"] .prediction-history-controls { width: 100%; flex-basis: 100%; grid-template-columns: minmax(0, 1fr) 52px 28px; }
 body[data-public-page="prediction"] .prediction-reference-tools { flex-wrap: wrap; }
}
body[data-public-page="prediction"] .prediction-market-detail [data-prediction-detail-content]:not([hidden]) { grid-template-rows: auto auto minmax(0, 1fr); }
body[data-public-page="prediction"] .prediction-market-detail [data-prediction-detail-content]:has(> .prediction-blocker:not([hidden])) { grid-template-rows: auto auto auto minmax(0, 1fr); }
body[data-public-page="prediction"] .prediction-chart-grid > .prediction-chart-panel:first-child { grid-template-rows: auto minmax(0, 1fr); }
body[data-public-page="prediction"] .prediction-history-controls > .site-select-trigger { width: 100%; min-width: 0; height: 30px; font-size: 12px; }
body[data-public-page="prediction"] .prediction-subhead strong { font-size: 13px; }
body[data-public-page="prediction"] .prediction-ticket-compact .prediction-quote-preview[data-state="empty"] { display: none; }
body[data-public-page="prediction"] .prediction-button-filter button,
body[data-public-page="prediction"] .prediction-select-filter .site-select-trigger { font-size: 13px; }

/* Other Prediction pages use the same readable type scale and disclosure rule. */
body[data-public-page="prediction"] .prediction-management-table { font-size: 13px; }
body[data-public-page="prediction"] .prediction-management-table-head { font-size: 12px; }
body[data-public-page="prediction"] .prediction-management-market strong { font-size: 13px; }
body[data-public-page="prediction"] :is(.prediction-management-market small, .prediction-management-number small, .prediction-management-status, .prediction-management-no-action, .prediction-management-action .button, .prediction-management-health strong, .prediction-management-health small, .prediction-management-insights > summary, .prediction-management-insights > summary b, .prediction-management-tabs button, .prediction-management-tabs button b, .prediction-autotp-events-head, .prediction-autotp-event-row, .prediction-recorder-state, .prediction-watch-summary span, .prediction-watch-summary small, .prediction-watch-detail-head p, .prediction-hotspot-row span, .prediction-hotspot-row small, .prediction-explorer-card > span, .prediction-explorer-category-tree button, .prediction-explorer-category-tree small, .prediction-watch-filters .site-select-trigger) { font-size: 12px; }
body[data-public-page="prediction"] .prediction-management > .prediction-management-stats small { font-size: 12px; }
body[data-public-page="prediction"] .prediction-management > .prediction-management-stats em { display: none; }
body[data-public-page="prediction"] .prediction-management > .prediction-management-stats > span:is([data-state="stale"], [data-state="error"]) em { display: block; font-size: 12px; white-space: normal; }
body[data-public-page="prediction"] .prediction-watch-score-card small { display: none; }
body[data-public-page="prediction"] .prediction-watch-state[data-state="available"] { display: none; }
body[data-public-page="prediction"] .prediction-explorer-browser > .prediction-pane-heading .data-badge { width: 150px; flex: 0 0 150px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-public-page="prediction"] .prediction-management-table-row { min-height: 66px; }

/* General market observations never borrow the Up/Down ticket. */
.prediction-observation-notice { display:none; }
.prediction-native-workbench[data-workspace-tab="watchlist"][data-watch-observation="true"] .prediction-trade-column > * { display:none; }
.prediction-native-workbench[data-workspace-tab="watchlist"][data-watch-observation="true"] .prediction-trade-column > .prediction-observation-notice { display:block; padding:18px; font-size:14px; line-height:1.6; }
.prediction-contract-observation { padding:10px 0; border-bottom:1px solid var(--line); }
.prediction-contract-observation h4 { font-size:14px; margin:0 0 8px; }
body[data-public-page="prediction"] .prediction-generic-outcome header span,
body[data-public-page="prediction"] .prediction-generic-book { font-size:12px; }
