*{box-sizing:border-box}
:root{--ink:#261e3e;--red:#f65318;--cream:#fffbf1;color:var(--ink);font-family:"Avenir Next",ui-rounded,"Nunito",system-ui,sans-serif;background:var(--cream)}
body{margin:0;min-height:100svh;display:flex;flex-direction:column}
button,input{font:inherit;appearance:none;background:none;border:0;color:inherit;padding:0}
button,a{cursor:pointer;text-decoration:none;color:inherit;font-weight:800;transition:transform .15s,background .15s,color .15s}
button,.brand,h2,.find,nav,.bar,.top,footer .wrap{display:flex;align-items:center;gap:9px}
button{justify-content:center;min-height:42px}
button:disabled{opacity:.48;cursor:default}
:focus-visible,.find:focus-within{outline:3px solid #3264d6;outline-offset:4px}
.find input{outline:none;width:100%;min-width:0;font-size:15px}
.find input::placeholder{color:#696275}
.find{border:2px solid var(--ink);background:white;padding:0 15px;height:44px;border-radius:30px;width:225px}
.find:hover{background:#fff9e7}
i{display:inline-flex}svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
[hidden]{display:none!important}
.wrap{width:min(1144px,90%);margin:auto}
header{border-bottom:2px solid var(--ink);background:#fffdf7}
.bar{height:80px;justify-content:space-between}
.brand{font-size:30px;letter-spacing:-1.6px;gap:0;font-weight:1000}
.brand span,h1 span{color:var(--red)}
.brand img{width:55px;margin-left:-9px}
nav button{padding:0 16px;border-radius:15px;border:2px solid transparent;font-size:15px}
nav button:hover,#close:hover{background:#f5efdf}
nav button[aria-current]{background:#ffdc61;border-color:var(--ink);box-shadow:0 3px var(--ink)}
main.wrap{flex:1;margin:28px auto 46px}
.hero,.card,dialog{border:3px solid var(--ink);border-radius:25px;box-shadow:0 5px var(--ink);overflow:hidden}
.hero{position:relative;background:linear-gradient(90deg,#b1edff 0%,#b1edffe0 25%,transparent 60%),#97e0ff url('/art/meadow.png') center 65%/cover;height:clamp(300px,28vw,354px);display:flex;align-items:center;padding:0 5%}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(48px,5.1vw,72px);letter-spacing:-.06em;font-weight:1000;line-height:1;text-shadow:0 4px #fff7e4}
.intro{z-index:1}
.intro p{font-size:clamp(16px,1.5vw,19px);font-weight:650;margin:16px 0 23px}
.primary{font-size:17px;border-radius:15px;border:2.5px solid var(--ink);box-shadow:0 4px var(--ink);padding:0 22px;min-height:50px;background:#ff692b;color:#211331}
.primary:hover{background:#ffcf50;transform:translateY(-2px)}
.primary:active,.card button:active{transform:translateY(2px)}
.float{position:absolute;left:54%;top:6%;width:25%;transform:rotate(-10deg);filter:drop-shadow(0 6px 0 #5b355099)}
.float img{width:100%;animation:float 3.5s ease-in-out infinite;filter:drop-shadow(4px 0 white) drop-shadow(-4px 0 white) drop-shadow(0 4px white) drop-shadow(0 -4px white)}
@keyframes float{50%{transform:translateY(-10px)}}
.float b{position:absolute;font-size:4vw;color:#ffdd43;-webkit-text-stroke:2px var(--ink);left:5%;top:7%}
.float b:nth-of-type(2){left:84%;top:16%;font-size:3vw}
.float b:last-child{left:14%;top:66%;font-size:2.5vw}
.library{margin-top:38px}
h2{font-size:28px;letter-spacing:-.9px;font-weight:950}
h2 svg{width:31px;height:31px}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:18px}
.card{position:relative;background:white;border-radius:20px;transition:transform .18s}
.card:hover{transform:translateY(-4px)}
.open{display:block;text-align:left;width:100%}
.open:focus-visible{outline-offset:-6px;border-radius:18px}
.cover{display:flex;align-items:center;justify-content:center;aspect-ratio:1.85;border-bottom:2px solid var(--ink);overflow:hidden;position:relative}
.pairs{background:url('/art/bg_splash.jpg') center 57%/cover}
.catch{background:radial-gradient(ellipse at 50% 120%,#e694ef,transparent 68%),linear-gradient(#46309a,#8168f7 70%,#ffb076)}
.catch img{position:absolute;width:48%;transform:rotate(12deg);filter:drop-shadow(0 5px 0 #331744aa) drop-shadow(0 0 24px #ffda52)}
.catch b{color:#ffdf55;font-size:clamp(32px,5vw,76px);position:absolute;left:12%;top:10%;transform:rotate(-13deg);text-shadow:0 4px #ed7b2c,0 0 15px gold}
.catch b:nth-child(2){left:69%;top:46%;font-size:50px;transform:rotate(18deg)}
.catch b:last-child{font-size:24px;color:#fffacc;left:61%;top:5%;text-shadow:-90px 108px white,90px 40px white,-135px 70px white,-72px 1px white,17px 128px #ffe69b,-143px 124px white}
.lights{background:radial-gradient(ellipse at bottom,#6addbe,#138d93 58%,#07445e)}
.tiles{width:48%;max-width:200px;aspect-ratio:1;display:grid;grid-template-columns:repeat(3,1fr);transform:perspective(450px) rotateX(40deg) rotateZ(-32deg);gap:6%}
.tiles b,.tile{background:#0b4157;border:2px solid #122744;box-shadow:0 5px #102b47,inset 0 3px #378597;border-radius:21%;display:grid;place-items:center}
.tiles b:nth-child(odd),.tile.on{background:#ffdc4f;box-shadow:0 5px #de7229,inset 0 4px #fff5a7,0 0 24px #ffde76}
.tiles b:nth-child(odd):after,.tile.on:after{content:"✦";color:#fffbbe;font-size:26px}
.fav,#close{width:42px;border-radius:50%;border:2px solid;background:var(--cream)}
.fav{position:absolute;right:12px;top:12px}
.fav:hover,.fav[aria-pressed=true]{background:#ffdbcf}
.fav[aria-pressed=true] svg{fill:#fb4d55}
.name{padding:16px 18px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:3px;font-size:21px;font-weight:900;letter-spacing:-.6px}
.name small{grid-row:2;font-weight:600;color:#6d647b;letter-spacing:0;font-size:14px}
.name i{grid-row:1/3;grid-column:2;background:#ffdc61;border:2px solid;border-radius:50%;padding:9px}
.name svg{width:18px;height:18px;fill:var(--ink)}
footer{border-top:2px solid #e5decf;font-size:14px}
footer .wrap{gap:24px;min-height:80px;flex-wrap:wrap;padding:20px 0}
footer span{margin-right:auto;color:#655d71}
footer a:hover{color:#ba3700}
#empty{text-align:center;padding:48px 0}
#empty button,dialog .primary{margin:18px auto 5px}
dialog{width:min(520px,94%);background:var(--cream);color:inherit;padding:20px;max-height:94svh;overflow:auto;overscroll-behavior:contain}
dialog::backdrop{background:#160f2bb8}
body:has(dialog[open]){overflow:hidden}
.top,.stats{justify-content:space-between}
dialog h2{font-size:24px}
dialog p{font-size:16px;line-height:1.55;margin-top:12px}
dialog .cover{border:2px solid;border-radius:16px;margin:14px 0;max-height:23svh;width:100%}
.stats{display:flex;font-weight:800;margin:14px 0}
.board{width:min(100%,50svh);margin:0 auto;display:grid;gap:8px;grid-template-columns:repeat(4,1fr);aspect-ratio:1}
.flip,.tile{min-height:0;min-width:0;overflow:hidden}
.flip{background:#96d8fb;border:2px solid;border-radius:15%;font-size:24px}
.flip img{width:80%;height:80%;object-fit:contain}
.flip.shown{background:#fff}
.flip.done{background:#ade9ae;opacity:1}
.flip:hover:not(:disabled){background:#ffe080}
.board.lamps{grid-template-columns:repeat(3,1fr);gap:14px;padding:18px 18px 23px;border-radius:18px;background:#10687a}
.tile:hover{border-color:#fff}
canvas{display:block;border:2px solid;border-radius:15px;width:min(100%,50svh);margin:auto;touch-action:none}
.end{text-align:center;padding:18px 0}
.end img{width:120px}
@media(max-width:940px){
.wrap{width:94%}.find{width:168px}nav button{padding:0 9px}nav{gap:4px}.grid{gap:14px}.name{font-size:18px;padding:13px}.name i{padding:6px}.float{left:60%;top:13%;width:30%}}
@media(max-width:760px){
.wrap{width:92%}.bar{flex-wrap:wrap;height:auto;padding:10px 0 14px;gap:8px}.brand{font-size:25px}.brand img{width:43px}.find{width:43%;padding:0 10px;height:38px;gap:6px}.find input{font-size:16px}.find svg{width:17px}nav{order:3;width:100%;justify-content:space-between}nav button{font-size:14px;gap:6px;min-height:38px;padding:0 8px}
main.wrap{margin:18px auto 35px}.hero{height:254px;padding:0 5%;background-position:center bottom;background-image:linear-gradient(100deg,#b1edfff0,#b1edffbb 50%,transparent),url('/art/meadow.png')}
h1{font-size:clamp(34px,8vw,48px)}.intro p{max-width:205px;line-height:1.35;font-size:15px;margin:12px 0 14px}.primary{min-height:43px;font-size:15px;padding:0 16px}.float{left:62%;width:40%;top:18%}.float b{font-size:6vw;-webkit-text-stroke:1px}
.library{margin-top:26px}h2{font-size:23px}.grid{grid-template-columns:repeat(auto-fit,minmax(min(270px,100%),1fr));gap:22px;margin-top:14px}.name{font-size:21px;padding:15px}.catch b{font-size:56px}footer .wrap{gap:14px}footer span{display:none}footer strong{margin-right:auto}dialog{padding:14px}}
@media(max-width:365px){nav button{font-size:13px;padding:0 5px}.find i{display:none}.float{top:34%}.intro p{max-width:165px}footer .wrap{font-size:13px;gap:10px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
