:root{font-family:Inter,Arial,sans-serif;color:#183b43;background:#f6f9f8;font-synthesis:none;--card-w:clamp(220px,25vw,310px);--card-h:calc(var(--card-w)*1.5)}*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}a{color:inherit;text-decoration:none}button{border:0;background:none}button:focus-visible,a:focus-visible,.gallery:focus-visible{outline:3px solid #00876d;outline-offset:5px}button:disabled{cursor:default}.header{height:92px;display:flex;align-items:center;justify-content:space-between;padding:0 6vw;border-bottom:1px solid #e5ebe8}.brand{display:flex;align-items:center;font-size:24px;font-weight:800;letter-spacing:-1.1px}.brand-icon{display:flex;align-items:center;justify-content:center;margin-right:10px;width:37px;height:37px;border-radius:12px;background:#174b48;color:white;font-size:28px;letter-spacing:-3px;padding-right:3px}.brand-icon span{color:#b6f78c}.brand-dot{color:#00a181}nav{display:flex;gap:34px;height:100%;align-items:center;font-size:14px;font-weight:600}nav a,nav button{height:100%;display:flex;align-items:center;padding:0;position:relative}nav .active:after{content:'';position:absolute;bottom:21px;height:3px;background:#00a181;left:0;right:0;border-radius:3px}.language{display:flex;gap:7px;align-items:center;font-size:12px;font-weight:700}.language span{color:#c9d3d0}.language button{padding:9px 5px;color:#899a9a}.language button[aria-pressed=true]{color:#183b43}main{min-height:calc(100svh - 172px);display:flex;align-items:center;flex-direction:column;justify-content:center;padding:34px 0 22px;overflow:hidden}.intro{text-align:center;margin-bottom:22px}.eyebrow{font-size:10px;letter-spacing:2.3px;font-weight:700;color:#62817f}h1{font-size:clamp(28px,3.4vw,44px);letter-spacing:-1.7px;margin:12px 0 9px;font-weight:750}.intro p{font-size:14px;color:#788e8d;margin:0}.gallery{width:100%;touch-action:pan-y;user-select:none;outline:none;position:relative}.stage{position:relative;width:100%;height:calc(var(--card-h) + 30px);perspective:1100px;isolation:isolate}.card{position:absolute;width:var(--card-w);height:var(--card-h);left:calc(50% - var(--card-w)/2);top:10px;border-radius:22px;padding:23px;text-align:left;overflow:hidden;display:flex;flex-direction:column;backface-visibility:hidden;box-shadow:0 22px 28px -20px #123d4c66,inset 0 0 0 1px #ffffff88;transition:transform .52s cubic-bezier(.22,.75,.25,1),filter .52s,opacity .52s;will-change:transform;transform:translateX(var(--x,0px)) translateZ(var(--z,0px)) rotateY(var(--rot,0deg))}.card:after{content:'';position:absolute;inset:0;background:#163238;opacity:var(--shade,0);pointer-events:none;transition:opacity .52s}.card-top{display:flex;justify-content:space-between;font-size:8px;letter-spacing:1.5px;font-weight:800;opacity:.65}.mint{background:#c2edcc;color:#18564d}.peach{background:#f5cfac;color:#855038}.lilac{background:#d6d2f4;color:#60528a}.art{flex:1;position:relative;display:grid;place-items:center;pointer-events:none}.cover-title{font-size:58px;font-weight:850;letter-spacing:-4px;display:flex;justify-content:space-between;align-items:center}.cover-title>span{font-size:28px;font-weight:400;letter-spacing:0}.cover-note{font-size:10px;margin-top:5px;opacity:.65}.tile{position:absolute;width:75px;height:75px;border-radius:18px;box-shadow:0 12px 0 #168b7255,0 22px 20px #17584b18;display:grid;place-items:center;font-size:66px;line-height:1;transform:rotate(-12deg);background:#f2ffe8;color:#288c70}.tile-one{left:21%;top:15%;z-index:3}.tile-two{left:52%;top:24%;background:#53b99b;transform:rotate(10deg);z-index:2}.tile-three{left:25%;top:52%;background:#8ed3a7;transform:rotate(-12deg)}.tile-four{left:58%;top:57%;width:48px;height:48px;border-radius:13px;font-size:30px;transform:rotate(13deg);background:#f5ffe6}.orbit{position:absolute;width:220px;height:140px;border:1px solid #529e7638;border-radius:50%;transform:rotate(-35deg)}.orbit-two{transform:rotate(55deg)}.sculpture{position:relative;width:180px;height:180px;transform:rotate(-18deg)}.loops i{position:absolute;width:140px;height:140px;border:24px solid #e8865e;border-radius:50%;top:15px;left:0;box-shadow:8px 9px 0 #bf614a}.loops i:nth-child(2){left:35px;top:35px;border-color:#ffc880}.loops i:nth-child(3){left:65px;top:65px;width:85px;height:85px;border-width:17px;border-color:#fff1d3}.blocks i{position:absolute;width:78px;height:78px;border-radius:18px;background:#8d79c9;box-shadow:9px 13px 0 #695a9c;left:10px;top:15px}.blocks i:nth-child(2){left:94px;top:15px;background:#f0e6ff}.blocks i:nth-child(3){left:10px;top:99px;background:#b9a8e7}.blocks i:nth-child(4){left:94px;top:99px;background:#9a88cf}.gallery-controls{display:flex;justify-content:center;align-items:center;gap:28px;margin-top:5px}.arrow{border:1px solid #d9e3df;border-radius:50%;width:38px;height:38px;font-size:21px;background:#ffffff80;transition:background .2s}.arrow:hover{background:#e4efe9}.dots{display:flex;align-items:center;gap:4px}.dots button{width:24px;height:32px;padding:9px;display:grid;place-items:center}.dots button:after{content:'';height:6px;width:6px;background:#c6d6cf;border-radius:10px;transition:width .2s}.dots button[aria-pressed=true]:after{width:18px;background:#247462}.game-info{text-align:center;margin-top:20px;min-height:154px;padding:0 20px}.status{display:flex;align-items:center;justify-content:center;gap:6px;font-size:10px;color:#5d8172}.status>span:first-child{height:5px;width:5px;background:#78a77e;border-radius:50%}.game-info h2{font-size:23px;margin:7px 0;letter-spacing:-.6px}.game-info p{font-size:13px;color:#728784;margin:0 0 15px;max-width:440px;min-height:16px}.primary{background:#204c46;color:white;border-radius:12px;padding:12px 22px;display:inline-flex;gap:34px;align-items:center;font-size:12px;font-weight:600;min-width:145px;justify-content:space-between}.primary:hover{background:#2b665c}.hint{font-size:10px;color:#93a29e;margin:8px 0 0}footer{min-height:80px;padding:18px 6vw;border-top:1px solid #e5ebe8;display:flex;align-items:center;justify-content:space-between;gap:18px;color:#778b85;font-size:10px}footer>div{display:flex;gap:22px;align-items:center}footer button{padding:0;font-size:inherit}footer a:hover,footer button:hover{color:#174b48}.prototype{font-size:9px;color:#99a9a2}dialog{border:1px solid #d9e3df;border-radius:22px;padding:36px;max-width:470px;width:calc(100% - 32px);color:#183b43;background:#f6f9f8}dialog::backdrop{background:#173d4355;backdrop-filter:blur(5px)}dialog h2{font-size:26px;letter-spacing:-.8px}dialog p{font-size:15px;line-height:1.65;color:#607971}dialog a{font-size:14px;text-decoration:underline}.close{position:absolute;right:14px;top:8px;font-size:30px}.dragging .card{transition:none}.dragging{cursor:grabbing}
@media(min-width:1450px){:root{--card-w:330px}.intro{margin-bottom:28px}}
@media(max-width:640px){:root{--card-w:230px}.header{height:76px;padding:0 20px}.brand{font-size:21px}.brand-icon{width:31px;height:31px;font-size:24px;margin-right:7px}nav{gap:16px;font-size:12px}nav .active:after{bottom:16px}.language{gap:1px;font-size:10px}main{padding-top:27px;min-height:calc(100svh - 174px)}.intro{margin-bottom:18px}.eyebrow{font-size:8px;letter-spacing:1.7px}.intro p{font-size:12px}.card{padding:19px;border-radius:18px}.cover-title{font-size:48px}.tile{width:59px;height:59px;border-radius:14px;font-size:48px}.tile-four{width:40px;height:40px;font-size:27px}.orbit{width:170px;height:115px}.sculpture{scale:.8}.game-info{margin-top:16px}.hint{font-size:9px}footer{flex-wrap:wrap;justify-content:center;padding:18px;gap:13px;font-size:9px}footer>div{gap:14px}.prototype{width:100%;text-align:center}.brand-dot{display:none}}
@media(max-width:380px){nav{gap:10px}.brand{font-size:18px}.header{padding:0 12px}.language button{padding:8px 3px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}
@media(max-height:850px) and (min-width:641px){:root{--card-w:220px}.header{height:72px}main{min-height:calc(100svh - 132px);padding:18px 0 14px}.intro{margin-bottom:12px}.intro .eyebrow{display:none}h1{font-size:30px;margin:0 0 6px}.intro p{font-size:12px}.card{padding:18px}.cover-title{font-size:46px}.tile{width:57px;height:57px;font-size:46px}.tile-four{width:37px;height:37px;font-size:26px}.sculpture{scale:.75}.orbit{width:170px;height:110px}.stage{height:calc(var(--card-h) + 20px)}.game-info{min-height:0;margin-top:12px}.game-info h2{font-size:19px;margin:5px 0}.game-info p{margin-bottom:10px;font-size:12px}.primary{padding:10px 20px}.hint{margin-top:12px}footer{min-height:60px}}
/* Continuous brand rotation; no pauses between revolutions. */
.brand-icon{letter-spacing:-2px;padding-right:2px;animation:brand-turn 9s linear infinite;transform-origin:center;will-change:transform}
.brand-dot{display:inline}
@keyframes brand-turn{from{transform:perspective(160px) rotateY(0deg)}to{transform:perspective(160px) rotateY(360deg)}}
@media(max-width:640px){footer>div{flex-wrap:wrap;justify-content:center;row-gap:12px}}
@media(prefers-reduced-motion:reduce){.brand-icon{animation:none}}

/* Approved portrait artwork keeps its full 2:3 frame. */
.card.game-cover{padding:0;background:#15383f}.game-cover img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.game-info p{max-width:640px;line-height:1.5}#dialog-text{white-space:pre-line}dialog{max-width:640px;max-height:85svh;overflow-y:auto}
@media(max-height:850px) and (min-width:641px){:root{--card-w:200px}}
.play-button{margin-top:16px;min-width:170px;justify-content:center;gap:28px;font-size:14px;padding:14px 26px}
#details{background:transparent;color:#204c46;border:1px solid #cddcd5;padding:10px 20px}
#details:hover{background:#e4efe9}
/* Phone layout: scale artwork to the available height, including browser chrome. */
@media(max-width:640px){
 :root{--card-w:min(230px,58vw,max(90px,calc((100svh - 450px)/1.5)));--card-h:calc(var(--card-w)*1.5)}
 body{min-height:100svh;display:flex;flex-direction:column}
 .header{height:52px;flex:0 0 52px;padding:0 18px}
 main{min-height:0;flex:1;padding:6px 0;justify-content:center}
 .intro{margin-bottom:8px}.intro h1{font-size:24px;line-height:28px;margin:0}.intro p{display:none}
 .stage{height:calc(var(--card-h) + 12px)}.card{top:4px;border-radius:16px}
 .gallery-controls{margin-top:4px;gap:24px}.arrow{width:32px;height:32px;font-size:19px}
 .play-button{margin-top:8px;padding:11px 24px;line-height:18px;min-width:160px;font-size:14px}
 .game-info{margin-top:8px;min-height:0;padding:0 18px}.status{font-size:9px;line-height:12px}
 .game-info h2{font-size:19px;line-height:23px;margin:4px 0}.game-info p{font-size:11px;line-height:15px;margin:0 auto 7px;max-width:360px}
 #details{padding:8px 16px;font-size:11px;line-height:16px;min-width:125px}
 .hint{display:none}
 footer{flex:0 0 auto;min-height:34px;padding:8px 18px;flex-wrap:nowrap;justify-content:space-between;font-size:9px;gap:10px}
 footer>div{gap:0}footer button{padding:4px 0}
}
@media(max-width:640px) and (max-height:700px){
 :root{--card-w:min(210px,55vw,max(90px,calc((100svh - 380px)/1.5)))}
 .game-info p{display:none}.intro h1{font-size:21px;line-height:25px}
 .game-info h2{font-size:17px;line-height:21px}
}

/* Keep dialog controls outside the scrolling description. */
dialog{padding:0;overflow:hidden;max-height:85svh;max-height:85dvh;box-shadow:0 20px 70px #173d4330}
dialog[open]{display:flex;flex-direction:column}
.dialog-header{flex:none;padding:24px 28px 18px;border-bottom:1px solid #e5ebe8}
.dialog-header .eyebrow{display:block;padding-right:52px;margin:4px 0 12px}
.dialog-header h2{margin:0;padding-right:42px;outline:none}
dialog .close{top:14px;right:14px;width:44px;height:44px;padding:12px;border-radius:50%;display:grid;place-items:center;background:#e8efec;color:#365852;font-size:inherit;touch-action:manipulation}
.close svg{width:20px;height:20px;pointer-events:none}
dialog .close:hover{background:#dbe8e1}
dialog .close:focus{outline:none}
dialog .close:focus-visible{outline:2px solid #00876d;outline-offset:3px}
.dialog-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;margin:0 10px 14px 0;padding:4px 22px 14px 28px;scrollbar-width:thin;scrollbar-color:#b7cbc2 transparent}
.dialog-body::-webkit-scrollbar{width:4px}
.dialog-body::-webkit-scrollbar-track{background:transparent}
.dialog-body::-webkit-scrollbar-thumb{background:#b7cbc2;border-radius:4px}
.dialog-body p{margin:14px 0 20px}
@media(max-width:640px){.dialog-header{padding:20px 24px 16px}.dialog-header h2{font-size:24px}.dialog-body{padding-left:24px;padding-right:16px}.dialog-body p{font-size:14px;line-height:1.7}}

.dialog-body::-webkit-scrollbar-button{display:none;width:0;height:0}
@media(max-width:640px){.dialog-body{scrollbar-width:none}.dialog-body::-webkit-scrollbar{display:none}}


/* Size cards from the space left after the header, controls and footer. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{height:100vh;height:100dvh;min-height:100dvh;display:flex;flex-direction:column}
.header,footer,main>.intro,main>.play-button,main>.game-info,main>.hint{flex-shrink:0}
main{flex:1;min-height:540px}
.gallery{flex:1;min-height:160px;display:flex;flex-direction:column}
.stage{flex:1;min-height:120px;container-type:size;--card-w:min(52cqw,calc((100cqh - 20px)/1.5));--card-h:calc(var(--card-w)*1.5)}
.gallery-controls{flex-shrink:0}
.stage .card{top:max(4px,calc((100cqh - var(--card-h))/2))}
@media(max-height:850px) and (min-width:641px){main{min-height:400px}}
@media(max-width:640px){
 main{min-height:400px}
 .stage{--card-w:min(64cqw,calc((100cqh - 12px)/1.5))}
 footer{padding-bottom:max(8px,env(safe-area-inset-bottom))}
}
@media(max-width:640px) and (max-height:700px){main{min-height:330px}}

/* Independent favorite control, never nested inside the game button. */
.card-open{display:block;width:100%;height:100%;padding:0;border-radius:inherit;overflow:hidden}
.card:after{pointer-events:none}
.card-open:focus-visible{outline-offset:-4px}
.favorite-toggle{position:absolute;top:10px;right:10px;z-index:2;width:44px;height:44px;display:grid;place-items:center;border-radius:50%;background:#f6f9f8f2;color:#365852;box-shadow:0 2px 12px #123d4c26;touch-action:manipulation}
.favorite-toggle svg,.favorites-button svg,.favorite-remove svg{width:21px;height:21px;pointer-events:none}
.favorite-toggle[aria-pressed=true],.favorite-remove{color:#bd4a65}
.favorite-toggle[aria-pressed=true] svg,.favorite-remove svg{fill:currentColor}
.favorite-toggle:focus-visible{outline-offset:-3px}
.catalog-actions{display:flex;align-items:stretch;justify-content:center;gap:10px;margin-top:16px;flex-shrink:0;max-width:100%;padding:0 12px}
.catalog-actions .play-button{margin:0;min-width:145px}
.favorites-button{background:#e8efec;color:#204c46;gap:8px;justify-content:center;min-width:0}
.favorites-button:hover{background:#dbe8e1}
#favorites-count{min-width:18px;font-size:11px;font-variant-numeric:tabular-nums}
.favorite-row{display:flex;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid #e5ebe8}
.favorite-row:last-child{border:0}
dialog .favorite-game{display:flex;align-items:center;gap:16px;flex:1;min-width:0;text-decoration:none;font-weight:600}
.favorite-game img{object-fit:cover;border-radius:8px;flex-shrink:0}
.favorite-remove{width:44px;height:44px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;background:#f6e9ed}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:640px){.catalog-actions{margin-top:8px;gap:8px}.catalog-actions .primary{padding:11px 12px;min-height:44px;font-size:12px;gap:7px}.catalog-actions .play-button{min-width:115px}.favorite-toggle{top:7px;right:7px}}

/* Translucent glass sphere with a slowly moving iridescent reflection. */
.favorite-toggle{width:56px;height:56px;border:1px solid #ffffffb0;overflow:hidden;isolation:isolate;background:radial-gradient(ellipse at 30% 20%,#ffffffa8 0%,#ffffff20 33%,transparent 52%),radial-gradient(circle at 50% 42%,transparent 36%,#14374640 76%,#ffffffb0 96%),#d9f6ff12;backdrop-filter:blur(2px) saturate(1.3);-webkit-backdrop-filter:blur(2px) saturate(1.3);box-shadow:inset 2px 3px 5px #ffffffb8,inset -4px -6px 9px #12334655,inset 0 0 2px 1px #ffffffad,0 5px 9px #102d4545;color:#203e45;transition:box-shadow .2s}
.favorite-toggle::before{content:'';position:absolute;inset:2px;z-index:0;border-radius:50%;background:radial-gradient(ellipse at 28% 16%,#fff 0 3%,#ffffffb0 5%,transparent 17%),radial-gradient(ellipse at 77% 77%,#b9edffb0 0%,transparent 23%),conic-gradient(from 30deg,transparent 0deg,#afe9ff70 65deg,transparent 125deg,#ffd6ed65 190deg,#fff3ba70 245deg,transparent 310deg);box-shadow:inset 2px 0 3px #ffffffb0,inset -2px 0 4px #a8dfff80;animation:favorite-glass-turn 5s linear infinite;pointer-events:none}
.favorite-toggle::after{content:'';position:absolute;inset:5px;z-index:0;border-radius:50%;background:linear-gradient(115deg,transparent 30%,#ffffff08 39%,#ffffffe0 47%,#ffffff50 51%,transparent 62%);transform:translateX(-110%) rotate(-15deg);animation:favorite-glass-glint 4s ease-in-out infinite;pointer-events:none}
.favorite-toggle svg{width:30px;height:30px;position:relative;z-index:1;filter:drop-shadow(0 1px 1px #ffffffdc)}
.favorite-toggle[aria-pressed=true]{color:#c52e5a}
.favorite-toggle:hover{box-shadow:inset 2px 3px 5px #ffffffdc,inset -4px -6px 9px #12334655,inset 0 0 2px 1px #fff,0 5px 12px #102d4560}
@keyframes favorite-glass-turn{to{transform:rotate(360deg)}}
@keyframes favorite-glass-glint{0%,12%{transform:translateX(-110%) rotate(-15deg);opacity:0}25%{opacity:.9}62%{transform:translateX(110%) rotate(-15deg);opacity:0}100%{transform:translateX(110%) rotate(-15deg);opacity:0}}
@media(prefers-reduced-motion:reduce){.favorite-toggle::before,.favorite-toggle::after{animation:none}.favorite-toggle::after{transform:rotate(-15deg);opacity:.3}}

.card[hidden],.play-button[hidden],.game-info[hidden],.dots button[hidden],.empty-favorites[hidden]{display:none!important}
.empty-favorites{position:absolute;inset:0;display:grid;place-content:center;text-align:center;padding:24px;color:var(--muted,#617674);font-size:16px;line-height:1.6;max-width:360px;margin:auto;pointer-events:none}
.arrow:disabled{opacity:.35;cursor:default}
