/* Softer candy palette: vivid colors use 25% less saturation to complement the title. */
:root {
  --pop-violet: #a220df;
  --pop-violet-deep: #5a19ae;
  --pop-cyan: #20bbdf;
  --pop-blue: #2065df;
  --pop-lime: #62ce1d;
  --pop-yellow: #dfc620;
  --pool-ink: #381d5b;
  --pool-muted: #74618c;
  --pop-line: #e5daf5;
}
html, body { background: #f4effd; color: var(--pool-ink); }
body { background: radial-gradient(ellipse at 50% 25%, #ffffff 0%, #f4effd 44%, #e2edfb 100%); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible + .toggle-track { outline: 3px solid var(--pop-violet-deep); outline-offset: 5px; }
.pool-scenery { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.pool-grid { position: absolute; inset: 0; opacity: .2; background-image: linear-gradient(#b495e2 1px, transparent 1px), linear-gradient(90deg, #b495e2 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(transparent 10%, #000); }
.pool-waves { position: absolute; bottom: 0; width: 100%; height: 26%; }
.water-ring { position: absolute; width: 370px; height: 370px; border: 1px solid #c09cf166; border-radius: 50%; box-shadow: 0 0 0 26px #ddcaf844, 0 0 0 27px #b696df33, 0 0 0 61px #ddcaf833, 0 0 0 62px #b696df33; }
.ring-one { left: -190px; top: 15%; }.ring-two { right: -200px; bottom: 7%; width: 490px; height: 490px; }
.scenery-bubble { position: absolute; border-radius: 50%; border: 1px solid #fff; background: radial-gradient(circle at 30% 25%, #fff, #ffffff00 45%), #20bbdf29; box-shadow: inset -3px -4px 9px #2065df29; }
.bubble-one { width: 42px; height: 42px; left: 16%; top: 30%; }.bubble-two { width: 24px; height: 24px; right: 22%; top: 19%; }.bubble-three { width: 65px; height: 65px; right: 13%; bottom: 23%; }
.corner-brand { position: fixed; left: 36px; top: 28px; display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 850; letter-spacing: -.7px; }
body[data-screen="start"] .corner-brand { display: none; }
.brand-drop { color: var(--pop-violet); font-size: 28px; transform: rotate(-35deg); }
.brand-edition { position: absolute; top: 34px; left: 36px; font-size: 8px; letter-spacing: 2px; white-space: nowrap; color: var(--pool-muted); }
body[data-screen="play"] .water-ring { opacity: .23; }
body[data-screen="play"] .scenery-bubble { opacity: .3; }
body[data-screen="play"] .pool-waves { opacity: .45; height: 17%; }
body[data-screen="play"] .pool-grid { opacity: .12; }
body[data-screen="start"] > header, body[data-screen="start"] > main, body[data-screen="start"] > footer,
body[data-screen="over"] > header, body[data-screen="over"] > main, body[data-screen="over"] > footer { visibility: hidden; }
#modalBackdrop { display: flex; align-items: center; align-items: safe center; justify-content: center; overflow-y: auto; padding: 26px 18px; background: transparent; }
body[data-screen="pause"] #modalBackdrop { background: #f1ebfce0; backdrop-filter: blur(10px); }
.splash-card { position: relative; flex-shrink: 0; width: 440px; max-width: 100%; padding: 30px 30px 22px; text-align: center; background: #ffffffed; border: 1px solid #fff; border-radius: 32px; box-shadow: 0 24px 70px -25px #5a19ae35, 0 4px 0 #b795e066, inset 0 0 0 5px #ffffff80; animation: card-arrive .4s ease-out; }
.edition-label { display: flex; justify-content: center; align-items: center; gap: 7px; color: #74429e; font-size: 9px; font-weight: 800; letter-spacing: 2.2px; }
.edition-label > span { height: 6px; width: 6px; border-radius: 50%; background: var(--pop-lime); }
#startTitle { margin: 8px 0 0; line-height: 0; }
#startTitle img { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; filter: drop-shadow(0 8px 8px #5a19ae33); }
.screen-subtitle { font-size: 12px; line-height: 1.6; color: var(--pool-muted); margin: 12px 0 0; }
.balloon-scene { position: relative; height: 216px; margin: 3px -10px 5px; }
.scene-orbit { position: absolute; width: 240px; height: 48px; border: 1px solid #20bbdf66; border-radius: 50%; background: radial-gradient(ellipse, #20bbdf33, transparent 70%); left: 50%; bottom: 12px; transform: translateX(-50%) rotate(-5deg); }
.orbit-back { width: 290px; height: 65px; bottom: 5px; border-color: #a220df33; }.orbit-front { box-shadow: 0 0 0 10px #e3d1f833; }
.art-balloon, .mini-balloon, .balloon-tile {
  --balloon-top: #20d8df; --balloon-rgb: 32, 187, 223; --balloon-dark: 32, 101, 223;
  background: radial-gradient(ellipse at 30% 22%, #fffffff0 0%, #ffffff30 13%, transparent 34%), radial-gradient(ellipse at 75% 80%, #ffffff75, transparent 38%), linear-gradient(150deg, var(--balloon-top) 5%, rgb(var(--balloon-rgb)) 52%, rgb(var(--balloon-dark)) 100%);
  border: 1px solid rgba(var(--balloon-dark), .65); border-radius: 48% 48% 46% 46% / 44% 44% 56% 56%;
  box-shadow: inset 2px 2px 3px #ffffffb3, inset -4px -6px 9px rgba(var(--balloon-dark), .4), inset 0 -2px 3px #ffffff9c, 0 8px 14px -7px rgba(var(--balloon-dark), .5);
}
.art-balloon::after, .mini-balloon::after, .balloon-tile::after { content: ''; position: absolute; bottom: -7%; left: 43%; width: 15%; height: 11%; background: rgba(var(--balloon-rgb), .85); clip-path: polygon(42% 0, 65% 0, 100% 88%, 68% 100%, 20% 92%, 0 80%); }
.art-balloon { position: absolute; width: 116px; height: 140px; animation: balloon-float 4s ease-in-out infinite; }
.balloon-aqua { left: calc(50% - 51px); top: 24px; width: 116px; height: 143px; z-index: 3; transform: rotate(9deg); --tilt: 9deg; }
.balloon-lilac { --balloon-top: #d64fe6; --balloon-rgb: 162, 32, 223; --balloon-dark: 90, 25, 174; width: 92px; height: 113px; left: calc(50% - 133px); top: 53px; --tilt: -19deg; animation-delay: -.9s; }
.balloon-mint { --balloon-top: #b4df20; --balloon-rgb: 98, 206, 29; --balloon-dark: 21, 148, 89; width: 91px; height: 109px; left: calc(50% + 52px); top: 62px; --tilt: 22deg; animation-delay: -1.7s; }
.balloon-shine, .tile-gloss { position: absolute; width: 17%; height: 30%; top: 12%; left: 17%; border-radius: 60%; transform: rotate(34deg); background: linear-gradient(170deg, #ffffffed, #ffffff00); pointer-events: none; }
.balloon-face { position: absolute; left: 34%; top: 48%; width: 40%; height: 25%; transform: rotate(-5deg); }
.balloon-face i { width: 5px; height: 8px; background: #235d6a; border-radius: 50%; position: absolute; top: 2px; left: 4px; }.balloon-face i + i { left: auto; right: 4px; }.balloon-face b { position: absolute; top: 8px; left: 13px; width: 16px; height: 12px; border-bottom: 2px solid #235d6a; border-radius: 50%; }
.scene-spark { position: absolute; color: #dfae20; font-size: 25px; }.spark-one { top: 22px; right: 56px; }.spark-two { top: 117px; left: 35px; font-size: 20px; color: var(--pop-violet); }
.scene-drop { position: absolute; width: 9px; height: 15px; border-radius: 70% 30% 60% 40%; background: linear-gradient(135deg, #20d8df, #2065df99); transform: rotate(35deg); }.drop-one { top: 22px; left: 89px; }.drop-two { top: 145px; right: 40px; transform: rotate(65deg); }.drop-three { top: 178px; left: 113px; width: 6px; height: 10px; }
.scene-sticker { position: absolute; z-index: 4; right: 5px; bottom: 20px; transform: rotate(-10deg); font-family: Georgia, serif; font-style: italic; font-size: 16px; color: var(--pop-violet-deep); }
.rules-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px 0 18px; border-top: 1px solid var(--pop-line); border-bottom: 1px solid var(--pop-line); text-align: left; }
.rules-strip > div { display: flex; gap: 10px; align-items: center; }.rules-strip strong { display: block; font-size: 11px; }.rules-strip small { display: block; font-size: 9px; line-height: 1.6; color: var(--pool-muted); margin-top: 3px; white-space: nowrap; }
.mini-balloon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 29px; height: 34px; flex: 0 0 29px; color: #992b42; font-weight: 900; font-size: 17px; }
.mini-hazard { --balloon-top: #e75a71; --balloon-rgb: 226, 51, 80; --balloon-dark: 166, 24, 60; color: white; }
.rules-strip > .rainbow-rule { grid-column: 1 / -1; }
.rainbow-rule .mini-balloon { color: #fff; font-size: 13px; text-shadow: 0 1px 3px #350c53; }
.mode-switch { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 18px 0 21px; text-align: left; cursor: pointer; }.mode-switch strong { font-size: 11px; }.mode-switch small { display: block; font-size: 10px; margin-top: 5px; color: var(--pool-muted); }.mode-tag { font-size: 7px; letter-spacing: .7px; background: #f3eaae; color: #63450e; border-radius: 4px; padding: 3px 5px; margin-left: 4px; vertical-align: 1px; }
.toggle-track { display: block; width: 38px; height: 23px; background: #d9c8ee; }.toggle-track::after { width: 19px; height: 19px; border: 0; box-shadow: 0 1px 3px #5a19ae33; }input:checked + .toggle-track { background: var(--pop-violet); }input:checked + .toggle-track::after { transform: translateX(15px); }
.splash-button { display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; min-height: 56px; border: 1px solid #d08bee; border-radius: 18px;
  background: radial-gradient(ellipse at 30% 0%, #ffffff70, transparent 55%), linear-gradient(180deg, #bb4ce6 0%, var(--pop-violet) 48%, #7d1dc9 100%);
  color: #fff; text-shadow: 0 1px 2px #5a19ae;
  box-shadow: 0 5px 0 var(--pop-violet-deep), 0 10px 20px #a220df30, inset 0 2px 1px #ffffff99, inset 0 -2px 3px #5a19ae55; font-size: 16px; font-weight: 800; letter-spacing: -.3px; transition: transform .15s, box-shadow .15s; }
.splash-button > span:last-child { margin-left: auto; font-size: 22px; font-weight: 400; }.splash-button { padding: 0 22px; }.splash-button > span:first-child { margin-right: auto; }.splash-button:hover { transform: translateY(-2px); filter: brightness(1.06); }.splash-button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--pop-violet-deep), inset 0 1px 2px #ffffff80; }.play-triangle { width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 10px solid white; }
.card-footnote { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 20px; font-size: 9px; color: var(--pool-muted); }.card-footnote strong { color: var(--pop-violet-deep); }.best-icon { color: #a57218; font-size: 16px; }.footnote-dot { margin: 0 3px; }
.splash-card h2 { font-size: 34px; font-weight: 900; letter-spacing: -1.5px; margin: 8px 0 0; line-height: 1.15; }
.result-art { height: 133px; position: relative; margin-top: 8px; }.result-art .scene-orbit { bottom: 0; width: 164px; height: 28px; }.trophy-balloon { --balloon-top: #e4e444; --balloon-rgb: 223, 198, 32; --balloon-dark: 214, 151, 31; width: 88px; height: 103px; top: 4px; left: calc(50% - 44px); --tilt: -8deg; }.trophy-balloon svg { position: absolute; left: 24%; top: 24%; width: 52%; height: 52%; color: #8b622c; }.result-art .scene-spark { top: 8px; left: 27%; font-size: 23px; }.result-art .scene-drop { top: 68px; right: 29%; }
.result-card .screen-subtitle { margin-top: 8px; }.score-showcase { margin: 22px 0 20px; position: relative; }.score-label { font-size: 9px; letter-spacing: 2px; font-weight: 800; color: var(--pool-muted); }#finalScoreText { font-size: 78px; font-weight: 900; letter-spacing: -4px; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--pop-violet-deep); }.record-badge { display: inline-block; padding: 5px 12px; border-radius: 20px; color: #63450e; background: #f3eaae; font-size: 10px; font-weight: 750; }
.result-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--pop-line); border-bottom: 1px solid var(--pop-line); padding: 17px 0; margin-bottom: 23px; gap: 5px; }.result-stats > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }.result-stats > div > span { color: var(--pop-violet); height: 20px; font-size: 22px; line-height: 20px; }.result-stats strong { font-size: 17px; font-variant-numeric: tabular-nums; }.result-stats small { font-size: 9px; color: var(--pool-muted); }
.quiet-button { border: 0; background: transparent; color: var(--pop-violet-deep); font-size: 11px; font-weight: 650; min-height: 44px; margin-top: 8px; padding: 8px 16px; }.quiet-button:hover { color: #891dc9; text-decoration: underline; }.save-notice { font-size: 9px; color: var(--pool-muted); margin: 0; }.pause-card { padding-top: 36px; }.pause-card .splash-button { margin-top: 28px; }.pause-symbol { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: #eee0fb; font-size: 28px; color: var(--pop-violet-deep); margin: 0 auto 22px; }
/* Gameplay: the complete cell remains clickable, including the balloon knot. */
.balloon-tile { position: absolute; inset: 0 2% 6%; cursor: pointer; padding: 0; pointer-events: auto; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.25); transition: transform .18s cubic-bezier(.2,1.6,.4,1), opacity .14s; overflow: visible; touch-action: manipulation; }
.balloon-tile.tile-active { opacity: 1; transform: scale(1); animation: balloon-wobble 2.4s ease-in-out infinite; }
.balloon-tile::before { content: ''; position: absolute; inset: 0 0 -8%; border-radius: inherit; }
.balloon-tile.tile-pressed { animation: balloon-pop .16s ease-out forwards; pointer-events: none; }
.balloon-tile.tile-expired { transform: translateY(-8px) scale(.65); opacity: 0; pointer-events: none; animation: none; }
.tile-hazard { --balloon-rgb: 230, 114, 131; --balloon-dark: 189, 44, 74; }
.tile-rainbow, .mini-rainbow {
  --balloon-rgb: 162, 32, 223; --balloon-dark: 90, 25, 174;
  background: radial-gradient(ellipse at 28% 20%, #fffffff0, #ffffff30 15%, transparent 35%), linear-gradient(135deg, #e23350 5%, #df8f20 20%, #dfc620 34%, #62ce1d 47%, #20bbdf 61%, #336ee2 76%, #a220df 92%);
  border-color: #8b31d5;
  box-shadow: inset 2px 2px 3px #ffffffc9, inset -3px -5px 8px #5a19ae55, 0 0 0 2px #ffffffc9, 0 0 16px #a220df60;
}
.tile-rainbow::after, .mini-rainbow::after { background: linear-gradient(90deg, #20bbdf, #a220df, #e64fbd); }
.rainbow-label { position: relative; z-index: 2; color: #fff; font-size: clamp(15px, 3.5vw, 23px); font-weight: 900; line-height: 1; text-shadow: 0 2px 2px #350c53, 0 0 5px #350c53; pointer-events: none; }
.tile-timer-ring { position: absolute; inset: 8%; width: 84%; height: 84%; transform: rotate(-90deg); pointer-events: none; opacity: .8; }.tile-hazard > svg:last-child { color: #fff; filter: drop-shadow(0 1px 2px #87133b); }.tile-safe > .safe-pip { width: 6px; height: 6px; background: #ffffffc9; border-radius: 50%; }
.arena-wrapper { gap: clamp(5px, 1.4vw, 10px); }.grid-cell { border-radius: 50%; background: radial-gradient(ellipse, #a220df0d 0%, #ffffff00 65%); }
header .hud-glass { background: #fffffff0; border-color: #fff; border-radius: 22px; }.hud-glass .text-slate-900 { color: var(--pop-violet-deep); }#muteBtn, #pauseBtn { min-width: 40px; min-height: 40px; color: #253c86; background: linear-gradient(180deg, #effdfd, #a7e6f2); border-color: #7dd5ed; box-shadow: 0 3px 0 #5699ca, inset 0 2px 1px #fff; }footer { flex-direction: column-reverse; gap: 9px; padding-bottom: 8px !important; }footer > div:first-child { font-size: 8px; opacity: .65; }#liveRuleHint { font-size: 11px; color: var(--pool-muted); }#sdkStatusDot { width: 5px; height: 5px; }
/* UI accents repeat the cyan, violet, lime, and yellow balloon colors. */
.pool-waves path:first-child { fill: var(--pop-cyan); fill-opacity: .13; }
.pool-waves path:last-child { fill: var(--pop-blue); fill-opacity: .08; }
.ambient-orb.bg-sky-200 { background-color: #aee7f3; }
.ambient-orb.bg-indigo-200 { background-color: #dec8f7; }
.ambient-orb.bg-teal-100 { background-color: #e8e0fb; }
.splash-card { border-color: #e6d8f9; }
.splash-card h2 { color: var(--pop-violet-deep); }
.edition-label > span { box-shadow: 0 0 0 3px #62ce1d1a; }
.toggle-track { box-shadow: inset 0 2px 4px #5a19ae1a; }
input:checked + .toggle-track { background: linear-gradient(180deg, #bb4ce6, var(--pop-violet-deep)); }
.mode-tag, .record-badge { border: 1px solid #dfc620; box-shadow: inset 0 1px #fff9; }
.quiet-button { border: 1px solid var(--pop-line); border-radius: 12px; background: #f6f1fd; }
.quiet-button:hover { background: #ede1fb; }
.pause-symbol { border: 1px solid #d7bdf6; box-shadow: inset 0 2px 2px #fff, 0 4px 0 #d7bdf6; }
.result-stats > div:nth-child(1) > span { color: #a57218; }
.result-stats > div:nth-child(2) > span { color: var(--pop-violet); }
.result-stats > div:nth-child(3) > span { color: #167196; }
.result-stats > div:nth-child(4) > span { color: #2d7511; }
header .hud-glass { border-color: #e6d8f9; box-shadow: 0 4px 0 #d7bdf655, 0 10px 25px #5a19ae10, inset 0 2px #fff; }
header .text-slate-400, header .text-slate-500 { color: var(--pool-muted); }
#bestScoreHud { color: var(--pop-violet-deep); }
#comboBadge { background: #f3eaae; border-color: var(--pop-yellow); color: #63450e; }
#speedBadge.text-sky-600 { color: var(--pop-blue); }
#muteBtn:hover, #pauseBtn:hover { background: linear-gradient(180deg, #fff, #c2eff6); box-shadow: 0 4px 0 #5699ca, inset 0 2px 1px #fff; }
#muteBtn:active, #pauseBtn:active { box-shadow: 0 1px 0 #5699ca; }
#livesContainer > .bg-rose-50 { color: #d43157; background: linear-gradient(180deg, #fdf2f8, #f9d9e9); border-color: #f2a7c9; box-shadow: inset 0 1px #fff, 0 2px 0 #f5bad5; }
#livesContainer > .scale-90 { color: #c3aedb; background: #f0e8fa; border-color: #e0d2ef; }
#mainShakeContainer .pointer-events-none { border-color: #be9ce8; }
/* Override the legacy utility's focus reset so HUD buttons retain a visible ring. */
button:focus-visible { outline: 3px solid var(--pop-violet-deep); outline-offset: 5px; }
@keyframes balloon-float { 0%, 100% { transform: translateY(0) rotate(var(--tilt, 0deg)); } 50% { transform: translateY(-9px) rotate(calc(var(--tilt, 0deg) + 4deg)); } }
@keyframes balloon-wobble { 0%,100% { transform: rotate(-3deg) scale(1); } 50% { transform: rotate(3deg) scale(.97, 1.025); } }
@keyframes balloon-pop { 0% { transform: scale(1); opacity: 1; } 45% { transform: scale(1.18, .88); opacity: .7; } 100% { transform: scale(1.35, .6); opacity: 0; } }
@keyframes card-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 650px) { .corner-brand { display: none; }.splash-card { width: 400px; padding: 26px 24px 20px; }.scenery-bubble { opacity: .5; } }
@media (max-width: 370px) { #modalBackdrop { padding: 14px 12px; }.splash-card { padding: 23px 18px 18px; border-radius: 26px; }.screen-subtitle { font-size: 10px; }.balloon-scene { margin-left: -18px; margin-right: -18px; }.rules-strip { gap: 8px; }.rules-strip > div { gap: 7px; }.rules-strip strong { font-size: 10px; }.rules-strip small { font-size: 8px; }.card-footnote { font-size: 8px; gap: 4px; }header .min-w-\[115px\] { min-width: 0; }header .hud-glass { padding: 10px; gap: 5px; }#livesContainer { gap: 3px; }#livesContainer > div { width: 22px; height: 24px; } }
@media (max-height: 760px) { #modalBackdrop { padding-top: 14px; padding-bottom: 14px; }.splash-card { padding-top: 22px; padding-bottom: 17px; }.balloon-scene { height: 190px; }.mode-switch { padding: 14px 0 18px; }.card-footnote { margin-top: 16px; }.result-art { height: 116px; }.result-card .score-showcase { margin: 14px 0; }.result-stats { padding: 14px 0; margin-bottom: 19px; } }
@media (max-height: 620px) { #modalBackdrop { align-items: flex-start; }.balloon-scene { height: 160px; transform: scale(.84); margin-top: -8px; margin-bottom: -8px; }.splash-card { padding-top: 18px; }.rules-strip { padding: 12px 0; }.splash-button { min-height: 50px; }.result-art { height: 96px; }.trophy-balloon { width: 68px; height: 80px; left: calc(50% - 34px); }#finalScoreText { font-size: 63px; }.splash-card h2 { font-size: 30px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; }.balloon-tile.tile-pressed { opacity: 0; } }
