:root {
  --felt-950: #041a14;
  --felt-900: #06241c;
  --felt-850: #082b21;
  --felt-800: #0b3428;
  --felt-700: #104333;
  --felt-600: #16553f;
  --cream: #f8f1df;
  --cream-2: #f1e6cd;
  --cream-3: #e6d7b8;
  --ink: #17251e;
  --ink-soft: #41564b;
  --gold: #e8ba6b;
  --gold-soft: #f4d99e;
  --gold-deep: #bd8738;
  --red: #cf4a42;
  --red-soft: #f0b1a8;
  --red-deep: #9e2f2a;
  --green: #58b38b;
  --green-soft: #b8e2ce;
  --line: rgba(232, 186, 107, 0.2);
  --line-strong: rgba(232, 186, 107, 0.38);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 18px 42px rgba(0, 0, 0, 0.24);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun",
    Georgia, serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--cream);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  background:
    radial-gradient(1100px 760px at 88% -12%, rgba(232, 186, 107, 0.14), transparent 62%),
    radial-gradient(900px 720px at -12% 28%, rgba(50, 143, 108, 0.2), transparent 60%),
    linear-gradient(160deg, #0a3528 0%, #06241c 46%, #041a14 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(232, 186, 107, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 186, 107, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 78%);
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
}

::selection {
  background: rgba(232, 186, 107, 0.35);
  color: #fff;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.01em;
}

:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

@keyframes enter-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes chart-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes soft-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.boot-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.boot-card {
  display: flex;
  gap: 6px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(7, 38, 29, 0.8);
  box-shadow: var(--shadow-md);
  animation: boot-pulse 1.5s ease-in-out infinite;
}

.boot-suit {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--gold);
}

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

@keyframes boot-pulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  line-height: 1;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(232, 186, 107, 0.55);
  border-radius: 12px;
  color: var(--gold-soft);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 55%),
    #0d3d2e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-family: var(--serif);
  font-size: 24px;
}

.brand-mark::after {
  position: absolute;
  right: -6px;
  bottom: -8px;
  content: "♥";
  color: rgba(207, 74, 66, 0.7);
  font-size: 21px;
  transform: rotate(-12deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.08em;
}

.brand-text span {
  color: rgba(248, 241, 223, 0.46);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  color: rgba(248, 241, 223, 0.7);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.nav-link:hover {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link--static {
  cursor: default;
}

.nav-link--static:hover {
  color: rgba(248, 241, 223, 0.7);
  background: transparent;
}

.home {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 32px 54px;
}

.hero-grid {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1.08fr) minmax(370px, 0.82fr);
  gap: clamp(34px, 5vw, 74px);
  align-items: center;
  padding: 34px 0 58px;
}

.hero {
  position: relative;
  z-index: 1;
  max-width: 650px;
  animation: enter-up 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero::before {
  position: absolute;
  top: -180px;
  left: -120px;
  z-index: -1;
  content: "♠";
  color: rgba(232, 186, 107, 0.045);
  font-family: var(--serif);
  font-size: clamp(300px, 34vw, 480px);
  line-height: 1;
  transform: rotate(-8deg);
  pointer-events: none;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(44px, 5.8vw, 76px);
  line-height: 1.12;
  text-wrap: balance;
}

.hero-title em {
  position: relative;
  color: var(--gold-soft);
  font-style: normal;
  white-space: nowrap;
}

.hero-title em::after {
  position: absolute;
  right: 0;
  bottom: 0.02em;
  left: 0;
  height: 0.08em;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(232, 186, 107, 0), var(--gold), rgba(232, 186, 107, 0));
  opacity: 0.6;
}

.hero-copy {
  max-width: 530px;
  margin-top: 24px;
  color: rgba(248, 241, 223, 0.65);
  font-size: 16px;
  line-height: 1.9;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(232, 186, 107, 0.18);
  border-radius: 999px;
  color: rgba(248, 241, 223, 0.7);
  background: rgba(6, 36, 28, 0.48);
  font-size: 12px;
}

.pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(232, 186, 107, 0.7);
}

.card-fan {
  position: relative;
  width: 300px;
  height: 156px;
  margin-top: 42px;
  margin-left: 6px;
  animation: soft-float 6s ease-in-out infinite;
}

.playing-card {
  position: absolute;
  bottom: 0;
  display: flex;
  width: 88px;
  height: 124px;
  flex-direction: column;
  padding: 10px;
  border: 1px solid rgba(23, 37, 30, 0.16);
  border-radius: 10px;
  color: var(--ink);
  background: linear-gradient(150deg, #fffdf5, #eee1c4);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
  transform-origin: 50% 120%;
  transition: transform 260ms ease;
}

.playing-card span {
  margin-top: auto;
  align-self: center;
  font-size: 38px;
}

.playing-card:nth-child(1) {
  left: 28px;
  transform: rotate(-16deg);
}

.playing-card:nth-child(2) {
  left: 96px;
  transform: translateY(-10px) rotate(-4deg);
}

.playing-card:nth-child(3) {
  left: 164px;
  transform: rotate(8deg);
}

.playing-card:nth-child(4) {
  left: 226px;
  transform: rotate(20deg);
}

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

.card-fan:hover .playing-card:nth-child(1) {
  transform: translate(-8px, -8px) rotate(-21deg);
}

.card-fan:hover .playing-card:nth-child(2) {
  transform: translateY(-18px) rotate(-6deg);
}

.card-fan:hover .playing-card:nth-child(3) {
  transform: translate(6px, -8px) rotate(10deg);
}

.card-fan:hover .playing-card:nth-child(4) {
  transform: translate(12px, 2px) rotate(24deg);
}

.entry-card {
  position: relative;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius-xl);
  color: var(--ink);
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(255, 255, 255, 0.65), transparent 60%),
    linear-gradient(160deg, #fbf5e6, #efe2c6);
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: enter-up 620ms 90ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.entry-card::before {
  position: absolute;
  top: 14px;
  right: 16px;
  content: "♣";
  color: rgba(23, 37, 30, 0.08);
  font-family: var(--serif);
  font-size: 72px;
  line-height: 1;
  pointer-events: none;
}

.entry-card::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 5px;
  content: "";
  border-radius: 0 26px 26px 0;
  background: linear-gradient(180deg, var(--gold), rgba(189, 135, 56, 0.24));
}

.entry-tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(23, 37, 30, 0.07);
}

.entry-tab {
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  color: rgba(23, 37, 30, 0.58);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 160ms ease;
}

.entry-tab.is-active {
  color: var(--cream);
  background: var(--felt-800);
  box-shadow: 0 4px 12px rgba(7, 38, 29, 0.25);
}

.entry-panel {
  position: relative;
  z-index: 1;
}

.entry-panel[hidden] {
  display: none;
}

.entry-panel:not([hidden]) {
  animation: panel-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.entry-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label {
  color: rgba(23, 37, 30, 0.68);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.field-label em {
  font-style: normal;
  font-weight: 400;
  opacity: 0.65;
}

.field input,
.input-shell input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(23, 37, 30, 0.15);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 253, 246, 0.8);
  font-size: 15px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.field input::placeholder {
  color: rgba(23, 37, 30, 0.32);
}

.field input:focus {
  border-color: rgba(189, 135, 56, 0.7);
  outline: 0;
  background: #fffdf7;
  box-shadow: 0 0 0 3px rgba(232, 186, 107, 0.18);
}

.field input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Floating labels */
.float-field {
  position: relative;
  display: block;
}

.float-field input {
  width: 100%;
  height: 58px;
  padding: 21px 14px 7px;
  border: 1px solid rgba(23, 37, 30, 0.15);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 253, 246, 0.8);
  font-size: 15px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.float-field input::placeholder {
  color: transparent;
}

.float-field input:focus {
  border-color: rgba(189, 135, 56, 0.7);
  outline: 0;
  background: #fffdf7;
  box-shadow: 0 0 0 3px rgba(232, 186, 107, 0.18);
}

.float-label {
  position: absolute;
  top: 50%;
  left: 14px;
  color: rgba(23, 37, 30, 0.54);
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
  transform-origin: left center;
  transition:
    top 180ms cubic-bezier(0.22, 1, 0.36, 1),
    font-size 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms ease,
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.float-field input:focus + .float-label,
.float-field input:not(:placeholder-shown) + .float-label {
  top: 10px;
  color: var(--gold-deep);
  font-size: 10px;
  letter-spacing: 0.04em;
  transform: none;
}

.float-label em {
  margin-left: 4px;
  color: rgba(23, 37, 30, 0.32);
  font-size: 9px;
  font-style: normal;
}

.required-mark {
  color: var(--red);
  font-size: 11px;
  font-style: normal;
  vertical-align: 1px;
}

.float-field.is-invalid input,
.code-field.is-invalid .code-cell {
  border-color: rgba(207, 74, 66, 0.7);
  box-shadow: 0 0 0 3px rgba(207, 74, 66, 0.09);
}

.float-field.is-invalid .float-label {
  color: var(--red-deep);
}

.field-error {
  margin: 5px 0 0;
  color: var(--red-deep);
  font-size: 10px;
  line-height: 1.45;
}

.field-error:empty,
.form-error:empty {
  display: none;
}

.float-field--suffix input {
  padding-right: 56px;
  font-family: var(--mono);
  font-weight: 700;
}

.float-field--suffix .input-suffix {
  top: 50%;
  right: 13px;
  transform: translateY(-50%);
}

.float-field input[type="number"]::-webkit-outer-spin-button,
.float-field input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.float-field input[type="number"] {
  -moz-appearance: textfield;
}

.code-field .field-label {
  display: block;
  margin-bottom: 7px;
}

.code-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.code-cell {
  width: 100%;
  height: 58px;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(23, 37, 30, 0.15);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 253, 246, 0.8);
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  caret-color: var(--gold-deep);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.code-cell:focus {
  border-color: rgba(189, 135, 56, 0.8);
  outline: 0;
  background: #fffdf7;
  box-shadow: 0 0 0 3px rgba(232, 186, 107, 0.2);
  transform: translateY(-1px);
}

.code-cell.is-filled {
  border-color: rgba(189, 135, 56, 0.38);
  background: #fffdf7;
}

.code-boxes.is-complete .code-cell {
  border-color: rgba(88, 179, 139, 0.54);
}

.field-hint {
  color: rgba(23, 37, 30, 0.44);
  font-size: 11px;
}

.code-input {
  font-family: var(--mono);
  font-size: 20px !important;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--cream);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

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

.button:active:not(:disabled) {
  transform: scale(0.985);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button--primary {
  color: #1b2a21;
  border-color: rgba(255, 255, 255, 0.38);
  background: linear-gradient(135deg, #f5d99c 0%, #e8ba6b 47%, #cf9a49 100%);
  background-size: 180% 100%;
  background-position: 0% 50%;
  box-shadow:
    0 12px 26px rgba(122, 80, 22, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-position 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.button--primary:hover:not(:disabled) {
  background-position: 100% 50%;
  box-shadow:
    0 16px 30px rgba(122, 80, 22, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.button--dark {
  color: var(--gold-soft);
  border-color: rgba(232, 186, 107, 0.3);
  background: linear-gradient(150deg, #104333, #082c22);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.button--ghost {
  color: rgba(248, 241, 223, 0.75);
  border-color: rgba(232, 186, 107, 0.22);
  background: rgba(255, 255, 255, 0.035);
}

.button--ghost:hover:not(:disabled) {
  color: var(--cream);
  border-color: rgba(232, 186, 107, 0.44);
  background: rgba(255, 255, 255, 0.07);
}

.button--danger {
  color: #fff4ef;
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #d75b52, #a6322c);
  box-shadow: 0 10px 24px rgba(120, 27, 23, 0.3);
}

.button--wide {
  flex: 1;
}

.button--full {
  width: 100%;
}

.button-arrow {
  font-size: 18px;
  line-height: 1;
  transition: transform 160ms ease;
}

.button:hover .button-arrow {
  transform: translateX(3px);
}

.button-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(23, 37, 30, 0.24);
  border-top-color: rgba(23, 37, 30, 0.82);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.entry-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid rgba(23, 37, 30, 0.1);
  color: rgba(23, 37, 30, 0.5);
  font-size: 11px;
  line-height: 1.7;
}

.entry-note span:first-child {
  color: var(--gold-deep);
  font-size: 14px;
  line-height: 1.35;
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: var(--red-deep);
  font-size: 12px;
  font-weight: 600;
}

.entry-card .form-error {
  color: var(--red-deep);
}

.recent-rooms {
  margin-top: 20px;
}

.recent-rooms h2 {
  margin-bottom: 8px;
  color: rgba(248, 241, 223, 0.4);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recent-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid rgba(232, 186, 107, 0.14);
  border-radius: 999px;
  color: rgba(248, 241, 223, 0.66);
  background: rgba(6, 36, 28, 0.3);
  font-size: 11px;
  text-decoration: none;
  transition: all 160ms ease;
}

.recent-item:hover {
  border-color: rgba(232, 186, 107, 0.35);
  color: var(--cream);
  background: rgba(6, 36, 28, 0.56);
}

.entry-card .recent-rooms h2 {
  color: rgba(23, 37, 30, 0.42);
}

.entry-card .recent-empty {
  color: rgba(23, 37, 30, 0.45);
}

.entry-card .recent-item {
  border-color: rgba(23, 37, 30, 0.12);
  color: rgba(23, 37, 30, 0.66);
  background: rgba(255, 255, 255, 0.32);
}

.entry-card .recent-item:hover {
  border-color: rgba(189, 135, 56, 0.4);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
}

.entry-card .recent-item code {
  color: var(--gold-deep);
}

.recent-item code {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.recent-empty {
  color: rgba(248, 241, 223, 0.32);
  font-size: 11px;
}

.site-footer {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 28px;
  color: rgba(248, 241, 223, 0.28);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.site-footer span {
  color: rgba(232, 186, 107, 0.46);
}

.lobby-page {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.lobby-wrap {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 32px 52px;
}

.room-banner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 8px 0 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(232, 186, 107, 0.14);
}

.room-banner-main {
  min-width: 0;
}

.room-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.room-name {
  overflow: hidden;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-code-text {
  color: rgba(248, 241, 223, 0.4);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.room-code-text b {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.room-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  margin-top: 8px;
  color: rgba(248, 241, 223, 0.42);
  font-size: 11px;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(248, 241, 223, 0.28);
}

.status-dot.is-online {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(88, 179, 139, 0.12);
}

.status-dot.is-connecting {
  background: var(--gold);
  animation: status-pulse 1.2s ease-in-out infinite;
}

.status-dot.is-offline {
  background: var(--red);
}

@keyframes status-pulse {
  50% {
    opacity: 0.35;
  }
}

.room-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.room-actions .button {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 12px;
}

.lobby-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 22px;
  align-items: start;
}

.lobby-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 22px;
}

.panel {
  position: relative;
  border: 1px solid rgba(232, 186, 107, 0.17);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(14, 58, 44, 0.88), rgba(7, 35, 27, 0.94));
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 0;
}

.panel-kicker {
  margin-bottom: 4px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.panel-title {
  font-size: 20px;
}

.panel-sub {
  margin-top: 4px;
  color: rgba(248, 241, 223, 0.42);
  font-size: 11px;
}

.table-panel {
  overflow: hidden;
  padding-bottom: 20px;
  background:
    radial-gradient(500px 260px at 50% -30%, rgba(46, 129, 96, 0.24), transparent 70%),
    linear-gradient(180deg, rgba(15, 64, 48, 0.9), rgba(7, 35, 27, 0.96));
}

.table-panel::before {
  position: absolute;
  top: 8px;
  left: 50%;
  content: "♠";
  color: rgba(232, 186, 107, 0.035);
  font-family: var(--serif);
  font-size: 210px;
  line-height: 1;
  transform: translateX(-50%);
  pointer-events: none;
}

.seats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 22px 0;
}

.seat {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px 13px;
  border: 1px solid rgba(232, 186, 107, 0.12);
  border-radius: 16px;
  background: rgba(4, 25, 19, 0.32);
  text-align: center;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.seat:hover {
  border-color: rgba(232, 186, 107, 0.26);
  background: rgba(4, 25, 19, 0.44);
  transform: translateY(-2px);
}

.seat.is-me {
  border-color: rgba(232, 186, 107, 0.36);
  background: linear-gradient(180deg, rgba(232, 186, 107, 0.1), rgba(4, 25, 19, 0.28));
}

.seat.is-landlord::after {
  position: absolute;
  top: -7px;
  right: -4px;
  content: "地主";
  padding: 2px 6px;
  border-radius: 5px;
  color: #2b1d08;
  background: linear-gradient(135deg, #f5d99c, #cf9a49);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  transform: rotate(3deg);
}

.seat-avatar {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 9px;
  place-items: center;
  border: 1px solid rgba(232, 186, 107, 0.42);
  border-radius: 50%;
  color: var(--gold-soft);
  background: radial-gradient(circle at 35% 25%, #1b5a43, #082c22 70%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.24);
  font-family: var(--serif);
  font-size: 19px;
}

.seat-avatar .online-dot {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid #082c22;
  border-radius: 50%;
  background: rgba(248, 241, 223, 0.24);
}

.seat-avatar .online-dot.is-online {
  background: var(--green);
}

.seat-name {
  max-width: 100%;
  overflow: hidden;
  color: var(--cream);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-tags {
  min-height: 12px;
  margin-top: 6px;
  color: rgba(248, 241, 223, 0.42);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-align: center;
}

.seat-balance {
  margin-top: 9px;
  color: var(--gold-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.seat-balance.is-negative {
  color: var(--red-soft);
}

.seat-balance.is-zero {
  color: rgba(248, 241, 223, 0.36);
}

.seat-sub {
  margin-top: 1px;
  color: rgba(248, 241, 223, 0.32);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.table-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin: 18px 22px 0;
  padding-top: 17px;
  border-top: 1px solid rgba(232, 186, 107, 0.12);
}

.table-action-copy {
  min-width: 0;
}

.table-action-copy strong {
  display: block;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 17px;
}

.table-action-copy span {
  color: rgba(248, 241, 223, 0.4);
  font-size: 11px;
}

.update-button {
  min-width: 152px;
  min-height: 48px;
  font-size: 15px;
}

.settings-panel,
.history-panel {
  padding-bottom: 20px;
}

.settings-values {
  max-width: 62%;
  color: rgba(248, 241, 223, 0.42);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
  text-align: right;
  text-wrap: pretty;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 22px 0;
}

.setting-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.setting-field label {
  overflow: hidden;
  color: rgba(248, 241, 223, 0.46);
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-field input {
  width: 100%;
  height: 38px;
  padding: 0 9px;
  border: 1px solid rgba(232, 186, 107, 0.16);
  border-radius: 9px;
  color: var(--cream);
  background: rgba(3, 20, 15, 0.4);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.setting-field input:focus {
  border-color: rgba(232, 186, 107, 0.48);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(232, 186, 107, 0.1);
}

.setting-field input:disabled {
  opacity: 0.55;
}

.setting-field .unit {
  color: rgba(248, 241, 223, 0.24);
  font-size: 8px;
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 22px 0;
}

.settings-note {
  color: rgba(248, 241, 223, 0.34);
  font-size: 10px;
}

.settings-actions .button {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 11px;
}

.history-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-button {
  padding: 4px 6px;
  border: 0;
  border-radius: 5px;
  color: rgba(248, 241, 223, 0.38);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
  transition: color 160ms ease;
}

.link-button:hover {
  color: var(--red-soft);
}

.round-list {
  display: flex;
  max-height: 500px;
  flex-direction: column;
  gap: 0;
  margin: 15px 14px 0;
  padding-right: 3px;
  overflow-y: auto;
  scrollbar-color: rgba(232, 186, 107, 0.24) transparent;
  scrollbar-width: thin;
}

.round-list::-webkit-scrollbar {
  width: 5px;
}

.round-list::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(232, 186, 107, 0.24);
}

.round-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 26px;
  gap: 10px;
  align-items: start;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid rgba(232, 186, 107, 0.1);
  border-radius: 0;
  background: transparent;
  transition: border-color 160ms ease;
}

.round-item:hover {
  border-bottom-color: rgba(232, 186, 107, 0.2);
  background: transparent;
}

.round-seq {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

.round-body {
  min-width: 0;
}

.round-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.round-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold-soft);
  font-size: 9px;
  font-weight: 700;
}

.round-badge.is-farmers {
  color: var(--green-soft);
}

.round-badge.is-spring {
  color: var(--red-soft);
}

.round-badge.is-antiSpring {
  color: #b9dff4;
}

.round-landlord {
  color: rgba(248, 241, 223, 0.62);
  font-size: 10px;
}

.round-mult {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.round-meta {
  margin-top: 3px;
  color: rgba(248, 241, 223, 0.31);
  font-size: 9px;
}

.round-deltas {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 7px;
}

.delta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.delta-chip b {
  color: rgba(248, 241, 223, 0.5);
  font-weight: 500;
}

.delta-chip .delta-value {
  color: var(--green-soft);
  font-family: var(--mono);
  font-weight: 700;
}

.delta-chip small {
  color: rgba(248, 241, 223, 0.3);
  font-family: var(--mono);
  font-size: 8px;
}

.delta-chip.is-negative .delta-value {
  color: var(--red-soft);
}

.round-delete {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(248, 241, 223, 0.24);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  transition: all 160ms ease;
}

.round-delete:hover {
  border-color: rgba(207, 74, 66, 0.24);
  color: var(--red-soft);
  background: rgba(207, 74, 66, 0.08);
}

.empty-state {
  display: flex;
  min-height: 160px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 22px 2px;
  border: 1px dashed rgba(232, 186, 107, 0.14);
  border-radius: 14px;
  color: rgba(248, 241, 223, 0.32);
  text-align: center;
}

.empty-state .empty-icon {
  color: rgba(232, 186, 107, 0.32);
  font-family: var(--serif);
  font-size: 30px;
}

.empty-state strong {
  color: rgba(248, 241, 223, 0.55);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
}

.empty-state span {
  max-width: 260px;
  font-size: 10px;
}

.leaderboard-panel {
  position: sticky;
  top: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(255, 255, 255, 0.7), transparent 58%),
    linear-gradient(160deg, #fbf5e6, #eee0c4);
  box-shadow: var(--shadow-lg);
}

.leaderboard-panel::before {
  position: absolute;
  top: -22px;
  right: -12px;
  content: "♛";
  color: rgba(23, 37, 30, 0.055);
  font-family: var(--serif);
  font-size: 120px;
  line-height: 1;
  pointer-events: none;
}

.leaderboard-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 21px 20px 14px;
}

.leaderboard-kicker {
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.leaderboard-title {
  margin-top: 2px;
  font-size: 24px;
}

.leaderboard-rounds {
  margin-top: 4px;
  color: rgba(23, 37, 30, 0.44);
  font-size: 10px;
}

.leaderboard-table {
  position: relative;
  padding: 0 10px;
}

.leaderboard-columns,
.leaderboard-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 52px 70px;
  gap: 5px;
  align-items: center;
}

.leaderboard-columns {
  padding: 7px 10px;
  border-top: 1px solid rgba(23, 37, 30, 0.08);
  border-bottom: 1px solid rgba(23, 37, 30, 0.08);
  color: rgba(23, 37, 30, 0.38);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leaderboard-columns span:nth-child(3),
.leaderboard-columns span:nth-child(4) {
  text-align: right;
}

.leaderboard-row {
  position: relative;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(23, 37, 30, 0.075);
  transition: background 160ms ease;
}

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

.leaderboard-row.is-me {
  margin: 0 -2px;
  padding-right: 12px;
  padding-left: 12px;
  border-radius: 9px;
  background: rgba(232, 186, 107, 0.14);
}

.leaderboard-row.is-leader .rank {
  color: #a76f19;
}

.rank {
  color: rgba(23, 37, 30, 0.38);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

.leaderboard-player {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.player-avatar-sm {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border: 1px solid rgba(189, 135, 56, 0.26);
  border-radius: 50%;
  color: #7b541c;
  background: rgba(232, 186, 107, 0.17);
  font-family: var(--serif);
  font-size: 11px;
}

.player-name-sm {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0;
}

.player-name-sm strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-name-sm span {
  color: rgba(23, 37, 30, 0.38);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
}

.points-cell,
.money-cell {
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.points-cell {
  color: rgba(23, 37, 30, 0.62);
  font-weight: 600;
}

.money-cell {
  color: #a43831;
  font-size: 12px;
  font-weight: 800;
}

.points-cell.is-negative {
  color: #287254;
}

.money-cell.is-negative {
  color: #287254;
}

.points-cell.is-zero,
.money-cell.is-zero {
  color: rgba(23, 37, 30, 0.32);
}

.leaderboard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 11px 20px 14px;
  border-top: 1px solid rgba(23, 37, 30, 0.08);
  color: rgba(23, 37, 30, 0.38);
  font-size: 8px;
}

.leaderboard-foot strong {
  color: rgba(23, 37, 30, 0.58);
  font-family: var(--mono);
  font-weight: 700;
}

.join-page {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 60px;
}

.join-card {
  width: min(480px, 100%);
  padding: 28px;
  border: 1px solid rgba(232, 186, 107, 0.22);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(46, 129, 96, 0.18), transparent 62%),
    linear-gradient(180deg, rgba(14, 58, 44, 0.94), rgba(6, 30, 23, 0.98));
  box-shadow: var(--shadow-lg);
}

.join-kicker {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.join-title {
  margin-top: 5px;
  font-size: 30px;
  line-height: 1.2;
}

.join-code {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.join-players {
  display: flex;
  gap: 8px;
  margin: 20px 0;
}

.join-player {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1px solid rgba(232, 186, 107, 0.12);
  border-radius: 10px;
  background: rgba(3, 22, 16, 0.28);
  text-align: center;
}

.join-player span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(232, 186, 107, 0.3);
  border-radius: 50%;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 12px;
}

.join-player strong {
  max-width: 100%;
  overflow: hidden;
  color: rgba(248, 241, 223, 0.75);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.join-note {
  margin-top: 14px;
  color: rgba(248, 241, 223, 0.36);
  font-size: 10px;
  line-height: 1.7;
}

.join-warning {
  margin: -7px 0 14px;
  padding: 8px 10px;
  border: 1px solid rgba(232, 186, 107, 0.2);
  border-radius: 8px;
  color: rgba(244, 217, 158, 0.78);
  background: rgba(232, 186, 107, 0.06);
  font-size: 10px;
  line-height: 1.6;
}

.join-page .field input {
  border-color: rgba(232, 186, 107, 0.2);
  color: var(--cream);
  background: rgba(3, 22, 16, 0.4);
}

.join-page .field-label {
  color: rgba(248, 241, 223, 0.5);
}

.join-page .field input:focus {
  border-color: rgba(232, 186, 107, 0.55);
  background: rgba(3, 22, 16, 0.6);
}

.join-page .float-field input {
  border-color: rgba(232, 186, 107, 0.2);
  color: var(--cream);
  background: rgba(3, 22, 16, 0.4);
}

.join-page .float-field input:focus {
  border-color: rgba(232, 186, 107, 0.55);
  background: rgba(3, 22, 16, 0.6);
}

.join-page .float-label {
  color: rgba(248, 241, 223, 0.45);
}

.join-page .float-field input:focus + .float-label,
.join-page .float-field input:not(:placeholder-shown) + .float-label {
  color: var(--gold);
}

.join-page .form-error {
  color: var(--red-soft);
}

.room-error-page {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 30px 20px 70px;
}

.room-error-card {
  width: min(440px, 100%);
  padding: 32px;
  border: 1px solid rgba(232, 186, 107, 0.2);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(14, 58, 44, 0.92), rgba(6, 30, 23, 0.98));
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.room-error-icon {
  margin-bottom: 12px;
  color: rgba(232, 186, 107, 0.6);
  font-family: var(--serif);
  font-size: 42px;
}

.room-error-card h1 {
  font-size: 28px;
}

.room-error-card p {
  margin: 10px auto 20px;
  color: rgba(248, 241, 223, 0.46);
  font-size: 12px;
}

.loading-page {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.loading-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid rgba(232, 186, 107, 0.16);
  border-radius: 12px;
  color: rgba(248, 241, 223, 0.55);
  background: rgba(6, 30, 23, 0.62);
  font-size: 12px;
}

.loading-box .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(232, 186, 107, 0.18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.modal {
  width: min(920px, calc(100vw - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  overflow: visible;
}

.modal::backdrop {
  background: rgba(2, 14, 10, 0.72);
  backdrop-filter: blur(7px);
}

.modal[open] {
  animation: modal-in 180ms ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-card {
  display: flex;
  max-height: calc(100vh - 44px);
  max-height: calc(100dvh - 44px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(700px 320px at 100% 0%, rgba(255, 255, 255, 0.66), transparent 60%),
    linear-gradient(160deg, #fbf5e6, #efe2c6);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.55);
}

.modal-card--compact {
  width: min(520px, 100%);
  margin: 0 auto;
}

.players-modal,
.confirm-modal {
  width: min(520px, calc(100vw - 32px));
}

.modal-head {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 23px 24px 16px;
  border-bottom: 1px solid rgba(23, 37, 30, 0.09);
}

.modal-head .eyebrow {
  margin-bottom: 3px;
  color: var(--gold-deep);
}

.modal-head h2 {
  font-size: 28px;
  line-height: 1.2;
}

.modal-subtitle {
  max-width: 520px;
  margin-top: 4px;
  color: rgba(23, 37, 30, 0.48);
  font-size: 11px;
}

.icon-button {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid rgba(23, 37, 30, 0.12);
  border-radius: 9px;
  color: rgba(23, 37, 30, 0.48);
  background: rgba(255, 255, 255, 0.25);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 160ms ease;
}

.icon-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}

.modal-body {
  flex: 1 1 auto;
  padding: 4px 24px 8px;
  overflow-y: auto;
  scrollbar-color: rgba(23, 37, 30, 0.18) transparent;
  scrollbar-width: thin;
}

.modal-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 0 24px;
  align-items: stretch;
}

.modal-col {
  min-width: 0;
}

.modal-col:first-child {
  padding-right: 24px;
  border-right: 1px solid rgba(23, 37, 30, 0.09);
}

.round-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "landlord bombs"
    "result stakes"
    "multiplier players";
  column-gap: 24px;
  align-items: stretch;
}

.round-area-landlord {
  grid-area: landlord;
}

.round-area-result {
  grid-area: result;
}

.round-area-bombs {
  grid-area: bombs;
}

.round-area-stakes {
  grid-area: stakes;
}

.round-area-multiplier {
  grid-area: multiplier;
}

.round-area-players {
  grid-area: players;
}

.round-multiplier,
.round-players {
  align-self: start;
  min-height: 112px;
  margin: 14px 0 16px;
  padding: 13px 15px;
  border: 1px solid rgba(232, 186, 107, 0.2);
  border-radius: 13px;
  color: var(--cream);
  background:
    radial-gradient(300px 160px at 100% 0%, rgba(232, 186, 107, 0.11), transparent 65%),
    linear-gradient(150deg, #0e3e2f, #072a20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.round-multiplier {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.round-multiplier .preview-label {
  color: rgba(248, 241, 223, 0.44);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.round-multiplier strong {
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 33px;
  line-height: 1.05;
}

.round-multiplier .preview-formula {
  max-width: none;
  margin-top: 3px;
  color: rgba(248, 241, 223, 0.42);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.7;
  text-align: left;
}

.round-players {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.round-players .preview-players {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.round-players .form-error {
  margin-top: 6px;
}

.round-multiplier .form-error {
  color: var(--red-soft);
}

.modal-section {
  padding: 17px 0;
  border-bottom: 1px solid rgba(23, 37, 30, 0.085);
}

.modal-section:last-of-type {
  border-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 13px;
}

.section-heading--split {
  align-items: center;
  justify-content: space-between;
}

.section-heading-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.step-number {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border: 1px solid rgba(189, 135, 56, 0.3);
  border-radius: 50%;
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
}

.section-heading h3 {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
}

.section-heading p {
  margin-top: 2px;
  color: rgba(23, 37, 30, 0.42);
  font-size: 10px;
}

.info-tip {
  position: relative;
  display: inline-grid;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(189, 135, 56, 0.34);
  border-radius: 50%;
  color: var(--gold-deep);
  background: rgba(232, 186, 107, 0.12);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  vertical-align: 2px;
  cursor: help;
}

.info-tip::after {
  position: absolute;
  top: -4px;
  left: calc(100% + 8px);
  z-index: 20;
  width: 220px;
  padding: 8px 10px;
  border: 1px solid rgba(232, 186, 107, 0.26);
  border-radius: 8px;
  content: attr(data-tooltip);
  color: var(--cream);
  background: #082c22;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.6;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 160ms ease,
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 160ms ease;
}

.info-tip:hover::after,
.info-tip:focus::after,
.info-tip:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .info-tip::after {
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: 190px;
    transform: translateY(4px);
  }

  .info-tip:hover::after,
  .info-tip:focus::after,
  .info-tip:focus-visible::after {
    transform: translateY(0);
  }
}

.bomb-total {
  flex: 0 0 auto;
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

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

.landlord-option {
  display: flex;
  min-height: 48px;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(23, 37, 30, 0.12);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.36);
  text-align: left;
  cursor: pointer;
  transition: all 160ms ease;
}

.landlord-option:hover {
  border-color: rgba(189, 135, 56, 0.42);
  background: rgba(255, 255, 255, 0.62);
}

.landlord-option.is-selected {
  border-color: var(--felt-800);
  color: var(--cream);
  background: var(--felt-800);
  box-shadow: 0 8px 18px rgba(7, 38, 29, 0.18);
}

.landlord-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border: 1px solid rgba(189, 135, 56, 0.3);
  border-radius: 50%;
  color: var(--gold-deep);
  background: rgba(232, 186, 107, 0.16);
  font-family: var(--serif);
  font-size: 11px;
}

.landlord-option.is-selected .landlord-avatar {
  border-color: rgba(232, 186, 107, 0.36);
  color: var(--gold-soft);
  background: rgba(232, 186, 107, 0.13);
}

.landlord-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.landlord-copy strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landlord-copy span {
  color: rgba(23, 37, 30, 0.4);
  font-size: 8px;
}

.landlord-option.is-selected .landlord-copy span {
  color: rgba(248, 241, 223, 0.48);
}

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

.result-option {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid rgba(23, 37, 30, 0.12);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.32);
  text-align: left;
  cursor: pointer;
  transition: all 160ms ease;
}

.result-option:hover {
  border-color: rgba(189, 135, 56, 0.42);
  background: rgba(255, 255, 255, 0.56);
}

.result-option.is-selected {
  border-color: rgba(232, 186, 107, 0.72);
  background: linear-gradient(145deg, rgba(232, 186, 107, 0.23), rgba(232, 186, 107, 0.08));
  box-shadow: inset 0 0 0 1px rgba(232, 186, 107, 0.14);
}

.result-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border-radius: 7px;
  color: var(--gold-deep);
  background: rgba(232, 186, 107, 0.17);
  font-family: var(--serif);
  font-size: 14px;
}

.result-option.is-selected .result-icon {
  color: #6e4a13;
  background: rgba(232, 186, 107, 0.42);
}

.result-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.result-copy strong {
  font-size: 12px;
}

.result-copy span {
  color: rgba(23, 37, 30, 0.42);
  font-size: 9px;
  line-height: 1.4;
}

.bomb-control {
  display: flex;
  align-items: center;
  gap: 16px;
}

.range {
  width: 100%;
  height: 24px;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.range::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    var(--gold-deep) 0%,
    var(--gold) var(--range-progress, 0%),
    rgba(23, 37, 30, 0.12) var(--range-progress, 0%)
  );
}

.range::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -7.5px;
  border: 2px solid #fbf5e6;
  border-radius: 50%;
  background: var(--felt-800);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  -webkit-appearance: none;
}

.range::-moz-range-track {
  height: 5px;
  border-radius: 99px;
  background: rgba(23, 37, 30, 0.12);
}

.range::-moz-range-progress {
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
}

.range::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 2px solid #fbf5e6;
  border-radius: 50%;
  background: var(--felt-800);
}

.stepper {
  display: flex;
  width: 120px;
  flex: 0 0 120px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(23, 37, 30, 0.15);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.4);
}

.stepper-button {
  display: grid;
  width: 34px;
  height: 38px;
  flex: 0 0 34px;
  place-items: center;
  border: 0;
  color: rgba(23, 37, 30, 0.55);
  background: transparent;
  font-size: 16px;
  cursor: pointer;
}

.stepper-button:hover {
  color: var(--ink);
  background: rgba(23, 37, 30, 0.05);
}

.stepper input {
  width: 100%;
  height: 38px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.stepper input:focus {
  outline: 0;
}

.bomb-marks {
  display: flex;
  justify-content: space-between;
  margin: 2px 136px 0 1px;
  color: rgba(23, 37, 30, 0.28);
  font-family: var(--mono);
  font-size: 8px;
}

.stake-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.input-shell input {
  padding-right: 62px;
  border-color: rgba(23, 37, 30, 0.15);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
  font-family: var(--mono);
  font-weight: 700;
}

.input-shell input:focus {
  border-color: rgba(189, 135, 56, 0.65);
  outline: 0;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(232, 186, 107, 0.16);
}

.input-suffix {
  position: absolute;
  right: 12px;
  color: rgba(23, 37, 30, 0.34);
  font-size: 9px;
  pointer-events: none;
}

.input-shell input::-webkit-outer-spin-button,
.input-shell input::-webkit-inner-spin-button,
.setting-field input::-webkit-outer-spin-button,
.setting-field input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.input-shell input[type="number"],
.setting-field input[type="number"] {
  -moz-appearance: textfield;
}

.modal-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 2px;
  padding: 13px 14px;
  border: 1px solid rgba(189, 135, 56, 0.18);
  border-radius: 11px;
  background: rgba(232, 186, 107, 0.08);
}

.modal-tip-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--gold-deep);
  background: rgba(232, 186, 107, 0.18);
  font-family: var(--serif);
  font-size: 14px;
}

.modal-tip strong {
  color: rgba(23, 37, 30, 0.7);
  font-size: 11px;
}

.modal-tip p {
  margin-top: 2px;
  color: rgba(23, 37, 30, 0.48);
  font-size: 9px;
  line-height: 1.7;
}

.round-preview {
  margin: 16px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(232, 186, 107, 0.2);
  border-radius: 13px;
  color: var(--cream);
  background:
    radial-gradient(300px 160px at 100% 0%, rgba(232, 186, 107, 0.11), transparent 65%),
    linear-gradient(150deg, #0e3e2f, #072a20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.preview-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.preview-label {
  display: block;
  color: rgba(248, 241, 223, 0.44);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.preview-top strong {
  display: block;
  margin-top: 1px;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.1;
}

.preview-formula {
  max-width: 60%;
  color: rgba(248, 241, 223, 0.42);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.7;
  text-align: right;
}

.preview-players {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(232, 186, 107, 0.12);
}

.preview-player {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  border: 1px solid rgba(232, 186, 107, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.12);
}

.preview-player span {
  overflow: hidden;
  color: rgba(248, 241, 223, 0.44);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-player strong {
  color: var(--green-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.preview-player small {
  color: rgba(248, 241, 223, 0.34);
  font-family: var(--mono);
  font-size: 8px;
}

.preview-player.is-negative strong {
  color: var(--red-soft);
}

.preview-player.is-landlord span::after {
  content: " · 地主";
  color: var(--gold);
}

.round-preview .form-error {
  margin-top: 6px;
  color: var(--red-soft);
}

.modal-footer {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  padding: 14px 24px 20px;
  border-top: 1px solid rgba(23, 37, 30, 0.09);
  background: rgba(251, 245, 230, 0.82);
  backdrop-filter: blur(8px);
}

.modal-footer .button {
  min-height: 46px;
}

.modal-footer .button--ghost {
  color: rgba(23, 37, 30, 0.58);
  border-color: rgba(23, 37, 30, 0.14);
  background: rgba(255, 255, 255, 0.28);
}

.modal-footer .button--ghost:hover:not(:disabled) {
  color: var(--ink);
  border-color: rgba(23, 37, 30, 0.24);
  background: rgba(255, 255, 255, 0.55);
}

.player-name-fields {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 6px 0 14px;
}

.player-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-name-index {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border: 1px solid rgba(189, 135, 56, 0.28);
  border-radius: 50%;
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 8px;
}

.player-name-row .field,
.player-name-row .float-field {
  flex: 1;
}

.confirm-message {
  padding: 14px 0 20px;
  color: rgba(23, 37, 30, 0.66);
  font-size: 13px;
  line-height: 1.8;
}

.toast-region {
  position: fixed;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  max-width: min(420px, 100%);
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid rgba(232, 186, 107, 0.24);
  border-radius: 10px;
  color: var(--cream);
  background: rgba(7, 38, 29, 0.94);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  animation: toast-in 200ms ease-out;
  backdrop-filter: blur(10px);
}

.toast::before {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.toast.is-error::before {
  background: var(--red);
}

.toast.is-success::before {
  background: var(--green);
}

.toast.is-leaving {
  animation: toast-out 180ms ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

.noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 200;
  padding: 14px;
  border: 1px solid var(--red);
  border-radius: 10px;
  color: #fff;
  background: #591c18;
  text-align: center;
}

body.modal-open {
  overflow: hidden;
}

/* ---------- 3/4 players, locked multipliers, final settlement ---------- */

.player-count-field {
  gap: 7px;
}

.player-count-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.player-count-picker button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid rgba(23, 37, 30, 0.12);
  border-radius: 11px;
  color: rgba(23, 37, 30, 0.64);
  background: rgba(255, 255, 255, 0.34);
  text-align: center;
  cursor: pointer;
  transition: all 160ms ease;
}

.player-count-picker button:hover {
  border-color: rgba(189, 135, 56, 0.42);
  background: rgba(255, 255, 255, 0.62);
}

.player-count-picker button.is-active {
  border-color: var(--felt-800);
  color: var(--cream);
  background: linear-gradient(145deg, #104333, #082c22);
  box-shadow: 0 7px 16px rgba(7, 38, 29, 0.18);
}

.player-count-picker strong {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.2;
}

.meta-locked {
  color: var(--gold);
}

.lock-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid rgba(232, 186, 107, 0.14);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lock-banner-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.lock-banner-copy strong {
  color: rgba(248, 241, 223, 0.66);
  font-family: var(--serif);
  font-size: 13px;
}

.lock-banner .button {
  min-height: 32px;
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 10px;
}

.lock-banner-wait {
  flex: 0 0 auto;
  color: rgba(232, 186, 107, 0.56);
  font-size: 9px;
}

.settings-locked-label {
  margin-left: 4px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.button--settle {
  color: #fff8ef;
  border-color: rgba(255, 196, 186, 0.3);
  background: linear-gradient(135deg, #d75b52, #932a25);
  box-shadow:
    0 12px 24px rgba(117, 30, 25, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.button--settle:hover:not(:disabled) {
  box-shadow:
    0 16px 30px rgba(117, 30, 25, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.locked-settings {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 15px 22px 0;
  padding: 15px;
  border: 1px solid rgba(232, 186, 107, 0.14);
  border-radius: 12px;
  background: rgba(3, 22, 16, 0.24);
}

.lock-seal {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border: 1px solid rgba(232, 186, 107, 0.3);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(232, 186, 107, 0.08);
  font-family: var(--serif);
  font-size: 12px;
}

.locked-settings strong {
  color: rgba(248, 241, 223, 0.78);
  font-family: var(--serif);
  font-size: 14px;
}

.locked-settings p {
  margin-top: 3px;
  color: rgba(248, 241, 223, 0.42);
  font-size: 10px;
  line-height: 1.7;
}

.settings-panel.is-locked .settings-values {
  opacity: 0.8;
}

.seats {
  grid-template-columns: repeat(var(--seat-count, 3), minmax(0, 1fr));
}

.join-players {
  display: grid;
  grid-template-columns: repeat(var(--join-count, 3), minmax(0, 1fr));
}

.landlord-options {
  grid-template-columns: repeat(var(--landlord-count, 3), minmax(0, 1fr));
}

.preview-players {
  grid-template-columns: repeat(var(--preview-count, 3), minmax(0, 1fr));
}

.seats--four .seat {
  padding-right: 7px;
  padding-left: 7px;
}

.seats--four .seat-name {
  font-size: 12px;
}

/* ---------- Final results ---------- */

.final-page-shell {
  background:
    radial-gradient(900px 600px at 50% -12%, rgba(232, 186, 107, 0.16), transparent 65%),
    radial-gradient(700px 500px at 100% 30%, rgba(46, 129, 96, 0.16), transparent 65%);
}

.final-page {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 32px 64px;
}

.final-hero {
  padding: 34px 0 32px;
  text-align: center;
  animation: enter-up 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.final-hero .eyebrow {
  margin-bottom: 8px;
}

.final-hero h1 {
  font-size: clamp(44px, 7vw, 72px);
  line-height: 1.1;
  color: var(--gold-soft);
}

.final-meta {
  margin-top: 10px;
  color: rgba(248, 241, 223, 0.46);
  font-size: 11px;
}

.final-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.final-hero-actions .button {
  min-height: 42px;
  font-size: 12px;
}

.final-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.final-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 16px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 22px;
  color: var(--ink);
  background:
    radial-gradient(360px 200px at 100% 0%, rgba(255, 255, 255, 0.7), transparent 65%),
    linear-gradient(155deg, #fbf5e6, #eee0c4);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.26);
  animation: enter-up 520ms 80ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.final-card:nth-child(2) {
  animation-delay: 130ms;
}

.final-card:nth-child(3) {
  animation-delay: 180ms;
}

.final-card:nth-child(4) {
  animation-delay: 230ms;
}

.final-card::before {
  position: absolute;
  top: -30px;
  right: -10px;
  content: "♠";
  color: rgba(23, 37, 30, 0.045);
  font-family: var(--serif);
  font-size: 130px;
  line-height: 1;
  pointer-events: none;
}

.final-card.is-winner {
  border-color: rgba(232, 186, 107, 0.9);
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.28),
    0 0 0 2px rgba(232, 186, 107, 0.2);
}

.final-card.is-me {
  background:
    radial-gradient(360px 200px at 100% 0%, rgba(255, 255, 255, 0.75), transparent 65%),
    linear-gradient(155deg, #fff7e4, #ecdbB7);
}

.final-card-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.final-rank {
  color: rgba(23, 37, 30, 0.38);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

.final-crown {
  color: #8a5a19;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.final-player {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.final-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--player-color) 50%, transparent);
  border-radius: 50%;
  color: var(--player-color);
  background: color-mix(in srgb, var(--player-color) 10%, #fffdf5);
  font-family: var(--serif);
  font-size: 17px;
}

.final-player > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.final-player strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.final-player span {
  color: rgba(23, 37, 30, 0.42);
  font-size: 9px;
}

.final-money {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 4px 0 7px;
  border: 0;
  border-bottom: 1px dashed rgba(23, 37, 30, 0.16);
  color: var(--red-deep);
  background: transparent;
  font-family: var(--serif);
  font-size: clamp(32px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease;
}

.final-money.is-positive {
  color: #a5342d;
}

.final-money.is-negative {
  color: #287254;
}

.final-money.is-zero {
  color: rgba(23, 37, 30, 0.42);
}

.final-money:hover {
  color: var(--gold-deep);
}

.final-points {
  margin-top: 6px;
  color: rgba(23, 37, 30, 0.62);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.final-points span {
  color: rgba(23, 37, 30, 0.38);
  font-size: 9px;
  font-weight: 500;
}

.final-microstats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: rgba(23, 37, 30, 0.46);
  font-family: var(--mono);
  font-size: 8px;
}

.final-microstats span {
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
}

.final-microstats span + span::before {
  margin-right: 8px;
  color: rgba(23, 37, 30, 0.28);
  content: "·";
}

.final-note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
  color: rgba(248, 241, 223, 0.32);
  font-size: 9px;
  line-height: 1.8;
  text-align: center;
}

.final-note span {
  color: rgba(232, 186, 107, 0.46);
}

/* ---------- Chart modal ---------- */

.chart-modal {
  width: min(700px, calc(100vw - 32px));
}

.chart-body {
  padding-top: 12px;
}

.chart-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  border-bottom: 1px solid rgba(23, 37, 30, 0.1);
}

.chart-picker-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: rgba(23, 37, 30, 0.5);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.chart-picker-item:hover {
  color: var(--ink);
}

.chart-picker-item.is-selected {
  color: var(--ink);
  border-bottom-color: var(--gold-deep);
  background: transparent;
  box-shadow: none;
}

.chart-picker-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--player-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--player-color) 16%, transparent);
}

.chart-picker-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-picker-money {
  flex: 0 0 auto;
  color: #a5342d;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

.chart-picker-money.is-negative {
  color: #287254;
}

.chart-picker-money.is-zero {
  color: rgba(23, 37, 30, 0.38);
}

.chart-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 13px 0 8px;
}

.chart-hero-label {
  display: block;
  color: rgba(23, 37, 30, 0.42);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.chart-hero strong {
  display: block;
  margin-top: 1px;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.1;
  color: rgba(23, 37, 30, 0.48);
}

.chart-hero strong.is-positive {
  color: #a5342d;
}

.chart-hero strong.is-negative {
  color: #287254;
}

.chart-change {
  color: rgba(23, 37, 30, 0.5);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

.chart-change.is-positive {
  color: #a5342d;
}

.chart-change.is-negative {
  color: #287254;
}

.chart-wrap {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 6px 10px 3px;
  border: 1px solid rgba(232, 186, 107, 0.18);
  border-radius: 15px;
  background:
    radial-gradient(420px 220px at 50% 0%, rgba(46, 129, 96, 0.18), transparent 68%),
    linear-gradient(150deg, #0d3a2c, #06251c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  touch-action: pan-y;
}

.chart-svg svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 400 / 240;
  overflow: visible;
}

.chart-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: chart-draw 620ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.chart-axis-label {
  fill: rgba(248, 241, 223, 0.38);
  font-family: var(--mono);
  font-size: 8px;
}

.chart-grid-line {
  stroke: rgba(232, 186, 107, 0.08);
  stroke-width: 1;
}

.chart-zero-line {
  stroke: rgba(232, 186, 107, 0.28);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.chart-crosshair {
  stroke: rgba(244, 217, 158, 0.45);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-hover-dot {
  stroke: #041a14;
  stroke-width: 1.5;
}

.chart-hit {
  cursor: crosshair;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 9px;
  border: 1px solid rgba(232, 186, 107, 0.28);
  border-radius: 8px;
  color: var(--cream);
  background: rgba(4, 26, 20, 0.93);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  backdrop-filter: blur(7px);
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tooltip span {
  color: rgba(248, 241, 223, 0.42);
  font-family: var(--mono);
  font-size: 7px;
}

.chart-tooltip strong {
  color: var(--gold-soft);
  font-family: var(--mono);
  font-size: 12px;
}

.chart-tooltip strong.is-negative {
  color: var(--green-soft);
}

.chart-tooltip small {
  color: rgba(248, 241, 223, 0.42);
  font-size: 7px;
}

.chart-stats {
  display: flex;
  flex-wrap: wrap;
  max-width: 520px;
  gap: 8px 20px;
  margin: 9px auto 0;
  padding: 8px 0;
  border-top: 1px solid rgba(23, 37, 30, 0.08);
  border-bottom: 1px solid rgba(23, 37, 30, 0.08);
}

.chart-stats > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
}

.chart-stats span {
  color: rgba(23, 37, 30, 0.4);
  font-size: 8px;
}

.chart-stats strong {
  color: rgba(23, 37, 30, 0.68);
  font-family: var(--mono);
  font-size: 10px;
}

.chart-stats strong.is-positive {
  color: #a5342d;
}

.chart-stats strong.is-negative {
  color: #287254;
}

.chart-note {
  margin: 10px auto 2px;
  color: rgba(23, 37, 30, 0.38);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

.chart-empty {
  display: grid;
  min-height: 210px;
  place-items: center;
  color: rgba(248, 241, 223, 0.38);
  font-size: 10px;
}

/* ---------- End game modal ---------- */

.end-modal {
  width: min(460px, calc(100vw - 32px));
}

.end-modal::backdrop {
  background: rgba(2, 12, 8, 0.9);
  backdrop-filter: blur(10px);
}

.end-card {
  padding: 28px 24px 22px;
  text-align: center;
}

.end-symbol {
  display: grid;
  width: 50px;
  height: 50px;
  margin: 0 auto 12px;
  place-items: center;
  border: 1px solid rgba(232, 186, 107, 0.4);
  border-radius: 50%;
  color: var(--gold-deep);
  background: rgba(232, 186, 107, 0.14);
  font-family: var(--serif);
  font-size: 22px;
}

.end-card .eyebrow {
  margin-bottom: 4px;
  color: var(--gold-deep);
}

.end-card h2 {
  font-size: 27px;
}

.end-copy {
  max-width: 340px;
  margin: 8px auto 0;
  color: rgba(23, 37, 30, 0.5);
  font-size: 11px;
  line-height: 1.8;
}

.end-summary {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 16px 0;
  padding: 10px 12px;
  border: 1px solid rgba(189, 135, 56, 0.16);
  border-radius: 9px;
  color: rgba(23, 37, 30, 0.5);
  background: rgba(232, 186, 107, 0.08);
  font-size: 9px;
}

.end-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.end-actions .button {
  min-height: 46px;
}

.end-actions .button--ghost {
  color: rgba(23, 37, 30, 0.58);
  border-color: rgba(23, 37, 30, 0.14);
  background: rgba(255, 255, 255, 0.28);
}

.end-actions .button--ghost:hover {
  color: var(--ink);
  border-color: rgba(23, 37, 30, 0.24);
  background: rgba(255, 255, 255, 0.55);
}

/* ---------- Mobile action bar ---------- */

.mobile-actionbar {
  display: none;
}

@keyframes mobile-bar-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (max-width: 860px) {
  .lobby-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }

  .lobby-main {
    display: contents;
  }

  .table-panel {
    order: 1;
  }

  .leaderboard-panel {
    order: 2;
    position: static;
    grid-row: auto;
  }

  .settings-panel {
    order: 3;
  }

  .history-panel {
    order: 4;
  }
}

@media (max-width: 640px) {
  .lobby-wrap {
    padding-bottom: 98px;
  }

  .room-actions .button--settle {
    display: none;
  }

  .lock-banner {
    align-items: center;
    flex-wrap: nowrap;
  }

  .lock-banner-copy {
    flex-basis: auto;
  }

  .lock-banner .button,
  .lock-banner-wait {
    margin-left: 0;
  }

  .settings-panel.is-locked .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .locked-settings {
    margin-right: 14px;
    margin-left: 14px;
  }

  .chart-modal {
    width: calc(100vw - 14px);
  }

  .chart-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    margin-top: 14px;
  }

  .chart-hero strong {
    font-size: 30px;
  }

  .chart-wrap {
    padding: 6px 6px 2px;
    border-radius: 12px;
  }

  .chart-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .final-page {
    padding: 8px 16px 46px;
  }

  .final-hero {
    padding: 24px 0 22px;
  }

  .final-hero h1 {
    font-size: 46px;
  }

  .final-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .final-card {
    padding: 16px 18px 14px;
    border-radius: 18px;
  }

  .final-money {
    font-size: 38px;
  }

  .end-card {
    padding: 24px 18px 18px;
  }

  .end-actions {
    grid-template-columns: 1fr;
  }

  .seats--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landlord-options--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-players--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .join-players--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-action {
    display: none;
  }

  .mobile-actionbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    display: flex;
    width: 100%;
    max-width: 100vw;
    gap: 7px;
    box-sizing: border-box;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(232, 186, 107, 0.18);
    background:
      linear-gradient(180deg, rgba(6, 31, 24, 0.72), rgba(4, 24, 18, 0.97) 40%),
      rgba(4, 24, 18, 0.96);
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(14px);
    animation: mobile-bar-in 220ms ease-out;
    overflow: hidden;
  }

  .mobile-action {
    min-width: 0;
    min-height: 48px;
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid rgba(232, 186, 107, 0.2);
    border-radius: 12px;
    color: rgba(248, 241, 223, 0.72);
    background: rgba(255, 255, 255, 0.04);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-action--primary {
    flex: 1;
    border-color: rgba(255, 255, 255, 0.3);
    color: #1b2a21;
    background: linear-gradient(135deg, #f5d99c, #d6a24e);
    box-shadow: 0 8px 18px rgba(122, 80, 22, 0.24);
  }

  .mobile-action--settle {
    color: #ffece6;
    border-color: rgba(255, 180, 166, 0.24);
    background: linear-gradient(135deg, #c54b43, #87251f);
  }

  .mobile-action:disabled {
    opacity: 0.5;
  }
}

@media (max-width: 380px) {
  .mobile-action {
    padding-right: 9px;
    padding-left: 9px;
    font-size: 11px;
  }

  .final-hero h1 {
    font-size: 40px;
  }
}


@media (max-width: 1050px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
    gap: 30px;
  }

  .lobby-grid {
    grid-template-columns: minmax(0, 1fr) 312px;
  }

  .settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .setting-field:nth-child(4),
  .setting-field:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 860px) {
  .site-nav {
    padding: 19px 22px;
  }

  .home {
    padding: 18px 22px 42px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 18px 0 26px;
    align-content: start;
    align-items: start;
  }

  .hero {
    max-width: 600px;
  }

  .entry-card {
    width: min(560px, 100%);
  }

  .card-fan {
    margin-top: 32px;
  }

  .lobby-wrap {
    padding: 4px 22px 42px;
  }

  .room-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .room-actions {
    width: 100%;
  }

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

  .leaderboard-panel {
    position: static;
    grid-row: 1;
  }

  .leaderboard-table {
    padding-bottom: 4px;
  }

  .round-list {
    max-height: none;
  }
}

@media (max-width: 760px) {
  .modal-columns {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .modal-col:first-child {
    padding-right: 0;
    border-right: 0;
  }

  .round-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "landlord"
      "result"
      "bombs"
      "stakes"
      "multiplier"
      "players";
    column-gap: 0;
  }

  .round-multiplier,
  .round-players {
    margin-top: 12px;
    margin-bottom: 8px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .site-nav {
    padding: 16px 16px;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
    font-size: 21px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text span {
    display: none;
  }

  .nav-link {
    padding: 7px 8px;
    font-size: 11px;
  }

  .home {
    padding: 10px 16px 34px;
  }

  .hero-grid {
    gap: 28px;
    padding-top: 10px;
  }

  .hero-title {
    font-size: clamp(38px, 12vw, 54px);
  }

  .hero-copy {
    margin-top: 17px;
    font-size: 14px;
    line-height: 1.85;
  }

  .hero-pills {
    margin-top: 20px;
    gap: 6px;
  }

  .pill {
    padding: 5px 9px;
    font-size: 10px;
  }

  .card-fan {
    display: none;
  }

  .entry-card {
    padding: 20px;
    border-radius: 20px;
  }

  .recent-rooms {
    margin-top: 16px;
  }

  .site-footer {
    padding: 0 16px 22px;
    font-size: 9px;
  }

  .lobby-wrap {
    padding: 2px 14px 34px;
  }

  .room-name {
    max-width: calc(100vw - 130px);
    font-size: 27px;
  }

  .room-banner {
    margin-bottom: 16px;
    padding-bottom: 15px;
  }

  .room-actions .button {
    flex: 1;
  }

  .panel-head {
    padding: 17px 16px 0;
  }

  .panel-title {
    font-size: 18px;
  }

  .seats {
    gap: 6px;
    padding: 15px 14px 0;
  }

  .seat {
    padding: 13px 6px 11px;
  }

  .seat-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

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

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

  .seat-sub {
    display: none;
  }

  .table-action {
    margin: 15px 14px 0;
    padding-top: 14px;
  }

  .table-action-copy strong {
    font-size: 15px;
  }

  .table-action-copy span {
    display: block;
    max-width: 150px;
    font-size: 9px;
    line-height: 1.5;
  }

  .update-button {
    min-width: 122px;
    min-height: 44px;
    padding-right: 14px;
    padding-left: 14px;
    font-size: 13px;
  }

  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px 14px 0;
  }

  .settings-actions {
    padding: 14px 14px 0;
  }

  .settings-actions .button {
    min-width: 100px;
  }

  .history-panel .panel-head {
    padding-top: 16px;
  }

  .round-list {
    margin: 12px 8px 0;
  }

  .round-item {
    grid-template-columns: 28px minmax(0, 1fr) 24px;
    gap: 8px;
    padding: 10px 0;
  }

  .round-meta {
    line-height: 1.5;
  }

  .leaderboard-head {
    padding: 18px 16px 12px;
  }

  .leaderboard-title {
    font-size: 22px;
  }

  .leaderboard-columns,
  .leaderboard-row {
    grid-template-columns: 22px minmax(0, 1fr) 48px 64px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .leaderboard-table {
    padding: 0 6px;
  }

  .leaderboard-foot {
    padding-right: 16px;
    padding-left: 16px;
  }

  .join-page {
    padding: 12px 14px 45px;
  }

  .join-card {
    padding: 22px 18px;
  }

  .join-title {
    font-size: 26px;
  }

  .join-players {
    gap: 5px;
  }

  .modal {
    width: calc(100vw - 14px);
    max-height: calc(100vh - 14px);
  }

  .modal-columns {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .modal-col:first-child {
    padding-right: 0;
    border-right: 0;
  }

  .modal-card {
    max-height: calc(100vh - 14px);
    max-height: calc(100dvh - 14px);
    border-radius: 20px;
  }

  .modal-head {
    padding: 18px 16px 13px;
  }

  .modal-head h2 {
    font-size: 23px;
  }

  .modal-subtitle {
    font-size: 10px;
  }

  .modal-body {
    padding: 2px 16px 5px;
  }

  .modal-section {
    padding: 14px 0;
  }

  .section-heading h3 {
    font-size: 15px;
  }

  .section-heading p {
    font-size: 9px;
  }

  .landlord-options {
    gap: 5px;
  }

  .landlord-option {
    gap: 5px;
    padding: 7px 6px;
  }

  .landlord-avatar {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    font-size: 9px;
  }

  .landlord-copy strong {
    font-size: 10px;
  }

  .landlord-copy span {
    display: none;
  }

  .result-options {
    gap: 5px;
  }

  .result-option {
    gap: 6px;
    padding: 8px;
  }

  .result-icon {
    width: 23px;
    height: 23px;
    flex-basis: 23px;
    font-size: 12px;
  }

  .result-copy strong {
    font-size: 11px;
  }

  .result-copy span {
    font-size: 8px;
  }

  .bomb-control {
    gap: 10px;
  }

  .stepper {
    width: 108px;
    flex-basis: 108px;
  }

  .stepper-button {
    width: 30px;
    flex-basis: 30px;
  }

  .bomb-marks {
    margin-right: 118px;
  }

  .stake-grid {
    gap: 7px;
  }

  .preview-top strong {
    font-size: 23px;
  }

  .preview-players {
    gap: 4px;
  }

  .preview-player {
    padding: 5px 6px;
  }

  .preview-player strong {
    font-size: 10px;
  }

  .modal-footer {
    gap: 8px;
    padding: 11px 16px 14px;
  }

  .modal-footer .button {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 13px;
  }

  .modal-footer .button--ghost {
    flex: 0 0 84px;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }
}

@media (max-width: 380px) {
  .seat-tags {
    display: none;
  }

  .update-button {
    min-width: 108px;
  }

  .table-action-copy span {
    max-width: 110px;
  }

  .landlord-copy span {
    display: none;
  }

  .result-copy span {
    display: none;
  }
}

@media (max-width: 640px) {
  body:has(.mobile-actionbar) .toast-region {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 640px) {
  .settings-panel .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-values {
    max-width: 100%;
    margin-top: 5px;
    text-align: left;
  }
}

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