/* Top HUD & Player Scorecards */
.hud-top {
  display: grid;
  grid-template-columns: 1fr minmax(340px, 365px) 1fr;
  align-items: stretch;
  gap: 10px;
  flex-shrink: 0;
}

.player-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 8px 14px;
  transition: border-color 0.25s, box-shadow 0.25s;
  min-width: 0;
}

.player-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.player-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.player-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.player-meta.right {
  align-items: flex-end;
}

.player-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2b384d, #192231);
  border: 2px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.player-card.active .player-avatar {
  background: linear-gradient(135deg, #facc15, #ca8a04);
  color: #111827;
  border-color: #fef08a;
}

.player-name {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-meta.right .player-name {
  max-width: 100%;
}

.score-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

@media (max-width: 560px), (max-height: 520px) and (orientation: landscape) {
  .player-avatar {
    width: 40px;
    height: 40px;
  }
}

.score-block.left {
  align-items: flex-start;
}

.score-pill {
  font-size: 20px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #fef08a;
  line-height: 1;
  white-space: nowrap;
}

.score-pill small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.score-pill.negative {
  color: #f87171;
}

.score-progress {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}

.score-progress.right {
  justify-content: flex-end;
}

.score-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #eab308);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.stat-good {
  font-size: 11px;
  font-weight: 700;
  color: #4ade80;
  font-variant-numeric: tabular-nums;
}

.stat-pillo {
  font-size: 11px;
  font-weight: 700;
  color: #f87171;
  background: rgba(239, 68, 68, 0.14);
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-variant-numeric: tabular-nums;
}

.stat-pillo.zero {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Captured Balls Tray (in exact capture order) */
.ball-tray {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 2px 6px;
  background: rgba(6, 10, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ball-tray::-webkit-scrollbar {
  display: none;
}

.ball-tray.right {
  justify-content: flex-end;
}

.ball-tray-empty {
  font-size: 10px;
  color: rgba(139, 152, 171, 0.55);
  font-style: italic;
}

.captured-ball {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  color: #0f172a;
  box-shadow: inset -3px -3px 5px rgba(0, 0, 0, 0.45), inset 2px 2px 4px rgba(255, 255, 255, 0.3), 0 2px 4px rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
  animation: ballPop 0.28s ease-out;
}

@keyframes ballPop {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.captured-ball .ball-num-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Center Chilean 3-Line Abacus Scoreboard */
.center-scoreboard {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.center-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.brand {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #fef08a 0%, #eab308 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.target-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.4);
  padding: 1px 6px 1px 7px;
  border-radius: 999px;
}

.target-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fde047;
}

.target-ball-chip {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  color: #0f172a;
  background: #facc15;
  box-shadow: inset -2px -2px 3px rgba(0, 0, 0, 0.35);
}

.target-ball-chip span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.abacus-frame {
  background: linear-gradient(180deg, #3a1f10 0%, #241208 100%);
  border: 1.5px solid #8c6230;
  border-radius: 10px;
  padding: 5px 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.abacus-wire {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 15px;
}

.abacus-wire.wire-tens {
  height: 18px;
}

.wire-tag {
  font-size: 9px;
  font-weight: 800;
  width: 24px;
  text-align: center;
  color: #d6b88d;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.wire-tag.tens-tag {
  color: #fde047;
  font-size: 9px;
}

.wire-rail {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
}

.wire-rail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, #d4a84f 0%, #7d591b 100%);
  border-radius: 2px;
}

.abacus-beads-active,
.abacus-beads-rest {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2px;
}

.abacus-spacer {
  flex: 1;
}

.bead {
  width: 11px;
  height: 13px;
  border-radius: 4px;
  background: linear-gradient(180deg, #64748b 0%, #334155 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s ease, background 0.25s ease;
}

.bead.active-j1 {
  background: linear-gradient(180deg, #f87171 0%, #b91c1c 100%);
  border-color: #fecaca;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.bead.active-j2 {
  background: linear-gradient(180deg, #fb923c 0%, #c2410c 100%);
  border-color: #fed7aa;
  box-shadow: 0 0 6px rgba(249, 115, 22, 0.6);
}

.bead-ten {
  width: 20px;
  height: 16px;
  border-radius: 5px;
  background: linear-gradient(180deg, #475569 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.45);
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.bead-ten.active-j1 {
  background: linear-gradient(180deg, #facc15 0%, #b91c1c 100%);
  border-color: #fef08a;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}

.bead-ten.active-j2 {
  background: linear-gradient(180deg, #facc15 0%, #c2410c 100%);
  border-color: #fef08a;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.7);
}

.abacus-caption {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  color: #d6b88d;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.abacus-caption.has-pillo {
  color: #fca5a5;
}

/* Large Broadcast-Grade Animated Pillo Abacus Modal */
.abacus-modal-card {
  width: 480px;
  max-width: 94vw;
  padding: 24px 30px;
  background: linear-gradient(180deg, #1b2230 0%, #10151f 100%);
  border: 1.5px solid rgba(212, 168, 79, 0.55);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(239, 68, 68, 0.18);
  animation: abacusModalIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes abacusModalIn {
  0% { transform: scale(0.88) translateY(12px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.abacus-modal-badge {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: #fecaca;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.35), rgba(153, 27, 27, 0.45));
  border: 1px solid rgba(248, 113, 113, 0.6);
  padding: 4px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.abacus-large {
  position: relative;
  width: 100%;
  padding: 18px 20px;
  gap: 15px;
  background: radial-gradient(circle at 50% 30%, #2c170b 0%, #170b04 100%);
  border: 4px solid #6b3c1e;
  border-radius: 16px;
  box-shadow:
    inset 0 6px 18px rgba(0, 0, 0, 0.85),
    inset 0 0 0 1px rgba(230, 193, 108, 0.22),
    0 12px 28px rgba(0, 0, 0, 0.65);
}

.abacus-large::before,
.abacus-large::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fef08a, #9c7224);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.abacus-large::before { left: 8px; }
.abacus-large::after { right: 8px; }

.abacus-wire-lg {
  height: 30px;
  gap: 12px;
}

.abacus-wire-lg.wire-tens-lg {
  height: 36px;
}

.wire-tag-lg {
  width: 38px;
  font-size: 12px;
  font-weight: 900;
  color: #e6cfa0;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 168, 79, 0.28);
  border-radius: 6px;
  padding: 2px 0;
}

.wire-rail-lg {
  position: relative;
  flex: 1;
  height: 100%;
}

.wire-rail-lg::before {
  height: 5px;
  background: linear-gradient(180deg, #f5e2a8 0%, #b88735 50%, #5c3d0e 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.75);
}

.bead-anim {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(90deg, #334155 0%, #64748b 38%, #475569 70%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.22), 0 4px 8px rgba(0, 0, 0, 0.75);
  transition: left 0.52s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
  z-index: 2;
}

.bead-anim.active-j1 {
  background: linear-gradient(90deg, #991b1b 0%, #f87171 38%, #dc2626 70%, #7f1d1d 100%);
  border-color: #fecaca;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.35), 0 0 12px rgba(239, 68, 68, 0.7), 0 4px 8px rgba(0, 0, 0, 0.75);
}

.bead-anim.active-j2 {
  background: linear-gradient(90deg, #9a3412 0%, #fb923c 38%, #ea580c 70%, #7c2d12 100%);
  border-color: #fed7aa;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.35), 0 0 12px rgba(249, 115, 22, 0.7), 0 4px 8px rgba(0, 0, 0, 0.75);
}

.bead-ten-anim {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(90deg, #1e293b 0%, #475569 38%, #334155 72%, #0f172a 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.2), 0 5px 10px rgba(0, 0, 0, 0.8);
  transition: left 0.56s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease, box-shadow 0.3s ease;
  z-index: 2;
}

.bead-ten-anim.active-j1 {
  background: linear-gradient(135deg, #fde047 0%, #dc2626 55%, #7f1d1d 100%);
  border-color: #fef08a;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4), 0 0 16px rgba(239, 68, 68, 0.8), 0 5px 10px rgba(0, 0, 0, 0.8);
}

.bead-ten-anim.active-j2 {
  background: linear-gradient(135deg, #fde047 0%, #ea580c 55%, #7c2d12 100%);
  border-color: #fef08a;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4), 0 0 16px rgba(249, 115, 22, 0.8), 0 5px 10px rgba(0, 0, 0, 0.8);
}

.abacus-modal-calc {
  font-size: 14px;
  font-weight: 800;
  color: #fde047;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  padding: 7px 16px;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}

/* Fast Non-Blocking Ball Pocketed Celebration Banner */
.pot-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 20px;
  background: rgba(12, 18, 28, 0.88);
  border: 1.5px solid rgba(74, 222, 128, 0.6);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.65), 0 0 28px rgba(74, 222, 128, 0.28);
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.pot-banner.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.pot-banner.hidden {
  display: none;
}

.pot-balls-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pot-ball-big {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset -6px -7px 12px rgba(0, 0, 0, 0.45), inset 4px 4px 8px rgba(255, 255, 255, 0.35), 0 6px 16px rgba(0, 0, 0, 0.55);
  animation: potBallBounce 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes potBallBounce {
  0% { transform: scale(0.3) rotate(-25deg); }
  65% { transform: scale(1.16) rotate(6deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.pot-ball-big span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pot-points {
  font-size: 18px;
  font-weight: 900;
  color: #4ade80;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(74, 222, 128, 0.4);
}

/* Fast Centered Broadcast Turn & Target Banner */
.turn-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.84);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(16, 23, 38, 0.94) 0%, rgba(10, 14, 24, 0.96) 100%);
  border: 1.5px solid rgba(250, 204, 21, 0.65);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.72), 0 0 32px rgba(234, 179, 8, 0.25);
  pointer-events: none;
  z-index: 16;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.turn-banner.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.turn-banner.hidden {
  display: none;
}

.turn-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde047 0%, #ca8a04 100%);
  color: #111827;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.5);
  flex-shrink: 0;
}

.turn-banner.p2 .turn-avatar {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #082f49;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.5);
}

.turn-banner.p2 {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.72), 0 0 32px rgba(56, 189, 248, 0.22);
}

.turn-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.turn-eyebrow {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #94a3b8;
}

.turn-title {
  font-size: 20px;
  font-weight: 900;
  color: #f8fafc;
  line-height: 1.05;
  white-space: nowrap;
}

.turn-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.14);
}

.turn-target-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

.turn-target-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fde047;
}

.turn-target-ball {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset -4px -5px 8px rgba(0, 0, 0, 0.45), inset 3px 3px 6px rgba(255, 255, 255, 0.32), 0 4px 12px rgba(0, 0, 0, 0.55);
}

.turn-target-ball span {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .hud-top {
    grid-template-columns: 1fr 1fr;
  }
  .center-scoreboard {
    grid-column: 1 / -1;
    order: -1;
    width: 100%;
  }
}

/* ---- Character banter: portrait + short line, under the speaker's card ---- */
.banter-bubble {
  position: fixed;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: calc(12px * var(--ui-scale, 1));
  max-width: 44vw;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px) scale(0.94);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1.3, 0.36, 1);
}
.banter-bubble.right {
  flex-direction: row-reverse;
}
.banter-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.banter-avatar {
  flex: 0 0 auto;
  width: calc(76px * var(--ui-scale, 1));
  height: calc(76px * var(--ui-scale, 1));
  border-radius: 50%;
  border: 3px solid #facc15;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  background-color: #0f172a;
}
.banter-text {
  position: relative;
  padding: calc(11px * var(--ui-scale, 1)) calc(18px * var(--ui-scale, 1));
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  color: #0f172a;
  font-size: calc(21px * var(--ui-scale, 1));
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}
/* little tail pointing at the portrait */
.banter-text::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  background: inherit;
  transform: translateY(-50%) rotate(45deg);
}
.banter-bubble.left .banter-text::before {
  left: -5px;
}
.banter-bubble.right .banter-text::before {
  right: -5px;
}
.banter-bubble.is-reply .banter-avatar {
  width: calc(62px * var(--ui-scale, 1));
  height: calc(62px * var(--ui-scale, 1));
}
.banter-bubble.is-reply .banter-text {
  font-size: calc(18px * var(--ui-scale, 1));
  padding: calc(9px * var(--ui-scale, 1)) calc(15px * var(--ui-scale, 1));
  background: rgba(241, 245, 249, 0.96);
}
.banter-speaker {
  display: block;
  font-size: calc(12px * var(--ui-scale, 1));
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: calc(2px * var(--ui-scale, 1));
}
.banter-bubble.tone-fiery .banter-avatar {
  border-color: #f97316;
}
.banter-bubble.tone-warm .banter-avatar {
  border-color: #34d399;
}

/* Clean abacus: only beads, no text (top mini-abacus and pillo animation).
   Players read pillos straight from the beads. */
.center-bar .brand,
.abacus-frame .wire-tag,
.abacus-caption,
.abacus-modal-badge,
#abacus-modal-title,
#abacus-modal-reason,
.abacus-modal-calc,
#btn-close-abacus {
  display: none !important;
}
.center-bar {
  justify-content: flex-end;
}

/* Abacus finishes color the scoreboard, and the animated counter. */
:root[data-abacus-theme] {
  --abacus-felt-tone: #0e6241;
  --abacus-top: #2b1c16;
  --abacus-bottom: #15100d;
  --abacus-trim: #947652;
  --abacus-wire-top: #c6ae7e;
  --abacus-wire-bottom: #7f6745;
  --abacus-rest: #75665b;
  --abacus-rest-shadow: #4a4039;
  --abacus-j1: #d5a597;
  --abacus-j1-shadow: #955e52;
  --abacus-j2: #e1c77e;
  --abacus-j2-shadow: #9c7f39;
}
:root[data-abacus-theme="graphite"] {
  --abacus-top: #20272d;
  --abacus-bottom: #101519;
  --abacus-trim: #6f7e88;
  --abacus-wire-top: #aab8c4;
  --abacus-wire-bottom: #617381;
  --abacus-rest: #646e77;
  --abacus-rest-shadow: #3b4650;
  --abacus-j1: #b9cddd;
  --abacus-j1-shadow: #65879e;
  --abacus-j2: #d8b899;
  --abacus-j2-shadow: #936b50;
}
:root[data-abacus-theme="slate"] {
  --abacus-top: #192d39;
  --abacus-bottom: #0d1a23;
  --abacus-trim: #608293;
  --abacus-wire-top: #acc1c9;
  --abacus-wire-bottom: #58747f;
  --abacus-rest: #546c7a;
  --abacus-rest-shadow: #354752;
  --abacus-j1: #9bbfd9;
  --abacus-j1-shadow: #557d9c;
  --abacus-j2: #e2c293;
  --abacus-j2-shadow: #a17d49;
}
:root[data-abacus-theme="smoked-oak"] {
  --abacus-top: #302b24;
  --abacus-bottom: #181511;
  --abacus-trim: #928378;
  --abacus-wire-top: #c6b7a2;
  --abacus-wire-bottom: #796d5c;
  --abacus-rest: #766e63;
  --abacus-rest-shadow: #4d453c;
  --abacus-j1: #e1d6b8;
  --abacus-j1-shadow: #a49472;
  --abacus-j2: #cda19a;
  --abacus-j2-shadow: #956860;
}
:root[data-abacus-theme="mineral"] {
  --abacus-top: #1b322b;
  --abacus-bottom: #0e211b;
  --abacus-trim: #6c8e81;
  --abacus-wire-top: #aebdb2;
  --abacus-wire-bottom: #597267;
  --abacus-rest: #587268;
  --abacus-rest-shadow: #394d46;
  --abacus-j1: #b7d6bd;
  --abacus-j1-shadow: #699779;
  --abacus-j2: #dbb2a3;
  --abacus-j2-shadow: #9d7262;
}
[data-abacus-theme] .abacus-frame {
  background: linear-gradient(155deg, var(--abacus-top), var(--abacus-bottom));
  border-color: var(--abacus-trim);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 4px 12px rgba(4, 8, 14, .46);
}
[data-abacus-theme] .abacus-large {
  background: radial-gradient(ellipse at 50% 12%, var(--abacus-top), var(--abacus-bottom) 78%);
  box-shadow: inset 0 2px 14px rgba(4, 8, 14, .4);
}
[data-abacus-theme] .abacus-modal-card {
  background: linear-gradient(160deg, #19212c, var(--bg));
  border-color: var(--abacus-trim);
  box-shadow: 0 24px 58px rgba(4, 8, 14, .78);
}
@supports (color: color-mix(in srgb, black, white)) {
  [data-abacus-theme] .abacus-frame {
    --abacus-lit-frame: color-mix(in srgb, var(--abacus-top) 76%, var(--abacus-felt-tone));
    --abacus-dark-frame: color-mix(in srgb, var(--abacus-bottom) 75%, var(--bg));
    background: linear-gradient(155deg, var(--abacus-lit-frame), var(--abacus-dark-frame));
    border-color: color-mix(in srgb, var(--abacus-trim) 78%, var(--abacus-felt-tone));
  }
  [data-abacus-theme] .abacus-large {
    background: radial-gradient(ellipse at 50% 12%, var(--abacus-lit-frame), var(--abacus-dark-frame) 78%);
  }
  [data-abacus-theme] .abacus-modal-card {
    background: linear-gradient(160deg, color-mix(in srgb, var(--panel) 92%, var(--abacus-felt-tone)), var(--bg));
    border-color: color-mix(in srgb, var(--abacus-trim) 65%, var(--panel));
  }
}
[data-abacus-theme] .abacus-frame .wire-rail::before {
  background: linear-gradient(var(--abacus-wire-top), var(--abacus-wire-bottom));
}
[data-abacus-theme] .abacus-large::before,
[data-abacus-theme] .abacus-large::after {
  background: radial-gradient(circle at 35% 35%, var(--abacus-wire-top), var(--abacus-wire-bottom));
}
[data-abacus-theme] .abacus-frame :is(.bead, .bead-ten, .bead-anim, .bead-ten-anim) {
  --bead-face: var(--abacus-rest);
  --bead-shadow: var(--abacus-rest-shadow);
  --bead-edge: #aab1ad;
  background: linear-gradient(155deg, var(--bead-face), var(--bead-shadow));
  border: 1px solid var(--bead-edge);
  box-shadow: inset 0 0 0 1px rgba(8, 12, 13, .42), 0 1px 2px rgba(0, 0, 0, .65);
}
[data-abacus-theme] .abacus-frame .active-j1 {
  --bead-face: var(--abacus-j1);
  --bead-shadow: var(--abacus-j1-shadow);
  --bead-edge: #ecf1ef;
}
[data-abacus-theme] .abacus-frame .active-j2 {
  --bead-face: var(--abacus-j2);
  --bead-shadow: var(--abacus-j2-shadow);
  --bead-edge: #f0ebe1;
}
[data-abacus-theme] .abacus-frame :is(.bead-anim, .bead-ten-anim) {
  border-width: 2px;
}
[data-abacus-theme] .abacus-frame :is(.bead-ten, .bead-ten-anim) {
  color: #f0f1ee;
}
[data-abacus-theme] .abacus-frame :is(.bead-ten, .bead-ten-anim):is(.active-j1, .active-j2) {
  background: var(--bead-face);
  color: #171b1a;
  text-shadow: none;
}
