@font-face{font-family:"Baloo 2";src:url(../../fonts/baloo2.woff2) format("woff2");font-weight:400 800;font-display:swap}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;background:#d9ecff;overscroll-behavior:none}
body{font-family:"Baloo 2",ui-rounded,system-ui,sans-serif;color:#2f3d36;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}
#app{position:fixed;inset:0;background:radial-gradient(120% 70% at 50% 0%,#eef7ff 0,#d9ecff 55%,#cfe8d6 100%)}
[hidden]{display:none!important}
.hbtn{width:48px;height:48px;flex:none;border-radius:50%;border:0;background:rgba(255,255,255,.92);color:#2f3d36;display:grid;place-items:center;box-shadow:0 3px 0 rgba(47,61,54,.15);cursor:pointer;padding:0;text-decoration:none}
.hbtn svg{width:26px;height:26px}
.hbtn:active{transform:translateY(2px)}
.hud{position:absolute;left:0;right:0;top:0;height:calc(62px + env(safe-area-inset-top));display:flex;align-items:center;gap:8px;padding:calc(8px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left));z-index:6}
.pill{display:flex;align-items:center;gap:10px;height:42px;padding:0 14px;margin:0 auto;border-radius:22px;background:rgba(255,255,255,.92);box-shadow:0 3px 0 rgba(47,61,54,.12);font-size:20px;font-weight:800;line-height:1;white-space:nowrap;color:#2f6fa8}
.dots{display:flex;gap:5px}.dots i{width:12px;height:12px;border-radius:50%;background:#d6e3ee}.dots i.now{background:#ffd34d;box-shadow:0 0 0 2px #f2b632}.dots i.ok{background:#4f9d72}
.stage{position:absolute;left:0;right:0;top:calc(62px + env(safe-area-inset-top));bottom:0;display:flex;flex-direction:column;align-items:center;padding:4px calc(12px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));max-width:780px;margin:0 auto;gap:10px;justify-content:center}
.who{display:flex;flex-direction:column;align-items:center;flex:none}
.shadowbox{width:min(27dvh,280px,70vw);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 50% 45%,#fffdf4 0,#fff6dc 55%,#ffeec0 100%);box-shadow:0 6px 0 rgba(47,61,54,.08),inset 0 0 0 6px rgba(255,255,255,.7);display:grid;place-items:center;overflow:visible}
/* v1.6: sjena i slika u boji su dvije slike jedna na drugoj; sjena je UVIJEK crna (bez prijelaza), boja je skrivena dok se ne pogodi */
.shadowbox{position:relative}
#sil,#pic{position:absolute;left:3%;top:3%;width:94%;height:94%;object-fit:contain;-webkit-user-drag:none}
#sil{z-index:2;filter:brightness(0) saturate(0);opacity:.78}
#pic{z-index:1;opacity:0;transition:opacity .9s ease,transform .5s ease}
#pic.show{opacity:1}
#pic.show+#sil{opacity:0;transition:opacity .9s ease}
#pic.notr,#pic.notr+#sil{transition:none!important}
#pic.pop{animation:pop .7s ease}
@keyframes pop{0%{transform:scale(1)}40%{transform:scale(1.12)}100%{transform:scale(1)}}
.name{margin:2px 0 0;min-height:38px;font-size:32px;font-weight:800;line-height:1.15;color:#2f7a52;text-align:center;opacity:0;transform:translateY(6px);transition:opacity .4s,transform .4s}
.name.on{opacity:1;transform:none}
.right{display:flex;flex-direction:column;align-items:center;width:100%;flex:none;gap:12px}
.verse{margin:0;text-align:center;font-size:clamp(17px,4.7vw,25px);font-weight:700;line-height:1.28;color:#2f3d36;background:rgba(255,255,255,.75);border-radius:20px;padding:8px 14px;width:100%;max-width:640px}
.verse .l{display:block}
.blank{display:inline-block;min-width:3.4em;border-bottom:4px solid #2f6fa8;height:1.1em;vertical-align:-.12em;margin:0 .1em;text-align:center;line-height:1}
.blank .w{display:none;color:#2f7a52;font-weight:800}
.blank.filled{min-width:0;border-bottom-color:#4f9d72;height:auto;padding:0 .1em}
.blank.filled .w{display:inline;animation:pop .6s ease}
.opts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:min(100%,calc(4 * 14.5dvh + 24px),470px)}
.opt{width:100%;aspect-ratio:1;padding:4px;border:0;border-radius:22px;background:#fffaf0;box-shadow:0 5px 0 rgba(47,61,54,.12),0 6px 14px rgba(47,61,54,.1);cursor:pointer;display:grid;place-items:center;transition:opacity .3s,transform .15s}
.opt{position:relative;min-width:0;min-height:0;overflow:hidden}
.opt img{position:absolute;left:5px;top:5px;width:calc(100% - 10px);height:calc(100% - 10px);object-fit:contain;pointer-events:none}
.opt:active{transform:translateY(3px)}
.opt.tried{opacity:.5}
.opt.wig{animation:wig .55s ease}
@keyframes wig{0%,100%{transform:rotate(0)}20%{transform:rotate(-9deg)}40%{transform:rotate(8deg)}60%{transform:rotate(-6deg)}80%{transform:rotate(4deg)}}
.opt.yes{box-shadow:0 0 0 4px #4f9d72,0 5px 0 4px #2f7a52}
.opt.gone img{opacity:.15}
.flyer{position:fixed;z-index:5;pointer-events:none;object-fit:contain;filter:drop-shadow(0 6px 10px rgba(0,0,0,.2))}
@media (min-width:560px){.opts{width:min(100%,calc(4 * 15dvh + 24px),560px)}}
@media (min-width:560px) and (min-height:700px){.shadowbox{width:min(34dvh,320px)}.verse{font-size:26px}}
/* položeni mobitel: lik lijevo, stih i slike desno */
@media (orientation:landscape) and (max-height:540px){
  .stage{flex-direction:row;align-items:center;max-width:none;gap:14px;padding-top:0}
  .who{width:auto}
  .shadowbox{width:min(62dvh,40vw)}
  .name{font-size:26px;min-height:32px}
  .verse{font-size:clamp(15px,2.3vw,21px);padding:6px 12px}
  .opts{width:min(100%,calc(4 * 21dvh + 24px),520px);gap:6px}
  .opt{border-radius:16px}
  .right{flex:1;min-width:0;justify-content:center;gap:10px}
}
/* prekrivala */
.overlay{position:absolute;inset:0;display:grid;place-items:center;padding:16px;background:rgba(217,236,255,.55);overflow:auto;z-index:4}
.card{width:min(420px,100%);text-align:center;background:rgba(255,251,243,.97);border-radius:32px;padding:18px 20px 16px;box-shadow:0 8px 0 rgba(47,61,54,.08),0 16px 40px rgba(47,61,54,.15)}
h1,h2{margin:0;font-size:36px;font-weight:800;line-height:1.05;color:#2f7a52}
h1{font-size:42px}
.txt{margin:4px 0 6px;font-size:19px;line-height:1.3;color:#5f6f66}
.hero{display:block;height:140px;width:auto;margin:6px auto 4px;animation:jump 1s ease-in-out infinite}
@keyframes jump{0%,100%{transform:translateY(0)}45%{transform:translateY(-16px)}75%{transform:translateY(0) scale(1.05,.95)}}
.stars{font-size:38px;color:#ffb31a;letter-spacing:4px;margin:4px 0;animation:pop 1s ease}
.found{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:6px 0}
.found img{width:72px;height:72px;object-fit:contain;background:#fff;border-radius:16px;box-shadow:0 3px 0 rgba(47,61,54,.08)}
.found.all img{width:52px;height:52px;border-radius:12px}
@media (max-width:420px){.found.all{gap:4px}.found.all img{width:44px;height:44px}#winOv .hero{height:96px}}
.btns{display:flex;flex-wrap:wrap;gap:10px 12px;justify-content:center;align-items:center;margin:8px 0}
.go{font:inherit;font-size:24px;font-weight:800;color:#fff;background:#4f9d72;border:0;border-radius:999px;padding:10px 26px 8px;box-shadow:0 5px 0 #2f7a52;cursor:pointer;min-height:54px}
.go:active{transform:translateY(3px);box-shadow:0 2px 0 #2f7a52}
.go2{font:inherit;font-size:19px;font-weight:700;color:#2f7a52;background:#fff;border:2px solid #cfe7d8;border-radius:999px;padding:8px 18px 6px;cursor:pointer;min-height:48px}
a.go2{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.nojs{position:absolute;inset:auto 0 40%;text-align:center;font-size:20px}
@media (max-height:480px){.hero{height:70px}h1{font-size:34px}h2{font-size:28px}.card{padding:10px 16px}.found.all img{width:40px;height:40px}.found img{width:56px;height:56px}.txt{font-size:17px}}
@media (orientation:landscape) and (max-height:540px){.card{width:min(640px,100%)}}
@media (prefers-reduced-motion:reduce){.hero,.stars,#pic.pop,.blank.filled .w,.opt.wig{animation:none}#pic{transition:none}}

/* v1.6: 3 života */
.lives{display:flex;gap:2px;height:42px;align-items:center;padding:0 10px;border-radius:22px;background:rgba(255,255,255,.92);box-shadow:0 3px 0 rgba(47,61,54,.12);flex:none}
.lives i{font-style:normal;font-size:26px;line-height:1;color:#e8475f;transition:color .3s,transform .3s}
.lives i.off{color:#d6dde3}
.lives i.lost{animation:lost .6s ease}
@keyframes lost{0%{transform:scale(1)}30%{transform:scale(1.5)}100%{transform:scale(1)}}
.hearts-big{font-size:40px;color:#e8475f;letter-spacing:6px;margin:4px 0}
@media (max-width:380px){.lives{padding:0 7px}.lives i{font-size:22px}.pill{padding:0 10px;font-size:18px}}
@media (prefers-reduced-motion:reduce){.lives i.lost{animation:none}#pic,#pic.show+#sil{transition:none}}
/* v1.10: gumb Glazba uz gumb za zvuk; na uskim mobitelima manji gumbi da sve stane */
.hbtn.off{color:#6b7a72}
@media (max-width:400px){.hud{gap:5px}.hud .hbtn{width:40px;height:40px}.hud .hbtn svg{width:22px;height:22px}}
/* v1.10: pobjednički ekran – parada, medalja, konfeti, veće pločice koje izgovore ime */
#winOv{place-items:start center;padding-top:62px}
#winOv .card{width:min(940px,100%);margin:auto 0;padding:16px 16px 14px}
.winhead{display:flex;align-items:center;justify-content:center;gap:14px;margin:6px 0 2px}
#winOv .hero{height:120px;margin:0}
#winOv.party .hero{animation:yay .7s cubic-bezier(.3,0,.3,1) 3,jump 1s ease-in-out 2.1s infinite}
@keyframes yay{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(-34px) rotate(-8deg) scale(1.06)}65%{transform:translateY(-10px) rotate(6deg)}85%{transform:translateY(0) scale(1.08,.92)}}
.medal{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:150px;height:150px;border-radius:50%;
  background:radial-gradient(circle at 35% 30%,#fff6c2 0,#ffd84a 38%,#e9a90f 75%,#c98a06 100%);box-shadow:0 0 0 6px #fff1b0,0 0 0 9px #e6b422,0 8px 18px rgba(201,140,20,.35);color:#6b4300;text-align:center;transform:scale(0);opacity:0}
#winOv.party .medal{animation:medal .7s cubic-bezier(.2,1.6,.4,1) forwards}
@keyframes medal{0%{transform:scale(0) rotate(-30deg);opacity:0}100%{transform:scale(1) rotate(0);opacity:1}}
.medal .mtrophy{font-size:40px;line-height:1}
.medal b{font-size:16px;line-height:1.05;font-weight:800;padding:0 12px;margin:2px 0}
.medal .mhearts{font-size:22px;letter-spacing:2px;line-height:1}
.medal .mhearts .on{color:#e5484d;font-style:normal}.medal .mhearts .off{color:#b8902a;font-style:normal;opacity:.7}
.medal::after{content:"";position:absolute;inset:0;border-radius:50%;background:linear-gradient(115deg,transparent 35%,rgba(255,255,255,.75) 50%,transparent 65%);background-size:250% 100%;animation:shine 2.6s 1s ease-in-out infinite}
@keyframes shine{0%{background-position:150% 0}60%,100%{background-position:-60% 0}}
.wtip{margin:6px 0 4px;font-size:17px;font-weight:700;color:#5f6f66}
.wgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:10px;margin:6px 0 8px}
.wt{position:relative;font:inherit;padding:6px 4px 4px;border:3px solid transparent;border-radius:20px;background:#fff;box-shadow:0 3px 0 rgba(47,61,54,.1);cursor:pointer;color:#2f3d36;
  -webkit-tap-highlight-color:transparent;animation:popIn .38s cubic-bezier(.2,1.5,.4,1) var(--d,0ms) both;transition:transform .15s,border-color .15s,box-shadow .15s}
.wt img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;animation:toColor .55s ease-out calc(var(--d,0ms) + 380ms) both;pointer-events:none}
.wt .wn{display:block;font-size:15px;font-weight:800;line-height:1.1;margin-top:2px;min-height:1.1em}
.wt .ck{position:absolute;top:4px;right:4px;width:24px;height:24px;border-radius:50%;background:#4caf50;color:#fff;font:800 15px/24px system-ui,sans-serif;font-style:normal;transform:scale(0);transition:transform .2s cubic-bezier(.2,1.6,.4,1)}
.wt.heard .ck{transform:scale(1)}
.wt.speak{border-color:#f2b632;box-shadow:0 0 0 4px #ffe9a8,0 0 22px 6px rgba(255,200,40,.75);animation:speakPop .45s cubic-bezier(.2,1.6,.4,1);z-index:1}
.wt:active{transform:scale(.96)}
@keyframes popIn{0%{transform:scale(0);opacity:0}100%{transform:scale(1);opacity:1}}
@keyframes toColor{0%{filter:brightness(0) saturate(0);opacity:.8}55%{filter:brightness(1.7) saturate(1.3) drop-shadow(0 0 8px #ffd84a);opacity:1}100%{filter:none;opacity:1}}
@keyframes speakPop{0%{transform:scale(1)}40%{transform:scale(1.14)}100%{transform:scale(1.04)}}
.confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:9}
.confetti i{position:absolute;top:-4vh;width:10px;height:14px;border-radius:2px;animation:fall 3s cubic-bezier(.25,.6,.5,1) forwards}
@keyframes fall{0%{transform:translate(0,0) rotate(0);opacity:1}85%{opacity:1}100%{transform:translate(var(--dx),108vh) rotate(var(--r));opacity:0}}
@media (max-width:520px){.wgrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.wt{border-radius:16px;padding:4px 3px 3px}.wt .wn{font-size:13px}
  #winOv .card{padding:12px 10px 12px;border-radius:26px}.medal{width:122px;height:122px}.medal b{font-size:13.5px;padding:0 10px}.medal .mtrophy{font-size:32px}.medal .mhearts{font-size:18px}#winOv .hero{height:96px}
  #winOv h2{font-size:28px}}
@media (min-width:521px) and (max-width:700px){.wgrid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-height:480px){#winOv{padding-top:52px}#winOv .hero{height:80px}.medal{width:110px;height:110px}}
@media (prefers-reduced-motion:reduce){.wt,.wt img,#winOv.party .hero,.medal::after{animation:none}.medal,#winOv.party .medal{transform:none;opacity:1;animation:none}}
/* v1.10: HUD na 360 px – stane i tipka glazbe */
@media (max-width:400px){.hud{padding-left:calc(8px + env(safe-area-inset-left));padding-right:calc(8px + env(safe-area-inset-right))}.pill{gap:6px;padding:0 9px;font-size:17px}.pill .rz{display:none}.dots{gap:3px}.dots i{width:9px;height:9px}.lives{padding:0 6px}.lives i{font-size:20px}}
