/* Pachis + Ashta Chamma — festive embroidered cloth. No green. */
:root {
  --maroon: #7A1C1C;
  --maroon-deep: #4A1010;
  --ruby: #C41E3A;
  --navy: #1E3A5F;
  --cobalt: #1D4ED8;
  --saffron: #F59E0B;
  --marigold: #F5C542;
  --plum: #A21CAF;
  --violet: #6B21A8;
  --gold: #C99A3B;
  --gold-soft: #F5C542;
  --ivory: #FAF3E3;
  --parchment: #F8E9C8;
  --cloth: #F3D9A8;
  --ink: #231B16;
  --ink-soft: #5A4638;
  --stroke: #8A6A32;
  --rose: #F8D5D8;
  --ad-space: var(--sum-ad-bar-space, 64px);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(35, 27, 22, 0.16);
  font-size: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--ivory); }

body {
  font-family: "Source Sans 3", "Noto Sans Telugu", "Noto Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(196, 30, 58, 0.16), transparent 52%),
    radial-gradient(ellipse at 88% 8%, rgba(29, 78, 216, 0.13), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(245, 158, 11, 0.16), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(162, 28, 175, 0.10), transparent 50%),
    repeating-linear-gradient(45deg, rgba(201,154,59,0.08) 0 2px, transparent 2px 11px),
    repeating-linear-gradient(-45deg, rgba(196,30,58,0.05) 0 1px, transparent 1px 13px),
    #FBEFE0;
  padding-bottom: calc(var(--ad-space) + 24px);
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
input[type="text"] {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: #FFFDF8;
  color: var(--ink);
}

h1, h2, h3, .brand, .card-title, .win-title, .result-value {
  font-family: "Cormorant Garamond", "Noto Serif", "Noto Sans Telugu", Georgia, serif;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--ivory);
  background:
    radial-gradient(circle at 8% 50%, rgba(245, 197, 66, 0.4) 0 8px, transparent 9px),
    radial-gradient(circle at 92% 50%, rgba(244, 114, 182, 0.35) 0 8px, transparent 9px),
    repeating-linear-gradient(90deg, rgba(245,197,66,0.14) 0 10px, transparent 10px 22px),
    linear-gradient(90deg, #9F1239 0%, #7A1C1C 28%, #6B21A8 62%, #1E3A5F 100%);
  border-bottom: 3px solid var(--marigold);
  box-shadow: 0 4px 18px rgba(35, 27, 22, 0.3);
}

.brand {
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 0;
  flex: 1;
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(35, 27, 22, 0.3);
}
.brand small {
  display: block;
  font-family: "Source Sans 3", "Noto Sans Telugu", sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.9;
  margin-top: 1px;
}

.header-actions { display: flex; gap: 6px; align-items: center; }

.icon-btn, .lang-toggle {
  border: 1px solid rgba(245, 197, 66, 0.75);
  background: rgba(250, 243, 227, 0.14);
  color: var(--ivory);
  border-radius: 999px;
  padding: 6px 10px;
  min-height: 36px;
  min-width: 36px;
}
.icon-btn:hover, .lang-toggle:hover, .icon-btn[aria-pressed="true"] {
  background: rgba(245, 197, 66, 0.32);
}

.lang-toggle { font-weight: 650; letter-spacing: 0.02em; }
@media (max-width: 700px) {
  .brand small { display: none; }
  .app-header { padding: 8px 10px; }
  .icon-btn, .lang-toggle { padding: 6px 9px; font-size: 0.86rem; }
}

.screen { display: none; max-width: 1100px; margin: 0 auto; padding: 18px 16px 32px; }
.screen.active { display: block; }

.hero-lead {
  text-align: center;
  margin: 6px 0 22px;
  color: var(--maroon-deep);
  font-size: 1.08rem;
  font-weight: 550;
}

.game-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) {
  .game-cards { grid-template-columns: 1fr 1fr; }
}

.game-card {
  background: linear-gradient(180deg, #FFF9EE, var(--parchment));
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.game-card:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(35,27,22,0.18); }
.game-card.card-pachis {
  background: linear-gradient(165deg, #FFF8EC 0%, #FDE8C8 45%, #F8D0C6 100%);
  border-color: var(--ruby);
  box-shadow: 0 0 0 3px var(--marigold), 0 12px 28px rgba(122, 28, 28, 0.18);
}
.game-card.card-ashta {
  background: linear-gradient(165deg, #F7F3FF 0%, #E4E9FF 45%, #F3E0F6 100%);
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px var(--marigold), 0 12px 28px rgba(30, 58, 95, 0.18);
}
.game-card.card-pachis .card-title { color: var(--ruby); }
.game-card.card-ashta .card-title { color: var(--cobalt); }
.game-card .thumb {
  width: 100%;
  height: 132px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--marigold);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 246, 0.4);
}
.game-card .thumb svg { width: 100%; height: 100%; display: block; }
.card-title { margin: 0; font-size: 1.7rem; color: var(--maroon); }
.game-card p { margin: 0; color: var(--ink-soft); line-height: 1.45; }
.game-card .cta { margin-top: 4px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--ruby);
  background: linear-gradient(180deg, #E11D48, var(--ruby));
  color: var(--ivory);
  padding: 10px 18px;
  min-height: 44px;
  font-weight: 650;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 0 var(--maroon-deep);
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.btn.gold {
  background: linear-gradient(180deg, #FFE08A, #F5C542 45%, #C99A3B);
  color: var(--ink);
  border-color: #8A6A32;
  box-shadow: 0 2px 0 #8A6A32;
}
.btn.gold:hover { filter: brightness(1.06); }
.btn.ghost {
  background: transparent;
  color: var(--ruby);
  box-shadow: none;
  border-color: var(--gold);
}
.btn.wide { width: 100%; }

.setup-card, .panel, .rules-sheet, .win-card {
  background: linear-gradient(180deg, #FFF9EE, var(--parchment));
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(196, 30, 58, 0.08);
}

.setup-card h2 { margin: 0 0 14px; color: var(--maroon); font-size: 1.7rem; }
.field { margin: 0 0 16px; }
.field label, .legend { display: block; font-weight: 650; margin-bottom: 8px; color: var(--maroon-deep); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  border: 1px solid var(--gold);
  background: var(--ivory);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
}
.choice[aria-pressed="true"] {
  background: linear-gradient(180deg, #E11D48, var(--ruby));
  color: var(--ivory);
  border-color: var(--maroon);
}
.choice.role-bot[aria-pressed="true"] {
  background: linear-gradient(180deg, #3B82F6, var(--cobalt));
  border-color: var(--navy);
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 550;
}
.check input { margin-top: 4px; accent-color: var(--ruby); width: 18px; height: 18px; }
.setup-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
#setupFriendsBtn { width: 100%; margin: 0 0 16px; }

.name-list { display: flex; flex-direction: column; gap: 10px; }
.name-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-areas: "dot name" "dot roles";
  gap: 6px 10px;
  align-items: center;
  background: #FFFDF8;
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 8px 10px;
}
.name-row .dot { grid-area: dot; width: 16px; height: 16px; }
.name-row input { grid-area: name; }
.name-row .roles { grid-area: roles; display: flex; gap: 6px; flex-wrap: wrap; }
.name-row .roles .choice { min-height: 34px; padding: 5px 12px; font-size: 0.9rem; }

/* Active game: slim header, full-viewport board, compact gavvalu dock. */
body.playing {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding-bottom: var(--ad-space);
  display: flex;
  flex-direction: column;
}
body.playing main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.playing .app-header {
  flex: none;
  position: relative;
  padding: 5px 8px;
  border-bottom-width: 2px;
}
body.playing .brand { font-size: 1.2rem; }
body.playing .brand small { display: none; }
body.playing .icon-btn,
body.playing .lang-toggle {
  min-height: 32px;
  min-width: 32px;
  padding: 4px 8px;
  font-size: 0.84rem;
}

#screen-play.screen {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  flex: 1;
  min-height: 0;
}
#screen-play.screen.active {
  display: flex;
  flex-direction: column;
}

.play-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0;
}

.players-row {
  display: none;
  flex: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 4px 6px 3px;
}
body.kind-ashta .players-row { display: flex; flex-wrap: nowrap; }
.player-chip {
  display: flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--gold);
  background: #FFFDF8;
  border-radius: 999px;
  padding: 3px 6px 3px 3px;
  font-size: 0.68rem;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}
.player-chip.current {
  outline: 2px solid var(--marigold);
  background: #FFF4D0;
  box-shadow: 0 0 10px rgba(245, 197, 66, 0.8);
}
.dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--gold); flex: none; }
.chip-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.badge {
  background: linear-gradient(180deg, #FFE08A, var(--marigold));
  color: var(--ink);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
}

.board-wrap {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  background: transparent;
  border: none;
  box-shadow: none;
  container-type: size;
}
.board-stage {
  position: relative;
  width: min(100cqw, 100cqh);
  height: min(100cqw, 100cqh);
  flex: none;
}
.board-svg {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: manipulation;
}
.game-card .thumb-pachis { border-color: #D8B074; background: #8B1528; }

/* Pachis corner name badges — sit in the empty yards, outer edge */
.corner-hud {
  position: absolute;
  width: 38%;
  height: 38%;
  display: flex;
  pointer-events: none;
  padding: 3%;
  box-sizing: border-box;
}
.corner-hud[data-seat="0"] { right: 1.2%; bottom: 1.2%; justify-content: flex-end; align-items: flex-end; text-align: right; }
.corner-hud[data-seat="1"] { right: 1.2%; top: 1.2%; justify-content: flex-end; align-items: flex-start; text-align: right; }
.corner-hud[data-seat="2"] { left: 1.2%; top: 1.2%; justify-content: flex-start; align-items: flex-start; text-align: left; }
.corner-hud[data-seat="3"] { left: 1.2%; bottom: 1.2%; justify-content: flex-start; align-items: flex-end; text-align: left; }
.corner-badge {
  max-width: 100%;
  background: rgba(17, 20, 23, 0.88);
  border: 1.5px solid #D8B074;
  border-radius: 10px;
  padding: 0.35em 0.55em 0.4em;
  color: #FAF3E3;
  font-size: 3.4cqi;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.corner-hud.current .corner-badge {
  border-color: #F5C542;
  border-width: 2px;
  box-shadow: 0 0 14px rgba(245, 197, 66, 0.9), 0 0 2px #F5C542;
  background: rgba(35, 22, 8, 0.92);
}
.corner-line {
  display: flex;
  align-items: center;
  gap: 0.35em;
  min-width: 0;
}
.corner-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: 7.5em;
}
.corner-home {
  font-size: 0.85em;
  opacity: 0.9;
  white-space: nowrap;
  flex: none;
}
.corner-badge .dot {
  width: 0.85em;
  height: 0.85em;
  border-width: 1.5px;
  border-color: #E2BC82;
}
.corner-turn {
  margin-top: 0.15em;
  color: #F5C542;
  font-weight: 700;
  font-size: 0.92em;
  text-shadow: 0 0 8px rgba(245, 197, 66, 0.7);
}

.corner-active { animation: yardGlow 1.2s ease-in-out infinite; }
@keyframes yardGlow {
  0%, 100% { stroke: #F5C542; opacity: 1; }
  50% { stroke: #FFE08A; opacity: 0.72; }
}

.legal-glow, .safe-glow { animation: glow 1.1s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { stroke: #F59E0B; opacity: 1; }
  50% { stroke: #F5C542; opacity: 0.65; }
}
.pawn.movable { cursor: pointer; }
.pawn.movable .pawn-bob {
  /* Glow only — never CSS transform on SVG groups (it is applied in user units and jumps the coin). */
  filter: drop-shadow(0 0 2px #F5C542);
}
.pawn-pulse {
  animation: ringPulse 0.85s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { stroke: #F5C542; stroke-width: 0.11; opacity: 1; }
  50% { stroke: #FFE08A; stroke-width: 0.16; opacity: 0.7; }
}
.dest-hot.legal-hit, .legal-hit.dest-hot {
  fill: rgba(245, 197, 66, 0.5);
}
.dest-hot.legal-glow, .dest-label.dest-hot rect {
  stroke: #FFE08A;
  stroke-width: 0.14;
}

.move-queue {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.move-queue[hidden] { display: none !important; }
.move-chip {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1.5px solid var(--gold);
  background: #FFFDF8;
  color: var(--maroon-deep);
  font-weight: 800;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.move-chip.selected {
  background: linear-gradient(180deg, #FFE08A, #F5C542);
  border-color: #B45309;
  box-shadow: 0 0 10px rgba(245, 197, 66, 0.95);
  color: var(--ink);
  transform: scale(1.08);
}
.move-chip:disabled, .move-chip.dead {
  opacity: 0.45;
  cursor: default;
}


.gavvalu-dock {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 4px 8px 6px;
  background: linear-gradient(180deg, #FFF9EE, var(--parchment));
  border-top: 2px solid var(--marigold);
  box-shadow: 0 -4px 16px rgba(35, 27, 22, 0.12);
}
.gavvalu-dock .gavvalu-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex: none;
  margin: 0;
  padding: 3px 6px;
  background: linear-gradient(180deg, #FFFDF8, var(--ivory));
  border: 1px solid var(--gold);
  border-radius: 12px;
  text-align: left;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.gavvalu-dock .gavvalu-box.bonus {
  border-color: var(--saffron);
  background: linear-gradient(180deg, #FFF4C8, #FFF9E8);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}
.gavvalu-dock .gavvalu-row { display: flex; justify-content: center; flex-wrap: nowrap; gap: 3px; }
.gavvalu-dock .gavvalu-row svg { width: 20px; height: 28px; }
.gavvalu-dock .gavvalu-label { display: none; }
.gavvalu-dock .status {
  flex: 1 0 100%;
  order: 10;
  min-width: 0;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--ruby);
  line-height: 1.25;
  text-align: center;
}
.gavvalu-dock .throw-actions { flex: none; }
.gavvalu-dock .btn {
  min-height: 40px;
  padding: 6px 12px;
  font-size: 0.88rem;
  white-space: nowrap;
  width: auto;
}

.gavva.tumbling { animation: tumble 0.55s ease-in-out infinite; transform-origin: 50% 50%; }
.gavva.bonus-shimmer { filter: drop-shadow(0 0 5px #F5C542) drop-shadow(0 0 2px #F59E0B); }
@keyframes tumble {
  0% { transform: rotate(0deg) translateY(0); }
  30% { transform: rotate(50deg) translateY(-8px); }
  60% { transform: rotate(-35deg) translateY(2px); }
  100% { transform: rotate(12deg) translateY(0); }
}

@media (min-width: 700px) {
  .gavvalu-dock .gavvalu-row svg { width: 26px; height: 36px; }
  .gavvalu-dock .status { font-size: 0.95rem; }
  .gavvalu-dock .btn { min-height: 44px; font-size: 1rem; padding: 8px 16px; }
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 27, 22, 0.45);
  z-index: 40;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px calc(var(--ad-space) + 16px);
}
.overlay.open { display: flex; }
@media (min-width: 700px) {
  .overlay { align-items: center; }
  .rules-sheet, .win-card { max-width: 520px; width: 100%; }
}
.rules-sheet, .win-card { width: 100%; max-height: min(80vh, 640px); overflow: auto; }
.rules-sheet h2, .win-card h2 { margin: 0 0 10px; color: var(--maroon); }
.rules-body { white-space: pre-wrap; line-height: 1.55; color: var(--ink); }
.win-card {
  text-align: center;
  background: linear-gradient(180deg, #FFF6D5, #FDE8C8 40%, #F8D0C6);
  border-color: var(--marigold);
}
.win-title { font-size: 2.1rem; margin: 0 0 8px; color: var(--ruby); }
.win-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

.festive-burst {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  overflow: hidden;
}
.festive-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  animation: burst 0.85s ease-out forwards;
}
@keyframes burst {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(0.4); }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Online rooms — festive, no green. */
.game-card.card-friends {
  grid-column: 1 / -1;
  background: linear-gradient(165deg, #FFF8EC 0%, #F3E0F6 48%, #E4E9FF 100%);
  border-color: var(--plum);
  box-shadow: 0 0 0 3px var(--marigold), 0 12px 28px rgba(122, 28, 28, 0.14);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title cta" "desc cta";
  align-items: center;
  gap: 2px 12px;
  padding: 12px 14px;
}
.game-card.card-friends .card-title { grid-area: title; color: var(--plum); font-size: 1.35rem; }
.game-card.card-friends p { grid-area: desc; font-size: 0.9rem; line-height: 1.3; }
.game-card.card-friends .cta { grid-area: cta; margin-top: 0; }
.home-share { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.rejoin-row { margin: 0; display: flex; }
.rejoin-row .btn { width: 100%; }
.or-line {
  border: 0;
  border-top: 1px dashed var(--gold);
  margin: 18px 0 16px;
}
#screen-online.screen { padding-bottom: calc(var(--ad-space) + 8px); }
.lobby-card { margin-top: 0; padding: 14px 14px 12px; }
.lobby-card h2 { margin-bottom: 6px; font-size: 1.55rem; }
.lobby-hint { margin: 0 0 8px; color: var(--ink-soft); font-weight: 550; }
.room-code-box {
  text-align: center;
  background: linear-gradient(180deg, #4A1010, #7A1C1C);
  color: var(--ivory);
  border: 2px solid var(--marigold);
  border-radius: 16px;
  padding: 10px 12px 8px;
  margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px rgba(245, 197, 66, 0.25);
}
.room-code-box .legend { color: var(--parchment); margin-bottom: 2px; }
.room-code {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin: 0;
  color: #FFFDF6;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}
.room-url { display: none; }
.share-actions { margin: 0 0 10px; }
.lobby-card .field { margin-bottom: 10px; }
.lobby-seats li { min-height: 42px; padding: 7px 10px; }
.share-actions .btn, .share-actions a.btn { text-decoration: none; }
.lobby-seats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lobby-seats li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFDF8;
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 48px;
}
.lobby-seats .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  flex: 0 0 16px;
}
.lobby-seats .seat-name { font-weight: 650; flex: 1; }
.lobby-seats .seat-meta { font-size: 0.82rem; color: var(--ink-soft); }
.lobby-seats li.empty { opacity: 0.72; }
.lobby-seats li.host { box-shadow: 0 0 0 2px var(--marigold); }
.online-error { color: var(--ruby); text-align: center; font-weight: 650; }
#whatsappShare { /* brand green is banned — keep gold/ivory ghost */ }


/* Ad bar: keep controls above the slim bottom bar. */
html.has-sum-ad-bar body {
  padding-bottom: calc(var(--ad-space) + 24px);
}
html.has-sum-ad-bar body.playing {
  padding-bottom: var(--ad-space);
}
.setup-actions {
  position: sticky;
  bottom: calc(var(--ad-space) + 6px);
  z-index: 6;
  padding-top: 8px;
  background: linear-gradient(180deg, rgba(255, 249, 238, 0), #FFF9EE 12px, var(--parchment));
}
@media (max-width: 700px) {
  .hero-lead { margin: 2px 0 10px; font-size: 1rem; }
  .game-cards { gap: 10px; }
  .game-card { padding: 10px 12px; gap: 6px; }
  .game-card .thumb { height: 64px; }
  .card-title { font-size: 1.28rem; }
  .game-card p { font-size: 0.88rem; line-height: 1.3; }
  .home-share { margin-top: 10px; }
  .screen { padding: 12px 12px 20px; }
}

/* Capture / kill animation. No green. */
.capture-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 85;
  overflow: hidden;
}
.kill-ring {
  position: absolute;
  width: var(--kill-size, 36px);
  height: var(--kill-size, 36px);
  border: 3px solid #F5C542;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  box-shadow: 0 0 0 2px #C41E3A, 0 0 16px rgba(245, 197, 66, 0.85);
  animation: kill-ring 0.7s ease-out forwards;
}
.kill-ring.reduced { animation-duration: 0.35s; }
.kill-toast {
  position: absolute;
  transform: translate(-50%, -120%);
  background: linear-gradient(180deg, #7A1C1C, #C41E3A);
  color: #FFF8E7;
  border: 2px solid #F5C542;
  border-radius: 999px;
  padding: 0.2em 0.7em 0.28em;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 16px rgba(122, 28, 28, 0.45);
  animation: kill-toast 1.1s ease-out forwards;
  white-space: nowrap;
}
.kill-ghost {
  position: absolute;
  border-radius: 50%;
  border: 2px solid #F5C542;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.7em;
  animation: kill-shake 0.22s ease-in-out, kill-fly 0.85s 0.22s cubic-bezier(0.25, 0.8, 0.3, 1) forwards;
}
@keyframes kill-ring {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.35); }
  55% { opacity: 0.95; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.15); }
}
@keyframes kill-toast {
  0% { opacity: 0; transform: translate(-50%, -80%) scale(0.7); }
  18% { opacity: 1; transform: translate(-50%, -130%) scale(1.08); }
  70% { opacity: 1; transform: translate(-50%, -130%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(0.92); }
}
@keyframes kill-shake {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  25% { transform: translate(calc(-50% - 5px), -50%) scale(1.18) rotate(-12deg); }
  50% { transform: translate(calc(-50% + 6px), -50%) scale(1.18) rotate(10deg); }
  100% { transform: translate(-50%, -50%) scale(1.05) rotate(0deg); }
}
@keyframes kill-fly {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  80% { opacity: 1; transform: translate(calc(-50% + var(--kx)), calc(-50% + var(--ky))) scale(0.9); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--kx)), calc(-50% + var(--ky))) scale(0.45); }
}
@media (prefers-reduced-motion: reduce) {
  .kill-toast { animation-duration: 0.4s; }
  .kill-ghost { animation: none; opacity: 0; }
}

/* Ashta/Chamma throw and coin-home celebrations. No green. */
.festive-spark {
  position: absolute;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  clip-path: polygon(50% 0, 62% 38%, 100% 38%, 70% 62%, 82% 100%, 50% 75%, 18% 100%, 30% 62%, 0 38%, 38% 38%);
  animation: burst 1s ease-out forwards;
}
.festive-chip {
  position: absolute;
  width: 6px;
  height: 11px;
  border-radius: 1px;
  transform: translate(-50%, -50%);
  animation: burst 1s ease-out forwards;
}
.bonus-toast,
.home-toast {
  position: absolute;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #FFF8E7, #F8E4B0);
  color: #7A1C1C;
  border: 2px solid #F5C542;
  border-radius: 999px;
  padding: 0.22em 0.75em 0.28em;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(122, 28, 28, 0.28);
  animation: bonus-toast 1s ease-out forwards;
  white-space: nowrap;
  z-index: 2;
  pointer-events: none;
}
.home-toast {
  background: linear-gradient(180deg, #F5C542, #E8A317);
  color: #4A1A12;
  border-color: #C41E3A;
}
@keyframes bonus-toast {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.7); }
  18% { opacity: 1; transform: translate(-50%, -120%) scale(1.08); }
  72% { opacity: 1; transform: translate(-50%, -120%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(0.94); }
}
@media (prefers-reduced-motion: reduce) {
  .festive-spark, .festive-chip, .festive-dot { animation-duration: 0.35s; }
  .bonus-toast, .home-toast { animation-duration: 0.4s; }
}
