/* Card 657: the game portal at "/" (SPEC.md §3). Layout per breakpoint:
   phone ≤640px six stacked row cards (scrolls on short phones); tablet
   portrait 2×2; landscape/desktop 3×2 (card 668: six games). */
.wrap{position:relative;z-index:1;max-width:1280px;margin:0 auto;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;gap:var(--gap);padding:calc(var(--pad) + env(safe-area-inset-top)) calc(var(--pad) + env(safe-area-inset-right)) calc(var(--pad) + env(safe-area-inset-bottom)) calc(var(--pad) + env(safe-area-inset-left))}
header{display:flex;align-items:center;justify-content:space-between;gap:12px}
header .logo{font-size:54px}
.hdr-r{display:flex;gap:12px;align-items:center}
.hello{align-self:flex-start;margin-bottom:12px}
.main{flex:1;min-height:0;display:flex;flex-direction:column;gap:inherit}
.hello-row{margin-bottom:12px}
.hello h1{font-size:52px}.hello p{font-weight:800;margin-top:2px}
.grid{flex:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;align-items:stretch}
.card{position:relative;display:flex;flex-direction:column;overflow:hidden;min-width:0}
.card .art{position:relative;flex:1;min-height:180px;border-bottom:var(--stroke) solid var(--ink);display:grid;place-items:center;overflow:hidden}
.card .art:before{content:'';position:absolute;inset:-50%;background:repeating-conic-gradient(from 0deg,rgba(255,255,255,.28) 0 9deg,transparent 9deg 22deg)}
.card .art svg.a,.card .art img.a{position:relative;width:78%;max-height:88%;height:auto;overflow:visible}
.dice .art{background:var(--red)} .rps .art{background:var(--blue)} .yatzy .art{background:var(--purple)} .memory .art{background:var(--pink)} .minesweeper .art{background:var(--blue)} .snake .art{background:var(--mint)}
.btn.pink{background:var(--pink)}
.card .no{position:absolute;left:14px;top:12px;z-index:1;font:400 22px var(--font-display);background:var(--bg);border:3px solid var(--ink);border-radius:10px;padding:0 9px;box-shadow:var(--pop-sm);transform:rotate(-6deg)}
.card .body{padding:16px 20px 20px;display:flex;flex-direction:column;gap:8px}
.card .tag{align-self:flex-start}
.card h2{font:400 40px/1 var(--font-display);letter-spacing:.03em}
.card p{font-weight:800;font-size:16px;line-height:1.3}
.cta{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:6px}
.cta .btn{flex:1;min-width:150px}
.foot{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:0 14px;text-align:center;font-weight:800;font-size:13px}
.foot-tag{opacity:.7}
.foot-about{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;padding:0 8px;font-size:15px;color:var(--ink);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
/* tablet portrait */
@media (min-width:641px) and (max-width:1024px) and (orientation:portrait){
  .grid{grid-template-columns:1fr 1fr;grid-template-rows:repeat(3,minmax(0,1fr))}
  .card .art{min-height:150px}
}
@media (min-width:641px) and (max-width:1024px) and (orientation:portrait) and (max-height:1100px){.card .art{min-height:120px}}
@media (min-width:641px) and (max-height:820px){.card .art{min-height:130px}.hello h1{font-size:44px}header .logo{font-size:46px}.wrap{gap:18px}.card h2{font-size:38px}}
/* phone */
@media (max-width:640px){
  .wrap{gap:12px}
  header .logo{font-size:32px}
  .hello{margin-bottom:10px}.hello h1{font-size:30px}.hello p{font-size:14px}
  .bubble:after{left:26px;bottom:-16px;width:20px;height:16px}
  .grid{grid-template-columns:1fr;grid-template-rows:repeat(6,minmax(128px,1fr));gap:12px}
  .card{flex-direction:row}
  .card .tag{display:none}
  .card .art{flex:0 0 41%;min-height:0;border-bottom:0;border-right:var(--stroke) solid var(--ink)}
  .card .art svg.a,.card .art img.a{width:98%;max-height:96%}
  .card .no{font-size:16px;left:8px;top:8px;padding:0 6px;border-width:2px}
  .card .body{flex:1;min-width:0;padding:10px 12px 12px;gap:4px;justify-content:center}
  .card h2{font-size:30px}.card p{font-size:13.5px;line-height:1.25}
  .tag{font-size:11px;padding:1px 6px}
  .cta{gap:8px;margin-top:4px;flex-wrap:nowrap}
  /* No 1px black text stroke at this size: axe measured the outline, not the
     white fill, and failed AA (Ebba re-check). */
  .cta .btn{min-width:0;min-height:48px;font-size:19px;padding:0 12px;-webkit-text-stroke:0}
  .foot-tag{display:none}
}
@media (max-width:640px) and (max-height:760px){
  .card .body{padding:8px 10px 10px}.card h2{font-size:26px}.card p{font-size:12.5px}
  .card[data-desc-long] p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .hello h1{font-size:27px}
}
/* generated art (Higgsfield) — falls back to dots/burst + SVG if an image fails (portal.js removes a broken <img>) */
.bgart{position:fixed;inset:0;z-index:0;pointer-events:none;background:url('/assets/arcade/bg-land.webp?v=1.12.2') center/cover no-repeat}
@media (orientation:portrait){.bgart{background-image:url('/assets/arcade/bg-phone.webp?v=1.12.2')}}
.card .art .gart~svg.a{display:none}
.bgart:after{content:'';position:absolute;inset:0;background:radial-gradient(ellipse 420px 220px at 0 0,rgba(255,210,63,.92) 30%,rgba(255,210,63,0) 100%)}
.card .art .gart{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0;display:block}
.game:hover .art .gart,.game:focus-within .art .gart{animation:pulse .6s var(--ease-pop)}
@keyframes pulse{40%{transform:scale(1.06)}}
.hello-row{display:flex;align-items:center;gap:18px}
.hello-row .hello{margin-bottom:0}
.spela{position:relative;flex:0 0 auto;width:128px;height:128px;transform:rotate(8deg);display:grid;place-items:center}
.spela .gst{width:100%;height:100%;display:block}
.spela .svst{position:absolute;inset:6px;width:calc(100% - 12px);height:calc(100% - 12px);overflow:visible;filter:drop-shadow(4px 4px 0 #141414)}
html:not([lang=en]) .spela .gst+.svst{display:none}
html[lang=en] .spela .gst{display:none}
@media (min-width:641px) and (max-height:820px){.spela{width:104px;height:104px}}
@media (max-width:900px){html[lang=en] .spela{display:none}}
@media (max-width:640px){.rps .art .gart{object-fit:contain;transform:scale(1.25)}.game.rps:hover .art .gart{animation:none}.spela{display:none}.hello-row{display:block}}
/* motion */
.card{animation:dealIn .5s var(--ease-pop) both}.card:nth-child(2){animation-delay:.08s}.card:nth-child(3){animation-delay:.16s}.card:nth-child(4){animation-delay:.24s}
@keyframes dealIn{from{opacity:0;transform:translateY(24px) rotate(-2deg) scale(.96)}}
.game:hover .art svg.a,.game:focus-within .art svg.a,.game:hover .art img.a,.game:focus-within .art img.a{animation:wob .6s var(--ease-pop)}
@keyframes wob{30%{transform:rotate(-4deg) scale(1.05)}60%{transform:rotate(3deg)}}
.card .art svg.a.pop-shadow,.card .art img.a.pop-shadow{filter:drop-shadow(5px 5px 0 #141414)}
