:root {
  --card-w: clamp(62px, calc(var(--app-current-width) * 0.18), 78px);
  --card-h: calc(var(--card-w) * 1.435);
  --radius-card: 11px;
  --radius-panel: 18px;
  --radius-pill: 999px;
  --dock-h: 104px;
  --gap-xs: 4px;
  --gap-sm: 8px;
  --gap-md: 12px;
  --gap-lg: 16px;
  --shadow-card: 0 12px 24px rgba(0, 0, 0, 0.28), 0 2px 4px rgba(0, 0, 0, 0.18);
  --shadow-card-selected: 0 0 0 2px rgba(117, 245, 174, 0.36), 0 0 26px rgba(78, 232, 146, 0.42), 0 18px 34px rgba(0, 0, 0, 0.36);
  --shadow-panel: 0 20px 60px rgba(0, 0, 0, 0.34);
  --color-felt: #0d5135;
  --color-felt-dark: #05251a;
  --color-felt-soft: #177145;
  --color-accent: #35d681;
  --color-accent-2: #8fe7d4;
  --color-ui-bg: rgba(3, 12, 10, 0.74);
  --color-ui-bg-soft: rgba(255, 255, 255, 0.07);
  --color-ui-border: rgba(224, 255, 237, 0.13);
  --color-text: #f4fff8;
  --color-text-soft: rgba(234, 255, 242, 0.68);
  --color-red-suit: #b91f34;
  --color-black-suit: #111a2d;
}

body[data-screen="game"] {
  background:
    radial-gradient(circle at 50% 24%, rgba(37, 135, 81, 0.2), transparent 34%),
    linear-gradient(180deg, #06130f, #020806);
}

body[data-screen="uikit"] .bottom-nav {
  display: none;
}

body[data-screen="uikit"] .app {
  padding-bottom: 16px;
}

body[data-screen="game"] .app {
  position: relative;
  background:
    radial-gradient(circle at 50% 40%, rgba(62, 142, 91, 0.26), transparent 46%),
    url("/assets/ui/felt-mark.svg") center 42% / 46% auto no-repeat,
    repeating-linear-gradient(29deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 8px),
    linear-gradient(155deg, var(--color-felt), #083820 58%, var(--color-felt-dark));
}

.ui-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  background: currentColor;
  mask: var(--icon) center / contain no-repeat;
  -webkit-mask: var(--icon) center / contain no-repeat;
}

.ui-icon-menu {
  --icon: url("/assets/icons/menu.svg");
}

.ui-icon-settings {
  --icon: url("/assets/icons/settings.svg");
}

.ui-icon-exit {
  --icon: url("/assets/icons/exit.svg");
}

.game-topbar {
  color: var(--color-text);
}

.game-topbar strong {
  font-size: 14px;
  line-height: 1;
}

.game-topbar span {
  color: var(--color-text-soft);
}

.opponent-zone {
  color: var(--color-text);
}

.opponent-zone strong {
  color: var(--color-text);
}

.opponent-mini-card,
.card-back {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(3, 18, 18, 0.12)),
    url("/assets/cards/card-back.svg") center / cover no-repeat;
  border-color: rgba(176, 234, 216, 0.38);
}

.opponent-mini-card {
  width: 23px;
  height: 34px;
  border-radius: 6px;
}

.opponent-count-badge,
.deck-count {
  border: 1px solid var(--color-ui-border);
  background: rgba(1, 8, 6, 0.58);
  color: var(--color-text);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.table-status > div,
.ui-chip {
  border: 1px solid var(--color-ui-border);
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.deck-area {
  left: calc(var(--card-w) * -0.48);
  top: clamp(210px, 43dvh, 330px);
  width: calc(var(--card-w) * 1.86);
  height: calc(var(--card-h) * 1.24);
  overflow: visible;
}

.draw-pile {
  width: var(--card-w);
  height: var(--card-h);
  z-index: 2;
}

.trump-card {
  left: calc(var(--card-w) * 0.42);
  top: calc(var(--card-h) * 0.14);
  width: var(--card-w);
  height: var(--card-h);
  z-index: 1;
}

.trump-card .card {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.draw-pile .layer {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.draw-pile .layer-1 { transform: translate(0, 0); }
.draw-pile .layer-2 { transform: translate(1.5px, 1.5px); }
.draw-pile .layer-3 { transform: translate(3px, 3px); }
.draw-pile .layer-4 { transform: translate(4.5px, 4.5px); }
.draw-pile .layer-5 { transform: translate(6px, 6px); }

.deck-count {
  right: -9px;
  top: -8px;
  min-width: 24px;
  height: 24px;
  font-size: 11px;
}

.discard-pile {
  position: absolute;
  right: 12px;
  top: clamp(88px, 14dvh, 128px);
  z-index: 4;
  width: calc(var(--card-w) * 1.05);
  height: calc(var(--card-h) * 0.7);
  background: url("/assets/ui/discard-pile.svg") center / contain no-repeat;
  opacity: 0.42;
  pointer-events: none;
}

.battle-table {
  top: clamp(150px, 22dvh, 188px);
  bottom: calc(var(--dock-h) + var(--card-h) + 36px + var(--safe-bottom));
  min-height: 230px;
  align-content: center;
}

.battle-table.pairs-1,
.battle-table.pairs-2 {
  grid-template-columns: repeat(2, minmax(0, calc(var(--card-w) + 42px)));
}

.battle-table.pairs-3,
.battle-table.pairs-4 {
  grid-template-columns: repeat(2, minmax(0, calc(var(--card-w) + 38px)));
}

.battle-table.pairs-5,
.battle-table.pairs-6 {
  grid-template-columns: repeat(3, minmax(0, calc(var(--card-w) + 18px)));
  gap: 8px 2px;
}

.battle-table.pairs-1 {
  grid-template-columns: minmax(0, calc(var(--card-w) + 48px));
}

.attack-pair {
  min-height: calc(var(--card-h) + 28px);
}

.attack-pair .card:first-child {
  transform: rotate(-3deg) translate(-7px, 8px);
}

.attack-pair .card:nth-child(2),
.attack-pair .defense-slot {
  transform: rotate(6deg) translate(17px, -9px);
}

.empty {
  color: rgba(235, 255, 241, 0.25);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.25);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.defense-slot {
  width: var(--card-w);
  height: var(--card-h);
  border-color: rgba(236, 255, 242, 0.16);
  border-radius: var(--radius-card);
  background: rgba(0, 0, 0, 0.07);
  color: rgba(236, 255, 242, 0.26);
}

.card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  height: var(--card-h);
  min-height: var(--card-h);
  padding: 7px 8px;
  border: 1px solid rgba(18, 27, 36, 0.16);
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 74% 12%, rgba(255, 255, 255, 0.92), transparent 25%),
    linear-gradient(145deg, #fffefa 0%, #f5efe5 52%, #e8dfd0 100%);
  color: var(--color-black-suit);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.card::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(17, 25, 39, 0.09);
  border-radius: calc(var(--radius-card) - 4px);
  pointer-events: none;
}

.card-corner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
  gap: 1px;
  width: max-content;
  line-height: 1;
}

.card-corner-bottom {
  justify-self: end;
  align-self: end;
  transform: rotate(180deg);
}

.card-rank {
  position: relative;
  z-index: 1;
  font-size: clamp(17px, calc(var(--card-w) * 0.27), 21px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.card-suit {
  position: relative;
  z-index: 1;
  width: calc(var(--card-w) * 0.42);
  height: calc(var(--card-w) * 0.42);
  margin: auto;
  color: currentColor;
  background: currentColor;
  mask: var(--suit-icon) center / contain no-repeat;
  -webkit-mask: var(--suit-icon) center / contain no-repeat;
}

.card-corner-suit {
  position: relative;
  z-index: 1;
  width: calc(var(--card-w) * 0.2);
  height: calc(var(--card-w) * 0.2);
  background: currentColor;
  mask: var(--suit-icon) center / contain no-repeat;
  -webkit-mask: var(--suit-icon) center / contain no-repeat;
}

.card.suit-hearts { --suit-icon: url("/assets/cards/hearts.svg"); }
.card.suit-diamonds { --suit-icon: url("/assets/cards/diamonds.svg"); }
.card.suit-clubs { --suit-icon: url("/assets/cards/clubs.svg"); }
.card.suit-spades { --suit-icon: url("/assets/cards/spades.svg"); }

.card.red {
  color: var(--color-red-suit);
}

.card.black {
  color: var(--color-black-suit);
}

.card.selected {
  border-color: rgba(65, 217, 138, 0.82);
  box-shadow: var(--shadow-card-selected);
}

.card:disabled:not(.card-hand),
.card.is-unplayable {
  opacity: 0.86;
}

.card.is-unplayable {
  filter: saturate(0.78);
}

.hand-zone {
  bottom: calc(var(--dock-h) + 8px + var(--safe-bottom));
  padding-bottom: 0;
}

.hand {
  min-height: calc(var(--card-h) + 30px);
  padding: 20px 14px 12px;
}

.hand .card {
  margin-right: calc(var(--card-w) * -0.31);
}

.hand .card:last-child {
  margin-right: 0;
}

.hand .card.selected {
  transform: translateY(-12px) rotate(0deg);
}

.action-dock {
  grid-template-columns: 52px minmax(0, 1fr) 62px;
  gap: var(--gap-md);
  height: calc(var(--dock-h) + var(--safe-bottom));
  padding: 12px 14px calc(12px + var(--safe-bottom));
  background: var(--color-ui-bg);
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.22);
  border-top: 1px solid rgba(224, 255, 237, 0.08);
}

.table-icon-btn {
  min-height: 48px;
  width: 48px;
  border: 1px solid var(--color-ui-border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-text);
}

.table-icon-btn.secondary-action {
  min-width: 62px;
  border-radius: 24px;
  color: #ffe1e1;
  font-size: 13px;
}

.primary-action,
.ui-button-primary {
  min-height: 58px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(180deg, #49e28f, #1fbf6b);
  color: #03140c;
  box-shadow: 0 14px 28px rgba(23, 186, 104, 0.28);
}

.primary-action:disabled,
.ui-button-disabled {
  background: rgba(235, 255, 241, 0.12);
  color: rgba(235, 255, 241, 0.46);
  box-shadow: none;
}

.ui-button-secondary {
  border: 1px solid var(--color-ui-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
}

.ui-button-danger {
  border-color: rgba(255, 93, 108, 0.42);
  background: rgba(105, 22, 35, 0.22);
  color: #ffd2d8;
}

.game-log summary {
  border: 1px solid var(--color-ui-border);
  background: rgba(0, 0, 0, 0.17);
  color: var(--color-text-soft);
}

.toast {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(8, 18, 15, 0.94);
  color: var(--color-text);
}

.uikit-screen.active {
  display: grid;
}

.uikit-screen {
  gap: 14px;
  padding-bottom: 12px;
}

.uikit-section {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--color-ui-border);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.uikit-card-row,
.uikit-buttons,
.uikit-chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.uikit-card-back-preview {
  flex: 0 0 var(--card-w);
}

.uikit-table-preview {
  min-height: 210px;
  background:
    repeating-linear-gradient(29deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 8px),
    linear-gradient(155deg, var(--color-felt), var(--color-felt-dark));
}

.uikit-deck-preview {
  position: relative;
  top: auto;
  left: calc(var(--card-w) * -0.4);
}

.uikit-discard-preview {
  top: 78px;
  right: 18px;
}

.uikit-battle-preview {
  position: relative;
  inset: auto;
  min-height: 210px;
  bottom: auto;
  top: auto;
}

.uikit-dock-preview {
  position: relative;
  height: calc(var(--dock-h) + var(--safe-bottom));
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
}

.uikit-toast-preview {
  position: relative;
  right: auto;
  bottom: auto;
  width: 100%;
  transform: none;
}

.uikit-result-preview {
  width: 100%;
}

.toast.error {
  border-color: rgba(255, 93, 108, 0.38);
  background: rgba(36, 13, 20, 0.95);
  color: #ffd6dc;
}

.toast.success {
  border-color: rgba(53, 214, 129, 0.36);
  background: rgba(7, 32, 22, 0.95);
  color: #d8ffe7;
}

.profile-card,
.leaderboard-row,
.result-card,
.modal-card,
.ui-panel {
  border-radius: var(--radius-panel);
}

.leaderboard-row.current {
  border-color: rgba(53, 214, 129, 0.4);
  background: rgba(53, 214, 129, 0.11);
}

.result-card {
  border-color: rgba(143, 231, 212, 0.24);
  background:
    radial-gradient(circle at 50% 0, rgba(53, 214, 129, 0.14), transparent 42%),
    rgba(8, 18, 15, 0.96);
}


@media (min-width: 760px) {
  body[data-screen="game"] .app {
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  }
}

/* Multiplayer table layout: fixes overlap and supports 2-4 player rooms. */
.opponents-zone {
  position: absolute;
  top: calc(48px + var(--safe-top));
  left: 10px;
  right: 10px;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(var(--opponents-cols, 1), minmax(0, 1fr));
  gap: 6px;
  pointer-events: none;
}

.opponents-zone.opponents-1 { --opponents-cols: 1; }
.opponents-zone.opponents-2 { --opponents-cols: 2; }
.opponents-zone.opponents-3 { --opponents-cols: 3; }

.opponent-seat {
  min-width: 0;
  min-height: 74px;
  padding: 7px 8px;
  border: 1px solid rgba(224, 255, 237, 0.12);
  border-radius: 16px;
  background: rgba(3, 12, 10, 0.52);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  color: var(--color-text);
  overflow: hidden;
}

.opponent-seat.is-current-turn {
  border-color: rgba(73, 226, 143, 0.62);
  box-shadow: 0 0 0 1px rgba(73, 226, 143, 0.18), 0 14px 32px rgba(0, 0, 0, 0.24);
}

.opponent-seat.is-defender {
  border-color: rgba(143, 231, 212, 0.38);
}

.opponent-seat.is-offline {
  opacity: 0.62;
}

.opponent-seat-empty {
  display: grid;
  place-items: center;
  color: var(--color-text-soft);
  font-size: 12px;
  font-weight: 900;
}

.opponent-seat-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.opponent-role {
  color: var(--color-accent-2);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.opponent-seat strong {
  display: block;
  overflow: hidden;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opponent-seat .opponent-hand {
  justify-content: flex-start;
  min-width: 0;
  min-height: 25px;
  padding: 5px 0 2px;
  overflow: hidden;
}

.opponent-seat .opponent-mini-card {
  width: 18px;
  height: 26px;
  margin-left: -7px;
  border-radius: 5px;
}

.opponent-seat .opponent-mini-card:first-child {
  margin-left: 0;
}

.opponent-seat .opponent-count-badge {
  min-width: 23px;
  height: 20px;
  margin-left: 4px;
  font-size: 10px;
}

.opponent-seat-meta {
  display: flex;
  gap: 4px;
  overflow: hidden;
  color: var(--color-text-soft);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.opponent-seat-meta span {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
}

.table-status {
  top: calc(130px + var(--safe-top));
  left: 10px;
  right: 10px;
  z-index: 11;
  gap: 6px;
}

.table-status > div {
  padding: 6px 8px;
}

.table-status strong {
  font-size: 12px;
}

.match-flags {
  position: absolute;
  top: calc(178px + var(--safe-top));
  left: 10px;
  right: 10px;
  z-index: 10;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0 0 4px;
  scrollbar-width: none;
}

.match-flags::-webkit-scrollbar {
  display: none;
}

.match-flags .flag-chip {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 4px 8px;
  font-size: 11px;
}

.discard-pile {
  top: calc(208px + var(--safe-top));
  right: 8px;
  width: calc(var(--card-w) * 0.88);
  height: calc(var(--card-h) * 0.58);
}

.deck-area {
  top: calc(clamp(230px, 40dvh, 315px) + var(--safe-top));
  left: calc(var(--card-w) * -0.54);
  z-index: 5;
}

.battle-table {
  top: calc(214px + var(--safe-top));
  bottom: calc(var(--dock-h) + var(--card-h) + 28px + var(--safe-bottom));
  min-height: 0;
  padding-inline: 52px 8px;
  align-content: center;
}

.battle-table.pairs-1,
.battle-table.pairs-2 {
  grid-template-columns: repeat(2, minmax(0, calc(var(--card-w) + 34px)));
}

.battle-table.pairs-1 {
  grid-template-columns: minmax(0, calc(var(--card-w) + 46px));
}

.battle-table.pairs-3,
.battle-table.pairs-4 {
  grid-template-columns: repeat(2, minmax(0, calc(var(--card-w) + 30px)));
  gap: 8px 0;
}

.battle-table.pairs-5,
.battle-table.pairs-6 {
  grid-template-columns: repeat(3, minmax(0, calc(var(--card-w) + 10px)));
  gap: 6px 0;
}

.attack-pair {
  min-height: calc(var(--card-h) + 18px);
}

.game-log {
  bottom: calc(var(--dock-h) + var(--card-h) + 10px + var(--safe-bottom));
  left: 10px;
  right: 10px;
}

.hand-zone {
  bottom: calc(var(--dock-h) + 4px + var(--safe-bottom));
}



/* Hand slot UX: keep exactly six cards visible and move overflow into the cards panel. */
.hand {
  justify-content: center;
  overflow: hidden;
  padding-inline: 10px;
}

.hand-slot {
  position: relative;
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  min-height: calc(var(--card-h) + 22px);
  margin-right: calc(var(--card-w) * -0.31);
  display: grid;
  place-items: end center;
}

.hand-slot:last-child {
  margin-right: 0;
}

.hand-slot .card {
  flex: 0 0 auto;
  width: var(--card-w);
  margin-right: 0;
}

.hand .hand-slot:nth-child(6n+1) .card { transform: rotate(-4deg); }
.hand .hand-slot:nth-child(6n+2) .card { transform: rotate(-2deg); }
.hand .hand-slot:nth-child(6n+3) .card { transform: rotate(-1deg); }
.hand .hand-slot:nth-child(6n+4) .card { transform: rotate(1deg); }
.hand .hand-slot:nth-child(6n+5) .card { transform: rotate(2deg); }
.hand .hand-slot:nth-child(6n+6) .card { transform: rotate(4deg); }
.hand .hand-slot .card.selected { transform: translateY(-12px) rotate(0deg); }

.hand-slot-empty {
  width: calc(var(--card-w) * 0.82);
  height: calc(var(--card-h) * 0.86);
  display: grid;
  place-items: center;
  border: 1px dashed rgba(224, 255, 237, 0.18);
  border-radius: 12px;
  color: rgba(224, 255, 237, 0.28);
  font-size: 12px;
  font-weight: 950;
  background: rgba(255, 255, 255, 0.04);
}

.action-dock {
  grid-template-columns: 48px minmax(0, 1fr) minmax(82px, 112px) 48px;
}

.hand-slots-button {
  min-height: 50px;
  padding: 0 10px;
  border: 1px solid var(--color-ui-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-text);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
}

.hand-slots-button[data-has-more="true"] {
  border-color: rgba(240, 202, 107, 0.5);
  color: #f4d890;
}

.hand-slots-button span,
.hand-slots-button small {
  display: block;
}

.hand-slots-button small {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 850;
  opacity: 0.78;
}

.hand-slots-button:disabled {
  opacity: 0.56;
}

.hand-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.hand-overlay.visible {
  display: flex;
}

.hand-panel {
  width: min(100%, 520px);
  max-height: min(82dvh, 620px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(224, 255, 237, 0.14);
  border-radius: 26px 26px 0 0;
  background: rgba(8, 18, 15, 0.98);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.45);
  color: var(--color-text);
}

.hand-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 10px;
}

.hand-panel-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

.hand-panel-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 0 16px 10px;
}

.hand-panel-controls button {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 14px;
  font-size: 12px;
}

.hand-panel-controls strong {
  min-width: 58px;
  text-align: center;
  color: #f4d890;
}

.hand-panel-hint {
  margin: 0;
  padding: 0 16px 10px;
  color: var(--color-text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.hand-panel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 6px;
  max-height: min(54dvh, 420px);
  overflow-y: auto;
  padding: 10px 16px calc(16px + var(--safe-bottom));
}

.hand-picker-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(var(--card-h) + 10px);
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
}

.hand-picker-card::before {
  content: attr(data-card-index);
  position: absolute;
  left: 4px;
  top: 4px;
  z-index: 2;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: rgba(224, 255, 237, 0.86);
  font-size: 10px;
  font-weight: 950;
}

.hand-picker-card.selected {
  border-color: rgba(240, 202, 107, 0.62);
  background: rgba(240, 202, 107, 0.12);
}

.hand-picker-card .card {
  pointer-events: none;
  transform: none;
}


/* Hand slots v2: strict six-slot grid, visible cards button, and no horizontal spill on Telegram mobile. */
body[data-screen="game"] .action-dock {
  grid-template-columns: 48px minmax(0, 1fr) minmax(84px, 108px) 48px;
}

body[data-screen="game"] .hand-slots-button {
  display: block;
  min-width: 0;
  white-space: normal;
}

body[data-screen="game"] .hand.hand-slots-active {
  --slot-card-w: clamp(48px, calc(var(--app-current-width) * 0.162), var(--card-w));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-items: center;
  align-items: end;
  gap: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 16px 4px 8px;
}

body[data-screen="game"] .hand.hand-slots-active > .card {
  display: none;
}

body[data-screen="game"] .hand.hand-slots-active .hand-slot {
  width: 100%;
  min-width: 0;
  margin: 0;
  display: grid;
  place-items: end center;
}

body[data-screen="game"] .hand.hand-slots-active .hand-slot .card {
  width: var(--slot-card-w);
  flex-basis: var(--slot-card-w);
  height: calc(var(--slot-card-w) * 1.435);
  min-height: calc(var(--slot-card-w) * 1.435);
  margin: 0;
}

body[data-screen="game"] .hand.hand-slots-active .hand-slot-empty {
  width: calc(var(--slot-card-w) * 0.84);
  height: calc(var(--slot-card-w) * 1.16);
}



/* Casino table refresh: gameplay layout stays on the same DOM and event handlers. */
:root {
  --card-w: clamp(62px, calc(var(--app-current-width) * 0.176), 76px);
  --casino-gold: #f5cf7a;
  --casino-gold-line: rgba(245, 207, 122, 0.28);
  --casino-red: #ff3f64;
  --casino-wine: #4b0d1f;
  --casino-black: #050307;
  --color-felt: #0f5f3a;
  --color-felt-dark: #042316;
  --color-felt-soft: #177d4a;
  --color-accent: #f5cf7a;
  --color-accent-2: #ffe9a7;
  --color-ui-bg: rgba(16, 7, 20, 0.74);
  --color-ui-bg-soft: rgba(255, 255, 255, 0.07);
  --color-ui-border: rgba(245, 207, 122, 0.2);
  --color-text: #fff8e3;
  --color-text-soft: rgba(255, 245, 214, 0.66);
  --shadow-card-selected: 0 0 0 2px rgba(245, 207, 122, 0.42), 0 0 30px rgba(245, 207, 122, 0.38), 0 18px 34px rgba(0, 0, 0, 0.38);
}

body[data-screen="game"] {
  background:
    radial-gradient(circle at 18% 4%, rgba(245, 207, 122, 0.16), transparent 27%),
    radial-gradient(circle at 86% 8%, rgba(255, 63, 100, 0.16), transparent 28%),
    linear-gradient(180deg, #150711, #030205 78%);
}

body[data-screen="game"] .app,
body[data-screen="game"] .game-screen {
  background:
    radial-gradient(ellipse at 50% 47%, rgba(34, 193, 107, 0.18) 0 22%, transparent 56%),
    radial-gradient(circle at 50% 18%, rgba(245, 207, 122, 0.13), transparent 28%),
    repeating-linear-gradient(35deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 8px),
    linear-gradient(155deg, #124f35 0%, #07291d 52%, #180714 100%);
}

body[data-screen="game"] .game-screen::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: calc(198px + var(--safe-top));
  bottom: calc(var(--dock-h) + var(--card-h) + 18px + var(--safe-bottom));
  z-index: 0;
  pointer-events: none;
  border: 2px solid rgba(245, 207, 122, 0.18);
  border-radius: 48% / 18%;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(11, 72, 43, 0.28), transparent 62%),
    repeating-radial-gradient(ellipse at 50% 50%, rgba(245, 207, 122, 0.055) 0 1px, transparent 1px 15px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 0 46px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(245, 207, 122, 0.08);
}

body[data-screen="game"] .game-screen::after {
  content: "♠   ♥   ♦   ♣";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(56px + var(--safe-top));
  z-index: 0;
  pointer-events: none;
  color: rgba(245, 207, 122, 0.1);
  font-size: 56px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-align: center;
  white-space: nowrap;
}

.table-surface,
.deck-area,
.battle-table,
.discard-pile,
.game-log,
.hand-zone,
.opponents-zone,
.table-status,
.match-flags,
.action-dock,
.game-topbar {
  position: absolute;
}

.game-topbar {
  padding: 4px 0;
}

.game-topbar > div {
  padding: 8px 11px;
  border: 1px solid rgba(245, 207, 122, 0.2);
  border-radius: 18px;
  background: rgba(9, 3, 11, 0.44);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.game-topbar strong {
  color: #fff5c7;
}

.game-topbar span {
  color: rgba(255, 245, 214, 0.65);
}

.table-icon-btn {
  border: 1px solid rgba(245, 207, 122, 0.24);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(98, 21, 42, 0.92), rgba(18, 7, 22, 0.92));
  color: #ffe49a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.table-icon-btn:not(:disabled):hover,
.table-icon-btn:not(:disabled):focus-visible {
  box-shadow: 0 0 0 3px rgba(245, 207, 122, 0.12), 0 16px 34px rgba(0, 0, 0, 0.32);
}

.opponents-zone {
  z-index: 12;
}

.opponent-seat {
  border-color: rgba(245, 207, 122, 0.18);
  background:
    radial-gradient(circle at 12% 0, rgba(245, 207, 122, 0.14), transparent 30%),
    linear-gradient(160deg, rgba(68, 13, 31, 0.72), rgba(8, 15, 13, 0.72));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.opponent-seat.is-current-turn {
  border-color: rgba(245, 207, 122, 0.72);
  animation: casinoSeatPulse 2s ease-in-out infinite;
}

.opponent-seat.is-defender {
  border-color: rgba(255, 63, 100, 0.42);
}

.opponent-role,
.opponent-seat-meta span,
.table-status span,
.match-flags .flag-chip {
  color: rgba(255, 245, 214, 0.68);
}

.opponent-mini-card,
.card-back {
  border-color: rgba(245, 207, 122, 0.42);
  background:
    radial-gradient(circle at 50% 50%, rgba(245, 207, 122, 0.18) 0 9%, transparent 10% 100%),
    url("/assets/cards/card-back.svg") center / cover no-repeat,
    linear-gradient(135deg, #3c0d1d, #09040c);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32), 0 0 16px rgba(245, 207, 122, 0.08);
}

.opponent-count-badge,
.deck-count {
  border-color: rgba(245, 207, 122, 0.34);
  background: linear-gradient(180deg, rgba(245, 207, 122, 0.96), rgba(170, 103, 34, 0.96));
  color: #18080c;
}

.table-status > div,
.ui-chip,
.match-flags .flag-chip,
.game-log summary {
  border: 1px solid rgba(245, 207, 122, 0.18);
  background: rgba(9, 3, 11, 0.52);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.table-status strong {
  color: #fff7db;
}

.match-flags .flag-chip {
  box-shadow: none;
}

.deck-area {
  z-index: 6;
  filter: drop-shadow(0 20px 24px rgba(0, 0, 0, 0.26));
}

.trump-card {
  filter: drop-shadow(0 0 18px rgba(245, 207, 122, 0.08));
}

.discard-pile {
  opacity: 0.54;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.28));
}

.battle-table {
  z-index: 3;
}

.battle-table .empty {
  color: rgba(255, 238, 186, 0.28);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.attack-pair {
  animation: casinoDealIn 180ms ease both;
}

.defense-slot {
  border-color: rgba(245, 207, 122, 0.24);
  background:
    radial-gradient(circle at 50% 50%, rgba(245, 207, 122, 0.06), transparent 58%),
    rgba(4, 2, 5, 0.16);
  color: rgba(255, 238, 186, 0.34);
}

.card {
  border-color: rgba(18, 12, 20, 0.18);
  box-shadow: 0 13px 26px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(245, 207, 122, 0.08);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.card.selected {
  border-color: var(--casino-gold);
  box-shadow: var(--shadow-card-selected);
  filter: saturate(1.08);
}

.hand-zone {
  z-index: 8;
  background:
    linear-gradient(180deg, transparent, rgba(5, 2, 7, 0.42));
}

body[data-screen="game"] .hand.hand-slots-active {
  padding: 18px 4px 10px;
}

.hand-slot {
  isolation: isolate;
}

.hand-slot::before {
  content: "";
  position: absolute;
  bottom: 0;
  width: calc(var(--slot-card-w, var(--card-w)) * 0.9);
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.24);
  filter: blur(6px);
  z-index: -1;
}

.hand-slot-empty {
  border-color: rgba(245, 207, 122, 0.2);
  background: rgba(245, 207, 122, 0.045);
  color: rgba(255, 238, 186, 0.34);
}

.action-dock {
  z-index: 20;
  border-top: 1px solid rgba(245, 207, 122, 0.2);
  background:
    radial-gradient(circle at 18% 0, rgba(245, 207, 122, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(49, 9, 22, 0.9), rgba(6, 3, 9, 0.96));
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.44);
}

.primary-action {
  border: 1px solid rgba(255, 224, 143, 0.76);
  background:
    linear-gradient(180deg, #fff0b7 0%, #f6cc67 48%, #a35f20 100%);
  color: #18070b;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.55);
  animation: casinoCtaGlow 3.2s ease-in-out infinite;
}

.primary-action:disabled {
  border-color: rgba(245, 207, 122, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 245, 214, 0.42);
  box-shadow: none;
  animation: none;
}

.table-icon-btn.secondary-action {
  border-radius: 18px;
  color: #fff2bd;
}

.hand-slots-button {
  border-color: rgba(245, 207, 122, 0.24);
  background:
    linear-gradient(180deg, rgba(64, 13, 30, 0.88), rgba(16, 7, 20, 0.88));
  color: #fff2bd;
}

.hand-slots-button[data-has-more="true"] {
  border-color: rgba(245, 207, 122, 0.6);
  color: #ffe8a4;
  box-shadow: 0 0 18px rgba(245, 207, 122, 0.12);
}

.hand-panel {
  border-color: rgba(245, 207, 122, 0.24);
  background:
    radial-gradient(circle at 50% 0, rgba(245, 207, 122, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(37, 8, 22, 0.98), rgba(7, 3, 10, 0.99));
  box-shadow: 0 -28px 78px rgba(0, 0, 0, 0.52);
}

.hand-panel-controls strong,
.hand-picker-card::before {
  color: #18070b;
  background: linear-gradient(180deg, #ffeaa6, #c88632);
}

.hand-picker-card.selected {
  border-color: rgba(245, 207, 122, 0.7);
  background: rgba(245, 207, 122, 0.12);
  box-shadow: inset 0 0 0 1px rgba(245, 207, 122, 0.08);
}

.game-log summary {
  color: rgba(255, 245, 214, 0.66);
}

.game-log[open] summary {
  border-color: rgba(245, 207, 122, 0.36);
  color: #fff2bd;
}

.log-row {
  border: 1px solid rgba(245, 207, 122, 0.14);
  background: rgba(8, 3, 10, 0.78);
}

.uikit-section,
.uikit-table-preview {
  border-color: rgba(245, 207, 122, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, rgba(49, 9, 22, 0.9), rgba(8, 4, 12, 0.94));
}

@keyframes casinoSeatPulse {
  0%, 100% { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28), 0 0 0 rgba(245, 207, 122, 0); }
  50% { box-shadow: 0 15px 36px rgba(0, 0, 0, 0.34), 0 0 22px rgba(245, 207, 122, 0.26); }
}

@keyframes casinoDealIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Motion layer: UI-only animations. Game state, socket payloads and server rules are not changed. */
:root {
  --motion-fast: 140ms;
  --motion-medium: 220ms;
  --motion-slow: 320ms;
  --motion-ease-out: cubic-bezier(0.2, 0.78, 0.24, 1);
  --motion-ease-in: cubic-bezier(0.58, 0, 0.78, 0.34);
  --motion-stagger: calc(var(--motion-order, 0) * 24ms);
}

.screen.screen-motion-enter {
  animation: durakScreenEnter var(--motion-medium) var(--motion-ease-out) both;
}

body[data-screen="game"] .game-screen.screen-motion-enter {
  animation: durakGameEnter var(--motion-slow) var(--motion-ease-out) both;
}

.screen.screen-motion-enter > * {
  animation: durakPanelLift var(--motion-medium) var(--motion-ease-out) both;
}

.screen.screen-motion-enter > :nth-child(1) { animation-delay: 0ms; }
.screen.screen-motion-enter > :nth-child(2) { animation-delay: 24ms; }
.screen.screen-motion-enter > :nth-child(3) { animation-delay: 48ms; }
.screen.screen-motion-enter > :nth-child(4) { animation-delay: 72ms; }
.screen.screen-motion-enter > :nth-child(5) { animation-delay: 96ms; }

.profile-card,
.join-card,
.waiting-card,
.panel,
.shop-hero,
.shop-grid > div,
.room-card,
.leaderboard-row,
.match-row,
.player-row,
.flag-chip,
.connection-pill,
.table-status > div,
.opponent-seat {
  will-change: transform, opacity;
}

.room-card,
.leaderboard-row,
.match-row,
.player-row {
  animation: durakListItemIn var(--motion-medium) var(--motion-ease-out) both;
}

.menu-grid button,
.quick-links button,
.bottom-nav button,
.result-actions button,
.waiting-actions button,
.room-card-actions button,
.hand-panel-controls button,
.hand-slots-button,
.primary-action,
.table-icon-btn {
  transition:
    translate var(--motion-fast) var(--motion-ease-out),
    transform var(--motion-fast) var(--motion-ease-out),
    filter var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    color var(--motion-fast) ease;
}

.menu-grid button:not(:disabled):active,
.quick-links button:not(:disabled):active,
.bottom-nav button:not(:disabled):active,
.result-actions button:not(:disabled):active,
.waiting-actions button:not(:disabled):active,
.room-card-actions button:not(:disabled):active,
.hand-panel-controls button:not(:disabled):active,
.hand-slots-button:not(:disabled):active,
.primary-action:not(:disabled):active,
.table-icon-btn:not(:disabled):active {
  translate: 0 1px;
  filter: brightness(1.08);
}

.bottom-nav button.active {
  animation: durakNavActive var(--motion-medium) var(--motion-ease-out) both;
}

.settings-overlay.visible,
.result-overlay.visible,
.inactive-screen.visible {
  animation: durakOverlayIn var(--motion-medium) ease both;
}

.hand-overlay.visible {
  animation: durakOverlayIn var(--motion-medium) ease both;
}

.settings-overlay.is-closing,
.result-overlay.is-closing,
.inactive-screen.is-closing {
  display: grid;
  pointer-events: none;
  animation: durakOverlayOut var(--motion-medium) ease both;
}

.hand-overlay.is-closing {
  display: flex;
  pointer-events: none;
  animation: durakOverlayOut var(--motion-medium) ease both;
}

.settings-overlay.visible .settings-card,
.result-overlay.visible .result-card,
.inactive-screen.visible .modal-card {
  animation: durakModalIn var(--motion-medium) var(--motion-ease-out) both;
}

.settings-overlay.is-closing .settings-card,
.result-overlay.is-closing .result-card,
.inactive-screen.is-closing .modal-card {
  animation: durakModalOut var(--motion-medium) var(--motion-ease-in) both;
}

.hand-overlay.visible .hand-panel {
  animation: durakSheetIn var(--motion-slow) var(--motion-ease-out) both;
}

.hand-overlay.is-closing .hand-panel {
  animation: durakSheetOut var(--motion-medium) var(--motion-ease-in) both;
}

.hand-panel-grid .hand-picker-card {
  animation: durakPickerCardIn var(--motion-medium) var(--motion-ease-out) both;
  animation-delay: var(--motion-stagger);
}

.attack-pair {
  animation: none;
}

.attack-pair.motion-pair-enter {
  animation: durakPairEnter var(--motion-slow) var(--motion-ease-out) both;
  animation-delay: var(--motion-stagger);
}

.attack-pair.motion-pair-defended {
  animation-name: durakPairDefended;
}

.card.motion-card-table-new {
  animation: durakCardGlow var(--motion-slow) ease both;
}

.hand-slot.motion-slot-enter {
  animation: durakSlotDeal var(--motion-slow) var(--motion-ease-out) both;
  animation-delay: var(--motion-stagger);
}

.card.motion-hand-enter {
  animation: durakCardGlow var(--motion-slow) ease both;
  animation-delay: var(--motion-stagger);
}

.card.motion-card-submit-attack {
  pointer-events: none;
  animation: durakCardSubmitAttack 260ms var(--motion-ease-in) both;
}

.card.motion-card-submit-defense {
  pointer-events: none;
  animation: durakCardSubmitDefense 260ms var(--motion-ease-in) both;
}

.card.card-selectable:not(:disabled):hover,
.hand-picker-card:hover .card {
  filter: brightness(1.04) saturate(1.04);
}

.card.selected {
  animation: durakCardSelectedPulse 1.4s ease-in-out infinite;
}

.game-log[open] .log-list {
  animation: durakLogOpen var(--motion-medium) var(--motion-ease-out) both;
}

.toast.visible {
  animation: durakToastIn var(--motion-medium) var(--motion-ease-out) both;
}

.toast:not(.visible) {
  animation: durakToastOut var(--motion-fast) ease both;
}

@keyframes durakScreenEnter {
  from { opacity: 0; translate: 0 8px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes durakGameEnter {
  from { opacity: 0; scale: 1.015; filter: saturate(0.92); }
  to { opacity: 1; scale: 1; filter: saturate(1); }
}

@keyframes durakPanelLift {
  from { opacity: 0; translate: 0 10px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes durakListItemIn {
  from { opacity: 0; translate: 0 8px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes durakNavActive {
  0% { scale: 0.96; }
  60% { scale: 1.035; }
  100% { scale: 1; }
}

@keyframes durakOverlayIn {
  from { opacity: 0; backdrop-filter: blur(0); }
  to { opacity: 1; backdrop-filter: blur(10px); }
}

@keyframes durakOverlayOut {
  from { opacity: 1; backdrop-filter: blur(10px); }
  to { opacity: 0; backdrop-filter: blur(0); }
}

@keyframes durakModalIn {
  from { opacity: 0; translate: 0 14px; scale: 0.96; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}

@keyframes durakModalOut {
  from { opacity: 1; translate: 0 0; scale: 1; }
  to { opacity: 0; translate: 0 10px; scale: 0.98; }
}

@keyframes durakSheetIn {
  from { opacity: 0; translate: 0 100%; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes durakSheetOut {
  from { opacity: 1; translate: 0 0; }
  to { opacity: 0; translate: 0 100%; }
}

@keyframes durakPickerCardIn {
  from { opacity: 0; translate: 0 12px; scale: 0.96; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}

@keyframes durakPairEnter {
  0% { opacity: 0; translate: -18px 22px; scale: 0.94; filter: blur(1px) saturate(0.9); }
  68% { opacity: 1; translate: 2px -2px; scale: 1.02; filter: blur(0) saturate(1.06); }
  100% { opacity: 1; translate: 0 0; scale: 1; filter: none; }
}

@keyframes durakPairDefended {
  0% { opacity: 0; translate: 18px -18px; scale: 0.94; filter: blur(1px) saturate(0.9); }
  68% { opacity: 1; translate: -2px 1px; scale: 1.02; filter: blur(0) saturate(1.06); }
  100% { opacity: 1; translate: 0 0; scale: 1; filter: none; }
}

@keyframes durakSlotDeal {
  0% { opacity: 0; translate: 0 22px; scale: 0.94; }
  70% { opacity: 1; translate: 0 -3px; scale: 1.015; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}

@keyframes durakCardGlow {
  0% { filter: brightness(1.18) saturate(1.12); }
  100% { filter: none; }
}

@keyframes durakCardSubmitAttack {
  0% { opacity: 1; translate: 0 0; filter: brightness(1.05); }
  72% { opacity: 0.54; translate: 0 -30px; filter: brightness(1.18) saturate(1.08); }
  100% { opacity: 0.18; translate: 0 -38px; filter: brightness(1.22) saturate(1.12); }
}

@keyframes durakCardSubmitDefense {
  0% { opacity: 1; translate: 0 0; filter: brightness(1.05); }
  72% { opacity: 0.58; translate: 14px -28px; filter: brightness(1.18) saturate(1.08); }
  100% { opacity: 0.18; translate: 18px -36px; filter: brightness(1.22) saturate(1.12); }
}

@keyframes durakCardSelectedPulse {
  0%, 100% { filter: saturate(1.08) drop-shadow(0 0 0 rgba(245, 207, 122, 0)); }
  50% { filter: saturate(1.12) drop-shadow(0 0 10px rgba(245, 207, 122, 0.2)); }
}

@keyframes durakLogOpen {
  from { opacity: 0; translate: 0 8px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes durakToastIn {
  from { opacity: 0; translate: 0 18px; scale: 0.98; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}

@keyframes durakToastOut {
  from { opacity: 1; translate: 0 0; }
  to { opacity: 0; translate: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .settings-overlay.is-closing,
  .result-overlay.is-closing,
  .inactive-screen.is-closing,
  .hand-overlay.is-closing {
    display: none !important;
  }
}
