:root {
  --text: #fff8e8;
  --muted: rgba(255, 248, 232, 0.7);
  --gold: #ffd36b;
  --green: #24c581;
  --red: #e74745;
  --panel: rgba(12, 18, 34, 0.76);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background: #101326;
}

button {
  border: 0;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

#codex-browser-sidebar-comments-root {
  display: none !important;
  pointer-events: none !important;
}

.hidden {
  display: none !important;
}

.app,
.login-page,
.lobby,
.rooms,
.club-page,
.admin-page,
.room {
  width: 100vw;
  height: 100vh;
  min-width: 320px;
  min-height: 620px;
  overflow: hidden;
}

.login-page {
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 211, 107, 0.2), transparent 32%),
    radial-gradient(ellipse at 50% 58%, rgba(36, 197, 129, 0.28), transparent 42%),
    linear-gradient(180deg, #172141, #123d36 58%, #151327);
}

.login-card {
  display: grid;
  gap: 12px;
  width: min(100%, 360px);
  padding: 24px;
  border-radius: 22px;
  background: rgba(12, 18, 34, 0.78);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.login-card span {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 211, 107, 0.92);
  color: #2a1a03;
  font-size: 12px;
  font-weight: 950;
}

.login-card strong {
  font-size: 30px;
  line-height: 1.08;
}

.login-card em,
.login-card p {
  margin: 0;
  color: rgba(255, 248, 232, 0.72);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.login-card input {
  height: 46px;
  padding: 0 13px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #162032;
  font: inherit;
  font-weight: 900;
  outline: 0;
}

.login-card button {
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe08a, #c2842f);
  color: #271802;
  font-size: 16px;
  font-weight: 950;
}

.lobby {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  padding: max(14px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 24%, rgba(75, 108, 255, 0.5), transparent 38%),
    radial-gradient(ellipse at 50% 58%, rgba(160, 80, 225, 0.32), transparent 42%),
    linear-gradient(180deg, #21194d, #241b62 48%, #171433);
}

.lobby::before {
  content: "";
  position: absolute;
  inset: 120px 0 66px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 26%),
    radial-gradient(ellipse at 50% 48%, rgba(255, 255, 255, 0.12), transparent 60%);
  pointer-events: none;
}

.rooms {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: max(18px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 72% 12%, rgba(255, 211, 107, 0.18), transparent 32%),
    radial-gradient(ellipse at 30% 28%, rgba(36, 197, 129, 0.32), transparent 38%),
    linear-gradient(180deg, #172141, #123d36 58%, #151327);
}

.rooms.rules-active,
.rooms:has(.sangong-rules:not(.hidden)) {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.98), transparent 29%),
    radial-gradient(ellipse at 88% 10%, rgba(255, 255, 255, 0.78), transparent 24%),
    radial-gradient(ellipse at 16% 25%, rgba(98, 196, 255, 0.22), transparent 30%),
    radial-gradient(ellipse at 50% 82%, rgba(128, 217, 255, 0.22), transparent 38%),
    linear-gradient(180deg, #bfe8ff 0%, #eefaff 32%, #f8fdff 100%);
}

.rooms.rules-active .topbar,
.rooms:has(.sangong-rules:not(.hidden)) .topbar {
  min-height: 50px;
  color: #143966;
}

.rooms.rules-active .topbar span,
.rooms:has(.sangong-rules:not(.hidden)) .topbar span {
  color: #183f73;
  font-size: 15px;
  letter-spacing: 1px;
}

.rooms.rules-active .topbar h1,
.rooms:has(.sangong-rules:not(.hidden)) .topbar h1 {
  display: none;
}

.rooms.rules-active .back-pill,
.rooms.rules-active .wallet,
.rooms:has(.sangong-rules:not(.hidden)) .back-pill,
.rooms:has(.sangong-rules:not(.hidden)) .wallet {
  border: 1px solid rgba(221, 189, 112, 0.72);
  background: rgba(255, 255, 255, 0.76);
  color: #28629d;
  box-shadow: 0 6px 16px rgba(74, 142, 191, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.rooms.rules-active .back-pill,
.rooms:has(.sangong-rules:not(.hidden)) .back-pill {
  position: relative;
  width: 76px;
  height: 39px;
  padding-left: 27px;
  border-radius: 999px;
  font-size: 15px;
  text-align: left;
}

.rooms.rules-active .back-pill::before,
.rooms:has(.sangong-rules:not(.hidden)) .back-pill::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 14px;
  width: 9px;
  height: 9px;
  border-bottom: 2px solid #28629d;
  border-left: 2px solid #28629d;
  transform: rotate(45deg);
}

.rooms.rules-active .wallet,
.rooms:has(.sangong-rules:not(.hidden)) .wallet {
  display: flex;
  align-items: center;
  height: 39px;
  padding: 0 11px 0 10px;
  border-radius: 999px;
  color: #27706d;
  font-size: 13px;
  gap: 5px;
}

.rooms.rules-active .wallet::before,
.rooms:has(.sangong-rules:not(.hidden)) .wallet::before {
  content: "♧";
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 2px solid #f9dc83;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff5b4, #e9a83b 60%, #c98518);
  color: #9c6714;
  font-size: 11px;
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.8);
}

.rooms.rules-active .wallet strong,
.rooms:has(.sangong-rules:not(.hidden)) .wallet strong {
  color: #127768;
  font-size: 20px;
  letter-spacing: 1px;
}

.club-page {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: max(18px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 74% 14%, rgba(255, 211, 107, 0.18), transparent 32%),
    radial-gradient(ellipse at 32% 30%, rgba(86, 111, 255, 0.28), transparent 40%),
    linear-gradient(180deg, #172141, #143b43 56%, #151327);
}

.admin-page {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: max(18px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 70% 16%, rgba(255, 211, 107, 0.18), transparent 30%),
    radial-gradient(ellipse at 25% 32%, rgba(36, 197, 129, 0.24), transparent 36%),
    linear-gradient(180deg, #172141, #26304d 58%, #151327);
}

.admin-desktop {
  min-height: 100vh;
  padding: 28px;
  color: var(--text);
  background:
    radial-gradient(ellipse at 72% 12%, rgba(255, 211, 107, 0.18), transparent 30%),
    radial-gradient(ellipse at 24% 28%, rgba(36, 197, 129, 0.24), transparent 36%),
    linear-gradient(180deg, #172141, #26304d 58%, #151327);
}

.admin-desktop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto 18px;
}

.admin-desktop-head span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 950;
}

.admin-desktop-head h1 {
  max-width: none;
  font-size: 34px;
}

.admin-desktop-head a {
  display: grid;
  place-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe08a, #c2842f);
  color: #271802;
  font-weight: 950;
  text-decoration: none;
}

.admin-desktop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lobby-profile {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(32, 45, 102, 0.9), rgba(38, 28, 88, 0.86));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 22px rgba(0, 0, 0, 0.24);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.58), transparent 20%),
    linear-gradient(145deg, #ffe08a, #bc6d22);
  color: #2b1905;
  font-size: 24px;
  font-weight: 950;
}

.profile-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 148px;
  font-size: 17px;
}

.profile-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-balance {
  min-width: 88px;
  padding: 7px 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.profile-balance strong {
  display: block;
  color: var(--gold);
  font-size: 20px;
}

.room-card-balance strong {
  color: #78f0bd;
}

.lobby-title {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding-top: 2px;
}

.lobby-title span {
  color: rgba(255, 248, 232, 0.68);
  font-size: 12px;
  font-weight: 800;
}

.lobby-title h1 {
  max-width: none;
  font-size: 28px;
  color: rgba(255, 248, 232, 0.92);
}

.back-pill {
  width: 58px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.topbar span,
.room-head span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

h1,
h2 {
  margin: 3px 0 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 190px;
  font-size: 34px;
}

h2 {
  font-size: 27px;
  text-align: center;
}

.wallet,
.pot {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.wallet strong,
.pot strong {
  margin-left: 5px;
  color: var(--gold);
  font-size: 17px;
}

.room-list {
  display: grid;
  grid-template-rows: repeat(3, minmax(132px, 1fr));
  gap: 12px;
  min-height: 0;
}

.create-table {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 12px;
  min-height: 0;
}

.game-lounge {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 14px;
  min-height: 0;
}

.club-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-height: 0;
}

.admin-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
}

.admin-card,
.league-create-card {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 18px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 76% 24%, rgba(255, 224, 138, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(31, 92, 73, 0.96), rgba(48, 44, 120, 0.94));
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.26), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.admin-card span,
.league-create-card span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 211, 107, 0.92);
  color: #2a1a03;
  font-size: 12px;
  font-weight: 950;
}

.admin-card strong,
.league-create-card strong {
  font-size: 28px;
  line-height: 1.08;
}

.admin-card em,
.league-create-card em {
  max-width: 250px;
  color: rgba(255, 248, 232, 0.76);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.admin-control {
  display: grid;
  gap: 8px;
}

.cost-control {
  grid-template-columns: minmax(0, 1fr) 92px;
}

.resource-control {
  grid-template-columns: minmax(0, 1fr) 96px 82px;
}

.admin-control input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #162032;
  font: inherit;
  font-weight: 950;
  outline: 0;
}

.league-name-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: #162032;
  font: inherit;
  font-weight: 950;
  outline: 0;
}

.admin-control button,
.create-league-btn,
.logout-btn {
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffe08a, #c2842f);
  color: #271802;
  font-weight: 950;
}

.logout-btn {
  padding: 0 14px;
}

.admin-note,
.league-cost {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(255, 248, 232, 0.78);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

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

.my-stats div {
  display: grid;
  gap: 3px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}

.my-stats span {
  color: rgba(255, 248, 232, 0.68);
  font-size: 12px;
  font-weight: 850;
}

.my-stats strong {
  font-size: 20px;
}

.admin-users {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.admin-users-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 248, 232, 0.76);
  font-size: 12px;
  font-weight: 850;
}

.admin-users-head strong {
  color: var(--text);
  font-size: 18px;
}

.admin-table {
  display: grid;
  gap: 6px;
  overflow: auto;
  padding-bottom: 2px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.55fr 0.75fr 0.85fr;
  gap: 8px;
  align-items: center;
  min-width: 520px;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 248, 232, 0.86);
  text-align: left;
  font-size: 12px;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.admin-row-head {
  min-height: 34px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--gold);
}

.admin-empty {
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 248, 232, 0.76);
  font-weight: 850;
}

.admin-users-wide,
.admin-desktop-grid .admin-note {
  grid-column: 1 / -1;
}

.league-cost b {
  color: var(--gold);
}

.league-message {
  width: 100%;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(36, 197, 129, 0.14);
  color: rgba(255, 248, 232, 0.82);
  font-size: 13px;
  font-weight: 900;
}

.league-message.warn {
  background: rgba(231, 71, 69, 0.16);
  color: #ffe08a;
}

.create-league-btn {
  width: 132px;
}

.club-title {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.club-title span {
  color: rgba(255, 248, 232, 0.68);
  font-size: 12px;
  font-weight: 850;
}

.club-title strong {
  font-size: 24px;
  line-height: 1.08;
}

.club-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 4px;
}

.club-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.club-empty strong {
  font-size: 22px;
}

.club-empty span {
  max-width: 230px;
  color: rgba(255, 248, 232, 0.68);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.club-table-card {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 7px;
  min-height: 128px;
  padding: 16px;
  border-radius: 18px;
  overflow: hidden;
  text-align: left;
  background:
    radial-gradient(ellipse at 80% 30%, rgba(255, 224, 138, 0.28), transparent 34%),
    linear-gradient(135deg, rgba(31, 92, 73, 0.96), rgba(47, 46, 127, 0.94));
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.26), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.club-table-card::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 22px;
  width: 62px;
  height: 82px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #fff 0 72%, #ece6d9 73%),
    #fff;
  transform: rotate(8deg);
  box-shadow: -18px 14px 0 -8px rgba(255, 255, 255, 0.86), 0 12px 18px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.club-table-card span,
.club-table-card strong,
.club-table-card em,
.club-table-card i {
  position: relative;
  z-index: 1;
}

.club-table-card span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 211, 107, 0.92);
  color: #2a1a03;
  font-size: 12px;
  font-weight: 950;
}

.club-table-card strong {
  max-width: 230px;
  font-size: 22px;
  line-height: 1.12;
}

.club-table-card em {
  max-width: 240px;
  color: rgba(255, 248, 232, 0.78);
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.4;
}

.club-table-card i {
  display: grid;
  place-items: center;
  min-width: 132px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe08a, #c2842f);
  color: #271802;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.lounge-hero {
  position: relative;
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 330px;
  padding: 22px;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 70% 18%, rgba(255, 224, 138, 0.26), transparent 34%),
    radial-gradient(ellipse at 42% 48%, rgba(86, 111, 255, 0.35), transparent 46%),
    linear-gradient(145deg, rgba(42, 64, 128, 0.96), rgba(54, 34, 117, 0.94));
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.lounge-hero::after {
  content: "";
  position: absolute;
  right: 26px;
  top: 48px;
  width: 112px;
  height: 148px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, #fff 0 72%, #ece6d9 73%),
    #fff;
  transform: rotate(8deg);
  box-shadow: -28px 22px 0 -10px rgba(255, 255, 255, 0.84), 0 16px 24px rgba(0, 0, 0, 0.26);
}

.lounge-hero span,
.lounge-hero strong,
.lounge-hero em {
  position: relative;
  z-index: 1;
}

.lounge-hero span {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 211, 107, 0.92);
  color: #2a1a03;
  font-size: 12px;
  font-weight: 950;
}

.lounge-hero strong {
  font-size: 46px;
  line-height: 1;
}

.lounge-hero em {
  max-width: 220px;
  color: rgba(255, 248, 232, 0.78);
  font-size: 14px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.45;
}

.lounge-action {
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 248, 232, 0.86);
  font-size: 17px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.lounge-action.primary {
  background: linear-gradient(180deg, #ffe08a, #c2842f);
  color: #271802;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.26);
}

.create-card {
  position: relative;
  padding: 20px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 78% 26%, rgba(255, 224, 138, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(39, 73, 126, 0.96), rgba(44, 29, 100, 0.94));
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.create-card::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 22px;
  width: 86px;
  height: 110px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, #fff 0 72%, #ece6d9 73%),
    #fff;
  transform: rotate(8deg);
  box-shadow: -22px 17px 0 -9px rgba(255, 255, 255, 0.86), 0 12px 18px rgba(0, 0, 0, 0.24);
}

.create-card span,
.create-card strong,
.create-card em {
  position: relative;
  z-index: 1;
}

.create-card span {
  display: inline-grid;
  place-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 211, 107, 0.92);
  color: #2a1a03;
  font-size: 12px;
  font-weight: 950;
}

.create-card strong {
  display: block;
  margin-top: 10px;
  font-size: 38px;
  line-height: 1.05;
}

.create-card em {
  display: block;
  max-width: 210px;
  margin-top: 6px;
  color: rgba(255, 248, 232, 0.76);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.setting-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}

.setting-group label {
  color: rgba(255, 248, 232, 0.78);
  font-size: 13px;
  font-weight: 950;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.segmented button,
.rule-option {
  min-height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 248, 232, 0.78);
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.segmented button.active,
.rule-option.active {
  background: linear-gradient(180deg, #ffe08a, #c2842f);
  color: #271802;
}

.bet-range-config {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bet-range-config div {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.bet-range-config span {
  color: rgba(255, 248, 232, 0.68);
  font-size: 12px;
  font-weight: 900;
}

.bet-range-config input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 9px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #151729;
  font-size: 16px;
  font-weight: 950;
  outline: none;
}

.rule-list {
  display: grid;
  gap: 8px;
}

.rule-option {
  display: grid;
  gap: 3px;
  justify-items: start;
  padding: 10px 12px;
  text-align: left;
}

.rule-option strong {
  font-size: 15px;
}

.rule-option span {
  color: inherit;
  opacity: 0.78;
  font-size: 12px;
  font-weight: 800;
}

.create-btn {
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe08a, #c2842f);
  color: #271802;
  font-size: 17px;
  font-weight: 950;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.26);
}

.sangong-rules {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0 8px;
  color: #143966;
}

.sangong-rules .rules-title-area {
  display: grid;
  justify-items: center;
  gap: 0;
  margin-top: -16px;
}

.sangong-rules .rules-sub-title {
  color: #183f73;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 2px;
}

.sangong-rules .rules-sub-title::before,
.sangong-rules .rules-sub-title::after {
  content: "✦";
  margin: 0 7px;
  color: #e9bd55;
  font-size: 9px;
}

.sangong-rules .rules-main-title {
  color: #16497b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 950;
  line-height: 0.95;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.86), 0 6px 14px rgba(20, 73, 124, 0.12);
}

.sangong-rules .rules-title-line {
  position: relative;
  width: 84px;
  height: 8px;
}

.sangong-rules .rules-title-line::before,
.sangong-rules .rules-title-line::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 33px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d7a33a);
}

.sangong-rules .rules-title-line::before {
  left: 0;
}

.sangong-rules .rules-title-line::after {
  right: 0;
  transform: scaleX(-1);
}

.sangong-rules .rules-title-line div {
  width: 6px;
  height: 6px;
  margin: 0 auto;
  border-radius: 2px;
  background: linear-gradient(135deg, #50d3c7, #ffffff, #d9a039);
  transform: rotate(45deg);
}

.sangong-rules .create-card {
  display: grid;
  align-content: center;
  min-height: 54px;
  margin: 0;
  padding: 11px 14px;
  border: 2px solid rgba(238, 204, 131, 0.78);
  border-radius: 16px;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.92) 0%, rgba(239, 253, 255, 0.88) 100%);
  box-shadow: 0 8px 16px rgba(91, 151, 191, 0.14), inset 0 0 0 2px rgba(255, 255, 255, 0.72);
}

.sangong-rules .create-card::before {
  display: none;
}

.sangong-rules .create-card::after {
  display: none;
}

.sangong-rules .create-card span {
  display: none;
}

.sangong-rules .create-card span::before {
  content: "♕";
  margin-right: 4px;
  color: #d79f35;
}

.sangong-rules .create-card .decor-line {
  display: none;
}

.sangong-rules .create-card .decor-line::before,
.sangong-rules .create-card .decor-line::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  background: #d9a642;
  transform: rotate(45deg);
}

.sangong-rules .create-card .decor-line::before {
  left: -7px;
}

.sangong-rules .create-card .decor-line::after {
  left: 12px;
  border: 1px solid #d9a642;
  background: #fff;
}

.sangong-rules .create-card strong {
  display: none;
}

.sangong-rules .create-card em {
  max-width: none;
  margin-top: 0;
  color: #244160;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}

.sangong-rules .card-stack {
  display: none;
}

.sangong-rules .card-back {
  position: absolute;
  right: 18px;
  top: 16px;
  width: 38px;
  height: 56px;
  border: 2px solid #e6c46d;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(34, 138, 145, 0.95), rgba(167, 231, 221, 0.9)),
    repeating-linear-gradient(45deg, transparent 0 6px, rgba(255, 255, 255, 0.18) 6px 7px);
  box-shadow: 0 10px 18px rgba(37, 99, 132, 0.2);
  transform: rotate(-4deg);
}

.sangong-rules .play-card {
  position: absolute;
  right: 0;
  top: 0;
  width: 46px;
  height: 68px;
  border: 1px solid rgba(222, 194, 130, 0.75);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 9px 18px rgba(38, 91, 122, 0.23), inset 0 0 0 1px rgba(226, 219, 202, 0.9);
  transform: rotate(8deg);
}

.sangong-rules .play-card div,
.sangong-rules .play-card span {
  position: absolute;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #143966;
  font-family: Georgia, serif;
}

.sangong-rules .play-card div {
  left: 6px;
  top: 5px;
  font-size: 12px;
}

.sangong-rules .play-card strong {
  position: absolute;
  left: 11px;
  top: 19px;
  margin: 0;
  color: #16497b;
  font-size: 28px;
  letter-spacing: 0;
  text-shadow: 0 1px 0 #f7d77e, 0 0 8px rgba(221, 163, 47, 0.35);
}

.sangong-rules .play-card span {
  right: 6px;
  bottom: 5px;
  font-size: 12px;
  transform: rotate(180deg);
}

.sangong-rules .setting-group {
  gap: 10px;
  padding: 11px 12px 12px;
  border: 1px solid rgba(167, 207, 229, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 8px 20px rgba(86, 151, 190, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.sangong-rules .setting-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #167c7a;
  font-size: 18px;
  font-weight: 950;
}

.sangong-rules .setting-group label::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1px solid #21a893;
  border-radius: 2px;
  background: linear-gradient(135deg, #49d3bd, #fff, #d7a341);
  transform: rotate(45deg);
}

.sangong-rules .bet-range-config {
  gap: 10px;
}

.sangong-rules .bet-range-config > div {
  min-height: 78px;
  padding: 11px 12px;
  border: 1px solid rgba(191, 211, 223, 0.88);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 15px rgba(90, 150, 188, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.sangong-rules .bet-range-config > div > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #406385;
  font-size: 14px;
  font-weight: 900;
}

.sangong-rules .bet-range-config > div > span::before {
  content: "◉";
  color: #d8a044;
}

.sangong-rules .input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  margin-top: 4px;
  padding: 0 10px;
  border: 1px solid rgba(226, 190, 135, 0.72);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.sangong-rules .input-value {
  width: min(100%, 82px);
  padding: 0;
  border: 0;
  background: transparent;
  color: #082d57;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 950;
}

.sangong-rules .stepper {
  position: relative;
  width: 12px;
  height: 24px;
}

.sangong-rules .stepper::before,
.sangong-rules .stepper::after {
  content: "";
  position: absolute;
  left: 1px;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
}

.sangong-rules .stepper::before {
  top: 2px;
  border-bottom: 6px solid #6c9ccc;
}

.sangong-rules .stepper::after {
  bottom: 2px;
  border-top: 6px solid #6c9ccc;
}

.sangong-rules .segmented {
  gap: 8px;
}

.sangong-rules .segmented button {
  position: relative;
  height: 48px;
  border: 1px solid #75b4f7;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #245486;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 5px 12px rgba(102, 162, 202, 0.12);
}

.sangong-rules .segmented button.active {
  border-color: rgba(229, 181, 70, 0.95);
  background:
    radial-gradient(ellipse at 50% 10%, rgba(255, 255, 255, 0.46), transparent 50%),
    linear-gradient(180deg, #6ee6c9 0%, #27b99e 100%);
  color: #fff;
  box-shadow: 0 9px 18px rgba(34, 173, 150, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 rgba(18, 125, 113, 0.25);
}

.sangong-rules .segmented button.active::before {
  content: "♕";
  position: absolute;
  top: -14px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #f9d98a;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff0a2, #d9a13b);
  color: #956912;
  font-size: 12px;
  transform: translateX(-50%);
}

.sangong-rules .rule-list {
  gap: 9px;
}

.sangong-rules .rule-option {
  display: grid;
  grid-template-columns: 48px 1fr 14px;
  grid-template-rows: auto auto;
  align-items: center;
  min-height: 68px;
  padding: 9px 12px;
  border: 1px solid rgba(195, 215, 228, 0.92);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.8);
  color: #143d6d;
  text-align: left;
  box-shadow: 0 8px 15px rgba(90, 150, 188, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.sangong-rules .rule-option i {
  grid-column: 1;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid #edd07b;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #91f0df, #35b69d 48%, #178778 100%);
  color: #ffe899;
  font-size: 23px;
  font-style: normal;
  box-shadow: 0 5px 12px rgba(42, 155, 142, 0.22);
}

.sangong-rules .rule-option strong {
  grid-column: 2;
  grid-row: 1;
  padding-left: 12px;
  color: #143d6d;
  font-size: 18px;
  font-weight: 950;
}

.sangong-rules .rule-option span {
  grid-column: 2;
  grid-row: 2;
  padding-left: 12px;
  color: #496784;
  font-size: 12px;
  opacity: 1;
}

.sangong-rules .rule-option::after {
  content: "";
  grid-column: 3;
  grid-row: 1 / 3;
  width: 9px;
  height: 9px;
  border-top: 2px solid #d39a37;
  border-right: 2px solid #d39a37;
  transform: rotate(45deg);
}

.sangong-rules .rule-option.active {
  border-color: rgba(229, 181, 70, 0.9);
  background: rgba(232, 255, 250, 0.94);
}

.sangong-rules .create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  margin-top: 0;
  border: 2px solid #eed17f;
  border-radius: 34px;
  background:
    radial-gradient(ellipse at 50% 15%, rgba(255, 255, 255, 0.34), transparent 55%),
    linear-gradient(180deg, #73e6ca 0%, #27b89d 100%);
  color: #fff;
  font-size: 23px;
  font-weight: 950;
  letter-spacing: 3px;
  box-shadow: 0 10px 20px rgba(37, 170, 150, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.65), inset 0 -3px 0 rgba(16, 118, 105, 0.28);
}

.sangong-rules .create-btn::before,
.sangong-rules .create-btn::after {
  content: "◇";
  color: #f8d982;
  font-size: 18px;
}

.sangong-rules .create-btn span {
  margin: 0 28px;
  text-shadow: 0 2px 4px rgba(0, 80, 70, 0.2);
}

.room-card {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  overflow: hidden;
  text-align: left;
  background:
    radial-gradient(ellipse at 78% 38%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(37, 72, 115, 0.98), rgba(17, 82, 69, 0.96));
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.room-card::before {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 224, 138, 0.95), rgba(189, 126, 42, 0.92) 62%, rgba(74, 43, 12, 0.7) 64%);
  transform: translateY(-50%);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.room-card::after {
  content: "桌";
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  color: #3a2207;
  font-size: 30px;
  font-weight: 950;
  pointer-events: none;
}

.room-card.mid {
  background:
    radial-gradient(ellipse at 78% 38%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(85, 58, 26, 0.98), rgba(168, 105, 24, 0.96));
}

.room-card.high {
  background:
    radial-gradient(ellipse at 78% 38%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(61, 38, 98, 0.98), rgba(117, 62, 177, 0.96));
}

.room-card span,
.room-card strong,
.room-card em,
.room-card i {
  position: relative;
  z-index: 1;
}

.room-card span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 211, 107, 0.92);
  color: #2a1a03;
  font-size: 12px;
  font-weight: 950;
}

.room-card strong {
  font-size: 30px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
}

.room-card em {
  color: rgba(255, 248, 232, 0.82);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.room-card i {
  display: grid;
  place-items: center;
  width: 96px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe08a, #c2842f);
  color: #271802;
  font-size: 13px;
  font-style: normal;
  font-weight: 950;
}

.game-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 82px;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: visible;
}

.game-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  align-content: center;
  justify-items: start;
  gap: 2px 10px;
  min-height: 82px;
  padding: 10px 12px;
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 9px 16px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.game-card::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 50px;
  border-radius: 7px;
  background:
    linear-gradient(135deg, #fff 0 72%, #ece6d9 73%),
    #fff;
  transform: rotate(9deg);
  box-shadow: -13px 10px 0 -6px rgba(255, 255, 255, 0.88), 0 8px 14px rgba(0, 0, 0, 0.2);
  opacity: 0.92;
  pointer-events: none;
}

.game-card::after {
  content: "A";
  position: absolute;
  top: 19px;
  right: 28px;
  color: #d33131;
  font-size: 20px;
  font-weight: 950;
  transform: rotate(9deg);
  pointer-events: none;
}

.game-card.niu {
  background:
    radial-gradient(ellipse at 88% 48%, rgba(255, 230, 144, 0.22), transparent 30%),
    linear-gradient(135deg, #17563e, #0d7a55);
}

.game-card.gold {
  background:
    radial-gradient(ellipse at 88% 48%, rgba(255, 230, 144, 0.2), transparent 30%),
    linear-gradient(135deg, #6c3d12, #a06a18);
}

.game-card.palace {
  background:
    radial-gradient(ellipse at 88% 48%, rgba(255, 230, 144, 0.18), transparent 30%),
    linear-gradient(135deg, #3b2a6b, #7640b7);
  grid-column: 1 / -1;
}

.game-card span,
.game-card strong,
.game-card em,
.game-card i {
  position: relative;
  z-index: 1;
}

.game-card span {
  grid-column: 1;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 211, 107, 0.92);
  color: #2a1a03;
  font-size: 10px;
  font-weight: 950;
}

.game-card strong {
  grid-column: 1;
  max-width: 122px;
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
}

.game-card em {
  grid-column: 1;
  color: rgba(255, 248, 232, 0.82);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.game-card i {
  grid-column: 2;
  grid-row: 2 / 4;
  align-self: end;
  display: grid;
  place-items: center;
  width: 66px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe08a, #c2842f);
  color: #271802;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.bottom-nav {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(12, 10, 38, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 -8px 18px rgba(0, 0, 0, 0.18);
}

.bottom-nav button {
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 248, 232, 0.78);
  font-size: 14px;
  font-weight: 950;
}

.bottom-nav button.active {
  background: rgba(255, 255, 255, 0.11);
  color: rgba(255, 248, 232, 0.86);
}

.bottom-nav button.league-main {
  height: 48px;
  background: linear-gradient(180deg, #ffe08a, #c2842f);
  color: #271802;
  font-size: 18px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.room {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 34%, rgba(35, 202, 138, 0.64), rgba(24, 115, 86, 0.36) 34%, transparent 66%),
    linear-gradient(180deg, #182348, #0d3c33 58%, #151426);
}

.room::before {
  content: "";
  position: absolute;
  top: 126px;
  right: -32%;
  left: -32%;
  height: 52vh;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, rgba(38, 211, 143, 0.78), rgba(13, 100, 73, 0.88) 58%, rgba(8, 39, 35, 0.94) 60%);
  box-shadow: inset 0 18px 45px rgba(255, 255, 255, 0.08), 0 0 35px rgba(32, 236, 155, 0.28);
}

.room-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 8px;
}

.room-head button {
  width: 58px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 950;
}

.room-head div:nth-child(2) {
  min-width: 0;
  text-align: center;
}

.table {
  position: relative;
  z-index: 1;
  min-height: 0;
}

.player {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 5px;
}

.player.top {
  top: 4px;
  left: 50%;
  transform: translateX(-50%) scale(0.82);
}

.player.left {
  top: 31%;
  left: -12px;
  transform: translateY(-50%) scale(0.76);
}

.player.right {
  top: 31%;
  right: -12px;
  transform: translateY(-50%) scale(0.76);
}

.player.self {
  right: 0;
  bottom: 0;
  left: 0;
}

.seat-card {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 128px;
  padding: 5px 8px 5px 5px;
  border-radius: 999px;
  background: rgba(5, 13, 27, 0.64);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 7px 14px rgba(0, 0, 0, 0.22);
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.62), transparent 20%),
    linear-gradient(145deg, #ffe08a, #b96c24);
  color: #2b1905;
  font-size: 15px;
  font-weight: 950;
}

.self .avatar {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.62), transparent 20%),
    linear-gradient(145deg, #78f0bd, #16845f);
  color: #052015;
}

.nameplate {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 1px 6px;
  color: var(--muted);
  text-align: left;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.nameplate strong {
  color: var(--text);
  font-size: 13px;
}

.nameplate span {
  color: rgba(255, 211, 107, 0.9);
  font-size: 10px;
}

.nameplate em {
  grid-column: 1 / -1;
  color: rgba(255, 248, 232, 0.76);
  font-style: normal;
}

.cards {
  display: flex;
  justify-content: center;
  gap: 3px;
  min-height: 72px;
}

.card {
  position: relative;
  width: clamp(42px, 13vw, 56px);
  height: clamp(62px, 18vw, 82px);
  border-radius: 8px;
  background: #fffbf0;
  color: #181818;
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.3);
  display: grid;
  align-content: space-between;
  padding: 6px;
  font-weight: 950;
}

.opponent .card {
  width: 38px;
  height: 56px;
  border-radius: 7px;
  padding: 5px;
}

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

.card.back {
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.16), transparent 36%),
    repeating-linear-gradient(45deg, #23346d 0 8px, #192555 8px 16px);
  color: transparent;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.08), 0 7px 14px rgba(0, 0, 0, 0.3);
}

.rank {
  font-size: 18px;
  line-height: 1;
}

.suit {
  justify-self: end;
  font-size: 22px;
  line-height: 1;
}

.opponent .rank {
  font-size: 14px;
}

.opponent .suit {
  font-size: 17px;
}

.result {
  min-height: 21px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.26);
  color: #ffe08a;
  font-size: 12px;
  font-weight: 950;
}

.dealer {
  position: absolute;
  top: 38%;
  right: 12px;
  left: 12px;
  transform: translateY(-50%);
  display: grid;
  justify-items: center;
  gap: 7px;
}

.deck-stack {
  width: 58px;
  height: 76px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(45deg, #24346c 0 8px, #182655 8px 16px);
  box-shadow: 7px 5px 0 rgba(255, 255, 255, 0.2), 12px 9px 0 rgba(255, 255, 255, 0.12), 0 14px 22px rgba(0, 0, 0, 0.28);
}

.dealer p,
.round-log {
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.round-log {
  max-width: 92vw;
  color: var(--muted);
  border-radius: 12px;
  line-height: 1.45;
}

.actions {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.bet-slider {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(12, 19, 39, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.bet-slider div {
  display: grid;
  gap: 2px;
}

.bet-slider span {
  color: rgba(255, 248, 232, 0.66);
  font-size: 12px;
  font-weight: 900;
}

.bet-slider strong {
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
}

.bet-slider input {
  width: 100%;
  min-width: 0;
  accent-color: #f3c85d;
}

.bet-slider.disabled {
  opacity: 0.48;
}

.actions button {
  min-width: 0;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 14px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.actions button:nth-of-type(1),
.actions button:not(:disabled):last-child {
  background: linear-gradient(180deg, #ffe08a, #c2842f);
  color: #271802;
}

.actions button:disabled {
  opacity: 0.38;
}

@media (max-height: 700px) {
  .app,
  .lobby,
  .rooms,
  .club-page,
  .admin-page,
  .room {
    min-height: 560px;
  }

  h1 {
    font-size: 29px;
  }

  .game-grid {
    gap: 8px;
  }

  .game-card {
    min-height: 76px;
    padding: 9px 10px;
  }

  .room-list {
    gap: 9px;
  }

  .create-table {
    gap: 9px;
  }

  .game-lounge {
    gap: 10px;
  }

  .club-panel {
    gap: 9px;
  }

  .admin-panel {
    gap: 9px;
  }

  .admin-card,
  .league-create-card {
    padding: 15px;
  }

  .club-title {
    padding: 12px 14px;
  }

  .club-table-card {
    min-height: 116px;
    padding: 14px;
  }

  .lounge-hero {
    min-height: 270px;
    padding: 18px;
  }

  .lounge-hero strong {
    font-size: 38px;
  }

  .create-card {
    padding: 16px;
  }

  .create-card strong {
    font-size: 31px;
  }

  .setting-group {
    padding: 10px;
  }

  .room-card {
    padding: 14px;
  }

  .room-card strong {
    font-size: 26px;
  }

  .game-card strong {
    font-size: 20px;
  }

  .game-card::before {
    width: 34px;
    height: 46px;
  }

  .player.top {
    transform: translateX(-50%) scale(0.72);
  }

  .player.left,
  .player.right {
    top: 28%;
    transform: translateY(-50%) scale(0.68);
  }

  .seat-card {
    min-width: 122px;
  }

  .dealer {
    top: 36%;
  }

  .card {
    width: 40px;
    height: 58px;
  }

  .actions button {
    height: 38px;
    font-size: 13px;
  }
}

@media (min-width: 760px) {
  .admin-page {
    justify-items: center;
  }

  .admin-page .topbar,
  .admin-panel {
    width: min(960px, calc(100vw - 48px));
  }

  .admin-panel {
    grid-template-columns: 1fr 1fr;
    align-content: start;
  }

  .admin-card,
  .admin-note,
  .admin-users {
    grid-column: 1 / -1;
  }

  .admin-users {
    max-height: 42vh;
  }

  .admin-row {
    min-width: 0;
    font-size: 13px;
  }
}
