:root {
  --ink: #17201f;
  --ink-deep: #0e1716;
  --ink-soft: #253330;
  --jade: #224941;
  --jade-mid: #2f6256;
  --jade-light: #b7d2c8;
  --paper: #f2ede3;
  --paper-deep: #e5decf;
  --paper-warm: #faf6ed;
  --vermillion: #b7392f;
  --vermillion-dark: #8f2822;
  --gold: #c9a35b;
  --gold-bright: #e5c57d;
  --line: rgba(23, 32, 31, 0.14);
  --line-light: rgba(255, 255, 255, 0.12);
  --muted: #7c7b72;
  --shadow: 0 20px 48px rgba(17, 28, 27, 0.14);
  --display: "STKaiti", "KaiTi", "FZKai-Z03", "Noto Serif SC", serif;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --sans: "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --number: "Bahnschrift", "DIN Alternate", sans-serif;
  --topbar-h: 82px;
  --rail-w: 92px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 13% 10%, rgba(201, 163, 91, 0.11), transparent 28rem),
    linear-gradient(115deg, #f6f1e7 0%, #eee8dc 48%, #f7f2e9 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body.table-open {
  overflow: hidden;
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.grain {
  position: fixed;
  z-index: 999;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(330px, 1fr);
  align-items: center;
  height: var(--topbar-h);
  padding: 0 28px 0 24px;
  border-bottom: 1px solid rgba(23, 32, 31, 0.1);
  background: rgba(247, 242, 233, 0.9);
  box-shadow: 0 6px 24px rgba(25, 36, 34, 0.035);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 13px;
  padding: 0;
  background: transparent;
  text-align: left;
}

.brand-seal {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  color: var(--paper-warm);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 50%),
    var(--vermillion);
  box-shadow: inset 0 0 0 3px rgba(106, 25, 20, 0.16), 0 4px 12px rgba(143, 40, 34, 0.2);
  font-family: var(--display);
  font-size: 26px;
  line-height: 1;
  transform: rotate(-2deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-copy small {
  color: #777268;
  font-family: var(--number);
  font-size: 8px;
  letter-spacing: 0.19em;
}

.topnav {
  display: flex;
  height: 100%;
  align-items: stretch;
  gap: 36px;
}

.nav-link {
  position: relative;
  padding: 0 0 1px;
  color: #6b6c65;
  background: transparent;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.1em;
  transition: color 180ms ease;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--vermillion);
  content: "";
  transform: scaleX(0);
  transition: transform 220ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
}

.nav-link.is-active::after {
  transform: scaleX(1);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
}

.room-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 5px;
  color: #6a6b65;
  font-size: 11px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b7d63;
  box-shadow: 0 0 0 3px rgba(59, 125, 99, 0.12);
  animation: livePulse 2.4s ease infinite;
}

@keyframes livePulse {
  50% {
    box-shadow: 0 0 0 6px rgba(59, 125, 99, 0.03);
  }
}

.wallet-pill {
  display: flex;
  min-width: 147px;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.36);
  transition: border-color 180ms ease, background 180ms ease;
}

.wallet-pill:hover {
  border-color: rgba(183, 57, 47, 0.38);
  background: rgba(255, 255, 255, 0.7);
}

.coin-icon {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  color: #654816;
  border: 1px solid #d8b56e;
  border-radius: 50%;
  background: linear-gradient(145deg, #f7e6b8, #d3aa56);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
  font-family: var(--display);
  font-size: 14px;
}

.wallet-pill > span:nth-child(2) {
  display: flex;
  min-width: 59px;
  flex-direction: column;
  align-items: flex-start;
}

.wallet-pill small,
.mini-wallet small {
  color: #8c877d;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.wallet-pill strong,
.mini-wallet strong {
  font-family: var(--number);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.wallet-plus {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: var(--vermillion);
  border: 1px solid rgba(183, 57, 47, 0.28);
  border-radius: 50%;
  font-size: 13px;
}

.avatar-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  text-align: left;
}

.avatar {
  position: relative;
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  color: #f4e9d1;
  border-radius: 50%;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.14), transparent 55%),
    var(--jade);
  font-family: var(--display);
  font-size: 16px;
}

.avatar::after {
  position: absolute;
  right: 6px;
  bottom: 5px;
  left: 6px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  content: "";
}

.avatar-copy {
  display: flex;
  flex-direction: column;
}

.avatar-copy strong {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
}

.avatar-copy small {
  margin-top: 2px;
  color: #858179;
  font-family: var(--number);
  font-size: 8px;
}

.page-layout {
  display: flex;
  min-height: calc(100vh - var(--topbar-h));
}

.side-rail {
  position: fixed;
  z-index: 20;
  top: var(--topbar-h);
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--rail-w);
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 0 18px;
  border-right: 1px solid rgba(23, 32, 31, 0.09);
  background: rgba(247, 242, 233, 0.47);
}

.rail-button {
  display: flex;
  width: 63px;
  min-height: 63px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 0;
  color: #8a887f;
  border-radius: 4px;
  background: transparent;
  transition: color 170ms ease, background 170ms ease, transform 170ms ease;
}

.rail-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.rail-button span {
  font-size: 9px;
  letter-spacing: 0.12em;
}

.rail-button:hover,
.rail-button.is-active {
  color: var(--vermillion);
  background: rgba(183, 57, 47, 0.06);
}

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

.rail-spacer {
  flex: 1;
}

main {
  width: calc(100% - var(--rail-w));
  margin-left: var(--rail-w);
}

.page-view {
  display: none;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 38px 64px;
}

.page-view.is-visible {
  display: block;
  animation: pageIn 340ms ease both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.lobby-hero {
  position: relative;
  display: grid;
  min-height: 460px;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.lobby-hero::before {
  position: absolute;
  top: 30px;
  right: 0;
  width: 52%;
  height: 390px;
  border: 1px solid rgba(23, 32, 31, 0.06);
  border-right: 0;
  border-radius: 100% 0 0 100%;
  content: "";
}

.lobby-hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 45%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink));
  content: "";
  opacity: 0.23;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 42px 30px 45px 14px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 24px;
  color: #77756d;
  font-family: var(--number);
  font-size: 8px;
  letter-spacing: 0.17em;
}

.eyebrow span:first-child {
  color: var(--vermillion);
}

.eyebrow-line {
  width: 31px;
  height: 1px;
  background: #b9b3a5;
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(56px, 5.2vw, 84px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.hero-copy h1 em {
  position: relative;
  color: var(--vermillion);
  font-style: normal;
}

.hero-copy h1 em::after {
  position: absolute;
  right: -5px;
  bottom: 8px;
  left: -6px;
  height: 8px;
  background: rgba(201, 163, 91, 0.23);
  content: "";
  transform: rotate(-1.5deg);
  z-index: -1;
}

.hero-lede {
  margin: 24px 0 30px;
  color: #6e7069;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.07em;
  line-height: 2;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
}

.primary-button {
  display: inline-flex;
  height: 49px;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 0 20px;
  color: #fff9ef;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 40%),
    var(--vermillion);
  box-shadow: 0 10px 22px rgba(143, 40, 34, 0.18);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.1em;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.primary-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.primary-button:hover {
  background-color: var(--vermillion-dark);
  box-shadow: 0 13px 26px rgba(143, 40, 34, 0.24);
  transform: translateY(-2px);
}

.text-button {
  padding: 5px 0;
  color: #565951;
  border-bottom: 1px solid #bdb7aa;
  background: transparent;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.text-button span {
  display: inline-block;
  margin-left: 4px;
  transition: transform 180ms ease;
}

.text-button:hover span {
  transform: translate(2px, -2px);
}

.hero-art {
  position: relative;
  height: 100%;
  min-height: 460px;
}

.moon-halo {
  position: absolute;
  top: 34px;
  right: 11%;
  width: 292px;
  height: 292px;
  border: 1px solid rgba(201, 163, 91, 0.35);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 251, 238, 0.8) 0 47%, rgba(201, 163, 91, 0.06) 48% 50%, transparent 51%),
    radial-gradient(circle, transparent 50%, rgba(201, 163, 91, 0.06) 51% 68%, transparent 69%);
}

.moon-halo::before,
.moon-halo::after {
  position: absolute;
  border: 1px solid rgba(183, 57, 47, 0.12);
  border-radius: 50%;
  content: "";
}

.moon-halo::before {
  inset: 24px;
}

.moon-halo::after {
  inset: 48px;
}

.hero-card {
  position: absolute;
  border-radius: 8px;
  box-shadow: 0 28px 45px rgba(20, 31, 29, 0.2);
}

.hero-card-front {
  z-index: 3;
  top: 86px;
  right: 30%;
  width: 160px;
  height: 224px;
  overflow: hidden;
  color: var(--ink);
  border: 5px solid #fbf6e9;
  background:
    linear-gradient(45deg, transparent 48%, rgba(23, 32, 31, 0.025) 49% 51%, transparent 52%),
    #fffdf7;
  transform: rotate(-8deg);
  animation: cardFloat 5s ease-in-out infinite;
}

@keyframes cardFloat {
  50% {
    transform: rotate(-6deg) translateY(-7px);
  }
}

.hero-monogram {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 105px;
  line-height: 1;
  transform: translate(-50%, -52%);
}

.hero-suit {
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgba(34, 73, 65, 0.09);
  font-size: 165px;
  line-height: 1;
  transform: translate(-50%, -53%);
}

.corner {
  position: absolute;
  z-index: 3;
  font-family: var(--number);
  font-size: 15px;
  font-weight: 700;
  line-height: 0.9;
  text-align: center;
}

.corner small {
  font-size: 14px;
}

.corner-tl {
  top: 9px;
  left: 9px;
}

.corner-br {
  right: 9px;
  bottom: 9px;
  transform: rotate(180deg);
}

.hero-card-back {
  z-index: 2;
  top: 55px;
  right: 9%;
  display: flex;
  width: 151px;
  height: 214px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(242, 237, 227, 0.84);
  border: 5px solid #e8deca;
  background:
    repeating-linear-gradient(45deg, transparent 0 6px, rgba(229, 197, 125, 0.1) 7px 8px),
    repeating-linear-gradient(-45deg, transparent 0 6px, rgba(229, 197, 125, 0.07) 7px 8px),
    var(--jade);
  transform: rotate(13deg);
}

.hero-card-back::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(229, 197, 125, 0.42);
  content: "";
}

.hero-card-back span {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-size: 48px;
}

.hero-card-back small {
  position: relative;
  z-index: 1;
  font-family: var(--number);
  font-size: 6px;
  letter-spacing: 0.25em;
}

.hero-chip {
  position: absolute;
  z-index: 4;
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 5px dashed rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  box-shadow: 0 12px 22px rgba(20, 30, 28, 0.22);
  font-family: var(--display);
  transform: rotate(-14deg);
}

.hero-chip span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  font-size: 19px;
}

.chip-one {
  right: 13%;
  bottom: 92px;
  color: #f7e8c7;
  background: var(--vermillion);
}

.chip-two {
  right: 25%;
  bottom: 56px;
  width: 52px;
  height: 52px;
  color: #f3e5c7;
  border-width: 4px;
  background: var(--ink-soft);
  transform: rotate(9deg);
}

.chip-two span {
  width: 35px;
  height: 35px;
  font-family: var(--number);
  font-size: 12px;
}

.ink-brush {
  position: absolute;
  z-index: 1;
  right: 4%;
  bottom: 28px;
  width: 330px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(20, 31, 29, 0.12), transparent 66%);
  filter: blur(8px);
  transform: rotate(-11deg);
}

.vertical-note {
  position: absolute;
  right: 5%;
  bottom: 24px;
  z-index: 3;
  margin: 0;
  color: rgba(23, 32, 31, 0.55);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.23em;
  writing-mode: vertical-rl;
}

.hero-live-card {
  position: absolute;
  z-index: 7;
  right: 14px;
  bottom: 23px;
  width: 218px;
  padding: 17px 18px 15px;
  color: rgba(246, 239, 225, 0.82);
  border: 1px solid rgba(229, 197, 125, 0.18);
  border-radius: 4px;
  background: rgba(23, 32, 31, 0.94);
  box-shadow: 0 15px 34px rgba(17, 28, 27, 0.16);
  backdrop-filter: blur(8px);
}

.section-kicker {
  color: var(--gold-bright);
  font-family: var(--number);
  font-size: 7px;
  letter-spacing: 0.18em;
}

.live-number {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 11px;
}

.live-number strong {
  font-family: var(--number);
  font-size: 31px;
  font-weight: 500;
}

.live-number span {
  color: rgba(246, 239, 225, 0.55);
  font-size: 9px;
}

.live-divider {
  height: 1px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.1);
}

.live-tables {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  color: rgba(246, 239, 225, 0.48);
  font-size: 7px;
}

.status-light {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 4px;
  border-radius: 50%;
  background: #75b08c;
}

.lobby-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  gap: 36px;
  padding-top: 38px;
}

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

.section-index {
  display: block;
  margin-bottom: 5px;
  color: var(--vermillion);
  font-family: var(--number);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.section-heading h2,
.aside-heading h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 29px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.table-filters {
  display: flex;
  gap: 7px;
}

.filter-chip {
  padding: 7px 11px;
  color: #88877f;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.filter-chip:hover {
  color: var(--ink);
}

.filter-chip.is-active {
  color: var(--ink);
  border-color: rgba(23, 32, 31, 0.16);
  background: rgba(255, 255, 255, 0.4);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.game-card {
  position: relative;
  display: grid;
  min-height: 235px;
  grid-template-columns: 44% 56%;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: 4px;
  background: rgba(255, 252, 246, 0.55);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.game-card.is-hidden {
  display: none;
}

.game-card:hover {
  border-color: rgba(183, 57, 47, 0.25);
  box-shadow: 0 18px 36px rgba(23, 32, 31, 0.1);
  transform: translateY(-3px);
}

.game-visual {
  position: relative;
  min-height: 235px;
  overflow: hidden;
  color: var(--paper-warm);
  background: var(--jade);
}

.game-visual::before {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  content: "";
}

.game-visual::after {
  position: absolute;
  right: -35px;
  bottom: -35px;
  width: 135px;
  height: 135px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.visual-glyph {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 54%;
  color: rgba(244, 236, 219, 0.07);
  font-family: var(--display);
  font-size: 140px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.game-number {
  position: absolute;
  z-index: 2;
  top: 15px;
  left: 16px;
  color: rgba(247, 240, 226, 0.46);
  font-family: var(--number);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.card-fan {
  position: absolute;
  z-index: 3;
  display: flex;
  width: 75px;
  height: 105px;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 8px;
  color: var(--ink);
  border: 3px solid #f9f1df;
  border-radius: 4px;
  background:
    linear-gradient(135deg, transparent 72%, rgba(23, 32, 31, 0.05) 73%),
    #fffdf7;
  box-shadow: 0 9px 18px rgba(5, 15, 13, 0.25);
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.card-f1 {
  top: 72px;
  left: 20px;
  transform: rotate(-14deg);
}

.card-f2 {
  top: 54px;
  left: calc(50% - 30px);
  transform: rotate(1deg);
}

.card-f3 {
  top: 79px;
  left: calc(50% + 13px);
  transform: rotate(15deg);
}

.game-ddz .game-visual {
  background:
    radial-gradient(circle at 50% 45%, rgba(229, 197, 125, 0.25), transparent 41%),
    var(--jade);
}

.game-zjh .game-visual {
  background:
    radial-gradient(circle at 35% 53%, rgba(255, 214, 141, 0.3), transparent 45%),
    #8c2f28;
}

.game-zjh .card-fan {
  color: #b13a32;
}

.gold-ring {
  position: absolute;
  top: 44px;
  left: 13px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(242, 210, 143, 0.28);
  border-radius: 50%;
}

.gold-ring::before {
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(242, 210, 143, 0.2);
  border-radius: 50%;
  content: "";
}

.game-nn .game-visual {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 45%),
    #3e3023;
}

.coin-arc {
  position: absolute;
  right: -22px;
  bottom: -20px;
  width: 155px;
  height: 155px;
  border: 14px dotted rgba(229, 197, 125, 0.17);
  border-radius: 50%;
}

.game-phz .game-visual {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.05), transparent 40%),
    #2c4640;
}

.tile-fan {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 51px;
  height: 91px;
  place-items: center;
  color: var(--ink);
  border: 4px solid #f8efdd;
  border-bottom-width: 7px;
  border-radius: 6px;
  background: #e8dfc8;
  box-shadow: 0 9px 15px rgba(4, 13, 11, 0.3);
  font-family: var(--display);
  font-size: 26px;
}

.tile-f1 {
  top: 74px;
  left: 18px;
  color: var(--vermillion);
  transform: rotate(-8deg);
}

.tile-f2 {
  top: 54px;
  left: 76px;
  color: var(--ink);
  transform: rotate(2deg);
}

.tile-f3 {
  top: 77px;
  left: 132px;
  color: var(--vermillion);
  transform: rotate(10deg);
}

.game-baccarat .game-visual {
  background:
    linear-gradient(115deg, transparent 42%, rgba(229, 197, 125, 0.07) 43% 44%, transparent 45%),
    #1e3037;
}

.baccarat-orbit {
  position: absolute;
  top: 52px;
  left: 20px;
  width: 138px;
  height: 138px;
  border: 1px solid rgba(229, 197, 125, 0.2);
  border-radius: 50%;
}

.baccarat-orbit::after {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(229, 197, 125, 0.1);
  border-radius: 50%;
  content: "";
}

.game-bj .game-visual {
  background:
    radial-gradient(circle at 40% 44%, rgba(229, 197, 125, 0.25), transparent 40%),
    #53402a;
}

.twenty-one {
  position: absolute;
  top: 16px;
  right: 12px;
  color: rgba(255, 242, 219, 0.2);
  font-family: var(--number);
  font-size: 57px;
  font-weight: 700;
  line-height: 1;
}

.game-info {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 20px 17px 15px 19px;
}

.game-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.game-title-row h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.game-title-row small {
  color: #99958a;
  font-family: var(--number);
  font-size: 6px;
  letter-spacing: 0.08em;
}

.intensity {
  display: flex;
  gap: 2px;
  padding-top: 5px;
}

.intensity i {
  display: block;
  width: 3px;
  height: 8px;
  background: var(--vermillion);
}

.intensity i:nth-child(2) {
  height: 11px;
  margin-top: -3px;
}

.intensity i:nth-child(3) {
  height: 15px;
  margin-top: -7px;
}

.game-info > p {
  min-height: 34px;
  margin: 15px 0 12px;
  color: #74736c;
  font-size: 10px;
  line-height: 1.7;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding-bottom: 13px;
  color: #98958a;
  border-bottom: 1px solid var(--line);
  font-size: 7px;
}

.game-meta strong {
  color: var(--ink);
  font-family: var(--number);
  font-size: 8px;
}

.online-count {
  margin-left: auto;
  color: #5f7f71;
}

.online-count i {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 3px;
  border-radius: 50%;
  background: #5c9877;
}

.game-enter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 12px 0 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.game-enter span:last-child {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--vermillion);
  border: 1px solid rgba(183, 57, 47, 0.25);
  border-radius: 50%;
  font-family: var(--sans);
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.game-enter:hover span:last-child {
  color: #fff;
  background: var(--vermillion);
  transform: translateX(2px);
}

.lobby-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aside-panel {
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 252, 245, 0.5);
}

.aside-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.aside-heading h3 {
  font-size: 22px;
}

.live-tag {
  position: relative;
  padding-left: 9px;
  color: var(--vermillion);
  font-family: var(--number);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.live-tag::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--vermillion);
  content: "";
  transform: translateY(-50%);
}

.activity-feed {
  display: flex;
  flex-direction: column;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.feed-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff6e5;
  border-radius: 50%;
  font-family: var(--display);
  font-size: 13px;
}

.avatar-red {
  background: #9c4337;
}

.avatar-green {
  background: #3f6b5a;
}

.avatar-gold {
  background: #aa8349;
}

.feed-item p {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  color: #73736c;
  font-size: 8px;
  line-height: 1.45;
}

.feed-item strong {
  color: var(--ink);
  font-size: 9px;
  font-weight: 600;
}

.feed-item small {
  color: #a19c91;
  font-size: 7px;
}

.feed-suit {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 16px;
}

.feed-suit.red {
  color: var(--vermillion);
}

.quest-panel {
  position: relative;
  overflow: hidden;
  color: rgba(247, 240, 226, 0.88);
  border-color: rgba(23, 32, 31, 0.45);
  background:
    radial-gradient(circle at 85% 10%, rgba(229, 197, 125, 0.18), transparent 36%),
    var(--ink);
}

.quest-panel::after {
  position: absolute;
  right: -52px;
  bottom: -64px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(229, 197, 125, 0.12);
  border-radius: 50%;
  content: "";
}

.quest-panel .section-index {
  color: var(--gold-bright);
}

.quest-panel h3 {
  position: relative;
  z-index: 1;
  margin: 11px 0 12px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.37;
}

.quest-panel > p {
  position: relative;
  z-index: 1;
  margin: 0 0 17px;
  color: rgba(247, 240, 226, 0.48);
  font-size: 8px;
  line-height: 1.75;
}

.quest-ornament {
  position: absolute;
  top: 9px;
  right: 15px;
  color: rgba(229, 197, 125, 0.08);
  font-family: var(--display);
  font-size: 92px;
}

.quest-progress {
  position: relative;
  z-index: 1;
}

.quest-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: rgba(247, 240, 226, 0.56);
  font-size: 7px;
}

.quest-label strong {
  color: var(--gold-bright);
  font-family: var(--number);
  font-weight: 500;
}

.progress-track {
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width 400ms ease;
}

.quest-button {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 10px 0 0;
  color: var(--gold-bright);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background: transparent;
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.aside-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  color: #a09c92;
}

.note-seal {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--vermillion);
  border: 1px solid rgba(183, 57, 47, 0.28);
  font-family: var(--display);
  font-size: 12px;
}

.aside-note p {
  margin: 0;
  font-size: 7px;
  line-height: 1.65;
}

.inner-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 60px 0 34px;
  border-bottom: 1px solid var(--line);
}

.inner-page-heading h1 {
  margin: 8px 0 10px;
  font-family: var(--display);
  font-size: 58px;
  font-weight: 500;
  line-height: 1;
}

.inner-page-heading p {
  margin: 0;
  color: #77776f;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.outline-button {
  padding: 10px 15px;
  color: #77746b;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.outline-button:hover {
  color: var(--vermillion);
  border-color: rgba(183, 57, 47, 0.3);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 28px 0;
  border: 1px solid var(--line);
  background: rgba(255, 252, 245, 0.46);
}

.stat-block {
  position: relative;
  display: flex;
  min-height: 130px;
  flex-direction: column;
  justify-content: center;
  padding: 22px 26px;
  border-right: 1px solid var(--line);
}

.stat-block:last-child {
  border-right: 0;
}

.stat-block.featured {
  color: var(--paper);
  background: var(--ink);
}

.stat-block > span {
  color: #8c897f;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.stat-block.featured > span,
.stat-block.featured small {
  color: rgba(247, 240, 226, 0.5);
}

.stat-block strong {
  margin: 8px 0 5px;
  font-family: var(--number);
  font-size: 34px;
  font-weight: 500;
}

.stat-block small {
  color: #a19d92;
  font-size: 8px;
}

.ledger-panel {
  border: 1px solid var(--line);
  background: rgba(255, 252, 245, 0.45);
}

.ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.ledger-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
}

.ledger-head span {
  color: #98958b;
  font-size: 8px;
}

.empty-ledger {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #9b968b;
}

.empty-ledger > span {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  color: rgba(183, 57, 47, 0.45);
  border: 1px solid rgba(183, 57, 47, 0.18);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 20px;
}

.empty-ledger p {
  margin: 3px 0;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

.ledger-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 0.8fr;
  align-items: center;
  min-height: 65px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

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

.ledger-row.header {
  min-height: 40px;
  color: #98958b;
  font-size: 8px;
  letter-spacing: 0.06em;
}

.ledger-row .game-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
}

.ledger-row .game-cell i {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: #f7eddc;
  border-radius: 2px;
  background: var(--jade);
  font-family: var(--display);
  font-style: normal;
}

.result-badge {
  display: inline-flex;
  width: fit-content;
  padding: 3px 8px;
  color: #5f866d;
  border: 1px solid rgba(95, 134, 109, 0.25);
  border-radius: 2px;
  font-size: 8px;
}

.result-badge.loss {
  color: #a55349;
  border-color: rgba(165, 83, 73, 0.24);
}

.ledger-amount {
  font-family: var(--number);
  font-size: 13px;
}

.ledger-amount.positive {
  color: #4e7d64;
}

.ledger-amount.negative {
  color: var(--vermillion);
}

.manual-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 42px;
  padding-top: 28px;
}

.manual-nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.manual-tab {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 10px;
  color: #77766f;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: var(--serif);
  font-size: 12px;
  text-align: left;
  transition: color 170ms ease, padding 170ms ease;
}

.manual-tab span {
  color: #b1ada2;
  font-family: var(--number);
  font-size: 8px;
}

.manual-tab:hover,
.manual-tab.is-active {
  padding-left: 16px;
  color: var(--vermillion);
}

.manual-tab.is-active span {
  color: var(--vermillion);
}

.manual-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 35px;
  min-height: 480px;
  padding: 34px 36px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 245, 0.46);
}

.manual-main h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 43px;
  font-weight: 500;
}

.manual-main .manual-en {
  color: #aaa498;
  font-family: var(--number);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.manual-main .manual-intro {
  margin: 22px 0;
  color: #74746c;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.9;
}

.rule-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rules;
}

.rule-list li {
  position: relative;
  padding: 13px 0 13px 38px;
  color: #666861;
  border-top: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.7;
  counter-increment: rules;
}

.rule-list li::before {
  position: absolute;
  top: 14px;
  left: 0;
  color: var(--vermillion);
  content: counter(rules, decimal-leading-zero);
  font-family: var(--number);
  font-size: 8px;
}

.manual-side {
  padding: 19px;
  color: rgba(247, 240, 226, 0.78);
  background: var(--ink);
}

.manual-side h3 {
  margin: 0 0 16px;
  color: var(--gold-bright);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
}

.hand-rank {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(247, 240, 226, 0.58);
  font-size: 8px;
}

.hand-rank i {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  color: var(--gold-bright);
  border: 1px solid rgba(229, 197, 125, 0.2);
  border-radius: 50%;
  font-family: var(--number);
  font-size: 7px;
  font-style: normal;
}

.manual-side .note {
  margin-top: 16px;
  padding-top: 14px;
  color: rgba(247, 240, 226, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 7px;
  line-height: 1.7;
}

/* Table room */
.table-modal {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: none;
}

.table-modal.is-open {
  display: block;
}

.table-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 16, 15, 0.74);
  backdrop-filter: blur(9px);
  animation: fadeIn 250ms ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.table-modal-shell {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  color: var(--paper);
  background:
    radial-gradient(circle at 50% 40%, rgba(80, 134, 111, 0.17), transparent 31%),
    radial-gradient(circle at 15% 5%, rgba(201, 163, 91, 0.1), transparent 23%),
    var(--ink-deep);
  animation: tableIn 360ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes tableIn {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
}

.table-topbar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 78px;
  padding: 0 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(12, 22, 20, 0.65);
}

.table-back {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  color: rgba(247, 240, 226, 0.51);
  background: transparent;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.table-back:hover {
  color: var(--paper);
}

.table-back svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.table-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.table-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.table-room-no {
  color: rgba(247, 240, 226, 0.38);
  font-size: 7px;
}

.table-room-no strong {
  color: var(--gold-bright);
  font-family: var(--number);
  font-weight: 500;
}

.table-subtitle {
  color: rgba(247, 240, 226, 0.38);
  font-size: 8px;
}

.table-top-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
}

.mini-wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
  padding-right: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-wallet > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.mini-wallet small {
  color: rgba(247, 240, 226, 0.4);
}

.mini-wallet strong {
  color: var(--paper);
  font-size: 12px;
}

.icon-button {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  color: rgba(247, 240, 226, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  background: transparent;
}

.icon-button:hover {
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.23);
}

.table-stage {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.table-stage::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(75vw, 980px);
  height: min(45vw, 590px);
  border: 1px solid rgba(229, 197, 125, 0.12);
  border-radius: 48%;
  background:
    repeating-radial-gradient(ellipse at center, transparent 0 55px, rgba(255, 255, 255, 0.018) 56px 57px),
    radial-gradient(ellipse, rgba(42, 86, 72, 0.58), rgba(19, 45, 38, 0.5) 55%, rgba(9, 20, 17, 0) 74%);
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.28), 0 45px 70px rgba(0, 0, 0, 0.18);
  content: "";
  transform: translate(-50%, -47%);
}

.table-stage::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(69vw, 900px);
  height: min(40vw, 520px);
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 48%;
  content: "";
  transform: translate(-50%, -47%);
}

.table-center-brand {
  position: absolute;
  z-index: 0;
  top: 48%;
  left: 50%;
  color: rgba(229, 197, 125, 0.035);
  font-family: var(--display);
  font-size: min(25vw, 280px);
  line-height: 1;
  transform: translate(-50%, -50%);
  user-select: none;
}

.player-seat {
  position: absolute;
  z-index: 4;
  display: flex;
  width: 125px;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transition: transform 250ms ease, opacity 200ms ease;
}

.player-seat.seat-left {
  top: 45%;
  left: max(4vw, 30px);
  transform: translateY(-50%);
}

.player-seat.seat-right {
  top: 45%;
  right: max(4vw, 30px);
  transform: translateY(-50%);
}

.player-seat.seat-top {
  top: 23px;
  left: 50%;
  transform: translateX(-50%);
}

.player-seat.seat-top-left {
  top: 32px;
  left: 28%;
}

.player-seat.seat-top-right {
  top: 32px;
  right: 28%;
}

.seat-avatar-wrap {
  position: relative;
}

.seat-avatar {
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  color: #f8edda;
  border: 1px solid rgba(229, 197, 125, 0.35);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.15), transparent 50%),
    var(--jade-mid);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.025), 0 10px 20px rgba(0, 0, 0, 0.22);
  font-family: var(--display);
  font-size: 21px;
}

.seat-avatar.red {
  background-color: #8e4137;
}

.seat-avatar.gold {
  background-color: #987640;
}

.seat-avatar.dark {
  background-color: #36433d;
}

.seat-avatar.user {
  border-color: rgba(229, 197, 125, 0.72);
  box-shadow: 0 0 0 4px rgba(229, 197, 125, 0.08), 0 10px 20px rgba(0, 0, 0, 0.22);
}

.dealer-button {
  position: absolute;
  right: -8px;
  bottom: -2px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #5a3c12;
  border: 2px solid var(--ink-deep);
  border-radius: 50%;
  background: var(--gold);
  font-family: var(--number);
  font-size: 7px;
  font-weight: 700;
}

.turn-ring {
  position: absolute;
  inset: -7px;
  border: 1px solid transparent;
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  opacity: 0;
}

.player-seat.is-turn .turn-ring {
  opacity: 1;
  animation: turnSpin 2s linear infinite;
}

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

.player-seat.is-turn .seat-avatar-wrap::after {
  position: absolute;
  bottom: -14px;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 5px solid var(--gold-bright);
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
  transform: translateX(-50%);
}

.seat-name {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(247, 240, 226, 0.88);
  font-family: var(--serif);
  font-size: 11px;
}

.seat-name .rank-tag {
  padding: 1px 4px;
  color: var(--gold-bright);
  border: 1px solid rgba(229, 197, 125, 0.2);
  font-family: var(--number);
  font-size: 6px;
}

.seat-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(247, 240, 226, 0.42);
  font-family: var(--number);
  font-size: 8px;
}

.seat-score {
  color: var(--gold-bright);
  font-size: 9px;
}

.seat-state {
  min-height: 19px;
  padding: 3px 7px;
  color: rgba(247, 240, 226, 0.63);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.14);
  font-size: 7px;
}

.seat-state.is-win {
  color: var(--gold-bright);
  border-color: rgba(229, 197, 125, 0.25);
}

.seat-state.is-fold {
  opacity: 0.45;
}

.seat-card-count {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(247, 240, 226, 0.44);
  font-size: 7px;
}

.mini-card-stack {
  position: relative;
  width: 19px;
  height: 26px;
}

.mini-card-stack i {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 21px;
  border: 1px solid rgba(229, 197, 125, 0.35);
  border-radius: 2px;
  background:
    repeating-linear-gradient(45deg, transparent 0 3px, rgba(229, 197, 125, 0.13) 4px 5px),
    #1b4a3c;
}

.mini-card-stack i:nth-child(2) {
  top: 2px;
  left: 3px;
}

.mini-card-stack i:nth-child(3) {
  top: 4px;
  left: 6px;
}

.player-seat.is-folded {
  opacity: 0.48;
}

.opponent-cards {
  display: flex;
  height: 55px;
  align-items: center;
  justify-content: center;
}

.opponent-cards .playing-card {
  width: 36px;
  height: 50px;
  margin-left: -19px;
  pointer-events: none;
}

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

.result-chip {
  position: absolute;
  z-index: 6;
  top: calc(100% + 6px);
  left: 50%;
  padding: 4px 8px;
  color: #f9e9c7;
  border: 1px solid rgba(229, 197, 125, 0.26);
  border-radius: 10px;
  background: rgba(182, 53, 43, 0.92);
  font-family: var(--number);
  font-size: 8px;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: chipPop 250ms ease both;
}

@keyframes chipPop {
  from {
    opacity: 0;
    transform: translate(-50%, 5px) scale(0.8);
  }
}

.seat-bubble {
  position: absolute;
  z-index: 7;
  top: 6px;
  left: calc(100% + 1px);
  padding: 6px 9px;
  color: var(--ink);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  font-size: 8px;
  white-space: nowrap;
}

.seat-bubble::before {
  position: absolute;
  top: 11px;
  left: -4px;
  width: 8px;
  height: 8px;
  background: var(--paper);
  content: "";
  transform: rotate(45deg);
}

.seat-right .seat-bubble,
.seat-top-right .seat-bubble {
  right: calc(100% + 1px);
  left: auto;
}

.seat-right .seat-bubble::before,
.seat-top-right .seat-bubble::before {
  right: -4px;
  left: auto;
}

.bottom-area {
  position: absolute;
  z-index: 10;
  right: 0;
  bottom: 4px;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.table-message {
  position: absolute;
  z-index: 12;
  top: 44%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: rgba(247, 240, 226, 0.87);
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.table-message strong {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.table-message span {
  color: rgba(247, 240, 226, 0.44);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.table-message .big-score {
  color: var(--gold-bright);
  font-family: var(--number);
  font-size: 42px;
  letter-spacing: 0;
}

.play-zone {
  position: absolute;
  z-index: 5;
  top: 45%;
  left: 50%;
  display: flex;
  min-height: 105px;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
}

.play-zone .playing-card {
  margin-left: -16px;
}

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

.played-hand-label {
  position: absolute;
  top: -20px;
  left: 50%;
  color: rgba(247, 240, 226, 0.34);
  font-size: 7px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.hand-zone {
  position: relative;
  z-index: 4;
  display: flex;
  width: 100%;
  min-height: 136px;
  align-items: flex-end;
  justify-content: center;
  padding: 25px 70px 8px;
}

.hand-zone .playing-card {
  width: 67px;
  height: 98px;
  margin-left: -24px;
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}

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

.hand-zone .playing-card.is-selected {
  z-index: 20;
  box-shadow: 0 13px 18px rgba(0, 0, 0, 0.22);
  filter: brightness(1.06);
  transform: translateY(-18px);
}

.hand-zone .playing-card:hover {
  transform: translateY(-7px);
}

.hand-zone .playing-card.is-selected:hover {
  transform: translateY(-20px);
}

.playing-card {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  color: var(--ink);
  border: 2px solid #fbf3df;
  border-radius: 4px;
  background:
    linear-gradient(45deg, transparent 48%, rgba(23, 32, 31, 0.018) 49% 51%, transparent 52%),
    #fffdf7;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  font-family: Georgia, serif;
  cursor: default;
  user-select: none;
}

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

.playing-card .card-corner {
  position: absolute;
  top: 2px;
  left: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  line-height: 0.9;
}

.playing-card .card-corner small {
  margin-top: 2px;
  font-size: 9px;
}

.playing-card .card-corner.bottom {
  top: auto;
  right: 3px;
  bottom: 2px;
  left: auto;
  transform: rotate(180deg);
}

.playing-card .card-center {
  font-size: 25px;
  line-height: 1;
}

.playing-card .card-center.face {
  display: grid;
  width: 29px;
  height: 37px;
  place-items: center;
  color: #f5ead5;
  border: 1px solid #c5a35e;
  border-radius: 2px;
  background:
    repeating-linear-gradient(45deg, transparent 0 4px, rgba(229, 197, 125, 0.13) 5px 6px),
    var(--jade);
  font-family: var(--serif);
  font-size: 14px;
}

.playing-card.back {
  border-color: #d6c9b3;
  background:
    repeating-linear-gradient(45deg, transparent 0 4px, rgba(229, 197, 125, 0.13) 5px 6px),
    repeating-linear-gradient(-45deg, transparent 0 4px, rgba(229, 197, 125, 0.09) 5px 6px),
    #194638;
  box-shadow: inset 0 0 0 3px #f2ead8, inset 0 0 0 4px rgba(229, 197, 125, 0.3), 0 3px 8px rgba(0, 0, 0, 0.2);
}

.playing-card.back::after {
  display: grid;
  width: 46%;
  aspect-ratio: 1;
  place-items: center;
  color: rgba(229, 197, 125, 0.5);
  border: 1px solid rgba(229, 197, 125, 0.3);
  border-radius: 50%;
  content: "胡";
  font-family: var(--display);
  font-size: 13px;
}

.playing-card.joker .card-center {
  font-family: var(--display);
  font-size: 13px;
  writing-mode: vertical-rl;
}

.playing-card.joker.red {
  color: var(--vermillion);
}

.player-hand-wrap {
  position: relative;
  display: flex;
  width: min(100%, 1120px);
  flex-direction: column;
  align-items: center;
}

.player-self-info {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: -5px;
  transform: translateX(22px);
}

.player-self-info .seat-avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.player-self-info .player-name {
  font-family: var(--serif);
  font-size: 11px;
}

.player-self-info .player-score {
  color: var(--gold-bright);
  font-family: var(--number);
  font-size: 9px;
}

.player-self-info .turn-label {
  padding: 3px 7px;
  color: var(--ink);
  border-radius: 9px;
  background: var(--gold-bright);
  font-size: 7px;
}

.table-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 22px;
  padding: 2px 10px;
  color: rgba(247, 240, 226, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.14);
  font-size: 7px;
}

.table-status-line strong {
  color: rgba(247, 240, 226, 0.75);
  font-weight: 500;
}

.table-status-line .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
}

.table-action-bar {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: 83px;
  align-items: center;
  justify-content: center;
  padding: 10px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 17, 15, 0.8);
}

.action-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.table-action {
  min-width: 104px;
  padding: 11px 18px;
  color: rgba(247, 240, 226, 0.82);
  border: 1px solid rgba(229, 197, 125, 0.25);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.table-action:hover {
  border-color: rgba(229, 197, 125, 0.55);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.table-action.primary {
  color: #fff8eb;
  border-color: var(--vermillion);
  background: var(--vermillion);
}

.table-action.primary:hover {
  background: #c54539;
}

.table-action.gold {
  color: var(--ink);
  border-color: var(--gold-bright);
  background: var(--gold-bright);
}

.table-action.gold:hover {
  background: #f0d391;
}

.table-action.ghost {
  color: rgba(247, 240, 226, 0.48);
  border-color: rgba(255, 255, 255, 0.08);
  background: transparent;
}

.table-action:disabled {
  cursor: not-allowed;
  opacity: 0.34;
  transform: none;
}

.action-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.action-hint small {
  color: rgba(247, 240, 226, 0.32);
  font-size: 7px;
}

.result-layer {
  position: absolute;
  z-index: 100;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 30px;
  background: rgba(8, 15, 14, 0.78);
  backdrop-filter: blur(8px);
}

.result-layer.is-visible {
  display: flex;
  animation: fadeIn 220ms ease both;
}

.result-card {
  position: relative;
  width: min(480px, 94vw);
  padding: 35px 38px 31px;
  color: var(--ink);
  border: 1px solid rgba(201, 163, 91, 0.42);
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(201, 163, 91, 0.055) 49% 51%, transparent 52%),
    var(--paper);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.38);
  animation: resultIn 380ms cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

@keyframes resultIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
}

.result-card::before {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(23, 32, 31, 0.1);
  content: "";
  pointer-events: none;
}

.result-card .result-kicker {
  display: block;
  color: var(--vermillion);
  font-family: var(--number);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-align: center;
}

.result-card h2 {
  margin: 12px 0 3px;
  font-family: var(--display);
  font-size: 43px;
  font-weight: 500;
  text-align: center;
}

.result-delta {
  margin: 10px 0 18px;
  color: var(--vermillion);
  font-family: var(--number);
  font-size: 28px;
  text-align: center;
}

.result-delta.positive {
  color: #46785f;
}

.result-hand {
  display: flex;
  min-height: 83px;
  align-items: center;
  justify-content: center;
  margin: 8px 0 18px;
}

.result-hand .playing-card {
  width: 57px;
  height: 83px;
  margin-left: -15px;
}

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

.result-summary {
  margin: 0 0 20px;
  color: #77746b;
  font-family: var(--serif);
  font-size: 10px;
  line-height: 1.8;
  text-align: center;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-stats div {
  padding: 11px 4px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.result-stats div:last-child {
  border-right: 0;
}

.result-stats span {
  display: block;
  margin-bottom: 4px;
  color: #9a958a;
  font-size: 7px;
}

.result-stats strong {
  font-family: var(--number);
  font-size: 13px;
  font-weight: 500;
}

.result-actions {
  display: flex;
  gap: 9px;
}

.result-actions button {
  flex: 1;
}

.result-secondary {
  padding: 11px;
  color: #77736b;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  font-size: 9px;
}

/* 斗牛 / baccarat table variants */
.specific-board {
  position: absolute;
  z-index: 5;
  top: 48%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  transform: translate(-50%, -50%);
}

.board-side {
  display: flex;
  min-width: 230px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.board-label {
  color: rgba(247, 240, 226, 0.37);
  font-family: var(--number);
  font-size: 7px;
  letter-spacing: 0.18em;
}

.board-score {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  color: var(--gold-bright);
  border: 1px solid rgba(229, 197, 125, 0.3);
  border-radius: 50%;
  font-family: var(--number);
  font-size: 20px;
}

.board-cards {
  display: flex;
  min-height: 105px;
  align-items: center;
  justify-content: center;
}

.board-cards .playing-card {
  width: 65px;
  height: 95px;
  margin-left: -14px;
}

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

.vs-mark {
  color: rgba(229, 197, 125, 0.35);
  font-family: var(--display);
  font-size: 18px;
}

.hand-result-tag {
  min-height: 18px;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 10px;
}

.betting-options {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bet-option {
  position: relative;
  display: flex;
  min-width: 86px;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 13px;
  color: rgba(247, 240, 226, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(0, 0, 0, 0.14);
}

.bet-option span {
  font-family: var(--serif);
  font-size: 10px;
}

.bet-option strong {
  color: var(--gold-bright);
  font-family: var(--number);
  font-size: 7px;
  font-weight: 500;
}

.bet-option.is-selected {
  border-color: var(--gold);
  background: rgba(201, 163, 91, 0.13);
  box-shadow: inset 0 0 0 1px rgba(229, 197, 125, 0.12);
}

.bet-option.player.is-selected {
  border-color: #67a9b9;
}

.bet-option.banker.is-selected {
  border-color: #d86d61;
}

.road-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(247, 240, 226, 0.34);
  font-size: 7px;
}

.road-dots {
  display: flex;
  gap: 3px;
}

.road-dot {
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  font-family: var(--number);
  font-size: 6px;
}

.road-dot.p {
  color: #78b6c5;
  border-color: rgba(120, 182, 197, 0.4);
}

.road-dot.b {
  color: #d5766a;
  border-color: rgba(213, 118, 106, 0.4);
}

.road-dot.t {
  color: var(--gold-bright);
  border-color: rgba(229, 197, 125, 0.4);
}

/* Pao Hu Zi tiles */
.tile-hand {
  display: flex;
  width: 100%;
  min-height: 106px;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 40px 3px;
}

.hu-tile {
  position: relative;
  display: grid;
  width: 38px;
  height: 63px;
  margin-left: 2px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  color: var(--ink);
  border: 2px solid #f5ead6;
  border-bottom: 5px solid #d5c9ae;
  border-radius: 4px;
  background: #eee4cf;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.22);
  font-family: var(--display);
  font-size: 19px;
  transition: transform 130ms ease, filter 130ms ease;
}

.hu-tile.red {
  color: var(--vermillion);
}

.hu-tile.is-selected {
  z-index: 3;
  filter: brightness(1.08);
  box-shadow: 0 9px 15px rgba(0, 0, 0, 0.25);
  transform: translateY(-13px);
}

.hu-tile + .hu-tile {
  margin-left: -3px;
}

.opponent-tiles {
  display: flex;
  justify-content: center;
}

.opponent-tiles i {
  position: relative;
  display: block;
  width: 15px;
  height: 28px;
  margin-left: 1px;
  border: 1px solid #d7cab1;
  border-bottom-width: 3px;
  border-radius: 2px;
  background: #eee4cf;
}

.meld-row {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  color: rgba(247, 240, 226, 0.34);
  font-size: 7px;
}

.meld-group {
  display: flex;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.12);
}

.meld-group .hu-tile {
  width: 19px;
  height: 31px;
  margin-left: -2px;
  border-width: 1px;
  border-bottom-width: 2px;
  font-size: 10px;
  pointer-events: none;
}

.meld-group .hu-tile:first-child {
  margin-left: 0;
}

.table-card-badge {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 11px;
  color: rgba(247, 240, 226, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  font-size: 7px;
  transform: translateX(-50%);
}

.table-card-badge strong {
  color: var(--gold-bright);
  font-weight: 500;
}

/* dialogs and toasts */
.modal {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 16, 0.67);
  backdrop-filter: blur(6px);
  animation: fadeIn 180ms ease both;
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(430px, 95vw);
  padding: 32px;
  color: var(--ink);
  border: 1px solid rgba(201, 163, 91, 0.44);
  background: var(--paper);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
  animation: resultIn 300ms ease both;
}

.modal-card::before {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(23, 32, 31, 0.1);
  content: "";
  pointer-events: none;
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 13px;
  right: 15px;
  width: 26px;
  height: 26px;
  color: #8d897f;
  background: transparent;
  font-family: var(--number);
  font-size: 20px;
}

.modal-kicker {
  color: var(--vermillion);
  font-family: var(--number);
  font-size: 7px;
  letter-spacing: 0.15em;
}

.modal-card h2 {
  margin: 9px 0 14px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 500;
}

.modal-body {
  color: #737169;
  font-size: 10px;
  line-height: 1.8;
}

.modal-body p {
  margin: 8px 0;
}

.modal-body ul {
  padding-left: 17px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 23px;
}

.modal-actions button {
  min-width: 80px;
  padding: 9px 15px;
  color: #77746c;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 9px;
}

.modal-actions button.primary {
  color: #fff9ec;
  border-color: var(--vermillion);
  background: var(--vermillion);
}

.claim-reward {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 2px;
  text-align: center;
}

.claim-coin {
  display: grid;
  width: 77px;
  height: 77px;
  place-items: center;
  color: #684a17;
  border: 5px dashed rgba(101, 72, 22, 0.28);
  border-radius: 50%;
  background: linear-gradient(145deg, #f5dfaa, #d1a44e);
  box-shadow: inset 0 0 0 4px #f8e9c4, 0 13px 24px rgba(23, 32, 31, 0.18);
  font-family: var(--display);
  font-size: 28px;
}

.claim-reward strong {
  margin: 12px 0 4px;
  color: var(--ink);
  font-family: var(--number);
  font-size: 29px;
}

.claim-reward span {
  color: #918c81;
  font-size: 8px;
}

.toast-stack {
  position: fixed;
  z-index: 700;
  top: 96px;
  right: 20px;
  display: flex;
  width: min(310px, calc(100vw - 40px));
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 11px 14px;
  color: rgba(247, 240, 226, 0.9);
  border: 1px solid rgba(229, 197, 125, 0.2);
  border-left: 2px solid var(--gold);
  background: rgba(20, 32, 30, 0.94);
  box-shadow: 0 12px 30px rgba(10, 18, 16, 0.2);
  font-size: 9px;
  line-height: 1.5;
  animation: toastIn 250ms ease both;
  backdrop-filter: blur(8px);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(13px);
  }
}

.toast.is-out {
  opacity: 0;
  transform: translateX(13px);
  transition: opacity 220ms ease, transform 220ms ease;
}

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

  .topnav {
    justify-self: center;
    gap: 23px;
  }

  .room-pill {
    display: none;
  }

  .lobby-body {
    grid-template-columns: minmax(0, 1fr) 235px;
    gap: 23px;
  }

  .game-card {
    grid-template-columns: 41% 59%;
  }

  .game-meta span:nth-child(2) {
    display: none;
  }

  .hero-card-front {
    right: 27%;
  }

  .hero-card-back {
    right: 5%;
  }

  .manual-content {
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 22px;
    padding: 28px;
  }

  .player-seat.seat-top-left {
    left: 23%;
  }

  .player-seat.seat-top-right {
    right: 23%;
  }
}

@media (max-width: 980px) {
  :root {
    --rail-w: 74px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }

  .topnav {
    display: none;
  }

  .page-view {
    padding-right: 24px;
    padding-left: 24px;
  }

  .lobby-hero {
    min-height: 410px;
  }

  .hero-copy h1 {
    font-size: clamp(51px, 7vw, 67px);
  }

  .hero-art {
    min-height: 410px;
    transform: scale(0.9);
    transform-origin: center right;
  }

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

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

  .aside-note {
    grid-column: 1 / -1;
  }

  .game-card {
    grid-template-columns: 42% 58%;
  }

  .manual-layout {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
  }

  .manual-content {
    grid-template-columns: 1fr;
  }

  .manual-side {
    display: none;
  }

  .table-stage::before {
    width: 84vw;
    height: 51vw;
  }

  .player-seat.seat-left {
    left: 15px;
  }

  .player-seat.seat-right {
    right: 15px;
  }
}

@media (max-width: 760px) {
  :root {
    --topbar-h: 70px;
    --rail-w: 0px;
  }

  .topbar {
    padding: 0 14px;
  }

  .brand-seal {
    width: 37px;
    height: 37px;
    font-size: 22px;
  }

  .brand-copy strong {
    font-size: 22px;
  }

  .brand-copy small {
    font-size: 6px;
  }

  .avatar-copy,
  .wallet-pill small,
  .wallet-plus {
    display: none;
  }

  .wallet-pill {
    min-width: 78px;
    padding: 5px 8px;
  }

  .wallet-pill > span:nth-child(2) {
    min-width: auto;
  }

  .side-rail {
    display: none;
  }

  main {
    width: 100%;
    margin-left: 0;
  }

  .page-view {
    padding: 0 16px 45px;
  }

  .lobby-hero {
    display: flex;
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 20px;
  }

  .hero-copy {
    padding: 41px 3px 6px;
  }

  .eyebrow {
    margin-bottom: 18px;
    font-size: 7px;
  }

  .hero-copy h1 {
    font-size: clamp(49px, 15vw, 68px);
  }

  .hero-lede br {
    display: none;
  }

  .hero-art {
    min-height: 320px;
    transform: scale(0.82);
    transform-origin: top center;
    margin: -12px 0 -48px;
  }

  .lobby-hero::before {
    display: none;
  }

  .hero-card-front {
    top: 48px;
    right: 31%;
  }

  .hero-card-back {
    top: 35px;
    right: 9%;
  }

  .moon-halo {
    top: 9px;
    right: 13%;
  }

  .hero-live-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 0;
  }

  .lobby-body {
    padding-top: 30px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .game-card {
    min-height: 205px;
    grid-template-columns: 39% 61%;
  }

  .game-visual {
    min-height: 205px;
  }

  .game-info {
    padding: 17px 14px 12px 16px;
  }

  .game-title-row h3 {
    font-size: 22px;
  }

  .game-info > p {
    margin-top: 11px;
  }

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

  .inner-page-heading {
    align-items: flex-start;
    padding-top: 42px;
  }

  .inner-page-heading h1 {
    font-size: 47px;
  }

  .stats-strip {
    grid-template-columns: 1fr 1fr;
  }

  .stat-block:nth-child(2) {
    border-right: 0;
  }

  .stat-block {
    min-height: 105px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
  }

  .ledger-row {
    grid-template-columns: 1.4fr 1fr 1fr;
    padding: 0 14px;
  }

  .ledger-row > *:nth-child(2),
  .ledger-row > *:nth-child(4) {
    display: none;
  }

  .manual-layout {
    display: flex;
    flex-direction: column;
  }

  .manual-nav {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .manual-tab {
    padding: 12px 6px;
    font-size: 10px;
  }

  .manual-tab:hover,
  .manual-tab.is-active {
    padding-left: 9px;
  }

  .manual-content {
    min-height: 0;
    padding: 24px 20px;
  }

  .manual-main h2 {
    font-size: 36px;
  }

  .table-topbar {
    min-height: 65px;
    padding: 0 14px;
  }

  .table-back {
    font-size: 0;
  }

  .table-back svg {
    width: 22px;
    height: 22px;
  }

  .table-heading {
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }

  .table-heading h2 {
    font-size: 20px;
  }

  .table-room-no,
  .table-subtitle {
    display: none;
  }

  .mini-wallet {
    margin-right: 0;
    padding-right: 8px;
  }

  .mini-wallet .coin-icon {
    width: 24px;
    height: 24px;
  }

  .table-top-actions .icon-button:last-child {
    display: none;
  }

  .player-seat {
    width: 92px;
  }

  .seat-avatar {
    width: 44px;
    height: 44px;
    font-size: 17px;
  }

  .seat-name {
    font-size: 10px;
  }

  .seat-meta {
    flex-direction: column;
    gap: 1px;
  }

  .player-seat.seat-left {
    top: 24%;
    left: 6px;
    transform: none;
  }

  .player-seat.seat-right {
    top: 24%;
    right: 6px;
    transform: none;
  }

  .player-seat.seat-top {
    top: 18px;
  }

  .player-seat.seat-top-left {
    top: 18px;
    left: 28%;
  }

  .player-seat.seat-top-right {
    top: 18px;
    right: 28%;
  }

  .table-stage::before {
    top: 48%;
    width: 105vw;
    height: 82vw;
    border-radius: 43%;
  }

  .table-stage::after {
    width: 96vw;
    height: 72vw;
    border-radius: 43%;
  }

  .table-message {
    top: 43%;
  }

  .table-message strong {
    font-size: 19px;
  }

  .play-zone {
    top: 47%;
  }

  .play-zone .playing-card {
    width: 45px;
    height: 67px;
    margin-left: -22px;
  }

  .play-zone .playing-card .card-center {
    font-size: 18px;
  }

  .hand-zone {
    min-height: 111px;
    padding: 17px 18px 4px;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .hand-zone::-webkit-scrollbar,
  .tile-hand::-webkit-scrollbar {
    display: none;
  }

  .hand-zone .playing-card {
    width: 55px;
    height: 82px;
    margin-left: -27px;
  }

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

  .playing-card .card-center {
    font-size: 21px;
  }

  .player-self-info {
    align-self: flex-start;
    transform: none;
    margin-left: 20px;
  }

  .table-action-bar {
    min-height: 75px;
    padding: 8px 10px 12px;
  }

  .action-group {
    gap: 6px;
  }

  .table-action {
    min-width: 76px;
    padding: 10px 11px;
    font-size: 10px;
  }

  .player-seat .opponent-cards .playing-card {
    width: 27px;
    height: 39px;
    margin-left: -19px;
  }

  .seat-bubble {
    top: -2px;
    left: 44px;
  }

  .specific-board {
    gap: 10px;
  }

  .board-side {
    min-width: 120px;
  }

  .board-cards .playing-card {
    width: 43px;
    height: 65px;
    margin-left: -19px;
  }

  .board-cards .playing-card .card-center {
    font-size: 17px;
  }

  .betting-options {
    width: 100%;
    justify-content: center;
  }

  .bet-option {
    min-width: 65px;
    padding: 8px;
  }

  .tile-hand {
    overflow-x: auto;
    justify-content: flex-start;
    padding-left: 12px;
    scrollbar-width: none;
  }

  .hu-tile {
    width: 31px;
    height: 55px;
    font-size: 16px;
  }

  .result-layer {
    padding: 14px;
  }

  .result-card {
    padding: 29px 23px 24px;
  }

  .result-card h2 {
    font-size: 37px;
  }

  .toast-stack {
    top: 80px;
    right: 12px;
  }
}

@media (max-width: 390px) {
  .top-actions {
    gap: 7px;
  }

  .avatar-button .avatar {
    width: 31px;
    height: 31px;
  }

  .game-card {
    grid-template-columns: 36% 64%;
  }

  .card-fan {
    width: 62px;
    height: 91px;
  }

  .card-f1 {
    left: 8px;
  }

  .card-f2 {
    left: calc(50% - 31px);
  }

  .card-f3 {
    left: calc(50% + 14px);
  }

  .player-seat.seat-top-left {
    left: 22%;
  }

  .player-seat.seat-top-right {
    right: 22%;
  }

  .table-action {
    min-width: 64px;
    padding: 9px 7px;
    font-size: 9px;
  }

  .action-group {
    gap: 5px;
  }
}

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