.air-game{position:fixed;inset:0;z-index:20000;color:#fff;background:radial-gradient(ellipse at 85% 20%,#f75cce66,transparent 40%),radial-gradient(ellipse at 15% 80%,#9965ff88,transparent 45%),#143791 url('assets/background_porto.png') center/cover;font-family:Geist,sans-serif;overflow:hidden}.air-game[hidden],.air-game [hidden]{display:none!important}.air-game canvas{width:100%;height:100%;touch-action:none;display:block}.air-game header{position:absolute;inset:20px 24px auto;display:flex;align-items:center;justify-content:space-between}.air-game header button{padding:12px 16px;border:1px solid #ffffff60;border-radius:30px;background:#10235460}.game-score{position:absolute;bottom:24px;width:100%;text-align:center;pointer-events:none;letter-spacing:.08em;font-size:18px}.game-overlay{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(600px,calc(100% - 36px));max-height:calc(100svh - 130px);overflow:auto;text-align:center;background:#122768ed;border:1px solid #c8dcff77;border-radius:30px;padding:28px;box-shadow:0 25px 90px #11154b88}.game-overlay h1{font-family:'Apophis Display',serif;font-size:clamp(36px,5vw,66px);line-height:1.05;margin:16px 0}.game-overlay h2{font-size:20px;line-height:1.3}.game-overlay p{font-size:16px;line-height:1.6}.game-overlay>span{font-size:11px;letter-spacing:.14em}.game-overlay button,.game-detail button,.game-detail .project-actions a{display:inline-block;background:#fff;color:#18375c;border-radius:28px;padding:12px 20px;margin:6px;font:500 14px Geist;cursor:pointer}.game-project-image{display:block;width:100%;max-height:240px;object-fit:cover;border-radius:16px;margin-top:18px}.game-detail{position:absolute;inset:24px max(20px,calc((100vw - 1050px)/2));overflow:auto;background:#eaf0f7;color:#18375c;border-radius:28px;padding:24px 40px;overscroll-behavior:contain}.game-detail>.game-back{position:sticky;top:0;z-index:3;box-shadow:0 2px 12px #17355b22}.game-detail h2{font:600 clamp(30px,4vw,48px)/1.2 'Apophis Display',serif;word-spacing:.08em}.game-detail p{font:400 18px/1.4 Geist}.game-open .screen{pointer-events:none}.game-open .mobile-gallery{visibility:hidden}@media(max-width:700px){.air-game header{inset:14px 12px auto;font-size:10px}.game-score{bottom:18px;font-size:14px}.game-overlay{padding:20px}.game-project-image{max-height:180px}.game-detail{inset:12px;padding:20px}.game-detail p{font-size:16px}.game-instructions{font-size:14px!important}} 

.game-liquid{position:absolute;inset:0;z-index:8;pointer-events:none;background:radial-gradient(ellipse at var(--wave-x,50%) var(--wave-y,50%),#ebfaff 0%,#b2cfff 8%,#bd9bea 24%,#547de5 42%,#173b9e 70%);box-shadow:inset 0 0 100px #bcdfff;will-change:clip-path,opacity}.game-liquid:after{content:'';position:absolute;inset:-25%;background:repeating-radial-gradient(ellipse at var(--wave-x,50%) var(--wave-y,50%),transparent 0 7%,#e3f4ff55 8%,transparent 10% 17%);filter:blur(9px);animation:game-water 1.4s ease-in-out infinite alternate}.air-game header{z-index:10}.game-overlay{z-index:2}.game-detail{z-index:4}@keyframes game-water{from{transform:rotate(-8deg) scale(.85)}to{transform:rotate(9deg) scale(1.2)}}@media(prefers-reduced-motion:reduce){.game-liquid:after{animation:none}}
/* Goal project reveal fills the game viewport, separate from other game dialogs. */
.air-game.showing-project>header,.air-game.showing-project>.game-score{visibility:hidden;pointer-events:none}
.air-game header [data-pause]{width:44px;height:44px;padding:0;display:grid;place-items:center;border:1px solid #fff9;background:#eaf0f7b3;color:#263c64;box-shadow:inset 0 0 0 2px #fff3;font-size:22px}
.game-overlay.game-showcase{inset:0;transform:none;width:100%;height:100%;max-height:none;box-sizing:border-box;padding:0;border:0;border-radius:0;box-shadow:none;overflow:hidden;text-align:left;background:#182b66;isolation:isolate}
.showcase-backdrop{position:absolute;inset:-6%;width:112%;height:112%;object-fit:cover;filter:blur(24px);opacity:.5;z-index:-2}
.game-showcase:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#18285850,transparent 40%,#111e58e8);z-index:-1}
.showcase-top{position:absolute;inset:clamp(20px,4vw,48px) clamp(20px,4vw,56px) auto;display:flex;justify-content:space-between;align-items:start;font-size:12px;letter-spacing:.06em;z-index:1}
.showcase-progress{width:clamp(100px,16vw,220px);height:2px;background:#ffffff45;margin-top:12px}.showcase-progress i{display:block;height:100%;background:white;transition:width .25s}
.game-showcase .game-project-image{position:absolute;inset:12% 10% auto;width:80%;height:65%;max-height:none;margin:0;border-radius:6px;object-fit:contain;filter:drop-shadow(0 20px 36px #121d4a55)}
.showcase-bottom{position:absolute;inset:auto clamp(24px,4vw,56px) clamp(24px,4vh,48px);display:flex;justify-content:space-between;align-items:end;gap:32px}
.showcase-caption{max-width:65%}.game-showcase .showcase-result{font-size:12px;letter-spacing:.07em;margin:0 0 12px}.game-showcase h2{font:400 clamp(27px,3.4vw,52px)/1.08 'Apophis Display',serif;margin:0;text-wrap:balance}
.showcase-actions{display:flex;flex-direction:column;gap:10px;flex-shrink:0;width:clamp(170px,20vw,240px)}
.game-showcase .showcase-actions button{margin:0;border-radius:10px;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:48px;border:1px solid #ffffff80}.game-showcase [data-continue]{color:#fff;background:#ffffff20;backdrop-filter:blur(12px)}
.game-showcase .showcase-arrow{position:absolute;top:46%;transform:translateY(-50%);width:44px;height:44px;padding:0;margin:0;display:grid;place-items:center;border:1px solid #ffffffaa;border-radius:50%;font-size:23px;background:#eef4ffdf;color:#354771}.showcase-prev{left:24px}.showcase-next{right:24px}
@media(max-width:700px){.showcase-top{inset:22px 20px auto;font-size:10px}.game-showcase .game-project-image{inset:12% 9% auto;width:82%;height:49%}.showcase-bottom{inset:auto 22px max(24px,env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:stretch;gap:18px}.showcase-caption{max-width:none}.game-showcase h2{font-size:clamp(26px,6.5vw,36px)}.showcase-actions{width:100%;gap:8px}.game-showcase .showcase-actions button{min-height:46px;padding:12px 18px}.game-showcase .showcase-arrow{width:36px;height:36px;top:37%}.showcase-prev{left:10px}.showcase-next{right:10px}.game-showcase .showcase-result{font-size:10px;margin-bottom:8px}}
@media(max-height:480px) and (min-width:701px){.game-showcase .game-project-image{height:59%;top:10%}.showcase-bottom{bottom:16px}.game-showcase h2{font-size:28px}.showcase-top{top:16px}}
@media(max-height:580px) and (max-width:700px){.game-showcase .game-project-image{height:38%;top:13%}.showcase-bottom{bottom:16px;gap:10px}.game-showcase h2{font-size:24px}.showcase-actions{flex-direction:row}.game-showcase .showcase-actions button{flex:1;font-size:12px;padding:10px;gap:8px}}
.game-detail{scrollbar-width:none;-ms-overflow-style:none;overflow-y:auto}.game-detail::-webkit-scrollbar{display:none;width:0;height:0}
.air-game header [data-pause]{background:none;border:0;box-shadow:none;width:48px;height:48px}.air-game header [data-pause] img{width:100%;height:100%;display:block}.game-action-icon{width:28px;height:28px;vertical-align:middle;margin-left:12px}
.air-game.showing-game-page>header,.air-game.showing-game-page>.game-score{visibility:hidden;pointer-events:none}
.game-overlay.game-page{inset:0;transform:none;width:100%;height:100%;max-height:none;box-sizing:border-box;border:0;border-radius:0;box-shadow:none;padding:32px;display:grid;place-items:center;overflow-y:auto;scrollbar-width:none;background:radial-gradient(ellipse at 75% 20%,#ac5dd733,transparent 55%),linear-gradient(135deg,#19368745,#10255a22)}
.game-page::-webkit-scrollbar{display:none}.game-page-content{width:min(100%,520px);text-align:center;padding:30px 0}.game-page h1{font:400 clamp(64px,10vw,120px)/.88 'Apophis Display',serif;font-style:italic;margin:0 0 24px;text-shadow:0 4px 28px #12235655}.game-page p{margin:16px 0;font-size:18px}.game-page .game-page-actions{display:flex;flex-direction:column;width:min(260px,100%);margin:24px auto;gap:12px}.game-page-actions button{display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:56px;margin:0;padding:12px 18px;border-radius:10px;border:1px solid #fff8;box-shadow:0 8px 24px #111b5322}.game-page-actions img{width:30px;height:30px}.game-page-actions [data-again]{background:#ffffff20;backdrop-filter:blur(12px);color:white}.game-page .game-page-exit{position:absolute;top:20px;left:24px;background:#12235455;border:1px solid #ffffff66;color:white;margin:0}.game-page .game-controls-desktop,.game-page .game-controls-mobile{font-size:14px;margin:18px 0 6px}.game-page .game-rule{font-size:12px;opacity:.8;margin:6px 0}.game-controls-mobile{display:none}.result-scores{position:absolute;inset:36px 6% auto;display:flex;justify-content:space-between;text-align:left}.result-scores>div:last-child{text-align:right}.result-scores span{display:block;font-size:12px;letter-spacing:.08em}.result-scores strong{display:block;font:400 clamp(40px,6vw,72px)/1.2 'Apophis Display',serif}.game-result .game-page-content{padding-top:64px}
@media(max-width:700px){.game-overlay.game-page{padding:24px}.game-page h1{font-size:clamp(64px,16vw,100px)}.game-controls-desktop{display:none}.game-controls-mobile{display:block}.result-scores{inset:28px 24px auto}.game-page .game-page-exit{top:16px;left:16px}.game-page p{font-size:16px}.game-result .game-page-content{padding-top:84px}}
@media(max-height:500px){.game-page h1{font-size:58px}.game-page p{margin:8px 0}.game-page .game-page-actions{margin:12px auto;gap:8px}.game-page-actions button{min-height:44px;padding:8px 14px}.game-page-content{padding:12px 0}.game-result .game-page-content{padding-top:20px}}
.game-pause-actions{display:flex;justify-content:center;align-items:stretch;gap:12px;flex-wrap:wrap;margin-top:22px}.game-overlay .game-pause-actions button{display:inline-flex;align-items:center;justify-content:center;gap:14px;box-sizing:border-box;height:54px;margin:0;padding:12px 20px}.game-pause-actions .game-action-icon{margin:0;width:28px;height:28px;flex-shrink:0}.game-showcase .showcase-actions button{border-radius:50px}
/* Court HUD: scores stay on their player's side and grow when play is paused. */
.air-game>header{inset:16px 24px auto;height:48px;pointer-events:none}.air-game>header button{pointer-events:auto}.air-game>header>span{display:none}.air-game>header [data-pause]{position:absolute;left:50%;transform:translateX(-50%);top:0}
.air-game>.game-score{inset:0;width:100%;height:100%;z-index:1;letter-spacing:0;text-align:left}.court-score{position:absolute;display:flex;flex-direction:column;gap:8px;transition:top .3s,left .3s,right .3s,font-size .3s}.court-score span{font:400 12px Geist;letter-spacing:.08em}.court-score strong{font:400 clamp(64px,9vw,150px)/.9 'Apophis Display',serif;color:#c6dcff;text-shadow:0 0 24px #88b8ff40}.court-opponent{top:16%;left:28%}.court-you{bottom:13%;right:28%;text-align:right}.court-total{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;font:400 11px Geist;letter-spacing:.08em;white-space:nowrap}.court-total b{font-size:18px;font-weight:500}.court-total>span{border-left:1px solid #ffffff55;padding-left:12px;opacity:.75}
.air-game.game-is-paused>header,.air-game.game-is-paused>.game-score{visibility:visible}.air-game.game-is-paused>header{z-index:10}.air-game.game-is-paused>.game-score{z-index:3;pointer-events:none}.game-overlay.game-paused{background:#111b4266;backdrop-filter:blur(7px) saturate(.5)}.game-paused .game-page-content{width:min(420px,56%);padding:0}.game-paused h1{font-size:clamp(50px,7vw,96px);margin:20px 0 30px}.pause-eyebrow{font-size:11px;letter-spacing:.15em;opacity:.75}.game-is-paused .court-opponent{top:44%;left:8%;bottom:auto}.game-is-paused .court-you{top:44%;right:8%;bottom:auto}.game-is-paused .court-score strong{font-size:clamp(80px,14vw,210px);color:#ffffffb8}.game-paused .game-pause-actions{flex-direction:column;align-items:center;gap:12px}.game-paused .game-pause-actions button{width:min(100%,240px);height:54px}.game-paused .game-pause-actions [data-exit]{background:#ffffff1a;border:1px solid #ffffff88;color:white}.game-paused .pause-rematch{background:none;color:white;border-radius:0;border-bottom:1px solid #ffffff99;padding:6px 0;margin-top:20px}
@media(max-width:700px){.air-game>header{inset:12px 16px auto}.air-game>header>[data-exit]{padding:10px;font-size:12px}.court-opponent{top:19%;left:12%}.court-you{bottom:19%;right:12%}.court-score strong{font-size:clamp(58px,16vw,100px)}.court-total{bottom:16px;font-size:9px;gap:7px}.court-total>span{padding-left:7px}.game-is-paused .court-opponent{top:16%;left:10%}.game-is-paused .court-you{top:16%;right:10%}.game-is-paused .court-score strong{font-size:64px}.game-paused .game-page-content{width:100%;padding-top:100px}.game-paused h1{font-size:64px}}
@media(max-height:480px){.game-paused h1{font-size:48px;margin:8px 0 14px}.game-paused .game-pause-actions{margin-top:10px;gap:8px}.game-paused .game-pause-actions button{height:44px}.game-paused .pause-rematch{margin-top:10px}.game-is-paused .court-score strong{font-size:80px}}
/* Keep rounded corners on the visible image, including when the preview is letterboxed. */
.game-showcase .game-project-image{width:min(80%,calc(65svh * 1.7));height:auto;max-height:65%;aspect-ratio:1.7;object-fit:cover;border-radius:24px;left:50%;right:auto;transform:translateX(-50%)}
@media(max-width:700px){.game-showcase .game-project-image{width:min(82%,calc(49svh * 1.7));height:auto;max-height:49%;border-radius:20px;left:50%;right:auto}}
@media(max-height:580px) and (max-width:700px){.game-showcase .game-project-image{width:min(82%,calc(38svh * 1.7));max-height:38%}}
/* Mobile project preview sits centrally between the counter and project actions. */
@media(max-width:700px){
 .game-overlay.game-showcase{display:grid;grid-template-columns:1fr;grid-template-rows:48px minmax(0,1fr) auto;padding:22px 0 max(24px,env(safe-area-inset-bottom));gap:18px}
 .game-showcase .showcase-top{position:static;grid-area:1/1;align-self:start;margin:0 20px}
 .game-showcase .game-project-image{position:static;grid-area:2/1;align-self:center;justify-self:center;transform:none;width:min(82%,calc((100svh - 360px)*1.7));height:auto;max-height:100%;margin:0;min-width:0;min-height:0}
 .game-showcase .showcase-arrow{position:static;grid-area:2/1;align-self:center;transform:none;z-index:1}
 .game-showcase .showcase-prev{justify-self:start;margin-left:10px}.game-showcase .showcase-next{justify-self:end;margin-right:10px}
 .game-showcase .showcase-bottom{position:static;grid-area:3/1;margin:0 22px;min-width:0}
}
@media(max-width:700px) and (max-height:580px){.game-overlay.game-showcase{gap:10px;padding-top:16px;padding-bottom:16px;grid-template-rows:38px minmax(0,1fr) auto}.game-showcase .game-project-image{width:min(82%,calc((100svh - 265px)*1.7))}}
@media(max-width:700px){.air-game>header [data-pause]{left:auto;right:0;top:0;transform:none}}
.game-ready .game-page-actions [data-start]{border-radius:50px}

/* The goal reveal uses the same blue stage as the court and a three-card carousel. */
.game-overlay.game-showcase{
 display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;
 gap:clamp(8px,2vh,22px);padding:clamp(16px,4vh,44px) 0 max(clamp(16px,5vh,56px),env(safe-area-inset-bottom));
 background:linear-gradient(180deg,#183d8233,#21468b10 45%,#173b8066),url('assets/background_porto.png') center/cover #245090;
}
.game-showcase .showcase-top{position:static;grid-area:1/1;margin:0 clamp(20px,4vw,60px);align-items:center}
.showcase-count{font:400 clamp(16px,2vw,28px)/1 'Apophis Display',serif;letter-spacing:0}
.showcase-count strong{font:inherit;font-size:1.5em}.showcase-category{font-size:clamp(12px,1.3vw,18px);letter-spacing:0}
.game-showcase .showcase-progress{margin-top:8px;width:100%}
.showcase-carousel{grid-area:2/1;position:relative;min-height:0;display:grid;place-items:center;perspective:1000px;--card-width:min(55vw,calc(56svh * 1.7));--card-gap:clamp(12px,2.4vw,48px)}
.game-showcase .showcase-carousel .game-project-image{position:static;inset:auto;width:var(--card-width);height:auto;max-height:100%;margin:0;aspect-ratio:1.7;object-fit:contain;transform:none;filter:none;border-radius:3% / 5%;box-shadow:0 10px 36px #0d2d7059}
.game-showcase .showcase-carousel .showcase-neighbor{position:absolute;inset:auto;width:var(--card-width);aspect-ratio:1.7;max-height:85%;margin:0;padding:0;border:0;border-radius:4% / 7%;background:#102756;overflow:hidden;opacity:.84;transition:opacity .2s}
.game-showcase .showcase-neighbor:hover,.game-showcase .showcase-neighbor:focus-visible{opacity:1}
.showcase-neighbor img{display:block;width:100%;height:100%;object-fit:cover}
.game-showcase .showcase-carousel .showcase-prev{right:calc(50% + var(--card-width)/2 + var(--card-gap));transform-origin:right;transform:rotateY(22deg) scale(.86)}
.game-showcase .showcase-carousel .showcase-next{left:calc(50% + var(--card-width)/2 + var(--card-gap));transform-origin:left;transform:rotateY(-22deg) scale(.86)}
.showcase-neighbor span{position:absolute;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#fff;color:#18375c}
.showcase-prev span{right:10px}.showcase-next span{left:10px}
.showcase-outgoing{position:absolute;pointer-events:none;object-fit:cover;border-radius:4% / 7%}
.game-showcase .showcase-bottom{position:static;grid-area:3/1;display:flex;flex-direction:column;align-items:center;text-align:center;margin:0 16px;gap:clamp(10px,2vh,22px)}
.game-showcase .showcase-caption{max-width:min(90vw,1050px)}.game-showcase .showcase-result{margin:0 0 5px;color:#eef4ff}
.game-showcase .showcase-caption h2{font-size:clamp(24px,4.2vw,58px);line-height:1.05}
.game-showcase .showcase-actions{width:auto;flex-direction:row;justify-content:center;gap:clamp(6px,1vw,12px)}
.game-showcase .showcase-actions button{border-radius:50px;white-space:nowrap;gap:8px;padding:8px clamp(10px,1.1vw,18px);min-height:44px;font-size:clamp(12px,1.4vw,16px)}
.game-showcase .showcase-actions button span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#22252d;color:#fff;font-size:14px}
.game-showcase .showcase-actions [data-continue] span{background:white;color:#3b5689;font-size:11px}
@media(max-width:700px){
 .game-overlay.game-showcase{grid-template-rows:auto minmax(0,1fr) auto;gap:clamp(10px,2vh,18px);padding-bottom:max(clamp(24px,10vh,100px),env(safe-area-inset-bottom))}
 .showcase-carousel{--card-width:min(72vw,calc(42svh * 1.35));--card-gap:10px}
 .game-showcase .showcase-carousel .game-project-image{aspect-ratio:1.35;object-fit:cover;border-radius:16px}
 .game-showcase .showcase-carousel .showcase-neighbor{aspect-ratio:1.35}
 .showcase-neighbor span{width:24px;height:24px;font-size:13px}.showcase-prev span{right:4px}.showcase-next span{left:4px}
 .game-showcase .showcase-caption h2{font-size:clamp(25px,7vw,38px)}
}
@media(max-height:450px){.game-overlay.game-showcase{gap:6px;padding-top:10px;padding-bottom:10px}.game-showcase .showcase-bottom{gap:6px}.game-showcase .showcase-caption h2{font-size:22px}.game-showcase .showcase-actions button{min-height:36px;padding-block:4px}}
