/* Pixaplay portal: direction A (the approved design). Dark, the games' art carries the colour; Inter Tight for titles,
   Inter for the rest; no cards inside cards: tiles sit on the page, spacing and type do the grouping. Phone first. */
:root {
  --bg: #0a0a0d; --ink: #f5f5f7; --quiet: #a8a8b3; --dim: #8a8a96; --line: #22222a; --field: #15151b;
  --accent: #ffd23f; --pixel: #ff6f98; --ok: #3ddc84; --err: #ff6b7a;
  --gut: clamp(16px, 4vw, 56px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 Inter, system-ui, -apple-system, sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img.px { image-rendering: pixelated; }
h1, h2, .display { font-family: 'Inter Tight', Inter, sans-serif; letter-spacing: -0.02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header */
.top { position: absolute; z-index: 5; inset: 0 0 auto; display: flex; align-items: center; gap: 32px; padding: 18px var(--gut); }
.top.solid { position: sticky; background: rgba(10, 10, 13, 0.94); border-bottom: 1px solid var(--line); }
/* The logo (brand/out, made by brand/make-brand.mjs): pixel art, so always whole-number sizes and never smoothed.
   The cube and word at 2x; 3x on wide screens; the cube alone where there's no room. */
.logo { display: flex; align-items: center; flex: 0 0 auto; }
.logo img { image-rendering: pixelated; display: block; }
.logo .cube { display: none; }
@media (min-width: 1024px) { .logo .full { width: 201px; height: 48px; } }
@media (max-width: 359px) { .logo .full { display: none; } .logo .cube { display: block; } }
.nav { display: flex; gap: 24px; font-size: 15px; font-weight: 500; color: var(--quiet); }
.nav a:hover, .nav a.on { color: var(--ink); }
.me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pill { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.12); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; border: 0; cursor: pointer; }
.pill.gold { background: var(--accent); color: var(--bg); font-weight: 700; font-size: 14px; }
.pill.member { background: rgba(255, 210, 63, 0.14); color: var(--accent); font-size: 13px; letter-spacing: 0.06em; }
/* the bell: notifications (a dot with the count of new ones) and its list */
.bell { position: relative; width: 36px; height: 36px; border-radius: 18px; border: 0; background: rgba(255, 255, 255, 0.12); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.bell svg { image-rendering: pixelated; }
.bell b { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ef3d74; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
#notes { position: fixed; z-index: 30; top: 66px; right: var(--gut); width: min(360px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow: auto; background: #17171c; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6); }
#notes h3 { margin: 2px 4px 10px; font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; }
#notes .tofriends { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
#notes .note { display: grid; gap: 2px; padding: 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
#notes a.note:hover { background: rgba(255, 255, 255, 0.06); }
#notes .note.new { background: rgba(239, 61, 116, 0.12); }
#notes .note span { color: #c9c9d2; font-size: 14px; }
#notes .note small { color: var(--dim); font-size: 12px; }
#notes .quiet { color: var(--dim); margin: 4px; font-size: 14px; }
/* FRIENDS */
.addf { display: flex; gap: 10px; }
.addf input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: #17171c; color: var(--ink); font: inherit; }
.fr { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
details.fr { display: block; }
details.fr summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
details.fr summary::-webkit-details-marker { display: none; }
details.fr .row { padding: 10px 0 4px 48px; }
.fr b { font-weight: 600; }
.fr .muted { font-size: 13px; }
.fr .grow { flex: 1; }
.count { color: var(--dim); font-weight: 600; font-size: 16px; margin-left: 4px; }
details.blocked summary { cursor: pointer; list-style: none; }
details.blocked summary::-webkit-details-marker { display: none; }
.avatar.small { width: 36px; height: 36px; flex: 0 0 36px; }
.avatar { width: 36px; height: 36px; border-radius: 18px; background: #4b3f78; display: grid; place-items: center; font-weight: 700; font-size: 14px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, 0.14); font-weight: 600; font-size: 16px; cursor: pointer; }
.btn.go { background: var(--accent); color: var(--bg); font-weight: 700; }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.link { background: none; border: 0; padding: 8px 0; color: var(--quiet); text-decoration: underline; cursor: pointer; min-height: 44px; }

/* the banner */
.hero { position: relative; height: clamp(520px, 50vw, 760px); overflow: hidden; }
.hero picture img, .hero video, .hero .typo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero video { opacity: 0; transition: opacity 0.6s; }
.hero video.on { opacity: 1; }
/* a game picked from a row: the banner fades out and back in with it */
.hero > * { transition: opacity 0.18s; }
.hero.swap > * { opacity: 0; }
.hero .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 10, 13, 0.92) 0%, rgba(10, 10, 13, 0.5) 34%, rgba(10, 10, 13, 0) 62%), linear-gradient(180deg, rgba(10, 10, 13, 0.8) 0%, rgba(10, 10, 13, 0) 18%, rgba(10, 10, 13, 0) 60%, var(--bg) 100%); }
.hero .say { position: absolute; left: var(--gut); right: var(--gut); bottom: clamp(36px, 6vw, 96px); display: flex; flex-direction: column; gap: 16px; max-width: 500px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.16em; color: var(--accent); }
.eyebrow::before { content: ''; width: 20px; height: 2px; background: currentColor; }
.hero h1 { margin: 0; font-weight: 900; font-size: clamp(40px, 5vw, 68px); line-height: 0.95; letter-spacing: -0.035em; }
.genres { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: #c9c9d2; }
.genres span + span::before { content: ''; display: inline-block; width: 3px; height: 3px; border-radius: 2px; background: #6e6e7a; margin-right: 10px; vertical-align: middle; }
.hero p { margin: 0; font-size: 18px; color: #e4e4ea; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.mute { position: absolute; right: var(--gut); bottom: clamp(36px, 6vw, 96px); width: 44px; height: 44px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(10, 10, 13, 0.35); display: none; place-items: center; cursor: pointer; }
.mute.on { display: grid; }

/* rows of tiles */
main { display: flex; flex-direction: column; gap: 44px; padding: 8px 0 72px; position: relative; }
.shelf h2 { margin: 0 0 12px; padding: 0 var(--gut); font-weight: 800; font-size: 21px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tag { height: 28px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; border-radius: 14px; background: rgba(255, 210, 63, 0.12); color: var(--accent); font-family: Inter, sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.tiles { display: flex; gap: 14px; overflow-x: auto; padding: 10px var(--gut) 14px; scroll-padding-inline: var(--gut); scrollbar-width: none; scroll-snap-type: x proximity; }
.tiles::-webkit-scrollbar { display: none; }
.tile { flex: 0 0 auto; width: clamp(240px, 26vw, 380px); display: flex; flex-direction: column; gap: 10px; scroll-snap-align: start; }
.tile .art { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #17171c; transition: transform 0.25s, box-shadow 0.25s; }
.tile .art img, .tile .art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile:hover .art, .tile:focus-visible .art { transform: scale(1.04); box-shadow: 0 0 0 2px var(--ink), 0 18px 40px rgba(0, 0, 0, 0.6); }
.tile:focus-visible { outline: none; }
.tile.picked .art { box-shadow: 0 0 0 3px var(--accent); }
.tile.picked .name { color: var(--accent); }
.tile .name { font-weight: 600; font-size: 15px; display: flex; gap: 10px; align-items: baseline; }
.tile .name small { color: var(--dim); font-size: 13px; font-weight: 500; }
.badge { position: absolute; top: 10px; left: 10px; padding: 3px 8px; border-radius: 4px; background: rgba(10, 10, 13, 0.7); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.badge.b-beta { color: var(--pixel); }
.badge.b-pass { color: var(--accent); }
.typo { display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-family: 'Inter Tight', sans-serif; font-weight: 900; font-size: clamp(22px, 2.6vw, 34px); line-height: 0.95; letter-spacing: -0.02em; text-transform: uppercase; }
.soon .art { display: grid; place-items: center; font-family: 'Inter Tight', sans-serif; font-weight: 900; font-size: 30px; color: #2e2e38; }
/* Notify me: on the coming game's tile (lit once the player asked) */
.soon .notify { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 16px; background: rgba(255, 255, 255, 0.12); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.soon .notify:hover { background: rgba(255, 255, 255, 0.2); }
.soon .notify.on { background: var(--accent); color: var(--bg); }
.soon .name { color: var(--quiet); font-weight: 500; }

/* the Pass */
.pass { margin: 16px var(--gut) 0; padding-top: 44px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 24px 64px; }
.pass h2 { margin: 0 0 16px; font-weight: 900; font-size: clamp(30px, 3.4vw, 44px); line-height: 1; letter-spacing: -0.03em; }
.pass h2 em { font-style: normal; color: var(--accent); }
.perks { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 15px; font-weight: 500; color: #c9c9d2; }
.perks span { display: flex; align-items: center; gap: 8px; }
.perks span::before { content: ''; width: 12px; height: 7px; border: solid var(--accent); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translateY(-2px); }

footer { padding: 24px var(--gut) 44px; display: flex; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--dim); }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 10px; background: #26262f; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }

/* the account page */
.page { max-width: 640px; margin: 0 auto; padding: 32px var(--gut) 72px; display: flex; flex-direction: column; gap: 36px; }
.page h1 { margin: 0; font-weight: 900; font-size: 34px; }
.sect { display: flex; flex-direction: column; gap: 12px; padding-top: 28px; border-top: 1px solid var(--line); }
.sect h2 { margin: 0; font-weight: 800; font-size: 20px; }
.kv { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.kv span:first-child { color: var(--quiet); }
.big { display: flex; align-items: center; gap: 12px; font-family: 'Inter Tight', sans-serif; font-weight: 900; font-size: 36px; font-variant-numeric: tabular-nums; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.packs button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); cursor: pointer; text-align: left; }
.packs button b { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.packs button span { color: var(--quiet); font-size: 14px; }
.hist { display: flex; flex-direction: column; font-size: 14px; }
.hist div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hist .plus { color: var(--ok); font-weight: 700; }
.hist .minus { font-weight: 700; }
form.f { display: flex; flex-direction: column; gap: 8px; }
form.f label { font-size: 14px; color: var(--quiet); }
form.f input { height: 48px; padding: 0 14px; border-radius: 8px; border: 1px solid #2a2a33; background: var(--field); color: var(--ink); font: inherit; }
form.f input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.msg { min-height: 1.4em; font-size: 14px; color: var(--err); }
.msg.ok { color: var(--ok); }
.muted { color: var(--quiet); font-size: 14px; }
.center { min-height: 60vh; display: grid; place-items: center; text-align: center; }

@media (max-width: 860px) {
  .nav { display: none; }
  .hide-sm { display: none; }
  .tile { width: 72vw; }
}
@media (max-width: 599px) {
  .hero { height: auto; aspect-ratio: 4 / 5; margin: 64px 16px 0; border-radius: 12px; }
  .hero .shade { background: linear-gradient(180deg, rgba(10, 10, 13, 0) 40%, rgba(10, 10, 13, 0.95) 100%); }
  .hero .say { left: 18px; right: 18px; bottom: 18px; align-items: center; text-align: center; }
  .hero h1 { font-size: 38px; }
  .hero p { display: none; }
  .hero .row { width: 100%; }
  .hero .row .btn.go { flex: 1; }
  .top { background: rgba(10, 10, 13, 0.94); position: fixed; }
  .tiles.tall .tile, #soonRow .tile { width: 150px; }
  #soonRow .tile .art { aspect-ratio: 2 / 3; }
  .tile .name { flex-direction: column; gap: 2px; }
  .mute { bottom: auto; top: 12px; right: 12px; }
  .tiles.tall .tile .art { aspect-ratio: 2 / 3; }
}
@media (prefers-reduced-motion: reduce) { .tile .art { transition: none; } .hero video { display: none; } }
