:root {
  color-scheme: dark;
  --ink: #07110d;
  --ink-soft: #0d1c15;
  --felt: #07502f;
  --felt-deep: #032d1b;
  --gold: #e6bd68;
  --gold-bright: #ffe3a0;
  --gold-dim: #9b6c27;
  --ivory: #f6ecd7;
  --muted: #aaae9e;
  --danger: #ef8f79;
  --wood: #49170d;
  --shadow: rgba(0, 0, 0, 0.55);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overscroll-behavior: none;
}

body {
  min-height: 100dvh;
  overflow: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at 50% 35%, rgba(52, 92, 64, 0.24), transparent 34%),
    radial-gradient(circle at 50% 115%, rgba(125, 57, 26, 0.18), transparent 40%),
    #020504;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.ambient-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    repeating-linear-gradient(104deg, transparent 0 3px, rgba(255, 255, 255, 0.018) 4px, transparent 5px 9px),
    repeating-radial-gradient(circle at 30% 30%, transparent 0 2px, rgba(255, 255, 255, 0.025) 3px, transparent 4px 8px);
  mix-blend-mode: screen;
}

.device-stage {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 26px;
}

.phone-shell {
  position: relative;
  width: min(390px, calc(100vw - 32px));
  height: min(800px, calc(100dvh - 32px));
  padding: 11px;
  border: 1px solid #765232;
  border-radius: 48px;
  background:
    linear-gradient(115deg, #161513, #060706 38%, #3b3025 51%, #090a09 62%, #111210),
    #090a09;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.8),
    0 0 0 2px #020302,
    inset 0 0 0 2px rgba(225, 180, 102, 0.28),
    inset 0 0 0 5px #090a09;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1), height 0.7s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.7s ease;
}

.phone-shell::after {
  content: "";
  position: absolute;
  inset: 5px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: inherit;
}

.phone-shell.is-game {
  width: min(1180px, calc(100vw - 34px));
  height: min(610px, calc(100dvh - 34px));
  border-radius: 38px;
}

.phone-speaker {
  position: absolute;
  z-index: 20;
  top: 19px;
  left: 50%;
  width: 68px;
  height: 5px;
  border-radius: 10px;
  background: #020302;
  transform: translateX(-50%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.phone-camera {
  position: absolute;
  z-index: 20;
  top: 18px;
  left: calc(50% + 46px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #08111a;
  box-shadow: inset 0 0 0 2px #020302, 0 0 3px #1b4164;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: var(--ink);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.75);
}

.is-game .phone-screen {
  border-radius: 28px;
}

.device-status {
  position: absolute;
  z-index: 15;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 34px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 0;
  color: rgba(245, 231, 201, 0.75);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.is-game .device-status {
  display: none;
}

.status-brand {
  color: rgba(230, 189, 104, 0.76);
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: 0.2em;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
}

.screen.is-active {
  display: flex;
}

.screen-splash,
.screen-setup {
  flex-direction: column;
  padding-top: 34px;
  background:
    linear-gradient(rgba(1, 20, 11, 0.85), rgba(2, 9, 6, 0.97)),
    radial-gradient(circle at 50% 22%, #145f38, #04130c 55%);
}

.splash-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image:
    linear-gradient(30deg, transparent 44%, rgba(230, 189, 104, 0.12) 45% 46%, transparent 47%),
    linear-gradient(-30deg, transparent 44%, rgba(230, 189, 104, 0.08) 45% 46%, transparent 47%);
  background-size: 38px 66px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px 26px;
  text-align: center;
}

.brand-crest {
  display: grid;
  width: 116px;
  height: 116px;
  margin-bottom: 30px;
  place-items: center;
  border: 1px solid rgba(230, 189, 104, 0.46);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 189, 104, 0.12), transparent 68%);
  box-shadow: 0 0 0 7px rgba(230, 189, 104, 0.03), 0 18px 50px rgba(0, 0, 0, 0.38);
}

.brand-crest::before,
.brand-crest::after {
  content: "◆";
  position: absolute;
  color: var(--gold-dim);
  font-size: 8px;
}

.brand-crest::before {
  transform: translateY(-65px);
}

.brand-crest::after {
  transform: translateY(65px);
}

.brand-crest span {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 64px;
  line-height: 1;
  filter: drop-shadow(0 5px 2px rgba(0, 0, 0, 0.45));
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--gold);
  font-family: ui-sans-serif, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 13px;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(43px, 12vw, 55px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

h1 span {
  color: var(--gold);
  font-size: 0.42em;
  font-style: italic;
  letter-spacing: 0;
}

.gold-rule {
  display: flex;
  width: 220px;
  align-items: center;
  gap: 10px;
  margin: 0 auto 22px;
  color: var(--gold-dim);
  font-size: 8px;
}

.gold-rule i {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dim));
}

.gold-rule i:last-child {
  background: linear-gradient(to left, transparent, var(--gold-dim));
}

.lede {
  max-width: 292px;
  margin-bottom: 29px;
  color: #c8c8b9;
  font-family: Georgia, serif;
  font-size: 14px;
  line-height: 1.65;
}

.fine-print {
  margin: 18px 0 0;
  color: #748076;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.button {
  min-height: 44px;
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  padding: 0 18px;
  color: var(--gold-bright);
  background: rgba(10, 30, 20, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 236, 184, 0.08), 0 8px 24px rgba(0, 0, 0, 0.25);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  border-color: var(--gold-bright);
  outline: none;
  filter: brightness(1.12);
}

.button-primary {
  color: #23180b;
  background: linear-gradient(145deg, #ffe3a0, #c28a33 58%, #f6ce79);
  text-shadow: 0 1px rgba(255, 255, 255, 0.4);
}

.button-secondary {
  color: #d9c492;
  background: rgba(4, 17, 11, 0.76);
}

.button-wide {
  width: 100%;
  max-width: 275px;
}

.button-small {
  min-height: 34px;
  padding-inline: 11px;
  font-size: 9px;
}

.setup-header {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(230, 189, 104, 0.18);
  background: rgba(2, 12, 7, 0.76);
}

.setup-header h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 400;
}

.setup-header .eyebrow {
  margin-bottom: 3px;
  font-size: 7px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  color: var(--gold);
  background: transparent;
  font-family: Georgia, serif;
  font-size: 31px;
  cursor: pointer;
}

.mini-crest {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(230, 189, 104, 0.4);
  border-radius: 50%;
  color: var(--gold);
}

.setup-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 26px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}

.field-label {
  display: block;
  margin: 0 0 7px;
  color: #b6a579;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.text-input,
.join-panel input {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(230, 189, 104, 0.3);
  border-radius: 4px;
  padding: 0 12px;
  outline: none;
  color: var(--ivory);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.3);
}

.text-input:focus,
.join-panel input:focus,
.seat-choice:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(230, 189, 104, 0.1);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 21px 0 10px;
}

.section-heading .field-label {
  margin-bottom: 3px;
}

.section-heading p {
  margin: 0;
  color: #879188;
  font-size: 9px;
  line-height: 1.35;
}

.seat-count {
  flex: 0 0 auto;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 11px;
}

.seat-grid {
  display: grid;
  gap: 8px;
}

.seat-choice {
  display: grid;
  min-height: 58px;
  grid-template-columns: 34px 1fr 118px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(230, 189, 104, 0.17);
  border-radius: 5px;
  padding: 8px 9px;
  background: linear-gradient(105deg, rgba(21, 68, 42, 0.54), rgba(0, 0, 0, 0.24));
}

.seat-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(230, 189, 104, 0.36);
  border-radius: 50%;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 10px;
}

.seat-copy {
  display: grid;
  min-width: 0;
}

.seat-copy b {
  overflow: hidden;
  color: #e3dac3;
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-copy small {
  color: #738078;
  font-size: 8px;
}

.seat-choice select {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(230, 189, 104, 0.22);
  border-radius: 3px;
  padding: 0 7px;
  outline: none;
  color: #e2d8c0;
  background: #0b2116;
  font-size: 9px;
}

.setup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 15px;
}

.setup-actions .button-primary {
  grid-column: 1 / -1;
}

.join-panel {
  display: grid;
  grid-template-columns: 18px 1fr 70px 50px;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  border-top: 1px solid rgba(230, 189, 104, 0.18);
  padding-top: 17px;
}

.join-panel .ornament {
  color: var(--gold-dim);
  font-size: 8px;
}

.join-panel div {
  display: grid;
}

.join-panel b {
  font-family: Georgia, serif;
  font-size: 10px;
  font-weight: 400;
}

.join-panel small {
  color: #78837c;
  font-size: 7px;
}

.join-panel input {
  height: 34px;
  padding: 0 6px;
  text-align: center;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.screen-game {
  flex-direction: column;
  background: #020604;
}

.game-chrome {
  z-index: 7;
  display: grid;
  height: 44px;
  flex: 0 0 44px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(230, 189, 104, 0.35);
  background: linear-gradient(to bottom, #22150e, #080b08 80%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.42);
}

.game-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--gold);
}

.game-brand span {
  font-family: Georgia, serif;
  font-size: 21px;
}

.game-brand b {
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.game-brand i {
  font-size: 0.62em;
  font-weight: 400;
}

.room-pill {
  color: #807a69;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.room-pill button {
  margin-left: 5px;
  border: 0;
  padding: 6px 9px;
  border-radius: 20px;
  color: var(--gold-bright);
  background: rgba(230, 189, 104, 0.1);
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.leave-button {
  justify-self: end;
  border: 0;
  color: #998e75;
  background: transparent;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.table-scene {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background-color: #04361f;
  background-image: url("/assets/table-backdrop.png");
  background-position: center;
  background-size: 100% 100%;
}

.table-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.42), transparent 17%, transparent 73%, rgba(0, 0, 0, 0.18)),
    radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.32));
}

.dealer-zone {
  position: absolute;
  z-index: 3;
  top: 7%;
  left: 50%;
  display: flex;
  min-width: 210px;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
}

.dealer-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--gold);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.dealer-label span {
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.dealer-label b {
  color: var(--ivory);
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 400;
}

.hand {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: center;
}

.playing-card {
  position: relative;
  display: block;
  width: 42px;
  height: 59px;
  flex: 0 0 42px;
  margin-left: -15px;
  overflow: hidden;
  border: 1px solid #e9deca;
  border-radius: 4px;
  color: #141310;
  background: linear-gradient(145deg, #fffef5, #d9d0bd);
  box-shadow: 0 5px 9px rgba(0, 0, 0, 0.42);
  transform: rotate(calc((var(--card-index) - 1) * 1.5deg));
}

.playing-card:first-child {
  margin-left: 0;
}

.playing-card.is-red {
  color: #9e251f;
}

.card-corner {
  position: absolute;
  top: 3px;
  left: 4px;
  display: grid;
  justify-items: center;
  line-height: 0.9;
}

.card-corner b {
  font-family: Georgia, serif;
  font-size: 11px;
}

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

.card-suit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 8px;
  font-family: Georgia, serif;
  font-size: 22px;
}

.playing-card.is-hidden {
  display: grid;
  place-items: center;
  border: 2px solid #d4ae61;
  color: #d4ae61;
  background:
    repeating-linear-gradient(45deg, transparent 0 4px, rgba(230, 189, 104, 0.26) 5px 6px),
    #35140e;
  box-shadow: inset 0 0 0 2px #1c0806, 0 5px 9px rgba(0, 0, 0, 0.42);
}

.playing-card.is-hidden span {
  display: grid;
  width: 23px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(230, 189, 104, 0.6);
  font-size: 15px;
}

.outcome {
  display: block;
  min-height: 12px;
  margin-top: 1px;
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 8px;
  font-style: italic;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.table-inscription {
  position: absolute;
  z-index: 1;
  top: 43%;
  left: 50%;
  display: grid;
  justify-items: center;
  color: rgba(230, 189, 104, 0.68);
  font-family: Georgia, serif;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -50%);
}

.table-inscription span {
  padding: 5px 36px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  font-size: clamp(8px, 1.15vw, 13px);
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.table-inscription i {
  margin-top: 5px;
  color: rgba(245, 237, 215, 0.58);
  font-size: clamp(6px, 0.8vw, 9px);
  letter-spacing: 0.16em;
}

.seat {
  position: absolute;
  z-index: 4;
  width: 158px;
  min-height: 82px;
  transform: translate(-50%, -50%);
}

.seat-0 {
  top: 45%;
  left: 12%;
}

.seat-1 {
  top: 70%;
  left: 29%;
}

.seat-2 {
  top: 75%;
  left: 50%;
}

.seat-3 {
  top: 70%;
  left: 71%;
}

.seat-4 {
  top: 45%;
  left: 88%;
}

.player-seat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.seat-meta {
  display: flex;
  min-width: 120px;
  max-width: 158px;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(230, 189, 104, 0.36);
  border-radius: 20px;
  padding: 3px 7px 3px 3px;
  background: linear-gradient(100deg, rgba(2, 10, 6, 0.94), rgba(6, 31, 18, 0.88));
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.38);
}

.player-seat.is-active .seat-meta {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 2px rgba(230, 189, 104, 0.18), 0 0 18px rgba(230, 189, 104, 0.25);
}

.player-seat.is-you .seat-meta {
  background: linear-gradient(100deg, rgba(58, 27, 12, 0.96), rgba(12, 43, 25, 0.92));
}

.avatar {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  color: var(--gold-bright);
  background: #3b180f;
  font-family: Georgia, serif;
  font-size: 9px;
}

.avatar.is-cpu {
  color: #bcdbc8;
  background: #0d3b26;
  font-size: 7px;
}

.player-copy {
  display: grid;
  min-width: 0;
  flex: 1;
}

.player-copy b {
  overflow: hidden;
  color: #eee4cf;
  font-family: Georgia, serif;
  font-size: 9px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-copy small {
  color: #9e997e;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.score-badge {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(230, 189, 104, 0.45);
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 8px;
}

.player-seat .hand {
  margin-top: -1px;
}

.empty-seat,
.open-seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(230, 189, 104, 0.45);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.empty-seat i,
.open-seat i {
  display: grid;
  width: 45px;
  height: 45px;
  margin-bottom: 4px;
  place-items: center;
  border: 1px dashed rgba(230, 189, 104, 0.3);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 17px;
  font-style: normal;
}

.open-seat i {
  border-style: solid;
  background: rgba(0, 0, 0, 0.14);
}

.table-status {
  position: absolute;
  z-index: 8;
  bottom: 1.5%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(230, 189, 104, 0.3);
  border-radius: 20px;
  padding: 5px 13px;
  color: #e9e1cc;
  background: rgba(2, 12, 7, 0.82);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  font-size: 8px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.table-status b {
  font-family: Georgia, serif;
  font-weight: 400;
}

.status-diamond {
  color: var(--gold-dim);
  font-size: 6px;
}

.control-deck {
  position: relative;
  z-index: 8;
  display: grid;
  height: 72px;
  flex: 0 0 72px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 4px 22px;
  border-top: 1px solid rgba(230, 189, 104, 0.35);
  background:
    linear-gradient(to bottom, rgba(90, 41, 17, 0.76), rgba(11, 8, 6, 0.98)),
    #100a07;
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.4);
}

.bet-controls,
.action-controls,
.deal-button,
.waiting-copy {
  display: none;
}

.bet-controls.is-visible,
.action-controls.is-visible {
  display: flex;
}

.deal-button.is-visible,
.waiting-copy.is-visible {
  display: grid;
}

.bet-controls {
  align-items: center;
  gap: 7px;
}

.control-label {
  margin-right: 4px;
  color: #968a70;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chip {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 4px dashed rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  color: white;
  background: #9b2624;
  box-shadow: 0 3px 0 #3b0b0b, 0 5px 10px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(0, 0, 0, 0.3);
  font-family: Georgia, serif;
  font-size: 8px;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.chip span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

.chip:hover,
.chip.is-selected {
  filter: brightness(1.25);
  transform: translateY(-4px);
}

.chip-25 {
  background: #268056;
  box-shadow: 0 3px 0 #0d3924, 0 5px 10px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(0, 0, 0, 0.3);
}

.chip-100 {
  background: #942d2a;
}

.chip-500 {
  background: #263d81;
  box-shadow: 0 3px 0 #10183f, 0 5px 10px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(0, 0, 0, 0.3);
}

.chip-1000 {
  background: #191c1b;
  box-shadow: 0 3px 0 #030403, 0 5px 10px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(230, 189, 104, 0.28);
}

.action-controls {
  grid-column: 2;
  gap: 8px;
}

.game-action {
  min-width: 78px;
  height: 40px;
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  color: var(--gold-bright);
  background: linear-gradient(#173b27, #07150e);
  box-shadow: inset 0 0 0 1px rgba(255, 238, 186, 0.08), 0 4px 10px rgba(0, 0, 0, 0.3);
  font-family: Georgia, serif;
  font-size: 12px;
  cursor: pointer;
}

.game-action:hover {
  border-color: var(--gold-bright);
  filter: brightness(1.16);
}

.game-action:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.deal-button {
  grid-column: 2;
  grid-row: 1;
  min-width: 120px;
  height: 51px;
  place-content: center;
  border: 1px solid #ffe2a0;
  border-radius: 50%;
  color: #24160a;
  background: linear-gradient(145deg, #ffebad, #bc7f2c 68%, #f0c46e);
  box-shadow: 0 5px 0 #6d4119, 0 8px 16px rgba(0, 0, 0, 0.5), inset 0 1px rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.deal-button span {
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 1;
}

.deal-button small {
  margin-top: 2px;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.waiting-copy {
  grid-column: 2;
  place-items: center;
  color: #9b947e;
  font-family: Georgia, serif;
  font-size: 10px;
  font-style: italic;
}

.rotate-prompt {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 30px;
  text-align: center;
  background: rgba(2, 13, 8, 0.97);
}

.rotate-prompt b {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}

.rotate-prompt span {
  color: #9ea69e;
  font-size: 11px;
}

.rotate-phone {
  color: var(--gold);
  font-size: 48px;
  transform: rotate(90deg);
}

.toast {
  position: fixed;
  z-index: 100;
  bottom: 24px;
  left: 50%;
  max-width: min(360px, calc(100vw - 36px));
  border: 1px solid rgba(230, 189, 104, 0.42);
  border-radius: 4px;
  padding: 10px 15px;
  color: #eee1c4;
  background: rgba(4, 20, 12, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast[data-tone="error"] {
  border-color: rgba(239, 143, 121, 0.55);
  color: #ffd0c7;
}

@media (max-height: 720px) and (min-width: 901px) {
  .phone-shell:not(.is-game) {
    height: calc(100dvh - 20px);
  }

  .brand-crest {
    width: 92px;
    height: 92px;
    margin-bottom: 18px;
  }

  .brand-crest span {
    font-size: 52px;
  }
}

@media (max-width: 900px) {
  .device-stage {
    min-height: 100dvh;
    padding: 0;
  }

  .phone-shell,
  .phone-shell.is-game {
    width: 100vw;
    height: 100dvh;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #020504;
    box-shadow: none;
  }

  .phone-shell::after,
  .phone-speaker,
  .phone-camera {
    display: none;
  }

  .phone-screen,
  .is-game .phone-screen {
    border-radius: 0;
  }

  .screen-splash,
  .screen-setup {
    padding-top: max(24px, env(safe-area-inset-top));
  }

  .device-status {
    height: max(28px, env(safe-area-inset-top));
    padding-top: 5px;
  }

  .game-chrome {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .control-deck {
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: max(12px, env(safe-area-inset-left));
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  .screen-game.is-active .rotate-prompt {
    display: flex;
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  .game-chrome {
    height: 36px;
    flex-basis: 36px;
  }

  .control-deck {
    height: 62px;
    flex-basis: 62px;
  }

  .chip {
    width: 37px;
    height: 37px;
  }

  .chip span {
    width: 21px;
    height: 21px;
  }

  .playing-card {
    width: 35px;
    height: 49px;
    flex-basis: 35px;
    margin-left: -13px;
  }

  .hand {
    min-height: 50px;
  }

  .seat {
    width: 142px;
  }

  .dealer-zone {
    top: 4%;
  }

  .seat-0,
  .seat-4 {
    top: 44%;
  }

  .seat-1,
  .seat-3 {
    top: 68%;
  }

  .seat-2 {
    top: 72%;
  }

  .table-status {
    bottom: 1%;
  }
}

@media (max-width: 680px) and (orientation: landscape) {
  .game-brand b,
  .control-label,
  .table-inscription,
  .seat-0 .player-copy,
  .seat-4 .player-copy {
    display: none;
  }

  .seat-0,
  .seat-4 {
    width: 90px;
  }

  .game-action {
    min-width: 60px;
  }
}

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