body{margin:0;background:#BEE8FF}
a{color:#1E5FB8}a:hover{color:#163F7A}
.app{font-family:'Nunito',system-ui,sans-serif;color:#26213B;min-height:100vh;background:#BEE8FF;position:relative;overflow-x:hidden;-webkit-tap-highlight-color:transparent}
.app *{box-sizing:border-box}
.disp{font-family:'Fredoka','Nunito',system-ui,sans-serif}
.num{font-variant-numeric:tabular-nums}
.ic{fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.icf{fill:currentColor;stroke:none}

/* candy buttons */
.btn{font-family:'Fredoka','Nunito',system-ui,sans-serif;font-weight:600;font-size:20px;letter-spacing:.2px;border:0;border-radius:18px;padding:12px 24px;min-height:52px;color:#fff;cursor:pointer;background:var(--c);box-shadow:0 6px 0 var(--d),0 10px 18px rgba(38,33,59,.18),inset 0 3px 0 rgba(255,255,255,.28);transition:transform .09s ease,box-shadow .09s ease,filter .15s;display:inline-flex;align-items:center;justify-content:center;gap:10px;text-decoration:none;white-space:nowrap}
.btn:hover{transform:translateY(-2px);filter:brightness(1.05);box-shadow:0 8px 0 var(--d),0 14px 22px rgba(38,33,59,.2),inset 0 3px 0 rgba(255,255,255,.28)}
.btn:active{transform:translateY(5px);box-shadow:0 1px 0 var(--d),0 3px 6px rgba(38,33,59,.18),inset 0 3px 0 rgba(255,255,255,.2)}
.btn:disabled{--c:#C4BFD2;--d:#9A94AE;color:#4A4560;cursor:not-allowed;transform:none;filter:none;box-shadow:0 6px 0 var(--d),inset 0 3px 0 rgba(255,255,255,.3)}
.btn:focus-visible,.tok:focus-visible,.field:focus-visible{outline:4px solid #26213B;outline-offset:3px}
.btn svg{width:24px;height:24px;flex:none}
.c-orange{--c:#E0560B;--d:#9E3A04}
.c-green{--c:#1E8744;--d:#135B2D}
.c-blue{--c:#2A6BD1;--d:#1A4793}
.c-pink{--c:#CF2F67;--d:#901C47}
.c-cream{--c:#FFF5DE;--d:#DDBF7E;color:#26213B}
.c-white{--c:#FFFFFF;--d:#C9DCEA;color:#26213B}
.btn-big{font-size:26px;min-height:66px;padding:14px 40px;border-radius:22px}
.btn-icon{width:48px;height:48px;min-height:48px;padding:0;border-radius:14px}
.btn-icon svg{width:24px;height:24px}

@keyframes popin{0%{transform:scale(.4);opacity:0}70%{transform:scale(1.12);opacity:1}100%{transform:scale(1)}}
@keyframes pop{0%{transform:scale(.7) translateY(12px);opacity:0}100%{transform:scale(1) translateY(0);opacity:1}}
@keyframes rise{0%{transform:translateY(18px);opacity:0}100%{transform:translateY(0);opacity:1}}
.pop{animation:pop .5s cubic-bezier(.3,1.6,.5,1) both}
.rise{animation:rise .5s ease both}
.d1{animation-delay:.08s}.d2{animation-delay:.16s}.d3{animation-delay:.24s}.d4{animation-delay:.32s}.d5{animation-delay:.4s}

/* ---------- item tokens (lion / goat / grass) ---------- */
.tok{width:var(--t,68px);height:var(--t,68px);padding:0;border:0;background:transparent;cursor:pointer;position:relative;border-radius:50%;display:block;flex:none;animation:popin .42s cubic-bezier(.3,1.7,.5,1) both}
.tok.far{cursor:default}
.tok .ani{position:absolute;inset:0;border-radius:50%;animation:idle 2.6s ease-in-out infinite;transform-origin:50% 100%}
.tok.reach:hover .ani{animation:hop .55s ease}
.tok.reach:active .ani{animation:none;transform:scale(.86)}
.tok.far .ani{filter:saturate(.75)}
@keyframes idle{0%,100%{transform:translateY(0) scale(1,1)}45%{transform:translateY(-5px) scale(.98,1.02)}55%{transform:translateY(-5px) scale(.98,1.02)}90%{transform:translateY(0) scale(1.04,.96)}}
@keyframes hop{0%{transform:translateY(0) scale(1)}30%{transform:translateY(-14px) scale(.94,1.06)}60%{transform:translateY(0) scale(1.08,.92)}100%{transform:translateY(0) scale(1)}}
.ani .horn,.ani .ear,.ani .head,.ani .eye,.ani .cheek,.ani .snout,.ani .nose,.ani .beard,.ani .blade,.ani .stub,.ani .tie{position:absolute;display:block}
.ani .blade,.ani .stub,.ani .tie{display:none}
.ani .head{inset:17%;border-radius:50%}
.ani .eye,.rower .eye{position:absolute;top:34%;width:14%;height:16%;border-radius:50%;background:radial-gradient(circle at 34% 30%,#fff 0 22%,#26213B 26%)}
.ani .eye.l{left:24%}.ani .eye.r{right:24%}
.ani .cheek,.rower .cheek{position:absolute;top:56%;width:16%;height:10%;border-radius:50%;background:#FF9AA8;opacity:.75}
.ani .cheek.l{left:8%}.ani .cheek.r{right:8%}
.ani .snout{left:28%;right:28%;bottom:10%;height:34%;border-radius:50% 50% 46% 46%}
.ani .nose{left:30%;right:30%;top:10%;height:36%;border-radius:40% 40% 60% 60%}
/* lion */
.lion .ani{background:repeating-conic-gradient(#D9601A 0 12deg,#F08A2E 12deg 24deg);box-shadow:0 5px 0 #9C430C,0 9px 14px rgba(38,33,59,.28)}
.lion .ear{top:14%;width:24%;height:24%;border-radius:50%;background:#FFC24A;box-shadow:inset 0 0 0 5px #FFC24A,inset 0 0 0 20px #F59A7E}
.lion .ear.l{left:16%}.lion .ear.r{right:16%}
.lion .head{background:#FFC24A;box-shadow:inset 0 -5px 0 rgba(156,67,12,.15)}
.lion .snout{background:#FFE6AE}
.lion .nose{background:#6B3416}
.lion .horn,.lion .beard{display:none}
/* goat */
.goat .ani{background:#F6F1E7;box-shadow:0 5px 0 #A99377,0 9px 14px rgba(38,33,59,.24)}
.goat .horn{top:-4%;width:17%;height:34%;background:#B98D52;border-radius:60% 60% 30% 30%;box-shadow:inset -3px 0 0 rgba(0,0,0,.15)}
.goat .horn.l{left:26%;transform:rotate(-22deg)}.goat .horn.r{right:26%;transform:rotate(22deg)}
.goat .ear{top:38%;width:28%;height:15%;background:#E3D4BC;border-radius:50%}
.goat .ear.l{left:-10%;transform:rotate(22deg)}.goat .ear.r{right:-10%;transform:rotate(-22deg)}
.goat .head{inset:12%;background:#FFFDF8}
.goat .snout{background:#F5D3CB}
.goat .nose{background:#7A4A3A;left:34%;right:34%;height:30%}
.goat .beard{bottom:-12%;left:41%;width:18%;height:24%;background:#E3D4BC;border-radius:20% 20% 50% 50%}
/* grass bundle */
.grass .ani{background:#EAF7D6;box-shadow:0 5px 0 #86B562,0 9px 14px rgba(38,33,59,.22)}
.grass .horn,.grass .ear,.grass .head,.grass .beard{display:none}
.grass .blade,.grass .stub,.grass .tie{display:block}
.grass .blade{bottom:36%;width:13%;border-radius:60% 60% 15% 15%;transform-origin:50% 100%;transform:rotate(var(--r));animation:sway 2.6s ease-in-out infinite}
.grass .b1{left:19%;height:38%;background:#4FA82F;--r:-30deg}
.grass .b2{left:30%;height:50%;background:#6CC24A;--r:-13deg;animation-delay:.25s}
.grass .b3{left:43.5%;height:56%;background:#3E9A24;--r:0deg;animation-delay:.5s}
.grass .b4{left:57%;height:50%;background:#6CC24A;--r:13deg;animation-delay:.75s}
.grass .b5{left:68%;height:38%;background:#4FA82F;--r:30deg;animation-delay:1s}
@keyframes sway{0%,100%{transform:rotate(var(--r))}50%{transform:rotate(calc(var(--r) + 9deg))}}
.grass .stub{left:29%;right:29%;bottom:14%;height:26%;background:#5DB33C;border-radius:12% 12% 45% 45%}
.grass .tie{left:25%;right:25%;bottom:31%;height:11%;background:#C08A4A;border-radius:4px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.18)}
/* tiny tokens for icons */
.tok.mini{--t:30px;animation:none;cursor:default}
.tok.mini .ani{animation:none}
.lion.mini .ani,.goat.mini .ani,.grass.mini .ani{box-shadow:0 2px 0 rgba(38,33,59,.25)}

/* the rower (always in the boat) */
.rower{--rw:58px;position:relative;display:block;width:var(--rw);height:calc(var(--rw) * 1.25);flex:none}
.rower .body{position:absolute;left:14%;right:14%;bottom:0;height:40%;border-radius:42% 42% 12% 12%;background:repeating-linear-gradient(#FFFFFF 0 5px,#2A6BD1 5px 10px);box-shadow:inset 0 -4px 0 rgba(0,0,0,.08)}
.rower .face{position:absolute;left:9%;right:9%;top:20%;height:66%;border-radius:50%;background:#F4BF8C;box-shadow:inset 0 -4px 0 rgba(150,80,30,.15)}
.rower .eye{top:36%;width:13%;height:15%}
.rower .eye.l{left:26%}.rower .eye.r{right:26%}
.rower .cheek{top:58%}
.rower .cheek.l{left:10%}.rower .cheek.r{right:10%}
.rower .smile{position:absolute;left:35%;right:35%;top:56%;height:16%;border-bottom:3px solid #6B3416;border-radius:0 0 50% 50%}
.rower .hat{position:absolute;left:6%;right:6%;top:6%;height:28%;background:#FFFFFF;border-radius:55% 55% 12% 12%;box-shadow:inset 0 -7px 0 #0B7375,0 2px 0 rgba(38,33,59,.15);z-index:2}
.rower .hat::after{content:'';position:absolute;left:44%;top:18%;width:12%;height:30%;border-radius:50%;background:#E0560B}
.rower.mini{--rw:30px}
.rower.mini .smile{border-bottom-width:2px}

/* ---------- start screen ---------- */
.start{max-width:580px;margin:0 auto;padding:28px 16px 150px;display:flex;flex-direction:column;gap:22px;position:relative;z-index:2}
.logo{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px}
.logo-art{--t:72px;display:flex;align-items:flex-end;gap:6px;position:relative;padding:0 10px 26px;margin-bottom:4px}
.logo-art .rower{--rw:72px;margin:0 2px -6px;z-index:1}
.logo-art .hull-mini{position:absolute;left:-14px;right:-14px;bottom:0;height:40px;background:#B4652A;border-radius:8px 8px 50px 50px;box-shadow:inset 0 8px 0 #8A4718,0 6px 0 rgba(14,90,92,.35);z-index:2}
.logo-art .tok{animation:popin .5s cubic-bezier(.3,1.7,.5,1) both}
.logo-art .t2{animation-delay:.1s}.logo-art .t3{animation-delay:.2s}.logo-art .t4{animation-delay:.3s}
.title{margin:0;font-size:clamp(44px,10vw,72px);line-height:.95;font-weight:700;color:#26213B;text-shadow:0 5px 0 #FFC93C}
.ribbon{display:inline-block;background:#0B7375;color:#fff;font-family:'Fredoka',sans-serif;font-weight:600;font-size:clamp(17px,4.2vw,23px);letter-spacing:1.5px;padding:8px 36px;clip-path:polygon(0 0,100% 0,95% 50%,100% 100%,0 100%,5% 50%);margin-top:6px}
.card{background:#fff;border-radius:26px;box-shadow:0 8px 0 #A6D8EE,0 18px 34px rgba(38,33,59,.12)}
.howto{padding:20px 22px}
.howto h2{margin:0 0 12px;font-size:22px;font-weight:600}
.rule{display:flex;gap:14px;align-items:center;padding:10px 0}
.rule + .rule{border-top:2px dashed #E4EEF4}
.combo{display:flex;align-items:center;justify-content:center;gap:3px;min-width:92px;height:52px;border-radius:16px;flex:none;padding:0 8px}
.combo .op{font-family:'Fredoka',sans-serif;font-weight:700;font-size:20px;color:#7F1D1D}
.combo.danger{background:#FFE4DC}
.combo.ok{background:#DDF2F2}
.combo .oar-ic{width:26px;height:26px;color:#0B6466}
.rule p{margin:0;font-size:16px;line-height:1.4;font-weight:800}
.rule p span{display:block;font-weight:600;color:#575272;font-size:14.5px}
.rule .tagd{display:inline-block;margin-left:6px;background:#B91C1C;color:#fff;border-radius:999px;font-size:11px;letter-spacing:.8px;padding:2px 8px;vertical-align:2px;text-transform:uppercase}
.namebox{padding:18px 22px;display:flex;flex-direction:column;gap:8px}
.namebox label{font-family:'Fredoka',sans-serif;font-weight:600;font-size:18px;display:flex;justify-content:space-between;align-items:baseline}
.namebox label small{font-family:'Nunito',sans-serif;font-size:13px;color:#575272;font-weight:700}
.field{font-family:'Nunito',sans-serif;font-weight:800;font-size:20px;height:56px;border-radius:16px;border:3px solid #CFE3EE;padding:0 18px;color:#26213B;background:#F7FBFE;width:100%;transition:border-color .15s,box-shadow .15s}
.field:focus{border-color:#2A6BD1;box-shadow:0 0 0 5px rgba(42,107,209,.18);outline:none}
.field::placeholder{color:#8C88A3}
.start-actions{display:flex;flex-direction:column;gap:16px;align-items:stretch;padding-top:4px}
.start-actions .btn{width:100%}

/* backdrop decoration */
.deco-cloud{position:absolute;background:#fff;border-radius:60px;opacity:.9;z-index:0;animation:drift 38s linear infinite}
.deco-cloud::before,.deco-cloud::after{content:'';position:absolute;background:#fff;border-radius:50%}
.deco-cloud::before{width:55%;height:150%;left:14%;top:-70%}
.deco-cloud::after{width:40%;height:120%;right:12%;top:-45%}
.dc1{width:150px;height:44px;top:70px;left:-60px}
.dc2{width:110px;height:34px;top:230px;right:-40px;animation-duration:52s;animation-direction:reverse}
.dc3{width:90px;height:28px;top:440px;left:8%;animation-duration:64s}
@keyframes drift{0%{transform:translateX(0)}50%{transform:translateX(60px)}100%{transform:translateX(0)}}
.deco-ground{position:absolute;left:0;right:0;bottom:0;height:120px;z-index:1;background:#6CC24A;overflow:hidden}
.deco-ground::before{content:'';position:absolute;left:-10%;right:-10%;top:-60px;height:120px;background:radial-gradient(ellipse 28% 60% at 18% 100%,#7FCB5C 98%,transparent 100%),radial-gradient(ellipse 30% 70% at 72% 100%,#86D163 98%,transparent 100%)}
.deco-ground .strip{position:absolute;left:0;right:0;bottom:0;height:56px;background:#1FA7A8;overflow:hidden}
.deco-ground .strip::before{content:'';position:absolute;inset:0 -80px;background:radial-gradient(ellipse 24px 5px at 50% 50%,rgba(255,255,255,.45) 60%,transparent 64%) 0 0/80px 22px;animation:flowx 3s linear infinite}
@keyframes flowx{to{transform:translateX(80px)}}

/* ---------- game ---------- */
.wrap{max-width:1100px;margin:0 auto;padding:16px 16px 40px;display:flex;flex-direction:column;gap:14px}
.wrap.shake{animation:shake .6s cubic-bezier(.36,.07,.19,.97) both}
@keyframes shake{10%,90%{transform:translate(-2px,1px)}20%,80%{transform:translate(5px,-2px)}30%,50%,70%{transform:translate(-9px,3px)}40%,60%{transform:translate(9px,-3px)}}
.hud{display:flex;flex-wrap:wrap;align-items:center;gap:10px;background:#fff;border-radius:22px;padding:10px;box-shadow:0 6px 0 #A6D8EE,0 14px 26px rgba(38,33,59,.1)}
.hud .spacer{flex:1 1 0}
.player{display:flex;align-items:center;gap:10px;padding:0 6px;min-width:0}
.avatar{width:44px;height:44px;border-radius:50%;background:#FFC93C;display:flex;align-items:center;justify-content:center;font-family:'Fredoka',sans-serif;font-weight:700;font-size:22px;box-shadow:inset 0 -4px 0 rgba(0,0,0,.12);flex:none}
.player .who{display:flex;flex-direction:column;min-width:0}
.lbl{font-size:11px;font-weight:900;letter-spacing:1.2px;text-transform:uppercase;color:#575272}
.player .nm{font-family:'Fredoka',sans-serif;font-weight:600;font-size:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px}
.chip{display:flex;flex-direction:column;justify-content:center;background:#EEF6FB;border-radius:14px;padding:5px 14px;min-height:50px}
.chip .v{font-family:'Nunito',sans-serif;font-weight:900;font-size:22px;line-height:1.1;display:inline-block;transform-origin:left center}
.chip.timer{min-width:136px}
.hud-stats{display:contents}
.chip.timer.live .v{color:#0B6466}
.chip.timer.idle .v{color:#575272}
.bumpA{animation:bumpA .35s ease}.bumpB{animation:bumpB .35s ease}
@keyframes bumpA{0%{transform:scale(1)}40%{transform:scale(1.35);color:#C2410C}100%{transform:scale(1)}}
@keyframes bumpB{0%{transform:scale(1)}40%{transform:scale(1.35);color:#C2410C}100%{transform:scale(1)}}
.guide{text-align:center;font-weight:800;font-size:17px;min-height:26px;color:#26213B}
.guide.warn{color:#9E2A0B}

.scene{--t:68px;--bw:172px;border-radius:30px;overflow:hidden;border:6px solid #fff;box-shadow:0 10px 0 #8FCBE3,0 20px 36px rgba(38,33,59,.16);background:#BDE9FF;position:relative}
.sky{height:110px;position:relative;overflow:hidden;background:#BDE9FF}
.sun{position:absolute;top:16px;right:9%;width:62px;height:62px;border-radius:50%;background:#FFD23F;box-shadow:0 0 0 8px rgba(255,210,63,.35),0 0 0 18px rgba(255,210,63,.15)}
.sun::before{content:'';position:absolute;inset:-22px;border-radius:50%;background:repeating-conic-gradient(rgba(255,210,63,.55) 0 10deg,transparent 10deg 30deg);z-index:-1;animation:spin 24s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.cloud{position:absolute;background:#fff;border-radius:40px;animation:drift 30s ease-in-out infinite}
.cloud::before,.cloud::after{content:'';position:absolute;background:#fff;border-radius:50%}
.cloud::before{width:56%;height:150%;left:14%;top:-68%}
.cloud::after{width:40%;height:120%;right:12%;top:-42%}
.cl1{width:110px;height:32px;top:44px;left:7%}
.cl2{width:80px;height:24px;top:22px;left:44%;animation-duration:40s;animation-direction:reverse}
.cl3{width:64px;height:20px;top:66px;left:64%;animation-duration:48s}
.hills{position:absolute;left:-10%;right:-10%;bottom:-2px;height:64px;background:radial-gradient(ellipse 26% 100% at 12% 100%,#8ED66B 98%,transparent 100%),radial-gradient(ellipse 30% 110% at 48% 100%,#7FCB5C 98%,transparent 100%),radial-gradient(ellipse 26% 100% at 86% 100%,#8ED66B 98%,transparent 100%)}
.land{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr) minmax(0,1fr);height:400px;position:relative}
.bank{position:relative;background-color:#6CC24A;background-image:radial-gradient(circle at 20% 30%,rgba(255,255,255,.12) 0 3px,transparent 4px),radial-gradient(circle at 70% 70%,rgba(30,90,30,.12) 0 3px,transparent 4px);background-size:46px 46px,58px 58px;display:flex;align-items:center;justify-content:center;padding:50px 18px 50px}
.bank.left::after,.bank.right::after{content:'';position:absolute;top:0;bottom:0;width:18px;background:#F3D9A4}
.bank.left::after{right:0}
.bank.right::after{left:0}
.bank::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 50% 55%,rgba(255,60,60,.42),rgba(255,60,60,0) 72%);box-shadow:inset 0 0 0 5px rgba(220,38,38,.5),inset 0 0 40px rgba(220,38,38,.35);opacity:0;pointer-events:none;transition:opacity .3s;z-index:1}
.bank.danger::before{opacity:1;animation:pulse 1.3s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:.55}50%{opacity:1}}
.bank-tag{position:absolute;top:12px;left:50%;transform:translateX(-50%);background:rgba(255,255,255,.92);border-radius:999px;padding:4px 14px;font-family:'Fredoka',sans-serif;font-weight:600;font-size:15px;white-space:nowrap;z-index:2;box-shadow:0 3px 0 rgba(30,90,30,.25)}
.bank-tag.goal{background:#FFF1C2}
.risks{position:absolute;bottom:10px;left:0;right:0;display:flex;flex-wrap:wrap;justify-content:center;gap:6px;z-index:3;padding:0 6px}
.risk{display:inline-flex;align-items:center;gap:6px;background:#B91C1C;color:#fff;border-radius:999px;padding:3px 10px 3px 3px;font-size:13px;font-weight:900;white-space:nowrap;animation:pop .35s ease both;box-shadow:0 3px 0 rgba(90,10,10,.35)}
.risk .tok.mini{--t:24px}
.bank-grid{display:grid;grid-template-columns:repeat(2,var(--t));gap:12px;position:relative;z-index:2}
.slot{width:var(--t);height:var(--t);position:relative}
.slot-empty{position:absolute;inset:16%;border-radius:50%;background:rgba(30,90,30,.18)}
.flower{position:absolute;width:10px;height:10px;border-radius:50%;background:#FFE15A;box-shadow:0 -7px 0 #fff,0 7px 0 #fff,-7px 0 0 #fff,7px 0 0 #fff;z-index:1}
.fl1{top:30%;left:10%}.fl2{bottom:22%;left:24%}.fl3{top:22%;right:14%}.fl4{bottom:26%;right:26%}

.river{position:relative;overflow:hidden;background:#1FA7A8}
.flow{position:absolute;inset:-60px 0;background:radial-gradient(ellipse 22px 5px at 50% 50%,rgba(255,255,255,.38) 60%,transparent 64%) 0 0/74px 48px;animation:flowy 2.6s linear infinite}
.flow.f2{background:radial-gradient(ellipse 14px 4px at 50% 50%,rgba(220,255,250,.3) 60%,transparent 64%) 30px 20px/58px 36px;animation-duration:1.8s}
@keyframes flowy{to{transform:translateY(48px)}}
.ripple{position:absolute;width:64px;height:20px;border:3px solid rgba(255,255,255,.55);border-radius:50%;animation:ripple 3.4s ease-out infinite;opacity:0}
.rp1{top:12%;left:18%}.rp2{top:74%;left:56%;animation-delay:1.1s}.rp3{top:40%;left:72%;animation-delay:2.2s}.rp4{top:86%;left:10%;animation-delay:1.7s}
@keyframes ripple{0%{transform:scale(.3);opacity:0}20%{opacity:1}100%{transform:scale(1.7);opacity:0}}
.boat{position:absolute;top:50%;width:var(--bw);height:148px;margin-top:-80px;left:16px;transition:left 1.1s cubic-bezier(.55,0,.35,1);z-index:3}
.boat.at-right{left:calc(100% - var(--bw) - 16px)}
.boat-inner{position:absolute;inset:0;animation:float 3s ease-in-out infinite}
.boat.rowing .boat-inner{animation:rowbob .55s ease-in-out infinite}
.boat-inner.nope{animation:nope .45s ease}
@keyframes float{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-4px) rotate(-1deg)}}
@keyframes rowbob{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-6px) rotate(2deg)}}
@keyframes nope{0%,100%{transform:translateX(0)}20%{transform:translateX(-10px) rotate(-3deg)}40%{transform:translateX(9px) rotate(3deg)}60%{transform:translateX(-6px)}80%{transform:translateX(4px)}}
.boat .rower{position:absolute;left:50%;bottom:66px;margin-left:calc(var(--rw) / -2);z-index:1;animation:cheer 2.2s ease-in-out infinite}
.boat.rowing .rower{animation:pull .55s ease-in-out infinite}
@keyframes cheer{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(3deg) translateY(-2px)}}
@keyframes pull{0%,100%{transform:translateY(0) rotate(-6deg)}50%{transform:translateY(3px) rotate(6deg)}}
.seats{position:absolute;left:0;right:0;bottom:30px;display:flex;justify-content:center;gap:8px;z-index:2}
.seat{width:var(--t);height:var(--t);position:relative}
.seat-empty{position:absolute;left:12%;right:12%;top:30%;bottom:14%;border-radius:50%;border:3px dashed rgba(255,255,255,.75)}
.hull{position:absolute;left:0;right:0;bottom:0;height:46px;background:#B4652A;border-radius:10px 10px 52px 52px;box-shadow:inset 0 10px 0 #8A4718,inset 0 -9px 0 rgba(0,0,0,.14),0 7px 0 rgba(10,80,82,.35);z-index:3}
.hull::after{content:'';position:absolute;left:14%;right:14%;top:19px;height:5px;border-radius:3px;background:rgba(255,230,190,.45)}
.oar{position:absolute;bottom:18px;width:54px;height:8px;border-radius:4px;background:#7A3E12;z-index:1}
.oar::after{content:'';position:absolute;top:-6px;width:18px;height:20px;border-radius:50%;background:#7A3E12}
.oar.ol{left:-34px;transform-origin:100% 50%;transform:rotate(-14deg)}.oar.ol::after{left:-6px}
.oar.or{right:-34px;transform-origin:0 50%;transform:rotate(14deg)}.oar.or::after{right:-6px}
.boat.rowing .oar.ol{animation:oarL .55s ease-in-out infinite}
.boat.rowing .oar.or{animation:oarR .55s ease-in-out infinite}
@keyframes oarL{0%,100%{transform:rotate(-30deg)}50%{transform:rotate(18deg)}}
@keyframes oarR{0%,100%{transform:rotate(30deg)}50%{transform:rotate(-18deg)}}
.splash i{position:absolute;bottom:-6px;width:12px;height:12px;border-radius:50%;background:#E9FBFF;opacity:0;z-index:4}
.splash i:nth-child(1){left:-10px}.splash i:nth-child(2){left:22%}.splash i:nth-child(3){right:22%}.splash i:nth-child(4){right:-10px}
.boat.rowing .splash i{animation:splash .55s ease-out infinite}
.boat.rowing .splash i:nth-child(2){animation-delay:.14s}.boat.rowing .splash i:nth-child(3){animation-delay:.27s}.boat.rowing .splash i:nth-child(4){animation-delay:.4s}
@keyframes splash{0%{transform:translate(0,0) scale(.4);opacity:0}25%{opacity:1}100%{transform:translate(0,-26px) scale(1.1);opacity:0}}
.wake{position:absolute;left:-18px;right:-18px;bottom:-12px;height:22px;border-radius:50%;background:rgba(255,255,255,.35);opacity:0;transition:opacity .3s;z-index:0}
.boat.rowing .wake{opacity:1;animation:wake .55s ease-in-out infinite}
@keyframes wake{0%,100%{transform:scaleX(1)}50%{transform:scaleX(1.15)}}

.controls{display:flex;flex-direction:column;align-items:center;gap:12px;padding-top:6px}
.row-btn{min-width:280px}
.row-btn small{font-family:'Nunito',sans-serif;font-weight:800;font-size:14px;opacity:.95}

/* ---------- overlays ---------- */
.overlay{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(38,33,59,.5);overflow-y:auto;animation:fadein .25s ease both}
@keyframes fadein{from{opacity:0}to{opacity:1}}
.modal{width:100%;max-width:470px;background:#fff;border-radius:30px;padding:28px 24px 26px;text-align:center;box-shadow:0 10px 0 #D9CFEF,0 26px 50px rgba(20,16,40,.35);position:relative;z-index:2;margin:auto}
.modal h2{margin:0;font-size:clamp(26px,6vw,34px);line-height:1.1;font-weight:700}
.modal p{margin:10px 0 0;font-size:16px;font-weight:700;color:#4A4560}
.fail-modal{animation:pop .45s cubic-bezier(.3,1.6,.5,1) 1s both}
@keyframes fxOut{to{opacity:0;transform:scale(1.25)}}
/* lion chomp */
.jaws{position:absolute;left:50%;top:50%;width:280px;height:280px;margin:-140px 0 0 -140px;z-index:3;pointer-events:none;animation:fxOut .3s ease 1s forwards}
.jaw{position:absolute;left:0;right:0;height:50%;background:#E8892B}
.jaw.top{top:0;border-radius:140px 140px 18px 18px;box-shadow:inset 0 -14px 0 #C2410C;animation:biteTop .9s cubic-bezier(.5,0,.5,1) both}
.jaw.bot{bottom:0;border-radius:18px 18px 140px 140px;box-shadow:inset 0 14px 0 #C2410C;animation:biteBot .9s cubic-bezier(.5,0,.5,1) both}
.teeth{position:absolute;left:26px;right:26px;display:flex;justify-content:space-between}
.jaw.top .teeth{bottom:-14px}.jaw.bot .teeth{top:-14px}
.tooth{width:28px;height:28px;background:#fff;transform:rotate(45deg);border-radius:5px}
@keyframes biteTop{0%{transform:translateY(-120%)}35%{transform:translateY(-6%)}50%{transform:translateY(-38%)}70%{transform:translateY(-4%)}100%{transform:translateY(-4%)}}
@keyframes biteBot{0%{transform:translateY(120%)}35%{transform:translateY(6%)}50%{transform:translateY(38%)}70%{transform:translateY(4%)}100%{transform:translateY(4%)}}
/* goat munch */
.munch{position:absolute;left:50%;top:50%;width:300px;height:220px;margin:-110px 0 0 -150px;z-index:3;pointer-events:none;animation:fxOut .3s ease 1s forwards}
.munch .goat{position:absolute;left:10px;top:20px;--t:160px;animation:popin .3s ease both}
.munch .goat .ani{animation:munchHead .2s ease-in-out 5}
.munch .goat .snout{animation:munchJaw .16s ease-in-out infinite}
@keyframes munchHead{0%,100%{transform:rotate(0)}50%{transform:rotate(6deg) translateX(4px)}}
@keyframes munchJaw{0%,100%{transform:scaleY(1)}50%{transform:scaleY(.72)}}
.munch .grass{position:absolute;left:150px;top:96px;--t:112px;animation:munchGrass .95s ease-in both;transform-origin:0 60%}
@keyframes munchGrass{0%{transform:scale(1)}30%{transform:scale(.82) rotate(-6deg)}60%{transform:scale(.5) rotate(4deg)}100%{transform:scale(0) rotate(-8deg);opacity:0}}
.crumb{position:absolute;left:150px;top:150px;width:7px;height:16px;border-radius:3px;background:#5DB33C;opacity:0}
.cr1{animation:crA .5s ease-out .1s 2}.cr2{animation:crB .5s ease-out .25s 2;background:#3E9A24}.cr3{animation:crA .5s ease-out .4s 2;background:#6CC24A}.cr4{animation:crB .5s ease-out .55s 2}
@keyframes crA{0%{transform:translate(0,0) rotate(0);opacity:1}100%{transform:translate(70px,-60px) rotate(200deg);opacity:0}}
@keyframes crB{0%{transform:translate(0,0) rotate(0);opacity:1}100%{transform:translate(90px,30px) rotate(-220deg);opacity:0}}
.modal .btn{margin-top:20px}

.confetti{position:fixed;inset:0;pointer-events:none;z-index:60;overflow:hidden}
.cf{position:absolute;top:-30px;border-radius:3px;display:block;animation-name:fallA;animation-timing-function:cubic-bezier(.25,.6,.5,1);animation-fill-mode:both}
.cf.b{animation-name:fallB;border-radius:50%}
@keyframes fallA{0%{transform:translate(0,0) rotate(0);opacity:1}100%{transform:translate(60px,110vh) rotate(720deg);opacity:.9}}
@keyframes fallB{0%{transform:translate(0,0) rotate(0);opacity:1}100%{transform:translate(-70px,110vh) rotate(-540deg);opacity:.9}}
.trophy{width:84px;height:84px;margin:-70px auto 8px;border-radius:50%;background:#FFC93C;color:#7A4A00;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 0 #C98F00,0 0 0 8px #fff}
.trophy svg{width:46px;height:46px}
.stars{display:flex;justify-content:center;gap:8px;margin:14px 0 4px}
.bigstar{width:56px;height:56px;color:#DCD7E6;animation:starpop .55s cubic-bezier(.3,1.8,.5,1) both}
.bigstar.on{color:#FFB800;filter:drop-shadow(0 4px 0 #C98F00)}
.bigstar.s2{width:68px;height:68px;margin-top:-10px;animation-delay:.18s}
.bigstar.s3{animation-delay:.36s}
@keyframes starpop{0%{transform:scale(0) rotate(-40deg)}100%{transform:scale(1) rotate(0)}}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}
.stat{background:#F3F0FA;border-radius:16px;padding:10px 6px}
.stat .v{font-weight:900;font-size:22px;display:block;margin-top:2px}
.pb{display:inline-block;margin-top:12px;background:#E3F7EA;color:#135B2D;font-weight:900;font-size:14px;padding:5px 14px;border-radius:999px;animation:pop .4s ease .9s both}
.badges{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}
.badge{border-radius:18px;padding:12px 6px 10px;background:#F1EFF5;color:#6E6985;display:flex;flex-direction:column;align-items:center;gap:6px;animation:pop .45s cubic-bezier(.3,1.6,.5,1) both}
.badge .bi{width:46px;height:46px;border-radius:50%;background:#DCD8E5;color:#8E89A3;display:flex;align-items:center;justify-content:center}
.badge .bi svg{width:26px;height:26px}
.badge b{font-family:'Fredoka',sans-serif;font-weight:600;font-size:15px;line-height:1.1}
.badge small{font-size:12px;font-weight:800}
.badge.got{color:#26213B}
.badge.got.bp{background:#FFF3D1}.badge.got.bp .bi{background:#FFC93C;color:#6B4300}
.badge.got.bs{background:#E4EEFF}.badge.got.bs .bi{background:#2A6BD1;color:#fff}
.badge.got.bf{background:#E3F7EA}.badge.got.bf .bi{background:#1E8744;color:#fff}
.badge.n1{animation-delay:.5s}.badge.n2{animation-delay:.62s}.badge.n3{animation-delay:.74s}
.modal-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-top:20px}
.modal-actions .btn{margin-top:0;flex:1 1 180px}

/* creator credit (start screen + win screen) */
.creator{display:flex;align-items:center;gap:12px;background:#fff;border-radius:20px;padding:10px 10px 10px 12px;box-shadow:0 5px 0 #A6D8EE,0 12px 22px rgba(38,33,59,.1);text-align:left}
.modal .creator{margin-top:18px;background:#F6F3FC;box-shadow:none}
.creator-av{width:44px;height:44px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;background:#0B7375;color:#fff;font-family:'Fredoka',sans-serif;font-weight:700;font-size:21px;box-shadow:inset 0 -4px 0 rgba(0,0,0,.18)}
.creator-txt{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;line-height:1.15}
.creator-txt b{font-family:'Fredoka',sans-serif;font-weight:600;font-size:20px;color:#26213B}
.creator-link{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 16px;border-radius:14px;background:#26213B;color:#fff;font-family:'Fredoka',sans-serif;font-weight:600;font-size:16px;text-decoration:none;white-space:nowrap;box-shadow:0 4px 0 #0E0B1C;transition:transform .09s,box-shadow .09s}
.creator-link:hover{color:#fff;transform:translateY(-2px);box-shadow:0 6px 0 #0E0B1C}
.creator-link:active{transform:translateY(3px);box-shadow:0 1px 0 #0E0B1C}
.creator-link:focus-visible{outline:4px solid #2A6BD1;outline-offset:3px}
.creator-link svg{width:18px;height:18px}

/* ---------- leaderboard ---------- */
.lb{max-width:760px;margin:0 auto;padding:24px 16px 48px;display:flex;flex-direction:column;gap:18px}
.lb-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.lb-head .tro{width:60px;height:60px;border-radius:18px;background:#FFC93C;color:#6B4300;display:flex;align-items:center;justify-content:center;box-shadow:0 5px 0 #C98F00;flex:none}
.lb-head .tro svg{width:34px;height:34px}
.lb-head h1{margin:0;font-size:clamp(32px,7vw,44px);font-weight:700;line-height:1}
.lb-head p{margin:4px 0 0;font-weight:800;color:#4A4560}
.store-pill{margin-left:auto;background:#fff;border-radius:999px;padding:6px 14px;font-size:13px;font-weight:900;color:#0B6466;box-shadow:0 3px 0 #A6D8EE}
.lb-card{padding:10px}
.lb-cols,.lb-row{display:grid;grid-template-columns:56px minmax(0,1fr) 116px 70px 96px;align-items:center;gap:8px;padding:0 12px}
.lb-cols{min-height:36px;font-size:12px;font-weight:900;letter-spacing:1px;text-transform:uppercase;color:#575272}
.lb-row{min-height:60px;border-radius:16px;font-weight:800;font-size:17px;animation:rise .4s ease both}
.lb-row + .lb-row{margin-top:6px}
.lb-row:nth-child(odd){background:#F6FAFD}
.lb-row.top1{background:#FFF4CC}.lb-row.top2{background:#EEF2F6}.lb-row.top3{background:#FBE9DA}
.lb-row.me{box-shadow:inset 0 0 0 3px #2A6BD1;background:#E6F0FF}
.medal{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:'Fredoka',sans-serif;font-weight:700;font-size:18px;background:#E6E3EE;color:#4A4560}
.medal.m1{background:#FFC93C;color:#5C3A00;box-shadow:0 4px 0 #C98F00}
.medal.m2{background:#C9D3DD;color:#2E3A46;box-shadow:0 4px 0 #8E9BA8}
.medal.m3{background:#E0A16A;color:#4A2406;box-shadow:0 4px 0 #A9693A}
.lb-name{display:flex;flex-direction:column;min-width:0}
.lb-name span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.you{display:inline-block;margin-left:8px;background:#2A6BD1;color:#fff;border-radius:999px;font-size:11px;padding:2px 8px;vertical-align:2px}
.mstars{display:none}
.sts{display:flex;gap:2px}
.st{width:20px;height:20px;color:#D5D0E0}.st.on{color:#F5A800}
.lb-empty{padding:40px 16px;text-align:center;font-weight:800;color:#4A4560}
.lb-empty b{display:block;font-family:'Fredoka',sans-serif;font-size:24px;font-weight:600;color:#26213B;margin-bottom:6px}
.mine{margin-top:8px;padding-top:8px;border-top:2px dashed #E4EEF4}
.lb-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}
.lb-actions .btn{flex:1 1 200px;max-width:320px}

/* music toggle (start + leaderboard screens) */
.music-fab{position:fixed;top:14px;right:14px;z-index:40}
.btn-icon.on-air{color:#0B6466}
.btn-icon.on-air svg{animation:bob 1.1s ease-in-out infinite}
@keyframes bob{0%,100%{transform:translateY(0) rotate(-6deg)}50%{transform:translateY(-3px) rotate(6deg)}}

@media (max-width:700px){
  .start,.lb{padding-top:72px}
  .wrap{padding:12px 10px 32px}
  .scene{--t:46px;--bw:112px;border-width:4px;border-radius:24px}
  .sky{height:72px}
  .sun{width:40px;height:40px;top:12px}
  .land{grid-template-columns:62px minmax(0,1fr) 62px;height:360px}
  .bank{padding:40px 6px 40px}
  .bank.left::after,.bank.right::after{width:8px}
  .bank-grid{grid-template-columns:var(--t);gap:6px}
  .bank-tag{font-size:12px;padding:3px 8px;top:9px}
  .risks{bottom:8px;flex-direction:column;align-items:center;gap:4px}
  .risk{padding:3px}
  .risk .rt{display:none}
  .flower{display:none}
  .boat{height:104px;margin-top:-56px;left:8px}
  .boat.at-right{left:calc(100% - var(--bw) - 8px)}
  .boat .rower{--rw:42px;bottom:44px}
  .seats{bottom:24px;gap:6px}
  .hull{height:36px}
  .hull::after{top:15px}
  .oar{width:30px;bottom:12px}.oar.ol{left:-18px}.oar.or{right:-18px}
  .hud{gap:8px;padding:8px}
  .hud .spacer{display:none}
  .player{flex:1 1 0;padding:0 2px;gap:8px}
  .avatar{width:38px;height:38px;font-size:19px}
  .player .nm{max-width:none;font-size:18px}
  .hud-stats{display:flex;gap:8px;flex:1 1 100%;order:5}
  .chip{flex:1 1 0;padding:5px 10px;min-height:46px}
  .chip.timer{min-width:0;flex:2 1 0}
  .chip .v{font-size:18px}
  .restart-btn{width:48px;padding:0 !important;justify-content:center}
  .restart-btn .rs-txt{display:none}
  .row-btn{width:100%;min-width:0}
  .logo-art{--t:56px}
  .logo-art .rower{--rw:58px}
  .combo{min-width:80px}
  .stats .stat .v{font-size:18px}
  .lb-cols,.lb-row{grid-template-columns:36px minmax(0,1fr) auto 40px;gap:8px;padding:0 8px}
  .lb-cols .c-stars,.lb-row .c-stars{display:none}
  .mstars{display:flex;margin-top:2px}
  .st{width:16px;height:16px}
  .lb-row{font-size:15px}
  .medal{width:34px;height:34px;font-size:16px}
  .store-pill{margin-left:0}
}
