/* Englishzilla – Zilly's treasure island (needs ez-zgames.css) */
#ezIsland .zg-stars{white-space:pre}
#ezIsland .zg-stars.zi-ta{background:#7e10ff;color:#fff}
#ezIsland .zg-stars.zi-tb{background:#20c46a;color:#fff}

#ezIsland .zi-board{position:relative;container-type:inline-size}
#ezIsland .zi-map{position:relative;border-radius:22px;border:2px solid #d9c8f5;overflow:hidden;background:#3fa9e6;aspect-ratio:1000/560;width:100%}
#ezIsland .zi-map>svg{position:absolute;inset:0;width:100%;height:100%;display:block}
#ezIsland .zi-map::after{content:"";position:absolute;inset:0;background:rgba(37,34,46,.3);opacity:0;transition:opacity .25s;pointer-events:none;z-index:8}
#ezIsland[data-state="ask"] .zi-map::after,#ezIsland[data-state="wrong"] .zi-map::after{opacity:1}
#ezIsland .zi-st{fill:#fff;stroke:#2b2140;stroke-width:3}
#ezIsland .zi-stone.parrot .zi-st{fill:#d8f6e4;stroke:#178850}
#ezIsland .zi-stone.crab .zi-st{fill:#ffe0ea;stroke:#b8204f}
#ezIsland .zi-mark{font-size:24px;font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif}
#ezIsland .zi-lid{transform-box:fill-box;transform-origin:50% 100%;transition:transform .5s}
#ezIsland .zi-gold{transition:opacity .5s .2s}
#ezIsland.zi-won .zi-lid{transform:translateY(-14px) rotate(-14deg)}
#ezIsland.zi-won .zi-gold{opacity:1}

/* Zilly (violet) and the green Zilly of the second team */
#ezIsland .zi-tok{position:absolute;width:8.4%;min-width:38px;transform:translate(-50%,-88%);transition:left .36s ease-in-out,top .36s ease-in-out;pointer-events:none;z-index:5;filter:drop-shadow(0 3px 0 rgba(43,33,64,.25))}
#ezIsland .zi-tok svg{display:block;width:100%;height:auto;overflow:visible}
#ezIsland .zi-tok.b svg{filter:hue-rotate(-150deg) saturate(1.2) brightness(1.5)}
#ezIsland .zi-tok.now{z-index:6}
#ezIsland .zi-tok.now::after{content:"";position:absolute;left:50%;bottom:-10%;width:70%;height:14%;margin-left:-35%;border-radius:50%;border:3px solid #ffd84d;animation:zipulse 1s infinite}
@keyframes zipulse{50%{transform:scale(1.25);opacity:.4}}
#ezIsland .zi-tok.hop svg{animation:zihop .36s ease-out}
@keyframes zihop{50%{transform:translateY(-34%)}}

#ezIsland .zi-toast{position:absolute;left:50%;top:10px;transform:translateX(-50%);margin:0;width:max-content;max-width:86%;padding:7px 18px;border-radius:18px;background:#fff;border:3px solid #7e10ff;font-weight:800;font-size:clamp(15px,2.3cqw,24px);text-align:center;opacity:0;transition:opacity .2s;pointer-events:none;z-index:12}
#ezIsland .zi-toast.show{opacity:1}
#ezIsland .zi-toast.ok{border-color:#20c46a;color:#178850}
#ezIsland .zi-toast.no{border-color:#ff7fb0;color:#b8204f}

/* the question card lies over the island while a question is open */
#ezIsland .zi-card{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:20;width:min(86%,820px);max-height:94%;overflow:auto;background:#fff;border:3px solid #7e10ff;border-radius:22px;box-shadow:0 8px 0 rgba(43,33,64,.18);padding:14px 18px 16px;text-align:center}
#ezIsland .zi-q{position:relative;padding:0 46px}
#ezIsland .zi-turn{display:inline-block;margin:0 0 6px;padding:2px 14px;border-radius:99px;font-family:"Poppins",system-ui,sans-serif;font-weight:800;font-size:14px;color:#fff}
#ezIsland .zi-turn.zi-ta{background:#7e10ff}
#ezIsland .zi-turn.zi-tb{background:#20c46a}
#ezIsland .zi-pic{display:flex;justify-content:center;font-size:clamp(64px,13cqw,128px);line-height:1;margin:0 0 4px}
#ezIsland .zi-ask{margin:0;font-family:"Poppins",system-ui,sans-serif;font-weight:800;font-size:clamp(19px,3.3cqw,34px);line-height:1.3;color:#5a00c2;text-wrap:balance}
#ezIsland .zi-ask.long{font-size:clamp(16px,2.5cqw,26px)}
#ezIsland .zi-gap{display:inline-block;width:2.6em;border-bottom:4px solid #ff7fb0;margin:0 .1em;vertical-align:baseline;height:.9em}
#ezIsland .zi-fill{color:#178850;background:#e3f8ec;border-radius:8px;padding:0 .2em}
#ezIsland .zi-say{position:absolute;right:0;top:0;width:40px;height:40px;border:0;border-radius:50%;background:#f1e8ff;font-size:18px;cursor:pointer;margin:0;padding:0}
#ezIsland .zi-say:hover,#ezIsland .zi-say.on{background:#e3d2ff}

#ezIsland .zi-opts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
#ezIsland .zi-opts button{position:relative;display:flex;align-items:center;justify-content:center;min-height:54px;margin:0;padding:8px 14px 8px 34px;background:#faf7ff;border:3px solid #c9a6ff;border-radius:16px;font:800 clamp(17px,2.7cqw,28px)/1.2 "Nunito",system-ui,sans-serif;color:#25222e;cursor:pointer}
#ezIsland .zi-opts button:hover:not(:disabled){background:#f1e8ff;border-color:#7e10ff}
#ezIsland .zi-opts button:disabled{cursor:default;opacity:.55}
#ezIsland .zi-opts button.ok{background:#e3f8ec;border-color:#20c46a;color:#178850;opacity:1}
#ezIsland .zi-opts button.no{background:#fdecf1;border-color:#ff7fb0;color:#b8204f;opacity:1}
#ezIsland .zi-opts kbd{position:absolute;left:8px;top:50%;transform:translateY(-50%);width:20px;height:20px;border-radius:6px;background:#efe6ff;color:#5a00c2;font:800 12px/20px "Poppins",system-ui,sans-serif;text-align:center;padding:0;box-shadow:none;border:0}
#ezIsland .zi-opts.pics{grid-template-columns:repeat(4,1fr)}
#ezIsland .zi-opts.pics button{font-size:clamp(44px,9cqw,92px);padding:10px 6px;line-height:1}
#ezIsland .zi-opts.pics kbd{top:6px;transform:none}
#ezIsland .zi-right{margin:12px 0 0;font-size:clamp(16px,2.3cqw,22px);font-weight:700;color:#25222e}
#ezIsland .zi-right b{color:#178850}
#ezIsland .zi-next,#ezIsland .zi-again{margin:12px 0 0;padding:9px 26px;border:0;border-radius:99px;background:#7e10ff;color:#fff;font:800 clamp(16px,2.3cqw,22px)/1.2 "Poppins",system-ui,sans-serif;cursor:pointer;box-shadow:0 4px 0 #5a00c2}
#ezIsland .zi-next:hover,#ezIsland .zi-again:hover{background:#6a00e0}

/* the coconuts */
#ezIsland .zi-nuts,#ezIsland .zi-end{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:20;width:max-content;max-width:92%;background:#fff;border:3px solid #7e10ff;border-radius:22px;box-shadow:0 8px 0 rgba(43,33,64,.18);padding:12px 22px 16px;text-align:center}
#ezIsland .zi-nuts p,#ezIsland .zi-endtxt{margin:0 0 8px;font-family:"Poppins",system-ui,sans-serif;font-weight:800;font-size:clamp(18px,3cqw,30px);color:#5a00c2}
#ezIsland .zi-nuts div{display:flex;gap:clamp(8px,2cqw,22px);justify-content:center}
#ezIsland .zi-nuts button{display:flex;flex-direction:column;align-items:center;gap:4px;margin:0;padding:8px 10px;background:none;border:3px solid transparent;border-radius:18px;cursor:pointer;font:inherit;color:inherit}
#ezIsland .zi-nuts button:hover:not(:disabled),#ezIsland .zi-nuts button:focus-visible{background:#f6f0ff;border-color:#7e10ff}
#ezIsland .zi-nut{position:relative;display:block;width:clamp(58px,11cqw,104px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 34% 30%,#a9744a,#6f4322 70%);border:3px solid #2b2140;transition:transform .2s}
#ezIsland .zi-nut i{position:absolute;left:50%;top:22%;width:8%;height:8%;margin-left:-14%;border-radius:50%;background:#2b2140;box-shadow:1.6em 0 0 #2b2140,.8em 1.1em 0 #2b2140;font-size:clamp(8px,1.5cqw,14px)}
#ezIsland .zi-nuts button:hover:not(:disabled) .zi-nut{transform:rotate(-8deg) scale(1.06)}
#ezIsland .zi-nuts em{font-style:normal;font-family:"Poppins",system-ui,sans-serif;font-weight:800;font-size:clamp(15px,2.3cqw,22px);min-height:1.3em;color:#6a6479}
#ezIsland .zi-nuts button.open{cursor:default}
#ezIsland .zi-nuts button.open .zi-nut{background:radial-gradient(circle at 50% 50%,#fff 0 52%,#6f4322 54%);opacity:.6}
#ezIsland .zi-nuts button.open .zi-nut i{display:none}
#ezIsland .zi-nuts button.mine{border-color:#20c46a;background:#e3f8ec}
#ezIsland .zi-nuts button.mine .zi-nut{opacity:1}
#ezIsland .zi-nuts button.mine em{color:#178850}
#ezIsland .zi-end{z-index:22}

/* full screen: the island as big as the screen allows */
#ezIsland.zg-full .zi-board{width:100%;max-width:calc((100vh - 76px) * 1000 / 560);margin:0 auto}

/* small screens: the question goes under the island */
@media (max-width:640px){
  #ezIsland .zi-board{container-type:normal}
  #ezIsland .zi-map{border-radius:16px}
  #ezIsland .zi-map::after{display:none}
  #ezIsland .zi-card,#ezIsland .zi-nuts,#ezIsland .zi-end{position:static;transform:none;width:100%;max-width:none;max-height:none;margin-top:10px;box-shadow:0 6px 0 #e6dcf7}
  #ezIsland .zi-q{padding:0 40px}
  #ezIsland .zi-pic{font-size:72px}
  #ezIsland .zi-ask{font-size:20px}
  #ezIsland .zi-ask.long{font-size:17px}
  #ezIsland .zi-opts button{font-size:18px}
  #ezIsland .zi-opts.pics{grid-template-columns:1fr 1fr}
  #ezIsland .zi-opts.pics button{font-size:54px}
  #ezIsland .zi-nut{width:64px}
  #ezIsland .zi-nut i{font-size:9px}
  #ezIsland .zi-nuts p,#ezIsland .zi-endtxt{font-size:19px}
  #ezIsland .zi-nuts em,#ezIsland .zi-right,#ezIsland .zi-next,#ezIsland .zi-again{font-size:16px}
  #ezIsland .zi-toast{font-size:15px}
}
