@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');
:root{--accent:#70f4d0;--secondary:#b8a1ff;--ink:#101e2b;--muted:#9aaeb9;--font:Inter,Arial,sans-serif}*{box-sizing:border-box}body{margin:0;background:#0e1b26;color:#f3f7ee;font-family:var(--font);height:100dvh;min-height:570px;overflow:hidden}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--secondary);outline-offset:4px}[hidden]{display:none!important}.world,.shade{position:fixed;inset:0;pointer-events:none}.world{background:radial-gradient(ellipse at 50% 48%,#285149 0,#142d36 37%,#101c2c 75%);overflow:hidden;background-size:cover;background-position:center}.shade{background:linear-gradient(#101c2c33,transparent 60%,#0c1825cc)}.moon{position:absolute;width:115px;height:115px;right:15%;top:19%;background:#a3e2ce0a;box-shadow:0 0 70px #70f4d011;clip-path:polygon(25% 0,75% 0,75% 25%,100% 25%,100% 75%,75% 75%,75% 100%,25% 100%,25% 75%,0 75%,0 25%,25% 25%)}.mountain{position:absolute;bottom:0;width:40%;height:66%;background:linear-gradient(135deg,#29413f,#142e30);clip-path:polygon(0 100%,0 40%,14% 40%,14% 30%,25% 30%,25% 15%,39% 15%,39% 0,55% 0,55% 19%,69% 19%,69% 40%,82% 40%,82% 63%,100% 63%,100% 100%)}.m1{left:-15%;transform:scaleX(-1);opacity:.8}.m2{right:-13%;height:57%;background:linear-gradient(60deg,#15272a,#2c4241)}.m3{left:0;width:100%;height:16%;background:#172e2d;opacity:.5}.ground{position:absolute;bottom:-110px;left:-25%;width:150%;height:250px;transform:perspective(280px) rotateX(45deg);background-image:linear-gradient(#789b8120 1px,transparent 1px),linear-gradient(90deg,#789b8120 1px,transparent 1px);background-size:70px 70px}#stars i{position:absolute;width:3px;height:3px;background:var(--accent);opacity:.3;animation:twinkle 4s infinite alternate}@keyframes twinkle{to{opacity:.05;transform:translateY(-15px)}}header{height:86px;padding:0 4.5%;display:flex;justify-content:space-between;align-items:center;position:relative;z-index:2;border-bottom:1px solid #ffffff0b}.brand{display:flex;gap:11px;align-items:center;border:0;color:#fff;background:none;font-weight:800;font-size:13px;letter-spacing:1.5px}.brand-icon{display:grid;place-items:center;width:36px;height:36px;border:1px solid #70f4d05c;color:var(--accent);background:#70f4d00d}.brand img{width:42px;height:42px;object-fit:contain;border-radius:50%}.top-actions{display:flex;gap:9px;align-items:center}.edition{font-size:9px;letter-spacing:2px;color:var(--muted);margin-right:22px}.icon{height:36px;min-width:36px;background:#ffffff05;color:#bdd0d6;border:1px solid #ffffff19;font-size:18px;border-radius:4px}.icon:hover{background:#ffffff15}main{position:relative;z-index:1;height:calc(100dvh - 133px);min-height:440px;display:grid;place-items:center}.screen{width:100%}.lobby{text-align:center;display:flex;align-items:center;flex-direction:column}.eyebrow{font-size:9px;font-weight:700;letter-spacing:2.5px;color:var(--accent)}.eyebrow span{display:inline-block;width:6px;height:6px;background:var(--accent);margin-right:7px;box-shadow:0 0 10px var(--accent)}h1{font-family:'Barlow Condensed',Impact,sans-serif;font-size:clamp(56px,7.8vh,88px);line-height:.9;letter-spacing:1px;margin:22px 0 12px;font-weight:900;text-shadow:0 5px 0 #0a181e,0 9px 25px #0004}h1 em{font-style:normal;color:var(--accent)}.lead{font-size:12px;color:#afc4c8;margin:0}.hero-art{height:clamp(130px,23vh,245px);width:310px;position:relative}.halo{position:absolute;inset:4% 3%;background:radial-gradient(ellipse,#70f4d01c,transparent 65%)}.hero-pick{position:absolute;width:165px;height:165px;top:0;left:76px;z-index:2;filter:drop-shadow(0 0 18px #6affd544);animation:hover 4s ease-in-out infinite}.hero-pick svg{width:100%;height:100%}.pedestal{position:absolute;width:166px;height:58px;bottom:9px;left:72px;background:linear-gradient(90deg,#2d4b4b 50%,#213b41 50%);clip-path:polygon(0 15%,50% 0,100% 15%,100% 78%,50% 100%,0 78%);border-top:7px solid #60796a;box-shadow:0 0 30px #70f4d066}.pedestal b{display:block;color:var(--accent);padding:14px 0;font-size:20px}.diamond{position:absolute;color:var(--accent);font-size:35px;filter:drop-shadow(0 0 12px #70f4d040);animation:hover 3s infinite}.d1{left:38px;top:44%}.d2{right:27px;top:24%;font-size:20px;animation-delay:-1s}.spark{position:absolute;color:#b8a1ff}.sp1{left:75px;top:23%}.sp2{right:68px;bottom:37%}@keyframes hover{50%{transform:translateY(-9px) rotate(4deg)}}.mission{font-size:13px;color:#bbcdd0;margin:5px 0 18px}.mission strong{color:#fff}.primary{border:0;border-bottom:4px solid #1d9c80;background:var(--accent);color:#112d29;padding:16px 27px;font-weight:800;font-size:12px;letter-spacing:.6px;box-shadow:0 4px 25px #70f4d016;transition:transform .15s,filter .15s;border-radius:3px}.primary:hover{filter:brightness(1.1);transform:translateY(-2px)}.primary:active{transform:translateY(2px)}#play{min-width:290px}#play span{margin-left:50px;font-size:19px}.lobby-details{display:flex;gap:23px;font-size:9px;color:#a8bdbf;margin-top:19px}.lobby-details b{font-weight:500}.how{display:flex;align-items:center;gap:20px;font-size:10px;color:#9fb4ba;margin-top:32px}.how b{color:var(--accent);font-size:9px;margin-right:6px}.how i{color:#48616a;font-style:normal}footer{position:relative;height:47px;padding:0 4.5%;display:flex;align-items:center;justify-content:space-between;color:#718890;font-size:8px;letter-spacing:1.5px}footer i{color:var(--accent);margin-left:12px}.game{width:min(900px,90%);height:100%;padding:16px 0;display:flex;flex-direction:column;justify-content:center}.game-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.quiet{border:0;background:none;color:#aec2c5;font-size:12px}.game-caption{font-size:10px;letter-spacing:2px;font-weight:800}.tag{font-size:9px;letter-spacing:1px;color:var(--accent);padding:7px 10px;border:1px solid #70f4d033;background:#70f4d00a}.game-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}h2{font-family:'Barlow Condensed',Impact,sans-serif;font-size:34px;font-weight:700;margin:9px 0 12px;letter-spacing:.3px}.counters{display:flex;gap:10px}.counter{padding:10px 18px;background:#0c1b2490;border:1px solid #8aacb12b;min-width:88px}.counter small{font-size:8px;letter-spacing:1.7px;color:var(--muted);display:block}.counter strong{font-size:27px;color:var(--accent);display:block;font-variant-numeric:tabular-nums;margin-top:4px}.counter span{font-size:15px;color:var(--muted)}.timer strong{color:#fff}.timer.urgent strong{color:#ff9d83}.progress{height:3px;background:#ffffff10;margin:18px 0}.progress div{height:100%;width:100%;background:var(--accent);transition:width .3s}.board{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;max-width:660px;width:100%;margin:0 auto;min-height:0;flex:0 1 auto}.tile{aspect-ratio:1.16;position:relative;border:0;border-radius:3px;padding:0;background:none;perspective:700px;min-height:0;touch-action:manipulation}.tile-inner{position:absolute;inset:0;transform-style:preserve-3d;transition:transform .32s}.tile.open .tile-inner,.tile.matched .tile-inner{transform:rotateY(180deg)}.face{position:absolute;inset:0;backface-visibility:hidden;border-radius:3px;display:flex;align-items:center;justify-content:center}.back{border:3px solid #536868;border-top-color:#79928a;border-left-color:#637f79;border-bottom:7px solid #263b40;background:repeating-linear-gradient(90deg,transparent 0 26%,#0a172310 26% 52%,transparent 52% 80%),repeating-linear-gradient(0deg,#3a5157 0 21%,#435a5d 21% 43%,#3d5558 43% 74%,#48605e 74% 100%);box-shadow:inset 0 0 0 4px #8aab8d12,0 5px 0 #081822}.back:before{content:'◆';font-size:27px;color:#a8c5bc36;border:2px solid #a3c6b424;padding:6px 13px;transform:rotate(0deg)}.back:after{content:'';position:absolute;left:9%;top:10%;width:12%;height:6%;background:#8ba08744;box-shadow:60px 40px #172b3020,30px 60px #7f9d8533}.tile:hover:not(:disabled) .back{filter:brightness(1.17);border-top-color:var(--accent)}.front{transform:rotateY(180deg);background:linear-gradient(140deg,#233e47,#182c39);border:2px solid var(--secondary);border-bottom-width:6px;font-size:clamp(32px,5vh,56px);box-shadow:inset 0 0 20px #b8a1ff11}.front img{width:75%;height:75%;object-fit:contain;image-rendering:auto}.tile.matched .front{border-color:var(--accent);background:#1c4b43;box-shadow:0 0 20px #70f4d020}.tile.matched .front:after{content:'✓';position:absolute;right:8px;top:5px;color:var(--accent);font:700 13px Inter,Arial}.game-bottom{display:flex;justify-content:space-between;font-size:10px;color:#a3b8bd;margin-top:20px;gap:10px}.sound-note{color:var(--accent)}#pickCursor{position:fixed;width:100px;height:100px;z-index:10;pointer-events:none;display:none;filter:drop-shadow(3px 5px 3px #0007);transform-origin:75% 85%}#pickCursor.hit{animation:strike .3s}@keyframes strike{50%{transform:rotate(-55deg) translate(-15px,-5px)}}#particles{position:fixed;inset:0;pointer-events:none;z-index:20}.particle{position:absolute;width:7px;height:7px;background:var(--accent);animation:burst .8s ease-out forwards}@keyframes burst{to{transform:translate(var(--dx),var(--dy)) rotate(180deg);opacity:0}}dialog{color:#edf5f0;background:#142732;border:1px solid #49626b;border-radius:10px;box-shadow:0 25px 120px #0009;max-height:90dvh;width:min(900px,94vw);padding:28px}dialog::backdrop{background:#06131bdc;backdrop-filter:blur(8px)}#result{width:430px;text-align:center;padding:30px}.chest{font-size:75px;margin:22px 0;filter:drop-shadow(0 0 24px #ffce6755);animation:hover 3s infinite}.result-inner h2{font-size:39px;color:var(--accent)}.result-inner p{color:#abc1c7;font-size:13px;line-height:1.6}.prize-card{border:1px solid #d2b86750;background:#d2b8670a;padding:20px;margin:25px 0}.prize-card small{display:block;color:#d2b867;letter-spacing:2px;font-size:9px;margin:8px}.prize-card strong{font-size:20px}.prize-card img{height:90px;max-width:100%;object-fit:contain}.result-inner button{width:100%;margin-top:8px}.secondary{border:1px solid #61788160;background:#ffffff04;color:#c6d9d9;border-radius:3px;padding:12px 16px;font-size:11px;font-weight:600}.secondary:hover{background:#ffffff0e}.admin-head{display:flex;justify-content:space-between;align-items:center}.admin-head h2{font-size:30px}.tabs{display:flex;gap:8px;border-bottom:1px solid #fff2;margin:20px 0}.tabs button{padding:12px;background:none;color:#a8bdc7;border:0;border-bottom:2px solid transparent;font-size:12px}.tabs .active{color:var(--accent);border-color:var(--accent)}.fields{display:grid;grid-template-columns:1fr 1fr;gap:17px}label{display:flex;flex-direction:column;gap:8px;font-size:11px;color:#bbccd1}input,select{width:100%;min-height:40px;border:1px solid #506773;background:#0b1d27;color:#eef4f2;border-radius:4px;padding:9px}input[type=color]{padding:3px}input[type=file]{font-size:10px}input[type=range]{padding:0}h3{font-size:15px;margin:24px 0 10px}.note{font-size:11px;color:#8fa9b4;line-height:1.7}.asset-inputs{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.asset-box{border:1px solid #fff1;padding:10px;background:#0b1d2740}.asset-box .asset-preview{height:42px;display:flex;justify-content:center;font-size:30px;margin-bottom:10px}.asset-preview img{height:100%;max-width:100%;object-fit:contain}.asset-box input{font-size:9px;padding:5px}.text-button{padding:3px;background:none;border:0;color:var(--accent);font-size:10px;text-align:left}.save-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:25px;padding-top:20px;border-top:1px solid #fff1}.file-button{cursor:pointer;display:block}.stats{display:flex;gap:12px;margin-bottom:20px}.stats div{flex:1;padding:15px;background:#091c2670;border:1px solid #fff1}.stats strong{display:block;font-size:26px;color:var(--accent);margin-bottom:6px}.stats small{font-size:10px;color:#a9bdc3}.table-wrap{overflow:auto;max-height:320px}table{width:100%;font-size:10px;border-collapse:collapse}td,th{text-align:left;border-bottom:1px solid #fff1;padding:12px 8px}th{color:var(--accent)}#pinForm{max-width:340px;margin:25px auto}#pinForm p{font-size:12px;color:#a5bdc6}#pinForm button{margin-top:18px;width:100%}#toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);padding:13px 22px;background:#294638;color:#dcffee;border:1px solid #8cb9a0;z-index:100;border-radius:5px;font-size:12px;display:none}
@media(min-height:900px){.hero-art{height:250px}.hero-pick{width:210px;height:210px;left:50px}.board{max-width:740px}}@media(max-height:760px) and (min-width:700px){header{height:64px}main{height:calc(100dvh - 99px)}footer{height:35px}h1{font-size:58px;margin-top:14px}.hero-art{height:140px}.hero-pick{height:120px;width:120px;left:95px}.pedestal{height:43px}.how{margin-top:20px}.game-top{margin-bottom:9px}.board{max-width:540px;gap:9px}.game-heading h2{font-size:28px}.counter{padding:6px 12px}.progress{margin:10px 0}.game-bottom{margin-top:12px}}@media(max-width:600px){body{min-height:520px}header{height:66px;padding:0 5%}.edition{display:none}main{height:calc(100dvh - 102px)}footer{height:36px;font-size:6px;padding:0 5%}footer span:last-child{display:none}.eyebrow{font-size:7px;letter-spacing:1.5px}h1{font-size:65px;margin-top:22px}.hero-art{height:180px}.hero-pick{width:150px;height:150px;left:78px}.lead{font-size:11px}.how{gap:9px;margin-top:27px;font-size:9px}.how i{display:none}.lobby-details{font-size:8px;gap:13px}.mission{font-size:12px}.game{width:92%;padding:12px 0;justify-content:center}.game-caption{font-size:8px}.game-heading{align-items:center}.game-heading h2{font-size:25px;max-width:200px}.game-heading .eyebrow{font-size:6px}.counters{gap:5px}.counter{min-width:58px;padding:8px}.counter strong{font-size:23px}.counter small{font-size:6px}.board{gap:7px}.tile{aspect-ratio:.79}.back{border-width:2px;border-bottom-width:5px}.back:before{font-size:19px;padding:6px}.back:after{box-shadow:none}.front{font-size:32px}.game-bottom{font-size:9px;line-height:1.6}.sound-note{display:none}.fields{grid-template-columns:1fr}.asset-inputs{grid-template-columns:1fr 1fr}dialog{padding:20px}.admin-head h2{font-size:25px}.tabs{gap:0}.tabs button{font-size:10px;padding:10px}.game-top{margin-bottom:25px}#result{width:90vw}.stats{gap:6px}.stats div{padding:10px}.save-row>*{width:100%;text-align:center}}@media(max-height:650px) and (max-width:600px){h1{font-size:48px;margin:15px 0 10px}.hero-art{height:125px}.hero-pick{height:110px;left:78px}.how{margin-top:15px}.lobby-details{margin-top:12px}.tile{aspect-ratio:1}.game-top{margin-bottom:10px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

@media(min-width:601px){.board{max-width:min(660px,calc((100dvh - 330px) * 4 * 1.16 / var(--rows,3)))}}
