:root{--pond-deep:#087ca0;--pond-light:#52c9d7;--pad:#68b52f;--pad-dark:#2b771c;--gold:#f5bd24}
.lily-main{padding-bottom:42px;background:#eef9f5}
.lily-page-header{padding:22px 20px;color:#fff;background:linear-gradient(120deg,#175f47,#178a80)}
.lily-page-header>div,.lily-card{width:min(1080px,100%);margin:auto}
.lily-page-header h1{margin:5px 0;font-size:clamp(2rem,5vw,3.2rem)}
.lily-page-header p{margin:0}.lily-page-header a{color:#fff;font-weight:800}.section-label{font-size:.82rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.lily-card{margin-top:24px;padding:22px;background:#fff;border:1px solid var(--color-border);border-radius:16px;box-shadow:var(--shadow-card)}
.game-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:12px}.game-heading h2{margin:0 0 4px}.game-heading p{margin:0;color:var(--color-muted)}
.move-display{flex:0 0 auto;min-width:112px;padding:10px 14px;text-align:center;color:#174f42;background:#e0f7ec;border:2px solid #72bea1;border-radius:999px;font-weight:800}.move-display strong{font-size:1.25rem}
.game-status{min-height:1.5em;margin:10px 0 12px;text-align:center;color:#265648;font-weight:800}.game-status.invalid{color:#9b2f1d}.game-status.hint{color:#7b5700}
.pond-scene{position:relative;isolation:isolate;overflow:hidden;min-height:300px;padding:100px 18px 55px;background:radial-gradient(ellipse at 52% 28%,rgba(255,255,255,.38) 0 5%,transparent 22%),repeating-radial-gradient(ellipse at 50% 55%,transparent 0 42px,rgba(255,255,255,.17) 44px 47px,transparent 49px 75px),linear-gradient(180deg,var(--pond-light),var(--pond-deep));border:3px solid #13718b;border-radius:20px;box-shadow:inset 0 0 45px rgba(0,65,92,.34)}
.pond-scene::before,.pond-scene::after{content:"";position:absolute;z-index:-1;top:-35px;width:250px;height:145px;background:radial-gradient(ellipse at center,#7dbb3d 0 30%,transparent 32%),radial-gradient(ellipse at 30% 60%,#568c2b 0 23%,transparent 25%);opacity:.68}.pond-scene::before{left:-80px;transform:rotate(12deg)}.pond-scene::after{right:-80px;transform:scaleX(-1) rotate(12deg)}
.pond-shine{position:absolute;inset:0;background:linear-gradient(110deg,transparent 20%,rgba(255,255,255,.16) 37%,transparent 52%);pointer-events:none}
.lily-board{position:relative;z-index:3;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:clamp(3px,1.2vw,14px);width:min(970px,100%);margin:auto}
.lily-pad{position:relative;display:grid;place-items:center;aspect-ratio:1.4/1;min-width:0;padding:0;background:radial-gradient(ellipse at 42% 36%,#9cda50 0 16%,#6fba34 42%,#3b8724 74%,#245f1d 100%);border:2px solid #245d1c;border-radius:50% 50% 48% 48%;box-shadow:0 10px 0 #15536b,0 14px 14px rgba(0,45,70,.32);cursor:default;-webkit-tap-highlight-color:transparent}
.lily-pad::after{content:"";position:absolute;right:2%;top:0;width:47%;height:46%;background:var(--pond-deep);clip-path:polygon(100% 0,100% 100%,0 0);transform:rotate(-4deg);transform-origin:100% 0;opacity:.95}
.lily-pad.empty::before{content:"";position:absolute;inset:14%;border:2px dashed rgba(255,255,255,.62);border-radius:50%;opacity:.7}
.frog-button{position:absolute;z-index:4;display:grid;place-items:center;width:112%;height:145%;bottom:9%;left:-6%;padding:0;background:transparent;border:0;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;filter:drop-shadow(0 5px 3px rgba(0,45,30,.42))}
.frog-button:focus-visible{outline:4px solid #fff;outline-offset:2px;border-radius:50%}.frog-button img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.frog-button.golden{transform:scaleX(-1)}
.frog-button.invalid{animation:invalid-shake .32s ease}.frog-button.hint-source{animation:hint-bob .75s ease-in-out infinite;filter:drop-shadow(0 0 9px #ffe35a)}.lily-pad.hint-target{box-shadow:0 10px 0 #15536b,0 0 0 5px #ffe35a,0 0 22px 8px rgba(255,227,90,.8)}
.frog-button[disabled]{cursor:wait}.flight-layer{position:absolute;z-index:8;inset:0;pointer-events:none}.flying-frog{position:absolute;transform-origin:center;object-fit:contain;filter:drop-shadow(0 8px 5px rgba(0,45,30,.45));animation:hop .34s cubic-bezier(.25,.78,.38,1) forwards}
.reeds{position:absolute;z-index:1;bottom:-4px;display:flex;align-items:flex-end;gap:9px;height:95px}.reeds-left{left:12px}.reeds-right{right:12px;transform:scaleX(-1)}.reeds i{display:block;width:5px;height:72px;background:#477925;border-radius:8px;transform:rotate(-7deg);transform-origin:bottom}.reeds i:nth-child(2){height:92px;transform:rotate(5deg)}.reeds i:nth-child(3){height:63px;transform:rotate(12deg)}.reeds i::before{content:"";display:block;width:12px;height:32px;margin-left:-4px;background:#865018;border-radius:55%;transform:translateY(-22px)}
.game-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:18px}.game-controls button,.return-button,.result-actions button,.result-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:9px 18px;border:2px solid #246b57;border-radius:10px;background:#fff;color:#205b4b;font:inherit;font-weight:900;text-decoration:none;cursor:pointer}.game-controls button:disabled{opacity:.45;cursor:not-allowed}.game-controls .hint-button,.result-actions .primary-action{color:#fff;background:#287e65}.return-button{border-color:#785b24;color:#684b12}
.rules-card{margin-top:18px;border:1px solid #b9d9cd;border-radius:12px;background:#f3fbf8}.rules-card summary{padding:13px 16px;font-weight:900;cursor:pointer}.rules-content{padding:0 18px 14px;color:#315c50}.rules-content li+li{margin-top:7px}
.companion-link{margin:18px 0 0;text-align:center;color:#315c50}.companion-link a{color:#205b4b;font-weight:900}
.result-overlay[hidden]{display:none}.result-overlay{position:fixed;z-index:1000;inset:0;display:grid;place-items:center;padding:20px;background:rgba(4,36,43,.74)}.result-card{position:relative;overflow:hidden;width:min(500px,100%);padding:28px;text-align:center;background:#fff;border-radius:18px;box-shadow:0 22px 70px rgba(0,0,0,.35)}.result-card h2{margin:4px 0 10px;color:#174f42}.result-kicker{margin:0;color:#8a6510;font-size:.8rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.result-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:20px}.victory-moves{font-size:1.15rem;font-weight:900}.perfect-message{padding:10px;color:#624600;background:#fff1ae;border-radius:9px;font-weight:900}.stuck-card{border-top:8px solid #d38329}.victory-card{border-top:8px solid #3cae73}.confetti{position:absolute;inset:0;pointer-events:none}.confetti i{position:absolute;top:-18px;width:10px;height:18px;background:var(--confetti);animation:confetti-fall 1.7s ease-in forwards}
@keyframes hop{0%{transform:translate(0,0) scale(var(--flip,1),1)}45%{transform:translate(calc(var(--dx)*.48),-62px) scale(var(--flip,1),1) rotate(var(--tilt))}100%{transform:translate(var(--dx),var(--dy)) scale(var(--flip,1),1)}}
@keyframes invalid-shake{20%,60%{translate:-6px}40%,80%{translate:6px}}
@keyframes hint-bob{50%{translate:0 -10px}}
@keyframes confetti-fall{to{translate:var(--drift) 540px;rotate:540deg}}
@media(max-width:700px){.lily-main{padding-bottom:24px}.lily-page-header{padding:15px 14px}.lily-page-header h1{font-size:2rem}.lily-card{margin-top:12px;padding:12px;border-radius:12px}.game-heading{align-items:flex-start}.game-heading p{font-size:.92rem}.move-display{min-width:86px;padding:7px 10px}.pond-scene{min-height:235px;padding:86px 5px 45px;border-width:2px}.lily-board{gap:2px}.lily-pad{border-width:1px;box-shadow:0 6px 0 #15536b,0 9px 8px rgba(0,45,70,.3)}.frog-button{width:124%;height:156%;left:-12%;bottom:6%}.reeds{scale:.72;transform-origin:bottom left}.reeds-right{transform:scaleX(-1) scale(.72);transform-origin:bottom right}.game-controls{display:grid;grid-template-columns:repeat(3,1fr)}.game-controls button,.return-button{min-width:0;padding:7px 5px;font-size:.88rem}.return-button{grid-column:1/-1}.rules-card{font-size:.93rem}}
@media(max-width:390px){.pond-scene{min-height:210px;padding-top:78px}.lily-page-header p{font-size:.9rem}.frog-button{width:130%;height:160%;left:-15%}.lily-card{padding:9px}.game-heading h2{font-size:1.3rem}}
@media(prefers-reduced-motion:reduce){.flying-frog,.frog-button.invalid,.frog-button.hint-source,.confetti i{animation-duration:.01ms!important;animation-iteration-count:1!important}}
