:root {
  --bg: #090d11;
  --bg-elevated: rgba(18, 24, 31, 0.82);
  --bg-soft: rgba(25, 33, 42, 0.72);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f5f7f9;
  --muted: #9da9b4;
  --gold: #e5c57a;
  --emerald: #2dd39b;
  --danger: #ff6b6b;
  --surface-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

html.modal-open,
body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: relative;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p,
strong,
span {
  overflow-wrap: anywhere;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(229, 197, 122, 0.12), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(45, 211, 155, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 0;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(120px);
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.ambient-a {
  width: 320px;
  height: 320px;
  top: -80px;
  left: -80px;
  background: rgba(229, 197, 122, 0.45);
}

.ambient-b {
  width: 280px;
  height: 280px;
  right: -80px;
  top: 120px;
  background: rgba(45, 211, 155, 0.28);
}

.app-shell,
.admin-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 110px;
}

.admin-shell {
  padding-bottom: 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 12px 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.brand-meta {
  display: grid;
  gap: 2px;
}

.brand-logo {
  width: min(132px, 36vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.28));
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  color: #0e1115;
  background: linear-gradient(135deg, #f6e0a8, #d7a94a);
  box-shadow: 0 12px 28px rgba(229, 197, 122, 0.32);
}

.topbar h1,
.section-head h3,
.hero-panel h2,
.auth-card h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 700;
}

.user-pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
}

.user-pill {
  margin-left: auto;
  min-width: min(132px, 36vw);
  max-width: min(184px, 44vw);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(229, 197, 122, 0.34), rgba(45, 211, 155, 0.22));
  color: #f8f5ec;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-avatar img,
.user-avatar span {
  width: 100%;
  height: 100%;
}

.user-avatar img {
  display: none;
  object-fit: cover;
}

.user-avatar span {
  display: grid;
  place-items: center;
}

.user-avatar.has-image img {
  display: block;
}

.user-avatar.has-image span {
  display: none;
}

.user-pill strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-pill span:last-child {
  display: none;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.dot-live {
  background: var(--emerald);
  box-shadow: 0 0 0 6px rgba(45, 211, 155, 0.12);
}

.content-shell,
.section-block {
  display: grid;
  gap: 18px;
}

.section-block {
  margin-bottom: 18px;
}

.view-section {
  display: none;
}

.view-section.is-active {
  display: block;
}

.panel,
.modal-sheet,
.auth-card {
  background: linear-gradient(180deg, rgba(22, 29, 36, 0.92), rgba(16, 21, 28, 0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  overflow: hidden;
  position: relative;
}

.view-section[data-view="home"] > .hero-panel {
  margin-bottom: 26px;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(229, 197, 122, 0.12), transparent 46%),
    linear-gradient(315deg, rgba(45, 211, 155, 0.1), transparent 44%);
  pointer-events: none;
}

.hero-copy,
.hero-stats {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.hero-panel h2 {
  max-width: 16ch;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.04;
}

.hero-text,
.muted-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions,
.modal-actions,
.admin-actions,
.chart-toolbar,
.section-head,
.compact-head,
.inline-control,
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inline-control {
  flex-wrap: wrap;
}

.chart-toolbar {
  margin-bottom: 14px;
}

.chart-toolbar-stack {
  align-items: flex-start;
}

.hero-actions {
  flex-wrap: wrap;
}

.hero-actions-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  justify-items: stretch;
  justify-content: stretch;
  align-items: stretch;
  gap: 10px;
  margin-inline: auto;
}

.hero-cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-width: 100%;
  max-width: none;
  margin-inline: auto;
  min-height: 72px;
  padding: 20px 26px;
  border-radius: 12px;
  text-align: center;
}

.hero-cta-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero-alt-button,
.home-cta-button {
  border-radius: 12px;
}

.hero-alt-button {
  width: 100%;
  min-width: 220px;
  justify-content: center;
}

.hero-action-divider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-width: 38px;
  padding: 2px 8px;
  border-radius: 999px;
  color: rgba(220, 224, 229, 0.62);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-cta-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(11, 15, 20, 0.14);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.hero-cta-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  justify-items: center;
  text-align: center;
}

.hero-cta-copy strong,
.hero-cta-copy span {
  display: block;
}

.hero-cta-copy strong {
  font-size: 15px;
  line-height: 1.15;
}

.hero-cta-copy span {
  color: rgba(11, 15, 20, 0.74);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.section-head > div,
.account-topline > div,
.quote-topline > div,
.brand-lockup > div {
  min-width: 0;
}

.hero-actions,
.modal-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 560px);
  margin: 0 auto;
  justify-content: center;
  align-items: stretch;
}

.stats-grid {
  flex-wrap: wrap;
}

.hero-stats .stat-card {
  text-align: center;
  padding: 11px 10px;
  border-radius: 18px;
}

.hero-stats .stat-label {
  margin-bottom: 5px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stats strong {
  display: block;
  font-size: 18px;
  line-height: 1.05;
}

.hero-stats .stat-sub {
  font-size: 10px;
  line-height: 1.2;
}

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.stat-card,
.quote-card,
.plan-card,
.announcement-card,
.account-card,
.account-summary-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 16px;
}

.stat-card-compact {
  gap: 4px;
  padding: 14px;
}

.stat-card-featured {
  background: linear-gradient(135deg, rgba(229, 197, 122, 0.18), rgba(255, 255, 255, 0.03));
  border-color: rgba(229, 197, 122, 0.2);
}

.stat-card-featured .stat-label,
.stat-card-featured .stat-sub {
  color: rgba(248, 235, 194, 0.82);
}

.stat-card .stat-label,
.micro-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.stat-card .stat-value,
.account-metric strong,
.quote-card strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.stat-card .stat-sub {
  color: var(--muted);
  font-size: 12px;
}

.quote-strip-home {
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-overview-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.account-overview-card {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.account-overview-label,
.account-overview-sub {
  color: var(--muted);
}

.account-overview-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.account-overview-card strong {
  font-size: 20px;
  line-height: 1.05;
}

.account-overview-sub {
  font-size: 11px;
}

.quote-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.quote-strip.compact {
  margin-bottom: 14px;
}

.quote-card {
  display: grid;
  gap: 6px;
}

.quote-card-home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
}

.quote-card-home-copy,
.quote-card-home-side {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quote-card-home-side {
  justify-items: end;
}

.quote-card-home .quote-symbol {
  font-size: 13px;
}

.quote-card-home .micro-copy {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-card-home strong {
  font-size: 18px;
  line-height: 1;
}

.home-cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
}

.home-cta-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-cta-copy h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  letter-spacing: -0.02em;
}

.home-cta-button {
  flex: 0 0 auto;
  min-width: 152px;
  padding-inline: 20px;
  font-weight: 800;
}

.quote-topline,
.account-topline,
.trade-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quote-symbol,
.account-number,
.trade-pill {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.quote-change,
.status-badge,
.plan-badge,
.label-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
}

.positive {
  color: var(--emerald);
}

.negative {
  color: var(--danger);
}

.quote-change.positive,
.status-badge.status-active,
.status-badge.status-approved,
.status-badge.status-registered {
  background: rgba(45, 211, 155, 0.12);
}

.quote-change.negative,
.status-badge.status-breached,
.status-badge.status-rejected {
  background: rgba(255, 107, 107, 0.12);
}

.status-badge.status-pending,
.status-badge.status-target-reached,
.plan-badge.gold {
  background: rgba(229, 197, 122, 0.14);
  color: var(--gold);
}

.plan-badge.slate {
  background: rgba(174, 186, 201, 0.14);
  color: #c4d0df;
}

.status-badge.status-active {
  color: var(--emerald);
}

.status-badge.status-approved,
.status-badge.status-registered {
  color: var(--emerald);
}

.status-badge.status-breached,
.status-badge.status-rejected {
  color: var(--danger);
}

.label-pill-soft {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.plan-grid,
.announcement-grid,
.account-grid,
.tournament-grid {
  display: grid;
  gap: 14px;
}

.account-grid {
  gap: 10px;
}

.tournament-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.plan-card,
.announcement-card,
.account-card,
.tournament-card {
  display: grid;
  gap: 14px;
}

.tournament-card {
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
}

.tournament-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(229, 197, 122, 0.08), transparent 48%);
}

.tournament-card > * {
  position: relative;
  z-index: 1;
}

.tournament-card-slate::after {
  background: linear-gradient(135deg, rgba(196, 208, 223, 0.08), transparent 48%);
}

.tournament-card-head,
.tournament-card-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.tournament-card-copy {
  display: grid;
  gap: 6px;
}

.tournament-card-copy h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  letter-spacing: -0.02em;
}

.verified-title {
  display: block;
  max-width: 100%;
}

.verified-title-text {
  display: inline;
  white-space: normal;
  overflow-wrap: anywhere;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4ea5ff, #2d6dff);
  box-shadow: 0 6px 16px rgba(45, 109, 255, 0.28);
  color: #ffffff;
  vertical-align: 0.08em;
  margin-left: 8px;
}

.verified-badge-large {
  width: 20px;
  height: 20px;
}

.verified-badge svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tournament-card-metrics {
  justify-content: flex-start;
}

.tournament-card-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11px;
}

.tournament-card-metrics strong {
  color: var(--text);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tournament-note {
  min-height: 36px;
}

.tournament-card-actions {
  display: grid;
  gap: 8px;
}

.tournament-compact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tournament-compact-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 11px;
}

.tournament-compact-pill strong {
  color: var(--text);
  font-size: 11px;
}

.tournament-objective-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

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

.tournament-section-title > div {
  min-width: 0;
}

.tournament-section-icon,
.tournament-objective-icon,
.leaderboard-prize-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(229, 197, 122, 0.18);
  background: rgba(229, 197, 122, 0.1);
  color: var(--sun);
}

.tournament-section-icon {
  width: 30px;
  height: 30px;
  border-radius: 11px;
}

.tournament-objective-icon,
.leaderboard-prize-icon {
  width: 24px;
  height: 24px;
  border-radius: 10px;
}

.tournament-section-icon svg,
.tournament-objective-icon svg,
.leaderboard-prize-icon svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tournament-objective-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tournament-objective-item {
  display: grid;
  gap: 2px;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  min-width: 0;
}

.tournament-objective-item strong {
  font-size: 14px;
  line-height: 1.1;
}

.tournament-objective-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tournament-objective-sub {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
}

.tournament-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tournament-info-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tournament-info-card strong {
  font-size: 14px;
  line-height: 1.2;
}

.tournament-leaderboard-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(8, 12, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tournament-leaderboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tournament-leaderboard-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tournament-leaderboard-head h4 {
  margin: 2px 0 0;
  font-size: 16px;
}

.tournament-leaderboard-list {
  display: grid;
  gap: 8px;
}

.tournament-leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tournament-leaderboard-row.is-compact {
  padding: 8px 10px;
}

.tournament-leaderboard-row.is-self {
  border-color: rgba(229, 197, 122, 0.35);
  background: rgba(229, 197, 122, 0.08);
}

.tournament-leaderboard-left,
.tournament-leaderboard-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tournament-leaderboard-right {
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.tournament-leaderboard-copy {
  display: grid;
  gap: 2px;
}

.tournament-leaderboard-copy strong {
  line-height: 1.1;
}

.tournament-rank-badge {
  min-width: 42px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.tournament-leaderboard-empty {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.tournament-leaderboard-separator {
  padding-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tournament-competition-shell {
  display: grid;
  gap: 12px;
}

.tournament-competition-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tournament-competition-topline h4 {
  margin: 2px 0 0;
  font-size: 20px;
}

.tournament-competition-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.leaderboard-inline-button {
  padding: 9px 12px;
  border-radius: 14px;
}

.leaderboard-page-shell {
  display: grid;
  gap: 14px;
}

.leaderboard-modal-sheet {
  max-width: 840px;
}

.leaderboard-modal-head {
  position: relative;
  padding-right: 50px;
}

.leaderboard-modal-head h3 {
  margin: 0;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.leaderboard-prize-panel h4,
.leaderboard-full-panel h4 {
  margin: 0;
  font-size: clamp(24px, 4.8vw, 31px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-family: "Sora", sans-serif;
  font-weight: 900;
}

.leaderboard-prize-panel .tournament-section-title,
.leaderboard-full-panel .tournament-section-title {
  align-items: center;
  gap: 10px;
  padding-top: 4px;
  min-height: 32px;
}

.leaderboard-prize-panel .tournament-section-icon,
.leaderboard-full-panel .tournament-section-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  flex: 0 0 24px;
}

.leaderboard-prize-panel .tournament-section-icon svg,
.leaderboard-full-panel .tournament-section-icon svg {
  width: 11px;
  height: 11px;
}

.leaderboard-banner-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 14px;
  align-items: stretch;
}

.leaderboard-banner-copy {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  padding-right: 6px;
}

.leaderboard-banner-copy .muted-copy {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.72);
}

.leaderboard-banner-copy h3 {
  margin: 2px 0 0;
}

.leaderboard-banner-copy .leaderboard-page-badges {
  gap: 8px;
  align-items: flex-start;
}

.leaderboard-banner-copy .tournament-compact-pill {
  min-height: 34px;
}

.leaderboard-banner-slot {
  display: grid;
  gap: 6px;
  align-content: end;
  min-height: 150px;
  padding: 16px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(229, 197, 122, 0.22), transparent 42%),
    linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(9, 14, 22, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.leaderboard-banner-slot-image {
  padding: 0;
  align-content: stretch;
  background: rgba(10, 14, 22, 0.96);
}

.leaderboard-banner-slot::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.leaderboard-banner-slot-image::after {
  inset: 10px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.08);
}

.leaderboard-banner-slot > * {
  position: relative;
  z-index: 1;
}

.leaderboard-banner-image {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  display: block;
}

.leaderboard-banner-slot strong {
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.leaderboard-banner-slot span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.leaderboard-banner-kicker {
  color: var(--sun);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leaderboard-page-hero,
.leaderboard-prize-panel,
.leaderboard-full-panel {
  display: grid;
  gap: 12px;
}

.leaderboard-prize-panel,
.leaderboard-full-panel {
  padding-top: 14px;
}

.leaderboard-prize-panel .tournament-section-title h4,
.leaderboard-full-panel .tournament-section-title h4 {
  padding-top: 2px;
}

.leaderboard-page-hero .tournament-objective-row {
  gap: 10px;
}

.leaderboard-page-hero .tournament-objective-item {
  padding: 12px;
  text-align: left;
  gap: 4px;
}

.leaderboard-page-hero .tournament-objective-top {
  justify-content: flex-start;
}

.leaderboard-page-hero .tournament-objective-sub {
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tournament-competition-shell .tournament-objective-item {
  min-width: 0;
}

.tournament-competition-shell .tournament-objective-sub {
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}

.leaderboard-page-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.leaderboard-page-topline h3 {
  margin: 2px 0 0;
}

.leaderboard-page-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.leaderboard-prize-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaderboard-prize-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.leaderboard-prize-card strong {
  font-size: 14px;
  line-height: 1.2;
}

.leaderboard-prize-place {
  color: var(--sun);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leaderboard-prize-card .micro-copy {
  line-height: 1.35;
}

.tournament-leaderboard-head .micro-copy,
.leaderboard-prize-panel .micro-copy,
.leaderboard-full-panel .micro-copy {
  max-width: 280px;
}

.account-card {
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
}

.purchase-plan-grid {
  display: grid;
  gap: 10px;
}

.plan-card h4,
.announcement-card h4,
.account-card h4,
.modal-head h3,
.compact-head h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  letter-spacing: -0.02em;
}

.plan-meta,
.account-meta,
.account-metrics,
.detail-grid {
  display: grid;
  gap: 12px;
}

.plan-meta,
.account-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-card .micro-label {
  margin-bottom: 5px;
  font-size: 11px;
}

.account-card .account-number {
  font-size: 12px;
  color: var(--muted);
}

.account-card h4 {
  font-size: 17px;
}

.progress-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #efddae);
}

.terminal-grid,
.admin-grid {
  display: grid;
  gap: 16px;
}

.terminal-grid {
  grid-template-areas:
    "markets"
    "chart"
    "order";
}

.market-panel {
  grid-area: markets;
}

.chart-panel {
  grid-area: chart;
}

.order-panel {
  grid-area: order;
}

.chart-panel,
.order-panel {
  padding: 16px;
}

.market-panel,
.chart-panel,
.order-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  background: linear-gradient(180deg, rgba(15, 20, 27, 0.98), rgba(10, 14, 20, 0.96));
}

.chart-container {
  width: 100%;
  min-height: 500px;
}

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.terminal-market-picker {
  display: grid;
  gap: 14px;
  margin-bottom: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(12, 14, 20, 0.98), rgba(8, 11, 16, 0.96));
}

.terminal-sheet-head {
  justify-content: space-between;
  align-items: center;
}

.terminal-sheet-close {
  display: none;
}

.terminal-search-field {
  display: grid;
  gap: 8px;
}

.terminal-search-field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.terminal-search-field input::placeholder {
  color: rgba(220, 224, 229, 0.42);
}

.terminal-search-field input:focus {
  outline: none;
  border-color: rgba(229, 197, 122, 0.3);
  box-shadow: 0 0 0 4px rgba(229, 197, 122, 0.08);
}

.asset-category-tabs,
.asset-section-list {
  display: grid;
  gap: 10px;
}

.asset-category-tabs {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.asset-category-tabs::-webkit-scrollbar {
  display: none;
}

.asset-category-block {
  display: grid;
  gap: 12px;
  padding: 14px 0 0;
  border-radius: 18px;
  background: transparent;
  border: 0;
}

.asset-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.asset-category-copy {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.asset-category-tab {
  appearance: none;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  cursor: pointer;
  transition: 160ms ease;
  font: inherit;
  font-weight: 700;
}

.asset-category-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(229, 197, 122, 0.22);
}

.asset-category-tab.is-active {
  border-color: rgba(229, 197, 122, 0.3);
  background: rgba(229, 197, 122, 0.12);
  color: var(--gold);
}

.asset-category-count {
  min-width: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  text-align: center;
  font-size: 11px;
}

.asset-category-title {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.asset-card-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.asset-select-card {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 12px 13px;
  text-align: left;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012));
  color: var(--text);
  cursor: pointer;
  transition: 160ms ease;
  position: relative;
  overflow: hidden;
}

.asset-select-card:hover {
  transform: translateY(-1px);
  border-color: rgba(229, 197, 122, 0.22);
}

.asset-select-card.is-active {
  border-color: rgba(229, 197, 122, 0.3);
  background: linear-gradient(180deg, rgba(229, 197, 122, 0.12), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(229, 197, 122, 0.08);
}

.asset-select-main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 86px auto;
  align-items: center;
  gap: 12px;
}

.asset-select-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.asset-select-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.asset-select-symbol-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.asset-select-symbol {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.asset-select-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.asset-select-chart {
  display: grid;
  gap: 5px;
  justify-items: center;
  min-width: 0;
}

.asset-select-side {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 0;
}

.asset-select-price {
  font-size: 18px;
  line-height: 1;
}

.asset-select-bottom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11px;
}

.asset-select-bottom .micro-copy {
  display: grid;
  gap: 2px;
  line-height: 1.25;
}

.asset-select-bottom strong {
  color: rgba(255, 255, 255, 0.52);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.asset-select-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.asset-glyph {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #061218;
}

.asset-glyph-btc {
  background: linear-gradient(135deg, #ffbe55, #ff8e1a);
}

.asset-glyph-xau {
  background: linear-gradient(135deg, #f8de8a, #c49d31);
}

.asset-glyph-xag {
  background: linear-gradient(135deg, #d5e0ef, #8da2bc);
}

.asset-glyph-eur {
  background: linear-gradient(135deg, #9db8ff, #5887ff);
}

.asset-glyph-eth {
  background: linear-gradient(135deg, #8fa4ff, #5f6bff);
}

.asset-glyph-gbp {
  background: linear-gradient(135deg, #8ad4ff, #3c96e6);
}

.asset-glyph-default {
  background: linear-gradient(135deg, #8f9db3, #576173);
}

.asset-select-sparkline {
  width: 86px;
  justify-self: center;
}

.asset-select-sparkline svg {
  width: 86px;
  height: 34px;
  display: block;
}

.asset-select-flow {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.sparkline-area {
  fill: rgba(255, 255, 255, 0.02);
  opacity: 0.3;
}

.sparkline-line {
  fill: none;
  stroke: var(--spark-color, #76de67);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.terminal-market-header,
.terminal-summary-head,
.terminal-quote-top {
  display: grid;
  gap: 10px;
}

.terminal-market-hero,
.terminal-market-pricebox,
.terminal-quote-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.terminal-market-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.terminal-market-trigger-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.terminal-market-symbol-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.terminal-market-switch-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(229, 197, 122, 0.12);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.terminal-market-symbol {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.terminal-market-pricebox {
  align-items: flex-end;
  text-align: right;
}

.terminal-market-price {
  display: block;
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
}

.terminal-market-strip,
.terminal-market-meta-row,
.terminal-market-compact-strip,
.terminal-account-strip,
.terminal-quote-strip,
.terminal-order-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.terminal-market-strip span,
.terminal-market-meta-row span,
.terminal-market-compact-strip span,
.terminal-account-chip,
.terminal-quote-strip span,
.terminal-order-summary span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.terminal-market-strip strong,
.terminal-market-meta-row strong,
.terminal-market-compact-strip strong,
.terminal-account-chip strong,
.terminal-quote-strip strong,
.terminal-order-summary strong {
  color: var(--text);
  font-size: 12px;
}

.terminal-market-meta-row {
  margin-top: -4px;
}

.terminal-market-compact-strip {
  gap: 6px;
  margin-top: -2px;
}

.terminal-market-compact-strip span {
  gap: 5px;
  padding: 5px 8px;
  border-radius: 12px;
  font-size: 10px;
  line-height: 1;
}

.terminal-market-compact-strip strong {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.62);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.terminal-account-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.terminal-account-inline-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.terminal-account-inline-copy strong {
  display: block;
  font-size: 15px;
  line-height: 1.05;
}

.terminal-account-strip-compact {
  justify-content: center;
  flex-wrap: nowrap;
  gap: 5px;
}

.terminal-account-strip-compact .terminal-account-chip {
  padding: 5px 8px;
  font-size: 10px;
  gap: 5px;
}

.terminal-account-strip-compact .terminal-account-chip strong {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.62);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#terminalAccountSummary {
  padding: 10px 12px;
}

.terminal-form {
  gap: 12px;
}

.terminal-ticket-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.terminal-order-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-ticket-shell,
.terminal-order-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.terminal-order-inline {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.terminal-field-volume {
  grid-column: 1 / -1;
}

.terminal-field-grid,
.terminal-mini-grid,
.terminal-quote-grid {
  display: grid;
  gap: 10px;
}

.terminal-field-grid,
.terminal-quote-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.terminal-mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.terminal-mini-card {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.terminal-mini-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.compact-side-toggle {
  gap: 8px;
}

.compact-side-toggle .toggle-button {
  padding: 12px 10px;
  font-size: 14px;
  font-weight: 800;
}

.terminal-price-card {
  gap: 8px;
  padding: 10px 12px;
}

.terminal-quote-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.terminal-quote-kicker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-quote-price {
  font-size: 20px;
  line-height: 1;
}

.terminal-quote-session {
  font-size: 11px;
  font-weight: 700;
}

.terminal-quote-strip-compact {
  gap: 6px;
}

.terminal-quote-strip-compact span {
  padding: 5px 8px;
  border-radius: 12px;
  font-size: 10px;
}

.terminal-quote-strip-compact strong {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.05em;
}

.terminal-chart-toolbar {
  margin-top: -2px;
}

.button-buy {
  background: rgba(45, 211, 155, 0.16);
  color: var(--emerald);
  border-color: rgba(45, 211, 155, 0.24);
}

.button-sell {
  background: rgba(255, 107, 107, 0.16);
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.24);
}

.segment,
.toggle-button,
.nav-button,
.icon-button {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  transition: 160ms ease;
  font: inherit;
}

.segment:hover,
.toggle-button:hover,
.nav-button:hover,
.icon-button:hover,
.button:hover {
  transform: translateY(-1px);
  border-color: rgba(229, 197, 122, 0.28);
}

.segment.is-active,
.toggle-button.is-active,
.nav-button.is-active {
  background: rgba(229, 197, 122, 0.16);
  color: var(--gold);
  border-color: rgba(229, 197, 122, 0.3);
}

.nav-button {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 8px 6px;
  border-radius: 18px;
  min-width: 0;
}

.nav-icon {
  font-size: 18px;
  line-height: 1;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.side-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.side-toggle .toggle-button {
  padding: 14px 12px;
  font-size: 15px;
  font-weight: 800;
}

.toggle-button.is-active[data-side="BUY"] {
  background: rgba(45, 211, 155, 0.16);
  color: var(--emerald);
  border-color: rgba(45, 211, 155, 0.24);
}

.toggle-button.is-active[data-side="SELL"] {
  background: rgba(255, 107, 107, 0.16);
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.24);
}

.form-stack,
.form-grid,
.detail-grid {
  display: grid;
  gap: 12px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.purchase-grid-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field select,
.select-input,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 14px;
  font: inherit;
}

.select-input {
  min-width: 0;
}

.field input:focus,
.field select:focus,
.select-input:focus {
  outline: none;
  border-color: rgba(229, 197, 122, 0.3);
  box-shadow: 0 0 0 4px rgba(229, 197, 122, 0.08);
}

.button {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: 160ms ease;
}

.button-primary {
  background: linear-gradient(135deg, #f0d89b, #d8aa4a);
  color: #0b0f14;
  border-color: transparent;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.button-block {
  width: 100%;
  justify-content: center;
}

.terminal-form .button-block {
  padding-top: 14px;
  padding-bottom: 14px;
  font-size: 14px;
}

.terminal-risk-preview {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.terminal-risk-chip,
.terminal-risk-hint {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.terminal-risk-chip strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.terminal-risk-chip.positive {
  border-color: rgba(45, 211, 155, 0.18);
  background: rgba(45, 211, 155, 0.06);
}

.terminal-risk-chip.negative {
  border-color: rgba(255, 107, 107, 0.18);
  background: rgba(255, 107, 107, 0.06);
}

.button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none !important;
}

.button-primary.button-buy {
  background: linear-gradient(135deg, rgba(45, 211, 155, 0.95), rgba(18, 167, 118, 0.92));
  color: #04120d;
}

.button-primary.button-sell {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.96), rgba(216, 77, 77, 0.92));
  color: #180606;
}

.table-wrap {
  overflow-x: auto;
}

.terminal-history-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.terminal-history-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.terminal-history-tabs::-webkit-scrollbar {
  display: none;
}

.terminal-history-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 140px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.terminal-history-tab strong {
  color: var(--text);
  font-size: 14px;
}

.terminal-history-tab.is-active {
  border-color: rgba(229, 197, 122, 0.3);
  background: rgba(229, 197, 122, 0.12);
  color: var(--gold);
}

.terminal-trade-groups {
  display: grid;
  gap: 12px;
}

.trade-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.trade-group-live {
  border-color: rgba(45, 211, 155, 0.14);
  background: linear-gradient(180deg, rgba(45, 211, 155, 0.05), rgba(255, 255, 255, 0.02));
}

.trade-group-recent {
  border-color: rgba(229, 197, 122, 0.14);
  background: linear-gradient(180deg, rgba(229, 197, 122, 0.05), rgba(255, 255, 255, 0.02));
}

.trade-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trade-group-head h4 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.trade-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.history-table-wrap {
  max-height: 290px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.trade-history-table {
  min-width: 620px;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  font-size: 13px;
}

.data-table th {
  color: var(--muted);
  font-weight: 700;
}

.trade-history-table th,
.trade-history-table td {
  padding: 10px 10px;
  font-size: 12px;
}

.table-stack {
  display: grid;
  gap: 4px;
}

.mobile-only {
  display: none;
}

.trade-card-list {
  display: grid;
  gap: 8px;
}

.trade-mobile-card {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.trade-mobile-card-compact {
  gap: 10px;
}

.trade-mobile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trade-mobile-topline,
.trade-mobile-title-row,
.trade-mobile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.trade-mobile-footer {
  flex-wrap: wrap;
}

.trade-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trade-action-row .button {
  padding: 10px 12px;
}

.trade-mobile-left,
.trade-mobile-right {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.trade-mobile-right {
  justify-items: end;
  text-align: right;
}

.trade-mobile-title {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.trade-side-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.trade-side-pill.buy {
  background: rgba(45, 211, 155, 0.12);
  color: var(--emerald);
}

.trade-side-pill.sell {
  background: rgba(255, 107, 107, 0.12);
  color: var(--danger);
}

.trade-mobile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 11px;
}

.trade-mobile-meta span {
  position: relative;
}

.trade-mobile-meta span:not(:last-child)::after {
  content: "•";
  margin-left: 10px;
  color: rgba(255, 255, 255, 0.2);
}

.trade-mobile-pnl {
  display: block;
  font-size: 15px;
  line-height: 1;
}

.trade-mobile-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.trade-mobile-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.trade-mobile-strip strong {
  color: var(--text);
  font-size: 11px;
}

.trade-close-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.trade-mobile-card .button {
  width: auto;
  padding: 7px 12px;
  font-size: 11px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(500px, calc(100% - 28px));
  padding: 8px;
  border-radius: 26px;
  background: rgba(12, 17, 23, 0.92);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  z-index: 4;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 8, 11, 0.68);
  backdrop-filter: blur(14px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.hidden {
  display: none !important;
}

.modal-sheet {
  width: min(780px, 100%);
  padding: 22px;
  max-height: min(calc(100vh - 40px), 920px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-sheet-wide {
  width: min(920px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.purchase-modal-head,
.modal-head-with-corner-close {
  position: relative;
  padding-right: 50px;
}

.modal-close-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  right: 0;
  font-size: 22px;
  line-height: 1;
}

.modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

.stepper {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.stepper-summary-card {
  display: grid;
  gap: 10px;
}

.stepper-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.stepper-summary strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.stepper-counter {
  flex: 0 0 auto;
  min-width: 62px;
  padding: 10px 12px;
  border-radius: 18px;
  text-align: center;
  color: var(--gold);
  background: rgba(229, 197, 122, 0.1);
  border: 1px solid rgba(229, 197, 122, 0.18);
}

.stepper-counter strong {
  font-size: 24px;
  line-height: 1;
}

.stepper-counter span {
  font-size: 12px;
  font-weight: 700;
}

.stepper-kicker {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.stepper-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.stepper-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f0d79f, #d8a653);
}

.stepper-track {
  display: grid;
  grid-template-columns: repeat(var(--step-count, 4), minmax(0, 1fr));
  gap: 10px;
  position: relative;
}

.stepper-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 19px;
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
  z-index: 0;
}

.step-pill {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.step-pill-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(12, 17, 23, 0.96);
  font-size: 13px;
  font-weight: 800;
}

.step-pill-copy {
  display: grid;
  gap: 2px;
}

.step-pill-label {
  font-size: 12px;
  font-weight: 700;
}

.step-pill.is-active {
  color: var(--gold);
}

.step-pill.is-active .step-pill-number {
  border-color: rgba(229, 197, 122, 0.3);
  background: rgba(229, 197, 122, 0.14);
  box-shadow: 0 0 0 6px rgba(229, 197, 122, 0.08);
}

.step-pill.is-complete {
  color: var(--text);
}

.step-pill.is-complete .step-pill-number {
  border-color: rgba(45, 211, 155, 0.24);
  background: rgba(45, 211, 155, 0.14);
  color: var(--emerald);
}

.micro-copy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.purchase-rules-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.purchase-program-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.purchase-program-card {
  appearance: none;
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px 15px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.purchase-program-card strong {
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.purchase-program-card span,
.purchase-program-card small {
  line-height: 1.35;
}

.purchase-program-card small {
  color: var(--muted);
  font-size: 12px;
}

.purchase-program-card.is-active {
  color: var(--gold);
  border-color: rgba(229, 197, 122, 0.5);
  background:
    linear-gradient(180deg, rgba(61, 39, 19, 0.96), rgba(31, 22, 16, 0.96)),
    radial-gradient(circle at top, rgba(229, 197, 122, 0.22), transparent 46%);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.purchase-program-card.is-active strong,
.purchase-program-card.is-active small {
  color: inherit;
}

.purchase-program-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.purchase-rules-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.purchase-rules-head h4 {
  margin: 0;
  font-family: "Sora", sans-serif;
  letter-spacing: -0.03em;
}

.purchase-rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.purchase-rules-grid span {
  padding: 10px 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.purchase-rules-grid strong {
  color: var(--text);
}

.purchase-rules-card-table {
  gap: 14px;
}

.purchase-rules-table {
  display: grid;
  gap: 10px;
}

.purchase-rules-table-head,
.purchase-rules-table-row {
  display: grid;
  grid-template-columns: minmax(82px, 1.15fr) repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.purchase-rules-table-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.purchase-rules-table-row {
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.purchase-rules-stage {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.purchase-rules-table-row strong {
  color: var(--text);
  font-size: 13px;
  text-align: center;
}

.checkout-review {
  display: grid;
  gap: 16px;
}

.purchase-chip-row,
.review-compact-grid {
  display: grid;
  gap: 10px;
}

.purchase-chip-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

.purchase-chip {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.purchase-chip strong {
  color: var(--text);
  font-size: 12px;
}

.purchase-plan-card {
  display: grid;
  gap: 10px;
  padding: 15px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(27, 31, 39, 0.96), rgba(17, 21, 27, 0.96)),
    radial-gradient(circle at top, rgba(229, 197, 122, 0.12), transparent 42%);
  position: relative;
  overflow: hidden;
}

.purchase-plan-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 34%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.022) 0,
      rgba(255, 255, 255, 0.022) 1px,
      transparent 1px,
      transparent 18px
    );
  pointer-events: none;
}

.purchase-plan-card > * {
  position: relative;
  z-index: 1;
}

.purchase-plan-card.is-selected {
  border-color: rgba(229, 197, 122, 0.48);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(229, 197, 122, 0.14) inset;
  background:
    linear-gradient(180deg, rgba(61, 39, 19, 0.96), rgba(31, 22, 16, 0.96)),
    radial-gradient(circle at top, rgba(229, 197, 122, 0.22), transparent 46%);
}

.purchase-plan-head,
.purchase-plan-footer,
.purchase-selection-head,
.purchase-selection-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.purchase-plan-copy {
  display: grid;
  gap: 4px;
}

.purchase-plan-copy h4,
.purchase-selection-card h4 {
  margin: 0;
  font-family: "Sora", sans-serif;
  letter-spacing: -0.03em;
}

.purchase-plan-size {
  font-family: "Sora", sans-serif;
  font-size: clamp(26px, 6vw, 36px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.purchase-plan-stars {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
}

.purchase-plan-rate {
  justify-self: start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(229, 197, 122, 0.16);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.purchase-plan-metrics,
.purchase-selection-meta {
  display: grid;
  gap: 10px;
}

.purchase-plan-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.purchase-plan-metrics span,
.purchase-selection-meta span {
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 11px;
}

.purchase-plan-metrics strong {
  color: var(--text);
}

.purchase-plan-mini {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
}

.purchase-plan-mini strong {
  color: var(--text);
  font-size: 12px;
}

.purchase-selection-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.purchase-selection-head strong {
  font-size: 18px;
  color: var(--gold);
}

.purchase-selection-line {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.purchase-selection-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 4px;
}

.review-compact-card {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.review-compact-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 20;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 250px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(12, 18, 24, 0.94);
  color: var(--text);
  box-shadow: var(--surface-shadow);
}

.toast.error {
  border-color: rgba(255, 107, 107, 0.28);
}

.auth-card {
  width: min(440px, calc(100% - 24px));
  padding: 26px;
  margin: 8vh auto 0;
}

.admin-topbar {
  padding-bottom: 8px;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.empty-state {
  display: grid;
  gap: 12px;
  place-items: start;
  padding: 24px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

@media (min-width: 880px) {
  .hero-panel {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: end;
  }

  .plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .purchase-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .announcement-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terminal-grid {
    grid-template-columns: minmax(176px, 205px) minmax(0, 1fr) minmax(248px, 272px);
    grid-template-areas: "markets chart order";
  }

  .terminal-trade-groups {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .market-panel,
  .order-panel {
    position: sticky;
    top: 14px;
  }
}

@media (max-width: 879px) {
  .terminal-grid {
    grid-template-areas:
      "chart"
      "order";
  }

  .topbar,
  .section-head,
  .chart-toolbar,
  .modal-head,
  .admin-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
  }

  .home-cta-panel {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .home-cta-button {
    width: 100%;
    min-width: 100%;
    border-radius: 12px;
  }

  .hero-stats {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .hero-stats .stat-card {
    padding: 10px 8px;
    border-radius: 16px;
  }

  .hero-stats strong {
    font-size: 16px;
  }

  .hero-stats .stat-sub {
    font-size: 9px;
  }

  .account-card .account-topline,
  .account-inline-note {
    flex-direction: row;
    align-items: flex-start;
  }

  .account-card .account-metrics,
  .account-card .purchase-chip-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-modal-head {
    flex-direction: row;
    align-items: flex-start;
  }

  .plan-meta,
  .account-metrics,
  .form-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .purchase-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inline-control {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .asset-card-grid {
    grid-template-columns: 1fr;
  }

  .market-panel {
    position: fixed;
    inset: 14px 12px 84px;
    z-index: 30;
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
    transition: 180ms ease;
    overflow: auto;
    padding: 0;
  }

  .market-panel.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .terminal-sheet-close {
    display: inline-flex;
  }

  .terminal-sheet-head {
    flex-direction: row;
    align-items: center;
  }

  .asset-category-head,
  .terminal-market-hero,
  .terminal-market-pricebox,
  .terminal-summary-head,
  .terminal-quote-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-container {
    min-height: 460px;
  }

  .terminal-market-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-category-copy {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .app-shell,
  .admin-shell {
    width: calc(100% - 20px);
    padding-top: 14px;
  }

  .panel,
  .modal-sheet,
  .auth-card {
    border-radius: 22px;
  }

  .modal {
    padding: 10px;
    align-items: end;
  }

  .modal-sheet {
    width: 100%;
    max-height: calc(100vh - 12px);
    padding: 16px;
  }

  .hero-panel {
    padding: 20px;
  }

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

  .stepper-summary {
    padding: 12px;
    gap: 10px;
  }

  .stepper-summary strong {
    font-size: 15px;
    line-height: 1.2;
  }

  .stepper-summary .micro-copy {
    display: none;
  }

  .stepper-counter {
    min-width: 52px;
    padding: 8px 10px;
  }

  .stepper-counter strong {
    font-size: 19px;
  }

  .stepper-track {
    grid-template-columns: repeat(var(--step-count, 4), minmax(0, 1fr));
    gap: 6px;
  }

  .stepper-track::before {
    display: none;
  }

  .step-pill {
    gap: 0;
  }

  .step-pill-number {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .step-pill-copy {
    display: none;
  }

  .purchase-chip-row,
  .review-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .purchase-rules-card {
    padding: 14px;
    gap: 10px;
  }

  .purchase-program-switch {
    gap: 8px;
  }

  .purchase-program-card {
    padding: 12px;
    gap: 3px;
    border-radius: 18px;
  }

  .purchase-program-card strong {
    font-size: 18px;
  }

  .purchase-program-card small {
    font-size: 11px;
  }

  .purchase-rules-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .purchase-rules-table-head,
  .purchase-rules-table-row {
    grid-template-columns: minmax(66px, 1fr) repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .purchase-rules-table-head {
    font-size: 9px;
  }

  .purchase-rules-table-row {
    padding: 8px 9px;
  }

  .purchase-rules-stage {
    font-size: 11px;
  }

  .purchase-rules-table-row strong {
    font-size: 11px;
  }

  .purchase-rules-grid {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .purchase-rules-grid span {
    padding: 9px 10px;
    font-size: 11px;
  }

  .purchase-plan-grid,
  .purchase-selection-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-plan-card {
    padding: 13px;
    gap: 9px;
  }

  .purchase-plan-size {
    font-size: 24px;
  }

  .purchase-plan-head,
  .purchase-plan-footer,
  .purchase-selection-head,
  .purchase-selection-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .purchase-plan-metrics {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .hero-cta-button {
    width: 100%;
    min-width: 0;
    justify-content: center;
    min-height: 60px;
    padding: 16px 18px;
  }

  .hero-cta-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    font-size: 15px;
  }

  .asset-select-card {
    padding: 11px;
  }

  .asset-select-main {
    grid-template-columns: minmax(0, 1fr) 68px auto;
    gap: 9px;
    align-items: center;
  }

  .asset-select-symbol {
    font-size: 15px;
  }

  .asset-select-label {
    font-size: 11px;
  }

  .asset-select-price {
    font-size: 16px;
  }

  .asset-select-badge {
    font-size: 8px;
    padding: 4px 7px;
  }

  .purchase-chip {
    padding: 8px 10px;
    font-size: 11px;
  }

  .purchase-chip strong,
  .review-compact-card strong {
    font-size: 12px;
  }

  .review-compact-card {
    padding: 10px;
  }

  .nav-button {
    gap: 4px;
    padding: 7px 4px;
  }

  .nav-icon {
    font-size: 16px;
  }

  .nav-label {
    font-size: 9px;
  }

  .brand-logo {
    width: min(112px, 34vw);
  }

  .toast-stack {
    inset: auto 10px 100px 10px;
  }

  .toast {
    max-width: none;
    min-width: 0;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block;
  }

  .chart-container {
    min-height: 320px;
  }

  .quote-strip,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .quote-strip-home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-overview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terminal-market-symbol {
    font-size: 22px;
  }

  .terminal-market-price {
    font-size: 24px;
  }

  .account-topline,
  .trade-mobile-head,
  .trade-mobile-topline,
  .trade-mobile-footer,
  .trade-group-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-card .account-topline,
  .account-card .hero-actions,
  .account-inline-note {
    flex-direction: row;
    align-items: flex-start;
  }

  .trade-mobile-right {
    justify-items: start;
    text-align: left;
  }

  .trade-action-row {
    width: 100%;
  }

  .trade-action-row .button {
    flex: 1 1 0;
  }

  .terminal-market-strip,
  .terminal-market-meta-row,
  .terminal-market-compact-strip,
  .terminal-account-strip,
  .terminal-quote-strip,
  .terminal-order-summary,
  .trade-mobile-strip {
    gap: 6px;
  }

  .quantity-presets,
  .terminal-field-grid,
  .terminal-mini-grid,
  .terminal-quote-grid,
  .terminal-market-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .asset-select-chart {
    gap: 4px;
  }

  .quote-card-home {
    padding: 10px 11px;
    gap: 8px;
  }

  .quote-card-home .quote-symbol {
    font-size: 12px;
  }

  .quote-card-home strong {
    font-size: 16px;
  }

  .asset-select-bottom {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .asset-select-sparkline {
    width: 68px;
    justify-self: center;
  }

  .asset-select-sparkline svg {
    width: 68px;
    height: 28px;
  }

  .asset-select-flow {
    font-size: 9px;
  }

  .account-history-banner-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-competition-strip {
    grid-template-columns: 1fr;
  }

  .account-risk-strip {
    grid-template-columns: 1fr;
  }

  .terminal-price-card {
    padding: 10px;
  }

  .terminal-quote-price {
    font-size: 18px;
  }

  .terminal-history-tab {
    min-width: 120px;
  }
}

.account-section {
  display: grid;
  gap: 10px;
}

.account-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account-section-head h4,
.account-section-head p {
  margin: 0;
}

.account-section-history {
  opacity: 1;
}

.account-card-history {
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.014)),
    linear-gradient(135deg, rgba(157, 169, 180, 0.05), transparent 42%);
}

.account-card-breached-history {
  border-color: rgba(255, 107, 107, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.01)),
    linear-gradient(135deg, rgba(255, 107, 107, 0.08), transparent 44%);
}

.account-history-banner {
  display: grid;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.account-history-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account-history-kicker {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.account-history-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.account-history-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.account-history-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-history-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.account-history-metrics {
  gap: 10px;
}

.account-competition-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.account-risk-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.account-competition-pill {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 0;
}

.account-competition-pill span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.account-competition-pill strong {
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.account-competition-pill.is-leading {
  border-color: rgba(229, 197, 122, 0.22);
  background: rgba(229, 197, 122, 0.08);
}

.account-risk-pill {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 0;
}

.account-risk-pill span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.account-risk-pill strong {
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.account-inline-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 880px) {
  .account-section-history .account-grid {
    grid-template-columns: 1fr;
  }
}

.admin-tabbar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.admin-tabbar::-webkit-scrollbar {
  display: none;
}

.admin-tab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: 180ms ease;
}

.admin-tab:hover {
  border-color: rgba(229, 197, 122, 0.24);
  color: var(--text);
}

.admin-tab.is-active {
  background: rgba(229, 197, 122, 0.14);
  border-color: rgba(229, 197, 122, 0.32);
  color: var(--text);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.is-active {
  display: block;
}

.admin-issue-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.issue-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-action-list {
  display: grid;
  gap: 12px;
}

.admin-action-card {
  display: grid;
  gap: 10px;
}

.admin-action-card h4,
.admin-action-card p {
  margin: 0;
}

.asset-select-symbol {
  font-size: 15px;
}

.asset-select-label {
  font-size: 11px;
}

.asset-select-price {
  font-size: 16px;
}

.asset-select-badge {
  font-size: 8px;
  padding: 3px 7px;
}

@media (max-width: 820px) {
  .admin-issue-grid {
    grid-template-columns: 1fr;
  }

  .issue-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .account-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tournament-info-grid {
    grid-template-columns: 1fr;
  }

  .tournament-objective-row {
    gap: 6px;
  }

  .tournament-objective-item {
    padding: 9px 6px;
  }

  .tournament-objective-item strong {
    font-size: 12px;
  }

  .leaderboard-modal-head h3 {
    font-size: 24px;
  }

  .leaderboard-prize-panel h4,
  .leaderboard-full-panel h4 {
    font-size: 19px;
  }

  .tournament-competition-shell .tournament-objective-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tournament-competition-shell .tournament-objective-item {
    padding: 10px;
    gap: 4px;
    text-align: left;
  }

  .tournament-competition-shell .tournament-objective-top {
    justify-content: flex-start;
  }

  .leaderboard-page-hero .tournament-objective-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leaderboard-page-hero .tournament-objective-item {
    padding: 10px;
  }

  .tournament-section-icon {
    width: 30px;
    height: 30px;
    border-radius: 12px;
  }

  .leaderboard-prize-panel .tournament-section-icon,
  .leaderboard-full-panel .tournament-section-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
  }

  .verified-badge {
    width: 17px;
    height: 17px;
  }

  .verified-badge-large {
    width: 19px;
    height: 19px;
  }

  .tournament-objective-icon,
  .leaderboard-prize-icon {
    width: 22px;
    height: 22px;
  }

  .tournament-section-icon svg,
  .tournament-objective-icon svg,
  .leaderboard-prize-icon svg {
    width: 13px;
    height: 13px;
  }

  .tournament-section-title {
    gap: 8px;
  }

  .tournament-competition-topline {
    flex-direction: column;
  }

  .leaderboard-page-topline {
    flex-direction: column;
  }

  .leaderboard-banner-panel {
    grid-template-columns: 1fr;
  }

  .leaderboard-prize-grid {
    grid-template-columns: 1fr;
  }

  .tournament-leaderboard-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .tournament-leaderboard-right {
    align-items: flex-start;
    text-align: left;
  }

  .admin-tab {
    padding: 9px 12px;
    font-size: 13px;
  }

  .asset-select-symbol {
    font-size: 15px;
  }

  .asset-select-label {
    font-size: 11px;
  }

  .asset-select-price {
    font-size: 16px;
  }

  .asset-select-badge {
    font-size: 8px;
    padding: 3px 7px;
  }
}
