/* Stock Rush Pro — styles
   Inherits the clean white-paper aesthetic from Stock Rush,
   adds event-phase overlay, choice tracker, event type badges.  */

:root {
  --bg:     #ffffff;
  --paper:  #fafaf7;
  --ink:    #111111;
  --muted:  #6b6b6b;
  --faint:  #ebe8e1;
  --line:   #111111;
  --up:     #1f7a4d;
  --down:   #c24a3a;
  --accent: #d97757;
}

* { box-sizing: border-box; }

html, body, #root {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

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

/* ============================================================
   LANDING
   ============================================================ */
.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: radial-gradient(circle at 20% 10%, #fff 0%, #fafaf7 60%, #f3f0e8 100%);
}
.landing-card {
  max-width: 720px;
  width: 100%;
  border: 1.5px solid var(--line);
  background: white;
  padding: 48px 48px 40px;
}
.landing-mark {
  width: 56px; height: 56px;
  border: 1.5px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Geist Mono', ui-monospace;
  font-weight: 700; font-size: 20px;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}
.landing-title {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0 0 8px;
}
.landing-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.55;
  margin-bottom: 36px;
}
.role-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.role-card {
  text-align: left;
  border: 1.5px solid var(--line);
  background: white;
  padding: 24px;
  transition: transform .15s, background .15s;
}
.role-card:hover { background: var(--paper); transform: translateY(-2px); }
.role-eyebrow {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.role-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 6px 0 8px;
}
.role-desc { color: var(--muted); font-size: 14px; line-height: 1.5; }
.role-cta {
  margin-top: 24px;
  font-family: 'Geist Mono', ui-monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.landing-foot {
  border-top: 1px solid var(--faint);
  padding-top: 24px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.landing-foot b { color: var(--ink); }

/* ============================================================
   HOST SHELL
   ============================================================ */
.host-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

/* ── Header ── */
.host-header {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  border-bottom: 1.5px solid var(--line);
  background: white;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Geist Mono', ui-monospace;
  font-weight: 700; font-size: 13px;
  letter-spacing: 0;
}
.brand-title  { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.brand-sub    { font-size: 11px; color: var(--muted); font-family: 'Geist Mono', ui-monospace; }

.header-center { text-align: center; }
.round-label {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.round-era-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.phase-events-tag {
  background: #d4953a;
  color: white;
  font-family: 'Geist Mono', ui-monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  font-weight: 700;
}

.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.join-pill {
  border: 1.5px solid var(--line);
  padding: 8px 14px;
  text-align: right;
}
.join-label  { font-family: 'Geist Mono', ui-monospace; font-size: 10px; letter-spacing: 0.14em; color: var(--muted); }
.join-url    { font-size: 12px; font-weight: 600; }
.join-code   { font-family: 'Geist Mono', ui-monospace; font-size: 22px; font-weight: 700; letter-spacing: 0.16em; margin-top: 1px; }

/* ── Body layout ── */
.host-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 14px;
  padding: 14px;
  min-height: 0;
  align-items: start;
}
.host-main    { display: flex; flex-direction: column; gap: 14px; }
.host-sidebar { display: flex; flex-direction: column; gap: 14px; }

/* ── Panel ── */
.panel {
  border: 1.5px solid var(--line);
  background: white;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1.5px solid var(--line);
  font-family: 'Geist Mono', ui-monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Lock strip ── */
.lock-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 6px 0 3px;
}
.lock-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1.5px solid var(--line);
  padding: 2px 7px 2px 3px;
  font-size: 12px;
  font-family: 'Geist Mono', ui-monospace;
  transition: background .2s;
}
.lock-chip.locked   { background: var(--up);  color: white; border-color: var(--up); }
.lock-chip.unlocked { background: white; color: var(--muted); }
.lock-icon          { font-size: 11px; }
.lock-icon.pending  { opacity: 0.5; }
.lock-count {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Next round button — the teacher's primary action ── */
.next-round-btn {
  border: 2px solid var(--ink);
  padding: 14px 26px;
  font-family: 'Geist Mono', ui-monospace;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 10px;
  transition: transform .12s, background .15s, box-shadow .15s;
  white-space: nowrap;
  cursor: pointer;
}
.next-round-btn.ready {
  background: var(--ink);
  color: white;
  box-shadow: 0 6px 18px rgba(15,23,42,0.28), 0 0 0 4px rgba(15,23,42,0.06);
  animation: next-round-pulse 1.8s ease-in-out infinite;
}
.next-round-btn.ready:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15,23,42,0.36); }
.next-round-btn.force {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  border-color: #c2410c;
  box-shadow: 0 6px 18px rgba(234,88,12,0.35);
}
.next-round-btn.force:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(234,88,12,0.45); }
@keyframes next-round-pulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(15,23,42,0.28), 0 0 0 4px rgba(15,23,42,0.06); }
  50%      { box-shadow: 0 8px 22px rgba(15,23,42,0.38), 0 0 0 8px rgba(15,23,42,0.10); }
}

/* ============================================================
   HERO LEADERBOARD
   ============================================================ */
.hero-lb      { flex: 1; }
.hero-lb-list { display: flex; flex-direction: column; }

.hero-row {
  display: grid;
  grid-template-columns: 72px 220px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--faint);
  position: relative;
  transition: background .15s;
}
.hero-row:last-child { border-bottom: none; }
.hero-row.is-bot     { opacity: 0.72; }

/* Podium gradients — vivid, saturated gold / silver / bronze washes */
.hero-row.podium-1 {
  background: linear-gradient(100deg,
    rgba(253,230,138,0.85) 0%,
    rgba(251,191,36,0.45) 30%,
    rgba(255,251,232,0.18) 70%,
    transparent 100%);
  border-left: 10px solid #f59e0b;
  padding-left: 14px;
  box-shadow: inset 0 0 0 1px rgba(245,161,66,0.22), 0 2px 8px rgba(245,158,11,0.12);
}
.hero-row.podium-2 {
  background: linear-gradient(100deg,
    rgba(148,163,184,0.60) 0%,
    rgba(100,116,139,0.28) 35%,
    rgba(226,232,240,0.12) 70%,
    transparent 100%);
  border-left: 10px solid #64748b;
  padding-left: 14px;
  box-shadow: inset 0 0 0 1px rgba(100,116,139,0.18);
}
.hero-row.podium-3 {
  background: linear-gradient(100deg,
    rgba(217,119,6,0.55) 0%,
    rgba(180,83,9,0.28) 35%,
    rgba(254,243,199,0.12) 70%,
    transparent 100%);
  border-left: 10px solid #b45309;
  padding-left: 14px;
  box-shadow: inset 0 0 0 1px rgba(180,83,9,0.18);
}
.hero-row.podium-1 .hr-medal { filter: drop-shadow(0 3px 6px rgba(180,120,0,0.55)); }
.hero-row.podium-2 .hr-medal { filter: drop-shadow(0 3px 5px rgba(71,85,105,0.45)); }
.hero-row.podium-3 .hr-medal { filter: drop-shadow(0 3px 5px rgba(146,64,14,0.45)); }

/* Player-color accent stripe + subtle tint for rows 4+ */
.hero-row:not(.podium-1):not(.podium-2):not(.podium-3) {
  border-left: 8px solid var(--row-accent, transparent);
  padding-left: 12px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--row-color, transparent) 12%, transparent) 0%, transparent 40%);
}

.hr-rank    { display: flex; align-items: center; justify-content: center; }
.hr-medal   { font-size: 26px; line-height: 1; }
.hr-num     { font-family: 'Geist Mono', ui-monospace; font-size: 20px; font-weight: 700; color: var(--muted); }

.hr-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hr-name     { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hr-lock     { font-size: 14px; }
.hr-cash     { font-family: 'Geist Mono', ui-monospace; font-size: 12.5px; margin-top: 3px; white-space: nowrap; color: var(--muted); }

.hr-portfolio { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-width: 0; }
.hr-no-holds  { font-size: 13px; }
.hr-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1.5px solid var(--faint);
  background: var(--paper);
  font-family: 'Geist Mono', ui-monospace;
  font-size: 12.5px;
  border-radius: 5px;
  font-weight: 600;
}
.hr-chip.chip-up   { box-shadow: inset 3px 0 0 0 #1f7a4d; border-color: rgba(31,122,77,0.30); }
.hr-chip.chip-down { box-shadow: inset 3px 0 0 0 #c24a3a; border-color: rgba(194,74,58,0.30); }
.hr-chip-emoji  { font-size: 17px; }
.hr-chip-ticker { font-weight: 700; letter-spacing: 0.04em; }
.hr-chip-qty    { color: var(--muted); font-size: 11.5px; }

.hr-worth-block { text-align: right; flex-shrink: 0; }
.hr-worth       { font-family: 'Geist Mono', ui-monospace; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-worth     { font-size: 30px; letter-spacing: -0.02em; }
.hero-row.podium-2 .hr-worth { font-size: 24px; }
.hero-row.podium-3 .hr-worth { font-size: 22px; }
.hr-pnl         {
  font-family: 'Geist Mono', ui-monospace; font-size: 13px; font-weight: 700;
  margin-top: 6px; display: inline-block;
  padding: 4px 11px; border-radius: 6px; letter-spacing: 0.02em;
}
.hr-pnl.up      { color: #15803d; background: rgba(22,163,74,0.18); border: 1px solid rgba(22,163,74,0.35); }
.hr-pnl.down    { color: #b91c1c; background: rgba(220,38,38,0.18); border: 1px solid rgba(220,38,38,0.35); }
.hr-pnl-abs     { opacity: 0.80; font-weight: 600; }

.bot-tag {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  background: var(--faint);
  padding: 2px 4px;
  color: var(--muted);
  text-transform: uppercase;
}

/* ============================================================
   COMPACT STOCK TICKER
   ============================================================ */
.compact-ticker { flex-shrink: 0; }
.ticker-list    { display: flex; flex-direction: column; }
.ticker-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-bottom: 1px dashed var(--faint);
}
.ticker-row:last-child { border-bottom: none; }
.ticker-emoji  { font-size: 17px; flex-shrink: 0; }
.ticker-ident  { flex: 1; min-width: 0; }
.ticker-id     { font-family: 'Geist Mono', ui-monospace; font-weight: 700; font-size: 12px; letter-spacing: 0.04em; display: block; }
.ticker-name   { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ticker-right  { text-align: right; flex-shrink: 0; }
.ticker-price  { font-family: 'Geist Mono', ui-monospace; font-size: 13px; font-weight: 700; display: block; font-variant-numeric: tabular-nums; }
.ticker-delta  { font-family: 'Geist Mono', ui-monospace; font-size: 11px; font-weight: 600; display: block; }
.ticker-delta.up   { color: var(--up); }
.ticker-delta.down { color: var(--down); }

/* ============================================================
   ACTIVITY FEED
   ============================================================ */
.activity-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.reaction-strip {
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  border-bottom: 1px dashed var(--faint);
  min-height: 40px;
  align-items: center;
}
.reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  border: 1px solid var(--faint);
  padding: 3px 6px 3px 4px;
  animation: pop 0.4s ease;
}
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.reaction-emoji { font-size: 13px; }
.reaction-name  { color: var(--muted); font-size: 11px; }
.activity-list  { overflow-y: auto; padding: 6px 0; flex: 1; }
.activity-item  { padding: 5px 14px; font-size: 12px; font-family: 'Geist Mono', ui-monospace; color: var(--muted); border-bottom: 1px dashed var(--faint); }
.activity-item:last-child { border: none; }

/* ============================================================
   EVENT TYPE BADGES
   ============================================================ */
.event-type-badge {
  display: inline-block;
  padding: 7px 18px;
  font-family: 'Geist Mono', ui-monospace;
  font-size: 16px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 3px;
}
.event-type-badge-sm {
  padding: 2px 7px;
  font-size: 9px;
  letter-spacing: 0.12em;
  display: inline-block;
  margin-bottom: 4px;
  border-radius: 2px;
}
.evt-dividend { background: #1f7a4d; color: white; }
.evt-split    { background: #3b82c4; color: white; }
.evt-ipo      { background: #d4953a; color: white; }
.evt-bonus    { background: #7c5cc9; color: white; }
.evt-buyback  { background: #e85d4b; color: white; }
.evt-rights   { background: #2f9e6f; color: white; }

/* ============================================================
   EVENT PHASE OVERLAY (full-screen during events phase)
   ============================================================ */
.event-phase-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 90;
  animation: fade-in 0.3s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Fills the projector, with a little breathing room for the drop-shadow.
   Body region (.event-phase-card-body) scrolls invisibly if content is
   taller than the card — CTA below the body stays pinned so it's always
   reachable. Scrollbar itself is hidden (see rules below) so the popup
   still LOOKS scroll-free even when it isn't. */
.event-phase-card {
  color: white;
  width: 100%;
  max-width: none;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pop-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Hide scrollbars on ANY scrollable region inside an event popup card —
   content still scrolls via trackpad / mouse wheel, just without visible
   chrome. Covers .event-phase-card-body (main event body), the IPO recap
   student table, and any future overflow region. */
.event-phase-card,
.event-phase-card * { scrollbar-width: none; }
.event-phase-card::-webkit-scrollbar,
.event-phase-card *::-webkit-scrollbar { width: 0; height: 0; display: none; }
@keyframes pop-up {
  from { transform: scale(0.96) translateY(10px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

.event-type-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.event-stock-tag {
  font-size: 22px;
  font-weight: 600;
  opacity: 0.9;
}

.event-waiting-tag {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 16px;
  opacity: 0.6;
  margin-left: auto;
}

.event-phase-headline {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.event-phase-body {
  font-size: 17px;
  line-height: 1.5;
  opacity: 0.9;
  max-width: none;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* Quick numbers row */
.event-quick-numbers {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.eqn-cell {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 8px 14px;
  border-radius: 2px;
}
.eqn-label {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 2px;
}
.eqn-val {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.eqn-val.eqn-up { color: #4ade80; }
.eqn-arrow {
  font-size: 16px;
  opacity: 0.35;
  font-weight: 300;
}

/* ── Choice tracker ── */
.event-choice-tracker { margin-top: 8px; }
.ect-label {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 14px;
}
.ect-players {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.ect-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1.5px solid rgba(255,255,255,0.15);
  font-size: 13px;
  transition: border-color .3s, background .3s;
  border-radius: 2px;
}
.ect-chip.responded {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(31, 122, 77, 0.18);
}
.ect-chip.pending { opacity: 0.65; }
.ect-name  { font-weight: 600; }
.ect-choice {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  margin-left: 2px;
}
.ect-dot { opacity: 0.5; }

.ect-progress {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-bottom: 8px;
  overflow: hidden;
}
.ect-progress-fill {
  height: 100%;
  background: #4ade80;
  border-radius: 2px;
  transition: width 0.6s ease;
}
.ect-count {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 12px;
  opacity: 0.55;
}

/* ============================================================
   OVERLAYS (lobby, ended)
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.overlay-card {
  background: white;
  border: 1.5px solid var(--line);
  padding: 40px 44px;
  max-width: 540px;
  text-align: center;
}
.overlay-card.wide { max-width: 820px; }
.overlay-eyebrow {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.overlay-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 14px;
}
.overlay-sub {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 26px;
}

/* Lobby grid */
.lobby-overlay { max-width: 860px; padding: 32px 36px; }
.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 24px 0 20px;
  text-align: left;
}
.how-card {
  border: 1.5px solid var(--line);
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.how-card.demo { background: var(--ink); color: white; }
.how-card.demo .muted, .how-card.demo .how-foot { color: rgba(255,255,255,0.6); }
.how-tag  { font-family: 'Geist Mono', ui-monospace; font-size: 12px; letter-spacing: 0.14em; opacity: 0.65; }
.how-body { font-size: 16px; line-height: 1.55; opacity: 0.9; flex: 1; }
.how-card.real .how-body { color: var(--ink); opacity: 1; }
.how-foot { font-size: 15px; }
.fake-qr  { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px dashed var(--line); margin-top: 4px; }

.join-url-big  { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.join-code-big { font-family: 'Geist Mono', ui-monospace; font-size: 28px; font-weight: 700; letter-spacing: 0.16em; }

.lobby-divider {
  border-top: 1px dashed var(--faint);
  padding-top: 16px;
  margin-bottom: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.lobby-players { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.lobby-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  padding: 5px 12px 5px 5px;
  font-size: 16px;
}

/* Buttons */
.big-btn {
  background: var(--ink);
  color: white;
  border: 1.5px solid var(--line);
  padding: 16px 28px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  width: 100%;
  transition: transform .12s;
}
.big-btn:hover   { transform: translateY(-1px); }
.big-btn.subtle  { background: white; color: var(--ink); }
.ghost-btn {
  background: white;
  color: var(--ink);
  border: 1.5px solid var(--line);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 8px;
}
.ghost-btn:hover { background: var(--paper); }

/* Podium */
.podium {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin: 22px 0 28px;
}
.podium-step {
  border: 1.5px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.podium-step.step-1 { background: var(--ink); color: white; }
.podium-step.step-1 .podium-place { color: rgba(255,255,255,0.6); }
.podium-place { font-family: 'Geist Mono', ui-monospace; font-size: 14px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; margin-top: 6px; }
.podium-name  { font-size: 21px; font-weight: 600; }
.podium-worth { font-family: 'Geist Mono', ui-monospace; font-size: 24px; font-weight: 700; }

/* ============================================================
   PLAYER SHELL
   ============================================================ */
.player-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: white;
  border-left: 1.5px solid var(--line);
  border-right: 1.5px solid var(--line);
  display: flex;
  flex-direction: column;
}
@media (max-width: 520px) { .player-shell { border-left: none; border-right: none; } }

/* Onboard */
.onboard { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--paper); }
.onboard-card {
  width: 100%;
  max-width: 380px;
  background: white;
  border: 1.5px solid var(--line);
  padding: 32px 28px;
}
.onboard-mark {
  width: 44px; height: 44px;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Geist Mono', ui-monospace;
  font-weight: 700; font-size: 13px;
  margin-bottom: 20px;
}
.onboard-title { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 4px; }
.onboard-sub   { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.field         { display: block; margin-bottom: 14px; }
.field-label   { font-family: 'Geist Mono', ui-monospace; font-size: 11px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.input         { width: 100%; border: 1.5px solid var(--line); background: white; padding: 12px 14px; font-size: 16px; outline: none; font-family: inherit; }
.input:focus   { background: var(--paper); }
.code-input    { font-family: 'Geist Mono', ui-monospace; font-size: 22px; letter-spacing: 0.2em; text-align: center; font-weight: 700; }
.color-row     { display: flex; align-items: center; gap: 12px; }
.onboard-foot  { margin-top: 14px; text-align: center; }

/* Player header */
.player-header { border-bottom: 1.5px solid var(--line); background: var(--paper); }
.ph-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.ph-me  { display: flex; align-items: center; gap: 9px; }
.ph-name { font-weight: 600; font-size: 15px; }
.ph-rank { font-size: 12px; color: var(--muted); font-family: 'Geist Mono', ui-monospace; }
.ph-worth { text-align: right; }
.ph-worth-label { font-family: 'Geist Mono', ui-monospace; font-size: 10px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.ph-worth-val   { font-family: 'Geist Mono', ui-monospace; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Progress dots */
.ph-progress { display: flex; align-items: center; gap: 5px; padding: 8px 16px 11px; }
.progress-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: white;
  flex-shrink: 0;
  transition: background .3s;
}
.progress-dot.done   { background: var(--up);  border-color: var(--up); }
.progress-dot.active { background: var(--ink); border-color: var(--ink); }
.ph-round-label { font-family: 'Geist Mono', ui-monospace; font-size: 11px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; margin-left: 5px; }

/* Player body */
.player-body { flex: 1; display: flex; flex-direction: column; }
.lobby-msg { padding: 40px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lobby-msg-icon  { font-size: 38px; margin-bottom: 8px; }
.lobby-msg-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.lobby-msg-sub   { color: var(--muted); margin-bottom: 16px; }

/* Summary strip */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1.5px solid var(--line);
  background: var(--paper);
}
.summary-cell { padding: 9px 10px; border-right: 1px dashed var(--faint); text-align: center; }
.summary-cell:last-child { border-right: none; }
.summary-label { font-family: 'Geist Mono', ui-monospace; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.summary-val   { font-family: 'Geist Mono', ui-monospace; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary-val.up   { color: var(--up); }
.summary-val.down { color: var(--down); }

/* Worth chart */
.worth-chart-wrap {
  padding: 12px 14px 8px;
  background: var(--paper);
  border-bottom: 1.5px solid var(--line);
}
.worth-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.worth-chart-title  { font-family: 'Geist Mono', ui-monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.worth-chart-badge  { font-family: 'Geist Mono', ui-monospace; font-size: 14px; font-weight: 700; }
.worth-chart-badge.up   { color: var(--up); }
.worth-chart-badge.down { color: var(--down); }
.worth-chart-badge-abs  { font-size: 11px; font-weight: 500; opacity: 0.75; }

/* Lock zone */
.lock-zone {
  padding: 12px 16px 9px;
  border-bottom: 1.5px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.lock-btn {
  background: var(--ink);
  color: white;
  border: 1.5px solid var(--line);
  padding: 15px 30px;
  font-size: 17px;
  font-weight: 700;
  width: 100%;
  letter-spacing: -0.01em;
  transition: transform .12s;
}
.lock-btn:hover  { transform: translateY(-1px); }
.locked-badge    { width: 100%; text-align: center; background: var(--up); color: white; border: 1.5px solid var(--up); padding: 13px 18px; font-size: 14px; font-weight: 600; }
.lock-hint       { font-size: 12px; text-align: center; }

/* Tabs */
.tab-row { display: flex; border-bottom: 1.5px solid var(--line); }
.tab {
  flex: 1;
  padding: 13px 0;
  font-family: 'Geist Mono', ui-monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--ink); border-bottom-color: var(--ink); background: var(--paper); }
.badge {
  display: inline-block;
  background: var(--ink);
  color: white;
  font-size: 10px;
  padding: 1px 5px;
  margin-left: 4px;
  font-family: 'Geist Mono', ui-monospace;
}

/* ============================================================
   EVENT CARDS (player view)
   ============================================================ */
.event-card-wrap {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.event-card {
  border: 1.5px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 18px 16px 20px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(7,26,16,0.04);
}
.event-card.dark { background: var(--ink); color: white; border: 1.5px solid var(--line); }

/* Student-event inner styles (used by IpoEvent and shared elements) */
.event-badge {
  display: inline-block;
  font-family: 'Geist Mono', ui-monospace;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); background: #f1f5f9;
  padding: 5px 10px; border-radius: 6px;
  align-self: flex-start;
}
.event-stock-row {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 4px;
}
.event-stock-emoji { font-size: 32px; line-height: 1; flex-shrink: 0; }
.event-headline {
  font-size: 17px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.01em; line-height: 1.3;
}
.event-body {
  font-size: 14px; color: #475569; line-height: 1.6;
  margin-top: 4px;
}
.event-detail-box {
  background: #f8fafc; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.edb-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14px; gap: 12px;
}
.edb-row > span { color: #64748b; }
.edb-row > b    { color: #0f172a; font-family: 'Geist Mono', ui-monospace; font-weight: 700; }
.edb-row.highlight > b { color: #15803d; font-size: 15px; }
.edb-row.warn { color: #b91c1c; }
.edb-row.warn > span, .edb-row.warn > b { color: #b91c1c; }

.event-choice-label {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #64748b; margin-top: 6px; margin-bottom: 2px;
}
.event-no-hold {
  padding: 10px 12px; background: #f8fafc;
  border: 1px dashed var(--line); border-radius: 10px;
  font-size: 13px; color: #64748b; text-align: center;
}

/* IPO apply tier buttons */
.ipo-options {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 4px 0 6px;
}
.ipo-opt {
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px 8px;
  font-family: 'Geist', ui-sans-serif;
  cursor: pointer;
  transition: transform .12s, border-color .12s, background .12s;
  text-align: center;
}
.ipo-opt:hover { border-color: #94a3b8; }
.ipo-opt.picked { border-color: var(--ink); background: var(--ink); color: #fff; }
.ipo-opt-amount { font-family: 'Geist Mono', ui-monospace; font-size: 16px; font-weight: 700; }
.ipo-opt-sub    { font-size: 11px; color: #64748b; margin-top: 3px; }
.ipo-opt.picked .ipo-opt-sub { color: rgba(255,255,255,0.7); }
.ipo-opt:disabled { cursor: not-allowed; }

/* Skip / reject row at the bottom of choice cards */
.skip-btn {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--line);
  color: #475569;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: 'Geist', ui-sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
}
.skip-btn:hover { background: #f8fafc; }

/* Personal-impact panels used by old auto events (still referenced) */
.event-personal {
  background: #f0faf5;
  border-left: 4px solid #15803d;
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
}
.event-personal-label {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; color: #15803d; text-transform: uppercase;
  margin-bottom: 3px;
}
.event-personal-val { font-size: 14px; color: #0f172a; font-weight: 600; }
.event-auto-note {
  margin-top: 4px;
  font-size: 12px; color: #15803d;
  text-align: center; font-weight: 600;
}

/* "Choice submitted — waiting" splash */
.event-waiting {
  text-align: center;
  padding: 48px 24px;
}
.event-waiting-icon { font-size: 52px; line-height: 1; margin-bottom: 12px; }
.event-waiting-title { font-size: 20px; font-weight: 700; color: var(--ink); }
.event-waiting-sub   { font-size: 14px; color: var(--muted); margin-top: 4px; }
.event-card-type { /* uses .event-type-badge */ }
.event-card-headline { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.event-card-body {
  font-size: 14px;
  line-height: 1.65;
  opacity: 0.82;
  flex: 1;
}
.event-card.auto .event-card-body { opacity: 1; color: var(--muted); }
.event-auto-banner {
  background: #f0faf5;
  border: 1.5px solid #1f7a4d;
  padding: 10px 14px;
  color: #1f7a4d;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}
.event-card-math {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 14px;
  border-radius: 2px;
  flex-wrap: wrap;
}
.event-card.auto .event-card-math { background: var(--paper); border-color: var(--faint); }
.ecm-item { display: flex; flex-direction: column; gap: 2px; }
.ecm-label {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}
.ecm-val {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ecm-val.highlight { color: #4ade80; }
.event-card.auto .ecm-val.highlight { color: var(--up); }
.ecm-sep { opacity: 0.3; font-size: 18px; }

/* Choice buttons */
.event-choice-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.choice-btn {
  flex: 1;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: transparent;
  color: white;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: background .15s, transform .12s;
}
.choice-btn.accept { background: #1f7a4d; border-color: #1f7a4d; }
.choice-btn.reject { background: rgba(255,255,255,0.08); }
.choice-btn:hover  { filter: brightness(1.15); transform: translateY(-1px); }

/* IPO amount buttons */
.ipo-amounts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.ipo-amount-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1.5px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.05);
  color: white;
  font-size: 15px;
  font-weight: 600;
  transition: background .15s, transform .12s;
}
.ipo-amount-btn:hover { background: rgba(255,255,255,0.12); transform: translateY(-1px); }
.ipo-amount-btn .ipo-shares {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 12px;
  opacity: 0.6;
}
.ipo-reject-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  padding: 10px;
  font-size: 13px;
  width: 100%;
  margin-top: 4px;
  transition: color .15s;
}
.ipo-reject-btn:hover { color: white; }

.event-waiting { text-align: center; padding: 14px; font-size: 14px; opacity: 0.6; font-style: italic; }

/* ============================================================
   TRADE CARDS (player)
   ============================================================ */
.trade-list        { display: flex; flex-direction: column; }
.trade-group-label {
  padding: 9px 16px 5px;
  font-family: 'Geist Mono', ui-monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
  border-bottom: 1px solid var(--faint);
}

.trade-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--faint);
  background: white;
  transition: background .12s;
}
.trade-card.holding {
  border-left: 3px solid var(--up);
  padding-left: 13px;
}

.tc-left  { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.tc-emoji { font-size: 28px; flex-shrink: 0; line-height: 1; }
.tc-info  { flex: 1; min-width: 0; }
.tc-id    {
  font-family: 'Geist Mono', ui-monospace;
  font-weight: 700; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tc-name  { font-size: 12px; color: var(--muted); font-family: 'Geist', ui-sans-serif; font-weight: 400; }
.tc-cap   {
  display: inline-block; margin-left: 6px;
  font-family: 'Geist', ui-sans-serif; font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.4px; padding: 2px 6px; border-radius: 10px;
  vertical-align: 1px; text-transform: uppercase;
}
.tc-cap-large { background: #e8f5ed; color: #1f7a4d; border: 1px solid #b9e0c8; }
.tc-cap-mid   { background: #fff4dc; color: #8b5e1a; border: 1px solid #f0d398; }
.tc-cap-small { background: #f1e7f6; color: #5c2d7a; border: 1px solid #d9c2e6; }
.tc-price-row { display: flex; align-items: baseline; gap: 5px; margin-top: 2px; flex-wrap: wrap; }
.tc-price { font-family: 'Geist Mono', ui-monospace; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tc-delta { font-family: 'Geist Mono', ui-monospace; font-size: 11px; font-weight: 700; }
.tc-delta.up   { color: var(--up); }
.tc-delta.down { color: var(--down); }
.tc-holding {
  display: flex; align-items: center; gap: 4px;
  margin-top: 3px;
  font-family: 'Geist Mono', ui-monospace;
  font-size: 11px;
  color: var(--muted);
}
.tc-holding.profit { color: var(--up); }
.tc-holding.loss   { color: var(--down); }
.tc-held-pnl { font-size: 11px; }

.tc-btns { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.tc-buy-btn, .tc-sell-btn {
  padding: 9px 16px;
  font-family: 'Geist Mono', ui-monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  border: 1.5px solid; border-radius: 6px;
  min-width: 64px; text-align: center;
  transition: transform .1s, filter .1s;
}
.tc-buy-btn       { background: var(--up);   color: white; border-color: var(--up); }
.tc-buy-btn.cant  { background: var(--faint); color: var(--muted); border-color: var(--faint); cursor: not-allowed; }
.tc-buy-btn:not(.cant):active { transform: scale(0.95); }
.tc-sell-btn      { background: white; color: var(--down); border-color: var(--down); }
.tc-sell-btn:active { background: var(--down); color: white; transform: scale(0.95); }

/* ============================================================
   TRADE SHEET (bottom drawer)
   ============================================================ */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.52);
  z-index: 200;
  display: flex; align-items: flex-end;
  animation: fade-in 0.2s ease;
}
.trade-sheet {
  width: 100%;
  max-height: 92vh;
  display: flex; flex-direction: column;
  background: white;
  border-radius: 20px 20px 0 0;
  -webkit-overflow-scrolling: touch;
  animation: slide-up 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: env(safe-area-inset-bottom, 8px);
}
.trade-sheet > .sheet-handle-bar,
.trade-sheet > .sheet-header,
.trade-sheet > .sheet-balance,
.trade-sheet > .sheet-tabs,
.trade-sheet > .sheet-confirm { flex-shrink: 0; }
.sheet-scroll { flex: 1; min-height: 0; overflow-y: auto; }
@keyframes slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.sheet-handle-bar {
  width: 40px; height: 4px;
  background: #d8d5ce; border-radius: 2px;
  margin: 12px auto 4px;
}

.sheet-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 10px;
  border-bottom: 1px solid var(--faint);
}
.sheet-emoji      { font-size: 26px; flex-shrink: 0; line-height: 1; }
.sheet-stock-info { flex: 1; min-width: 0; }
.sheet-ticker {
  font-family: 'Geist Mono', ui-monospace;
  font-weight: 700; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet-sname  { font-size: 13px; color: var(--muted); font-family: 'Geist', ui-sans-serif; font-weight: 400; }
.sheet-price-row { display: flex; align-items: baseline; gap: 7px; margin-top: 3px; }
.sheet-price  { font-family: 'Geist Mono', ui-monospace; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sheet-delta  { font-family: 'Geist Mono', ui-monospace; font-size: 13px; font-weight: 700; }
.sheet-delta.up   { color: var(--up); }
.sheet-delta.down { color: var(--down); }
.sheet-close-btn {
  font-size: 17px; color: var(--muted);
  padding: 8px; flex-shrink: 0;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--faint);
}
.sheet-close-btn:hover { color: var(--ink); background: var(--paper); }

.sheet-balance {
  padding: 6px 16px;
  font-size: 12px; color: var(--muted);
  background: var(--paper);
  border-bottom: 1px solid var(--faint);
}
.sheet-balance b          { color: var(--ink); font-weight: 700; }
.sheet-balance-held       { color: var(--muted); }

.sheet-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1.5px solid var(--faint);
}
.sheet-tab {
  padding: 10px 0;
  font-family: 'Geist Mono', ui-monospace;
  font-size: 12px; font-weight: 700; letter-spacing: 0.07em;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
.sheet-tab.buy.active   { color: var(--up);   border-bottom-color: var(--up); }
.sheet-tab.sell.active  { color: var(--down); border-bottom-color: var(--down); }
.sheet-tab.dimmed       { opacity: 0.35; cursor: not-allowed; }

/* Quantity picker */
.sheet-qty-row {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; padding: 12px 16px 6px;
}
.sheet-nudge {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--paper);
  font-size: 22px; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .1s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.sheet-nudge:active { transform: scale(0.88); background: var(--faint); }
.sheet-qty-num {
  font-family: 'Geist Mono', ui-monospace;
  font-size: 48px; font-weight: 700; letter-spacing: -0.04em;
  min-width: 100px; text-align: center;
  font-variant-numeric: tabular-nums; line-height: 1;
}

/* Quick-add preset row */
.sheet-presets {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 2px 16px 6px;
  justify-content: center;
}
.sheet-preset {
  height: 32px; padding: 0 12px;
  border: 1.5px solid var(--line); background: var(--paper);
  font-family: 'Geist Mono', ui-monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  border-radius: 6px; flex-shrink: 0;
  transition: background .1s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.sheet-preset:active       { transform: scale(0.92); }
.sheet-preset.max          { background: var(--ink); color: white; border-color: var(--ink); }
.sheet-preset.max:active   { filter: brightness(1.25); }
.sheet-preset.clear        { background: var(--faint); color: var(--muted); border-color: var(--faint); }
.sheet-preset.pct          { min-width: 48px; background: #fbfaf5; color: var(--ink); border-color: #cfcabb; }
.sheet-preset.pct:hover    { background: var(--paper); }
.sheet-preset:disabled     { opacity: 0.4; cursor: not-allowed; }

.sheet-hint {
  text-align: center;
  font-family: 'Geist Mono', ui-monospace;
  font-size: 10.5px; color: var(--muted);
  padding: 0 16px 6px; letter-spacing: 0.04em;
}

/* Summary box */
.sheet-summary {
  margin: 2px 16px 6px;
  background: var(--paper); border: 1px solid var(--faint);
  border-radius: 8px; padding: 8px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.sheet-sum-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px;
}
.sheet-sum-row span { color: var(--muted); }
.sheet-sum-row b    { font-family: 'Geist Mono', ui-monospace; font-weight: 700; font-variant-numeric: tabular-nums; }
.sheet-sum-row b.warn { color: var(--down); }

/* Confirm button */
.sheet-confirm {
  display: block;
  width: calc(100% - 32px);
  margin: 4px 16px 12px;
  padding: 13px 14px;
  border: none; border-radius: 10px;
  font-size: 14px; font-weight: 700; letter-spacing: -0.01em;
  text-align: center;
  transition: transform .1s, filter .1s;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.sheet-confirm.buy      { background: var(--up);   color: white; }
.sheet-confirm.sell     { background: var(--down); color: white; }
.sheet-confirm.disabled { background: var(--faint); color: var(--muted); cursor: not-allowed; }
.sheet-confirm:not(.disabled):active { transform: scale(0.97); }

/* ============================================================
   TRADE TOAST (success flash)
   ============================================================ */
.trade-toast {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 28px;
  border-radius: 0 0 18px 18px;
  min-width: 260px; max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  animation: toast-drop 0.35s cubic-bezier(0.32, 0.72, 0, 1),
             toast-fade-out 0.4s ease 2.4s forwards;
}
@keyframes toast-drop {
  from { transform: translateX(-50%) translateY(-110%); }
  to   { transform: translateX(-50%) translateY(0); }
}
@keyframes toast-fade-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}
.trade-toast.toast-buy  { background: var(--up);   color: white; }
.trade-toast.toast-sell { background: var(--down); color: white; }
.tt-icon     { font-size: 30px; flex-shrink: 0; }
.tt-headline { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.tt-sub      { font-family: 'Geist Mono', ui-monospace; font-size: 12px; opacity: 0.85; margin-top: 2px; }

/* ============================================================
   PORTFOLIO (player)
   ============================================================ */
.portfolio-list { display: flex; flex-direction: column; }
.portfolio-row  { display: flex; flex-direction: column; gap: 7px; padding: 12px 16px; border-bottom: 1px dashed var(--faint); }
.pf-top { display: flex; align-items: center; gap: 11px; }
.pf-qty { font-family: 'Geist Mono', ui-monospace; font-size: 11px; color: var(--muted); margin-top: 2px; }
.pf-total { text-align: right; }
.pf-total-val { font-family: 'Geist Mono', ui-monospace; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pf-pnl       { font-family: 'Geist Mono', ui-monospace; font-size: 12px; font-weight: 600; }
.pf-pnl.up    { color: var(--up); }
.pf-pnl.down  { color: var(--down); }

.pf-prices {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--paper);
  border: 1px solid var(--faint);
  padding: 7px 10px;
  border-radius: 2px;
}
.pf-price-cell  { display: flex; flex-direction: column; gap: 2px; }
.pf-price-label { font-family: 'Geist Mono', ui-monospace; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pf-price-val   { font-family: 'Geist Mono', ui-monospace; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-price-val.up   { color: var(--up); }
.pf-price-val.down { color: var(--down); }
.pf-price-arrow { color: var(--muted); font-size: 13px; flex-shrink: 0; }
.pf-pct-badge {
  margin-left: auto;
  font-family: 'Geist Mono', ui-monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 2px;
  flex-shrink: 0;
}
.pf-pct-badge.up   { background: #e8f5ee; color: var(--up); }
.pf-pct-badge.down { background: #fdf0ef; color: var(--down); }

.portfolio-footer {
  padding: 12px 16px;
  border-top: 1.5px solid var(--line);
  background: var(--paper);
  font-family: 'Geist Mono', ui-monospace;
  font-size: 12px;
  color: var(--up);
}

.empty { padding: 50px 22px; text-align: center; color: var(--muted); font-size: 14px; }

/* ============================================================
   PLAYER NEWS (events tab)
   ============================================================ */
.player-news { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.player-news-item { border: 1.5px solid var(--line); padding: 14px; }
.pn-round    { font-family: 'Geist Mono', ui-monospace; font-size: 10px; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 6px; }
.pn-headline { font-size: 15px; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.pn-body     { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ============================================================
   ENDED (player)
   ============================================================ */
.ended-body  { align-items: center; justify-content: center; padding: 32px 20px; }
.ended-card  { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.ended-eyebrow  { font-family: 'Geist Mono', ui-monospace; font-size: 11px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; margin-bottom: 8px; }
.ended-rank     { font-family: 'Geist Mono', ui-monospace; font-size: 40px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.ended-name     { font-size: 17px; font-weight: 600; margin-top: 4px; }
.ended-grade    { font-family: 'Geist Mono', ui-monospace; font-size: 64px; font-weight: 700; letter-spacing: -0.04em; }
.ended-worth    { font-family: 'Geist Mono', ui-monospace; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 6px 0 4px; }
.ended-profit   { font-family: 'Geist Mono', ui-monospace; font-weight: 600; }
.ended-profit.up   { color: var(--up); }
.ended-profit.down { color: var(--down); }
.ended-divs     { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .host-body   { grid-template-columns: 1fr 260px; }
  .hero-row    { grid-template-columns: 60px 170px 1fr auto; gap: 10px; }
  .hr-worth    { font-size: 14px; }
  .hero-worth  { font-size: 18px; }
}
@media (max-width: 860px) {
  .host-body       { grid-template-columns: 1fr; }
  .host-header     { grid-template-columns: 1fr; gap: 10px; text-align: center; }
  .header-right    { align-items: center; }
  .hero-row        { grid-template-columns: 40px 1fr auto; }
  .hr-portfolio    { display: none; }
  .event-phase-headline { font-size: 32px; }
  .event-phase-body     { font-size: 17px; }
  .eqn-val              { font-size: 20px; }
}
@media (max-width: 600px) {
  .role-row        { grid-template-columns: 1fr; }
  .landing-card    { padding: 28px 22px; }
  .landing-title   { font-size: 36px; }
  .how-grid        { grid-template-columns: 1fr; }
  .lobby-overlay   { padding: 22px 16px; }
}
