:root {
  color-scheme: dark;
  --bg: #050908;
  --wood: #3b2417;
  --wood-dark: #160d08;
  --felt: #174f34;
  --felt-dark: #082018;
  --felt-line: #c69642;
  --panel: #0f221a;
  --panel-strong: #1a3427;
  --card: #fff8ea;
  --card-ink: #1b1b17;
  --muted: #b9c8bd;
  --text: #f8f3e7;
  --gold: #e8bd62;
  --gold-bright: #ffe4a1;
  --gold-dim: #8a6029;
  --red: #b7362f;
  --blue: #276a8b;
  --shadow: 0 16px 34px rgba(0, 0, 0, 0.48);
  --gold-border: 1px solid rgba(232, 189, 98, 0.42);
  --felt-texture: url("./assets/felt-bg.png?v=20260526-04");
  --wood-panel-bot: url("./assets/wood-panel-bot.png?v=20260526-04");
  --wood-panel-player: url("./assets/wood-panel-player.png?v=20260526-04");
  --top-wood-panel: url("./assets/ui/top-wood-panel.png?v=20260526-04");
  --scopa-medal: url("./assets/ui/scopa-medal.png?v=20260526-04");
  --counter-badge: url("./assets/ui/counter-badge.png?v=20260526-04");
  --rules-card-art: url("./assets/ui/rules-card.png?v=20260526-04");
  --action-button: url("./assets/ui/action-button.png?v=20260526-04");
  --action-button-active: url("./assets/ui/action-button-active.png?v=20260526-04");
  --home-bg: url("./assets/ui/home-bg.png?v=20260526-04");
  --home-logo: url("./assets/ui/home-logo.png?v=20260526-04");
  --card-art-ratio: 894 / 1350;
  --scopa-logo: url("./assets/ui/scopa-logo.png?v=20260526-04");
  --card-radius: 0;
  --table-card-radius: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at center, transparent 46%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.34)),
    var(--felt-texture) center / cover no-repeat,
    radial-gradient(circle at 50% 0%, rgba(232, 189, 98, 0.18), transparent 30%),
    linear-gradient(90deg, rgba(70, 39, 20, 0.7), transparent 18%, transparent 82%, rgba(70, 39, 20, 0.7)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.86)),
    var(--bg);
  color: var(--text);
}

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(241, 189, 77, 0.18), transparent 34%),
    linear-gradient(180deg, #11120d, #050606);
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.scopa-celebration {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
}

.scopa-celebration[hidden] {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4;
  background:
    radial-gradient(circle at center, rgba(241, 189, 77, 0.1), transparent 42%),
    rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(2px);
}

.modal-backdrop[hidden] {
  display: none;
}

.scopa-badge {
  position: relative;
  z-index: 2;
  min-width: min(82vw, 320px);
  padding: 18px 22px;
  display: grid;
  gap: 5px;
  justify-items: center;
  border: 2px solid rgba(255, 233, 170, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent),
    linear-gradient(135deg, #8a5a25, #f1bd4d 45%, #7c4a24);
  color: #241706;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  animation: scopa-pop 2600ms ease both;
}

.scopa-badge span {
  font-size: 42px;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.28);
}

.scopa-badge strong {
  font-size: 14px;
  text-transform: uppercase;
}

.confetti-layer {
  position: absolute;
  inset: 0;
}

.confetti {
  position: absolute;
  top: -24px;
  width: 9px;
  height: 16px;
  border-radius: 2px;
  background: var(--gold);
  animation: confetti-fall var(--fall-duration, 1100ms) linear forwards;
}

@keyframes scopa-pop {
  0% {
    opacity: 0;
    transform: scale(0.72) rotate(-5deg);
  }

  18% {
    opacity: 1;
    transform: scale(1.08) rotate(2deg);
  }

  70% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }

  86% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: scale(0.96) translateY(-12px);
  }
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--fall-x, 0), 110vh, 0) rotate(var(--fall-rotate, 540deg));
  }
}

.loading-card {
  width: min(100%, 320px);
  padding: 24px 22px;
  display: grid;
  justify-items: center;
  gap: 12px;
  border: 1px solid rgba(241, 189, 77, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    rgba(23, 36, 31, 0.96);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.loading-card h2 {
  color: var(--gold);
  font-size: 34px;
  line-height: 1;
}

.loading-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.loading-deck {
  position: relative;
  width: 86px;
  height: 68px;
}

.loading-deck span {
  position: absolute;
  left: 24px;
  top: 4px;
  width: 42px;
  height: 58px;
  border: 2px solid #d4c6a2;
  border-radius: 6px;
  background:
    url("./assets/cards/back.png?v=20260526-04") center / cover,
    repeating-linear-gradient(45deg, #7b2f29 0 6px, #5f211d 6px 12px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.35);
  animation: shuffle-card 1.1s ease-in-out infinite;
}

.loading-deck span:nth-child(1) {
  animation-delay: 0ms;
}

.loading-deck span:nth-child(2) {
  animation-delay: 140ms;
}

.loading-deck span:nth-child(3) {
  animation-delay: 280ms;
}

.loading-bar {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.loading-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8a5a25, var(--gold), #fff2bd);
  animation: loading-run 1.15s ease-in-out infinite;
}

@keyframes shuffle-card {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  45% {
    transform: translateX(-22px) rotate(-8deg);
  }

  70% {
    transform: translateX(20px) rotate(8deg);
  }
}

@keyframes loading-run {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(260%);
  }
}

.home-screen {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 18px;
  width: min(100%, 620px);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 22px max(18px, env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, transparent 44%, rgba(0, 0, 0, 0.74) 100%),
    linear-gradient(180deg, rgba(5, 12, 9, 0.1), rgba(4, 9, 8, 0.72)),
    var(--felt-texture) center / cover no-repeat,
    var(--felt-dark);
  color: var(--text);
  --hero-drift-x: 0px;
  --hero-drift-y: 0px;
  transition: opacity 240ms ease, visibility 240ms ease, transform 240ms ease;
}

.home-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
}

.home-screen::before,
.home-screen::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.home-screen::before {
  inset: 12px;
  border: 1px solid rgba(232, 189, 98, 0.34);
  border-radius: 24px;
  box-shadow: inset 0 0 0 8px rgba(59, 36, 23, 0.66), inset 0 0 42px rgba(0, 0, 0, 0.84);
}

.home-screen::after {
  left: 10%;
  right: 10%;
  bottom: 24%;
  height: 28%;
  background: radial-gradient(ellipse at center, rgba(232, 189, 98, 0.16), transparent 68%);
}

.home-profile,
.home-wallet,
.home-hero,
.home-menu,
.home-tabs {
  position: relative;
  z-index: 1;
}

.home-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 32%, #f4d6a0 0 18%, transparent 19%),
    radial-gradient(circle at 50% 58%, #2a1a12 0 24%, transparent 25%),
    linear-gradient(180deg, #31523d, #0d1f18);
  color: #ffe8ad;
  font-size: 12px;
  font-weight: 1000;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.44);
}

.home-profile strong,
.home-profile span {
  display: block;
}

.home-profile strong {
  color: #fff4ce;
  font-size: 17px;
}

.home-profile span {
  color: #d9bd81;
  font-size: 12px;
  font-weight: 800;
}

.home-wallet {
  position: absolute;
  top: max(28px, env(safe-area-inset-top));
  right: 24px;
  display: grid;
  gap: 8px;
}

.home-quick-link {
  min-width: 104px;
  height: 38px;
  padding: 0 12px 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: var(--gold-border);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(232, 189, 98, 0.2), rgba(9, 28, 21, 0.92));
  color: #ffe7a6;
  font: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.home-quick-link span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffffff;
  font-size: 10px;
  font-weight: 1000;
  line-height: 1;
}

.home-quick-link strong {
  font-size: 12px;
  font-weight: 1000;
}

.home-quick-channel span {
  background: linear-gradient(180deg, #42b7ff, #1688d3);
}

.home-quick-sound span {
  background: linear-gradient(180deg, #a9ffbd, #13a96a);
  color: #062014;
  font-size: 15px;
}

.home-hero {
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 56px 0 24px;
  text-align: center;
}

.home-crest {
  width: 74px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--gold-bright);
  font-size: 42px;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.64);
}

.home-hero h1 {
  color: #ffe4a1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(56px, 14vw, 88px);
  font-weight: 800;
  line-height: 0.88;
  text-shadow: 0 4px 0 #5b3517, 0 14px 32px rgba(0, 0, 0, 0.72);
}

.home-hero p {
  margin: 0;
  color: #f5d695;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-cards {
  position: relative;
  width: min(86vw, 390px);
  height: 214px;
  margin-top: 42px;
}

.hero-cards img {
  position: absolute;
  bottom: 0;
  width: 102px;
  aspect-ratio: var(--card-art-ratio);
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.48));
  transform: translate(
      calc(var(--hero-x, 0px) + (var(--hero-drift-x) * var(--hero-depth, 1))),
      calc(var(--hero-y, 0px) + (var(--hero-drift-y) * var(--hero-depth, 1)))
    )
    rotate(var(--hero-rotate, 0deg));
  transition: transform 160ms ease-out;
}

.hero-cards img:first-child {
  left: 112px;
  width: 116px;
  z-index: 1;
  --hero-y: 24px;
  --hero-rotate: -6deg;
  --hero-depth: -0.28;
}

.hero-cards img:nth-child(2) {
  left: 24px;
  bottom: 20px;
  z-index: 2;
  --hero-y: 34px;
  --hero-rotate: -26deg;
  --hero-depth: 0.52;
}

.hero-cards img:nth-child(3) {
  left: 138px;
  z-index: 4;
  --hero-y: 42px;
  --hero-rotate: 2deg;
  --hero-depth: 0.82;
}

.hero-cards img:nth-child(4) {
  right: 86px;
  bottom: 20px;
  z-index: 3;
  --hero-y: 34px;
  --hero-rotate: 14deg;
  --hero-depth: 0.45;
}

.hero-cards img:nth-child(5) {
  right: 16px;
  bottom: 10px;
  z-index: 2;
  --hero-y: 42px;
  --hero-rotate: 28deg;
  --hero-depth: 1;
}

.home-menu {
  display: grid;
  gap: 12px;
}

.home-button {
  min-height: 62px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: var(--gold-border);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    linear-gradient(180deg, #163b28, #081a14);
  color: #ffe7ac;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.home-button-primary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent),
    linear-gradient(180deg, #f4d58b, #b87427 52%, #6d3f18);
  color: #271506;
}

.home-button strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1;
  text-transform: uppercase;
}

.home-button span {
  font-size: 12px;
  font-weight: 800;
  opacity: 0.9;
}

.home-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.home-tabs a,
.home-tabs button {
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(5, 13, 10, 0.64);
  color: #dfc38a;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.home-screen {
  padding: max(72px, env(safe-area-inset-top)) 22px max(20px, env(safe-area-inset-bottom));
  justify-content: start;
  gap: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), transparent 42%, rgba(0, 0, 0, 0.26)),
    var(--home-bg) center top / cover no-repeat,
    #020504;
  overflow: hidden;
}

.home-screen::before {
  content: none;
}

.home-screen::after {
  content: none;
}

.home-profile,
.home-wallet,
.home-hero,
.home-menu,
.home-tabs {
  display: none;
}

.home-logo,
.home-start-menu,
.home-dock,
.home-fundraiser {
  z-index: 1;
}

.home-fundraiser {
  position: absolute;
  left: 50%;
  top: max(14px, env(safe-area-inset-top));
  z-index: 5;
  width: min(70vw, 220px);
  min-height: 48px;
  padding: 8px 12px 9px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 12px;
  align-items: center;
  border: 1px solid rgba(255, 229, 161, 0.46);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 214, 108, 0.18), rgba(0, 0, 0, 0.18)),
    rgba(5, 22, 16, 0.72);
  color: #fff4ce;
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(0, 0, 0, 0.34);
  transform: translateX(-50%);
  backdrop-filter: blur(2px);
  transition: transform 160ms ease, filter 160ms ease;
}

.home-fundraiser:hover {
  filter: brightness(1.08);
}

.home-fundraiser:active {
  transform: translateX(-50%) scale(0.98);
}

.home-fundraiser span {
  color: #f6dfae;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.home-fundraiser strong {
  color: #fff;
  font-size: 14px;
  font-weight: 1000;
  line-height: 1;
  text-align: right;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.58);
}

.home-fundraiser i {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.home-fundraiser b {
  width: 12.0875%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #18a963, #ffd66c);
  box-shadow: 0 0 12px rgba(255, 214, 108, 0.45);
}

.home-logo {
  position: absolute;
  left: 50%;
  top: max(78px, calc(env(safe-area-inset-top) + 64px));
  width: min(96vw, 500px);
  height: auto;
  object-fit: contain;
  object-position: center;
  transform: translateX(-50%);
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.62));
}

.home-start-menu {
  position: absolute;
  left: 50%;
  bottom: max(128px, calc(env(safe-area-inset-bottom) + 128px));
  width: min(92vw, 430px);
  display: grid;
  justify-items: center;
  gap: 12px;
  transform: translate(-50%, -28px);
}

.home-start-menu::before {
  content: none;
}

.home-play-button,
.home-mini-button {
  border: 0;
  color: #fff8e9;
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.72);
  background: var(--action-button-active) center / contain no-repeat;
  box-shadow: none;
}

.home-play-button {
  width: min(70vw, 318px);
  height: 98px;
  display: grid;
  place-items: center;
  padding: 0 38px 6px;
  font-size: clamp(30px, 7.2vw, 46px);
  font-weight: 500;
}

.home-secondary-actions {
  width: min(76vw, 342px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-mini-button {
  min-width: 0;
  height: 44px;
  padding: 0 13px 3px;
  color: #f4dca0;
  font-size: clamp(13px, 3vw, 16px);
  font-weight: 500;
  white-space: nowrap;
}

.home-online-stats {
  min-height: 30px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(245, 207, 105, 0.45);
  border-radius: 999px;
  background: rgba(14, 42, 31, 0.72);
  color: #f8e7ae;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.home-online-stats strong {
  color: #fff8d8;
}

.home-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #56d977;
  box-shadow: 0 0 10px rgba(86, 217, 119, 0.75);
}

.home-online-stats.offline .home-online-dot {
  background: #d64f4f;
  box-shadow: 0 0 10px rgba(214, 79, 79, 0.65);
}

.home-dock {
  position: absolute;
  left: 50%;
  bottom: max(34px, calc(env(safe-area-inset-bottom) + 34px));
  width: min(84vw, 380px);
  min-height: 106px;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  justify-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 229, 161, 0.34);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(6, 30, 22, 0.16), rgba(4, 14, 10, 0.42));
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.22),
    inset 0 12px 24px rgba(255, 232, 163, 0.04),
    0 14px 28px rgba(0, 0, 0, 0.22);
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.34));
  transform: translateX(-50%);
}

.home-dock-button {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: var(--gold-border);
  border-radius: 50%;
  background: linear-gradient(180deg, #31513a, #0b2118);
  color: #dfc38a;
  text-decoration: none;
  font: inherit;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.38);
}

.home-dock-button span {
  text-decoration: none;
}

.home-dock-channel {
  background: linear-gradient(180deg, #42b7ff, #1688d3);
  color: #fff;
  font-size: 19px;
}

.home-dock-channel strong {
  position: absolute;
  right: -5px;
  bottom: -7px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #211607;
  font-size: 9px;
  font-weight: 1000;
  line-height: 1;
}

.home-dock-sound {
  background: linear-gradient(180deg, #ffe173, #c69b32);
  color: #211607;
}

.home-dock-sound span {
  transform: translateY(-2px);
}

.home-dock-sound.muted {
  background: linear-gradient(180deg, #31513a, #0b2118);
  color: #dfc38a;
}

.home-dock-sound.muted::after {
  content: "";
  position: absolute;
  width: 35px;
  height: 3px;
  border-radius: 999px;
  background: #d94e4e;
  transform: rotate(-38deg);
}

.home-dock-developers span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid currentColor;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-style: italic;
}

.app-shell {
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 18%),
    radial-gradient(circle at center, rgba(24, 89, 56, 0.34), transparent 58%),
    #07110e;
  box-shadow: 0 0 0 1px rgba(232, 189, 98, 0.18), 0 0 60px rgba(0, 0, 0, 0.52);
}

.app-shell.shake {
  animation: app-shake 900ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes app-shake {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translate3d(-5px, 2px, 0) rotate(-0.6deg);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translate3d(5px, -2px, 0) rotate(0.6deg);
  }
}

.topbar,
.opponent,
.zone-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  position: relative;
  min-height: 156px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.top-actions {
  position: absolute;
  left: 50%;
  top: -26px;
  z-index: 3;
  min-width: 330px;
  min-height: 92px;
  padding: 24px 34px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.18)),
    var(--top-wood-panel) center / 100% 100% no-repeat;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.45));
  transform: translateX(-50%);
}

.top-rules-card,
.top-deck {
  position: absolute;
  z-index: 2;
  border: 0;
  background: transparent;
  padding: 0;
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.42));
}

.top-rules-card {
  left: 16px;
  top: 40px;
  width: 134px;
  transform: rotate(-11deg);
  cursor: pointer;
}

.top-rules-card img {
  width: 100%;
  display: block;
}

.top-deck {
  right: 16px;
  top: 40px;
  width: 134px;
  height: 88px;
  overflow: visible;
  transform: rotate(11deg);
}

.top-deck img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 134px;
  display: block;
  object-fit: contain;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center;
}

.top-deck strong {
  position: absolute;
  right: -8px;
  bottom: -7px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--counter-badge) center / contain no-repeat;
  color: #fff7d1;
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.72);
  transform: rotate(-11deg);
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  line-height: 1;
  text-shadow: 0 2px 0 #5c3718, 0 8px 18px rgba(0, 0, 0, 0.52);
}

h2 {
  font-size: 20px;
}

.icon-button,
.text-button,
.primary-button,
.rules-button,
.donate-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  touch-action: manipulation;
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: var(--gold-border);
  border-radius: 50%;
  background: linear-gradient(180deg, #31513a, #0b2118);
  color: var(--gold);
  font-size: 21px;
  line-height: 1;
  box-shadow: var(--shadow);
  text-decoration: none;
}

#closeRulesButton,
#closeSettingsButton,
#closeDevelopersButton,
#closeSupportFeatureButton {
  padding-bottom: 3px;
  font-size: 24px;
}

.icon-button.active {
  background: linear-gradient(180deg, #ffd66c, var(--gold));
  color: #211607;
}

.icon-button.muted {
  position: relative;
  color: #b7c2bd;
}

.icon-button.muted::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: #ff6b6b;
  transform: rotate(-38deg);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.channel-button {
  position: relative;
  border-color: rgba(75, 174, 255, 0.65);
  background: linear-gradient(180deg, #42b7ff, #1688d3);
  color: #ffffff;
  font-size: 12px;
  font-weight: 1000;
}

.channel-button span {
  position: relative;
  z-index: 1;
  letter-spacing: 0;
}

.channel-button::after {
  content: "канал";
  position: absolute;
  right: -4px;
  bottom: -7px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #211607;
  font-size: 9px;
  font-weight: 1000;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.32);
}

.scoreboard {
  display: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  justify-items: center;
  padding: 0 6px;
}

.score,
.table-zone,
.hand-zone,
.round-panel,
.status {
  border: 1px solid rgba(241, 189, 77, 0.18);
  border-radius: 8px;
  background: rgba(23, 36, 31, 0.94);
}

.score {
  width: min(100%, 180px);
  min-height: 48px;
  padding: 8px 10px;
  border-color: rgba(232, 189, 98, 0.36);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    linear-gradient(180deg, rgba(28, 76, 47, 0.96), rgba(8, 28, 20, 0.96));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), var(--shadow);
}

.score-player,
.score-bot {
  display: none;
}

.score-deck {
  text-align: center;
}

.score span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.score strong {
  display: block;
  margin-top: 3px;
  color: #ffe6a3;
  font-size: 23px;
  line-height: 1;
}

.opponent {
  position: relative;
  display: block;
  height: 112px;
  min-height: 112px;
  padding: 0 96px;
  border: 0;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.22)),
    var(--wood-panel-bot) center / 100% 100% no-repeat;
  box-shadow: var(--shadow);
}

.opponent,
.hand-zone {
  align-items: center;
}

.opponent > div:not(.scopa-counter) {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: max-content;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
}

.opponent .section-label,
.hand-zone > .zone-title > .section-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.game-avatar {
  position: absolute;
  z-index: 2;
  width: 78px;
  height: 78px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45));
  border-radius: 50%;
  transition: filter 180ms ease, transform 180ms ease;
}

.bot-avatar-ui {
  left: 18px;
  top: 17px;
}
.game-avatar.account-avatar { object-fit: cover; }

.avatar-counter {
  position: absolute;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--counter-badge) center / contain no-repeat;
  color: #fff9d8;
  font-size: 18px;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.68);
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.bot-avatar-counter {
  left: 68px;
  top: 15px;
}

.opponent-online-badge {
  position: absolute;
  left: 76px;
  top: 76px;
  z-index: 4;
  width: 18px;
  height: 18px;
  border: 3px solid #fff2bd;
  border-radius: 50%;
  background: #d64f4f;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.opponent-online-badge.online {
  background: #4fd46f;
}

.opponent-online-badge.offline {
  background: #d64f4f;
}

.opponent .bot-counter {
  position: absolute;
  right: 20px;
  left: auto;
  top: 50%;
  z-index: 2;
  margin: 0;
  transform: translateY(-50%);
}

.card-backs {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.scopa-counter {
  position: relative;
  min-width: 72px;
  width: 72px;
  height: 72px;
  padding: 0;
  display: grid;
  justify-items: center;
  align-items: end;
  border: 0;
  border-radius: 50%;
  background: var(--scopa-medal) center / contain no-repeat;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.42));
}

.scopa-counter::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 0;
  width: 30px;
  height: 30px;
  background: var(--counter-badge) center / contain no-repeat;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.scopa-counter span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.scopa-counter strong {
  position: absolute;
  right: -1px;
  top: 0;
  z-index: 1;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff7d1;
  font-size: 16px;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.62), 0 0 8px rgba(255, 233, 150, 0.5);
}

.player-counter {
  position: absolute;
  right: 18px;
  top: -38px;
  z-index: 4;
  margin: 0;
}

.card-back {
  width: 44px;
  height: 64px;
  border-radius: 10px;
  border: 2px solid #c9a456;
  background:
    url("./assets/cards/back.png?v=20260526-04") center / contain no-repeat,
    radial-gradient(circle at center, rgba(241, 189, 77, 0.36) 0 16%, transparent 17%),
    repeating-linear-gradient(45deg, #7b2f29 0 6px, #5f211d 6px 12px);
  box-shadow: var(--shadow);
}

.table-zone,
.hand-zone,
.round-panel {
  padding: 11px;
}

.table-zone {
  position: relative;
  height: clamp(318px, 44vh, 420px);
  min-height: 318px;
  overflow: visible;
  border: 2px solid rgba(232, 189, 98, 0.5);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at center, transparent 44%, rgba(0, 0, 0, 0.56) 100%),
    linear-gradient(180deg, rgba(255, 228, 161, 0.06), rgba(0, 0, 0, 0.12)),
    var(--felt-texture) center / cover no-repeat,
    var(--felt);
  box-shadow: inset 0 0 0 8px rgba(41, 24, 14, 0.74), inset 0 0 48px rgba(0, 0, 0, 0.55), var(--shadow);
}

.table-zone::before {
  content: "";
  position: absolute;
  inset: 72px 42px 54px;
  pointer-events: none;
  border: 1px solid rgba(232, 189, 98, 0.24);
  border-radius: 14px;
  background: radial-gradient(circle at center, rgba(232, 189, 98, 0.05), transparent 62%);
}

.multiplayer-waiting-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: min(260px, calc(100% - 44px));
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px 16px;
  border: 2px solid rgba(255, 226, 150, 0.55);
  border-radius: 16px;
  background: rgba(20, 48, 37, 0.9);
  color: #fff7d1;
  text-align: center;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%);
}

.multiplayer-waiting-overlay[hidden] {
  display: none;
}

.multiplayer-waiting-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 241, 191, 0.25);
  border-top-color: #f5cf69;
  border-radius: 50%;
  animation: multiplayer-spin 0.9s linear infinite;
}

.multiplayer-waiting-overlay strong {
  font-size: 20px;
  font-weight: 1000;
}

.multiplayer-waiting-overlay p,
.multiplayer-waiting-time {
  margin: 0;
  color: #f8e7ae;
  font-size: 14px;
  font-weight: 800;
}

.multiplayer-waiting-friend {
  margin-top: 2px;
  color: #fff1b8;
}

@keyframes multiplayer-spin {
  to {
    transform: rotate(360deg);
  }
}

.table-cards,
.hand-cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  align-items: start;
  gap: 8px;
  margin-top: 10px;
}

.table-cards {
  height: calc(100% - 34px);
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  overflow: visible;
}

.table-cards .card {
  width: clamp(58px, 17%, 82px);
  min-height: 0;
  flex: 0 0 auto;
}

.table-cards .card.card-image-button {
  min-height: 0;
  border-radius: var(--table-card-radius);
}

.table-cards .card-image {
  border-radius: var(--table-card-radius);
}

.table-cards .pip {
  width: 15px;
  height: 15px;
  font-size: 15px;
}

.table-cards .court-body {
  width: 32px;
  height: 38px;
}

.hand-cards {
  min-height: 148px;
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 0;
  padding: 8px 4px 0;
  margin-top: 0;
  flex: 1 1 auto;
  transform: translateY(-14px);
}

.hand-zone {
  position: relative;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.22)),
    var(--wood-panel-player) center / 100% 100% no-repeat;
  border: 0;
  border-radius: 22px;
  overflow: visible;
  height: 326px;
  min-height: 326px;
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.hand-zone > .zone-title {
  width: 100%;
  min-height: 72px;
}

.hand-zone .text-button {
  position: absolute;
  left: 50%;
  top: -30px;
  z-index: 5;
  width: min(38vw, 172px);
  min-width: 138px;
  height: 56px;
  min-height: 56px;
  padding: 0 22px;
  transform: translateX(-50%);
}

.player-avatar-ui {
  left: 18px;
  top: -38px;
  z-index: 4;
}

.player-avatar-counter {
  left: 68px;
  top: -40px;
  z-index: 5;
}

body.turn-player .player-avatar-ui,
body.turn-opponent .bot-avatar-ui {
  transform: scale(1.08);
  filter:
    drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 12px rgba(255, 214, 91, 0.96))
    drop-shadow(0 0 26px rgba(255, 178, 46, 0.72));
}

body.turn-player .player-avatar-counter,
body.turn-opponent .bot-avatar-counter {
  filter: drop-shadow(0 0 10px rgba(255, 214, 91, 0.95));
}

.card {
  position: relative;
  aspect-ratio: var(--card-art-ratio);
  min-height: 118px;
  border: 2px solid #1a1a16;
  border-radius: var(--card-radius);
  padding: 5px;
  display: grid;
  grid-template-rows: 16px 1fr 16px;
  background:
    linear-gradient(180deg, #fffdf6, #f8efd9);
  color: var(--card-ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  --card-lift: 0px;
  --card-tilt: 0deg;
  transform: translateY(var(--card-lift)) rotate(var(--card-tilt));
  transition: transform 130ms ease, box-shadow 130ms ease, outline-color 130ms ease;
}

.card.card-image-button {
  aspect-ratio: var(--card-art-ratio);
  min-height: 0;
  padding: 0;
  border: 0;
  display: block;
  grid-template-rows: none;
  background: transparent;
  overflow: visible;
}

.card-image {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  box-shadow: none;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.42));
}

.card::after {
  content: "";
  position: absolute;
  inset: 5px;
  pointer-events: none;
  border: 1px solid rgba(26, 26, 22, 0.28);
}

.card.card-image-button::after {
  content: none;
}

.card:disabled {
  cursor: default;
  opacity: 0.86;
}

.card.selected {
  --card-lift: -14px;
  outline: 0;
  box-shadow: none;
}

.card.selected .card-image {
  filter:
    drop-shadow(0 12px 14px rgba(0, 0, 0, 0.44))
    drop-shadow(0 0 3px rgba(255, 235, 160, 0.98))
    drop-shadow(0 0 9px rgba(232, 189, 98, 0.95))
    drop-shadow(0 0 16px rgba(232, 189, 98, 0.42));
}

.hand-cards .card {
  width: min(31vw, 108px);
  flex: 0 0 auto;
  margin-left: -20px;
  transform-origin: 50% 110%;
}

.hand-cards .card:first-child {
  margin-left: 0;
}

.hand-cards .card:nth-child(1) {
  --card-tilt: -12deg;
}

.hand-cards .card:nth-child(2) {
  --card-tilt: 0deg;
}

.hand-cards .card:nth-child(3) {
  --card-tilt: 12deg;
}

.hand-cards .card:nth-child(4) {
  --card-tilt: 18deg;
}

.card.capture-choice {
  outline: 2px solid rgba(240, 191, 76, 0.7);
}

.card-corner {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: currentColor;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.card-corner-top {
  justify-self: start;
}

.card-corner-bottom {
  align-self: end;
  justify-self: end;
  transform: rotate(180deg);
}

.pip-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, 1fr);
  align-items: center;
  justify-items: center;
  min-height: 0;
  padding: 1px 7px;
}

.pip {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.denari .pip {
  border: 2px solid #7e4d13;
  background: radial-gradient(circle, #f7d66d 0 44%, #b87518 45% 74%, #6a3d12 75%);
  color: transparent;
}

.coppe .pip {
  color: #8b2926;
  font-size: 19px;
}

.spade .pip {
  color: #333b40;
  font-size: 19px;
}

.bastoni .pip {
  color: #7a3423;
  font-size: 19px;
}

.top-left {
  grid-area: 1 / 1;
}

.top-center {
  grid-area: 1 / 2;
}

.top-right {
  grid-area: 1 / 3;
}

.middle-left {
  grid-area: 3 / 1;
}

.center {
  grid-area: 3 / 2;
}

.middle-right {
  grid-area: 3 / 3;
}

.bottom-left {
  grid-area: 5 / 1;
}

.bottom-center {
  grid-area: 5 / 2;
}

.bottom-right {
  grid-area: 5 / 3;
}

.bottom-left,
.bottom-center,
.bottom-right {
  transform: rotate(180deg);
}

.court-art {
  position: relative;
  z-index: 1;
  min-height: 0;
  display: grid;
  justify-items: center;
  align-items: center;
  padding: 2px 4px;
  border: 1px solid rgba(26, 26, 22, 0.24);
  background:
    linear-gradient(90deg, transparent 47%, rgba(26, 26, 22, 0.16) 47% 53%, transparent 53%),
    linear-gradient(180deg, rgba(241, 189, 77, 0.2), rgba(39, 106, 139, 0.12));
}

.court-crest {
  position: absolute;
  top: 4px;
  right: 5px;
  color: rgba(26, 26, 22, 0.55);
  font-size: 11px;
  font-weight: 900;
}

.court-head {
  width: 21px;
  height: 21px;
  margin-top: 5px;
  border: 2px solid #5b351d;
  border-radius: 50%;
  background: #e1b989;
}

.court-body {
  width: 38px;
  height: 45px;
  margin-top: -2px;
  border: 2px solid currentColor;
  border-radius: 14px 14px 5px 5px;
  background:
    linear-gradient(90deg, transparent 45%, rgba(255, 255, 255, 0.45) 45% 55%, transparent 55%),
    currentColor;
}

.court-prop {
  position: absolute;
  left: 8px;
  top: 28px;
  font-size: 22px;
  font-weight: 900;
}

.court-title {
  align-self: end;
  max-width: 100%;
  overflow: hidden;
  color: #342718;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.denari,
.coppe {
  color: var(--red);
}

.spade,
.bastoni {
  color: var(--blue);
}

.text-button,
.primary-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(194, 255, 207, 0.34);
  border-radius: 999px;
  background: linear-gradient(110deg, #50e28c, #18a963, #b4f7cb, #18a963);
  background-size: 240% 100%;
  color: #05150d;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24), 0 0 0 rgba(54, 210, 127, 0);
  animation: primary-button-glow 1.8s ease-in-out infinite;
}

@keyframes primary-button-glow {
  0%,
  100% {
    background-position: 0% 50%;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24), 0 0 0 rgba(54, 210, 127, 0);
    transform: translateY(0);
  }

  50% {
    background-position: 100% 50%;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28), 0 0 20px rgba(54, 210, 127, 0.48);
    transform: translateY(-1px);
  }
}

.rules-button {
  min-height: 46px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: var(--gold-border);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    linear-gradient(180deg, #173e2b, #081b14);
  color: #ffe7ac;
  font-size: 15px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.rules-button span {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(105, 180, 220, 0.22);
  color: #bdeaff;
  font-weight: 900;
}

.rules-button strong {
  font-weight: 900;
}

.donate-button {
  min-height: 48px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: var(--gold-border);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent),
    linear-gradient(135deg, #865928, #f1bd4d 48%, #7c4a24);
  color: #211607;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34);
}

.donate-button span {
  text-decoration: none;
}

.donate-button:active {
  transform: translateY(1px);
}

.donate-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(33, 22, 7, 0.18);
  color: #fff5d6;
  font-size: 14px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.rules-panel {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: end center;
  padding: 14px;
  background: rgba(0, 0, 0, 0.58);
}

.rules-panel[hidden] {
  display: none;
}

.settings-panel {
  position: fixed;
  inset: 0;
  z-index: 16;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(0, 0, 0, 0.58);
}

.settings-panel[hidden] {
  display: none;
}

.settings-sheet {
  width: min(100%, 480px);
  overflow: hidden;
  border: 1px solid rgba(241, 189, 77, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(241, 189, 77, 0.08), transparent),
    #10231f;
  color: var(--text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.56);
}

.settings-content {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.developers-content {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.developers-content p,
.developers-content div,
.developers-content .feature-list {
  margin: 0;
  padding: 12px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #f3fbf7;
  line-height: 1.35;
}

.developers-content .feature-list {
  padding-left: 28px;
}

.developers-content .feature-list li {
  padding-left: 2px;
}

.developers-content strong {
  color: var(--gold);
}

.developers-content a {
  width: fit-content;
  color: #fff0b7;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(241, 189, 77, 0.45);
}

.developers-content .support-link {
  width: min(100%, 270px);
  min-height: 44px;
  margin: 2px auto 0;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 233, 165, 0.72);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffe48a, #d5a43a 58%, #9b6621);
  color: #231705;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 246, 211, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

.developers-content .support-link:active {
  transform: translateY(1px);
}

.volume-control {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.volume-control span {
  color: #f3fbf7;
  font-size: 14px;
  font-weight: 900;
}

.volume-control strong {
  color: var(--gold);
  font-size: 14px;
}

.volume-control input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--gold);
}

.toggle-control {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.toggle-control span {
  display: grid;
  gap: 3px;
}

.toggle-control strong {
  color: #f3fbf7;
  font-size: 14px;
}

.toggle-control small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.toggle-control input {
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  accent-color: var(--gold);
}

.rules-sheet {
  width: min(100%, 560px);
  max-height: min(86vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(241, 189, 77, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(241, 189, 77, 0.08), transparent),
    #10231f;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.56);
  color: var(--text);
}

.rules-header {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(241, 189, 77, 0.16);
}

.rules-content {
  padding: 12px;
  display: grid;
  gap: 10px;
  overflow-y: auto;
}

.rules-block {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.rules-block h3 {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 16px;
}

.rules-block p,
.rules-block ul {
  margin: 0;
  color: #e8f6f1;
  font-size: 14px;
  line-height: 1.38;
}

.rules-block ul {
  padding-left: 18px;
}

.rules-card-row,
.rules-example {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.rules-card-row img,
.rules-example img {
  width: 54px;
  aspect-ratio: var(--card-art-ratio);
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.32));
}

.rules-example span {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
}

.text-button:disabled {
  background: #60756f;
  color: #c9d6d2;
  cursor: default;
}

.hand-zone .text-button {
  border: 0;
  border-radius: 0;
  background: var(--action-button-active) center / contain no-repeat;
  color: #f8fbf5;
  font-size: clamp(14px, 3.2vw, 18px);
  font-weight: 700;
  line-height: 1;
  text-transform: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.78), 0 0 10px rgba(255, 248, 196, 0.34);
  box-shadow: none;
  animation: none;
}

.hand-zone .text-button:disabled {
  background: var(--action-button) center / contain no-repeat;
  color: rgba(255, 255, 255, 0.58);
  opacity: 1;
  cursor: default;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
}

.status {
  min-height: 48px;
  margin: 6px 0 0;
  padding: 7px 12px 15px;
  border: var(--gold-border);
  border-radius: 14px;
  background: transparent;
  color: #e8f6f1;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: inset 0 0 0 1px rgba(255, 230, 163, 0.08);
}

.status.warn {
  border-color: rgba(240, 191, 76, 0.35);
  color: #fff1c9;
}

.status.win {
  border-color: rgba(89, 221, 146, 0.45);
  color: #dfffe9;
}

.round-panel {
  position: fixed;
  left: 50%;
  top: max(74px, calc(env(safe-area-inset-top) + 56px));
  bottom: auto;
  z-index: 5;
  width: min(calc(100% - 28px), 532px);
  transform: translateX(-50%);
  max-height: calc(100vh - 96px - env(safe-area-inset-bottom));
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(241, 189, 77, 0.08), transparent),
    #10231f;
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.round-panel.match-result {
  top: 50%;
  bottom: auto;
  max-height: min(88vh, 760px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  border-color: rgba(241, 189, 77, 0.42);
}

.round-panel.match-result h2 {
  color: var(--gold);
  font-size: 30px;
  text-align: center;
}

.round-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px 58px;
  gap: 8px 8px;
  margin: 14px 0;
  align-items: center;
  color: #f3fbf7;
  font-size: 14px;
}

.round-grid > span {
  color: #f3fbf7;
}

.round-head-spacer {
  min-width: 0;
}

.round-player-head,
.round-bot-head,
.round-score-value {
  color: #f6e6ad;
  font-weight: 800;
  text-align: center;
  justify-self: stretch;
}

.round-player-value,
.round-bot-value {
  font-variant-numeric: tabular-nums;
}

.round-grid strong {
  color: var(--gold);
  text-align: center;
}

.round-total-label,
.round-total-value {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(241, 189, 77, 0.28);
  color: var(--gold);
  font-size: 16px;
  font-weight: 1000;
}

.score-note {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #d9e7df;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.34;
}

.match-summary {
  grid-column: 1 / -1;
  padding: 12px;
  display: grid;
  justify-items: center;
  gap: 4px;
  border: 1px solid rgba(241, 189, 77, 0.24);
  border-radius: 8px;
  background: rgba(241, 189, 77, 0.08);
}

.match-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.match-summary strong {
  font-size: 34px;
  line-height: 1;
}

.match-summary em {
  color: #f6dfae;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

.development-note {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 14px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(241, 189, 77, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(241, 189, 77, 0.18), transparent 55%),
    linear-gradient(135deg, #163f54, #10231f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.development-note strong {
  color: var(--gold);
  font-size: 18px;
  line-height: 1.15;
}

.development-note span {
  color: #eff9ff;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.42;
}

.fundraising-status {
  padding: 10px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 214, 108, 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.fundraising-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fundraising-row span {
  color: #fff5d1;
  font-size: 13px;
  font-weight: 800;
}

.fundraising-row strong {
  color: #fff;
  font-size: 14px;
  font-weight: 1000;
  text-align: right;
  white-space: nowrap;
}

.fundraising-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.fundraising-bar i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #18a963, #ffd66c);
  box-shadow: 0 0 12px rgba(255, 214, 108, 0.45);
}

.developers-content .fundraising-status {
  padding: 10px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 214, 108, 0.32);
  background: rgba(0, 0, 0, 0.24);
}

.developers-content .fundraising-row {
  padding: 0;
  display: flex;
  border: 0;
  background: transparent;
}

.developers-content .fundraising-bar {
  height: 10px;
  padding: 0;
  display: block;
  border: 0;
  background: rgba(0, 0, 0, 0.42);
}

.developers-content .fundraising-bar i {
  min-width: 18px;
}

.fundraising-next-step {
  margin: 0;
  color: #fff1bf;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.development-note a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffd66c, var(--gold));
  color: #201706;
  font-weight: 900;
  text-decoration: none;
}

.multiplayer-content {
  gap: 14px;
}
.match-points { grid-column: 1 / -1; text-align: center; padding: 10px; border-radius: 9px; color: #a6f3bd; background: rgba(21, 93, 55, .35); font-weight: 800; }
.match-points.is-loss { color: #ffd0ca; background: rgba(130, 38, 38, .35); }

.multiplayer-status {
  margin: 0;
}

.points-choice { min-width: 0; margin: 0; padding: 17px; border: 1px solid rgba(235, 194, 102, .32); border-radius: 14px; background: linear-gradient(145deg, rgba(34, 72, 49, .75), rgba(12, 34, 27, .92)); }
.points-choice legend { padding: 0 7px; color: #f4d99a; font-size: 16px; font-weight: 800; }
.points-choice-hint { margin: 0 0 12px; color: #d7e3d8; font-size: 13px; }
.points-choice-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.points-choice-options label { position: relative; min-width: 0; cursor: pointer; }
.points-choice-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.points-choice-options span { min-height: 64px; display: grid; align-content: center; justify-items: center; gap: 3px; border: 1px solid rgba(235, 194, 102, .27); border-radius: 10px; background: rgba(5, 23, 17, .5); color: #f8efd8; transition: background .18s, border-color .18s, transform .18s; }
.points-choice-options b { font-size: 21px; line-height: 1; }
.points-choice-options small { font-size: 10px; line-height: 1.15; text-align: center; }
.points-choice-options label:hover span { border-color: #edc878; transform: translateY(-2px); }
.points-choice-options input:checked + span { color: #243323; border-color: #f5d590; background: linear-gradient(160deg, #f9e2a6, #d4a85c); box-shadow: 0 3px 12px rgba(0,0,0,.22); }
.points-choice-options input:focus-visible + span { outline: 2px solid #fff5d8; outline-offset: 3px; }
.points-choice-terms { margin: 12px 0 0; color: #cbdacb; font-size: 11px; line-height: 1.5; }
.developers-content .points-choice .points-choice-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; padding: 0; border: 0; background: none; }
.developers-content .points-choice .points-choice-hint, .developers-content .points-choice .points-choice-terms { display: block; padding: 0; border: 0; background: none; }
.developers-content .points-choice .points-choice-hint { margin: 0 0 12px; color: #d7e3d8; }
.developers-content .points-choice .points-choice-terms { margin: 12px 0 0; color: #cbdacb; line-height: 1.5; }
@media (max-width: 380px) { .points-choice { padding: 12px; } .points-choice-options { gap: 4px; } .points-choice-options span { min-height: 58px; } .points-choice-options small { font-size: 9px; } }

.multiplayer-invite {
  display: grid;
  gap: 10px;
}

.multiplayer-panel [hidden] { display: none !important; }
.multiplayer-auth { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; padding: 18px; border: 1px solid rgba(236, 199, 119, .4); border-radius: 15px; background: linear-gradient(145deg, #234b38, #10291f); box-shadow: inset 0 1px rgba(255,255,255,.06), 0 12px 28px rgba(0,0,0,.22); }
.multiplayer-auth-icon { width: 44px; height: 44px; display: block; object-fit: cover; border-radius: 13px; }
.developers-content .multiplayer-auth .multiplayer-auth-copy, .developers-content .multiplayer-auth .multiplayer-auth-actions, .developers-content .multiplayer-auth p { display: block; margin: 0; padding: 0; border: 0; background: none; }
.multiplayer-auth-copy h3 { margin: 1px 0 6px; color: #fff5da; font-size: 17px; line-height: 1.2; }
.developers-content .multiplayer-auth p { color: #d0e1d2; font-size: 13px; line-height: 1.5; }
.developers-content .multiplayer-auth p.multiplayer-auth-join-note { margin-top: 8px; color: #f5d997; }
.developers-content .multiplayer-auth .multiplayer-auth-actions { display: flex; grid-column: 1 / -1; gap: 10px; margin-top: 4px; }
.developers-content .multiplayer-auth .multiplayer-login, .multiplayer-auth .multiplayer-skip { width: auto; flex: 1; min-height: 42px; display: grid; place-items: center; padding: 8px 14px; border: 1px solid #e1bf77; border-radius: 10px; font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer; text-decoration: none; transition: filter .16s ease, transform .16s ease; }
.developers-content .multiplayer-auth .multiplayer-login { color: #183027; background: linear-gradient(135deg, #f5d996, #d6a859); }
.multiplayer-auth .multiplayer-skip { color: #f6ead0; border-color: rgba(238, 220, 181, .35); background: rgba(6, 28, 20, .55); }
.multiplayer-auth .multiplayer-login:hover, .multiplayer-auth .multiplayer-skip:hover { filter: brightness(1.12); }
.multiplayer-auth .multiplayer-login:focus-visible, .multiplayer-auth .multiplayer-skip:focus-visible { outline: 2px solid #fff3c9; outline-offset: 3px; }

.multiplayer-invite-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(241, 189, 77, 0.28);
  border-radius: 8px;
  background: rgba(18, 50, 41, 0.74);
  color: #fff6dd;
  padding: 0 12px;
  font: inherit;
}

.multiplayer-online-rooms {
  display: grid;
  gap: 10px;
}

.multiplayer-empty {
  margin: 0;
  color: rgba(255, 246, 221, 0.74);
  font-size: 13px;
}

.multiplayer-room-list {
  display: grid;
  gap: 8px;
}

.multiplayer-room-item {
  min-height: 42px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(241, 189, 77, 0.28);
  border-radius: 8px;
  background: rgba(18, 50, 41, 0.74);
  color: #fff6dd;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.multiplayer-room-item em {
  color: rgba(217, 231, 223, 0.72);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.multiplayer-game-status {
  align-self: center;
  width: min(100%, 460px);
  min-height: 34px;
  padding: 5px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(241, 189, 77, 0.28);
  border-radius: 8px;
  background: rgba(18, 50, 41, 0.72);
  color: #fff6dd;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.multiplayer-game-status strong {
  color: var(--gold);
}

.multiplayer-game-status em {
  color: #d9e7df;
  font-style: normal;
}

.multiplayer-game-status .turn-own {
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(241, 189, 77, 0.2);
  color: #ffe27d;
  box-shadow: 0 0 12px rgba(241, 189, 77, 0.24);
}

.multiplayer-game-status .turn-away {
  color: rgba(217, 231, 223, 0.72);
}

.multiplayer-game-status .turn-timer {
  min-width: 38px;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(255, 246, 221, 0.1);
  color: #fff6dd;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.multiplayer-game-status .turn-timer.urgent {
  background: rgba(214, 102, 95, 0.22);
  color: #ffb8ae;
  box-shadow: 0 0 12px rgba(214, 102, 95, 0.22);
}

.multiplayer-game-status .online,
.multiplayer-game-status .offline {
  position: relative;
  padding-left: 10px;
  color: #d9e7df;
}

.multiplayer-game-status .online::before,
.multiplayer-game-status .offline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.multiplayer-game-status .online::before {
  background: #74e28f;
}

.multiplayer-game-status .offline {
  color: rgba(217, 231, 223, 0.62);
}

.multiplayer-game-status .offline::before {
  background: #d6665f;
}

.multiplayer-reactions {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.multiplayer-reaction-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff8d8;
  font-size: 21px;
  line-height: 1;
  box-shadow: none;
}

.multiplayer-reaction-button:hover { transform: scale(1.14); }
.multiplayer-reaction-button:focus-visible { outline: 2px solid #f4cd7b; outline-offset: 2px; border-radius: 5px; }

.multiplayer-reaction-button:active {
  transform: translateY(1px) scale(0.96);
}

.multiplayer-reaction-bubble {
  position: absolute;
  z-index: 10;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: #fff8d8;
  font-size: 31px;
  line-height: 1;
  pointer-events: none;
  transform: scale(0.8);
  box-shadow: none;
}

.reaction-burst { position: fixed; inset: 0; z-index: 9999; overflow: hidden; pointer-events: none; }
.reaction-burst span { position: absolute; font-size: clamp(28px, 4vw, 54px); line-height: 1; transform: translate(-50%,-50%); animation: reaction-burst-pop 2s ease-out both; }
@keyframes reaction-burst-pop { 0% { opacity: 0; transform: translate(-50%,-35%) scale(.2); } 20% { opacity: 1; transform: translate(-50%,-50%) scale(1.15); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-95%) scale(.8); } }
.turn-speech { position: absolute; z-index: 8; left: 100px; padding: 7px 12px; border-radius: 13px; background: rgba(255,250,233,.95); color: #20392e; font-size: 13px; font-weight: 800; line-height: 1.2; box-shadow: 0 4px 14px rgba(0,0,0,.2); pointer-events: none; white-space: nowrap; }
.turn-speech[hidden] { display: none; }
.opponent-speech { top: 24px; }
.player-speech { top: -27px; }
@media (prefers-reduced-motion: reduce) { .reaction-burst span { animation-duration: .2s; } }

.multiplayer-reaction-bubble[hidden] {
  display: none;
}

.multiplayer-reaction-bubble.player {
  left: 84px;
  top: -52px;
}

.multiplayer-reaction-bubble.opponent {
  left: 84px;
  top: 12px;
}

.multiplayer-reaction-bubble.pop {
  animation: reaction-pop 1.7s ease both;
}

.multiplayer-chat {
  align-self: center;
  width: min(100%, 460px);
  margin: -6px auto 0;
  padding: 8px;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(241, 189, 77, 0.24);
  border-radius: 8px;
  background: rgba(8, 28, 21, 0.72);
  color: #fff6dd;
}

.multiplayer-chat[hidden] {
  display: none;
}

.multiplayer-chat-log {
  max-height: 88px;
  display: grid;
  gap: 4px;
  overflow: auto;
  scrollbar-width: thin;
}

.multiplayer-chat-log p {
  margin: 0;
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.25;
}

.multiplayer-chat-log p.own {
  color: #ffe6a3;
}

.multiplayer-chat-log strong {
  flex: 0 0 auto;
  color: var(--gold);
}

.multiplayer-chat-log span {
  overflow-wrap: anywhere;
}

.multiplayer-chat-empty {
  color: rgba(217, 231, 223, 0.6);
}

.multiplayer-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.multiplayer-chat-input {
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(244, 213, 143, 0.28);
  border-radius: 7px;
  background: rgba(255, 246, 221, 0.08);
  color: #fff6dd;
  font: inherit;
}

.multiplayer-chat-input::placeholder {
  color: rgba(217, 231, 223, 0.56);
}

.multiplayer-chat-send {
  height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(244, 213, 143, 0.45);
  border-radius: 7px;
  background: rgba(241, 189, 77, 0.2);
  color: #fff6dd;
  font-size: 12px;
  font-weight: 900;
}

@keyframes reaction-pop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.7);
  }

  16% {
    opacity: 1;
    transform: translateY(0) scale(1.08);
  }

  72% {
    opacity: 1;
    transform: translateY(-8px) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-22px) scale(0.86);
  }
}

@media (max-width: 390px) {
  .app-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .home-screen {
    padding-left: 18px;
    padding-right: 18px;
  }

  .home-wallet {
    right: 18px;
  }

  .home-quick-link {
    min-width: 104px;
  }

  .table-zone {
    height: 300px;
  }

  .table-cards {
    gap: 9px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .table-cards .card {
    width: clamp(52px, 17%, 70px);
  }

  .hand-cards {
    min-height: 132px;
  }

  .hand-zone {
    height: 306px;
    min-height: 306px;
    padding: 24px 20px 26px;
  }

  .card {
    min-height: 104px;
    padding: 4px;
  }

  .pip-grid {
    padding: 0 4px;
  }

  .pip {
    width: 15px;
    height: 15px;
    font-size: 15px;
  }

  .court-body {
    width: 32px;
    height: 38px;
  }

  .court-head {
    width: 18px;
    height: 18px;
  }
}













