:root {
  color-scheme: light;
  --content: none;
  --ink: #191220;
  --muted: #6f6578;
  --line: #e8e1ee;
  --paper: #f7f4fa;
  --panel: #ffffff;
  --volt: #502379;
  --volt-dark: #2d1247;
  --yellow: #fdc220;
  --blue: #82d0f4;
  --green: #1bbe6f;
  --red: #e63e12;
  --shadow: 0 10px 28px rgba(80, 35, 121, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(88, 44, 131, 0.08), transparent 360px),
    var(--paper);
  color: var(--ink);
  font-family:
    Ubuntu, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  align-items: center;
  background: var(--volt);
  border-bottom: 4px solid var(--yellow);
  color: #fff;
  display: block;
  min-height: 76px;
  padding: 0 clamp(14px, 2vw, 32px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: none;
  min-height: 76px;
  width: 100%;
}

.brand {
  align-items: center;
  color: #fff;
  display: inline-flex;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #eadff2;
  font-size: 12px;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a {
  color: #fff;
  font-weight: 700;
  padding: 8px 10px;
  text-decoration: none;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.account-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 7px;
  min-height: 40px;
  padding: 8px 11px;
}

.account-button svg {
  height: 18px;
  width: 18px;
}

.site-footer {
  background: var(--volt-dark);
  color: #eadff2;
  padding: 18px clamp(14px, 2vw, 32px);
}

.site-footer-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  width: 100%;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.site-footer a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.form-privacy {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.form-privacy a {
  color: var(--volt);
}

main {
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: none;
  min-width: 0;
  padding: 14px clamp(14px, 2vw, 32px) 48px;
  width: 100%;
}

.app-shell,
.leaderboard-band,
.rules-band,
.portfolio-band {
  margin: 0 auto;
  max-width: none;
  min-width: 0;
  width: 100%;
}

.hero-panel {
  background:
    linear-gradient(135deg, rgba(80, 35, 121, 0.98), rgba(45, 18, 71, 0.98) 72%, rgba(253, 194, 32, 0.82)),
    var(--volt);
  color: #fff;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 138px;
  overflow: hidden;
  padding: 18px 22px;
  position: relative;
}

.info-bar {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-height: 46px;
  padding: 10px 14px;
}

.info-bar strong {
  color: var(--volt);
}

.info-dot,
.info-safe {
  background: #f4eef8;
  color: var(--volt);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 7px;
}

.info-safe {
  background: #fff6d8;
}

.motion-toggle {
  align-items: center;
  background: var(--volt);
  border: 0;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
}

.motion-toggle svg {
  height: 14px;
  width: 14px;
}

.hero-panel::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  inset: 0;
  position: absolute;
}

.hero-copy,
.market-ticker {
  position: relative;
}

.eyebrow {
  color: var(--volt);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.hero-panel .eyebrow {
  color: var(--yellow);
}

h1,
h2 {
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0;
}

h1 {
  font-size: clamp(26px, 3vw, 36px);
  max-width: 760px;
}

h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.hero-copy p:not(.eyebrow) {
  color: #f4edf8;
  font-size: 14px;
  margin: 8px 0 0;
  max-width: 660px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.hero-actions span {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  padding: 6px 9px;
  font-size: 12px;
}

.hero-actions svg {
  height: 17px;
  width: 17px;
}

.market-ticker {
  align-self: stretch;
  background: rgba(19, 5, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  display: grid;
  gap: 7px;
  min-height: 0;
  padding: 12px;
}

.ticker-row,
.signal-meta {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.ticker-row span,
.signal-meta span {
  color: #e8dff0;
}

.ticker-row strong {
  font-size: 18px;
}

.ticker-bar {
  background: rgba(255, 255, 255, 0.15);
  height: 6px;
  overflow: hidden;
}

.ticker-bar span {
  background: linear-gradient(90deg, var(--green), var(--yellow), var(--blue));
  display: block;
  height: 100%;
}

.signal-meta {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  margin-top: 3px;
  padding-top: 8px;
}

.signal-meta strong {
  color: var(--yellow);
  font-size: 20px;
}

.workspace {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-top: 0;
  min-width: 0;
}

.event-list,
.prediction-panel,
.leaderboard-band,
.rules-band,
.portfolio-band {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.event-list {
  min-width: 0;
  order: 1;
  padding: 16px;
}

.section-heading,
.panel-head,
.leaderboard-head,
.rules-band {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.section-heading {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.section-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.create-question-button {
  align-items: center;
  background: var(--volt);
  border: 0;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
}

.create-question-button svg,
.view-tabs svg {
  height: 17px;
  width: 17px;
}

.view-tabs {
  background: #f4eef8;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
  padding: 4px;
}

.view-tabs button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 7px;
  justify-content: center;
  min-height: 38px;
  padding: 7px 14px;
}

.view-tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--volt);
  box-shadow: 0 2px 8px rgba(80, 35, 121, 0.12);
}

.icon-button {
  align-items: center;
  background: #f2eaf7;
  border: 1px solid var(--line);
  color: var(--volt);
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.icon-button svg,
.primary-button svg,
.side-button svg {
  height: 18px;
  width: 18px;
}

.event-card {
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
  position: relative;
  text-align: left;
  width: 100%;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.event-card.card-enter {
  animation: cardEnter 380ms cubic-bezier(0.22, 0.8, 0.32, 1) both;
  animation-delay: var(--card-delay, 0ms);
}

.event-card::before {
  background: var(--yellow);
  content: "";
  inset: 0 auto 0 0;
  pointer-events: none;
  position: absolute;
  transform: scaleY(0);
  transform-origin: center;
  width: 5px;
  z-index: 2;
}

.event-card.live-changed {
  animation: liveVoteFlash 1600ms ease both;
}

.event-card.watch-pulse::before {
  animation: watchEdge 800ms ease both;
}

.event-card:hover {
  border-color: rgba(80, 35, 121, 0.36);
  box-shadow: 0 14px 34px rgba(80, 35, 121, 0.14);
  transform: translateY(-2px);
}

.event-card[aria-pressed="true"] {
  border-color: rgba(80, 35, 121, 0.45);
  box-shadow: inset 4px 0 0 var(--volt);
}

.market-card-main {
  background: transparent;
  border: 0;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 0;
  text-align: left;
  width: 100%;
}

.watch-button {
  align-items: center;
  position: absolute;
  right: 12px;
  top: 12px;
  background: #f8f3fb;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.watch-button.active,
.active-icon {
  background: #fff8c7;
  border-color: var(--yellow);
  color: var(--volt);
}

.watch-button svg {
  height: 17px;
  width: 17px;
}

.watch-button.watch-animate svg {
  animation: starSpinBounce 720ms cubic-bezier(0.2, 0.85, 0.3, 1.25);
}

.event-card strong,
.event-card span {
  display: block;
}

.event-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.question-author {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-author {
  background: #f4eef8;
  color: var(--volt);
  margin: -4px 0 0;
  padding: 7px 9px;
  width: fit-content;
}

.market-card-top {
  align-items: center;
  display: flex;
  gap: 9px;
  padding-right: 38px;
}

.trend-badge {
  font-size: 11px;
  font-weight: 900;
  margin-left: auto;
  padding: 3px 6px;
}

.trend-badge.status-ended {
  background: #eee8f2;
  color: #554b5e;
}

.trend-badge.status-withdrawn {
  background: #fff0ec;
  color: #a53218;
}

.trend-badge.up {
  background: rgba(27, 190, 111, 0.14);
  color: #12834f;
}

.trend-badge.down {
  background: rgba(230, 62, 18, 0.12);
  color: #b3300e;
}

.trend-badge.flat {
  background: #f4eef8;
  color: var(--muted);
}

.market-avatar {
  align-items: center;
  background: var(--volt);
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.event-price {
  align-items: baseline;
  color: var(--volt);
  display: flex;
  gap: 6px;
}

.event-price b {
  font-size: 26px;
}

.event-price small {
  color: var(--muted);
  margin-left: auto;
}

.mini-depth {
  background: #eee6f4;
  height: 8px;
  overflow: hidden;
}

.mini-depth i {
  background: linear-gradient(90deg, var(--green), var(--yellow));
  display: block;
  height: 100%;
}

.outcome-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  position: relative;
}

.outcome-row span,
.outcome-row strong {
  position: relative;
  z-index: 1;
}

.outcome-row span {
  color: #30263a;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outcome-row strong {
  font-size: 17px;
}

.outcome-row i {
  background: rgba(80, 35, 121, 0.08);
  bottom: 0;
  left: 0;
  max-width: 100%;
  min-width: 2px;
  position: absolute;
  top: 0;
  transition: width 480ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.outcome-row i.yes {
  background: rgba(27, 190, 111, 0.16);
}

.outcome-row i.no {
  background: rgba(230, 62, 18, 0.14);
}

.animated-percent {
  animation: percentPop 340ms ease;
}

.card-actions {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
}

.quick-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  min-height: 38px;
  transition:
    transform 120ms ease,
    filter 120ms ease;
}

.quick-button:hover {
  filter: saturate(1.12);
  transform: translateY(-1px);
}

.quick-button:active {
  transform: translateY(1px) scale(0.99);
}

.quick-button.yes {
  background: rgba(27, 190, 111, 0.15);
  color: #12834f;
}

.quick-button.no {
  background: rgba(230, 62, 18, 0.14);
  color: #b3300e;
}

.card-footer {
  color: var(--muted);
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 10px;
  grid-column: 1 / -1;
  justify-content: space-between;
}

.prediction-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.prediction-panel > .muted {
  max-width: 760px;
}

.modal-backdrop {
  align-items: stretch;
  background: rgba(25, 18, 32, 0.46);
  display: flex;
  inset: 0;
  justify-content: flex-end;
  padding: 18px;
  position: fixed;
  z-index: 50;
  animation: fadeIn 160ms ease;
}

.market-modal {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(25, 18, 32, 0.32);
  max-width: 520px;
  overflow-y: auto;
  position: relative;
  width: min(100%, 520px);
  animation: drawerIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-close {
  align-items: center;
  background: #f4eef8;
  border: 1px solid var(--line);
  color: var(--volt);
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  z-index: 1;
}

.modal-close svg {
  height: 18px;
  width: 18px;
}

.auth-backdrop {
  align-items: center;
  justify-content: center;
}

.auth-modal {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(25, 18, 32, 0.32);
  max-height: calc(100vh - 32px);
  max-width: 460px;
  overflow-y: auto;
  padding: 34px 28px 28px;
  position: relative;
  width: 100%;
  animation: modalSpringIn 260ms cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.modal-backdrop.closing {
  animation: fadeOut 180ms ease forwards;
  pointer-events: none;
}

.market-modal.closing {
  animation: drawerOut 180ms ease forwards;
}

.auth-modal.closing {
  animation: modalOut 180ms ease forwards;
}

.auth-modal h2 {
  color: var(--volt-dark);
  font-size: 26px;
  letter-spacing: 0;
  margin: 3px 0 18px;
}

.auth-tabs {
  background: #f4eef8;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 18px;
  padding: 4px;
}

.auth-tabs button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  min-height: 42px;
}

.auth-tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--volt);
  box-shadow: 0 2px 8px rgba(80, 35, 121, 0.12);
}

.auth-form,
.auth-form label {
  display: grid;
  gap: 7px;
}

.question-modal {
  max-width: 620px;
}

textarea {
  background: #fff;
  border: 1px solid #cfc2dc;
  font: inherit;
  line-height: 1.5;
  min-height: 120px;
  padding: 10px 12px;
  resize: vertical;
  width: 100%;
}

textarea:focus {
  border-color: var(--volt);
  outline: 3px solid rgba(80, 35, 121, 0.16);
}

.auth-form {
  gap: 14px;
}

.auth-form label span {
  color: #4d4658;
  font-size: 13px;
  font-weight: 800;
}

.auth-help {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.secondary-button,
.text-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.secondary-button {
  align-items: center;
  background: #f4eef8;
  color: var(--volt);
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
  padding: 10px 14px;
}

.secondary-button svg {
  height: 18px;
  width: 18px;
}

.auth-logout {
  margin-top: 22px;
  width: 100%;
}

.profile-form {
  margin-top: 20px;
}

.profile-danger {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
}

.profile-danger strong {
  color: #8f2d17;
}

.profile-danger p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.profile-danger .danger-button {
  width: 100%;
}

.owner-actions {
  background: #fff8df;
  border-left: 4px solid var(--yellow);
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto auto;
  padding: 12px;
}

.owner-actions strong {
  align-self: center;
  color: var(--volt-dark);
}

.danger-button {
  align-items: center;
  background: #fff0ec;
  border: 0;
  color: #a53218;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
  padding: 10px 14px;
}

.danger-button svg {
  height: 18px;
  width: 18px;
}

.archive-notice {
  background: #f4eef8;
  color: var(--muted);
  font-weight: 700;
  margin: 0;
  padding: 14px;
}

.modal-panel {
  border: 0;
  box-shadow: none;
  min-height: 100%;
  padding-top: 54px;
}

.panel-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.status-pill {
  background: #e9fbf7;
  color: #067965;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.market-depth {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-card {
  background: #f8f3fb;
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding: 12px;
}

.price-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.price-card strong {
  font-size: 24px;
}

.price-card.yes {
  border-color: rgba(0, 179, 152, 0.45);
}

.price-card.no {
  border-color: rgba(230, 0, 126, 0.35);
}

.price-card.yes strong {
  color: #12834f;
}

.price-card.no strong {
  color: var(--red);
}

.prediction-form {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.vote-account {
  align-items: center;
  background: #f4eef8;
  color: var(--volt-dark);
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr auto;
  padding: 12px;
}

.vote-account svg {
  height: 20px;
  width: 20px;
}

.text-button {
  background: transparent;
  color: var(--volt);
  font-size: 13px;
  font-weight: 800;
  padding: 4px;
  text-decoration: underline;
}

.prediction-form label,
.side-picker {
  display: grid;
  gap: 7px;
}

.prediction-form label:last-of-type {
  grid-column: auto;
}

.prediction-form span,
.side-picker legend {
  color: #4d4658;
  font-size: 13px;
  font-weight: 800;
}

.side-picker {
  border: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
}

.side-picker legend {
  grid-column: 1 / -1;
  padding: 0;
}

.side-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
}

.side-button.yes[aria-pressed="true"] {
  background: #e7fbf7;
  border-color: var(--green);
  color: #12834f;
}

.side-button.no[aria-pressed="true"] {
  background: #fff0ec;
  border-color: var(--red);
  color: #b3300e;
}

input,
select {
  background: #fff;
  border: 1px solid #cfc2dc;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

input:focus,
select:focus,
button:focus-visible {
  border-color: var(--volt);
  outline: 3px solid rgba(80, 35, 121, 0.16);
}

.input-unit {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.input-unit input {
  border-right: 0;
}

.input-unit span {
  align-items: center;
  background: #f2eaf7;
  border: 1px solid #cfc2dc;
  color: var(--muted);
  display: inline-flex;
  min-height: 46px;
  padding: 0 12px;
}

.primary-button {
  align-items: center;
  background: var(--volt);
  border: 0;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  gap: 10px;
  grid-column: auto;
  justify-content: center;
  min-height: 50px;
  padding: 12px 18px;
}

.primary-button:hover {
  background: var(--volt-dark);
}

.notice {
  color: #16604f;
  min-height: 24px;
}

.leaderboard-band,
.rules-band,
.portfolio-band {
  padding: clamp(18px, 4vw, 32px);
}

.market-controls {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 130px;
  margin-bottom: 12px;
}

.category-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 4px;
  width: 100%;
}

.category-strip button,
.tabbar button {
  background: #f8f3fb;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  min-height: 36px;
  padding: 7px 10px;
  white-space: nowrap;
}

.category-strip button.active,
.tabbar button.active {
  background: var(--volt);
  border-color: var(--volt);
  color: #fff;
}

.category-select {
  display: none;
}

.market-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: none;
  overflow: visible;
}

.empty-state {
  border: 1px dashed #cfc2d9;
  color: var(--muted);
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 18px;
  text-align: center;
}

.chart-panel {
  background: #13051c;
  color: #fff;
  display: grid;
  gap: 8px;
  padding: 12px;
  max-width: 760px;
}

.chart-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.chart-head span {
  color: #d9cce5;
  font-weight: 800;
}

.sparkline {
  align-items: end;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(28, minmax(3px, 1fr));
  height: 58px;
}

.sparkline span {
  background: linear-gradient(180deg, var(--yellow), var(--green));
  min-height: 8px;
  transition: height 240ms ease;
}

.tabbar {
  display: flex;
  gap: 8px;
}

.prediction-panel .tabbar,
.prediction-panel .mood-panel,
.prediction-panel .activity-feed {
  max-width: 720px;
}

.trade-preview {
  align-items: center;
  background: #f8f3fb;
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}

.trade-preview span {
  color: var(--muted);
  font-weight: 800;
}

.trade-preview strong {
  color: var(--volt);
  font-size: 22px;
}

.mood-panel {
  display: grid;
  gap: 14px;
}

.mood-panel > div {
  background: #f8f3fb;
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 14px;
}

.mood-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mood-panel strong {
  color: var(--ink);
  font-size: 24px;
}

.book-bar {
  background: #eadff2;
  height: 12px;
  overflow: hidden;
}

.book-bar span {
  display: block;
  height: 100%;
}

.book-bar.yes span {
  background: var(--green);
}

.book-bar.no span {
  background: var(--red);
}

.activity-feed {
  display: grid;
  gap: 10px;
}

.activity-item {
  align-items: center;
  background: #f8f3fb;
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 12px;
}

.activity-item strong,
.activity-item small {
  display: block;
}

.activity-item small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-band {
  display: grid;
  gap: 18px;
}

.portfolio-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.point-burst {
  background: var(--volt);
  bottom: 22px;
  box-shadow: 0 14px 34px rgba(80, 35, 121, 0.3);
  color: #fff;
  font-weight: 900;
  left: 50%;
  padding: 11px 16px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 80;
  animation: burstIn 1.35s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes drawerIn {
  from {
    opacity: 0;
    transform: translateX(34px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes drawerOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(26px) scale(0.985);
  }
}

@keyframes modalSpringIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  72% {
    opacity: 1;
    transform: translateY(-2px) scale(1.006);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes liveVoteFlash {
  0% {
    background: #fff;
    border-color: var(--line);
    box-shadow: none;
  }
  24% {
    background: #fff8d9;
    border-color: var(--yellow);
    box-shadow: 0 0 0 4px rgba(253, 194, 32, 0.18);
  }
  100% {
    background: #fff;
    border-color: var(--line);
    box-shadow: none;
  }
}

@keyframes starSpinBounce {
  0% {
    transform: rotate(0) scale(1);
  }
  42% {
    transform: rotate(24deg) scale(1.38);
  }
  72% {
    transform: rotate(-8deg) scale(0.92);
  }
  100% {
    transform: rotate(0) scale(1);
  }
}

@keyframes watchEdge {
  0% {
    opacity: 0;
    transform: scaleY(0);
  }
  28%,
  64% {
    opacity: 1;
    transform: scaleY(1);
  }
  100% {
    opacity: 0;
    transform: scaleY(0);
  }
}

@keyframes percentPop {
  0% {
    transform: scale(0.92);
  }
  60% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes burstIn {
  0% {
    opacity: 0;
    transform: translate(-50%, 18px) scale(0.96);
  }
  18%,
  78% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -10px) scale(0.98);
  }
}

.portfolio-card span,
.portfolio-card small {
  color: var(--muted);
  font-weight: 800;
}

.portfolio-card strong {
  color: var(--volt);
  font-size: 30px;
  line-height: 1.05;
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 860px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.position-tag {
  display: inline-flex;
  font-weight: 900;
  padding: 4px 8px;
}

.position-tag.yes {
  background: #e7fbf7;
  color: #12834f;
}

.position-tag.no {
  background: #fff0ec;
  color: #b3300e;
}

.rules-band {
  align-items: flex-start;
}

.rules-heading {
  min-width: min(100%, 260px);
}

.rules-heading h2 {
  letter-spacing: 0;
  margin: 3px 0 0;
}

.rules-copy {
  color: #3f394a;
  display: grid;
  gap: 22px;
  max-width: 880px;
}

.rules-copy section,
.rules-copy h3,
.rules-copy p {
  margin: 0;
}

.rules-copy h3 {
  color: var(--volt-dark);
  font-size: 17px;
  letter-spacing: 0;
  margin-bottom: 5px;
}

.rules-copy p {
  line-height: 1.65;
}

@media (max-width: 1280px) {
  .market-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 1100px) {
  .market-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  .section-heading,
  .panel-head,
  .leaderboard-head,
  .rules-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-panel,
  .workspace,
  .prediction-form,
  .market-depth,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-wrap: wrap;
  }

  .market-ticker {
    min-height: 0;
  }

  .market-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
    line-height: 1.45;
  }

  .topbar {
    position: static;
    padding-inline: 12px;
  }

  .topbar-inner {
    gap: 14px;
    min-height: 64px;
  }

  .brand {
    gap: 11px;
  }

  .brand strong {
    font-size: 18px;
    line-height: 1;
  }

  .brand small {
    font-size: 12px;
    line-height: 1.25;
    margin-top: 3px;
  }

  .nav {
    gap: 4px;
  }

  .nav a {
    font-size: 14px;
    min-height: 40px;
    padding: 9px 7px;
  }

  .account-button {
    font-size: 0;
    justify-content: center;
    min-width: 40px;
    padding: 8px;
  }

  .account-button svg {
    height: 21px;
    width: 21px;
  }

  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-footer nav {
    gap: 18px;
  }

  main {
    gap: 12px;
    padding: 12px;
  }

  .info-bar {
    align-items: flex-start;
    flex-direction: column;
    font-size: 15px;
    gap: 8px;
    padding: 14px;
  }

  .info-bar strong {
    font-size: 18px;
  }

  .info-dot,
  .info-safe {
    font-size: 13px;
    padding: 5px 8px;
  }

  .market-controls,
  .market-list,
  .market-depth {
    grid-template-columns: 1fr;
  }

  .market-controls {
    gap: 8px;
    margin-bottom: 12px;
  }

  input,
  select {
    font-size: 16px;
    min-height: 52px;
    padding: 12px 14px;
  }

  .category-strip {
    display: none;
  }

  .category-select {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
  }

  .category-select span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
  }

  .category-select select {
    width: 100%;
  }

  .event-list {
    padding: 14px;
  }

  .section-heading {
    flex-direction: row;
    font-size: 14px;
    margin-bottom: 12px;
    width: 100%;
  }

  .section-actions {
    width: auto;
  }

  .create-question-button {
    min-height: 42px;
  }

  .view-tabs {
    display: grid;
    width: 100%;
  }

  .icon-button {
    height: 42px;
    width: 42px;
  }

  .market-list {
    gap: 14px;
  }

  .event-card {
    gap: 14px;
    padding: 16px;
  }

  .event-card[aria-pressed="true"] {
    box-shadow: inset 5px 0 0 var(--volt);
  }

  .market-card-main {
    gap: 12px;
  }

  .market-card-main > strong {
    font-size: 18px;
    line-height: 1.25;
  }

  .market-card-top {
    gap: 9px;
    padding-right: 46px;
  }

  .market-avatar {
    font-size: 17px;
    height: 34px;
    width: 34px;
  }

  .event-meta {
    font-size: 12px;
  }

  .trend-badge {
    font-size: 12px;
    padding: 4px 7px;
  }

  .watch-button {
    height: 42px;
    right: 12px;
    top: 12px;
    width: 42px;
  }

  .watch-button svg {
    height: 20px;
    width: 20px;
  }

  .outcome-row {
    gap: 10px;
    min-height: 34px;
    padding: 4px 0;
  }

  .outcome-row span {
    font-size: 15px;
  }

  .outcome-row strong {
    font-size: 18px;
  }

  .mini-depth {
    height: 10px;
  }

  .card-actions {
    gap: 8px;
  }

  .quick-button {
    font-size: 16px;
    min-height: 50px;
  }

  .card-footer {
    font-size: 13px;
    line-height: 1.35;
  }

  .modal-backdrop {
    padding: 0;
  }

  .auth-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .auth-modal {
    max-height: 92vh;
    max-width: none;
    padding: 34px 18px 22px;
    width: 100%;
  }

  .owner-actions {
    grid-template-columns: 1fr;
  }

  .vote-account {
    grid-template-columns: auto 1fr;
  }

  .vote-account .text-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .market-modal {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 520px) {
  main {
    padding: 10px 8px 32px;
  }

  .prediction-panel,
  .leaderboard-band,
  .rules-band {
    padding: 14px;
  }

  .section-heading {
    gap: 10px;
  }

  .event-card {
    gap: 14px;
    padding: 15px;
  }

  .market-card-top {
    gap: 8px;
  }

  .outcome-row strong {
    font-size: 18px;
  }

  .card-actions {
    gap: 6px;
  }
}

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