:root {
  --bg: #070a08;
  --bg-soft: #0c110d;
  --ink: #f5f0e4;
  --muted: #989b91;
  --muted-2: #6f746b;
  --gold: #d8b56d;
  --gold-bright: #f2dc9f;
  --gold-dim: rgba(216, 181, 109, 0.16);
  --green: #0d4b39;
  --green-deep: #06281f;
  --green-bright: #1b765b;
  --red: #b63c48;
  --red-deep: #7e2730;
  --panel: rgba(18, 24, 19, 0.86);
  --panel-solid: #111711;
  --line: rgba(230, 211, 168, 0.13);
  --line-strong: rgba(230, 211, 168, 0.24);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --font-body: "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 820px at 82% -12%, rgba(27, 108, 79, 0.2), transparent 62%),
    radial-gradient(1000px 700px at -6% 24%, rgba(122, 92, 34, 0.08), transparent 62%),
    linear-gradient(180deg, #080c09 0%, #070a08 58%, #080b09 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 50% -18%, rgba(216, 181, 109, 0.05), transparent 70%),
    radial-gradient(1400px 900px at 50% 120%, rgba(0, 0, 0, 0.4), transparent 70%);
}

#app,
#toasts {
  position: relative;
  z-index: 1;
}

#app {
  min-height: 100vh;
}

::selection {
  background: rgba(216, 181, 109, 0.28);
  color: #fff;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

.tiny {
  font-size: 12px;
}

.small {
  font-size: 12px;
}

.win-text {
  color: #7dd6a9;
}

.lose-text {
  color: #d3797f;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid rgba(216, 181, 109, 0.55);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(216, 181, 109, 0.2), rgba(216, 181, 109, 0.02));
  color: var(--gold-bright);
  font-size: 19px;
  box-shadow: inset 0 0 18px rgba(216, 181, 109, 0.08);
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.brand-word span {
  color: var(--gold);
  font-style: italic;
}

/* ---------------- buttons & forms ---------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.button.primary {
  border-color: rgba(255, 240, 196, 0.35);
  background: linear-gradient(135deg, #f2dc9f 0%, #d8b56d 52%, #b88c40 100%);
  color: #1b160b;
  box-shadow: 0 10px 30px rgba(216, 181, 109, 0.16), inset 0 1px rgba(255, 255, 255, 0.35);
}

.button.primary:hover:not(:disabled) {
  box-shadow: 0 14px 36px rgba(216, 181, 109, 0.24), inset 0 1px rgba(255, 255, 255, 0.35);
}

.button.ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}

.button.ghost:hover:not(:disabled) {
  border-color: rgba(216, 181, 109, 0.46);
  background: rgba(216, 181, 109, 0.06);
}

.button.dark {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.button.wide {
  width: 100%;
}

.button.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.button.tiny {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12px;
}

.link-button,
.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  cursor: pointer;
  font-weight: 650;
}

.link-button:hover,
.text-button:hover {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button {
  font-size: 12px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: pointer;
  transition: 160ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.sound-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-button svg path:first-child {
  fill: currentColor;
  stroke: none;
}

.sound-button.is-off {
  color: var(--muted-2);
}

.sound-button.is-off .sound-wave {
  display: none;
}

.sound-button.is-on .sound-slash {
  display: none;
}

.field-label {
  display: block;
  margin: 17px 0 7px;
  color: #cec9ba;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.035em;
}

.optional {
  color: var(--muted-2);
  font-weight: 400;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  color: var(--gold);
  font-size: 13px;
  pointer-events: none;
}

.input-wrap input,
.text-input,
.select-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-wrap input {
  padding-left: 39px;
}

.input-wrap input:focus,
.text-input:focus,
.select-input:focus {
  border-color: rgba(216, 181, 109, 0.55);
  background: rgba(0, 0, 0, 0.38);
  box-shadow: 0 0 0 3px rgba(216, 181, 109, 0.08);
}

.input-wrap input::placeholder,
.text-input::placeholder {
  color: #5e625a;
}

.select-input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.select-input option {
  background: #111711;
  color: var(--ink);
}

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner.big {
  width: 30px;
  height: 30px;
  border-width: 2px;
  border-color: rgba(216, 181, 109, 0.16);
  border-top-color: var(--gold);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------- top bar ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 70px;
  padding: 10px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 8, 0.76);
  backdrop-filter: blur(20px);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.main-nav a {
  padding: 8px 15px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: 160ms ease;
}

.main-nav a:hover {
  color: var(--ink);
}

.main-nav a.active {
  background: rgba(216, 181, 109, 0.1);
  color: var(--gold-bright);
  box-shadow: inset 0 0 0 1px rgba(216, 181, 109, 0.12);
}

.topbar-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(216, 181, 109, 0.055);
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.balance-pill strong {
  color: var(--gold-bright);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
}

.balance-pill > span:last-child {
  display: inline-block;
  line-height: 1;
  transform: translateY(0.5px);
}

.chip-dot {
  align-self: center;
  width: 12px;
  height: 12px;
  border: 2px dashed rgba(16, 21, 16, 0.65);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(216, 181, 109, 0.5);
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(216, 181, 109, 0.22);
  border-radius: 50%;
  background: linear-gradient(145deg, #1b2a20, #0b120d);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* ---------------- auth ---------------- */

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(390px, 0.84fr);
  min-height: 100vh;
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: clamp(30px, 4vw, 58px);
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 75% 60%, rgba(32, 128, 91, 0.3), transparent 48%),
    radial-gradient(circle at 25% 15%, rgba(216, 181, 109, 0.1), transparent 40%),
    linear-gradient(145deg, #07120d 0%, #0a1c14 52%, #07100c 100%);
  border-right: 1px solid var(--line);
}

.auth-visual::before {
  content: "";
  position: absolute;
  left: -12%;
  bottom: -28%;
  width: 74%;
  aspect-ratio: 1;
  border: 1px solid rgba(216, 181, 109, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 40px rgba(216, 181, 109, 0.022),
    0 0 0 120px rgba(216, 181, 109, 0.018),
    0 0 0 230px rgba(216, 181, 109, 0.012);
}

.auth-visual::after {
  content: "♠";
  position: absolute;
  right: 5%;
  bottom: -16%;
  color: rgba(216, 181, 109, 0.035);
  font-size: 42vw;
  line-height: 1;
  pointer-events: none;
}

.visual-noise {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image: linear-gradient(rgba(216, 181, 109, 0.03) 1px, transparent 1px);
  background-size: 100% 42px;
  pointer-events: none;
}

.auth-visual .brand {
  position: absolute;
  top: clamp(24px, 3.5vw, 45px);
  left: clamp(24px, 4vw, 58px);
  z-index: 2;
}

.auth-copy {
  position: relative;
  z-index: 2;
  max-width: 610px;
  padding: 60px 0 90px;
}

.auth-copy h1 {
  margin: 19px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(46px, 5.4vw, 82px);
  font-weight: 500;
  line-height: 0.97;
  letter-spacing: -0.045em;
}

.auth-copy h1 em {
  color: var(--gold);
  font-weight: 400;
}

.auth-copy > p {
  max-width: 490px;
  color: #b6b8ae;
  font-size: 16px;
  line-height: 1.75;
}

.auth-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.auth-highlights > div {
  display: grid;
  grid-template-columns: 30px auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  min-width: 130px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.14);
}

.auth-highlights > div > span {
  grid-row: 1 / span 2;
  color: var(--gold);
  font-size: 21px;
}

.auth-highlights strong {
  font-size: 12px;
}

.auth-highlights small {
  color: var(--muted);
  font-size: 10px;
}

.auth-cards {
  position: absolute;
  right: -2%;
  bottom: 9%;
  z-index: 1;
  width: 42%;
  height: 48%;
  pointer-events: none;
}

.floating-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 106px;
  aspect-ratio: 0.7;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 9px;
  background: linear-gradient(145deg, #faf6ec, #dcd5c4);
  color: #181712;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
  font-family: var(--font-display);
  font-weight: 700;
}

.floating-card span {
  font-size: 22px;
}

.floating-card b {
  align-self: center;
  color: #9e2e36;
  font-size: 44px;
  line-height: 1;
}

.card-a {
  right: 28%;
  top: 4%;
  transform: rotate(-13deg);
}

.card-k {
  right: 6%;
  top: 27%;
  transform: rotate(9deg);
}

.card-q {
  right: 34%;
  bottom: -4%;
  transform: rotate(4deg);
}

.auth-footnote {
  position: absolute;
  left: clamp(24px, 4vw, 58px);
  bottom: clamp(20px, 3vw, 38px);
  z-index: 2;
  margin: 0;
  color: rgba(255, 255, 255, 0.28);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px clamp(24px, 5vw, 72px);
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 181, 109, 0.05), transparent 42%),
    rgba(7, 10, 8, 0.66);
}

.auth-panel-inner {
  width: 100%;
  max-width: 390px;
}

.auth-mobile-brand {
  display: none;
  margin-bottom: 40px;
}

.auth-panel h2 {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: 35px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.auth-panel p.muted {
  margin-bottom: 28px;
  font-size: 13px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.auth-tabs button {
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.auth-tabs button.active {
  background: rgba(216, 181, 109, 0.11);
  color: var(--gold-bright);
  box-shadow: inset 0 0 0 1px rgba(216, 181, 109, 0.14);
}

#auth-form .button {
  margin-top: 22px;
}

.form-note {
  margin: 13px 0 0 !important;
  padding: 10px 12px;
  border-left: 2px solid rgba(216, 181, 109, 0.45);
  background: rgba(216, 181, 109, 0.055);
  color: #b9ae94 !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
}

.auth-switch {
  margin-top: 24px !important;
  color: var(--muted) !important;
  text-align: center;
  font-size: 12px !important;
}

.secure-note {
  margin: 32px 0 0 !important;
  color: #5b6058 !important;
  font-size: 10px !important;
  text-align: center;
}

/* ---------------- lobby ---------------- */

.lobby {
  width: min(1260px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 70px;
}

.lobby-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
  padding: 20px 0 56px;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 17px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(46px, 6.2vw, 84px);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-copy h1 em {
  color: var(--gold);
  font-weight: 400;
}

.hero-copy > p {
  max-width: 570px;
  color: #aeb1a7;
  font-size: 16px;
  line-height: 1.75;
}

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

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 38px;
}

.hero-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stats strong {
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-size: 25px;
  font-weight: 500;
}

.hero-stats span {
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stack-card {
  position: relative;
  overflow: hidden;
  padding: 27px;
  border: 1px solid rgba(216, 181, 109, 0.25);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 0%, rgba(216, 181, 109, 0.15), transparent 44%),
    linear-gradient(145deg, rgba(33, 42, 26, 0.96), rgba(13, 20, 13, 0.98));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.04);
}

.stack-card::after {
  content: "♠";
  position: absolute;
  right: -16px;
  bottom: -58px;
  color: rgba(216, 181, 109, 0.045);
  font-size: 180px;
  pointer-events: none;
}

.stack-top,
.stack-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #aba88f;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stack-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stack-live i,
.live-label i,
.status-dot,
.room-live-dot,
.phase-badge i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64c897;
  box-shadow: 0 0 9px rgba(100, 200, 151, 0.75);
}

.stack-value {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 22px 0 16px;
}

.stack-value span {
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-size: clamp(46px, 5vw, 61px);
  line-height: 1;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.stack-value small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.stack-stripes {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
}

.stack-stripes i {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(216, 181, 109, 0.05), rgba(216, 181, 109, 0.55));
}

.stack-stripes i:nth-child(2) { opacity: 0.8; }
.stack-stripes i:nth-child(3) { opacity: 0.6; }
.stack-stripes i:nth-child(4) { opacity: 0.4; }
.stack-stripes i:nth-child(5) { opacity: 0.2; }

.stack-bottom {
  align-items: center;
  letter-spacing: 0;
  text-transform: none;
  font-size: 11px;
}

.stack-bottom a {
  color: var(--gold);
  font-weight: 650;
}

.zero-banner {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 34px;
  padding: 18px 20px;
  border: 1px solid rgba(216, 181, 109, 0.2);
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(216, 181, 109, 0.095), rgba(216, 181, 109, 0.02));
}

.zero-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(216, 181, 109, 0.25);
  border-radius: 50%;
  color: var(--gold);
  font-size: 20px;
}

.zero-banner div {
  flex: 1;
}

.zero-banner strong {
  font-size: 14px;
}

.zero-banner p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.lobby-section {
  padding-top: 12px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 7px 0 0;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.room-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.26);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.room-card:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 181, 109, 0.33);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.room-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 206px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.visual-blackjack {
  background:
    radial-gradient(circle at 50% 58%, rgba(27, 118, 91, 0.55), transparent 51%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px),
    linear-gradient(145deg, #0d3d2e, #061e17);
}

.visual-blackjack::before {
  content: "";
  position: absolute;
  inset: 25px 12%;
  border: 1px solid rgba(216, 181, 109, 0.14);
  border-radius: 50%;
}

.visual-roulette {
  background:
    radial-gradient(circle at 50% 50%, rgba(78, 30, 34, 0.26), transparent 55%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px),
    linear-gradient(145deg, #15211a, #080d09);
}

.visual-plinko {
  background:
    radial-gradient(circle at 50% 52%, rgba(30, 118, 88, 0.36), transparent 58%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px),
    linear-gradient(145deg, #12251b, #070d09);
}

.mini-plinko {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
  padding-top: 8px;
}

.mini-plinko-row {
  display: flex;
  gap: 14px;
}

.mini-plinko-row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(216, 181, 109, 0.7);
  box-shadow: 0 0 8px rgba(216, 181, 109, 0.35);
}

.mini-plinko-ball {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #cfcabb 60%, #8c887c);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
  animation: mini-plinko-drop 2.6s ease-in-out infinite;
}

@keyframes mini-plinko-drop {
  0%, 100% { transform: translate(-8px, 0); }
  50% { transform: translate(8px, 76px); }
}

.mini-hand {
  position: relative;
  display: flex;
  z-index: 2;
  transform: translateY(2px);
}

.mini-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 67px;
  aspect-ratio: 0.7;
  padding: 7px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 0.9;
  box-shadow: 0 14px 25px rgba(0, 0, 0, 0.34);
}

.mini-card span {
  font-size: 22px;
}

.mini-card.dark {
  transform: rotate(-9deg) translateX(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(145deg, #f8f3e8, #d9d2c2);
  color: #1a1914;
}

.mini-card.light {
  transform: rotate(6deg) translateX(-7px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(145deg, #f8f3e8, #d9d2c2);
  color: #a22e36;
}

.mini-dealer {
  position: absolute;
  bottom: 27px;
  color: rgba(216, 181, 109, 0.44);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.35em;
}

.mini-wheel {
  position: relative;
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  border: 7px solid #b3914f;
  border-radius: 50%;
  background: conic-gradient(#8e2e35 0 12%, #151515 12% 24%, #8e2e35 24% 36%, #151515 36% 48%, #8e2e35 48% 60%, #151515 60% 72%, #8e2e35 72% 84%, #0d5b40 84% 88%, #151515 88% 100%);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.46), inset 0 0 0 2px rgba(255, 240, 196, 0.2);
}

.mini-wheel::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(216, 181, 109, 0.34);
  border-radius: 50%;
}

.mini-wheel-center {
  display: grid;
  place-items: center;
  z-index: 2;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(216, 181, 109, 0.4);
  border-radius: 50%;
  background: linear-gradient(145deg, #263329, #111711);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 21px;
}

.mini-ball {
  position: absolute;
  top: 23%;
  left: 58%;
  z-index: 3;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f7f2e5;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.room-live-dot {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 7px;
  height: 7px;
}

.room-card-body {
  padding: 20px 22px 18px;
}

.room-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.room-card h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.room-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.arrow-chip {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  font-size: 14px;
  transition: 180ms ease;
}

.room-card:hover .arrow-chip {
  border-color: rgba(216, 181, 109, 0.45);
  background: rgba(216, 181, 109, 0.08);
  transform: rotate(8deg);
}

.room-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.room-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 5px;
  height: 5px;
}

.lobby-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 44px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.house-note {
  display: flex;
  align-items: center;
  gap: 13px;
}

.house-note strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}

.house-note p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.quick-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quick-rules span {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------------- shared room ---------------- */

.room-page {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: 27px 0 60px;
}

.room-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.room-head-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.back-link {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: 150ms ease;
}

.back-link:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.room-head h1 {
  margin: 0 0 1px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.room-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.room-head-right {
  display: flex;
  align-items: center;
  gap: 13px;
}

.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(100, 200, 151, 0.18);
  border-radius: 999px;
  background: rgba(100, 200, 151, 0.06);
  color: #9dd9b8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  white-space: nowrap;
}

.phase-badge.phase-result {
  border-color: rgba(216, 181, 109, 0.22);
  background: rgba(216, 181, 109, 0.07);
  color: var(--gold);
}

.phase-badge.phase-result i,
.phase-badge.phase-spinning i {
  background: var(--gold);
  box-shadow: 0 0 9px rgba(216, 181, 109, 0.7);
}

.phase-badge.phase-spinning {
  border-color: rgba(216, 181, 109, 0.22);
  background: rgba(216, 181, 109, 0.07);
  color: var(--gold);
}

.round-number {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.round-number b {
  color: var(--ink);
  font-size: 11px;
}

.round-timer {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 92px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.18);
}

.round-timer span {
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.round-timer strong {
  color: var(--gold);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

[data-countdown].urgent {
  color: #f08d7d;
}

/* ---------------- blackjack ---------------- */

.bj-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 20px;
  align-items: start;
}

.table-felt {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 640px;
  padding: 31px 35px 21px;
  overflow: hidden;
  border: 1px solid rgba(216, 181, 109, 0.22);
  border-radius: 150px 150px 28px 28px;
  background:
    radial-gradient(ellipse at 50% 47%, rgba(30, 137, 102, 0.4), transparent 53%),
    radial-gradient(ellipse at 50% 90%, rgba(0, 0, 0, 0.2), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.009) 0 1px, transparent 1px 4px),
    linear-gradient(150deg, #0c4735 0%, #072d22 55%, #051d16 100%);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.36), 0 28px 70px rgba(0, 0, 0, 0.32);
}

.table-felt::before {
  content: "";
  position: absolute;
  inset: 17px;
  border: 1px solid rgba(216, 181, 109, 0.18);
  border-radius: 130px 130px 20px 20px;
  pointer-events: none;
}

.table-felt::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 0.6px, transparent 0.6px);
  background-size: 5px 5px;
  opacity: 0.32;
  pointer-events: none;
}

.felt-arc {
  position: absolute;
  top: 43%;
  left: 50%;
  width: 72%;
  height: 43%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(216, 181, 109, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.dealer-area {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 142px;
}

.hand-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.hand-label b {
  padding: 2px 7px;
  border: 1px solid rgba(216, 181, 109, 0.2);
  border-radius: 999px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0;
}

.card-hand {
  display: flex;
  min-height: 108px;
  align-items: center;
  justify-content: center;
  padding-left: 7px;
}

.playing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 72px;
  height: 103px;
  margin-left: -7px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  background: linear-gradient(145deg, #fbf8f0, #e2dccd);
  color: #161711;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.7);
  transform-origin: bottom center;
  animation: deal-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.playing-card:nth-child(2) { animation-delay: 45ms; }
.playing-card:nth-child(3) { animation-delay: 90ms; }
.playing-card:nth-child(4) { animation-delay: 135ms; }
.playing-card:nth-child(5) { animation-delay: 180ms; }

@keyframes deal-in {
  from {
    opacity: 0;
    transform: translateY(-13px) rotate(-4deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

.playing-card.red-card {
  color: #a82e38;
}

.card-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  font-family: var(--font-display);
  line-height: 0.88;
}

.card-corner b {
  font-size: 17px;
  font-weight: 700;
}

.card-corner i {
  font-size: 12px;
  font-style: normal;
}

.card-suit {
  align-self: flex-end;
  margin: -3px 0 -6px;
  font-size: 31px;
  line-height: 1;
}

.card-back {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    repeating-linear-gradient(45deg, rgba(216, 181, 109, 0.15) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, rgba(216, 181, 109, 0.09) 0 1px, transparent 1px 5px),
    linear-gradient(145deg, #263c30, #0e1c15);
  color: var(--gold);
}

.card-back::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(216, 181, 109, 0.3);
  border-radius: 5px;
}

.back-pattern {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(216, 181, 109, 0.54);
  font-size: 27px;
}

.ghost-card {
  opacity: 0.32;
}

.table-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 3px 0 auto;
  padding: 25px 20px;
  text-align: center;
}

.table-logo {
  color: rgba(216, 181, 109, 0.31);
  font-size: 9px;
  letter-spacing: 0.3em;
}

.table-message {
  max-width: 430px;
  margin: 11px 0 0;
  color: rgba(255, 255, 255, 0.56);
  font-family: var(--font-display);
  font-size: 14px;
  font-style: italic;
}

.seats {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 8px;
}

.empty-seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 118px;
  padding: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 17px;
  color: rgba(255, 255, 255, 0.28);
  text-align: center;
}

.empty-seat span {
  font-size: 21px;
}

.empty-seat p {
  margin: 8px 0 1px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-display);
  font-size: 14px;
}

.empty-seat small {
  font-size: 9px;
  letter-spacing: 0.06em;
}

.bet-seat,
.hand-seat {
  min-width: 142px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.17);
  backdrop-filter: blur(4px);
}

.bet-seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 122px;
  padding: 13px 18px;
}

.bet-seat.is-you,
.hand-seat.is-you {
  border-color: rgba(216, 181, 109, 0.46);
  background: rgba(216, 181, 109, 0.075);
  box-shadow: inset 0 0 24px rgba(216, 181, 109, 0.055);
}

.seat-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(216, 181, 109, 0.18);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
}

.seat-name {
  max-width: 130px;
  overflow: hidden;
  color: #e9e4d7;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-name span {
  margin-left: 3px;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seat-bet {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.chip-mini {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border: 2px dashed rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  background: var(--gold);
  vertical-align: -1px;
}

.hand-seat {
  width: 222px;
  min-width: 200px;
  animation: seat-in 200ms ease both;
}

@keyframes seat-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hand-seat-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hand-seat-top > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.hand-total {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(216, 181, 109, 0.2);
  border-radius: 8px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 15px;
}

.hand-seat .card-hand {
  min-height: 91px;
  justify-content: flex-start;
  margin: 8px 0 -4px;
  padding-left: 5px;
}

.hand-seat .playing-card {
  width: 60px;
  height: 86px;
}

.hand-seat .card-suit {
  font-size: 24px;
}

.hand-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 20px;
  gap: 6px;
}

.your-turn {
  color: var(--gold);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: pulse-text 1.6s ease infinite;
}

@keyframes pulse-text {
  50% { opacity: 0.45; }
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-win,
.result-blackjack {
  background: rgba(92, 192, 137, 0.14);
  color: #7dd6a9;
}

.result-lose {
  background: rgba(190, 74, 83, 0.13);
  color: #e08b91;
}

.result-push {
  background: rgba(216, 181, 109, 0.12);
  color: var(--gold);
}

.felt-footnote {
  position: relative;
  z-index: 2;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.21);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

/* side panel */

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.panel-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
  color: #d7d3c7;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.action-card {
  border-color: rgba(216, 181, 109, 0.18);
  background:
    radial-gradient(circle at 100% 0%, rgba(216, 181, 109, 0.08), transparent 45%),
    var(--panel);
}

.action-card h3 {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.action-hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.action-hint.center {
  margin: 12px 0 0;
  text-align: center;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 17px;
}

.casino-chip {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px dashed rgba(0, 0, 0, 0.27);
  border-radius: 50%;
  background: linear-gradient(145deg, #ead7a3, #c9a45b);
  color: #27200f;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.22), inset 0 0 0 3px rgba(255, 255, 255, 0.2);
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.casino-chip::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 50%;
}

.casino-chip:hover {
  transform: translateY(-2px);
}

.casino-chip.selected {
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px var(--gold-bright), 0 7px 0 rgba(0, 0, 0, 0.25), inset 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.chip-5 { background: linear-gradient(145deg, #d8d5ca, #9f9c90); }
.chip-10 { background: linear-gradient(145deg, #a9d8c6, #5e9e86); }
.chip-25 { background: linear-gradient(145deg, #90b8df, #4f7fab); }
.chip-50 { background: linear-gradient(145deg, #e4a2a2, #b85d62); }
.chip-100 { background: linear-gradient(145deg, #f0d69b, #c39d4d); }
.chip-250 { background: linear-gradient(145deg, #c7b6e4, #8c70bc); }
.chip-500 { background: linear-gradient(145deg, #e3b4de, #a85b99); }
.chip-1000 { background: linear-gradient(145deg, #f3d180, #c18028); }
.chip-2500 { background: linear-gradient(145deg, #9fe3c4, #2f9c72); }
.chip-5000 { background: linear-gradient(145deg, #f0a9d8, #a43d87); }
.chip-10000 { background: linear-gradient(145deg, #8fd8e8, #2b6f8c); }

.bet-input-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bet-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}

.bet-input-wrap input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

.bet-input-wrap input::-webkit-inner-spin-button {
  display: none;
}

.bet-input-wrap > span:last-child {
  color: var(--muted-2);
  font-size: 10px;
  text-transform: uppercase;
}

.action-card .button {
  margin-top: 10px;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-grid .button {
  margin-top: 0;
}

.bet-placed {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border: 1px solid rgba(216, 181, 109, 0.22);
  border-radius: 12px;
  background: rgba(216, 181, 109, 0.06);
}

.chip-stack-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px dashed rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  background: var(--gold);
  color: transparent;
  font-size: 0;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), inset 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.bet-placed > div {
  display: flex;
  flex-direction: column;
}

.bet-placed span {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bet-placed strong {
  color: var(--gold-bright);
  font-size: 16px;
}

.mini-timer {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 10px;
  text-align: center;
}

.mini-timer b {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.empty-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 4px 6px;
  text-align: center;
}

.empty-action > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 11px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  font-size: 19px;
}

.empty-action strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}

.empty-action p {
  max-width: 250px;
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.result-panel {
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
}

.result-panel-win,
.result-panel-blackjack {
  border-color: rgba(100, 200, 151, 0.24);
  background: rgba(100, 200, 151, 0.06);
}

.result-panel-lose {
  border-color: rgba(190, 74, 83, 0.2);
  background: rgba(190, 74, 83, 0.05);
}

.result-panel-push {
  border-color: rgba(216, 181, 109, 0.22);
  background: rgba(216, 181, 109, 0.055);
}

.result-kicker {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.result-panel strong {
  display: block;
  margin: 5px 0;
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-size: 37px;
  font-weight: 500;
  line-height: 1;
}

.result-panel-lose strong {
  color: #c97a80;
}

.result-panel p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-list li {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 10px;
}

.history-list li:last-child {
  border-bottom: 0;
}

.history-round {
  color: var(--muted-2);
  font-size: 9px;
}

.history-list b {
  color: #ccc6b6;
}

.empty-history {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 10px;
  color: var(--muted-2);
  text-align: center;
}

.empty-history span {
  color: rgba(216, 181, 109, 0.3);
  font-size: 22px;
}

.empty-history p {
  margin: 6px 0 0;
  font-size: 10px;
}

.pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 10px;
}

.pay-row:last-child {
  border-bottom: 0;
}

.pay-row b {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
}

/* ---------------- roulette ---------------- */

.roulette-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 302px;
  gap: 20px;
  align-items: start;
}

.roulette-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wheel-panel {
  display: grid;
  grid-template-columns: 300px 1fr;
  align-items: center;
  gap: 28px;
  min-height: 330px;
  padding: 25px 35px;
  border: 1px solid rgba(216, 181, 109, 0.2);
  border-radius: 180px 24px 24px 180px;
  background:
    radial-gradient(circle at 20% 50%, rgba(30, 137, 102, 0.3), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.009) 0 1px, transparent 1px 4px),
    linear-gradient(145deg, #0b3e2e, #061e17);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.32), 0 24px 65px rgba(0, 0, 0, 0.28);
}

.roulette-wheel-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 276px;
  height: 276px;
  filter: drop-shadow(0 24px 32px rgba(0, 0, 0, 0.45));
}

.roulette-wheel {
  position: relative;
  width: var(--wheel-size);
  height: var(--wheel-size);
  border: 8px solid #b28e4b;
  border-radius: 50%;
  box-shadow:
    0 0 0 4px #322817,
    0 0 0 6px rgba(216, 181, 109, 0.4),
    inset 0 0 0 2px rgba(0, 0, 0, 0.4),
    inset 0 0 28px rgba(0, 0, 0, 0.45);
}

.roulette-wheel::after {
  content: "";
  position: absolute;
  inset: 21px;
  border: 1px solid rgba(216, 181, 109, 0.3);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.28), transparent 68%);
}

.roulette-wheel-wrap.spinning .roulette-wheel {
  animation: wheel-spin 9.8s cubic-bezier(0.12, 0.66, 0.08, 1) both;
  animation-delay: var(--spin-delay, 0ms);
  will-change: transform;
}

.roulette-wheel-wrap.settled .roulette-wheel {
  will-change: transform;
}

@keyframes wheel-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(var(--wheel-target, 1665deg)); }
}

.roulette-ball-track {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  opacity: 0;
}

.roulette-wheel-wrap.spinning .roulette-ball-track,
.roulette-wheel-wrap.settled .roulette-ball-track {
  opacity: 1;
}

.roulette-wheel-wrap.settled .roulette-ball-track {
  transform: rotate(var(--ball-target, 1800deg));
}

.roulette-wheel-wrap.spinning .roulette-ball-track {
  animation: ball-spin 9.8s cubic-bezier(0.18, 0.66, 0.08, 1) both;
  animation-delay: var(--spin-delay, 0ms);
  will-change: transform;
}

.roulette-wheel-wrap.spinning .roulette-ball {
  animation: ball-drop 1.6s cubic-bezier(0.5, 0, 0.7, 0.2) both;
  animation-delay: var(--drop-delay, 5.4s);
}

.roulette-wheel-wrap.settled .roulette-ball {
  transform: translateY(13px);
}

@keyframes ball-drop {
  0% { transform: translateY(0) scale(1); }
  46% { transform: translateY(14px) scale(0.92); }
  64% { transform: translateY(7px) scale(1); }
  82% { transform: translateY(14px) scale(0.95); }
  100% { transform: translateY(13px) scale(1); }
}

.roulette-ball {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 13px;
  height: 13px;
  margin-left: -6.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffffff 0%, #e7e5dc 42%, #9a978c 72%, #5c5952 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.65), inset 0 -1px 2px rgba(0, 0, 0, 0.35);
}

@keyframes ball-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(var(--ball-target, 2880deg)); }
}

.wheel-ring {
  position: absolute;
  inset: 37px;
  z-index: 1;
  border: 1px solid rgba(216, 181, 109, 0.21);
  border-radius: 50%;
}

.wheel-number {
  position: absolute;
  top: calc(50% - 5px);
  left: calc(50% - 8px);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 16px;
  height: 10px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.wheel-number.green-num {
  color: #a7e3c8;
}

.wheel-number.red-num {
  color: #ffd8d8;
}

.wheel-center {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 93px;
  height: 93px;
  border: 3px solid rgba(216, 181, 109, 0.58);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(45, 62, 48, 0.9), rgba(9, 15, 10, 0.97));
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(0, 0, 0, 0.4), inset 0 0 18px rgba(216, 181, 109, 0.08);
}

.wheel-center span {
  color: var(--gold);
  font-size: 21px;
}

.wheel-center small,
.wheel-center strong {
  display: inline-block;
  margin: 2px 4px;
  line-height: 1;
}

.wheel-center small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.wheel-center strong {
  color: var(--gold-bright);
  font-size: 36px;
  font-family: var(--font-display);
}

.wheel-center b {
  color: rgba(216, 181, 109, 0.68);
  font-size: 8px;
  letter-spacing: 0.12em;
  line-height: 1.45;
  text-align: center;
}

.wheel-center small {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wheel-center strong {
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 0 20px rgba(216, 181, 109, 0.25);
}

.wheel-copy {
  max-width: 300px;
}

.wheel-copy p {
  margin: 14px 0 19px;
  color: #bdc0b4;
  font-family: var(--font-display);
  font-size: 18px;
  font-style: italic;
  line-height: 1.35;
}

.wheel-timer {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.wheel-timer > span {
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 35px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.wheel-timer small {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.felt-board-wrap {
  padding: 17px;
  border: 1px solid rgba(216, 181, 109, 0.16);
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 50%, rgba(22, 91, 69, 0.16), transparent 75%),
    linear-gradient(145deg, rgba(12, 53, 40, 0.92), rgba(5, 25, 19, 0.96));
  box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.28);
  overflow-x: auto;
}

.roulette-board {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  max-width: 980px;
  min-width: 700px;
  aspect-ratio: 14 / 5;
  margin: 0 auto;
  padding: 2px;
}

.roulette-board button {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.16);
  color: #f0ebdf;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: filter 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.roulette-board button:hover {
  filter: brightness(1.2);
  z-index: 2;
}

.roulette-board button.has-bet {
  box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.roulette-zero {
  grid-column: 1;
  grid-row: 1 / span 3;
  background: linear-gradient(145deg, #0b6849, #084d37) !important;
  font-family: var(--font-display);
  font-size: 19px !important;
}

.roulette-number.red,
.outside-red {
  background: linear-gradient(145deg, #9e313a, #701f27) !important;
}

.roulette-number.black,
.outside-black {
  background: linear-gradient(145deg, #232323, #121212) !important;
}

.roulette-outside,
.roulette-column {
  color: rgba(245, 240, 228, 0.86) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roulette-column {
  background: linear-gradient(145deg, #1c2f23, #0c170f) !important;
}

.num-badge {
  position: relative;
  z-index: 1;
}

.board-bet {
  position: absolute;
  right: -7px;
  bottom: -7px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px dashed rgba(0, 0, 0, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #f6e6ad, #d8b56d 58%, #a67c3a 100%);
  color: #231a09;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

.board-bet.draft-badge {
  border-color: rgba(6, 40, 30, 0.4);
  background: radial-gradient(circle at 35% 28%, #b8f0d3, #6fce9f 58%, #2c956a 100%);
}

.corner-zone {
  position: absolute;
  right: -8px;
  bottom: -8px;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
}

.corner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(216, 181, 109, 0);
  box-shadow: 0 0 0 1px rgba(216, 181, 109, 0);
  transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.corner-zone:hover .corner-dot {
  background: rgba(242, 220, 159, 0.92);
  box-shadow: 0 0 0 2px rgba(216, 181, 109, 0.35), 0 0 10px rgba(216, 181, 109, 0.7);
  transform: scale(1.15);
}

.corner-zone .board-bet {
  right: 50%;
  bottom: 50%;
  transform: translate(50%, 50%);
}

.board-hint {
  margin: 11px 1px 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.roulette-dock {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.dock-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.chip-bank .chip-row {
  margin: 0;
}

.draft-panel {
  min-width: 0;
  padding-left: 19px;
  border-left: 1px solid var(--line);
}

.draft-panel > p {
  margin: 0 0 8px;
  font-size: 10px;
}

.draft-bets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 48px;
  overflow-y: auto;
  margin-bottom: 7px;
}

.draft-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border: 1px solid rgba(147, 213, 180, 0.2);
  border-radius: 5px;
  background: rgba(147, 213, 180, 0.07);
  color: #a8d9c0;
  font-size: 8px;
}

.draft-chip button {
  padding: 0 1px;
  border: 0;
  background: transparent;
  color: #a8d9c0;
  font-size: 11px;
  cursor: pointer;
}

.draft-total {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.draft-total span {
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.draft-total strong {
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
}

.draft-total small {
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.draft-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.draft-actions .button {
  min-height: 38px;
  font-size: 12px;
}

.my-bets-list {
  display: flex;
  flex-direction: column;
}

.my-bet-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 10px;
}

.my-bet-row:last-child {
  border-bottom: 0;
}

.my-bet-row b {
  color: #d8d3c6;
  font-weight: 600;
}

.result-number {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 22px;
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.result-number.mini-red { background: #8e2d36; }
.result-number.mini-black { background: #1c1c1c; }
.result-number.mini-green { background: #0b5e43; }

/* ---------------- plinko ---------------- */

.plinko-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 322px;
  gap: 20px;
  align-items: start;
}

.plinko-main {
  min-width: 0;
}

.plinko-card {
  padding: 22px;
}

.plinko-board-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}

.plinko-board {
  position: relative;
  width: 100%;
  min-width: 520px;
  height: 440px;
  border: 1px solid rgba(216, 181, 109, 0.16);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 6%, rgba(30, 137, 102, 0.22), transparent 42%),
    linear-gradient(160deg, rgba(9, 36, 27, 0.96), rgba(5, 18, 13, 0.98));
  box-shadow: inset 0 0 45px rgba(0, 0, 0, 0.4);
}

.plinko-peg {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f4e4b1, #d8b56d 60%, #8c6a2c);
  box-shadow: 0 0 8px rgba(216, 181, 109, 0.38);
}

.plinko-ball {
  position: absolute;
  top: 8%;
  left: 50%;
  z-index: 5;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff, #e6e2d6 45%, #9c988c 75%, #5b5850 100%);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 255, 255, 0.28);
  opacity: 0;
  pointer-events: none;
}

.plinko-ball.falling {
  opacity: 1;
}

.plinko-buckets {
  position: absolute;
  right: 8px;
  bottom: 12px;
  left: 8px;
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 3px;
}

.plinko-bucket {
  display: grid;
  place-items: center;
  height: 38px;
  border-radius: 6px;
  color: #f6efdd;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.plinko-bucket.win {
  background: linear-gradient(160deg, #1a7a5b, #0c4634);
  border: 1px solid rgba(126, 224, 180, 0.3);
}

.plinko-bucket.lose {
  background: linear-gradient(160deg, #3a2326, #201416);
  border: 1px solid rgba(190, 74, 83, 0.26);
  color: rgba(246, 239, 221, 0.72);
}

.plinko-bucket.hit {
  transform: translateY(-4px) scale(1.05);
  filter: brightness(1.35);
  box-shadow: 0 0 18px rgba(216, 181, 109, 0.65);
}

.risk-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 15px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}

.risk-tabs button {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 160ms ease;
}

.risk-tabs button:hover {
  color: var(--ink);
}

.risk-tabs button.active {
  background: rgba(216, 181, 109, 0.12);
  color: var(--gold-bright);
  box-shadow: inset 0 0 0 1px rgba(216, 181, 109, 0.16);
}

.plinko-payouts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.plinko-payouts span {
  padding: 3px 7px;
  border: 1px solid rgba(216, 181, 109, 0.16);
  border-radius: 6px;
  background: rgba(216, 181, 109, 0.05);
  color: var(--gold-bright);
  font-size: 9px;
  font-weight: 700;
}

.plinko-history li span:last-child {
  font-variant-numeric: tabular-nums;
}

/* ---------------- admin ---------------- */

.admin-page {
  width: min(1260px, calc(100% - 40px));
  margin: 0 auto;
  padding: 43px 0 70px;
}

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.admin-head h1 {
  margin: 9px 0 5px;
  font-family: var(--font-display);
  font-size: clamp(39px, 5vw, 60px);
  font-weight: 500;
  letter-spacing: -0.045em;
}

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

.vault-stats {
  display: flex;
  gap: 8px;
}

.vault-stats > div {
  min-width: 105px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}

.vault-stats span {
  display: block;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.vault-stats strong {
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
}

.admin-grid {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.grant-card {
  border-color: rgba(216, 181, 109, 0.24);
  background:
    radial-gradient(circle at 90% 0%, rgba(216, 181, 109, 0.12), transparent 45%),
    linear-gradient(145deg, rgba(28, 34, 24, 0.97), rgba(13, 18, 13, 0.98));
}

.grant-card .panel-heading {
  margin-bottom: 5px;
}

.grant-amount-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-amounts {
  display: flex;
  gap: 5px;
}

.quick-amounts button {
  flex: 1;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}

.quick-amounts button:hover {
  border-color: rgba(216, 181, 109, 0.32);
  color: var(--gold);
}

.grant-card .button {
  margin-top: 20px;
}

.vault-footnote {
  margin: 16px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.6;
}

.players-card {
  min-width: 0;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  margin-bottom: 12px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.22);
}

.search-wrap span {
  color: var(--gold);
  font-size: 16px;
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}

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

.players-table {
  width: 100%;
  border-collapse: collapse;
}

.players-table th {
  padding: 0 10px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.players-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 11px;
}

.players-table tr:last-child td {
  border-bottom: 0;
}

.players-table tr[hidden] {
  display: none;
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.small-avatar {
  width: 28px;
  height: 28px;
  font-size: 8px;
}

.host-tag {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 4px;
  border: 1px solid rgba(216, 181, 109, 0.25);
  border-radius: 3px;
  color: var(--gold);
  font-size: 6px;
  letter-spacing: 0.08em;
  vertical-align: 1px;
}

.stack-cell {
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}

.fund-button {
  white-space: nowrap;
}

.player-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.reset-button {
  white-space: nowrap;
}

.reset-button:hover {
  border-color: rgba(190, 74, 83, 0.45);
  color: #f0c5c8;
}

.ledger-card {
  margin-top: 16px;
}

.rig-card {
  margin-top: 16px;
  border-color: rgba(190, 74, 83, 0.28);
  background:
    radial-gradient(circle at 88% 0%, rgba(190, 74, 83, 0.14), transparent 46%),
    linear-gradient(145deg, rgba(30, 24, 24, 0.97), rgba(15, 13, 13, 0.98));
}

.rig-copy {
  margin: 0 0 14px;
  max-width: 620px;
  line-height: 1.6;
}

.rig-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rig-input {
  width: 110px;
}

.rig-controls .button {
  margin-top: 0;
}

.rig-status {
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.rig-status.armed {
  color: #f0c5c8;
}

.rig-status strong {
  color: var(--gold-bright);
  font-size: 13px;
}

.ledger-list {
  display: flex;
  flex-direction: column;
}

.ledger-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ledger-row:last-child {
  border-bottom: 0;
}

.ledger-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(100, 200, 151, 0.2);
  border-radius: 50%;
  background: rgba(100, 200, 151, 0.07);
  color: #7dd6a9;
  font-size: 14px;
}

.ledger-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.ledger-main strong {
  font-size: 11px;
  font-weight: 600;
}

.ledger-main span {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ledger-meta b {
  color: #7dd6a9;
  font-size: 11px;
  font-weight: 650;
}

.ledger-meta span {
  color: var(--muted-2);
  font-size: 8px;
}

/* ---------------- loading & toasts ---------------- */

.room-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--muted);
}

.room-loading p {
  margin-top: 15px;
  font-family: var(--font-display);
  font-size: 16px;
  font-style: italic;
}

#toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: min(360px, calc(100% - 40px));
  pointer-events: none;
}

.toast {
  max-width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(15, 21, 16, 0.95);
  color: #e3ded0;
  font-size: 12px;
  box-shadow: 0 13px 35px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: 200ms ease;
  backdrop-filter: blur(15px);
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-color: rgba(100, 200, 151, 0.32);
}

.toast-error {
  border-color: rgba(190, 74, 83, 0.42);
  color: #f0c5c8;
}

.toast-info {
  border-color: rgba(216, 181, 109, 0.3);
}

/* ---------------- responsive ---------------- */

@media (max-width: 1280px) {
  .auth-cards {
    display: none;
  }
}

@media (max-width: 1120px) {
  .bj-layout,
  .roulette-layout,
  .plinko-layout {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .side-panel .action-card {
    grid-row: span 2;
  }

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

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

  .lobby-hero {
    gap: 36px;
  }

  .wheel-panel {
    grid-template-columns: 280px 1fr;
    padding: 22px 28px;
  }

  .roulette-wheel-wrap {
    width: 260px;
    height: 260px;
    transform: scale(0.94);
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
  }

  .topbar-user {
    grid-column: 2;
    grid-row: 1;
  }

  .lobby-hero {
    grid-template-columns: 1fr;
  }

  .stack-card {
    max-width: 480px;
  }

  .room-grid {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-mobile-brand {
    display: block;
  }

  .auth-panel {
    min-height: 100vh;
  }

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

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .wheel-panel {
    grid-template-columns: 260px 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 10px 16px;
  }

  .brand-word {
    font-size: 20px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
    font-size: 17px;
  }

  .balance-pill {
    padding: 0 10px;
  }

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

  .avatar {
    display: none;
  }

  .main-nav {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .main-nav a {
    padding: 7px 12px;
    white-space: nowrap;
  }

  .lobby,
  .room-page,
  .admin-page {
    width: calc(100% - 28px);
  }

  .lobby {
    padding-top: 29px;
  }

  .hero-copy h1 {
    font-size: clamp(43px, 13vw, 62px);
  }

  .hero-stats {
    gap: 24px;
  }

  .lobby-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading h2 {
    font-size: 29px;
  }

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

  .room-head-left {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .room-head-right {
    flex-wrap: wrap;
  }

  .bj-layout {
    gap: 14px;
  }

  .table-felt {
    min-height: 550px;
    padding: 24px 15px 17px;
    border-radius: 80px 80px 20px 20px;
  }

  .table-felt::before {
    border-radius: 65px 65px 14px 14px;
  }

  .playing-card {
    width: 61px;
    height: 88px;
  }

  .hand-seat {
    width: 195px;
  }

  .hand-seat .playing-card {
    width: 51px;
    height: 74px;
  }

  .hand-seat .card-suit {
    font-size: 20px;
  }

  .side-panel,
  .roulette-side {
    grid-template-columns: 1fr;
  }

  .side-panel .action-card {
    grid-row: auto;
  }

  .wheel-panel {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 25px 18px;
    border-radius: 24px;
  }

  .wheel-copy {
    max-width: 420px;
    text-align: center;
  }

  .wheel-copy .phase-badge {
    margin-top: 6px;
  }

  .wheel-timer {
    justify-content: center;
  }

  .roulette-dock {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .draft-panel {
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .draft-actions {
    flex-direction: row;
  }

  .draft-actions .button {
    flex: 1;
  }

  .felt-board-wrap {
    margin-right: -14px;
    margin-left: -14px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

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

  .vault-stats > div {
    flex: 1;
  }

  .admin-head h1 {
    font-size: 44px;
  }

  .zero-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .zero-banner .button {
    margin-left: 61px;
  }
}

@media (max-width: 480px) {
  .topbar-user {
    gap: 6px;
  }

  .brand-word span {
    display: none;
  }

  .auth-panel {
    padding: 30px 20px;
  }

  .auth-panel h2 {
    font-size: 31px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-stats {
    justify-content: space-between;
    gap: 10px;
  }

  .stack-card {
    padding: 22px;
  }

  .room-card-body {
    padding: 17px;
  }

  .room-visual {
    height: 180px;
  }

  .seats {
    gap: 7px;
  }

  .hand-seat {
    width: 100%;
    min-width: 0;
  }

  .bet-seat {
    min-width: calc(50% - 4px);
    flex: 1;
  }

  .table-message {
    font-size: 12px;
  }

  .round-timer {
    min-width: 78px;
  }

  .players-table th:nth-child(3),
  .players-table td:nth-child(3) {
    display: none;
  }

  .vault-stats > div {
    min-width: calc(50% - 4px);
  }
}

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

/* ---------------- mines ---------------- */

.visual-mines {
  background:
    radial-gradient(circle at 50% 48%, rgba(190, 74, 83, 0.2), transparent 56%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px),
    linear-gradient(145deg, #221a1a, #0b0909);
}

.mini-mines {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 38px);
  gap: 9px;
}

.mini-mines i {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(216, 181, 109, 0.16);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(45, 40, 38, 0.95), rgba(16, 14, 13, 0.98));
}

.mini-mines i::after {
  font-size: 15px;
  line-height: 1;
}

.mini-mines i.is-gem { border-color: rgba(90, 190, 145, 0.4); }
.mini-mines i.is-gem::after { content: "◆"; color: #7fe0ac; }
.mini-mines i.is-mine { border-color: rgba(210, 100, 110, 0.4); }
.mini-mines i.is-mine::after { content: "✸"; color: #e0737c; }

.mines-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 322px;
  gap: 20px;
  align-items: start;
}

.mines-main {
  min-width: 0;
}

.mines-card {
  padding: 22px;
}

.mines-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.mines-card-head h2 {
  margin: 6px 0 5px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
}

.mines-card-head p {
  margin: 0;
}

.mines-stats {
  display: flex;
  gap: 9px;
}

.mines-stats > div {
  min-width: 86px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.mines-stats span {
  display: block;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mines-stats strong {
  display: block;
  margin-top: 3px;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}

.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.mine-tile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid rgba(216, 181, 109, 0.16);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(34, 33, 29, 0.96), rgba(12, 14, 11, 0.99));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 6px 14px rgba(0, 0, 0, 0.25);
  cursor: default;
  opacity: 1;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.mine-tile.playable {
  cursor: pointer;
}

.mine-tile.playable:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 181, 109, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px rgba(0, 0, 0, 0.36);
}

.mine-tile .mine-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(216, 181, 109, 0.26);
  box-shadow: 0 0 8px rgba(216, 181, 109, 0.16);
}

.mine-tile.safe {
  border-color: rgba(90, 190, 145, 0.4);
  background:
    radial-gradient(circle at 50% 42%, rgba(50, 150, 108, 0.45), transparent 72%),
    linear-gradient(160deg, rgba(18, 44, 34, 0.98), rgba(8, 20, 15, 0.99));
}

.mine-gem {
  color: #7fe0ac;
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1;
  text-shadow: 0 0 14px rgba(100, 230, 160, 0.5);
}

.mine-tile.mine {
  border-color: rgba(210, 100, 110, 0.46);
  background:
    radial-gradient(circle at 50% 45%, rgba(190, 74, 83, 0.42), transparent 72%),
    linear-gradient(160deg, rgba(48, 22, 24, 0.98), rgba(18, 10, 11, 0.99));
}

.mine-tile.mine.hit {
  border-color: rgba(240, 120, 130, 0.75);
  box-shadow: 0 0 18px rgba(190, 74, 83, 0.45);
}

.mine-bomb {
  color: #f0929a;
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1;
  text-shadow: 0 0 14px rgba(240, 100, 110, 0.5);
}

.mine-tile.dead {
  opacity: 0.34;
}

.mines-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mines-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mines-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.mines-legend .legend-gem {
  border-color: rgba(90, 190, 145, 0.5);
  background: rgba(50, 150, 108, 0.45);
}

.mines-legend .legend-mine {
  border-color: rgba(210, 100, 110, 0.5);
  background: rgba(190, 74, 83, 0.45);
}

.mines-live {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mines-live div {
  flex: 1;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
}

.mines-live span {
  display: block;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mines-live strong {
  display: block;
  margin-top: 3px;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}

.mines-cashout {
  background: linear-gradient(135deg, #2f8f68, #1c6b4d) !important;
  border-color: rgba(120, 220, 170, 0.3) !important;
}

.mines-result {
  margin-bottom: 16px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.mines-result strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}

.mines-result p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.mines-result.won {
  border-color: rgba(90, 190, 145, 0.32);
  background: rgba(50, 150, 108, 0.08);
}

.mines-result.won strong {
  color: #7fe0ac;
}

.mines-result.lost {
  border-color: rgba(190, 74, 83, 0.32);
  background: rgba(190, 74, 83, 0.08);
}

.mines-result.lost strong {
  color: #f0929a;
}

.mines-chip-row,
.mines-count-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 9px;
}

.mines-chip-row {
  margin-top: 10px;
}

.mines-count-row {
  margin-top: 4px;
}

.mines-chip,
.mines-count {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}

.mines-count {
  flex: 1;
  padding: 9px 6px;
  font-size: 12px;
}

.mines-chip:hover,
.mines-count:hover {
  border-color: rgba(216, 181, 109, 0.32);
  color: var(--gold);
}

.mines-chip.selected,
.mines-count.selected {
  border-color: rgba(216, 181, 109, 0.5);
  background: rgba(216, 181, 109, 0.12);
  color: var(--gold-bright);
}

.mines-players {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mines-players li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.015);
}

.mines-players li.is-live {
  border-color: rgba(216, 181, 109, 0.28);
}

.mines-players div {
  flex: 1;
  min-width: 0;
}

.mines-players strong {
  display: block;
  overflow: hidden;
  color: #ccc6b6;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mines-players small {
  display: block;
  color: var(--muted-2);
  font-size: 8px;
}

.mines-player-status {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-align: right;
  text-transform: uppercase;
}

.mines-history li > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mines-history small {
  color: var(--muted-2);
  font-size: 8px;
}

@media (max-width: 1000px) {
  .mines-layout {
    grid-template-columns: 1fr;
  }

  .mines-grid {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .mines-card {
    padding: 14px;
  }

  .mines-grid {
    gap: 6px;
  }

  .mines-stats {
    width: 100%;
  }

  .mines-stats > div {
    flex: 1;
    min-width: 0;
  }
}
