:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #e8eee9;
  background: #101a1c;
  font-synthesis: none;
  color-scheme: dark;
  --muted: #8b9c96;
  --gold: #dcc08a;
  --line: #ffffff12;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  padding: 13px 20px;
  font-weight: 600;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  filter: brightness(1.14);
  transform: translateY(-1px);
}
button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}
input {
  width: 100%;
  border: 1px solid #ffffff20;
  border-radius: 8px;
  background: #121f21;
  padding: 13px;
  color: #fff;
  outline: none;
}
input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #dcc08a15;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.primary {
  background: var(--gold);
  color: #252c24;
}
.secondary {
  background: #293a3b;
  color: #e3ebe6;
  border: 1px solid #ffffff13;
}
.ghost {
  background: transparent;
  color: var(--muted);
}
.small {
  font-size: 12px;
  padding: 10px 14px;
}
.danger {
  background: #492b2d;
  color: #e3aaab;
}
.allin {
  color: var(--gold);
  background: #3a3426;
  border: 1px solid #7b6947;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-size: 30px;
}
.brand span {
  font-size: 14px;
  letter-spacing: 3px;
  color: #f0eee7;
  font-weight: 700;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold);
}
.welcome {
  max-width: 1200px;
  margin: auto;
  min-height: 100vh;
  position: relative;
  padding: 50px 55px;
  overflow: hidden;
}
.welcome > .eyebrow {
  margin-top: 100px;
}
.welcome h1 {
  font-size: 72px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -3px;
  margin: 22px 0;
}
.intro {
  color: #a1afa8;
  line-height: 1.9;
  font-size: 15px;
  max-width: 340px;
}
.welcome-tags {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}
.welcome-tags span {
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 30px;
  font-size: 11px;
  color: var(--muted);
}
.entry {
  position: absolute;
  right: 55px;
  top: 155px;
  width: 360px;
  padding: 30px;
  background: #1b292b;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 25px 80px #0004;
  z-index: 1;
}
.entry label {
  display: block;
  font-size: 12px;
  color: #abb8b2;
  margin-bottom: 18px;
}
.entry input {
  margin-top: 9px;
}
.entry button {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 18px;
}
.divider {
  text-align: center;
  color: #798d85;
  font-size: 11px;
  margin: 25px 0;
}
.hero-cards {
  display: flex;
  gap: 10px;
  position: absolute;
  bottom: 70px;
  left: 290px;
  transform: rotate(-12deg);
  opacity: 0.18;
  pointer-events: none;
}
.hero-cards .card {
  width: 100px;
  height: 140px;
  font-size: 38px;
}
.hero-cards .card:last-child {
  transform: rotate(24deg) translateY(12px);
}
footer {
  margin-top: 110px;
  font-size: 11px;
  color: #687d74;
  letter-spacing: 1px;
}
header {
  height: 82px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 38px;
  background: #142022;
}
header .brand {
  margin-right: auto;
}
.room-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 14px;
  align-items: center;
}
.room-label b {
  letter-spacing: 2px;
  color: #e6eee9;
}
.network {
  font-size: 10px;
  color: #81ae99;
}
.network.offline {
  color: #f99;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  max-width: 1600px;
  margin: auto;
  min-height: calc(100vh - 82px);
}
.table-section {
  padding: 26px 30px 30px;
  min-width: 0;
}
.table-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
}
.table-meta b {
  color: #d6e2db;
}
.table {
  position: relative;
  height: 530px;
  max-width: 1100px;
  margin: 18px auto 20px;
}
.felt-ring {
  position: absolute;
  inset: 63px 40px 58px;
  border-radius: 45%;
  background: radial-gradient(ellipse, #225e4e, #164439);
  border: 12px solid #253c36;
  box-shadow:
    0 0 0 2px #b3a16f2c,
    inset 0 0 0 2px #91ad7d22,
    inset 0 0 75px #081a1655,
    0 18px 40px #0004;
}
.felt-ring:after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid #abbf9926;
  border-radius: 45%;
}
.table-center {
  position: absolute;
  top: 160px;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  text-align: center;
}
.pot-label {
  font-size: 11px;
  color: #adc4b5;
  margin: 13px 0 18px;
}
.pot-label strong {
  font-size: 30px;
  color: #fbf4df;
  font-weight: 500;
  margin-left: 10px;
}
.board {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.card {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  width: 49px;
  height: 70px;
  padding: 6px 8px;
  background: #f4f1e7;
  color: #243936;
  border-radius: 6px;
  font-size: 21px;
  box-shadow: 0 3px 6px #0003;
  line-height: 1;
}
.card > b {
  font-weight: 650;
}
.card > span {
  align-self: flex-end;
}
.card.red {
  color: #b74447;
}
.card.back {
  background: repeating-linear-gradient(
    45deg,
    #263f4a,
    #263f4a 4px,
    #304c57 4px,
    #304c57 6px
  );
  color: #a9bcbc;
  border: 2px solid #d3dbd0;
  justify-content: center;
  align-items: center;
}
.card.placeholder {
  background: #0c342b35;
  border: 1px solid #b5c1a633;
  box-shadow: none;
}
.pot-detail {
  font-size: 10px;
  color: #b5c8b7;
  margin-top: 15px;
  line-height: 1.7;
}
.watermark {
  font-size: 10px;
  letter-spacing: 6px;
  color: #bdd0b625;
  margin-top: 20px;
}
.seat {
  position: absolute;
  width: 132px;
  text-align: center;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.seat-0 {
  left: 50%;
  top: 88%;
}
.seat-1 {
  left: 21%;
  top: 83%;
}
.seat-2 {
  left: 10%;
  top: 48%;
}
.seat-3 {
  left: 25%;
  top: 14%;
}
.seat-4 {
  left: 50%;
  top: 9%;
}
.seat-5 {
  left: 75%;
  top: 14%;
}
.seat-6 {
  left: 90%;
  top: 48%;
}
.seat-7 {
  left: 79%;
  top: 83%;
}
.player {
  display: flex;
  align-items: center;
  text-align: left;
  padding: 8px;
  gap: 8px;
  border-radius: 10px;
  background: #1b2b2c;
  border: 1px solid #4b5d5455;
  box-shadow: 0 4px 12px #0003;
  position: relative;
}
.player b {
  display: block;
  font-size: 11px;
  max-width: 86px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.player span {
  display: block;
  color: #c4bba3;
  font-size: 10px;
  margin-top: 4px;
}
.avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #3e554c;
  color: #cadbc9;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.self .avatar {
  background: #90794c;
  color: #fff1ce;
}
.active .player {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #dcc08a22;
}
.seat-status {
  color: #82998a;
  font-size: 10px;
  margin-top: 5px;
  min-height: 15px;
}
.active .seat-status {
  color: var(--gold);
}
.seat-cards {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 6px;
  height: 43px;
}
.seat-cards:empty {
  height: 0;
}
.seat-cards .card {
  height: 43px;
  width: 31px;
  font-size: 14px;
  padding: 4px;
}
.self .seat-cards .card {
  height: 59px;
  width: 42px;
  font-size: 18px;
}
.self .seat-cards {
  height: 59px;
}
.folded {
  opacity: 0.4;
}
.dealer {
  position: absolute;
  right: -9px;
  top: -9px;
  font-style: normal;
  background: var(--gold);
  color: #25362f;
  font-size: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid #182923;
}
.empty-seat {
  border: 1px dashed #819a8544;
  background: #172b2544;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  margin: auto;
  display: grid;
  place-items: center;
  color: #7e9a7955;
}
.empty-label {
  display: block;
  color: #72937e66;
  font-size: 10px;
  margin-top: 6px;
}
.controls {
  background: #1a292b;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 21px 24px;
  min-height: 115px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}
.controls h3 {
  font-weight: 500;
  font-size: 15px;
  margin: 0 0 8px;
}
.controls p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.buttons {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.buttons button {
  font-size: 12px;
}
.action-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  color: #b9c7bc;
  font-size: 12px;
}
.action-top b {
  color: var(--gold);
}
.raise-input {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.raise-input input {
  width: 95px;
  padding: 11px 8px;
}
.quick {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  font-size: 10px;
  color: var(--muted);
}
.quick span {
  margin-right: auto;
}
.quick button {
  font-size: 10px;
  padding: 5px 12px;
  background: #ffffff09;
  color: #bfcbbb;
}
.waiting-dot {
  font-size: 10px;
  color: #7baf94;
  letter-spacing: 2px;
}
aside {
  border-left: 1px solid var(--line);
  padding: 28px 22px;
  background: #142022;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.panel-heading span {
  color: #749986;
  font-size: 9px;
  letter-spacing: 2px;
}
.activity {
  margin-top: 20px;
  max-height: 300px;
  overflow: auto;
}
.activity > div {
  font-size: 11px;
  color: #a5b7ac;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
}
.rules {
  margin-top: 35px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.rules h4 {
  font-size: 11px;
  color: #c5cdbd;
}
.rules p,
.muted {
  font-size: 10px;
  color: #81978a;
  line-height: 1.8;
}
.results {
  margin-top: 22px;
}
.result {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.result small {
  font-size: 10px;
  color: #8da595;
}
.result p {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin: 9px 0;
}
.result strong {
  color: var(--gold);
}
.result > span {
  font-size: 10px;
  color: #93ac98;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #ece7d7;
  color: #23322b;
  padding: 14px 24px;
  border-radius: 10px;
  box-shadow: 0 5px 30px #0005;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 20;
  max-width: 90vw;
  font-size: 13px;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1450px) {
  .table {
    height: 590px;
  }
  .table-center {
    top: 185px;
  }
}
@media (max-width: 1100px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
  }
  .table-section {
    padding: 24px 18px;
  }
  .seat {
    width: 112px;
  }
  .avatar {
    display: none;
  }
  .player {
    justify-content: center;
  }
  .player b {
    max-width: 95px;
  }
  .felt-ring {
    inset: 63px 20px 58px;
  }
  .buttons {
    gap: 6px;
  }
  .buttons button {
    padding: 12px;
  }
  .controls {
    padding: 18px;
  }
  header {
    padding: 0 24px;
  }
  .welcome {
    padding: 35px;
  }
  .entry {
    right: 35px;
    width: 330px;
  }
  .welcome h1 {
    font-size: 58px;
  }
}
@media (max-width: 800px) {
  .welcome {
    padding: 28px 24px;
  }
  .welcome > .eyebrow {
    margin-top: 50px;
  }
  .welcome h1 {
    font-size: 48px;
    letter-spacing: -2px;
  }
  .entry {
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    max-width: 420px;
    margin-top: 32px;
    padding: 24px;
  }
  .hero-cards {
    display: none;
  }
  footer {
    margin-top: 30px;
  }
  .intro {
    max-width: 100%;
    font-size: 13px;
  }
  .game-layout {
    display: block;
  }
  header {
    height: 68px;
    padding: 0 14px;
    gap: 8px;
  }
  header .brand span {
    font-size: 10px;
    letter-spacing: 1px;
  }
  header .brand {
    font-size: 24px;
    gap: 6px;
  }
  .room-label {
    font-size: 0;
    gap: 0;
  }
  .room-label b {
    font-size: 10px;
  }
  .network {
    display: none;
  }
  .small {
    padding: 9px;
    font-size: 10px;
  }
  .table-section {
    padding: 20px 12px;
  }
  .table-meta {
    font-size: 8px;
    letter-spacing: 0;
  }
  .table {
    height: 550px;
    margin-top: 20px;
  }
  .felt-ring {
    inset: 45px 32px 50px;
    border-radius: 44%;
    border-width: 8px;
  }
  .table-center {
    top: 192px;
    width: 64%;
  }
  .board {
    gap: 4px;
  }
  .board .card {
    width: 36px;
    height: 53px;
    font-size: 17px;
    padding: 5px;
  }
  .pot-label strong {
    font-size: 25px;
  }
  .table-center .eyebrow {
    font-size: 9px;
  }
  .pot-detail {
    font-size: 9px;
  }
  .watermark {
    letter-spacing: 3px;
  }
  .seat {
    width: 92px;
  }
  .player {
    padding: 7px 5px;
  }
  .player b {
    font-size: 10px;
    max-width: 80px;
  }
  .player span {
    font-size: 9px;
  }
  .seat-status {
    font-size: 8px;
  }
  .seat-0 {
    left: 50%;
    top: 90%;
  }
  .seat-1 {
    left: 17%;
    top: 77%;
  }
  .seat-2 {
    left: 13%;
    top: 43%;
  }
  .seat-3 {
    left: 20%;
    top: 16%;
  }
  .seat-4 {
    left: 50%;
    top: 8%;
  }
  .seat-5 {
    left: 80%;
    top: 16%;
  }
  .seat-6 {
    left: 87%;
    top: 43%;
  }
  .seat-7 {
    left: 83%;
    top: 77%;
  }
  .seat-cards .card {
    width: 26px;
    height: 36px;
    font-size: 12px;
  }
  .seat-cards {
    height: 36px;
  }
  .controls {
    position: sticky;
    bottom: 8px;
    z-index: 5;
    box-shadow: 0 10px 25px #0007;
    padding: 14px;
    gap: 12px;
  }
  .buttons {
    width: 100%;
    gap: 7px;
  }
  .buttons button {
    flex: 1;
    padding: 11px 8px;
    font-size: 11px;
  }
  .raise-input {
    order: 1;
    flex: 1;
  }
  .raise-input input {
    flex: 1;
    width: 80px;
  }
  .allin {
    order: 2;
  }
  .action-top {
    font-size: 10px;
  }
  .quick {
    font-size: 9px;
    flex-wrap: wrap;
  }
  .quick span {
    width: 100%;
  }
  aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px;
  }
  .activity {
    max-height: 180px;
  }
  .rules {
    margin-top: 20px;
  }
}

/* Amounts on the felt are round contributions, not total hand contributions. */
.bet-marker {
  position: absolute;
  left: 50%;
  top: calc(100% + 9px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 26px auto;
  align-items: center;
  column-gap: 7px;
  min-width: 88px;
  padding: 7px 9px;
  border: 1px solid #dfc58966;
  border-radius: 10px;
  background: #102c25ed;
  box-shadow: 0 3px 10px #0004;
  color: #ffe2a5;
  white-space: nowrap;
}
.bet-marker strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.bet-marker small {
  grid-column: 2;
  font-size: 8px;
  color: #b7c6b5;
  margin-top: 2px;
}
.chip-stack {
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  padding-top: 5px;
}
.poker-chip {
  display: block;
  width: 24px;
  height: 12px;
  border-radius: 50%;
  border: 3px dashed #fff0c9;
  background: #b3904e;
  box-shadow: 0 2px 0 #6f512c;
  margin-top: -5px;
}
.seat-0 .bet-marker {
  top: -51px;
}
.seat-1 .bet-marker,
.seat-7 .bet-marker {
  top: -46px;
}
.seat-2 .bet-marker {
  left: calc(100% + 8px);
  top: 35%;
  transform: none;
}
.seat-6 .bet-marker {
  left: auto;
  right: calc(100% + 8px);
  top: 35%;
  transform: none;
}
.folded .bet-marker {
  opacity: 1;
}
.your-turn {
  border-color: #dcc08a;
  box-shadow: 0 0 0 3px #dcc08a18;
}
.turn-callout {
  color: #ffe0a1;
  font-weight: 700;
  font-size: 15px;
}
.your-turn .turn-callout {
  animation: turn-glow 1.6s ease-in-out 3;
}
@keyframes turn-glow {
  50% {
    text-shadow: 0 0 16px #f8d790;
  }
}
.raise-slider {
  width: 100%;
  padding-top: 5px;
}
.raise-slider label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #b9c7bc;
}
.raise-slider output {
  color: #ffe0a1;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#raise-cost {
  margin-left: auto;
  font-size: 11px;
  color: #91ad9f;
}
#raise-range {
  width: 100%;
  height: 30px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  accent-color: #dcc08a;
  cursor: pointer;
  box-shadow: none;
}
#raise-range:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.range-limits {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #8b9c96;
}
@media (prefers-reduced-motion: reduce) {
  .your-turn .turn-callout {
    animation: none;
  }
}
@media (max-width: 800px) {
  .bet-marker {
    min-width: 65px;
    padding: 4px 5px;
    grid-template-columns: 19px auto;
    gap: 2px 4px;
  }
  .bet-marker strong {
    font-size: 12px;
  }
  .bet-marker small {
    font-size: 7px;
  }
  .poker-chip {
    width: 18px;
    height: 10px;
    border-width: 2px;
  }
  .seat-0 .bet-marker {
    top: -43px;
  }
  .seat-1 .bet-marker,
  .seat-7 .bet-marker {
    top: -40px;
  }
  .seat-2 .bet-marker {
    left: calc(100% + 2px);
    top: 5%;
  }
  .seat-6 .bet-marker {
    right: calc(100% + 2px);
    top: 5%;
  }
  .turn-callout {
    font-size: 12px;
  }
  header #sound {
    font-size: 9px;
    padding: 8px 4px;
  }
}
/* Minimal rank-and-suit cards. Keep the two faces for flip animations. */
.card:not(.placeholder) {
  position:relative;display:inline-block;flex-shrink:0;padding:0;
  overflow:visible;background:transparent;border:0;border-radius:6px;
  color:#243936;perspective:650px;box-shadow:0 3px 7px #0003;
}
.card.red {color:#b74447;}
.card > .card-turn {
  display:block;position:relative;align-self:stretch;width:100%;height:100%;
  border-radius:inherit;transform-style:preserve-3d;
}
.card-face {
  position:absolute;inset:0;display:block;overflow:hidden;border-radius:inherit;
  backface-visibility:hidden;-webkit-backface-visibility:hidden;
}
.card-front {background:#f7f5ed;border:1px solid #e5e1d6;}
.simple-rank {position:absolute;top:10%;left:13%;font-size:.95em;font-weight:650;line-height:1;}
.simple-suit {position:absolute;right:13%;bottom:9%;font-size:1.12em;line-height:1;}
.card-reverse {transform:rotateY(180deg);}
.card .card-back {display:grid;place-items:center;background:#27434f;color:#b6c8cc;border:2px solid #d8e0dc;}
.back-emblem {font-size:1.15em;}
.seat-cards {perspective:650px;}
.seat-cards .card:not(.placeholder) {padding:0;}
.self .seat-cards .card {width:48px;height:67px;font-size:22px;}
.self .seat-cards {height:67px;}
.board .card {width:55px;height:79px;font-size:25px;}
.hero-cards .card {font-size:38px;}
@media(max-width:800px){
  .board .card {width:36px;height:54px;padding:0;font-size:18px;}
  .self .seat-cards .card {width:44px;height:62px;font-size:20px;}
  .self .seat-cards {height:62px;}
}
