:root {
  --bg1: #0c1430;
  --bg2: #172554;
  --panel: rgba(18, 26, 68, 0.78);
  --gold1: #f4ca72;
  --gold2: #b87a26;
  --green1: #27c96a;
  --green2: #0e8a43;
  --blue1: #4fd1ff;
  --blue2: #2861ff;
  --red1: #ff7a7a;
  --red2: #c63232;
  --text: #f8f2e9;
  --muted: #d2d8ff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(79, 209, 255, 0.18), transparent 24%),
    radial-gradient(circle at bottom, rgba(244, 202, 114, 0.16), transparent 22%),
    linear-gradient(180deg, var(--bg2), var(--bg1));
}
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 20%, rgba(109, 213, 255, 0.16), transparent 30%);
}
.screen {
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 40px;
}
.ornate {
  border: 2px solid rgba(244, 202, 114, 0.55);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.hero-card, .panel, .topbar, .table-wrap {
  padding: 20px;
}
.logo-stack, .profile-wrap, .action-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-badge, .avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #68d6ff, #3659ff);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.12);
}
.avatar { object-fit: cover; }
.hero-card h1, .panel h2 { margin: 0 0 8px; }
.hero-art {
  position: relative;
  height: 220px;
  margin: 18px 0;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(122,225,255,.35), rgba(112,185,255,.08)),
    linear-gradient(180deg, #2846a0, #101a45);
}
.mountain {
  position: absolute;
  inset: auto 0 0 0;
  height: 58%;
  background:
    radial-gradient(circle at 20% 100%, #79bff8 0 24%, transparent 25%),
    radial-gradient(circle at 50% 100%, #8fd5ff 0 28%, transparent 29%),
    radial-gradient(circle at 80% 100%, #6f8cff 0 24%, transparent 25%);
}
.coin {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff4bf, #f0bd4e 60%, #8a5b18);
}
.coin-a { right: 24px; top: 18px; }
.coin-b { left: 20px; bottom: 24px; }
.auth-panel { display: grid; gap: 12px; }
.btn {
  appearance: none;
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  color: white;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.18), 0 10px 22px rgba(0,0,0,0.18);
}
.btn-line { background: linear-gradient(180deg, #29d861, #119c44); }
.btn-ghost { background: linear-gradient(180deg, #5872db, #3447a7); }
.btn-primary { background: linear-gradient(180deg, var(--green1), var(--green2)); }
.btn-secondary { background: linear-gradient(180deg, var(--blue1), var(--blue2)); }
.btn-gold { background: linear-gradient(180deg, var(--gold1), var(--gold2)); color: #2d1700; }
.btn-danger { background: linear-gradient(180deg, var(--red1), var(--red2)); }
.input {
  width: 100%;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  color: white;
  padding: 14px 16px;
  font-size: 18px;
}
.hint, .message, .sub { color: var(--muted); }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.display-name { font-size: 24px; font-weight: 900; }
.currency-box {
  min-width: 130px;
  text-align: center;
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(244,202,114,.24), rgba(184,122,38,.16));
}
.currency-box strong { display: block; font-size: 28px; }
.lobby-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}
.ticket-panel { grid-column: 1 / -1; }
.card-preview-row { display: flex; gap: 10px; margin: 14px 0 18px; }
.card-mini {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 74px;
  border-radius: 14px;
  background: #fff;
  color: #2f1d16;
  font-weight: 900;
}
.ticket-logs {
  display: grid;
  gap: 10px;
}
.log-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
}
.room-code {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 4px;
}
.table-felt {
  position: relative;
  min-height: 72vh;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 50%, rgba(127,255,179,.16), transparent 40%),
    linear-gradient(180deg, #1c9c6d, #106647);
  border: 10px solid #6f4520;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.09);
}
.seat {
  position: absolute;
  width: 180px;
  min-height: 88px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(36, 20, 7, 0.58);
  border: 2px solid rgba(244,202,114,.4);
}
.seat-top { left: 50%; top: 28px; transform: translateX(-50%); }
.seat-right { right: 20px; top: 50%; transform: translateY(-50%); }
.seat-bottom { left: 50%; bottom: 28px; transform: translateX(-50%); }
.seat-left { left: 20px; top: 50%; transform: translateY(-50%); }
.table-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: min(500px, calc(100% - 40px));
}
.trophy { font-size: 70px; }
.phase-badge {
  display: inline-block;
  margin: 8px 0 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe29b, #d8a239);
  color: #362100;
  font-weight: 900;
}
.center-note { font-size: 18px; }
.seat-name { font-weight: 900; font-size: 18px; }
.seat-meta { color: #eadab7; font-size: 14px; }
@media (max-width: 820px) {
  .lobby-grid { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: stretch; }
  .table-felt { min-height: 620px; }
  .seat { width: 140px; min-height: 74px; font-size: 14px; }
  .seat-top, .seat-bottom { left: 50%; }
}

.field-label { display:block; margin-bottom:8px; color: var(--muted); font-weight:700; }
.select-input { appearance: none; }
.action-row-wrap { flex-wrap: wrap; }
.table-felt-dynamic .seat-hidden { display: none; }
