@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/BarlowCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #14161d;
  --panel: #20232c;
  --line: #343845;
  --text: #f5f6f9;
  --muted: #b1b8c6;
  --gold: #f3ca71;
  --gold-light: #ffdb8b;
  --green: #a2d28d;
  --radius: 18px;
  --page-width: 1184px;
  --topbar-bg: #20232c;
  --content-safe-top: env(safe-area-inset-top, 0px);
  --content-safe-bottom: env(safe-area-inset-bottom, 0px);
  touch-action: pan-x pan-y;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
.status-bar-surface { display: none; }
@media (display-mode: standalone) {
  :root { background: var(--topbar-bg); }
  /* WebKit samples this fixed surface to fill the native status bar.
     Clip its paint so it occupies no space and never covers controls. */
  .status-bar-surface {
    display: block;
    position: fixed;
    inset: 0 0 auto;
    height: 11px;
    background: var(--topbar-bg);
    -webkit-background-clip: text;
    background-clip: text;
    pointer-events: none;
    z-index: 5;
  }
}
/* The native status-bar viewport reports a zero bottom inset on tall iPhones.
   Keep the navigation and game actions above the home gesture area. */
@supports (-webkit-touch-callout: none) {
  @media (display-mode: standalone) and (pointer: coarse) and (max-width: 500px) and (max-aspect-ratio: 1/2) {
    :root { --content-safe-bottom: max(34px, env(safe-area-inset-bottom, 0px)); }
  }
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 54% 2%, #282b37 0, transparent 640px), var(--bg);
  color: var(--text);
  min-width: 300px;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .43; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
h1:focus { outline: none; }
.icon { width: 1.14em; height: 1.14em; flex: 0 0 auto; vertical-align: middle; }

.topbar {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid #454854;
  background: var(--topbar-bg);
}
@media (display-mode: standalone) {
  .topbar { position: sticky; top: 0; }
}
.topbar-inner {
  max-width: calc(var(--page-width) + 64px);
  min-height: calc(49px + var(--content-safe-top));
  padding-top: var(--content-safe-top);
  margin: auto;
  padding-inline: 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  justify-self: start;
  border: 0;
  background: none;
  padding: 5px 0;
  font: 700 1.63rem/.9 "Barlow Condensed", "Arial Narrow", sans-serif;
  letter-spacing: .07em;
  white-space: nowrap;
}
.brand-mark {
  display: block;
  flex: none;
  width: 35px;
  height: 35px;
  border-radius: 8px;
}
.brand-name { color: var(--gold); }
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #1c1e27;
  border: 1px solid #3c3f4d;
  border-radius: 12px;
}
.main-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  min-height: 40px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: .87rem;
  font-weight: 650;
}
.main-nav button:hover { color: var(--text); background: #343846; }
.main-nav button[aria-current] { color: var(--gold-light); background: #3a342b; box-shadow: inset 0 0 0 1px #f7cf6b2a; }
.balance {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 7px 6px 9px;
  min-height: 45px;
  border: 1px solid #515462;
  border-radius: 22px;
  background: linear-gradient(#373946, #272933);
  text-align: left;
}
.balance:hover { border-color: #a88950; }
.coin {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid #f7d68d;
  border-radius: 50%;
  color: #704818;
  background: linear-gradient(150deg, #ffe7a3 0%, #e3a34e 80%);
  box-shadow: inset 0 0 0 2px #a774362f;
  font: bold 16px/1 Georgia, serif;
}
.balance-copy { display: grid; gap: 1px; font-variant-numeric: tabular-nums; }
.balance-copy small { font-size: .63rem; font-weight: 700; letter-spacing: .07em; color: #b3ad98; }
.balance-copy strong { font-size: .98rem; }
.balance-plus {
  display: grid;
  place-items: center;
  height: 26px;
  width: 26px;
  border: 1px solid #55aa8c62;
  border-radius: 50%;
  background: #23443c;
  color: #91e1bf;
  font: 19px/1 system-ui, sans-serif;
}

.page {
  max-width: calc(var(--page-width) + 64px);
  margin-inline: auto;
  padding: 31px 32px 28px;
}
.button {
  min-height: 46px;
  padding: 0 17px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 720;
  font-size: .92rem;
  transition: background .17s ease, border-color .17s ease, box-shadow .17s ease;
}
.primary {
  color: #1e180c;
  background: linear-gradient(180deg, var(--gold-light), #e9b44f);
  border-color: #ffdb8b;
  box-shadow: inset 0 1px 0 #fff1beaa, 0 4px 15px #b486282b;
}
.primary:hover:not(:disabled) { background: #ffe09a; box-shadow: 0 4px 18px #ecbf5140; }
.secondary {
  background: #ffffff0b;
  border-color: #c6cfb443;
}
.secondary:hover:not(:disabled) { background: #ffffff16; border-color: #d0c7a477; }
.filters { display: flex; align-items: center; gap: 7px; }
.filters button {
  min-height: 38px;
  border: 1px solid #414553;
  border-radius: 8px;
  background: #22252f;
  color: #bec5d2;
  font-size: .81rem;
  font-weight: 650;
  white-space: nowrap;
  padding-inline: 13px;
}
.filters button:hover { border-color: #8b805a; color: var(--text); }
.filters [aria-pressed="true"] { color: var(--gold); background: #322b1b; border-color: #705935; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0;
  background: none;
  border: none;
  color: var(--gold);
  font-size: .86rem;
  font-weight: 680;
}
.text-button:hover { color: #fff0c1; }
.empty { display: flex; align-items: center; gap: 13px; padding: 21px 18px; }
.empty-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  background: #303644;
  color: #d8deed;
  border-radius: 11px;
}
.empty-icon.won-icon { background: #3a3227; color: var(--gold-light); }
.empty strong, .history-list strong { font-size: .94rem; }
.empty p, .history-list small { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.empty p { margin-top: 4px; }
.history-list { list-style: none; padding: 0; margin: 0; }
.history-list li + li { border-top: 1px solid var(--line); }
.history-item, .ledger-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 15px;
}
.history-item {
  border: 0;
  background: none;
  text-align: left;
  border-radius: 8px;
}
.history-item:focus-visible { outline-offset: -3px; }
.history-item:hover { background: #ffffff07; }
.history-item > .icon { color: #a5aabd; }
.list-copy { min-width: 0; display: grid; gap: 4px; }
.list-copy strong { overflow-wrap: anywhere; }
.entry-date { display: inline-block; }
.history-delta { margin-left: auto; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.history-delta span { font-size: .73rem; font-weight: 560; color: var(--muted); }
.positive { color: #9be4b6; }
.negative { color: #f7a6a0; }

.inner-page { max-width: 842px; padding-top: 41px; }
.page-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 23px; }
.page-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid #f9d88a39;
  background: linear-gradient(150deg, #473f33, #302c2a);
  border-radius: 13px;
  color: var(--gold-light);
  font-size: 1.13rem;
}
.page-heading h1 { font-size: clamp(1.9rem, 5.5vw, 3.15rem); letter-spacing: -.045em; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin: 0 0 17px;
}
.stat {
  padding: clamp(11px, 2.3vw, 23px);
  min-width: 0;
  display: grid;
  gap: 8px;
  background: linear-gradient(146deg, #2d323f, #222631 90%);
}
.stat > .icon { color: var(--gold); }
.stat dt { color: var(--muted); font-size: .85rem; }
.stat dd {
  margin: 0;
  min-width: 0;
  font: 700 clamp(1.45rem, 6vw, 2.75rem)/1 "Barlow Condensed", sans-serif;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.list-heading h2 { font-size: 1.07rem; letter-spacing: -.02em; }
.list-heading .filters { width: auto; flex: 0 0 auto; }
.list-heading .filters button { min-height: 38px; }

.wallet-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(17px, 4.4vw, 35px);
  min-height: 214px;
  border: 1px solid #526359;
  border-radius: 20px;
  background:
    repeating-linear-gradient(58deg, #f3ffe908 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 84% 58%, #2b6249, #143529 53%, #1d292a 88%);
}
.wallet-panel::before {
  content: "";
  position: absolute;
  z-index: -2;
  width: 380px;
  height: 380px;
  right: -51px;
  top: -98px;
  border: 1px solid #d2edb928;
  border-radius: 50%;
  box-shadow: 0 0 0 21px #d2edb90a, 0 0 0 51px #d2edb909;
}
.wallet-content { position: relative; display: grid; justify-items: start; gap: 8px; }
.wallet-content > span { color: #d2e8dd; font-size: .87rem; font-weight: 650; }
.wallet-content > strong {
  color: #fcf5e3;
  font: 700 clamp(3.35rem, 12.4vw, 5.6rem)/.91 "Barlow Condensed", sans-serif;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.wallet-content .button { margin-top: 9px; }
.wallet-art {
  position: absolute;
  z-index: -1;
  top: 43%;
  right: clamp(15px, 10%, 70px);
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: clamp(120px, 27vw, 185px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #fbdf8c;
  background: repeating-conic-gradient(#e5ae53 0deg 8deg, #a26c37 10deg 13deg);
  box-shadow: 0 0 0 3px #986732, 0 8px 19px #091c1670;
}
.wallet-art span {
  display: grid;
  place-items: center;
  width: 81%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid #9e6728;
  background: radial-gradient(circle at 32% 19%, #fbe3a4, #e0ae60 68%, #ba7d3a);
  box-shadow: inset 0 0 0 4px #f3d184;
  color: #7a4b21;
  font: 700 clamp(3rem, 12vw, 5.7rem)/1 Georgia, serif;
  text-shadow: 0 1px 0 #ffe3a6;
}
.wallet-ledger { margin-top: 18px; }

.profile-panel { padding: clamp(15px, 3.7vw, 28px); display: grid; gap: 20px; }
.profile-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: clamp(12px, 2.6vw, 20px);
  background: linear-gradient(128deg, #343846, #282c36 67%);
  border: 1px solid #484b5c;
  border-radius: 13px;
}
.profile-summary img {
  flex: none;
  width: clamp(57px, 15vw, 76px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid #e8c47c;
  border-radius: 50%;
  box-shadow: 0 3px 13px #080a16ae;
}
.profile-summary div { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.profile-summary strong { font-size: 1.35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-summary span { color: var(--muted); font-size: .85rem; }
.profile-name { display: grid; gap: 8px; }
.avatar-picker { min-width: 0; padding: 0; margin: 0; border: 0; }
.avatar-picker legend { padding: 0; margin-bottom: 8px; font-size: .89rem; font-weight: 700; }
.avatar-options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.avatar-options label {
  position: relative;
  cursor: pointer;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 55px;
  padding: 5px;
  background: #282d38;
  border: 1px solid #414959;
  border-radius: 12px;
}
.avatar-options label:hover { border-color: #c5ae83; }
.avatar-options label:has(:checked) { border-color: #f1c978; background: #3e362e; box-shadow: inset 0 0 0 1px #f1c97866; }
.avatar-options label:has(:focus-visible) { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.avatar-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: 0;
  clip-path: inset(50%);
}
.avatar-options img { width: min(100%, 62px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.profile-panel > .button { justify-self: start; }

.buy-in-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-content: end;
  align-items: end;
  min-height: 104px;
  margin-block: 0 12px;
  padding: 12px;
  border: 1px solid #ffffff20;
  border-radius: 13px;
  background: linear-gradient(180deg, #16192116, #1d202be6 100%), var(--room-image) center 52% / cover;
}
.buy-in-preview > div { display: flex; align-items: center; gap: 5px; font-size: .84rem; }
.buy-in-preview .icon { color: var(--room-accent); }
dialog .buy-in-balance { display: flex; justify-content: space-between; gap: 6px; font-size: .86rem; }
.record-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid #484e5e;
  background: #2c303c;
  border-radius: 10px;
}
.record-summary small { display: block; margin-top: 5px; color: var(--muted); font-size: .79rem; }
.record-summary > strong { flex: 0 0 auto; white-space: nowrap; }
.record-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin: 10px 0 0; }
.record-metrics > div { padding: 9px 10px; border: 1px solid #424857; border-radius: 9px; background: #222630; }
.record-metrics dt { color: var(--muted); font-size: .82rem; }
.record-metrics dd { margin: 4px 0 0; font-weight: 740; }
.record-cards { margin-top: 14px; }
.record-cards h3 { font-size: .86rem; margin-bottom: 7px; color: #e1e6ee; }
.record-cards > div { display: flex; gap: 6px; }
.record-cards .playing-card { width: clamp(34px, 16%, 57px); border-radius: 6px; }
.record-cards .card-corner { top: 3px; left: 4px; font-size: .73rem; }
.record-cards .card-corner small { font-size: .59rem; }
.record-cards .card-corner.opposite { inset: auto 4px 3px auto; }
.record-cards .card-pip { font-size: 1.55rem; }

body[data-view="table"] {
  background:
    radial-gradient(ellipse at 50% 67%, #174a3a 0, transparent 53%),
    radial-gradient(ellipse at 50% 12%, #282d37, #11171c 65%);
}
body[data-view="table"] .topbar { display: none; }
body[data-view="table"] #main {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.poker-screen {
  --felt-top: #148859;
  --felt-bottom: #0c4f37;
  --felt-line: #91deb36c;
  --card-color: #de4f52;
  --card-shadow: #a52e3f;
  --seat-arc: 14px;
  --chip-clearance: 8px;
  --chip-arc: clamp(12.5px, 4.375cqw, 22px);
  --chip-arc-room: max(0px, calc(var(--chip-arc) * var(--max-chip-curve) - 5px));
  container-type: inline-size;
  width: min(100%, 474px);
  min-height: min(920px, calc(100svh - 40px));
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  background: #1c2027;
  border: 1px solid #4a505d;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 24px 120px #030b0bc7, 0 2px 14px #03070a7c;
  color: #f5f7f8;
}
.poker-screen[data-theme="neon"] {
  --felt-top: #363948;
  --felt-bottom: #20222e;
  --felt-line: #998db661;
  --card-color: #534a87;
  --card-shadow: #383354;
}
.poker-screen[data-theme="gilded"] {
  --felt-top: #44413a;
  --felt-bottom: #272522;
  --felt-line: #ba9f6f69;
  --card-color: #997341;
  --card-shadow: #715026;
}
.poker-header {
  padding: calc(10px + var(--content-safe-top)) 13px 6px 8px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px auto;
  align-items: center;
  gap: 5px;
  background: var(--topbar-bg);
  border-bottom: 1px solid #5b5b66;
}
.table-back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 44px;
  border: none;
  border-radius: 11px;
  background: transparent;
  font-size: 1.34rem;
}
.table-back:hover, .table-log:hover { background: #ffffff13; }
.poker-title { min-width: 0; }
.poker-title h1 {
  font-size: clamp(1.04rem, 5cqw, 1.48rem);
  letter-spacing: -.037em;
  white-space: nowrap;
  margin-bottom: 3px;
}
.poker-title p {
  font-size: .76rem;
  line-height: 1.2;
  font-weight: 570;
  color: #b5becb;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.table-wallet {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: clamp(5px, 2cqw, 9px);
  padding: 3px 4px 3px 5px;
  border: 1px solid #4e5261;
  border-radius: 999px;
  background: linear-gradient(#3b3d4c, #252633);
  box-shadow: inset 0 1px 0 #f5f0ff12;
  font-size: clamp(.8rem, 4cqw, 1.08rem);
  font-variant-numeric: tabular-nums;
}
.table-wallet:hover { background: #424954; }
.table-wallet .coin {
  width: 29px;
  height: 29px;
  color: #80501b;
  box-shadow: inset 0 0 0 2px #c28638;
}
.wallet-plus {
  width: 27px;
  height: 27px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #84e0b8;
  background: #173d37;
  border: 1px solid #3d786a;
  font-size: 1.23rem;
  line-height: 1;
}
.seat-area {
  position: relative;
  background: linear-gradient(180deg, #1e1e27, #22222d);
  z-index: 1;
}
.seat-strip, .chip-rail {
  display: grid;
  grid-template-columns: repeat(var(--seat-count), minmax(0, 1fr));
  gap: 4px;
  padding-inline: 10px;
}
.seat-strip {
  list-style: none;
  margin: 0;
  padding-block: 21px 11px;
}
.seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
  gap: 3px;
  transform: translateY(calc(var(--seat-arc) * -.5));
}
.seat:is(:nth-child(2), :nth-last-child(2)) { transform: translateY(calc(var(--seat-arc) * -.25)); }
.seat:is(:first-child, :last-child) { transform: translateY(calc(var(--seat-arc) * .5)); }
.seat-name {
  font-size: clamp(.68rem, 3.2cqw, .93rem);
  color: #ccd2df;
  font-weight: 560;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  white-space: nowrap;
}
.seat.self .seat-name {
  color: #ffe08b;
  text-transform: uppercase;
  font-weight: 780;
  letter-spacing: .07em;
}
.seat-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  max-width: 100%;
  white-space: nowrap;
  font-size: clamp(.71rem, 3.48cqw, 1.05rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.seat-stack .icon {
  color: #f7bf61;
  font-size: .76em;
}
.seat-portrait { position: relative; max-width: 100%; margin-top: 4px; }
.avatar {
  width: clamp(37px, 16cqw, 68px);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  background: #3c4655;
  border: 1px solid #768090;
  box-shadow: inset 0 0 8px #1d2330, 0 3px 9px #080a10a6;
}
.seat-area[data-seat-count="6"] .avatar { width: clamp(34px, 13.5cqw, 60px); }
.seat-area:is([data-seat-count="7"], [data-seat-count="8"], [data-seat-count="9"], [data-seat-count="10"]) {
  .seat-strip, .chip-rail { gap: 2px; padding-inline: 6px; }
  .seat-name, .seat-stack, .seat-note { font-size: clamp(.49rem, 2.05cqw, .7rem); }
  .seat-stack .icon { display: none; }
  .seat-note { padding-inline: 2px; overflow: hidden; }
  .seat-note.revealed { gap: 2px; }
  .table-chip { width: min(100%, 9cqw); font-size: clamp(.5rem, 2.1cqw, .68rem); }
}
.seat .open-avatar {
  display: grid;
  place-items: center;
  color: #a5b0c2;
  font-size: clamp(1rem, 5cqw, 1.5rem);
  border-style: dashed;
  border-color: #768294a3;
  background: radial-gradient(circle at 47% 28%, #3b4053, #252833 75%);
  box-shadow: inset 0 3px 13px #181a22;
}
.seat.active .avatar, .seat.winning .avatar {
  border-color: #f8cb70;
  box-shadow: 0 0 0 2px #f4c96a4c, 0 3px 10px #080a10b6;
}
.seat.folded .avatar, .hero-seat.folded .private-cards { filter: saturate(.19) brightness(.63); }
.dealer {
  position: absolute;
  right: -1px;
  bottom: -2px;
  display: grid;
  place-items: center;
  height: 17px;
  width: 17px;
  border: 1px solid #494741;
  border-radius: 50%;
  background: #ffedba;
  color: #4a3322;
  font: 800 .65rem/1 system-ui, sans-serif;
}
.seat-note {
  min-height: 19px;
  display: grid;
  place-content: center;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid #353743;
  border-radius: 999px;
  font-size: clamp(.62rem, 2.78cqw, .76rem);
  line-height: 1.2;
  font-weight: 580;
  color: #c5ceda;
  background: linear-gradient(#191922, #111117);
  white-space: nowrap;
}
.active .seat-note, .winning .seat-note {
  color: #ffe08b;
  background: #342e25;
  border-color: #8d7248;
}
.folded .seat-note { color: #ffaca6; border-color: #75474b; background: #301f29; }
.seat-note.revealed { grid-auto-flow: column; gap: 4px; }
.seat-note.revealed .red { color: #ffc4bd; }
.chip-rail {
  min-height: 57px;
  align-items: center;
  position: relative;
  isolation: isolate;
  padding-block: 8px calc(9px + var(--chip-clearance) + var(--chip-arc-room));
  overflow: hidden;
}
.chip-rail::before {
  position: absolute;
  z-index: -1;
  inset: 0 -30% -24cqw;
  content: "";
  border: 1px solid #858794;
  border-radius: 50% 50% 0 0 / 49% 49% 0 0;
  background: linear-gradient(180deg, #545663, #393b4a 73%);
  box-shadow: inset 0 2px 0 #eeeeff14;
}
.rail-slot {
  display: grid;
  place-items: center;
  transform: translateY(calc(var(--chip-arc) * var(--chip-curve)));
}
.table-chip {
  display: grid;
  place-items: center;
  width: clamp(30px, 10.85cqw, 46px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #242736;
  background: radial-gradient(circle at 48% 46%, #575a76 0 45%, #42465f 50% 53%, #292d41 54% 57%, transparent 58%),
    repeating-conic-gradient(from -18deg, #ffcd65 0deg 34deg, #515774 34deg 72deg);
  box-shadow: inset 0 0 0 1px #ffffff36, 0 2px 0 #292b3b, 0 3px 5px #12131cb0;
  color: #fff;
  white-space: nowrap;
  font-size: clamp(.59rem, 2.75cqw, .78rem);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  letter-spacing: -.035em;
}
.table-chip.dimmed { opacity: .65; filter: saturate(.35); }
.table-chip.unpaid {
  border: 1px dashed #888a97;
  color: #bcc0cc;
  box-shadow: none;
  background: #333743a3;
}
.table-felt {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  gap: clamp(13px, 4cqw, 20px);
  isolation: isolate;
  /* Keep the stats in place while reserving more space under the chip rail. */
  padding: calc(21px - var(--chip-clearance)) 15px 16px;
  background:
    repeating-linear-gradient(53deg, #f3ffe90a 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-41deg, #071d1314 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 49% 3%, var(--felt-top), var(--felt-bottom) 92%);
}
.table-felt::after {
  position: absolute;
  z-index: -2;
  content: "";
  inset: calc(-8px - var(--chip-arc-room)) -12% auto;
  height: clamp(36px, 13cqw, 62px);
  border: 1px solid var(--felt-line);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 92% 92% 0 0;
  background: linear-gradient(180deg, var(--felt-top), transparent 25px);
  pointer-events: none;
}
.table-felt::before {
  position: absolute;
  z-index: -1;
  content: "";
  inset: 3px -29px auto;
  height: 30px;
  border-top: 1px solid var(--felt-line);
  border-radius: 50% 50% 0 0 / 90% 90% 0 0;
  pointer-events: none;
}
.table-3d-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.table-3d-canvas[hidden] { visibility: hidden; }
.table-felt[data-renderer="3d"] {
  background: radial-gradient(ellipse at 50% 22%, #273831, #14211e 85%);
}
.table-felt[data-renderer="3d"]::before,
.table-felt[data-renderer="3d"]::after { opacity: .3; }
.table-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}
.table-metrics > div {
  min-width: 0;
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-height: clamp(53px, 15.9cqw, 70px);
  padding: 6px 3px;
  border: 1px solid #153b2b9e;
  border-radius: 13px 13px 17px 17px;
  background: linear-gradient(158deg, #0a2b1e4f, #061d1769);
  box-shadow: inset 0 2px 6px #082b1d68, 0 1px 0 #b6f4d643;
}
.table-metrics .metric-pot { transform: translateY(-2px); }
.metric-pot.is-settling { border-color: #f8c872ba; }
.metric-pot.is-settling::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 28%, #ffe29d66, transparent 69%);
  animation: pot-sweep 640ms ease-out both;
}
@keyframes pot-sweep {
  from { transform: translateX(-86%); opacity: 0; }
  30% { opacity: .85; }
  to { transform: translateX(86%); opacity: 0; }
}
.table-metrics dt {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #c8e1d8;
  font-size: clamp(.68rem, 3cqw, .85rem);
  line-height: 1.15;
  white-space: nowrap;
}
.table-metrics dd {
  margin: 0;
  font-weight: 790;
  font-size: clamp(.97rem, 4.58cqw, 1.38rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.board { display: grid; gap: 7px; }
.board-heading { display: flex; justify-content: space-between; align-items: center; }
.board-tools { display: flex; align-items: center; gap: 6px; }
.street {
  color: #d7f2e8;
  font-weight: 750;
  font-size: .71rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.table-log {
  padding: 0 8px;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #def5ed;
  background: #11291f49;
  border: 1px solid #d9fff527;
  border-radius: 8px;
  font-size: .76rem;
  font-weight: 630;
}
.table-log.table-sound { min-width: 38px; justify-content: center; padding: 0; }
.table-log.table-sound[aria-pressed="true"] { color: #f5d691; }
.poker-screen .auto-control[aria-pressed="true"] {
  color: #1e190e;
  background: #f0c672;
}
.community { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(5px, 1.7cqw, 9px); }
.community .playing-card:not(.card-slot) { outline: 1px dashed #e1f9d238; outline-offset: 2px; }
.playing-card {
  --ink: #262935;
  --ink-light: #545e73;
  position: relative;
  width: 100%;
  aspect-ratio: .72;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #fffdf6;
  border-radius: 8px;
  background: linear-gradient(130deg, white 34%, #eeece6 100%);
  box-shadow: 0 3px 7px #0819105c;
  color: var(--ink);
  font-family: Georgia, serif;
}
.playing-card.red { --ink: #ba303b; --ink-light: #f58272; }
.card-corner {
  position: absolute;
  top: 5px;
  left: 5px;
  display: grid;
  justify-items: center;
  font: 780 clamp(.75rem, 4cqw, 1.12rem)/.94 system-ui, sans-serif;
  letter-spacing: -.05em;
  font-variant-numeric: lining-nums;
}
.card-corner small { font: 700 clamp(.59rem, 3cqw, .84rem)/1 Georgia, serif; }
.card-corner.opposite { inset: auto 5px 5px auto; transform: rotate(180deg); }
.card-pip {
  font: 700 clamp(1.64rem, 10.2cqw, 3.15rem)/1 Georgia, serif;
  background: linear-gradient(130deg, var(--ink-light), var(--ink) 70%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.card-back { background: #f3efed; color: #fff5f0; }
.card-back::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid #ffffffad;
  border-radius: 5px;
  background:
    repeating-linear-gradient(45deg, transparent 0 4px, #fff4f1a0 4px 4.7px),
    repeating-linear-gradient(-45deg, transparent 0 4px, #fff4f1a0 4px 4.7px),
    linear-gradient(140deg, var(--card-color), var(--card-shadow));
  box-shadow: inset 0 0 0 1px #43192b7b;
}
.card-back span {
  display: grid;
  place-items: center;
  position: relative;
  width: 37%;
  aspect-ratio: 1;
  border: 1px solid #fff1edc4;
  border-radius: 50%;
  background: var(--card-shadow);
  font-size: clamp(.73rem, 4.6cqw, 1.24rem);
}
.card-slot { background: #06272036; border: 1px dashed #adf4d47e; box-shadow: none; }
.hero-seat {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: end;
  gap: clamp(7px, 4cqw, 20px);
  margin-top: auto;
  padding-top: 3px;
}
.hero-info {
  display: grid;
  justify-items: start;
  align-content: end;
  gap: 5px;
  padding: 10px clamp(7px, 2.3cqw, 13px) 12px;
  min-height: 86px;
  border: 1px solid #a4dbca64;
  border-radius: 14px;
  background: linear-gradient(151deg, #ccf0e47a, #48756659 78%);
  box-shadow: inset 0 1px 0 #faffff27, 0 5px 14px #02231a3a;
  text-shadow: 0 1px 3px #0a2c20ae;
}
.hero-info.hero-won { border-color: #f1cc83; box-shadow: inset 0 0 21px #ffd47721, 0 0 16px #ffcc5e30; }
.turn-status {
  color: #dce8ed;
  font-weight: 740;
  font-size: clamp(.76rem, 3.5cqw, .95rem);
  line-height: 1.18;
  min-height: 25px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  margin-top: -25px;
  padding: 4px 8px;
  border: 1px solid #626471;
  border-radius: 10px;
  background: linear-gradient(#353441, #252430);
  box-shadow: 0 2px 4px #1829268c;
}
.turn-status-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.turn-status.is-your-turn {
  gap: 5px;
  color: #ffe08b;
  border-color: #a38550;
}
.turn-clock {
  flex: none;
  margin-inline-start: 6px;
  color: #ffe08b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.turn-status.is-your-turn::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  content: "";
  background: #ffd177;
  box-shadow: 0 0 8px #ffc4677f;
}
.hero-info strong {
  font-size: clamp(1.1rem, 5.15cqw, 1.48rem);
  line-height: 1.1;
  white-space: nowrap;
}
.hero-info strong .icon { font-size: .8em; }
.hero-info > span { color: #def1ec; font-size: .76rem; }
.private-cards {
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 4px 8px 4px 4px;
}
.private-cards .playing-card { width: clamp(62px, 22cqw, 112px); }
.private-cards .playing-card:first-child {
  transform: rotate(-7deg) translateY(1px);
  transform-origin: 50% 90%;
}
.private-cards .playing-card + .playing-card {
  margin-left: -17%;
  transform: rotate(4deg);
  transform-origin: 50% 90%;
}
.private-cards .card-pip { font-size: clamp(2.2rem, 13.5cqw, 4.3rem); }
.table-controls {
  position: relative;
  z-index: 3;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 7px 12px calc(12px + var(--content-safe-bottom));
  background: linear-gradient(168deg, #3a3b47, #292933 78%);
  border-top: 1px solid #626776;
  box-shadow: 0 -5px 23px #0f282270;
}
.table-controls:has(> .table-action) { min-height: calc(115px + var(--content-safe-bottom)); }
.companion-wait {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #e6d2a6;
  font-size: .91rem;
}
.controls-row {
  display: grid;
  grid-template-columns: minmax(0, 1.46fr) minmax(0, 1fr);
  gap: 8px;
}
.controls-row.secondary-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.46fr); }
.controls-row.with-all-in { grid-template-columns: minmax(0, .9fr) minmax(0, 1.5fr) minmax(0, .9fr); }
.bet-stepper {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 1px 4px;
  padding: 4px 3px 3px;
  border: 1px solid #525761;
  background: #222530;
  border-radius: 18px;
  box-shadow: inset 0 1px 5px #15181fba;
}
.bet-stepper button {
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 10%, #5f606b, #3a3b47 78%);
  box-shadow: inset 0 1px 0 #ffffff35, 0 2px 4px #13141a99;
  font-weight: 620;
  font-size: 1.27rem;
}
.bet-stepper button:hover:not(:disabled) { filter: brightness(1.16); }
.bet-stepper output {
  grid-column: 1 / -1;
  min-width: 0;
  color: #fff;
  text-align: center;
  font-weight: 750;
  font-size: clamp(.9rem, 4.6cqw, 1.25rem);
  font-variant-numeric: tabular-nums;
}
.bet-stepper #raise-slider {
  min-width: 0;
  height: 32px;
  margin: 0;
}
.table-action {
  min-width: 0;
  min-height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: clamp(.87rem, 4.2cqw, 1.12rem);
  font-weight: 740;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 #ffffff25, 0 2px 4px #10142094;
}
.table-action:hover:not(:disabled) { filter: brightness(1.12); }
.table-action:active:not(:disabled), .bet-stepper button:active:not(:disabled) { transform: scale(.974); }
.table-action.advance { color: #f7fff8; background: linear-gradient(177deg, #56b86a, #237443); border-color: #6bb675; text-shadow: 0 1px 2px #0a3c26; }
.table-action.fold { color: #fff5f4; background: linear-gradient(177deg, #e66664, #bd313d); border-color: #ed817a; }
.table-action.match { color: #f4f6f9; background: linear-gradient(177deg, #686976, #484955); border-color: #787a88; }
.table-action.match span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.table-action.all-in { color: #291a0c; background: linear-gradient(177deg, #ffe097, #dc9d48); border-color: #f3cf81; white-space: normal; }
.table-action:disabled { color: #bbbfc8; background: #454651; border-color: #626370; text-shadow: none; }

#table-effects { position: fixed; z-index: 4; inset: 0; overflow: hidden; pointer-events: none; }
.fx-chip {
  position: absolute;
  width: 20px;
  height: 20px;
  opacity: 0;
  border: 1px solid #ad772f;
  border-radius: 50%;
  background:
    radial-gradient(circle, #d59a43 0 38%, #fff1b0 40% 49%, transparent 52%),
    repeating-conic-gradient(#ffe68e 0 38deg, #b47132 39deg 72deg);
  box-shadow: 0 0 7px #ffc35e91, 0 2px 5px #111a1a99;
}
body[data-view="table"] dialog { background: #292d38; border-color: #5b6172; }

@media (max-width: 500px) {
  body[data-view="table"] { min-height: 100svh; }
  body[data-view="table"] #main { padding: 0; }
  .poker-screen { min-height: 100svh; border-radius: 0; border: 0; }
}
@media (max-width: 500px) and (min-height: 685px) and (max-aspect-ratio: 3/5) {
  .private-cards { transform: scale(1.14); transform-origin: 50% 97%; }
}
@media (max-height: 725px) {
  .poker-screen {
    --seat-arc: 12px;
    --chip-clearance: 7px;
    --chip-arc-room: max(0px, calc(var(--chip-arc) * var(--max-chip-curve) - 3px));
  }
  .poker-header { padding-block: calc(5px + var(--content-safe-top)) 1px; }
  .seat-strip { padding-block: 14px 7px; }
  .seat { gap: 1px; }
  .seat-portrait { margin-top: 0; }
  .seat-strip .avatar { width: clamp(35px, 13.2cqw, 56px); }
  .chip-rail { min-height: 47px; padding-block: 6px calc(7px + var(--chip-clearance) + var(--chip-arc-room)); }
  .table-chip { width: clamp(27px, 9.7cqw, 39px); }
  .table-felt { gap: 8px; padding-block: calc(10px - var(--chip-clearance)) 8px; }
  .table-felt::before { inset-block-start: 0; }
  .table-felt::after { inset-block-start: calc(-5px - var(--chip-arc-room)); }
  .table-metrics > div { min-height: 50px; }
  .board { gap: 4px; }
  .table-log { min-height: 32px; }
  .hero-info { min-height: 74px; padding-block: 8px; gap: 3px; }
  .turn-status { margin-top: -19px; min-height: 22px; padding-block: 3px; }
  .private-cards .playing-card { width: clamp(55px, 17.5cqw, 88px); }
  .table-controls { gap: 6px; padding-block: 4px calc(9px + var(--content-safe-bottom)); }
  .table-controls:has(> .table-action) { min-height: calc(110px + var(--content-safe-bottom)); }
}
@media (max-height: 675px) {
  .table-felt { gap: 4px; }
}
@media (max-width: 375px) and (max-height: 610px) {
  .poker-screen { --seat-arc: 7px; --chip-clearance: 6px; }
  .poker-header { padding-block: var(--content-safe-top) 0; }
  .seat-strip { padding-block: 11px 4px; }
  .seat-strip .avatar { width: 38px; }
  .chip-rail { min-height: 42px; padding-block: 4px calc(5px + var(--chip-clearance) + var(--chip-arc-room)); }
  .table-felt { gap: 3px; padding-block: calc(7px - var(--chip-clearance)) 3px; }
  .table-felt::after { inset-block-start: calc(-3px - var(--chip-arc-room)); }
  .table-metrics > div { min-height: 45px; }
  .table-log { min-height: 28px; }
  .bet-stepper { row-gap: 0; padding-block: 2px; }
  .bet-stepper output { font-size: .85rem; line-height: 1.1; }
  .bet-stepper button, .bet-stepper #raise-slider { height: 24px; }
}

.hand-log {
  display: grid;
  list-style: none;
  align-content: start;
  gap: 12px;
  padding: 16px;
  margin: 0;
  max-height: 490px;
  overflow: auto;
  scrollbar-color: #596654 transparent;
}
.hand-log li { display: grid; grid-template-columns: 6px 1fr; align-items: start; gap: 8px; color: #c2ccbf; font-size: .83rem; line-height: 1.42; }
.hand-log li:first-child { color: var(--text); }
.hand-log li i { width: 5px; height: 5px; border-radius: 50%; background: #778d73; margin-top: 7px; }

dialog {
  width: min(455px, calc(100% - 25px));
  max-height: calc(100% - 28px);
  padding: 23px;
  border: 1px solid #515766;
  border-radius: 18px;
  background: #292d38;
  color: var(--text);
  box-shadow: 0 18px 90px #060a06d9;
}
@media (display-mode: standalone) {
  dialog:modal {
    inset-block: var(--content-safe-top) var(--content-safe-bottom);
    max-height: calc(100% - var(--content-safe-top) - var(--content-safe-bottom) - 28px);
  }
}
dialog::backdrop { background: #060b08b9; backdrop-filter: blur(3px); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin: -4px -4px 10px 0; }
.dialog-top h2 { letter-spacing: -.036em; font-size: 1.4rem; overflow-wrap: anywhere; }
.icon-button {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: var(--muted);
}
.icon-button:hover { border-color: var(--line); background: #ffffff0b; color: var(--text); }
dialog p { color: #c9cfda; line-height: 1.55; margin-bottom: 16px; font-size: .97rem; }
dialog form:not(.dialog-actions) { display: grid; gap: 10px; }
label { font-size: .89rem; color: #c9d3c5; font-weight: 700; }
dialog label { display: flex; justify-content: space-between; }
output { color: var(--gold); }
input:not([type="range"], [type="radio"]), select {
  width: 100%;
  padding: 11px 12px;
  min-height: 44px;
  background: #181b24;
  color: var(--text);
  border: 1px solid #505564;
  border-radius: 8px;
}
select {
  appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, #b9c7b7 50%), linear-gradient(135deg, #b9c7b7 50%, transparent 50%);
  background-position: right 16px top 50%, right 11px top 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
input[type="range"] { width: 100%; accent-color: var(--gold); margin: 3px 0; height: 26px; cursor: pointer; }
.range-edges { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; margin-top: -8px; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 12px; }
.account-links { display: flex; flex-wrap: wrap; gap: 8px; }
#header-account:empty { display: none; }
.account-entry { color: var(--gold); }
.account-form small { color: #c9cfda; font-size: .8rem; font-weight: 400; }
.account-form > small { margin-top: -5px; }
.account-form .account-reveal {
  min-height: 44px;
  align-items: center;
  justify-content: start;
  gap: 8px;
}
.account-form .account-reveal input { width: 18px; min-height: 0; height: 18px; margin: 0; accent-color: var(--gold); }
.account-form [hidden] { display: none; }
.account-form [aria-invalid="true"] { border-color: #ffaaa8; }
.account-error { color: #ffb7b4; font-size: .9rem; overflow-wrap: anywhere; }
.account-error:empty { margin-top: -10px; }
.account-links { justify-content: space-between; }
.account-links .text-button { min-height: 44px; text-align: left; }
.room-rule-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.room-rule-fields label { display: grid; gap: 4px; align-content: end; }
dialog fieldset:has(.room-rule-fields) { margin: 2px 0; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
dialog .hand-log { padding: 2px 2px 5px; max-height: 58vh; }
.toast {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 9px);
  max-width: calc(100% - 22px);
  padding: 9px 15px;
  border: 1px solid #64715f;
  border-radius: 9px;
  color: #eaf5e6;
  background: #2b372b;
  box-shadow: 0 5px 20px #0007;
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
  text-align: center;
  font-size: .89rem;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
body[data-view="table"] .toast { top: calc(69px + var(--content-safe-top)); bottom: auto; }

@media (max-width: 915px) {
  .page, .topbar-inner {
    padding-left: max(21px, env(safe-area-inset-left));
    padding-right: max(21px, env(safe-area-inset-right));
  }
  .topbar-inner { gap: 11px; }
  .main-nav button { padding-inline: 10px; }
}
@media (max-width: 710px) {
  :root {
    --mobile-nav-button-height: 44px;
    --mobile-nav-height: calc(1px + var(--mobile-nav-button-height) + var(--content-safe-bottom));
  }
  .topbar-inner {
    padding: var(--content-safe-top) 13px 0;
    min-height: calc(37px + var(--content-safe-top));
    display: flex;
    justify-content: space-between;
    gap: 7px;
  }
  .brand { min-height: 36px; padding-block: 0; font-size: 1.5rem; gap: 9px; }
  .brand-mark { width: 32px; height: 32px; }
  .balance { min-height: 35px; gap: 5px; padding: 1px 5px 1px 6px; }
  .balance-copy { line-height: 1.1; }
  .balance-copy small { font-size: clamp(9px, 2.4vw, .63rem); letter-spacing: .04em; }
  .topbar-inner > button, #header-language > button { position: relative; }
  .topbar-inner > button::after, #header-language > button::after {
    content: "";
    position: absolute;
    inset: -5px 0;
  }
  .main-nav {
    position: fixed;
    z-index: 4;
    bottom: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0 12px var(--content-safe-bottom);
    gap: 4px;
    border: 0;
    border-top: 1px solid #454958;
    border-radius: 0;
    background: #242731f7;
    backdrop-filter: blur(13px);
  }
  .main-nav button {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 0 3px;
    min-height: var(--mobile-nav-button-height);
    font-size: .72rem;
    line-height: 1.2;
  }
  .main-nav .icon { width: 19px; height: 19px; }
  .page { padding: 15px 15px calc(var(--mobile-nav-height) + 8px); }
  .inner-page { padding-top: 24px; }
  .page-heading { gap: 10px; margin-bottom: 16px; }
  .page-icon { width: 37px; height: 37px; border-radius: 10px; }
  .stat-grid { gap: 8px; }
  .stat dt { font-size: .75rem; }
  .profile-panel > .button { width: 100%; }
  .toast { bottom: calc(var(--mobile-nav-height) + 8px); }
}
@media (max-width: 430px) {
  .brand { font-size: clamp(1.25rem, 5.2vw, 1.5rem); }
}
@media (max-width: 480px) {
  .avatar-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .history-item, .ledger-row { padding-inline: 11px; gap: 8px; }
  .history-list .empty-icon { width: 34px; height: 34px; }
  .list-heading { padding-inline: 11px; }
  .list-heading .filters button { padding-inline: 8px; }
  .wallet-art { right: 12px; top: 37%; }
}
@media (max-width: 360px) {
  .topbar-inner { padding-inline: 12px; gap: 8px; }
  .brand { gap: 7px; }
  .balance { gap: 6px; }
  .main-nav { padding-inline: 4px; }
  .main-nav button { padding-inline: 1px; }
}
body:is([data-view="lobby"], [data-view="poker-room"]) {
  background: radial-gradient(ellipse at 50% 0, #22222b, #121217 69%);
  --panel: #1b1b23;
  --line: #303039;
  --muted: #b0afbb;
}
body:is([data-view="lobby"], [data-view="poker-room"]) .topbar { border-color: #33323d; }
.lobby-profile { display: none; }
.lobby-page { max-width: 1150px; }
.lobby-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.lobby-heading h1 {
  color: #faf8f5;
  font: 700 clamp(2.45rem, 5vw, 4rem)/.94 "Barlow Condensed", "Arial Narrow", sans-serif;
  letter-spacing: -.013em;
}
.lobby-heading > span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; }
.lobby-heading > span .icon { color: #e0b979; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px; }
@media (min-width: 900px) {
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.game-tile {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: clamp(170px, 20vw, 235px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  overflow: hidden;
  padding: clamp(12px, 1.6vw, 19px);
  border: 1px solid #3a3944;
  border-radius: 19px;
  background: radial-gradient(ellipse at 77% 59%, #32313e66, transparent 62%),
    linear-gradient(159deg, #272731, #19191f 66%);
  box-shadow: inset 0 1px 0 #ffffff0b, 0 6px 18px #07070938;
  text-align: left;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.game-tile:hover {
  border-color: #8a7456;
  transform: translateY(-2px);
}
.game-tile:active { transform: translateY(0); }
.game-tile-playable {
  border-color: #c2a36b84;
  background: radial-gradient(ellipse at 78% 63%, #604e393d, transparent 67%),
    linear-gradient(163deg, #2e2b30 4%, #1b1b22 71%);
}
.game-name { font: 700 clamp(1.5rem, 3vw, 2.15rem)/1.05 "Barlow Condensed", "Arial Narrow", sans-serif; }
.game-tile img {
  position: absolute;
  z-index: -1;
  inset: auto 4% 3px auto;
  width: 91%;
  height: 72%;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
}
.game-tile[data-game="roulette"] img {
  inset: auto -7% -16% auto;
  width: 87%; height: 90%; object-position: right bottom;
}
.game-tile[data-game="slots"] img {
  inset: auto -5% 14% auto;
  width: 97%;
  height: 56%;
  object-position: right center;
}
.game-tile[data-game="blackjack"] img {
  inset: auto -6% -8% auto;
  width: 88%;
  height: 94%;
  object-position: right bottom;
}
.game-tile[data-game="sevenupdown"] img {
  inset: auto 10% 6% auto;
  width: 80%;
  height: 68%;
}
.game-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid #6b69724c;
  border-radius: 999px;
  background: #17171dec;
  color: #d3d0d9;
  font-size: .74rem;
  font-weight: 620;
  white-space: nowrap;
}
.game-tile-playable .game-status { color: #ffe0a3; border-color: #8e74547b; }
.poker-room-page { max-width: 1020px; }
.poker-room-heading h1 {
  font: 700 clamp(2.2rem, 5.5vw, 3.6rem)/.96 "Barlow Condensed", sans-serif;
  letter-spacing: -.013em;
}
.poker-room-heading p { color: var(--muted); font-size: .85rem; }
.poker-room-heading p { margin-top: 5px; }
.poker-room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}
.poker-room-side { min-width: 0; display: grid; gap: 12px; }
.rooms-section {
  min-width: 0;
  padding: 15px;
}
.rooms-section:focus-within { border-color: #74624d; }
.rooms-heading, .activity-section .section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rooms-heading { margin-bottom: 13px; }
.rooms-heading h2, .activity-section h2 {
  font: 700 clamp(1.4rem, 2.5vw, 1.82rem)/1.1 "Barlow Condensed", "Arial Narrow", sans-serif;
}
.rooms-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  border: 1px solid #e7bf7b50;
  color: #efc77f;
  background: #3b3229;
}
.rooms-section .filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-bottom: 12px; }
.rooms-section .filters button { min-width: 0; padding-inline: 4px; white-space: normal; line-height: 1.17; }

.room-grid { display: grid; overflow: hidden; border: 1px solid #383742; border-radius: 13px; }
.room-empty { padding: 12px; color: var(--muted); font-size: .87rem; }
[data-theme="pine"] { --room-accent: #b6db9c; }
[data-theme="neon"] { --room-accent: #e5aef2; }
[data-theme="gilded"] { --room-accent: #f3ca71; }
.room-card { min-width: 0; }
.room-card + .room-card { border-top: 1px solid #35343e; }
.room-button {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 0;
  background: #22222b;
  text-align: left;
}
.room-button:hover { background: #2d2b34; }
.room-button:focus-visible { position: relative; outline-offset: -3px; }
.room-button img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #ffffff32;
}
.room-copy, .room-stakes { min-width: 0; display: grid; gap: 3px; }
.room-copy strong { font-size: .91rem; overflow-wrap: anywhere; }
.room-copy small, .room-stakes small { color: var(--muted); font-size: .74rem; }
.room-stakes { text-align: right; padding-left: 2px; }
.room-stakes strong { color: var(--room-accent); font-size: .84rem; white-space: nowrap; }
.room-button > .icon { width: 12px; color: #aaa6b3; }
.companion-card { margin-block: 8px 12px; }
.companion-card .room-button {
  border: 1px solid #826b4b;
  border-radius: 11px;
  background: linear-gradient(140deg, #3b332c, #22242d);
}
.companion-card .room-button:hover { border-color: #dbb985; }
.companion-card-art {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #6d5734;
  color: #ffe2a0;
}
.companion-card-action {
  max-width: 98px;
  text-align: end;
  color: #ffe2a0;
  font-size: .78rem;
  font-weight: 650;
}
.room-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.room-actions .button { min-width: 0; padding-inline: 5px; }
.activity-section .section-head { padding: 5px 14px; border-bottom: 1px solid var(--line); }
.game-preview-art {
  min-height: 138px;
  height: min(180px, 29svh);
  padding: 9px;
  margin: 0 0 13px;
  border: 1px solid #53505b;
  border-radius: 11px;
  background: radial-gradient(ellipse at 55% 58%, #4b4141, #24242e 73%);
}
.game-preview-art img { display: block; width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 780px) {
  .poker-room-layout { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .game-tile { min-height: clamp(157px, 41vw, 207px); }
}
@media (max-width: 710px) {
  body[data-view="lobby"] #header-account { display: none; }
  body[data-view="lobby"] .topbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 7px;
    padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right));
  }
  body[data-view="lobby"] .brand { grid-area: 1 / 2; gap: 4px; font-size: 1rem; letter-spacing: .025em; }
  body[data-view="lobby"] .brand-mark {
    width: 24px;
    height: 24px;
    border-radius: 6px;
  }
  body[data-view="lobby"] .balance {
    grid-area: 1 / 1;
    justify-self: start;
    padding-inline: 5px 8px;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    background: #1e1e26;
    border-color: #3c3a44;
  }
  body[data-view="lobby"] .balance > .coin { flex: none; }
  body[data-view="lobby"] .balance-copy { min-width: 0; grid-template-columns: minmax(0, 1fr); }
  body[data-view="lobby"] .balance-copy > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body[data-view="lobby"] .balance-plus { display: none; }
  body[data-view="lobby"] .lobby-profile {
    grid-area: 1 / 3;
    justify-self: end;
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    min-height: 35px;
    padding: 1px 4px 1px 7px;
    border: 1px solid #3c3a44;
    border-radius: 22px;
    background: #1e1e26;
  }
  .lobby-profile img { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid #a88264; }
  .lobby-profile-copy { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); text-align: right; gap: 1px; }
  .lobby-profile-copy small { font-size: .62rem; color: #bcb8be; }
  .lobby-profile-copy strong { font-size: .84rem; }
  .lobby-profile-copy > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lobby-heading { margin-bottom: 13px; align-items: start; flex-direction: column; gap: 6px; }
  .lobby-heading h1 { font-size: clamp(2.2rem, 8.5vw, 3rem); }
  .game-grid { gap: 9px; }
  .game-tile { border-radius: 15px; }
  .game-name { font-size: clamp(1.3rem, 5.65vw, 1.85rem); }
  .game-tile img { height: 62%; }
  .rooms-section { padding: 12px; }
  .rooms-section .filters button { font-size: .8rem; }
  .room-actions .button { font-size: .84rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

#main .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.page-heading:not(:has(button)) { margin: 0; }

/* Standalone poker room. The felt and lime accents come from the poker artwork. */
.poker-site { --felt-ink:#101610; --felt-panel:#192019; --felt-line:#344033; --felt-accent:#d7ee96; }
.poker-site[data-view="poker-room"] {background:#101610;color:#f2f3e8;}
.poker-site .status-bar-surface {background:var(--felt-ink);}
.poker-site[data-view="table"] #mast-slot {display:none;}
.poker-mast {background:#101610;border-bottom:1px solid #303a2c;color:#f3f4e9;}
.poker-mast-inner,.poker-directory {width:min(100% - 48px,1100px);margin-inline:auto;}
.poker-mast-inner {min-height:66px;display:flex;align-items:center;justify-content:space-between;gap:12px;}
.poker-wordmark,.poker-tools,.directory-name,.directory-seats,.directory-title h2,.directory-practice {display:flex;align-items:center;}
.poker-wordmark {padding:0;border:0;background:none;gap:10px;color:inherit;}
.poker-wordmark b {font:700 21px/1 "Barlow Condensed",sans-serif;letter-spacing:.07em;}
.poker-wordmark > span:last-child {font-size:10px;letter-spacing:.19em;color:#c5d5ae;border-left:1px solid #53604a;padding-left:10px;}
.poker-seal {width:29px;height:33px;display:grid;place-items:center;color:#d9ec98;border:1px solid #869762;border-radius:9px 9px 11px 11px;font:25px/1 Georgia,serif;}
.poker-tools {gap:10px;}
.poker-tools .language-compact {width:38px;height:38px;border-radius:50%;background:transparent;color:#d3d9c6;border:1px solid #42503d;}
.poker-signin,.poker-account-menu summary {background:var(--felt-accent);border:0;color:#1a2115;border-radius:100px;padding:9px 20px;font-size:14px;font-weight:700;cursor:pointer;list-style:none;}
.poker-account-menu {position:relative;}
.poker-account-menu summary {max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.poker-account-menu > div {position:absolute;right:0;top:calc(100% + 7px);min-width:150px;background:#212922;border:1px solid #45513e;border-radius:12px;padding:5px;z-index:6;box-shadow:0 10px 24px #0006;}
.poker-account-menu button {width:100%;text-align:start;background:none;border:0;padding:10px;color:#f3f4e9;}
.poker-site[data-view="poker-room"] #main {max-width:none;margin:0;padding:0 0 max(28px,env(safe-area-inset-bottom));}
.poker-cover {isolation:isolate;position:relative;display:flex;flex-direction:column;align-items:start;justify-content:center;gap:18px;min-height:clamp(145px,19vw,217px);margin:18px 0 22px;padding:25px clamp(22px,4vw,50px);border-radius:16px;overflow:hidden;background:#101809;}
.poker-cover::before {position:absolute;content:"";inset:0;z-index:-1;background:linear-gradient(90deg,#121b0e 2%,#121b0e99 37%,transparent 70%),url("assets/hero.webp") right 49% / cover no-repeat;opacity:.96;}
.poker-cover h1 {position:static!important;clip:auto!important;margin:0;font:700 clamp(38px,6.3vw,80px)/1.04 "Barlow Condensed",-apple-system,sans-serif;color:#f0f4e2;letter-spacing:-.025em;}
.directory-practice {background:#23301ee8;color:#e4ecd0;gap:7px;border:1px solid #5a6b48;border-radius:999px;padding:9px 14px;font-weight:600;font-size:13px;}
.directory-panel {border:1px solid var(--felt-line);background:var(--felt-panel);border-radius:16px;overflow:hidden;}
.directory-title {padding:20px 26px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;}
.directory-title h2 {font-size:24px;line-height:1.2;color:#f2f3e8;gap:10px;margin:0;}
.directory-count {font:600 13px/1 system-ui;padding:4px 8px;color:var(--felt-accent);background:#32402a;border-radius:20px;font-variant-numeric:tabular-nums;}
.directory-refresh,.directory-actions button,.directory-filters button {border:1px solid #42523d;background:transparent;color:#dbe1d3;border-radius:8px;padding:8px 12px;}
.directory-filters,.directory-actions {display:flex;flex-wrap:wrap;gap:8px;padding:0 26px 14px;}
.directory-filters button[aria-pressed="true"],.directory-actions button:first-child {background:var(--felt-accent);color:#1d2518;}
.directory-actions {padding:16px 26px;border-top:1px solid var(--felt-line);}
.directory-columns,.directory-row {display:grid;grid-template-columns:minmax(0,1.65fr) minmax(70px,.65fr) minmax(85px,.8fr) 17px;gap:12px;align-items:center;text-align:left;padding-inline:26px;}
.directory-columns {background:#202a1f;border-block:1px solid var(--felt-line);padding-block:8px;color:#c2cbb6;font-size:11px;letter-spacing:.08em;text-transform:uppercase;}
.directory-row {width:100%;min-height:59px;border:0;border-radius:0;background:transparent;color:#eef1e4;font:inherit;}
.directory-row + .directory-row {border-top:1px solid #303b2e;}
.directory-row:is(:hover,:focus-visible) {background:#263325;}
.directory-name {gap:10px;min-width:0;}
.directory-name strong {min-width:0;overflow-wrap:anywhere;font-size:15px;}
.directory-name > .icon {width:13px;color:#b3bf9f;}
.felt-mark {display:grid;place-items:center;width:34px;height:26px;flex:none;border:2px solid #64745b;border-radius:50%;color:#b1bf99;background:#354733;box-shadow:inset 0 0 0 2px #263426;font:15px Georgia,serif;}
.directory-blinds,.directory-seats {font-variant-numeric:tabular-nums;font-size:14px;white-space:nowrap;}
.directory-seats {gap:10px;color:#d5ddc8;}
.seat-track {display:flex;gap:2px;flex-wrap:wrap;max-width:54px;}
.seat-track i {width:4px;height:8px;background:#45523f;border-radius:2px;}
.seat-track .occupied {background:#cade8b;}
.directory-arrow {color:#b6c6a1;}
.directory-notice {padding:16px 26px;color:#c5cfba;}
@media(max-width:650px) {
 .poker-mast-inner,.poker-directory {width:calc(100% - 28px);}
 .poker-mast-inner {min-height:57px;}
 .poker-wordmark {gap:7px;}
 .poker-wordmark b {font-size:19px;}
 .poker-tools {gap:6px;}
 .poker-signin,.poker-account-menu summary {padding:9px 14px;}
 .poker-cover {margin:12px 0 16px;min-height:124px;padding:18px;gap:12px;}
 .poker-cover::before {background-position:center,67% 50%;}
 .directory-title {padding:14px 13px;}
 .directory-title h2 {font-size:20px;}
 .directory-columns,.directory-row {grid-template-columns:minmax(0,1fr) clamp(98px,26vw,136px) clamp(39px,12vw,65px) 10px;gap:6px;padding-inline:12px;}
 .directory-name {gap:6px;}
 .directory-name strong {font-size:14px;}
 .directory-row {min-height:53px;}
 .directory-arrow .icon {width:12px;}
 .directory-seats,.directory-blinds {font-size:13px;}
 .seat-track {display:none;}
 .felt-mark {width:25px;height:19px;font-size:11px;}
 .directory-filters,.directory-actions {padding-inline:13px;}
}

.poker-extras {display:grid;gap:16px;margin-top:20px;}
.poker-extras .club-section-heading h2 {color:#f2f3e8;}
