/* Sea Race (Cleo's Studio, games for two, 2026-11-07): two lanes up to one clam, and nobody arrives alone. */
.race { background: #4FA9C6; cursor: pointer; }
.side-glow { position: absolute; bottom: 0; width: 50%; height: 30%; z-index: 2; pointer-events: none; }
.side-glow--a { left: 0; background: linear-gradient(0deg, rgba(247, 160, 190, .55), rgba(247, 160, 190, 0)); }
.side-glow--b { right: 0; background: linear-gradient(0deg, rgba(110, 210, 235, .55), rgba(110, 210, 235, 0)); }
.race-cv { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; }

/* the pearly clam at the top middle: the finish for both */
.clam { position: absolute; z-index: 4; left: 50%; transform: translateX(-50%); pointer-events: none; }
.clam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transition: opacity .7s ease; filter: drop-shadow(0 10px 16px rgba(10, 50, 80, .3)); }
.clam__open { opacity: 0; }
.clam.is-open .clam__open { opacity: 1; }
.clam.is-open .clam__closed { opacity: 0; }
.clam__pearl { position: absolute; left: 50%; top: 58%; width: 18%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(0);
  background: radial-gradient(circle at 35% 30%, #fff, #F6EAF4 40%, #E5D3E8 70%, #CDB9D6); box-shadow: 0 0 24px rgba(255, 245, 220, .95); transition: transform .8s cubic-bezier(.3, 1.6, .5, 1) .4s; }
.clam.is-open .clam__pearl { transform: translate(-50%, -50%) scale(1); }

/* the two swimmers */
.racer { position: absolute; z-index: 6; left: 0; top: 0; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(10, 50, 80, .3)); will-change: transform; }

/* before the race: pick who swims, at the bottom of each side */
.pick { position: absolute; z-index: 10; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; gap: 8px; padding: 6px 10px; border-radius: 40px; background: rgba(255, 255, 255, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity .4s ease; }
.pick--a { left: 25%; transform: translateX(-50%); }
.pick--b { left: 75%; transform: translateX(-50%); }
.pick.is-gone { opacity: 0; pointer-events: none; }
.pickbtn { width: clamp(44px, 7vmin, 70px); aspect-ratio: 1; border-radius: 50%; border: 3px solid transparent; padding: 4px; background: rgba(255,255,255,.6); cursor: pointer; display: grid; place-items: center; }
.pickbtn img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.pickbtn.is-on { border-color: #E8B84A; background: #FDF2C5; box-shadow: 0 0 12px rgba(232, 184, 74, .6); }
.pickbtn:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.room.in-frame .pick--a { left: calc(25% + 35px); }

.big--again { left: 50%; top: 58%; transform: translate(-50%, -50%); background: radial-gradient(circle at 40% 35%, #8FD8EC, #3FB6D8); }
.kbswim:focus-visible { position: absolute; top: 80px; width: auto; height: auto; clip: auto; padding: 8px 16px; border-radius: 20px; background: #fff; outline: 3px solid var(--navy); z-index: 20; }
#kb-a:focus-visible { left: 25%; } #kb-b:focus-visible { left: 75%; }
/* held upright: the four friends two by two, each at least 48px (11/7) */
@media (max-aspect-ratio: 1/1) { .pickbtn { width: clamp(48px, 12vw, 64px); } .pick { display: grid; grid-template-columns: repeat(2, auto); gap: 6px; padding: 6px; border-radius: 24px; } }
