:root {
  --bg: #f4ecdf;
  --panel: rgba(255, 252, 246, 0.95);
  --panel-soft: rgba(255, 248, 238, 0.82);
  --ink: #10261f;
  --muted: #586963;
  --line: rgba(16, 38, 31, 0.12);
  --accent: #d85b32;
  --accent-deep: #7d2813;
  --table: #1f6e53;
  --table-dark: #174838;
  --table-line: rgba(240, 229, 203, 0.24);
  --success: #2d8757;
  --shadow: 0 18px 48px rgba(16, 38, 31, 0.14);
  --radius: 24px;
  --mobile-available-height: 0px;
  --mobile-topbar-height: 0px;
  --mobile-hand-height: 0px;
  --mobile-table-height: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
}

body {
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(216, 91, 50, 0.14), transparent 24rem),
    radial-gradient(circle at top right, rgba(31, 110, 83, 0.16), transparent 26rem),
    linear-gradient(180deg, #fbf7ef 0%, #efe4d3 100%);
}

button,
input {
  font: inherit;
}

button {
  touch-action: manipulation;
}

.page-shell {
  width: min(100%, 72rem);
  margin: 0 auto;
  padding: 1rem 0.9rem calc(7rem + env(safe-area-inset-bottom));
}

.hero {
  padding: 0.8rem 0 1rem;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-size: 0.74rem;
  font-weight: 800;
}

.hero h1 {
  margin: 0.2rem 0 0.45rem;
  font-size: clamp(2.6rem, 9vw, 4.5rem);
  line-height: 0.92;
}

.hero-copy {
  margin: 0;
  max-width: 33rem;
  color: var(--muted);
  font-size: 1rem;
}

.app-root {
  display: grid;
  gap: 1rem;
}

.game-screen {
  display: grid;
  gap: 1rem;
  position: relative;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.panel h2,
.panel h3,
.panel h4,
.panel p {
  margin-top: 0;
}

.alpha-note {
  background: linear-gradient(180deg, rgba(255, 248, 239, 0.98) 0%, rgba(255, 241, 227, 0.96) 100%);
  border-color: rgba(125, 40, 19, 0.16);
}

.stack {
  display: grid;
  gap: 0.85rem;
}

.grid-two {
  display: grid;
  gap: 1rem;
}

.table-stage {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.17), transparent 18rem),
    linear-gradient(180deg, var(--table) 0%, var(--table-dark) 100%);
  color: #f7efe1;
  padding: 0.9rem;
  min-height: 0;
}

.landing-screen {
  height: calc(var(--mobile-table-height, 100%) - 0.95rem);
  min-height: calc(var(--mobile-table-height, 100%) - 0.95rem);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
}

.landing-table-stage {
  height: 100%;
}

.landing-table-map {
  min-height: 32rem;
}

.landing-table-map .table-surface {
  inset: 0.4rem 0.1rem 1.2rem;
}

.landing-table-content {
  position: relative;
  z-index: 2;
  min-height: 32rem;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.9rem;
  padding: 0.55rem 0.35rem 1.5rem;
}

.landing-table-banner-row {
  display: flex;
  justify-content: center;
}

.landing-table-banner {
  width: min(100%, 29rem);
  padding: 0.78rem 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 31, 25, 0.44);
  color: #f7efe1;
  box-shadow: 0 12px 28px rgba(8, 23, 19, 0.14);
  backdrop-filter: blur(10px);
}

.landing-table-banner strong,
.landing-table-card h2 {
  margin: 0;
  color: #f7efe1;
}

.landing-table-banner p,
.landing-table-card p {
  margin: 0.3rem 0 0;
}

.landing-alpha-banner {
  background: linear-gradient(180deg, rgba(76, 114, 98, 0.58) 0%, rgba(22, 52, 42, 0.54) 100%);
}

.landing-table-resume,
.landing-table-error {
  width: min(100%, 24rem);
}

.landing-table-error {
  background: linear-gradient(180deg, rgba(122, 56, 32, 0.68) 0%, rgba(97, 38, 21, 0.58) 100%);
}

.landing-form-row {
  align-self: center;
  width: min(100%, 22.5rem);
  margin: 0 auto;
  display: grid;
  gap: 0.85rem;
  align-content: center;
  min-height: 22rem;
}

.landing-table-card {
  padding: 1rem 0.95rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 31, 25, 0.5);
  color: #f7efe1;
  box-shadow: 0 12px 28px rgba(8, 23, 19, 0.16);
  backdrop-filter: blur(10px);
  transition:
    padding 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.landing-table-card-collapsed {
  gap: 0;
  padding: 0.25rem;
}

.landing-table-card-expanded {
  gap: 0.8rem;
}

.landing-bucket-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease;
}

.landing-table-card-collapsed .landing-bucket-toggle {
  padding: 0.58rem 0.72rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.landing-table-card-expanded .landing-bucket-toggle {
  align-items: flex-start;
}

.landing-table-card-expanded {
  box-shadow: 0 16px 32px rgba(8, 23, 19, 0.2);
}

.landing-bucket-copy {
  display: grid;
  gap: 0.24rem;
  min-width: 0;
}

.landing-bucket-copy strong {
  color: #f7efe1;
  font-size: 1.05rem;
}

.landing-bucket-icon {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #f7efe1;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1;
  transition: transform 180ms ease, background 180ms ease;
}

.landing-bucket-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-0.2rem);
  transition:
    grid-template-rows 190ms ease,
    opacity 140ms ease,
    transform 190ms ease;
}

.landing-bucket-panel-inner {
  overflow: hidden;
}

.landing-table-card-expanded .landing-bucket-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
}

.landing-table-card-expanded .landing-bucket-icon {
  transform: rotate(180deg);
  background: rgba(255, 255, 255, 0.14);
}

.landing-table-card .muted,
.landing-table-banner .muted {
  color: rgba(247, 239, 225, 0.76);
}

.landing-table-card .field label {
  color: rgba(247, 239, 225, 0.84);
}

.landing-table-card input {
  background: rgba(255, 252, 246, 0.96);
}

.landing-table-card .button,
.landing-table-resume .button {
  width: 100%;
}

.landing-table-resume .status-strip {
  justify-content: flex-start;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.controls .button,
.table-map-controls .button {
  white-space: nowrap;
}

.controls.hidden {
  display: none;
}

.invite-code {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f7efe1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.invite-code:hover,
.invite-code:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
}

.invite-code:active {
  transform: translateY(1px);
}

.invite-code-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.status-chip {
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  font-size: 0.86rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
}

.status-chip.live {
  background: rgba(45, 135, 87, 0.2);
  border-color: rgba(45, 135, 87, 0.35);
}

.status-chip.wait {
  background: rgba(216, 91, 50, 0.18);
  border-color: rgba(216, 91, 50, 0.28);
}

.section-title {
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.table-map {
  position: relative;
  min-height: 29rem;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
}

.table-map-controls {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.lobby-setting-card {
  width: min(100%, 19.5rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.68rem 0.82rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.lobby-setting-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.lobby-setting-copy strong {
  font-size: 0.84rem;
}

.lobby-setting-copy span {
  color: rgba(247, 239, 225, 0.78);
  font-size: 0.74rem;
  line-height: 1.3;
}

.toggle-switch-button {
  --toggle-track-width: 2.9rem;
  --toggle-track-height: 1.7rem;
  --toggle-knob-inset: 0.16rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--toggle-track-width);
  height: var(--toggle-track-height);
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.toggle-switch-track {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(247, 239, 225, 0.22);
  border: 1px solid rgba(247, 239, 225, 0.16);
  transition: background 150ms ease, border-color 150ms ease;
}

.toggle-switch-knob {
  position: absolute;
  top: var(--toggle-knob-inset);
  left: var(--toggle-knob-inset);
  width: calc(var(--toggle-track-height) - (var(--toggle-knob-inset) * 2));
  height: calc(var(--toggle-track-height) - (var(--toggle-knob-inset) * 2));
  border-radius: 50%;
  background: #fffaf0;
  box-shadow: 0 2px 6px rgba(8, 23, 19, 0.18);
  transform: translateX(0);
  transition: transform 150ms ease;
}

.toggle-switch-button.active .toggle-switch-track {
  background: rgba(216, 91, 50, 0.9);
  border-color: rgba(216, 91, 50, 0.9);
}

.toggle-switch-button.active .toggle-switch-knob {
  transform: translateX(calc(var(--toggle-track-width) - var(--toggle-track-height)));
}

.toggle-switch-button:focus-visible .toggle-switch-track {
  outline: 2px solid rgba(255, 250, 240, 0.8);
  outline-offset: 2px;
}

.lobby-setting-indicator {
  min-width: 3.05rem;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  background: rgba(247, 239, 225, 0.14);
  border: 1px solid rgba(247, 239, 225, 0.12);
  color: rgba(247, 239, 225, 0.88);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
}

.lobby-setting-indicator.active {
  background: rgba(216, 91, 50, 0.9);
  border-color: rgba(216, 91, 50, 0.9);
  color: #fff8ef;
}

.table-surface {
  position: absolute;
  inset: 3.4rem 0.35rem 2.1rem;
  border-radius: 50% / 42%;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(17, 61, 46, 0.44), rgba(11, 39, 31, 0.5));
  border: 1px solid var(--table-line);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 -24px 60px rgba(0, 0, 0, 0.18);
}

.seat-panel {
  position: absolute;
  z-index: 2;
  width: min(11.2rem, 41vw);
  padding: 0.7rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 31, 25, 0.5);
  box-shadow: 0 12px 28px rgba(8, 23, 19, 0.16);
  backdrop-filter: blur(10px);
}

.seat-badge-rail {
  position: absolute;
  top: 0.58rem;
  left: calc(100% + 0.58rem);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.26rem;
  width: max-content;
}

.seat-panel.current-turn {
  border: 1.5px solid rgba(244, 216, 120, 0.72);
  box-shadow:
    0 0 0 3px rgba(244, 216, 120, 0.2),
    0 12px 28px rgba(8, 23, 19, 0.16);
  animation: seatCurrentPulse 2100ms ease-in-out infinite;
}

.seat-panel.turn-arrival {
  animation: seatTurnArrival 720ms cubic-bezier(0.2, 0.85, 0.32, 1);
}

.seat-panel.motion-deal-target,
.seat-panel.motion-lock-target,
.seat-panel.motion-take-target,
.seat-panel.motion-reveal-target {
  animation: seatReceiveGlow 520ms ease;
}

.seat-panel.you {
  border-color: rgba(216, 91, 50, 0.55);
}

.seat-panel.winner {
  border-color: rgba(255, 215, 117, 0.8);
  box-shadow:
    0 0 0 1px rgba(255, 215, 117, 0.15),
    0 12px 28px rgba(8, 23, 19, 0.16),
    inset 0 0 0 1px rgba(255, 235, 160, 0.08);
}

.seat-panel.disconnected {
  opacity: 0.72;
}

.seat-bottom {
  left: 50%;
  bottom: 0.7rem;
  transform: translateX(-50%);
}

.seat-top {
  left: 50%;
  top: 0.8rem;
  transform: translateX(-50%);
}

.seat-top-left {
  left: 0.25rem;
  top: 1.1rem;
}

.seat-top-right {
  right: 0.25rem;
  top: 1.1rem;
}

.seat-left {
  left: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
}

.seat-right {
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
}

.seat-bottom-left {
  left: 0.35rem;
  bottom: 1.35rem;
}

.seat-header {
  display: grid;
  justify-items: center;
  text-align: center;
}

.seat-title-row {
  display: flex;
  justify-content: center;
}

.seat-header strong {
  font-size: 0.95rem;
}

.seat-presence {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.42rem;
  margin-left: 0.7rem;
  margin-right: 0.7rem;
  justify-items: center;
  text-align: center;
}

.seat-presence-line {
  font-size: 0.68rem;
  line-height: 1.25;
  color: rgba(247, 239, 225, 0.78);
}

.seat-actions {
  margin-top: 0.18rem;
}

.seat-remove-button.armed-remove {
  background: #f5c9a8;
  border-color: rgba(216, 91, 50, 0.34);
  color: var(--accent-deep);
}

.seat-badges,
.secondary-action-row,
.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.seat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.26rem;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(91, 110, 103, 0.9);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(247, 239, 225, 0.96);
  text-align: left;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(8, 23, 19, 0.16);
  backdrop-filter: blur(10px);
}

.seat-badge-placement {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(249, 242, 228, 0.14);
}

.seat-badge-winner {
  border-color: rgba(255, 245, 199, 0.72);
  background: linear-gradient(135deg, rgba(255, 240, 170, 0.98), rgba(247, 181, 52, 0.98));
  color: #3a2500;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.36),
    0 12px 22px rgba(124, 83, 0, 0.28);
  transform: translateY(-1px) scale(1.03);
}

.seat-badge-shithead {
  border-style: dashed;
  border-color: rgba(255, 200, 150, 0.62);
  background: linear-gradient(135deg, rgba(45, 26, 18, 0.96), rgba(122, 74, 34, 0.96));
  color: #fff5e8;
  box-shadow: 0 12px 22px rgba(28, 15, 8, 0.32);
}

.seat-badge-meta {
  background: rgba(91, 110, 103, 0.9);
}

.seat-hand-row {
  margin-top: 0.48rem;
  min-height: 2.15rem;
  display: flex;
  justify-content: center;
}

.seat-muted {
  color: rgba(247, 239, 225, 0.55);
  font-size: 0.74rem;
}

.seat-hand-fan-wrap {
  --seat-fan-card-width: 1.48rem;
  --seat-fan-step: 0.25rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--seat-fan-card-width) + (var(--seat-fan-count, 1) - 1) * var(--seat-fan-step));
}

.seat-hand-fan {
  position: relative;
  width: 100%;
  height: 2.2rem;
}

.seat-back-card {
  display: block;
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.48rem;
  height: 2.02rem;
  border-radius: 0.28rem;
  border: 1px solid rgba(207, 214, 221, 0.95);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.18) 0 0.11rem, transparent 0.13rem),
    radial-gradient(circle, rgba(34, 99, 191, 0.92) 0.06rem, transparent 0.08rem),
    linear-gradient(180deg, #fffdf8 0%, #edf2fb 100%);
  background-size: auto, 0.34rem 0.34rem, auto;
  box-shadow: 0 5px 12px rgba(8, 23, 19, 0.18);
  transform-origin: bottom center;
}

.seat-back-card.stacked {
  top: 0;
  left: 0;
}

.seat-back-card.hidden-row {
  position: relative;
  top: auto;
  left: auto;
  flex: 0 0 auto;
}

.seat-count-badge {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  z-index: 2;
  min-width: 1.5rem;
  padding: 0.15rem 0.38rem;
  border-radius: 999px;
  background: rgba(12, 31, 25, 0.72);
  color: rgba(247, 239, 225, 0.94);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 4px 10px rgba(8, 23, 19, 0.18);
}

.seat-public-cards {
  margin-top: 0.14rem;
  min-height: 2.52rem;
  display: flex;
  justify-content: center;
}

.seat-public-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
}

.seat-public-stack-card {
  position: relative;
  width: 1.55rem;
  height: 2.22rem;
}

.seat-hidden-underlay {
  position: absolute;
  left: 0.18rem;
  top: 0.16rem;
  width: 1.55rem;
  height: 2.22rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(207, 214, 221, 0.9);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.16) 0 0.1rem, transparent 0.12rem),
    radial-gradient(circle, rgba(34, 99, 191, 0.92) 0.05rem, transparent 0.075rem),
    linear-gradient(180deg, #fffdf8 0%, #edf2fb 100%);
  background-size: auto, 0.3rem 0.3rem, auto;
  box-shadow: 0 4px 9px rgba(8, 23, 19, 0.12);
}

.seat-mini-card {
  position: absolute;
  inset: 0;
  border-radius: 0.3rem;
  border: 1px solid rgba(16, 38, 31, 0.08);
  background: linear-gradient(180deg, #fffdf8 0%, #f2e7d9 100%);
  color: var(--ink);
  box-shadow: 0 5px 11px rgba(8, 23, 19, 0.16);
  padding: 0.16rem 0.16rem 0.14rem;
  display: grid;
  align-content: space-between;
  font-weight: 800;
}

.seat-mini-card.red {
  color: #b23018;
}

.seat-mini-card.joker {
  background: linear-gradient(180deg, #fff6e4 0%, #f0d8af 100%);
}

.seat-mini-rank {
  font-size: 0.54rem;
  line-height: 1;
}

.seat-mini-suit {
  justify-self: end;
  font-size: 0.66rem;
  line-height: 1;
}

.seat-hidden-stack {
  display: flex;
  justify-content: center;
  gap: 0.24rem;
  min-height: 2.18rem;
}

.table-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -34%);
  z-index: 3;
  width: min(100%, 18rem);
  display: grid;
  gap: 0.7rem;
}

.turn-banner,
.event-box {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.turn-banner {
  background: rgba(255, 255, 255, 0.14);
}

.turn-banner strong {
  font-size: 1.4rem;
}

.turn-banner .muted {
  color: rgba(247, 239, 225, 0.82);
}

.event-box {
  background: rgba(255, 248, 236, 0.18);
}

.event-box.event-box-muted {
  background: rgba(14, 32, 26, 0.38);
}

.event-box strong {
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.event-box span {
  font-size: 1.16rem;
  font-weight: 800;
}

.table-resources {
  display: grid;
  grid-template-columns: 5.35rem minmax(0, 2.2fr);
  gap: 0.75rem;
  align-items: stretch;
}

.deck-orb,
.pile-zone,
.stack-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.1);
}

.deck-orb {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 6.1rem;
  padding: 0.9rem 1rem;
  text-align: left;
}

.deck-stack {
  position: relative;
  width: 2.9rem;
  height: 3.65rem;
  align-self: center;
  margin-top: 0.5rem;
}

.deck-stack.dealing {
  animation: deckDealPulse 700ms ease;
}

.deck-back-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 2.2rem;
  height: 3rem;
  border-radius: 0.42rem;
  border: 1px solid rgba(207, 214, 221, 0.95);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.18) 0 0.11rem, transparent 0.13rem),
    radial-gradient(circle, rgba(34, 99, 191, 0.92) 0.06rem, transparent 0.08rem),
    linear-gradient(180deg, #fffdf8 0%, #edf2fb 100%);
  background-size: auto, 0.34rem 0.34rem, auto;
  box-shadow: 0 8px 16px rgba(8, 23, 19, 0.18);
}

.deck-count-badge {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  z-index: 2;
  min-width: 1.55rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(12, 31, 25, 0.72);
  color: rgba(247, 239, 225, 0.94);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 4px 10px rgba(8, 23, 19, 0.18);
}

.resource-label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247, 239, 225, 0.72);
}

.pile-zone {
  padding: 0.75rem;
}

.pile-preview {
  display: flex;
  align-items: flex-end;
  min-height: 3.3rem;
  margin-top: 0.45rem;
  overflow: hidden;
  padding-right: 0.35rem;
  transform-origin: center center;
}

.pile-preview.settling {
  animation: pileSettle 320ms ease;
}

.pile-preview.taking {
  animation: pileTaking 360ms ease;
}

.pile-preview.burning {
  animation: pileBurn 520ms ease;
}

.mini-card {
  width: 2.4rem;
  height: 3.2rem;
  margin-right: -0.8rem;
  padding: 0.28rem 0.28rem 0.24rem;
  border-radius: 14px;
  border: 1px solid rgba(16, 38, 31, 0.08);
  background: linear-gradient(180deg, #fffdf8 0%, #f2e7d9 100%);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(16, 38, 31, 0.12);
  display: grid;
  align-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
}

.mini-card-rank-line {
  display: inline-flex;
  align-items: center;
  gap: 0.04rem;
}

.mini-card-arrow {
  font-size: 0.72em;
  line-height: 1;
}

.mini-card > span:nth-child(2) {
  justify-self: end;
  line-height: 0.82;
  text-align: left;
}

.mini-card:last-child {
  margin-right: 0;
}

.mini-card.red {
  color: #b23018;
}

.mini-card.joker {
  background: linear-gradient(180deg, #fff2d9 0%, #efd5aa 100%);
}

.pile-empty,
.pile-caption {
  color: rgba(247, 239, 225, 0.76);
  font-size: 0.82rem;
}

.table-help-trigger {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  z-index: 6;
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 252, 246, 0.92);
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: 0 14px 24px rgba(11, 39, 31, 0.22);
}

.table-shoutout-trigger {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  z-index: 6;
  width: 2.35rem;
  height: 2.35rem;
  min-width: 2.35rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 252, 246, 0.92);
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: 0 14px 24px rgba(11, 39, 31, 0.22);
  overflow: hidden;
  isolation: isolate;
}

.table-shoutout-trigger:disabled {
  cursor: not-allowed;
}

.table-shoutout-trigger.disabled {
  opacity: 0.5;
}

.table-shoutout-trigger.locked {
  opacity: 1;
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.48);
  background: transparent;
  box-shadow: 0 10px 18px rgba(11, 39, 31, 0.14);
}

.shoutout-trigger-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: 0;
  background: #fff;
  border-radius: inherit;
  pointer-events: none;
  will-change: height;
}

.table-shoutout-trigger.locked .shoutout-trigger-fill {
  animation-name: shoutoutRecover;
  animation-duration: var(--shoutout-fill-duration, 4000ms);
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-delay: var(--shoutout-fill-delay, 0ms);
}

.shoutout-joker-emoji {
  display: block;
  position: relative;
  z-index: 1;
  font-size: 1.15rem;
  line-height: 1;
}

.rules-menu-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.rules-menu-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: auto;
}

.rules-menu {
  position: absolute;
  right: 0.85rem;
  bottom: 3.55rem;
  width: min(22rem, calc(100% - 1.7rem));
  max-height: min(30rem, calc(100% - 2rem));
  overflow: auto;
  pointer-events: auto;
  border-radius: 22px;
  border: 1px solid rgba(16, 38, 31, 0.1);
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.98) 0%, rgba(244, 236, 223, 0.98) 100%);
  box-shadow: 0 24px 50px rgba(11, 39, 31, 0.28);
  padding: 1rem;
  color: var(--ink);
}

.shoutout-menu-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.shoutout-menu-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: auto;
}

.shoutout-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3.55rem;
  width: auto;
  max-width: none;
  max-height: min(30rem, calc(100% - 2rem));
  overflow: auto;
  pointer-events: auto;
  border-radius: 22px;
  border: 1px solid rgba(16, 38, 31, 0.1);
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.98) 0%, rgba(244, 236, 223, 0.98) 100%);
  box-shadow: 0 24px 50px rgba(11, 39, 31, 0.28);
  padding: 1rem;
  color: var(--ink);
}

.shoutout-menu-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.9rem;
}

.shoutout-menu-copy {
  margin-top: 0.7rem;
}

.shoutout-menu-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.shoutout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.shoutout-chip {
  --shoutout-accent: #d85b32;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  padding: 0.72rem 0.78rem;
  border-radius: 18px;
  border: 1px solid rgba(16, 38, 31, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 239, 225, 0.95) 100%);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 18px rgba(11, 39, 31, 0.08);
  cursor: pointer;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease;
}

.shoutout-chip:hover,
.shoutout-chip:focus-visible {
  transform: translateY(-1px);
  border-color: var(--shoutout-accent);
  box-shadow: 0 12px 22px rgba(11, 39, 31, 0.12);
}

.shoutout-chip-emoji {
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(0, 0, 0, 0.06) 100%),
    var(--shoutout-accent);
  color: #fffaf3;
  font-size: 1.03rem;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 10px 18px rgba(11, 39, 31, 0.14);
  text-shadow: 0 1px 1px rgba(11, 39, 31, 0.18);
}

.shoutout-chip-label {
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: pre-line;
}

.rules-menu-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.9rem;
}

.rules-menu-copy {
  margin-top: 0.8rem;
}

.rules-block {
  display: grid;
  gap: 0.22rem;
}

.rules-block strong {
  color: var(--accent-deep);
}

.rules-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.hand-dock {
  position: sticky;
  bottom: 0.7rem;
  z-index: 20;
  background: rgba(255, 252, 246, 0.92);
  backdrop-filter: blur(14px);
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.hand-dock.turn-arrival .dock-header-main {
  animation: handTurnArrival 720ms cubic-bezier(0.2, 0.85, 0.32, 1);
}

.hand-dock.motion-deal-target .hand-fan,
.hand-dock.motion-lock-target .hand-fan,
.hand-dock.motion-play-target .hand-fan,
.hand-dock.motion-draw-target .hand-fan,
.hand-dock.motion-take-target .hand-fan {
  animation: handFanSettle 420ms ease;
}

.hand-dock.waiting {
  background: rgba(250, 246, 239, 0.9);
}

.dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 1.9rem;
}

.dock-header-main {
  min-width: 0;
}

.dock-header-action {
  flex: 0 0 auto;
  min-height: 2.18rem;
  padding: 0.56rem 0.98rem;
  font-size: 0.84rem;
  box-shadow: 0 8px 14px rgba(16, 38, 31, 0.14);
}

.dock-title {
  font-size: 1.1rem;
}

.selection-pill {
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  background: rgba(216, 91, 50, 0.12);
  border: 1px solid rgba(216, 91, 50, 0.16);
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 800;
}

.dock-prompt {
  margin-top: 0.04rem;
  color: var(--muted);
  font-weight: 600;
}

.dock-error {
  padding: 0.48rem 0.68rem;
  border-radius: 16px;
  background: rgba(216, 91, 50, 0.12);
  border: 1px solid rgba(216, 91, 50, 0.16);
  color: #9d2612;
  font-size: 0.78rem;
  font-weight: 800;
}

.hand-fan {
  --hand-card-width: 4.5rem;
  --hand-card-height: 6.35rem;
  --hand-card-overlap: 1.25rem;
  --hand-card-lift: 0.85rem;
  --hand-card-selection-bleed: 0.1rem;
  position: relative;
  display: flex;
  overflow-x: auto;
  gap: 0;
  padding: calc(0.8rem + var(--hand-card-lift) + var(--hand-card-selection-bleed)) 0.35rem 1rem;
  min-height: calc(var(--hand-card-height) + var(--hand-card-lift) + var(--hand-card-selection-bleed) + 0.4rem);
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.hand-fan .card {
  flex: 0 0 auto;
  margin-left: calc(-1 * var(--hand-card-overlap));
  touch-action: pan-x;
}

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

.card {
  width: var(--hand-card-width);
  min-height: var(--hand-card-height);
  border-radius: 20px;
  border: 1px solid rgba(16, 38, 31, 0.1);
  background: linear-gradient(180deg, #fffdf8 0%, #f3eadf 100%);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(16, 38, 31, 0.12);
  padding: 0.62rem 0.5rem;
  display: grid;
  justify-items: start;
  align-content: space-between;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.card.selected {
  position: relative;
  z-index: 2;
  transform: translateY(calc(-1 * var(--hand-card-lift)));
  border-color: rgba(216, 91, 50, 0.56);
  box-shadow: 0 18px 28px rgba(216, 91, 50, 0.24);
}

.card.local-play-hidden {
  opacity: 0;
  pointer-events: none;
}

.card-rank {
  font-size: 1.22rem;
  font-weight: 800;
}

.card-suit {
  font-size: 1.7rem;
  line-height: 1;
}

.card.red {
  color: #b23018;
}

.card.joker {
  background: linear-gradient(180deg, #fff6e4 0%, #f0d8af 100%);
}

.card-joker-tag {
  align-self: end;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(16, 38, 31, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.actions,
.primary-action-row,
.choice-block {
  display: grid;
  gap: 0.7rem;
}

.secondary-action-row {
  margin-top: 0.15rem;
}

.choice-block {
  padding: 0.8rem 0.9rem;
  border-radius: 18px;
  background: rgba(16, 38, 31, 0.04);
}

.choice-title {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.joker-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.joker-choice-row .button {
  min-width: 3.2rem;
  padding: 0.7rem 0.9rem;
}

.joker-pending-card {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0.2rem 0.1rem;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 0.88rem 1.1rem;
  background: var(--ink);
  color: white;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 18px rgba(16, 38, 31, 0.18);
}

.button.secondary {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button.accent {
  background: var(--accent);
}

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

.button.button-inline {
  padding: 0.46rem 0.72rem;
  font-size: 0.76rem;
}

.button.button-inline.armed-leave {
  background: #f5c9a8;
  border-color: rgba(216, 91, 50, 0.34);
  color: var(--accent-deep);
}

.button.button-inline.armed-remove {
  background: #f5c9a8;
  border-color: rgba(216, 91, 50, 0.34);
  color: var(--accent-deep);
}

.button:disabled {
  opacity: 0.48;
  box-shadow: none;
}

.motion-overlay {
  position: fixed;
  inset: 0;
  z-index: 24;
  pointer-events: none;
  overflow: hidden;
}

.motion-layer {
  position: absolute;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  overflow: hidden;
}

.motion-shoutout {
  position: absolute;
  left: 0;
  top: 0;
  min-width: 7.6rem;
  max-width: 10rem;
  padding: 0.58rem 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--shoutout-accent, rgba(216, 91, 50, 0.34));
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 54%),
    linear-gradient(180deg, rgba(255, 252, 246, 0.98) 0%, rgba(247, 239, 225, 0.98) 100%);
  color: var(--shoutout-accent, var(--accent));
  box-shadow:
    0 18px 32px rgba(8, 23, 19, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  opacity: 0;
  transform: translate3d(calc(-50% + 0px), calc(-50% + 0px), 0) scale(0.76) rotate(-6deg);
  animation: shoutoutFloat 1500ms cubic-bezier(0.2, 0.85, 0.32, 1) forwards;
  will-change: transform, opacity;
}

.motion-shoutout-body {
  display: flex;
  align-items: center;
  gap: 0.52rem;
}

.motion-shoutout-emoji {
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--shoutout-accent, var(--accent));
  color: #fffaf3;
  font-size: 1.05rem;
  box-shadow: 0 10px 18px rgba(11, 39, 31, 0.14);
}

.motion-shoutout-label {
  min-width: 0;
  font-size: 0.86rem;
  line-height: 1.12;
  font-weight: 900;
  color: var(--ink);
  white-space: pre-line;
}

.motion-card {
  --motion-width: 3.15rem;
  --motion-height: 4.35rem;
  position: absolute;
  left: calc(var(--motion-x) - (var(--motion-width) / 2));
  top: calc(var(--motion-y) - (var(--motion-height) / 2));
  width: var(--motion-width);
  height: var(--motion-height);
  border-radius: 16px;
  border: 1px solid rgba(255, 253, 248, 0.82);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.68), transparent 40%),
    linear-gradient(180deg, rgba(255, 252, 246, 0.92) 0%, rgba(242, 231, 217, 0.78) 100%);
  box-shadow:
    0 10px 24px rgba(8, 23, 19, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.84) rotate(var(--motion-rotate, 0deg));
  animation: motionTravel 520ms cubic-bezier(0.2, 0.85, 0.32, 1) forwards;
  animation-delay: var(--motion-delay, 0ms);
  will-change: transform, opacity;
}

.motion-card.motion-local {
  left: var(--motion-left);
  top: var(--motion-top);
  width: var(--motion-width);
  height: var(--motion-height);
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: translate3d(0, 0, 0);
  transform-origin: top left;
  animation: motionMorphTravel 560ms cubic-bezier(0.2, 0.85, 0.32, 1) forwards;
}

.motion-card.motion-local::before {
  display: none;
}

.motion-card-shell {
  display: block;
  width: 100%;
  height: 100%;
}

.motion-card-face.card {
  width: 100%;
  min-height: 100%;
  height: 100%;
  margin: 0;
  transform: none;
  transition: none;
  box-shadow:
    0 14px 26px rgba(16, 38, 31, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.motion-card.motion-local-draw .motion-card-face.card {
  box-shadow:
    0 12px 24px rgba(16, 38, 31, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.motion-card.motion-local-play-throw {
  animation: localPlayThrow 320ms cubic-bezier(0.22, 0.86, 0.34, 1) forwards;
}

.motion-card.motion-local-play-settle {
  animation: localPlaySettle 250ms cubic-bezier(0.26, 0.88, 0.4, 1) forwards;
}

.motion-card.motion-local-draw-settle {
  animation: localDrawSettle 520ms cubic-bezier(0.2, 0.85, 0.32, 1) forwards;
}

.motion-card::before {
  content: "";
  position: absolute;
  inset: 0.28rem;
  border-radius: 12px;
  border: 1px solid rgba(16, 38, 31, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 80%);
}

.motion-card.motion-deal {
  --motion-width: 2.9rem;
  --motion-height: 4rem;
}

.motion-card.motion-lock,
.motion-card.motion-play,
.motion-card.motion-draw-self,
.motion-card.motion-reveal-hidden {
  border-color: rgba(216, 91, 50, 0.26);
}

.motion-card.motion-draw-self {
  --motion-width: 2.9rem;
  --motion-height: 4rem;
  border-color: rgba(247, 239, 225, 0.6);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.72), transparent 40%),
    linear-gradient(180deg, rgba(255, 252, 246, 0.94) 0%, rgba(239, 232, 220, 0.82) 100%);
  animation-duration: 470ms;
}

.motion-card.motion-take-pile {
  border-color: rgba(247, 239, 225, 0.5);
}

.motion-card.motion-burn {
  border-color: rgba(244, 216, 120, 0.36);
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 227, 158, 0.64), transparent 42%),
    linear-gradient(180deg, rgba(255, 248, 236, 0.88) 0%, rgba(238, 209, 165, 0.68) 100%);
  animation-name: burnCardTravel;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.92rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  padding: 0.82rem 0.95rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.error {
  color: #9d2612;
  font-weight: 800;
}

.standings {
  display: grid;
  gap: 0.55rem;
}

.standing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.standing-row strong {
  font-size: 0.96rem;
}

.muted {
  color: var(--muted);
}

.tiny {
  font-size: 0.84rem;
}

.help-drawer {
  margin-top: 0.2rem;
  border-top: 1px solid rgba(16, 38, 31, 0.08);
  padding-top: 0.8rem;
}

.help-drawer summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.help-drawer[open] .help-copy {
  margin-top: 0.8rem;
}

.hand-layout-fit .hand-fan {
  overflow-x: hidden;
}

.hand-layout-compact .card-rank {
  font-size: 1rem;
}

.hand-layout-compact .card-suit {
  font-size: 1.35rem;
}

body.game-active-mobile {
  overflow: hidden;
}

body.game-active-mobile .page-shell {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: calc(0.55rem + env(safe-area-inset-top)) 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
}

body.game-active-mobile .hero {
  display: none;
  padding: 0 0 0.45rem;
}

body.game-active-mobile .hero-note,
body.game-active-mobile .hero-copy {
  display: none;
}

body.game-active-mobile .hero h1 {
  margin: 0.08rem 0 0;
  font-size: clamp(1.9rem, 9vw, 2.5rem);
}

body.game-active-mobile .eyebrow {
  font-size: 0.64rem;
  letter-spacing: 0.18em;
}

body.game-active-mobile .app-root {
  height: 100%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  gap: 0.7rem;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  padding-top: 0.05rem;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.game-topbar.actions-only {
  justify-content: flex-end;
}

body.game-started-mobile .hero {
  display: none;
}

body.game-started-mobile .app-root {
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  padding-top: 0.05rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.game-topbar-title {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

.game-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.game-topbar-eyebrow {
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 800;
  white-space: nowrap;
}

.game-topbar-name {
  font-size: 1.02rem;
  line-height: 1;
}

.connection-indicator {
  position: relative;
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(45, 135, 87, 0.24);
  background: rgba(45, 135, 87, 0.1);
}

.connection-indicator.connected::before {
  content: "";
  width: 0.42rem;
  height: 0.22rem;
  border-left: 2px solid #2d8757;
  border-bottom: 2px solid #2d8757;
  transform: rotate(-45deg) translateY(-1px);
}

.connection-indicator.reconnecting {
  border-color: rgba(216, 91, 50, 0.28);
  background: rgba(216, 91, 50, 0.1);
}

.connection-indicator.reconnecting::before {
  content: "";
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 50%;
  border: 2px solid rgba(216, 91, 50, 0.2);
  border-top-color: var(--accent);
  animation: spin 900ms linear infinite;
}

body.game-active-mobile .game-topbar {
  gap: 0.55rem;
}

body.game-active-mobile .game-topbar-actions {
  gap: 0.38rem;
}

body.game-active-mobile .game-topbar-name {
  font-size: 0.88rem;
}

body.game-active-mobile .button.button-inline {
  padding: 0.42rem 0.68rem;
  font-size: 0.74rem;
}

body.game-active-mobile .button.button-inline.armed-leave {
  background: #f5c9a8;
}

body.game-active-mobile .game-screen.mobile-one-screen {
  height: 100%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  gap: 0.45rem;
  grid-template-rows: minmax(0, var(--mobile-table-height)) auto;
  align-items: stretch;
}

body.game-active-mobile .game-screen.mobile-one-screen.local-player-finished {
  gap: 0;
  grid-template-rows: minmax(0, var(--mobile-table-height));
}

body.game-active-mobile .game-screen.mobile-one-screen.local-player-finished .hand-dock {
  display: none;
}

body.game-active-mobile .landing-screen {
  height: calc(var(--mobile-table-height) - 1.4rem);
  min-height: calc(var(--mobile-table-height) - 1.4rem);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
}

body.game-active-mobile .table-stage {
  height: 100%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  gap: 0.38rem;
  padding: 0.56rem;
}

body.game-active-mobile:not(.game-started-mobile) .table-stage {
  display: flex;
  flex-direction: column;
}

body.game-active-mobile .landing-table-stage {
  padding: 0.56rem 0.56rem 0.82rem;
}

body.game-active-mobile .controls {
  gap: 0.45rem;
  justify-content: flex-start;
}

body.game-active-mobile .invite-code {
  min-width: 0;
  padding: 0.52rem 0.75rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

body.game-active-mobile .status-chip {
  padding: 0.34rem 0.62rem;
  font-size: 0.76rem;
}

body.game-active-mobile .controls .button {
  padding: 0.6rem 0.78rem;
  font-size: 0.84rem;
}

body.game-started-mobile .table-stage {
  padding-top: 0.12rem;
}

body.game-started-mobile .controls {
  min-height: 1.9rem;
}

body.game-active-mobile .table-map {
  min-height: 0;
  height: 100%;
}

body.game-active-mobile:not(.game-started-mobile) .table-map {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  padding: 0.52rem 0.42rem 0;
}

body.game-active-mobile .landing-table-map {
  min-height: 0;
  height: 100%;
  padding: 0;
}

body.game-active-mobile .landing-table-map .table-surface {
  inset: 0.15rem 0.1rem 1.45rem;
}

body.game-active-mobile .landing-table-content {
  min-height: 0;
  gap: 0.75rem;
  padding: 0.4rem 0.22rem 1.35rem;
  overflow-y: auto;
}

body.game-active-mobile .landing-table-banner {
  width: min(100%, 20rem);
  padding: 0.68rem 0.78rem;
  border-radius: 16px;
}

body.game-active-mobile .landing-table-banner strong {
  font-size: 0.86rem;
}

body.game-active-mobile .landing-table-banner p {
  font-size: 0.73rem;
  line-height: 1.28;
}

body.game-active-mobile .landing-form-row {
  width: min(100%, 19.75rem);
  gap: 0.72rem;
  min-height: 21rem;
}

body.game-active-mobile .landing-table-card {
  padding: 0.88rem 0.82rem;
  border-radius: 18px;
}

body.game-active-mobile .landing-table-card-collapsed {
  padding: 0.22rem;
}

body.game-active-mobile .landing-table-card-expanded {
  gap: 0.72rem;
}

body.game-active-mobile .landing-table-card h2 {
  font-size: 1rem;
}

body.game-active-mobile .landing-table-card p,
body.game-active-mobile .landing-table-card .field label {
  font-size: 0.78rem;
}

body.game-active-mobile .landing-table-card-collapsed .landing-bucket-toggle {
  padding: 0.5rem 0.64rem;
  border-radius: 15px;
}

body.game-active-mobile .landing-bucket-copy strong {
  font-size: 0.96rem;
}

body.game-active-mobile .landing-bucket-icon {
  width: 1.8rem;
  height: 1.8rem;
  font-size: 1.05rem;
}

body.game-active-mobile .landing-table-card .button,
body.game-active-mobile .landing-table-resume .button {
  min-height: 2.3rem;
}

body.game-active-mobile:not(.game-started-mobile) .table-map-controls {
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

body.game-active-mobile:not(.game-started-mobile) .table-map-controls .button {
  padding: 0.58rem 0.74rem;
  font-size: 0.8rem;
}

body.game-active-mobile .lobby-setting-card {
  gap: 0.72rem;
  padding: 0.58rem 0.72rem;
  border-radius: 16px;
}

body.game-active-mobile .lobby-setting-copy strong {
  font-size: 0.78rem;
}

body.game-active-mobile .lobby-setting-copy span {
  font-size: 0.7rem;
}

body.game-active-mobile .lobby-setting-indicator {
  min-width: 2.8rem;
  padding: 0.26rem 0.56rem;
  font-size: 0.72rem;
}

body.game-active-mobile:not(.game-started-mobile) .dock-error {
  padding: 0.48rem 0.74rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f7efe1;
  font-size: 0.74rem;
}

body.game-active-mobile .table-surface {
  inset: 1.5rem 0.1rem 0.35rem;
  border-radius: 50% / 44%;
}

body.game-active-mobile:not(.game-started-mobile) .table-surface {
  inset: 4.7rem 0.1rem 0.35rem;
}

body.game-active-mobile .landing-table-map .table-surface {
  inset: 0.15rem 0.1rem 1.45rem;
}

body.game-active-mobile .seat-panel {
  width: min(8.7rem, 35vw);
  padding: 0.45rem 0.55rem;
  border-radius: 16px;
}

body.game-active-mobile .seat-header strong {
  font-size: 0.78rem;
}

body.game-active-mobile .seat-title-row {
  gap: 0;
}

body.game-active-mobile .seat-badges,
body.game-active-mobile .secondary-action-row,
body.game-active-mobile .choice-row {
  gap: 0.28rem;
}

body.game-active-mobile .seat-badge-rail {
  top: 1rem;
  left: calc(100% - 1.1rem);
}

body.game-active-mobile .seat-badge,
body.game-active-mobile .seat-count-badge {
  font-size: 0.69rem;
}

body.game-active-mobile .seat-hand-row {
  margin-top: 0.32rem;
  min-height: 2rem;
}

body.game-active-mobile .seat-hand-fan {
  height: 1.9rem;
}

body.game-active-mobile .seat-back-card {
  width: 1.28rem;
  height: 1.76rem;
}

body.game-active-mobile .seat-public-cards {
  margin-top: 0.1rem;
  min-height: 2rem;
}

body.game-active-mobile .seat-public-stack {
  gap: 0.22rem;
}

body.game-active-mobile .seat-public-stack-card,
body.game-active-mobile .seat-hidden-underlay {
  width: 1.34rem;
  height: 1.92rem;
}

body.game-active-mobile .seat-hidden-underlay {
  left: 0.14rem;
  top: 0.12rem;
}

body.game-active-mobile .seat-mini-rank {
  font-size: 0.48rem;
}

body.game-active-mobile .seat-mini-suit {
  font-size: 0.58rem;
}

body.game-active-mobile .seat-hidden-stack {
  width: 2rem;
  height: 2.2rem;
}

body.game-active-mobile .players-2 .seat-top {
  top: 0.35rem;
}

body.game-active-mobile:not(.game-started-mobile) .players-2 .seat-top {
  top: 4.2rem;
}

body.game-active-mobile .players-2 .seat-bottom {
  bottom: 0.2rem;
}

body.game-active-mobile .players-3 .seat-top-left,
body.game-active-mobile .players-3 .seat-top-right {
  top: 0.55rem;
}

body.game-active-mobile:not(.game-started-mobile) .players-3 .seat-top-left,
body.game-active-mobile:not(.game-started-mobile) .players-3 .seat-top-right {
  top: 4.1rem;
}

body.game-active-mobile .players-3 .seat-top-left {
  left: 0.1rem;
}

body.game-active-mobile .players-3 .seat-top-right {
  right: 0.1rem;
}

body.game-active-mobile .players-3 .seat-bottom {
  bottom: 0.2rem;
}

body.game-active-mobile .players-4 .seat-panel {
  width: min(8rem, 32vw);
}

body.game-active-mobile .players-4 .seat-top {
  top: 0.55rem;
}

body.game-active-mobile .players-4 .seat-top-left,
body.game-active-mobile .players-4 .seat-top-right {
  top: 1.15rem;
}

body.game-active-mobile:not(.game-started-mobile) .players-4 .seat-top {
  top: 4.1rem;
}

body.game-active-mobile:not(.game-started-mobile) .players-4 .seat-top-left,
body.game-active-mobile:not(.game-started-mobile) .players-4 .seat-top-right {
  top: 4.7rem;
}

body.game-active-mobile .players-4 .seat-top-left {
  left: 0.1rem;
}

body.game-active-mobile .players-4 .seat-top {
  left: 50%;
  transform: translateX(-50%);
}

body.game-active-mobile .players-4 .seat-top-right {
  right: 0.1rem;
}

body.game-active-mobile .players-4 .seat-bottom {
  bottom: 0.18rem;
}

body.game-active-mobile .game-screen.layout-tall.players-3 .seat-top-left,
body.game-active-mobile .game-screen.layout-tall.players-3 .seat-top-right {
  top: 0.8rem;
}

body.game-active-mobile:not(.game-started-mobile) .game-screen.layout-tall.players-3 .seat-top-left,
body.game-active-mobile:not(.game-started-mobile) .game-screen.layout-tall.players-3 .seat-top-right {
  top: 4.35rem;
}

body.game-active-mobile .game-screen.layout-tall.players-3 .seat-top-left {
  left: 0.18rem;
}

body.game-active-mobile .game-screen.layout-tall.players-3 .seat-top-right {
  right: 0.18rem;
}

body.game-active-mobile .game-screen.layout-wide.players-3 .seat-panel {
  width: min(8.9rem, 29vw);
}

body.game-active-mobile .game-screen.layout-wide.players-3 .seat-top-left,
body.game-active-mobile .game-screen.layout-wide.players-3 .seat-top-right {
  top: 0.3rem;
}

body.game-active-mobile:not(.game-started-mobile) .game-screen.layout-wide.players-3 .seat-top-left,
body.game-active-mobile:not(.game-started-mobile) .game-screen.layout-wide.players-3 .seat-top-right {
  top: 3.95rem;
}

body.game-active-mobile .game-screen.layout-wide.players-3 .seat-top-left {
  left: 0.42rem;
}

body.game-active-mobile .game-screen.layout-wide.players-3 .seat-top-right {
  right: 0.42rem;
}

body.game-active-mobile .game-screen.layout-wide.players-3 .seat-bottom {
  bottom: 0.28rem;
}

body.game-active-mobile .game-screen.layout-tall.players-4 .seat-panel {
  width: min(7.85rem, 33vw);
}

body.game-active-mobile .game-screen.layout-tall.players-4 .seat-top {
  top: 0.7rem;
}

body.game-active-mobile:not(.game-started-mobile) .game-screen.layout-tall.players-4 .seat-top {
  top: 4.25rem;
}

body.game-active-mobile .game-screen.layout-tall.players-4 .seat-top-left,
body.game-active-mobile .game-screen.layout-tall.players-4 .seat-top-right {
  top: 6rem;
}

body.game-active-mobile:not(.game-started-mobile) .game-screen.layout-tall.players-4 .seat-top-left,
body.game-active-mobile:not(.game-started-mobile) .game-screen.layout-tall.players-4 .seat-top-right {
  top: 4.9rem;
}

body.game-active-mobile .game-screen.layout-tall.players-4 .seat-top-left {
  left: 0.18rem;
}

body.game-active-mobile .game-screen.layout-tall.players-4 .seat-top-right {
  right: 0.18rem;
}

body.game-active-mobile .game-screen.layout-wide.players-4 .seat-panel {
  width: min(8.85rem, 29vw);
}

body.game-active-mobile .game-screen.layout-wide.players-4 .seat-top {
  top: 0.25rem;
}

body.game-active-mobile:not(.game-started-mobile) .game-screen.layout-wide.players-4 .seat-top {
  top: 3.85rem;
}

body.game-active-mobile .game-screen.layout-wide.players-4 .seat-top-left,
body.game-active-mobile .game-screen.layout-wide.players-4 .seat-top-right {
  top: 0.95rem;
}

body.game-active-mobile:not(.game-started-mobile) .game-screen.layout-wide.players-4 .seat-top-left,
body.game-active-mobile:not(.game-started-mobile) .game-screen.layout-wide.players-4 .seat-top-right {
  top: 4.55rem;
}

body.game-active-mobile .game-screen.layout-wide.players-4 .seat-top-left {
  left: 0.45rem;
}

body.game-active-mobile .game-screen.layout-wide.players-4 .seat-top-right {
  right: 0.45rem;
}

body.game-active-mobile .game-screen.layout-wide.players-4 .seat-bottom {
  bottom: 0.26rem;
}

body.game-active-mobile .table-center {
  width: min(100%, 13.8rem);
  gap: 0.35rem;
  transform: translate(-50%, -50%);
}

body.game-active-mobile .turn-banner,
body.game-active-mobile .event-box {
  gap: 0.2rem;
  padding: 0.56rem 0.66rem;
  border-radius: 16px;
}

body.game-active-mobile .turn-banner strong {
  font-size: 1.08rem;
}

body.game-active-mobile .turn-banner .muted {
  font-size: 0.82rem;
  line-height: 1.2;
}

body.game-active-mobile .event-box span {
  font-size: 0.98rem;
}

body.game-active-mobile .table-resources {
  grid-template-columns: 4.1rem minmax(0, 3.1fr);
  gap: 0.32rem;
}

body.game-active-mobile .deck-orb,
body.game-active-mobile .pile-zone {
  border-radius: 16px;
  padding: 0.6rem;
}

body.game-active-mobile .deck-orb {
  min-height: 5.3rem;
}

body.game-active-mobile .pile-zone {
  min-width: 0;
}

body.game-active-mobile .deck-stack {
  width: 2.45rem;
  height: 3.18rem;
  margin-top: 0.9rem;
}

body.game-active-mobile .deck-back-card {
  width: 1.9rem;
  height: 2.58rem;
}

body.game-active-mobile .deck-count-badge {
  min-width: 1.38rem;
  font-size: 0.74rem;
}

body.game-active-mobile .resource-label {
  font-size: 0.62rem;
}

body.game-active-mobile .pile-preview {
  min-height: 2.7rem;
  margin-top: 0.3rem;
  width: 100%;
  padding-right: 0.2rem;
}

body.game-active-mobile .mini-card {
  width: 1.9rem;
  height: 2.8rem;
  margin-right: -0.62rem;
  border-radius: 12px;
  font-size: 0.68rem;
}

body.game-active-mobile .pile-caption {
  font-size: 0.74rem;
}

body.game-active-mobile .table-help-trigger {
  right: 0.55rem;
  bottom: 0.55rem;
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.05rem;
}

body.game-active-mobile .table-shoutout-trigger {
  left: 0.55rem;
  bottom: 0.55rem;
  height: 2.2rem;
  width: 2.2rem;
  min-width: 2.2rem;
  font-size: 1.05rem;
}

body.game-active-mobile .shoutout-trigger-fill {
  border-radius: inherit;
}

body.game-active-mobile .shoutout-joker-emoji {
  font-size: 1.05rem;
}

body.game-active-mobile .rules-menu-backdrop {
  background: rgba(11, 39, 31, 0.34);
}

body.game-active-mobile .rules-menu {
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.45rem;
  width: auto;
  max-height: min(24rem, calc(100% - 1rem));
  border-radius: 24px 24px 18px 18px;
  padding: 0.95rem 0.95rem calc(1rem + env(safe-area-inset-bottom));
}

body.game-active-mobile .shoutout-menu {
  left: 0;
  right: 0;
  bottom: 3.25rem;
  width: auto;
  max-height: min(24rem, calc(100% - 1rem));
  border-radius: 24px 24px 18px 18px;
  padding: 0.95rem 0.95rem calc(1rem + env(safe-area-inset-bottom));
}

body.game-active-mobile .shoutout-grid {
  gap: 0.45rem;
}

body.game-active-mobile .shoutout-chip {
  padding: 0.64rem 0.68rem;
  border-radius: 16px;
}

body.game-active-mobile .shoutout-chip-label {
  font-size: 0.78rem;
}

body.game-active-mobile .shoutout-chip-emoji {
  width: 1.72rem;
  height: 1.72rem;
  font-size: 0.95rem;
}

body.game-active-mobile .hand-dock {
  position: relative;
  bottom: auto;
  z-index: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  padding: 0.58rem 0.72rem calc(0.6rem + env(safe-area-inset-bottom)) 0.82rem;
  min-height: 0;
}

body.game-active-mobile .dock-header {
  gap: 0.4rem;
  align-items: flex-start;
  min-height: 1.72rem;
}

body.game-active-mobile .selection-pill {
  padding: 0.28rem 0.65rem;
  font-size: 0.76rem;
}

body.game-active-mobile .dock-prompt {
  font-size: 0.8rem;
  line-height: 1.2;
  margin-top: 0;
}

body.game-active-mobile .hand-fan {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: calc(0.18rem + var(--hand-card-lift) + var(--hand-card-selection-bleed)) 0.38rem 0.38rem;
  min-height: calc(var(--hand-card-height) + var(--hand-card-lift) + var(--hand-card-selection-bleed) + 0.4rem);
}

body.game-active-mobile .card {
  padding: 0.44rem 0.34rem;
  border-radius: 16px;
}

body.game-active-mobile .card-rank {
  font-size: 1rem;
}

body.game-active-mobile .card-suit {
  font-size: 1.35rem;
}

body.game-active-mobile .secondary-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

body.game-active-mobile .choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

body.game-active-mobile .joker-choice-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.game-active-mobile .joker-choice-row .button {
  min-width: 0;
  padding: 0.62rem 0.45rem;
}

body.game-active-mobile .button {
  padding: 0.76rem 0.9rem;
}

body.game-active-mobile .dock-header-action {
  min-height: 2.08rem;
  padding: 0.48rem 0.9rem;
  font-size: 0.78rem;
}

body.game-active-mobile:not(.game-started-mobile) #start-game {
  padding: 0.5rem 0.9rem;
  border-radius: 26px;
  font-size: 0.9rem;
  min-height: 3.25rem;
  max-height: 3.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
}

.turn-toast {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 6;
  width: min(72%, 14rem);
  display: grid;
  gap: 0.2rem;
  padding: 0.72rem 0.84rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(119, 148, 138, 0.78);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 30px rgba(8, 23, 19, 0.18);
  pointer-events: none;
  animation: turnToastIn 220ms cubic-bezier(0.2, 0.85, 0.32, 1);
}

.turn-toast strong {
  font-size: 0.9rem;
  color: #f7efe1;
}

.turn-toast span {
  font-size: 0.72rem;
  line-height: 1.25;
  color: rgba(247, 239, 225, 0.9);
}

.pile-zone {
  position: relative;
}

.pile-action {
  margin-top: 0.4rem;
  width: 100%;
  padding: 0.6rem 0.72rem;
  font-size: 0.76rem;
}

body.game-active-mobile .hand-layout-scroll .hand-fan {
  overflow-x: auto;
  scrollbar-width: none;
  scroll-padding-inline: 0.38rem;
}

body.game-active-mobile .hand-layout-fit .hand-fan {
  overflow-x: hidden;
}

body.game-active-mobile .hand-layout-scroll .hand-fan::-webkit-scrollbar {
  display: none;
}

body.game-active-mobile .hand-layout-scroll .card {
  scroll-snap-align: start;
}

body.game-active-mobile .hand-layout-scroll .hand-fan {
  scroll-snap-type: x proximity;
}

body.game-active-mobile .hand-layout-scroll .hand-fan.is-dragging {
  scroll-snap-type: none;
  cursor: grabbing;
}

@media (hover: none) and (pointer: coarse) {
  body.game-active-mobile .hand-layout-scroll .hand-fan {
    touch-action: pan-x;
    user-select: none;
    -webkit-user-select: none;
  }
}

@keyframes seatTurnArrival {
  0% {
    box-shadow:
      0 0 0 0 rgba(244, 216, 120, 0.38),
      0 10px 24px rgba(8, 23, 19, 0.12);
  }

  55% {
    box-shadow:
      0 0 0 8px rgba(244, 216, 120, 0.18),
      0 16px 32px rgba(8, 23, 19, 0.22);
  }

  100% {
    box-shadow:
      0 0 0 3px rgba(244, 216, 120, 0.2),
      0 12px 28px rgba(8, 23, 19, 0.16);
  }
}

@keyframes seatCurrentPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(244, 216, 120, 0.16),
      0 12px 28px rgba(8, 23, 19, 0.16);
  }

  50% {
    box-shadow:
      0 0 0 7px rgba(244, 216, 120, 0.24),
      0 16px 32px rgba(8, 23, 19, 0.2);
  }
}

@keyframes seatReceiveGlow {
  0%,
  100% {
    box-shadow: 0 12px 28px rgba(8, 23, 19, 0.16);
  }

  50% {
    box-shadow:
      0 0 0 6px rgba(247, 239, 225, 0.1),
      0 18px 34px rgba(8, 23, 19, 0.22);
  }
}

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

@keyframes turnToastIn {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes shoutoutFloat {
  0% {
    opacity: 0;
    transform: translate3d(calc(-50% + 0px), calc(-50% + 0px), 0) scale(0.76) rotate(-6deg);
  }

  16% {
    opacity: 1;
  }

  72% {
    opacity: 1;
    transform: translate3d(
      calc(-50% + var(--shoutout-dx-soft, 0px)),
      calc(-50% + var(--shoutout-dy-soft, 0px)),
      0
    ) scale(1.04) rotate(2deg);
  }

  100% {
    opacity: 0;
    transform: translate3d(
      calc(-50% + var(--shoutout-dx, 0px)),
      calc(-50% + var(--shoutout-dy, 0px)),
      0
    ) scale(0.98) rotate(6deg);
  }
}

@keyframes shoutoutRecover {
  from {
    height: 0;
  }

  to {
    height: 100%;
  }
}

@keyframes deckDealPulse {
  0%,
  100% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.04);
  }
}

@keyframes pileSettle {
  0% {
    transform: scale(0.92);
    opacity: 0.4;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pileTaking {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.86);
    opacity: 0.18;
  }
}

@keyframes pileBurn {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-0.4rem) scale(0.72);
    opacity: 0;
  }
}

@keyframes handTurnArrival {
  0% {
    opacity: 0.78;
    transform: translateY(0.18rem);
  }

  55% {
    opacity: 1;
    transform: translateY(-0.08rem);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes handFanSettle {
  0% {
    transform: scale(0.985);
    opacity: 0.88;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes motionTravel {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.84) rotate(var(--motion-rotate, 0deg));
  }

  14% {
    opacity: 0.95;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--motion-dx), var(--motion-dy), 0) scale(0.68) rotate(calc(var(--motion-rotate, 0deg) * -0.35));
  }
}

@keyframes motionMorphTravel {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(1, 1) rotate(var(--motion-rotate, 0deg));
  }

  12% {
    opacity: 1;
  }

  78% {
    opacity: 0.96;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--motion-dx), var(--motion-dy), 0)
      scale(var(--motion-scale-x), var(--motion-scale-y))
      rotate(calc(var(--motion-rotate, 0deg) * -0.32));
  }
}

@keyframes localPlayThrow {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(1, 1) rotate(var(--motion-rotate, 0deg));
  }

  12% {
    opacity: 1;
  }

  84% {
    opacity: 0.98;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--motion-dx), var(--motion-dy), 0)
      scale(var(--motion-scale-x), var(--motion-scale-y))
      rotate(calc(var(--motion-rotate, 0deg) * -0.22));
  }
}

@keyframes localPlaySettle {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(1, 1) rotate(var(--motion-rotate, 0deg));
  }

  22% {
    opacity: 0.98;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--motion-dx), var(--motion-dy), 0)
      scale(var(--motion-scale-x), var(--motion-scale-y))
      rotate(calc(var(--motion-rotate, 0deg) * -0.4));
  }
}

@keyframes localDrawSettle {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(1, 1) rotate(var(--motion-rotate, 0deg));
  }

  16% {
    opacity: 0.96;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--motion-dx), var(--motion-dy), 0)
      scale(var(--motion-scale-x), var(--motion-scale-y))
      rotate(calc(var(--motion-rotate, 0deg) * -0.3));
  }
}

@keyframes burnCardTravel {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.9) rotate(var(--motion-rotate, 0deg));
  }

  16% {
    opacity: 0.96;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--motion-dx), var(--motion-dy), 0) scale(0.54) rotate(calc(var(--motion-rotate, 0deg) + 12deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-card {
    animation: motionReduced 180ms ease forwards;
  }

  .motion-card.motion-burn {
    animation: motionReduced 180ms ease forwards;
  }

  .seat-panel.current-turn {
    animation: none;
  }

  .seat-panel.turn-arrival,
  .seat-panel.motion-deal-target,
  .seat-panel.motion-lock-target,
  .seat-panel.motion-take-target,
  .seat-panel.motion-reveal-target,
  .hand-dock.turn-arrival .dock-header-main,
  .hand-dock.motion-deal-target .hand-fan,
  .hand-dock.motion-lock-target .hand-fan,
  .hand-dock.motion-play-target .hand-fan,
  .hand-dock.motion-take-target .hand-fan,
  .deck-stack.dealing,
  .pile-preview.settling,
  .pile-preview.taking,
  .pile-preview.burning,
  .motion-shoutout,
  .turn-toast {
    animation-duration: 1ms;
  }
}

@keyframes motionReduced {
  from {
    opacity: 0;
  }

  to {
    opacity: 0;
  }
}

@media (min-width: 720px) {
  .page-shell {
    padding: 1.3rem 1.4rem calc(5rem + env(safe-area-inset-bottom));
  }

  body.game-active-mobile .page-shell {
    width: min(100%, 35rem);
    height: 100dvh;
    padding: calc(0.8rem + env(safe-area-inset-top)) 0.85rem calc(0.9rem + env(safe-area-inset-bottom));
  }

  body.game-active-mobile .app-root {
    max-width: 100%;
  }

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

  .landing-table-map,
  .landing-table-content {
    min-height: 34rem;
  }

  .landing-form-row {
    width: min(100%, 23.5rem);
    grid-template-columns: 1fr;
    align-items: stretch;
    min-height: 19rem;
  }

  body:not(.game-active-mobile) .table-map {
    min-height: 31rem;
  }

  body:not(.game-active-mobile) .seat-panel {
    width: 11.5rem;
  }

  body:not(.game-active-mobile) .seat-top-left {
    left: 1rem;
    top: 1.25rem;
  }

  body:not(.game-active-mobile) .seat-top-right {
    right: 1rem;
    top: 1.25rem;
  }

  body:not(.game-active-mobile) .seat-left {
    left: 1rem;
  }

  body:not(.game-active-mobile) .seat-right {
    right: 1rem;
  }

  body:not(.game-active-mobile) .table-center {
    width: 19rem;
  }

  body:not(.game-active-mobile) .hand-fan {
    justify-content: center;
  }

  body:not(.game-active-mobile) .hand-fan .card {
    margin-left: -0.95rem;
  }
}
