/* Recolour only the approved ball shell; lettering, discs and scene stay separate. */
body.classic-beach.tropical-room #tropical-room .tropical-call {
  --classic-ball-shell-filter: none;
  --classic-ball-roll-distance: -100%;
}
body.classic-beach.tropical-room #tropical-room .tropical-call[data-letter='B'] { --classic-ball-shell-filter: hue-rotate(140deg) saturate(1.25); }
body.classic-beach.tropical-room #tropical-room .tropical-call[data-letter='I'] { --classic-ball-shell-filter: none; }
/* N uses luminance then a gold/yellow palette: R >= G >= B through shadows to white highlights. */
body.classic-beach.tropical-room #tropical-room .tropical-call[data-letter='N'] { --classic-ball-shell-filter: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cfilter%20id%3D'classic-n-gold'%20color-interpolation-filters%3D'sRGB'%3E%3CfeColorMatrix%20type%3D'saturate'%20values%3D'0'%2F%3E%3CfeComponentTransfer%3E%3CfeFuncR%20type%3D'table'%20tableValues%3D'.10%20.30%20.70%201%201%201%201'%2F%3E%3CfeFuncG%20type%3D'table'%20tableValues%3D'.04%20.20%20.52%20.86%20.96%201%201'%2F%3E%3CfeFuncB%20type%3D'table'%20tableValues%3D'0%200%20.01%20.04%20.10%20.40%201'%2F%3E%3C%2FfeComponentTransfer%3E%3C%2Ffilter%3E%3C%2Fsvg%3E#classic-n-gold"); }
body.classic-beach.tropical-room #tropical-room .tropical-call[data-letter='G'] { --classic-ball-shell-filter: hue-rotate(255deg) saturate(1.15) brightness(1.3); }
body.classic-beach.tropical-room #tropical-room .tropical-call[data-letter='O'] { --classic-ball-shell-filter: hue-rotate(60deg) saturate(1.15); }

/* The desktop SVG already isolates the exact approved ball artwork. */
body.classic-beach.tropical-room #tropical-room .tropical-call > .desktop-reference-art {
  filter: var(--classic-ball-shell-filter) !important;
  mask-image: radial-gradient(ellipse closest-side at 48.815% 49.776%, transparent 69%, #000 70%);
}

/* Keep the existing glossy gradients, dimensions, shading and white number discs. */
body.classic-beach.tropical-room #tropical-room #recent-calls .recent-ball.ball-0 {
  background: radial-gradient(circle at 28% 18%, #ffb2a5, #ff363d 40%, #c40c22 75%, #8d0515) !important;
  border-color: #ff9a9a !important;
}
body.classic-beach.tropical-room #tropical-room #recent-calls .recent-ball.ball-1 {
  background: radial-gradient(circle at 28% 18%, #95f7ff 0%, #0daaff 35%, #0163c9 67%, #053dab) !important;
  border-color: #75ebff !important;
}
body.classic-beach.tropical-room #tropical-room #recent-calls .recent-ball.ball-2 {
  background: radial-gradient(circle at 28% 18%, #fff6a0, #ffe01b 40%, #e5a80a 75%, #ba7800) !important;
  border-color: #ffed69 !important;
}
body.classic-beach.tropical-room #tropical-room #recent-calls .recent-ball.ball-3 {
  background: radial-gradient(circle at 28% 18%, #bdff83, #49e511 40%, #1cab01 75%, #087b00) !important;
  border-color: #b0ff72 !important;
}
body.classic-beach.tropical-room #tropical-room #recent-calls .recent-ball.ball-4 {
  background: radial-gradient(circle at 28% 18%, #deb6ff, #963af0 40%, #6221c3 75%, #441386) !important;
  border-color: #c885ff !important;
}

@media (max-width: 899px) {
  /* Crop 256,15 / 211x223 from the unchanged 941x1672 approved raster. */
  body.classic-beach.tropical-room #tropical-room .tropical-call::before,
  body.classic-beach.tropical-room #tropical-room #draw-ball::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    left: .005101cqw !important;
    top: -.182785cqw !important;
    width: 22.422955cqw !important;
    height: 23.698193cqw !important;
    pointer-events: none;
    clip-path: ellipse(48.815% 49.776% at 48.815% 49.776%);
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  /* Sky x466..468 covers only the printed ball and its 5px source fringe. */
  body.classic-beach.tropical-room #tropical-room .tropical-call::before {
    left: -.526249cqw !important;
    top: -.714134cqw !important;
    width: 22.954304cqw !important;
    height: 24.654623cqw !important;
    clip-path: ellipse(50% 50% at 50% 50%);
    background: url('/optimized-v1/tropical-reference-user-v2.webp?v=fluid-1') 49.680171% .694444% / 31366.666667% 720.689655% no-repeat !important;
    z-index: 0;
  }
  body.classic-beach.tropical-room #tropical-room #draw-ball::after {
    background: url('/optimized-v1/tropical-reference-user-v2.webp?v=fluid-1') -27.205101cqw -1.594049cqw / 100cqw 177.683315cqw no-repeat !important;
    filter: var(--classic-ball-shell-filter) !important;
    mask-image: radial-gradient(ellipse closest-side at 48.815% 49.776%, transparent 69%, #000 70%);
    transform-origin: 48.815% 49.776%;
    z-index: 0;
  }
  body.classic-beach.tropical-room #tropical-room #draw-ball::before { z-index: 1; }
  body.classic-beach.tropical-room #tropical-room #draw-ball b,
  body.classic-beach.tropical-room #tropical-room #draw-ball .draw-letter { z-index: 2; }
}

/* The shell travels roughly one diameter; the number never rotates. */
body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving #draw-banner {
  animation: classic-called-ball-travel .9s linear both !important;
}
body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving > .desktop-reference-art {
  animation: classic-called-ball-roll .9s linear both !important;
  transform-origin: 48.815% 49.776%;
}
body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving #draw-ball::after {
  animation: classic-called-ball-shell .9s linear both !important;
}
body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving #draw-ball b,
body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving #draw-ball .draw-letter {
  animation: classic-called-ball-number .9s linear both !important;
}
/* A moving reflection is confined to the ring, outside the white number disc. */
body.classic-beach.tropical-room #tropical-room .tropical-call::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  background: linear-gradient(112deg, transparent 21%, #ffffff08 30%, #ffffffe6 37%, #aef4ff77 43%, transparent 53%), radial-gradient(ellipse at 72% 20%, #ffffffaa, transparent 35%);
  mask-image: radial-gradient(ellipse closest-side at 50% 50%, transparent 76%, #000 78%);
}
body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving::after {
  animation: classic-called-ball-reflection .9s linear both;
}
@keyframes classic-called-ball-travel {
  0% { transform: translateX(var(--classic-ball-roll-distance)); }
  14% { transform: translateX(-70%); }
  30% { transform: translateX(-24%); }
  46%, 100% { transform: translateX(0); }
}
@keyframes classic-called-ball-roll {
  0% { transform: translateX(var(--classic-ball-roll-distance)) rotate(-145deg); }
  14% { transform: translateX(-70%) rotate(-104deg); }
  30% { transform: translateX(-24%) rotate(-34deg); }
  46% { transform: translateX(0) rotate(3deg); }
  64% { transform: translateX(0) rotate(-1.5deg); }
  82%, 100% { transform: translateX(0) rotate(0); }
}
@keyframes classic-called-ball-shell {
  0% { transform: rotate(-145deg); }
  14% { transform: rotate(-104deg); }
  30% { transform: rotate(-34deg); }
  46% { transform: rotate(3deg); }
  64% { transform: rotate(-1.5deg); }
  82%, 100% { transform: rotate(0); }
}
@keyframes classic-called-ball-number {
  0%, 44% { opacity: 0; }
  46%, 100% { opacity: 1; }
}
@keyframes classic-called-ball-reflection {
  0% { transform: translateX(-100%) rotate(-80deg); opacity: .25; }
  14% { transform: translateX(-70%) rotate(-25deg); opacity: .8; }
  30% { transform: translateX(-24%) rotate(40deg); opacity: 1; }
  46% { transform: translateX(0) rotate(85deg); opacity: .65; }
  70% { transform: translateX(0) rotate(112deg); opacity: .25; }
  100% { transform: translateX(0) rotate(120deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving #draw-banner,
  body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving > .desktop-reference-art,
  body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving #draw-ball::after,
  body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving #draw-ball b,
  body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving #draw-ball .draw-letter,
  body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving::after {
    animation: none !important;
    transform: none !important;
  }
  body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving #draw-ball b,
  body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving #draw-ball .draw-letter { opacity: 1 !important; }
  body.classic-beach.tropical-room #tropical-room .tropical-call.classic-ball-arriving::after { opacity: 0 !important; }
}

@media(orientation:landscape) and (max-height:550px){
  body.classic-beach.tropical-room #tropical-room .tropical-call::before,
  body.classic-beach.tropical-room #tropical-room #draw-ball::after{content:none!important;display:none!important}
}
