/* Ribbit's Rhyme Pond — game styles.
   A sunny pond: warm morning sky over teal-green water, lily pads, reeds and
   coral accents. Palette deliberately distinct from every other game in the
   suite (no other game lives on green-teal water with coral). */

:root {
    --rp-sky-top: #FDF4CD;
    --rp-sky-bot: #CDEDD6;
    --rp-water-top: #7FD8C0;
    --rp-water-deep: #2E9E8C;
    --rp-pad: #6FBF4A;
    --rp-pad-dark: #4E9A2E;
    --rp-pad-light: #9BD96E;
    --rp-coral: #FF7E67;
    --rp-cream: #FFF9E8;
    --rp-ink: #1E5E56;
}

.screen {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.scene { position: absolute; inset: 0; z-index: 0; }
.scene .bg-svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ── Backdrop life ── */
.rp-sunrays { transform-box: fill-box; transform-origin: center; animation: rp-spin 70s linear infinite; }
@keyframes rp-spin { to { transform: rotate(360deg); } }
.rp-cloud { will-change: transform; }
.rp-cloud-a { animation: rp-drift-a 110s linear infinite; animation-delay: -40s; }
.rp-cloud-b { animation: rp-drift-b 150s linear infinite; animation-delay: -95s; }
@keyframes rp-drift-a { from { transform: translate(-140px, 70px) scale(0.9); } to { transform: translate(1140px, 70px) scale(0.9); } }
@keyframes rp-drift-b { from { transform: translate(-200px, 150px) scale(0.65); } to { transform: translate(1180px, 150px) scale(0.65); } }
.rp-ripple { animation: rp-ripple 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes rp-ripple { 0%, 100% { transform: scale(0.8); opacity: 0.5; } 50% { transform: scale(1.1); opacity: 1; } }
.rp-reed-band { transform-box: fill-box; transform-origin: 50% 100%; animation: rp-reed-sway 6.5s ease-in-out infinite; }
@keyframes rp-reed-sway { 0%, 100% { transform: skewX(-1.4deg); } 50% { transform: skewX(1.6deg); } }
.rp-dfly { animation: rp-dfly-path 26s ease-in-out infinite; }
@keyframes rp-dfly-path {
    0%   { transform: translate(180px, 180px); }
    25%  { transform: translate(560px, 90px); }
    50%  { transform: translate(840px, 210px); }
    75%  { transform: translate(420px, 260px); }
    100% { transform: translate(180px, 180px); }
}
.rp-dfly-wings { animation: rp-wing 0.24s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes rp-wing { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.55); } }

/* ── Ribbit rig ── */
.ribbit-svg { width: 100%; height: auto; display: block; overflow: visible; }
.rp-lid, .rb-rig .rp-lid { transform-box: fill-box; transform-origin: center; transform: scaleY(0); animation: rp-blink 4.4s ease-in-out infinite; }
@keyframes rp-blink { 0%, 93%, 100% { transform: scaleY(0); } 96%, 98% { transform: scaleY(1); } }
.rb-mouth-open { opacity: 0; }
.rb-croak { opacity: 0; }
.rb-throat { transform-box: fill-box; transform-origin: center; }
.croaking .rb-throat { animation: rp-throat 0.45s ease-in-out 2; }
.croaking .rb-croak { animation: rp-croak-pop 0.9s ease-out; }
@keyframes rp-throat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.22, 1.3); } }
@keyframes rp-croak-pop { 0% { opacity: 0; transform: translateY(6px); } 30%, 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
.rb-arm { transform-box: fill-box; transform-origin: 80% 10%; transition: transform 0.3s; }
.cheer .rb-arm-l { transform: rotate(130deg) translate(-6px, -4px); }
.cheer .rb-arm-r { transform: rotate(-130deg) translate(6px, -4px); }
.rb-head { transform-box: fill-box; transform-origin: 50% 90%; transition: transform 0.35s; }
.ask .rb-head { transform: rotate(-5deg); }
.think .rb-head { transform: rotate(6deg) translateY(2px); }
.sing .rb-mouth { opacity: 0; }
.sing .rb-mouth-open { opacity: 1; }
.sing .rb-head { animation: rp-sing-bob 0.8s ease-in-out infinite; }
@keyframes rp-sing-bob { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.wiggling .rb-rig { animation: rp-wiggle-rig 0.65s ease-in-out 2; transform-box: fill-box; transform-origin: 50% 88%; }
@keyframes rp-wiggle-rig { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }

/* ══════════ TITLE ══════════ */
#screen-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-content: safe center;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding: 14px 16px calc(var(--gk-corner-clear) + 4px);
    text-align: center;
}
#screen-title > *:not(.scene):not(.star-pill):not(.info-btn) { position: relative; z-index: 2; flex-shrink: 0; }
#screen-title .scene { z-index: 0; }

.game-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    filter: drop-shadow(0 4px 0 rgba(20, 80, 70, 0.16));
}
.logo-top {
    font-size: clamp(1.15rem, 4.6vw, 1.9rem);
    color: #fff;
    background: var(--rp-coral);
    padding: 3px 18px;
    border-radius: 30px;
    transform: rotate(-3deg);
    box-shadow: 0 4px 0 #D2543F;
    letter-spacing: 1px;
}
.logo-main {
    font-size: clamp(2.2rem, 9vw, 3.9rem);
    color: #fff;
    -webkit-text-stroke: 3px #1E7A6A;
    text-shadow: 0 5px 0 #1E7A6A, 0 7px 12px rgba(10, 60, 50, 0.3);
    margin-top: -2px;
}

.ribbit-title-wrap { position: relative; width: clamp(130px, 27vw, 185px); margin: 0 0 2px; }
#title-pad { position: absolute; left: 50%; bottom: -8px; width: 120%; transform: translateX(-50%); }
#title-pad .pad-svg { width: 100%; height: auto; display: block; }
#ribbit-title { position: relative; z-index: 2; }

#btn-start { font-size: clamp(1.4rem, 5vw, 1.9rem); min-height: 78px; padding: 14px 54px; }

.level-row { display: flex; gap: clamp(8px, 2.4vw, 18px); justify-content: center; margin-top: 6px; }
.lvl-btn {
    position: relative;
    width: min(118px, calc((100vw - 32px - 24px) / 3));
    min-width: 0;
    min-height: 106px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 249, 232, 0.94);
    box-shadow: 0 6px 16px rgba(20, 90, 75, 0.22);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 8px 4px 9px;
    transition: transform 0.15s;
    color: var(--rp-ink);
}
.lvl-btn:active { transform: scale(0.95); }
.lvl-lily { width: 34px; height: 34px; display: block; }
.lily-svg { width: 100%; height: 100%; display: block; }
.lvl-num { font-weight: 900; font-size: 1.15rem; margin-top: -28px; padding-top: 24px; }
.lvl-name { font-size: 0.72rem; font-weight: 800; line-height: 1.1; }
.lvl-stars { font-size: 0.72rem; letter-spacing: 1px; }
.lvl-stars .dim { filter: grayscale(1) opacity(0.35); }
.lvl-lock { display: none; position: absolute; top: 6px; right: 8px; font-size: 1.15rem; }
.lvl-btn.locked { opacity: 0.82; }
.lvl-btn.locked .lvl-lily { filter: grayscale(0.8) opacity(0.6); }
.lvl-btn.locked .lvl-lock { display: block; }
.lvl-btn.shake { animation: rp-shake 0.4s; }
@keyframes rp-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-7px) rotate(-2deg); } 65% { transform: translateX(7px) rotate(2deg); } }
.lvl-btn.just-unlocked { animation: rp-unlock-pop 0.9s cubic-bezier(0.2, 1.5, 0.4, 1); box-shadow: 0 0 0 4px #FFE79A, 0 10px 22px rgba(232, 168, 40, 0.5); }
@keyframes rp-unlock-pop { 0% { transform: scale(0.7); } 55% { transform: scale(1.14); } 100% { transform: scale(1); } }

/* Star tally lives in the free top-LEFT corner (the HUD owns the top-right). */
.star-pill {
    position: absolute;
    top: var(--gk-hud-inset-top);
    left: 12px;
    z-index: 3;
    background: rgba(255, 249, 232, 0.94);
    border-radius: 30px;
    padding: 10px 15px;
    font-size: 1.05rem;
    font-weight: 900;
    color: #C9803A;
    box-shadow: 0 5px 14px rgba(20, 90, 75, 0.2);
}

/* Tadpole chorus strip (the collection, tap to hear it sing) */
.chorus-btn {
    position: relative;
    width: min(92vw, 430px);
    min-height: 86px;
    margin-top: 8px;
    border: none;
    border-radius: 26px;
    cursor: pointer;
    background: linear-gradient(180deg, #8FDFCB, var(--rp-water-deep));
    box-shadow: inset 0 3px 8px rgba(255, 255, 255, 0.45), 0 8px 18px rgba(15, 90, 78, 0.3);
    overflow: hidden;
    padding: 8px 12px;
    color: #fff;
}
.chorus-label {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 900;
    font-size: 0.98rem;
    text-shadow: 0 2px 3px rgba(10, 70, 60, 0.5);
    pointer-events: none;
}
#chorus-count {
    background: rgba(255, 249, 232, 0.95);
    color: var(--rp-ink);
    border-radius: 20px;
    padding: 3px 12px;
    text-shadow: none;
}
#chorus-hint { position: relative; z-index: 3; display: block; font-size: 0.74rem; opacity: 0.95; margin-top: 3px; pointer-events: none; text-shadow: 0 1px 2px rgba(10, 70, 60, 0.5); }
#chorus-pool { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.chorus-tad { position: absolute; width: 40px; }
.chorus-tad .tad-svg { width: 100%; height: auto; display: block; transform: scaleX(var(--flip, 1)); }
.chorus-tad { animation: rp-tad-swim 3.6s ease-in-out infinite; animation-delay: var(--wig-delay, 0s); }
@keyframes rp-tad-swim { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-6px) rotate(5deg); } }
.chorus-tad.sing { animation: rp-tad-sing 0.55s ease-in-out; animation-delay: var(--sing-delay, 0s); }
@keyframes rp-tad-sing { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-12px) scale(1.25); } }
.chorus-more {
    position: absolute;
    right: 10px;
    bottom: 8px;
    background: rgba(255, 249, 232, 0.95);
    color: var(--rp-ink);
    font-weight: 900;
    font-size: 0.8rem;
    border-radius: 14px;
    padding: 2px 9px;
}

/* ══════════ PLAY ══════════ */
#screen-play { display: flex; flex-direction: column; }
#screen-play .scene { z-index: 0; }

#play-top {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    padding: 10px 12px 0;
}
#tracker { display: flex; gap: clamp(5px, 1.4vw, 12px); }
.trk-slot {
    width: clamp(34px, 7.4vw, 52px);
    height: clamp(30px, 6.4vw, 44px);
    border-radius: 50% 50% 46% 46%;
    background: rgba(255, 249, 232, 0.5);
    border: 2.5px dashed rgba(255, 255, 255, 0.9);
    display: grid;
    place-items: center;
    padding: 2px;
}
.trk-slot.done { background: rgba(255, 249, 232, 0.95); border-style: solid; border-color: #fff; box-shadow: 0 3px 8px rgba(15, 90, 78, 0.25); }
.trk-slot .tad-svg { width: 100%; height: auto; display: block; }
.trk-slot.pulse { animation: rp-slot-pulse 0.5s ease; }
@keyframes rp-slot-pulse { 50% { transform: scale(1.25); filter: brightness(1.15); } }

/* The target: picture + spoken word — tap any time to hear it again */
#prompt-row { position: relative; z-index: 5; display: flex; justify-content: center; padding: 8px 12px 0; }
#target-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 96px;
    max-width: min(94vw, 520px);
    border: none;
    border-radius: 24px;
    background: rgba(255, 249, 232, 0.96);
    box-shadow: 0 8px 20px rgba(15, 90, 78, 0.28);
    padding: 10px 16px;
    cursor: pointer;
    color: var(--rp-ink);
    text-align: left;
}
#target-card:active { transform: scale(0.97); }
#target-card.pop { animation: rp-card-pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes rp-card-pop { 0% { transform: scale(0.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
#target-pic { width: clamp(64px, 14vw, 84px); flex: 0 0 auto; }
#target-pic .pic-svg, #target-pic .note-svg { width: 100%; height: auto; display: block; }
.target-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
#target-word { font-size: clamp(1.3rem, 4.6vw, 1.8rem); font-weight: 900; text-transform: capitalize; letter-spacing: 0.5px; }
#target-ask { font-size: clamp(0.78rem, 2.6vw, 0.95rem); font-weight: 700; opacity: 0.85; line-height: 1.3; }
.target-ear { flex: 0 0 auto; font-size: 1.5rem; align-self: flex-start; animation: rp-ear-pulse 2.4s ease-in-out infinite; }
@keyframes rp-ear-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
#target-card.verse-mode #target-word { display: none; }
#target-card.verse-mode #target-ask { font-size: clamp(0.8rem, 2.7vw, 1rem); font-style: italic; }
#target-card.odd-mode #target-word { display: none; }
#target-card.odd-mode #target-ask { font-size: clamp(0.95rem, 3.2vw, 1.15rem); }

/* The pond + lily pads */
#pond {
    position: relative;
    z-index: 4;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px clamp(96px, 17vh, 150px);
    min-height: 0;
}
.pad-row { display: flex; gap: clamp(10px, 2.6vw, 26px); justify-content: center; align-items: center; width: 100%; }
.pad-btn {
    position: relative;
    width: min(220px, calc((100% - 20px) / 2));
    min-width: 0;
    aspect-ratio: 1 / 1.04;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    display: block;
    animation: rp-pad-in 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) backwards, rp-pad-bob 4.2s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.12s), var(--bob-delay, 0s);
}
.pad-row.count-3 .pad-btn { width: min(196px, calc((100% - 2 * 10px) / 3)); }
@keyframes rp-pad-in { 0% { transform: translateY(46px) scale(0.7); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes rp-pad-bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1.2deg); } }
.pad-water { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; }
.pad-water .pad-svg { width: 100%; height: auto; display: block; }
.pad-pic {
    position: absolute;
    left: 50%;
    bottom: 26%;
    width: 74%;
    transform: translateX(-50%);
    z-index: 2;
    filter: drop-shadow(0 4px 5px rgba(15, 80, 65, 0.3));
}
.pad-pic .pic-svg { width: 100%; height: auto; display: block; }
.pad-word {
    position: absolute;
    left: 50%;
    bottom: 4%;
    transform: translateX(-50%);
    z-index: 3;
    background: rgba(255, 249, 232, 0.95);
    color: var(--rp-ink);
    font-weight: 900;
    font-size: clamp(0.78rem, 2.6vw, 1rem);
    border-radius: 14px;
    padding: 2px 12px;
    box-shadow: 0 2px 6px rgba(15, 80, 65, 0.25);
}
.pad-btn.pressed { transform: scale(0.94); }
.pad-btn.naming { animation: rp-naming 0.7s ease; }
@keyframes rp-naming { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.12) translateY(-6px); } }
.pad-btn.wobble { animation: rp-wobble 0.7s ease; }
@keyframes rp-wobble {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(-7deg) translateX(-5px); }
    45% { transform: rotate(6deg) translateX(5px); }
    70% { transform: rotate(-4deg); }
}
.pad-btn.landed .pad-pic { animation: rp-landed-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes rp-landed-pop { 0% { transform: translateX(-50%) scale(1); } 45% { transform: translateX(-50%) scale(1.18); } 100% { transform: translateX(-50%) scale(1); } }
.pad-btn.sunk {
    animation: rp-pad-sunk-settle 0.7s ease forwards;
    filter: saturate(0.45) brightness(0.88);
    cursor: pointer;
}
@keyframes rp-pad-sunk-settle { to { transform: translateY(18px) scale(0.93); opacity: 0.72; } }
.pad-btn.sunk .pad-word { opacity: 0.75; }
.pad-btn.buoy { animation: rp-pad-bob 2.4s ease-in-out infinite; }
.pad-btn.buoy .pad-water .pad-svg { filter: drop-shadow(0 0 14px rgba(255, 231, 154, 0.95)); }
.pad-btn.buoy .pad-word { box-shadow: 0 0 0 3px #FFE79A, 0 2px 6px rgba(15, 80, 65, 0.25); }

/* Ribbit at the pond edge */
#ribbit-play {
    position: absolute;
    right: clamp(4px, 3vw, 46px);
    bottom: clamp(6px, 2vh, 22px);
    width: clamp(100px, 19vw, 150px);
    z-index: 6;
    pointer-events: none;
}

.rp-shore {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: clamp(44px, 8vh, 66px);
    z-index: 5;
    pointer-events: none;
}
#play-shore { position: absolute; inset: 0; pointer-events: none; z-index: 5; }

/* splash + bubbles + flying tadpole */
.splash { position: fixed; z-index: 60; pointer-events: none; width: 0; height: 0; }
.spl-ring {
    position: absolute;
    left: -30px;
    top: -12px;
    width: 60px;
    height: 24px;
    border: 4px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: rp-ring 0.7s ease-out forwards;
}
.spl-ring.r2 { animation-delay: 0.14s; border-width: 3px; }
@keyframes rp-ring { 0% { transform: scale(0.3); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
.splash.small .spl-ring { border-color: rgba(255, 255, 255, 0.7); }
.spl-drop {
    position: absolute;
    left: -4px;
    top: -6px;
    width: 9px;
    height: 9px;
    border-radius: 50% 50% 60% 60%;
    background: #BFF0E4;
    animation: rp-drop 0.6s ease-out forwards;
}
@keyframes rp-drop {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--dx, 0), var(--dy, -40px)) scale(0.5); opacity: 0; }
}
.air-bubble {
    position: fixed;
    z-index: 60;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.9);
    background: rgba(191, 240, 228, 0.5);
    pointer-events: none;
}
.fly-tad { position: fixed; z-index: 70; width: 54px; pointer-events: none; }
.fly-tad .tad-svg { width: 100%; height: auto; display: block; }

/* ══════════ HOW-TO ══════════ */
#howto-layer {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(12, 55, 48, 0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: gk-fade-in 0.3s ease;
    cursor: pointer;
}
.howto-card { text-align: center; max-width: min(92vw, 460px); }
.howto-text {
    color: #fff;
    font-size: clamp(1.05rem, 3.6vw, 1.4rem);
    font-weight: 800;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    line-height: 1.35;
    margin-bottom: 10px;
}
#howto-target { display: inline-block; width: 84px; background: var(--rp-cream); border-radius: 18px; padding: 8px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); }
#howto-target .pic-wrap .pic-svg { width: 100%; height: auto; display: block; }
#howto-pads { display: flex; gap: 22px; justify-content: center; margin-top: 14px; }
.howto-pad { position: relative; width: 108px; display: block; }
.howto-pad .pad-svg { width: 100%; height: auto; display: block; }
.howto-pad .pic-svg { position: absolute; left: 50%; bottom: 30%; width: 72%; transform: translateX(-50%); }
.howto-pad.right::after {
    content: '👆';
    position: absolute;
    right: -12px;
    bottom: -22px;
    font-size: 2.3rem;
    animation: rp-hand-tap 1.15s ease-in-out infinite;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.4));
}
@keyframes rp-hand-tap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ══════════ GROWN-UPS ══════════ */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 55, 48, 0.55);
    animation: gk-fade-in 0.25s ease;
    padding: 16px;
}
.overlay-card {
    position: relative;
    max-width: min(92vw, 470px);
    max-height: min(84vh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
    text-align: left;
}
.overlay-card h3 { color: #E8654E; margin-bottom: 8px; font-size: 1.4rem; }
.overlay-card p { font-size: 1rem; line-height: 1.5; margin-bottom: 9px; }
.close-btn {
    position: sticky;
    top: 0;
    float: right;
    width: 64px;
    height: 64px;
    margin: -6px -8px 0 8px;
    border: none;
    border-radius: 50%;
    background: var(--gk-red);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
.close-btn:active { transform: scale(0.9); }
.tip-row { display: flex; gap: 10px; align-items: flex-start; background: #EAF7EE; border-radius: 14px; padding: 10px 12px; }
.tip-row p { margin: 0; font-size: 0.95rem; }
.tip-icons { font-size: 1.4rem; }

.info-btn {
    position: absolute;
    bottom: 14px;
    left: 14px;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 249, 232, 0.92);
    box-shadow: 0 4px 12px rgba(15, 80, 65, 0.3);
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 40;
}
.info-btn:active { transform: scale(0.92); }

/* ══════════ RESPONSIVE ══════════ */

/* Keep every screen's content out of the fixed HUD band on phones. */
@media (max-width: 719px) {
    #screen-title { padding-top: var(--gk-hud-clear-top); }
}
@media (max-width: 760px) {
    #play-top { padding-top: var(--gk-hud-clear-top); }
}

/* Short screens: shrink the tall decorative pieces, keep the tap targets. */
@media (max-height: 640px) {
    #screen-title { gap: 6px; padding-bottom: calc(var(--gk-corner-btn) + 20px); }
    .logo-main { font-size: clamp(2rem, 8vw, 2.6rem); }
    .ribbit-title-wrap { width: clamp(96px, 20vw, 128px); }
    .chorus-btn { min-height: 68px; padding: 6px 12px; }
    .chorus-label { font-size: 0.9rem; }
    .lvl-btn { min-height: 96px; }
    .lvl-lily { width: 28px; height: 28px; }
    .lvl-num { margin-top: -24px; padding-top: 20px; }
    #btn-start { min-height: 64px; padding: 10px 46px; }
    #pond { padding-bottom: clamp(86px, 15vh, 120px); }
    #ribbit-play { width: clamp(88px, 17vw, 120px); }
}

/* Very narrow: tighten gaps so three pads still clear 88px each. */
@media (max-width: 360px) {
    #pond { padding-left: 8px; padding-right: 8px; }
    .pad-row { gap: 8px; }
    .pad-row.count-3 .pad-btn { width: calc((100% - 16px) / 3); }
}

/* ══════════ REDUCED MOTION ══════════ */
@media (prefers-reduced-motion: reduce) {
    .rp-sunrays, .rp-cloud, .rp-ripple, .rp-reed-band, .rp-dfly, .rp-dfly-wings,
    .rp-lid, .chorus-tad, .chorus-tad.sing, .target-ear,
    .trk-slot.pulse, .pad-btn, .pad-btn.naming, .pad-btn.wobble, .pad-btn.buoy,
    .pad-btn.landed .pad-pic, .howto-pad.right::after,
    .croaking .rb-throat, .croaking .rb-croak, .sing .rb-head, .wiggling .rb-rig,
    .lvl-btn.just-unlocked, .lvl-btn.shake, #target-card.pop,
    .spl-ring, .spl-drop { animation: none !important; }
    .pad-btn.sunk { animation: none !important; transform: translateY(18px) scale(0.93); opacity: 0.72; }
    .spl-ring { opacity: 0; }
}
