/* src/theme/tokens.css */
/* --col-w: the one column width every screen lines up with (bottom bar, top bar, pages, panels, game tables).
   Phones: full width (each piece keeps its own 8px edge gap). Tablet (700px+): 650px. PC (1100px+): 800px. */
@media (min-width: 700px) {
  :root {
    --col-w: min(650px, calc(100vw - 32px));
  }
}

@media (min-width: 1100px) {
  :root {
    --col-w: min(800px, calc(100vw - 32px));
  }
}

:root {
  --topbar-h: 56px;
  --bottombar-h: 70px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --vvh: 100dvh;
  --vvt: 0px;

  /* Slightly rounded on every corner: crisp, but not razor-sharp. */
  --r-sm: 5px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-pill: 8px;

  --z-content: 1;
  --z-chrome: 20;
  --z-overlay: 40;
  --z-modal: 60;
  --z-emote: 80;

  --dur-fast: 220ms;
  --dur-med: 320ms;
  --dur-slow: 460ms;
  --ease-smooth: cubic-bezier(0.22, 0.85, 0.32, 1);
  --ease-out: cubic-bezier(0.2, 0.9, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.48, 0.5, 1);

  --bg: #e9efeb;
  --surface: #fbfdfb;
  --surface-elevated: #ffffff;
  --fg: #12231a;
  --fg-muted: #566a5e;
  --line: #c6d4ca;
  --track: #d9e4dc;
  --border: #c6d4ca;
  --tap-min: 44px;
  --accent: #1c7647;
  --accent-on: #ffffff;
  --secondary: #2a5dc2;
  --secondary-on: #ffffff;
  --danger: #c0392d;
  --danger-on: #ffffff;
  --p1: #c0392d;
  --p2: #2a5dc2;
  --win: #1c7647;
  --glass-bg: rgba(251, 253, 251, 0.88);
  --glass-border: rgba(198, 212, 202, 0.85);
  --card-felt: #195237;
  --card-edge: #c6d4ca;
  --focus-ring: #1c7647;
  --el-1: 0 1px 0 rgba(18, 35, 26, 0.08), 0 1px 3px rgba(18, 35, 26, 0.12);
  --el-2: 0 1px 2px rgba(18, 35, 26, 0.14), 0 3px 8px rgba(18, 35, 26, 0.12);
  --el-3: 0 2px 4px rgba(18, 35, 26, 0.18), 0 6px 14px rgba(18, 35, 26, 0.18);
  --shadow-soft: var(--el-1);

  --font-display: "Bricolage Grotesque", system-ui, -apple-system, sans-serif;
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-reduced-motion="true"] {
  --dur-fast: 0ms;
  --dur-med: 0ms;
  --dur-slow: 0ms;
}

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

html,
body,
#root {
  margin: 0;
  padding: 0;
  width: 100%;
  height: var(--vvh, 100dvh);
  overflow: hidden;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  /* no double-tap-to-zoom on buttons: quick taps (bid keys, Draw, card buttons) register at once on phones */
  touch-action: manipulation;
}

/* a downward swipe at the top of a page or table never triggers the phone's pull-to-refresh (which reloaded the
   game in the middle of a hand) */
html,
body {
  overscroll-behavior: none;
}

/* turning the phone sideways never blows the text up (iOS/Android font boosting) */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* selected text in the theme's own colour */
::selection {
  background: color-mix(in srgb, var(--accent) 32%, transparent);
  color: inherit;
}

/* a long press on a button, picture or card never selects its text, pops the "copy / save image" menu or starts
   dragging a ghost picture; typing fields still select normally */
button,
img,
svg {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

img {
  -webkit-user-drag: none;
}

[data-layout-mode="table"] main {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* Touch screens */
@media (hover: none) and (pointer: coarse) {
  /* iPhones zoom the whole page in when you tap a text box smaller than 16px (chat, names, codes): never again */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  textarea,
  select {
    font-size: max(16px, 1em) !important;
  }

  /* buttons sink a touch when pressed, so a tap visibly lands ("scale" adds to any transform a button already has) */
  button:where(:not(:disabled)) {
    transition: scale 90ms ease-out;
  }

  button:where(:not(:disabled)):active {
    scale: 0.96;
  }
}

:focus-visible {
  outline: 2px solid var(--focus-ring, var(--accent));
  outline-offset: 2px;
}

/* #148 App Check (reCAPTCHA Enterprise) runs invisibly: hide Google's floating corner badge. The required
   "protected by reCAPTCHA" notice is on the privacy page instead. */
.grecaptcha-badge {
  visibility: hidden !important;
}

/* src/cosmetics/Card.module.css */
._card_hwcx8_1 {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  border: 1px solid #d9d4c7;
  background: #fbfaf6;
  color: #1a1d1f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 2px 6px rgba(18, 35, 26, 0.14),
    0 6px 14px rgba(18, 35, 26, 0.08);
  padding: 2px;
  user-select: none;
  overflow: hidden;
  flex-shrink: 0;
  transition:
    transform var(--dur-med) var(--ease-smooth),
    box-shadow var(--dur-med) var(--ease-smooth),
    border-color var(--dur-fast) ease,
    filter var(--dur-med) ease,
    opacity var(--dur-med) ease;
}

[data-theme-mode="dark"] ._card_hwcx8_1:not([data-custom-deck="true"]) {
  border-color: var(--card-edge, #d9d4c7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 3px 8px rgba(0, 0, 0, 0.36),
    0 8px 18px rgba(0, 0, 0, 0.2);
}

button._card_hwcx8_1 {
  cursor: pointer;
}

button._card_hwcx8_1:active:not(:disabled) {
  transform: scale(0.965);
  transition-duration: 120ms;
}

._xs_hwcx8_44 {
  width: calc(42px * var(--card-scale, 1));
  height: calc(58px * var(--card-scale, 1));
  border-radius: 2px;
  --rank-size: calc(16px * var(--card-scale, 1));
  --suit-size: calc(15px * var(--card-scale, 1));
  --fan-rank-size: calc(13px * var(--card-scale, 1));
  --fan-suit-size: calc(12px * var(--card-scale, 1));
  --watermark-size: calc(20px * var(--card-scale, 1));
}

._sm_hwcx8_55 {
  width: calc(52px * var(--card-scale, 1));
  height: calc(72px * var(--card-scale, 1));
  border-radius: 3px;
  --rank-size: calc(20px * var(--card-scale, 1));
  --suit-size: calc(18px * var(--card-scale, 1));
  --fan-rank-size: calc(16px * var(--card-scale, 1));
  --fan-suit-size: calc(14px * var(--card-scale, 1));
  --watermark-size: calc(26px * var(--card-scale, 1));
}

._md_hwcx8_66 {
  width: calc(64px * var(--card-scale, 1));
  height: calc(90px * var(--card-scale, 1));
  border-radius: 3px;
  --rank-size: calc(25px * var(--card-scale, 1));
  --suit-size: calc(22px * var(--card-scale, 1));
  --fan-rank-size: calc(19px * var(--card-scale, 1));
  --fan-suit-size: calc(16px * var(--card-scale, 1));
  --watermark-size: calc(32px * var(--card-scale, 1));
}

._lg_hwcx8_77 {
  width: calc(78px * var(--card-scale, 1));
  height: calc(110px * var(--card-scale, 1));
  border-radius: 3px;
  --rank-size: calc(30px * var(--card-scale, 1));
  --suit-size: calc(26px * var(--card-scale, 1));
  --fan-rank-size: calc(22px * var(--card-scale, 1));
  --fan-suit-size: calc(19px * var(--card-scale, 1));
  --watermark-size: calc(38px * var(--card-scale, 1));
}

._stacked_hwcx8_88 {
  box-shadow:
    2px 2px 0 #ebe6d8,
    3px 3px 0 rgba(18, 35, 26, 0.16),
    0 5px 12px rgba(18, 35, 26, 0.18);
}

._fanned_hwcx8_95 {
  justify-content: flex-start;
  align-items: stretch;
  padding: 4px 5px 3px;
}

._selected_hwcx8_101 {
  border-color: var(--accent);
  box-shadow:
    0 0 0 2.5px var(--accent),
    0 0 0 5px color-mix(in srgb, var(--accent) 26%, transparent),
    0 10px 22px rgba(18, 35, 26, 0.28);
}

._disabled_hwcx8_109 {
  filter: grayscale(0.72) brightness(0.78);
  opacity: 0.56;
  cursor: default;
}

._red_hwcx8_115 {
  color: #c82333;
}

._black_hwcx8_119 {
  color: #1a1d1f;
}

/* Built-in deck themes */
._deck_parchment_hwcx8_124 {
  background: linear-gradient(165deg, #fbf3df 0%, #efe0be 100%);
  border-color: #b89c72;
  --deck-font: Georgia, "Times New Roman", serif;
}

._deck_parchment_hwcx8_124._red_hwcx8_115 {
  color: #a62b1f;
}

._deck_parchment_hwcx8_124._black_hwcx8_119 {
  color: #2f2116;
}

._deck_midnight_hwcx8_138 {
  background: linear-gradient(165deg, #1a2640 0%, #0b101d 100%);
  border-color: #4c638c;
  --deck-font: Georgia, "Times New Roman", serif;
  box-shadow:
    inset 0 1px 0 rgba(191, 219, 254, 0.14),
    0 3px 10px rgba(0, 0, 0, 0.45);
}

._deck_midnight_hwcx8_138._red_hwcx8_115 {
  color: #fb7185;
}

._deck_midnight_hwcx8_138._black_hwcx8_119 {
  color: #f8fafc;
}

._deck_neon_hwcx8_155 {
  background:
    linear-gradient(rgba(46, 242, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 63, 180, 0.08) 1px, transparent 1px),
    linear-gradient(165deg, #130d2e 0%, #060412 100%);
  background-size: 10px 10px, 10px 10px, 100% 100%;
  border-color: #2ef2ff;
  --deck-font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow:
    0 0 10px rgba(46, 242, 255, 0.36),
    inset 0 0 8px rgba(46, 242, 255, 0.16);
}

._deck_neon_hwcx8_155._red_hwcx8_115 {
  color: #ff4ec4;
  text-shadow: 0 0 6px rgba(255, 78, 196, 0.45);
}

._deck_neon_hwcx8_155._black_hwcx8_119 {
  color: #3df4ff;
  text-shadow: 0 0 6px rgba(61, 244, 255, 0.45);
}

._deck_mint_hwcx8_178 {
  background: linear-gradient(165deg, #f0fdf7 0%, #d8f5e8 100%);
  border-color: #7db899;
}

._deck_mint_hwcx8_178._red_hwcx8_115 {
  color: #b91c1c;
}

._deck_mint_hwcx8_178._black_hwcx8_119 {
  color: #064e3b;
}

._deck_sky_hwcx8_191 {
  background: linear-gradient(165deg, #16447a 0%, #0d2c54 100%);
  border-color: #60a5fa;
  --deck-font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow:
    inset 0 1px 0 rgba(191, 219, 254, 0.16),
    0 3px 9px rgba(10, 28, 60, 0.35);
}

._deck_sky_hwcx8_191._red_hwcx8_115 {
  color: #ff9ea8;
}

._deck_sky_hwcx8_191._black_hwcx8_119 {
  color: #f0f7ff;
}

._deck_linen_hwcx8_208 {
  background: linear-gradient(165deg, #f5e7cf 0%, #e5cca6 100%);
  border-color: #a87c4f;
  --deck-font: Georgia, "Times New Roman", serif;
}

._deck_linen_hwcx8_208._red_hwcx8_115 {
  color: #a62b1c;
}

._deck_linen_hwcx8_208._black_hwcx8_119 {
  color: #38210f;
}

._deck_blush_hwcx8_222 {
  background: linear-gradient(165deg, #fff7f9 0%, #ffe1e8 100%);
  border-color: #e89cb0;
  --deck-font: Georgia, "Times New Roman", serif;
}

._deck_blush_hwcx8_222._red_hwcx8_115 {
  color: #c81e4a;
}

._deck_blush_hwcx8_222._black_hwcx8_119 {
  color: #4a1d2c;
}

._deck_slate_hwcx8_236 {
  background: linear-gradient(165deg, #f7f6f2 0%, #eae7df 100%);
  border-color: #52525b;
  --deck-font: Georgia, "Times New Roman", serif;
  box-shadow: 0 2px 6px rgba(24, 24, 27, 0.14);
}

._deck_slate_hwcx8_236._red_hwcx8_115 {
  color: #b91c1c;
}

._deck_slate_hwcx8_236._black_hwcx8_119 {
  color: #18181b;
}

._deck_ocean_hwcx8_251 {
  background:
    radial-gradient(circle at 80% 18%, rgba(94, 234, 212, 0.16), transparent 55%),
    linear-gradient(165deg, #0f5264 0%, #072832 100%);
  border-color: #38b2ac;
  box-shadow:
    inset 0 1px 0 rgba(153, 246, 228, 0.16),
    0 3px 10px rgba(7, 40, 50, 0.42);
}

._deck_ocean_hwcx8_251._red_hwcx8_115 {
  color: #ff8fa3;
}

._deck_ocean_hwcx8_251._black_hwcx8_119 {
  color: #e6fffb;
}

._deck_gilded_hwcx8_269 {
  background:
    radial-gradient(circle at 50% 0%, rgba(253, 224, 71, 0.2), transparent 65%),
    linear-gradient(165deg, #fffef8 0%, #f5e6be 100%);
  border-color: #c99212;
  --deck-font: Georgia, "Times New Roman", serif;
  box-shadow:
    0 0 10px rgba(212, 160, 23, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

._deck_gilded_hwcx8_269::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.55) 45%,
    rgba(253, 224, 71, 0.3) 52%,
    transparent 70%
  );
  transform: translateX(-110%);
  animation: _foilSweep_hwcx8_1 5.5s ease-in-out infinite;
}

._deck_gilded_hwcx8_269._red_hwcx8_115 {
  color: #9a1136;
}

._deck_gilded_hwcx8_269._black_hwcx8_119 {
  color: #181512;
}

._deckArt_hwcx8_304 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Editorial centered face (standard cribbage/table pile/cut) */
._faceCenter_hwcx8_314 {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 0.94;
  text-align: center;
}

._faceRank_hwcx8_326 {
  font-family: var(--deck-font, var(--font-display, var(--font-sans)));
  font-size: var(--rank-size);
  font-weight: 800;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

._faceSuit_hwcx8_334 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--suit-size);
  line-height: 1;
}

/* Fanned top-band layout so overlapping cards remain 100% readable */
._fanHead_hwcx8_343 {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 0.96;
  font-family: var(--deck-font, var(--font-display, var(--font-sans)));
  font-weight: 800;
  letter-spacing: -0.05em;
}

._fanRank_hwcx8_355 {
  font-size: var(--fan-rank-size);
}

._fanSuit_hwcx8_359 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fan-suit-size);
  line-height: 1;
}

._fanWatermark_hwcx8_367 {
  position: relative;
  z-index: 1;
  margin-top: auto;
  margin-bottom: auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--watermark-size);
  line-height: 1;
  opacity: 0.9;
}

._faceSprite_hwcx8_381 {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
}

/* Card backs */
._faceDown_hwcx8_388 {
  padding: 1.5px;
  background: #fbfaf6;
}

._xs_hwcx8_44._faceDown_hwcx8_388 {
  padding: 1px;
}

._backPattern_hwcx8_397 {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  border: none;
  box-shadow: inset 0 0 0 0.75px rgba(0, 0, 0, 0.18);
}

._backArt_hwcx8_407 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

._back_lattice_hwcx8_415 {
  background-color: #9e2a20;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 64%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.22) 0 1.5px, transparent 1.5px 6px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.22) 0 1.5px, transparent 1.5px 6px);
}

._back_diamond_hwcx8_423 {
  background:
    radial-gradient(circle at 50% 50%, #e5b53b 0 18%, rgba(229, 181, 59, 0.22) 22%, transparent 25%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0 2px, transparent 2px 8px),
    linear-gradient(145deg, #2151a8 0%, #102a5c 100%);
  box-shadow: inset 0 0 0 1px rgba(253, 224, 71, 0.65);
}

._back_stripes_hwcx8_431 {
  background-color: #0e4a25;
  background-image:
    repeating-linear-gradient(45deg, rgba(134, 239, 172, 0.2) 0 1.2px, transparent 1.2px 9px),
    repeating-linear-gradient(-45deg, rgba(134, 239, 172, 0.2) 0 1.2px, transparent 1.2px 9px),
    radial-gradient(circle at 50% 35%, #166534 0%, #0a361a 90%);
  box-shadow: inset 0 0 0 1.2px rgba(212, 160, 23, 0.78);
}

._back_starburst_hwcx8_440 {
  background:
    radial-gradient(circle at 50% 50%, rgba(245, 208, 254, 0.35) 0 18%, rgba(168, 85, 247, 0.45) 45%, #1e1b4b 88%),
    linear-gradient(145deg, #2e1065 0%, #4c1d95 55%, #0f172a 100%);
  box-shadow: inset 0 0 0 1.2px rgba(192, 132, 252, 0.72);
}

._back_starburst_hwcx8_440::after,
._back_constellation_hwcx8_448::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    transparent 26%,
    rgba(224, 231, 255, 0.22) 48%,
    rgba(34, 211, 238, 0.16) 52%,
    transparent 72%
  );
  transform: translateX(-115%);
  animation: _foilSweep_hwcx8_1 6.2s ease-in-out infinite;
}

._back_deco_hwcx8_464 {
  background:
    radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.22) 0 46%, transparent 72%),
    linear-gradient(160deg, #12100e 0%, #241e18 55%, #12100e 100%);
  box-shadow: inset 0 0 0 1.5px #f59e0b;
}

._back_deco_hwcx8_464::after,
._backCrest_hwcx8_472::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    transparent 24%,
    rgba(253, 224, 71, 0.28) 48%,
    rgba(255, 255, 255, 0.25) 52%,
    transparent 74%
  );
  transform: translateX(-115%);
  animation: _foilSweep_hwcx8_1 5s ease-in-out infinite;
}

@keyframes _foilSweep_hwcx8_1 {
  0%, 45% { transform: translateX(-115%); }
  75%, 100% { transform: translateX(115%); }
}

._back_plaid_hwcx8_493 {
  background-color: #7f1d1d;
  background-image:
    repeating-linear-gradient(0deg, rgba(20, 83, 45, 0.7) 0 5px, transparent 5px 12px),
    repeating-linear-gradient(90deg, rgba(20, 83, 45, 0.7) 0 5px, transparent 5px 12px),
    repeating-linear-gradient(0deg, transparent 0 8px, rgba(250, 204, 21, 0.55) 8px 9px, transparent 9px 12px),
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(250, 204, 21, 0.55) 8px 9px, transparent 9px 12px);
}

._back_dots_hwcx8_502 {
  background: linear-gradient(155deg, #0d5c63 0%, #083d42 100%);
}

._back_chevron_hwcx8_506 {
  background: linear-gradient(155deg, #1a366e 0%, #0f2045 100%);
}

._back_checker_hwcx8_510 {
  background: linear-gradient(155deg, #1b1d26 0%, #0e1017 100%);
}

._back_waves_hwcx8_514 {
  background: linear-gradient(160deg, #0f766e 0%, #084842 100%);
}

._back_honeycomb_hwcx8_518 {
  background:
    radial-gradient(circle at 50% 45%, #d97706 0%, #78350f 88%);
  box-shadow: inset 0 0 0 1.2px #fcd34d;
}

._back_constellation_hwcx8_448 {
  background:
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.4) 0 32%, transparent 72%),
    linear-gradient(160deg, #0b1026 0%, #1e1b4b 100%);
  box-shadow: inset 0 0 0 1.2px rgba(250, 204, 21, 0.72);
}

._backCrest_hwcx8_472 {
  background:
    radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.25) 0 28%, transparent 55%),
    linear-gradient(145deg, #1e1b4b 0%, #312e81 55%, #1e1b4b 100%);
  box-shadow: inset 0 0 0 1.5px #fbbf24;
}

._backImg_hwcx8_538 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

._faceDownBleed_hwcx8_546 {
  padding: 0;
}

._faceDownBleed_hwcx8_546 ._backImg_hwcx8_538 {
  border-radius: 0;
}

[data-reduced-motion="true"] ._card_hwcx8_1 {
  transition: none;
}

[data-reduced-motion="true"] ._deck_gilded_hwcx8_269::after,
[data-reduced-motion="true"] ._back_starburst_hwcx8_440::after,
[data-reduced-motion="true"] ._back_constellation_hwcx8_448::after,
[data-reduced-motion="true"] ._back_deco_hwcx8_464::after,
[data-reduced-motion="true"] ._backCrest_hwcx8_472::after {
  animation: none;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  ._deck_gilded_hwcx8_269::after,
  ._back_starburst_hwcx8_440::after,
  ._back_constellation_hwcx8_448::after,
  ._back_deco_hwcx8_464::after,
  ._backCrest_hwcx8_472::after {
    animation: none;
    opacity: 0;
  }
}

/* src/social/rules/pictures.css */
/* Still pictures on the rules pages (see pictures.tsx). Plain CSS with an "rk-" prefix. Loaded only with the
   rules guide. */

.rk-pic {
  position: relative;
  flex-shrink: 0;
  height: 128px;
  border-radius: var(--r-md);
  background: var(--card-felt, #1d5c3f);
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  color: #fff;
}

.rk-pic-short {
  height: 96px;
}

/* roomier phones, tablets and PCs: bigger cards in a taller picture */
@media (min-width: 370px) and (min-height: 740px) {
  .rk-pic {
    height: 158px;
    --card-scale: 1.2;
  }

  .rk-pic-short {
    height: 110px;
  }
}

.rk-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
}

.rk-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rk-card {
  border-radius: 6px;
}

.rk-hl > :first-child {
  box-shadow: 0 0 0 3px #facc15, 0 4px 10px rgba(0, 0, 0, 0.35);
}

.rk-row {
  gap: 6px;
}

.rk-tight {
  gap: 0;
}

.rk-tight > .rk-item + .rk-item {
  margin-left: calc(-17px * var(--card-scale, 1));
}

.rk-col {
  flex-direction: column;
  gap: 5px;
}

.rk-col .rk-tag {
  padding: 3px 9px;
  font-size: 13px;
}

.rk-layer {
  display: inline-grid;
}

.rk-layer > * {
  grid-area: 1 / 1;
}

.rk-group {
  flex-direction: column;
  gap: 4px;
}

.rk-group-body {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rk-cap {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.rk-op {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  min-width: 14px;
}

.rk-tag {
  padding: 5px 10px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.rk-tag-good {
  background: #16a34a;
  color: #fff;
}

.rk-tag-bad {
  background: #dc2626;
  color: #fff;
}

.rk-tag-plain {
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
}

.rk-tag-gold {
  background: #facc15;
  color: #422006;
}

.rk-mark {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  border: 2px solid #fff;
  z-index: 2;
}

.rk-mark-ok {
  background: #16a34a;
}

.rk-mark-no {
  background: #dc2626;
}

.rk-slot {
  box-sizing: border-box;
  width: calc(42px * var(--card-scale, 1));
  height: calc(58px * var(--card-scale, 1));
  border-radius: 6px;
  border: 2px dashed rgba(255, 255, 255, 0.45);
}

.rk-slot-big {
  width: 52px;
  height: 72px;
}

.rk-bubble {
  padding: 6px 10px;
  border-radius: 14px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.rk-seat {
  flex-direction: column;
  gap: 3px;
}

.rk-seat-face {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.rk-seat-hl .rk-seat-face {
  box-shadow: 0 0 0 3px #facc15;
}

.rk-die {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.rk-num {
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: #1f2937;
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

/* fact pills inside the slide text */
.rk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rk-chip {
  padding: 4px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  font-size: 12px;
  font-weight: 800;
}

/* ---- Backgammon strip ---- */
.rk-bg-strip {
  display: inline-flex;
  align-items: flex-start;
  gap: 3px;
  padding: 0 4px;
  height: 84px;
}

.rk-bg-point {
  position: relative;
  width: 28px;
  height: 84px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding-top: 2px;
}

.rk-bg-point::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: rgba(255, 255, 255, 0.22);
}

.rk-bg-point:nth-child(even)::before {
  background: rgba(0, 0, 0, 0.28);
}

.rk-bg-checker {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.45);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35);
}

.rk-bg-light {
  background: #f5efe0;
}

.rk-bg-dark {
  background: #7f1d1d;
  border-color: #fca5a5;
}

.rk-bg-bar {
  width: 30px;
  height: 84px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.rk-bg-bar .rk-cap {
  font-size: 10px;
}

/* deck with the trump card crosswise under it */
.rk-deck-trump {
  margin-right: calc(30px * var(--card-scale, 1));
}

.rk-trump-under {
  display: inline-flex;
  transform: translateX(calc(30px * var(--card-scale, 1))) rotate(90deg);
}


/* a card that has been played / is gone / may not be played */
.rk-faded {
  opacity: 0.38;
}

/* a card being picked */
.rk-raised {
  transform: translateY(-6px);
}

/* src/seo/gamePage.css */
/* The Google game pages (/durak, …), built by scripts/build-game-pages.mjs. Plain CSS with a "gp-" prefix.
   Never loaded by the app. tokens.css is loaded first; the app locks the page height, a page here scrolls. */

html,
body {
  height: auto;
  min-height: 100%;
  overflow: visible;
  overscroll-behavior: auto;
}

.gp-page {
  /* the same game colours as the Home cards (HomeScreen.module.css .gStack) */
  --card-m: var(--accent);
  --card-c: var(--secondary);
  --card-p: color-mix(in srgb, #c9a227 70%, var(--accent));
  --card-s: color-mix(in srgb, #c0392d 70%, var(--accent));
  --card-t: color-mix(in srgb, #7b2d8b 70%, var(--accent));
  --card-k: color-mix(in srgb, #0e7c86 75%, var(--accent));
  --card-b: color-mix(in srgb, #8b5a2b 75%, var(--accent));
  --card-z: color-mix(in srgb, #b8860b 75%, var(--accent));
  --card-d: color-mix(in srgb, #c2410c 75%, var(--accent));
  --card-g: color-mix(in srgb, #3f8f2f 75%, var(--accent));
  --card-n: color-mix(in srgb, #2f7d3a 75%, var(--accent));
  --card-f: color-mix(in srgb, #7b4bc4 75%, var(--accent));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.gp-top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(8px + var(--safe-top)) 16px 8px;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.gp-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap-min);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.gp-logo {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--accent-on);
  font-size: 18px;
}

.gp-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-on);
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--el-2);
}

.gp-play:hover {
  filter: brightness(1.08);
}

.gp-play-big {
  min-height: 56px;
  padding: 0 36px;
  font-size: 20px;
  font-family: var(--font-display);
}

.gp-main {
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gp-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--el-1);
}

@media (min-width: 700px) {
  .gp-hero {
    grid-template-columns: 240px 1fr;
    gap: 24px;
    padding: 24px;
  }
}

.gp-art svg {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  margin: 0 auto;
}

.gp-hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.gp-page h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 6vw, 36px);
  line-height: 1.1;
}

.gp-intro {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}

.gp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gp-chips li {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--track);
  font-size: 14px;
  font-weight: 700;
}

.gp-hint {
  margin: 0;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.4;
}

.gp-h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
}

.gp-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gp-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

.gp-step .rk-pic {
  height: 140px;
  --card-scale: 1.1;
}

.gp-step .rk-pic-short {
  height: 100px;
}

.gp-step-text h3 {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  line-height: 1.2;
}

.gp-step-no {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-on);
  font-size: 14px;
}

.gp-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 16px;
  line-height: 1.5;
}

.gp-body p {
  margin: 0;
}

.gp-body ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.gp-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-radius: var(--r-lg);
  background: var(--card-felt);
  color: #fff;
  text-align: center;
}

.gp-cta .gp-h2 {
  margin: 0;
}

.gp-more ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.gp-more a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: var(--tap-min);
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
}

.gp-more a:hover {
  border-color: var(--accent);
}

.gp-more a span {
  color: var(--fg-muted);
  font-size: 14px;
}

.gp-foot {
  padding: 16px 16px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 14px;
  text-align: center;
}

.gp-foot a {
  color: var(--fg);
  font-weight: 700;
}

.gp-top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gp-top-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 10px;
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.gp-top-link:hover {
  text-decoration: underline;
}

/* narrow phones: the brand name gives way so "All games" + Play now fit */
@media (max-width: 420px) {
  .gp-brand {
    font-size: 0;
    gap: 0;
  }
}

.gp-chips li.gp-live {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: var(--accent);
}

.gp-chips li.gp-live::before {
  content: "● ";
}

.gp-chips li[hidden] {
  display: none;
}

.gp-hub-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gp-hub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gp-hub-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--el-1);
}

.gp-hub-art svg {
  display: block;
  width: 100%;
  height: auto;
}

.gp-hub-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.gp-hub-text h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
}

.gp-hub-text h2 a {
  color: var(--fg);
  text-decoration: none;
}

.gp-hub-text p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 15px;
}

.gp-hub-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gp-hub-actions {
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .gp-hub-card {
    grid-template-columns: 84px 1fr;
    gap: 10px;
    padding: 10px;
  }
}
