/* NixcapeGames: "Nixcape at dusk". Floating carnival islands at twilight, toy-sticker objects with thick ink
   outlines and hard coloured shadows. One loud thing per screen (the hero booth, the player); the rest stays calm. */
:root {
  --plum: #2a1846; --plum-2: #351f58; --plum-3: #442b6c; --plum-4: #5a3a88;
  --ink: #140a26; --paper: #fff4e6; --muted: #cbb8e4; --faint: #9d86c2;
  --tang: #ff8a3d; --gum: #ff5fa2; --teal: #3fd7d0; --butter: #ffd84a; --danger: #ff5a5f; --ok: #6be3a0;
  --display: 'Bagel Fat One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Rethink Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-s: 10px; --r: 16px; --r-l: 26px;
  --line: 3px solid var(--ink);
  --rail: 214px; --top: 72px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 12px); }
body {
  margin: 0; min-height: 100vh; font: 500 16px/1.55 var(--body); color: var(--paper); background-color: var(--plum);
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 244, 230, .55) 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 8%, rgba(255, 244, 230, .4) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 82% 32%, rgba(255, 216, 74, .45) 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 42%, rgba(255, 244, 230, .3) 50%, transparent 51%),
    radial-gradient(120% 60% at 50% -10%, #3c2266 0%, transparent 60%);
  background-size: 340px 340px, 420px 420px, 520px 520px, 280px 280px, 100% 100%;
  background-attachment: fixed;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .4em; font-weight: 800; letter-spacing: -.01em; }
h1 { font: 400 clamp(30px, 4.4vw, 48px)/1.04 var(--display); letter-spacing: .005em; }
h2 { font-size: 22px; }
p { margin: 0 0 .9em; }
.ic { width: 22px; height: 22px; fill: currentColor; flex: none; }
.ic.flip { transform: scaleY(-1); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--butter); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 800; }
.skip:focus { left: 8px; }

/* ---------- buttons, chips, pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  border: var(--line); border-radius: 999px; background: var(--butter); color: var(--ink); font-weight: 800; font-size: 16px;
  text-decoration: none; box-shadow: 0 4px 0 var(--ink); transition: transform .08s, box-shadow .08s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn .ic { width: 20px; height: 20px; }
.btn.sm { min-height: 38px; padding: 6px 16px; font-size: 15px; box-shadow: 0 3px 0 var(--ink); }
.btn.big { min-height: 58px; padding: 12px 30px; font: 400 22px/1 var(--display); letter-spacing: .02em; }
.btn.big .ic { width: 24px; height: 24px; }
.btn.ghost { background: transparent; color: var(--paper); border-color: var(--paper); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 244, 230, .08); }
.btn.danger { background: var(--danger); }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.link { background: none; border: 0; padding: 0; color: var(--butter); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: var(--danger); }
.chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; background: var(--plum-3); color: var(--paper); font-size: 14px; font-weight: 700; text-decoration: none; border: 2px solid transparent; }
.chip:hover { border-color: var(--paper); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; border: 2px solid var(--ink); }
.pill .ic { width: 13px; height: 13px; }
.pill.new { background: var(--gum); color: var(--ink); }
.pill.pvp { background: var(--teal); color: var(--ink); }
.pill.app { background: var(--paper); color: var(--ink); }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 18px; padding: 0 20px;
  background: rgba(42, 24, 70, .92); backdrop-filter: blur(10px); border-bottom: 2px solid rgba(20, 10, 38, .6);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none; width: calc(var(--rail) - 20px); }
.brand-nix { width: 46px; height: 46px; transform: rotate(-8deg); transition: transform .25s; }
.brand:hover .brand-nix { transform: rotate(6deg) scale(1.06); }
.brand-word { display: inline-flex; align-items: baseline; gap: 3px; line-height: 1; }
.brand-word b { font: 400 25px/1 var(--display); color: var(--paper); -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); letter-spacing: .01em; }
.brand-word i { font-style: normal; font-weight: 800; font-size: 14px; color: var(--tang); letter-spacing: .02em; }
.brand-word.big b { font-size: 40px; }
.brand-word.big i { font-size: 20px; }
.search { position: relative; flex: 1; max-width: 560px; display: flex; align-items: center; }
.search > .ic { position: absolute; left: 14px; color: var(--faint); pointer-events: none; }
form.search input[type=search] {
  width: 100%; height: 46px; min-height: 46px; padding: 0 16px 0 44px; border-radius: 999px; border: 2px solid var(--plum-4); background: var(--plum-2);
  color: var(--paper); outline: none; font-weight: 600;
}
form.search input::placeholder { color: var(--faint); }
form.search input:focus { border-color: var(--teal); background: var(--plum-3); }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(.6); }
.suggest { position: absolute; top: 52px; left: 0; right: 0; background: var(--plum-2); border: var(--line); border-radius: var(--r); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; z-index: 50; }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 9px 14px; text-decoration: none; }
.suggest a:hover, .suggest a.on { background: var(--plum-3); }
.suggest img { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--ink); object-fit: cover; }
.suggest small { color: var(--muted); display: block; font-size: 13px; }
.suggest .all { justify-content: center; color: var(--butter); font-weight: 800; border-top: 2px solid var(--plum-3); }
.me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { font-weight: 800; font-size: 14px; text-decoration: none; padding: 6px 9px; border-radius: 8px; color: var(--muted); }
.lang:hover { color: var(--paper); background: var(--plum-3); }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; border-radius: 50%; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 50px; min-width: 210px; background: var(--plum-2); border: var(--line); border-radius: var(--r); box-shadow: 6px 6px 0 var(--ink); padding: 8px; z-index: 50; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; text-decoration: none; background: none; border: 0; font-weight: 700; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--plum-3); }
.menu-name { padding: 6px 12px 10px; margin: 0 0 6px; border-bottom: 2px solid var(--plum-3); font-weight: 800; color: var(--butter); }
.ava {
  --s: 40px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: hsl(var(--h) 85% 62%); color: var(--ink); border: 3px solid var(--ink); font: 400 calc(var(--s) * .46)/1 var(--display);
  box-shadow: inset 0 calc(var(--s) * -.08) 0 hsl(var(--h) 70% 45%);
}

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
.rail {
  position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 14px 10px 30px; display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: thin; scrollbar-color: var(--plum-4) transparent;
}
.rail a { display: flex; align-items: center; gap: 12px; padding: 7px 12px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 15px; color: var(--muted); }
.rail a img, .rail a .ic { width: 34px; height: 34px; flex: none; }
.rail a .ic { padding: 5px; }
.rail a:hover { background: var(--plum-2); color: var(--paper); }
.rail a:hover img { transform: rotate(-8deg) scale(1.08); }
.rail a img { transition: transform .15s; }
.rail a.on { background: var(--plum-3); color: var(--paper); box-shadow: inset 4px 0 0 var(--butter); }
.rail hr { border: 0; border-top: 2px solid var(--plum-3); margin: 10px 8px; }
main { min-width: 0; padding: 22px 28px 60px; outline: none; }
body.wide main { padding-top: 14px; }
body.bare .rail { display: none; }
body.bare .shell { grid-template-columns: 1fr; }
body.bare main { padding: 0; }

/* ---------- hero: the booth ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.25fr); align-items: center; gap: 36px;
  min-height: 520px; padding: 46px 44px; border-radius: var(--r-l); overflow: hidden; border: var(--line); margin-bottom: 34px;
  background: var(--plum-3) var(--hero) center 40% / cover no-repeat; box-shadow: 0 8px 0 var(--ink);
}
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(42, 24, 70, .78) 0%, rgba(42, 24, 70, .25) 42%, transparent 70%), linear-gradient(0deg, rgba(42, 24, 70, .6), transparent 35%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero-copy h1 { font-size: clamp(40px, 4.6vw, 66px); line-height: .98; color: var(--paper); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink); margin-bottom: 18px; }
.hero-copy p { font-size: 19px; font-weight: 600; max-width: 30ch; text-shadow: 0 2px 8px rgba(20, 10, 38, .8); }
.booth { display: grid; gap: 14px; }
.booth-slide { position: relative; background: var(--plum-2); border: var(--line); border-radius: var(--r-l); overflow: hidden; box-shadow: 10px 10px 0 var(--acc, var(--tang)); transform: rotate(1.2deg); }
.booth-slide.tang { --acc: var(--tang); } .booth-slide.gum { --acc: var(--gum); } .booth-slide.teal { --acc: var(--teal); } .booth-slide.butter { --acc: var(--butter); }
.booth-screen { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.booth-screen img, .booth-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.booth-screen video { opacity: 0; transition: opacity .4s; }
.booth-screen video.on { opacity: 1; }
.booth-info { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; border-top: var(--line); }
.booth-info h2 { font: 400 24px/1.05 var(--display); margin: 0 0 3px; letter-spacing: .01em; }
.booth-info p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.booth-icon { width: 64px; height: 64px; border-radius: 16px; border: var(--line); }
.booth-pick { display: flex; gap: 10px; justify-content: center; }
.booth-pick button { padding: 0; border: 3px solid var(--ink); border-radius: 14px; background: none; overflow: hidden; opacity: .65; transition: transform .12s, opacity .12s; box-shadow: 0 3px 0 var(--ink); }
.booth-pick button img { width: 52px; height: 52px; }
.booth-pick button:hover { opacity: 1; }
.booth-pick button[aria-selected="true"] { opacity: 1; transform: translateY(-4px); border-color: var(--butter); }

/* ---------- shelves + cards ---------- */
.shelf { margin: 0 0 34px; }
.shelf-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 12px; }
.shelf-head h2 { font: 400 27px/1.05 var(--display); margin: 0; letter-spacing: .01em; }
.shelf-head p { margin: 0; color: var(--muted); font-size: 15px; flex-basis: 100%; order: 3; }
.shelf-head .more { margin-left: auto; font-weight: 800; color: var(--butter); text-decoration: none; font-size: 15px; }
.shelf-head .more:hover { text-decoration: underline; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 23%, 300px); gap: 18px; overflow-x: auto; padding: 4px 12px 16px 2px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--plum-4) transparent; }
.row > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 18px; padding: 2px 10px 10px 2px; }
.card {
  --acc: var(--tang); display: flex; flex-direction: column; text-decoration: none; border: var(--line); border-radius: var(--r); background: var(--plum-2);
  overflow: hidden; box-shadow: 5px 5px 0 var(--acc); transition: transform .12s ease, box-shadow .12s ease;
}
.card.gum { --acc: var(--gum); } .card.teal { --acc: var(--teal); } .card.butter { --acc: var(--butter); }
.card:hover, .card:focus-visible { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--acc); }
.card-art { position: relative; aspect-ratio: 16 / 9; background: var(--ink); overflow: hidden; }
.card-art img, .card-art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-art video { opacity: 0; transition: opacity .25s; }
.card-art video.on { opacity: 1; }
.card-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px 10px; border-top: var(--line); min-height: 46px; }
.card-title { font-weight: 800; font-size: 15.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* originals: tall posters with store links */
.originals { margin: 6px 0 40px; }
.orig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 22px; }
.orig { --acc: var(--tang); display: flex; flex-direction: column; border: var(--line); border-radius: var(--r-l); overflow: hidden; background: var(--plum-2); box-shadow: 6px 6px 0 var(--acc); }
.orig.gum { --acc: var(--gum); } .orig.teal { --acc: var(--teal); } .orig.butter { --acc: var(--butter); }
.orig-art { display: block; aspect-ratio: 2 / 3; overflow: hidden; border-bottom: var(--line); background: var(--ink); }
.orig-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.orig:hover .orig-art img { transform: scale(1.04); }
.orig-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.orig-body h3 { font: 400 21px/1.05 var(--display); margin-bottom: 6px; letter-spacing: .01em; }
.orig-body h3 a { text-decoration: none; }
.orig-body p { color: var(--muted); font-size: 14.5px; line-height: 1.4; flex: 1; }
.orig-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* categories: coloured sticker tiles; the icon pokes out of the top edge */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 34px 18px; padding-top: 26px; }
.cat {
  --c: var(--butter); position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 138px; padding: 56px 16px 14px;
  border: var(--line); border-radius: var(--r-l); text-decoration: none; color: var(--ink); overflow: visible;
  background: radial-gradient(120% 90% at 85% 0%, rgba(255, 255, 255, .45), transparent 55%), var(--c);
  box-shadow: inset 0 -6px 0 rgba(20, 10, 38, .18), 5px 5px 0 var(--ink); transition: transform .12s ease, box-shadow .12s ease;
}
.cat img { position: absolute; left: 12px; top: -30px; width: 84px; height: 84px; transform: rotate(-8deg); filter: drop-shadow(0 4px 0 rgba(20, 10, 38, .45)); transition: transform .22s cubic-bezier(.25, 1, .5, 1); }
.cat-name { font: 400 21px/1.05 var(--display); letter-spacing: .01em; }
.cat small { align-self: flex-start; margin-top: 7px; padding: 2px 9px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 12.5px; }
.cat:hover, .cat:focus-visible { transform: translate(-3px, -3px); box-shadow: inset 0 -6px 0 rgba(20, 10, 38, .18), 8px 8px 0 var(--ink); }
.cat:hover img, .cat:focus-visible img { transform: rotate(6deg) scale(1.12) translateY(-4px); }
.cats.big { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 40px 22px; }
.cats.big .cat { min-height: 170px; padding-top: 74px; }
.cats.big .cat img { width: 104px; height: 104px; top: -36px; }
.cats.big .cat-name { font-size: 25px; }

/* maker strip */
.maker { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 22px; padding: 22px 28px; border-radius: var(--r-l); background: var(--plum-2); border: 2px dashed var(--plum-4); margin-top: 10px; }
.maker img { width: 180px; height: 180px; }
.maker h2 { font: 400 30px/1.05 var(--display); }
.maker p { color: var(--muted); max-width: 52ch; }

/* ---------- page heads, empty ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 6px 0 24px; }
.page-head > div { flex: 1; min-width: 240px; }
.page-head h1 { margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--muted); }
.page-head.with-icon img { width: 88px; height: 88px; transform: rotate(-6deg); }
.sorts { display: flex; gap: 4px; background: var(--plum-2); padding: 4px; border-radius: 999px; }
.sorts a { padding: 6px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted); }
.sorts a.on { background: var(--paper); color: var(--ink); }
.empty { text-align: center; padding: 40px 16px; max-width: 520px; margin: 0 auto; }
.empty img { margin: 0 auto 6px; width: 180px; height: 180px; }
.empty.big img { width: 260px; height: 260px; }
.empty p { color: var(--muted); }
.big-search { max-width: 640px; margin-bottom: 26px; }
form.big-search input[type=search] { height: 56px; font-size: 18px; }

/* ---------- game page ---------- */
.game-top { position: relative; margin: -8px -28px 26px; padding: 18px 28px 0; isolation: isolate; }
.game-top::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--bg) center / cover; filter: blur(48px) saturate(1.3); opacity: .35; mask-image: linear-gradient(#000 40%, transparent); }
.player { position: relative; max-width: 1180px; margin: 0 auto; aspect-ratio: 16 / 9; max-height: calc(100vh - var(--top) - 120px); border: var(--line); border-radius: var(--r-l); overflow: hidden; background: var(--ink); box-shadow: 0 8px 0 var(--ink); }
.player::before { content: ''; position: absolute; inset: -40px; background: var(--bg) center / cover; filter: blur(26px) brightness(.55); }
.player-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.player.tall .player-stage { inset: 0 auto; left: 50%; transform: translateX(-50%); height: 100%; aspect-ratio: 9 / 16; max-width: 100%; border-left: var(--line); border-right: var(--line); background: linear-gradient(rgba(20, 10, 38, .55), rgba(20, 10, 38, .8)), var(--portrait, none) center / cover, var(--ink); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--ink); }
.player-cover { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 20px; }
.player-icon { width: 112px; height: 112px; border-radius: 28px; border: var(--line); box-shadow: 0 6px 0 var(--ink); }
.player-cover h2 { font: 400 clamp(24px, 3vw, 34px)/1.05 var(--display); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); margin: 0 0 4px; }
.player-tip { display: flex; align-items: center; gap: 8px; max-width: 34ch; font-size: 13.5px; color: var(--paper); background: rgba(20, 10, 38, .6); padding: 8px 12px; border-radius: 12px; margin: 6px 0 0; text-align: left; }
.player-tip .ic { width: 18px; height: 18px; color: var(--butter); }
.pulse { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.player-loading { position: absolute; inset: 0; display: grid; place-items: center; background: var(--ink); z-index: 2; }
.player-loading img { width: 120px; height: 120px; animation: bob 1.1s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
.player-close { display: none; }
.player.app-only { display: grid; grid-template-columns: 1.3fr 1fr; aspect-ratio: auto; max-height: none; }
.player.app-only::before { display: none; }
.app-trailer, .player.app-only > img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.app-card { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 28px; background: var(--plum-2); border-left: var(--line); }
.app-card img { border-radius: 22px; border: var(--line); }
.app-card h2 { font: 400 30px/1.05 var(--display); margin: 4px 0 0; }
.app-card p { color: var(--muted); }
.gamebar { max-width: 1180px; margin: 16px auto 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.gb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gb-left img { width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--ink); }
.gb-left h1 { font-size: 26px; margin: 0; }
.gb-left p { margin: 0; color: var(--muted); font-size: 14px; }
.gb-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.gb { display: inline-flex; align-items: center; gap: 6px; height: 42px; min-width: 42px; padding: 0 12px; justify-content: center; border-radius: 12px; border: 2px solid var(--plum-4); background: var(--plum-2); font-weight: 800; font-size: 14px; }
.gb:hover { border-color: var(--paper); }
.gb .ic { width: 20px; height: 20px; }
.gb.vote.on { background: var(--teal); color: var(--ink); border-color: var(--ink); }
.gb.vote.down.on { background: var(--danger); }
.gb.fav.on { background: var(--gum); color: var(--ink); border-color: var(--ink); }
.gb.pop { animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.18); } }
.notice { max-width: 1180px; margin: 14px auto 0; background: rgba(255, 216, 74, .12); border: 2px solid rgba(255, 216, 74, .45); padding: 10px 14px; border-radius: 12px; }
.notice.warn { background: rgba(255, 90, 95, .12); border-color: rgba(255, 90, 95, .55); }
.game-cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; max-width: 1180px; margin: 0 auto 40px; }
.app-title { margin-bottom: 8px; }
.lead { font-size: 20px; font-weight: 600; line-height: 1.4; max-width: 60ch; }
.howto { background: var(--plum-2); border-radius: var(--r); padding: 18px 22px; margin: 18px 0 28px; border: 2px solid var(--plum-3); }
.howto ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.howto li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; line-height: 1.45; }
.howto li::before { content: ''; width: 12px; height: 12px; margin-top: 6px; border-radius: 4px; background: var(--butter); border: 2px solid var(--ink); transform: rotate(45deg); }
.shots { margin-bottom: 28px; }
.shot-row { display: flex; gap: 12px; overflow-x: auto; padding: 2px 4px 12px 2px; scrollbar-width: thin; scrollbar-color: var(--plum-4) transparent; }
.shot-row button { flex: none; padding: 0; border: var(--line); border-radius: 14px; overflow: hidden; background: var(--ink); }
.shot-row img { height: 300px; width: auto; transition: transform .2s; }
.shot-row button:hover img { transform: scale(1.03); }
.prose { max-width: 68ch; }
.prose h2 { font-size: 21px; margin-top: 1.4em; }
.prose h3 { font-size: 17px; margin: 1.5em 0 .4em; color: var(--butter); }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }
.prose li::marker { color: var(--tang); }
.prose a { color: var(--butter); }
.clamp { max-height: 360px; overflow: hidden; mask-image: linear-gradient(#000 70%, transparent); }
.clamp.open { max-height: none; mask-image: none; }
.game-side { display: flex; flex-direction: column; gap: 18px; }
.getapp { --acc: var(--tang); position: relative; padding: 18px; border: var(--line); border-radius: var(--r-l); background: var(--plum-2); box-shadow: 6px 6px 0 var(--acc); }
.getapp.gum { --acc: var(--gum); } .getapp.teal { --acc: var(--teal); } .getapp.butter { --acc: var(--butter); }
.getapp-nix { position: absolute; right: -14px; top: -34px; width: 104px; height: 104px; }
.getapp h2 { font: 400 24px/1.05 var(--display); padding-right: 70px; }
.getapp p { color: var(--muted); font-size: 14.5px; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.badges img { height: 48px; width: auto; }
.badges.stack a { display: block; }
.facts { background: var(--plum-2); border-radius: var(--r); padding: 6px 18px 16px; }
.facts dl { margin: 0; }
.facts dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 2px solid var(--plum-3); font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; text-align: right; }
.facts dd small { color: var(--faint); font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.links { display: grid; gap: 4px; margin-top: 12px; }
.links a { display: flex; align-items: center; gap: 8px; padding: 6px 0; text-decoration: none; font-weight: 700; color: var(--butter); }
.hint { margin: 12px 0 0; font-size: 14px; }
.hint a { color: var(--butter); }
/* focus mode: phones play full screen */
body.playing { overflow: hidden; }
body.playing .game-top { isolation: auto; }
body.playing .game-top::before, body.playing .tabbar, body.playing .top { display: none; }
body.playing .player { position: fixed; inset: 0; z-index: 90; max-width: none; max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; margin: 0; box-shadow: none; }
body.playing .player.tall .player-stage { border: 0; }
body.playing .player-close { display: grid; place-items: center; position: absolute; top: calc(env(safe-area-inset-top, 0px) + 8px); left: 8px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: rgba(255, 244, 230, .9); color: var(--ink); }

/* dialogs */
.dlg { border: var(--line); border-radius: var(--r-l); background: var(--plum-2); color: var(--paper); padding: 22px; width: min(440px, calc(100vw - 32px)); box-shadow: 8px 8px 0 var(--ink); }
.dlg::backdrop { background: rgba(20, 10, 38, .7); backdrop-filter: blur(3px); }
.dlg h2 { font: 400 24px/1.1 var(--display); }
.radio { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-weight: 600; }
.radio input { accent-color: var(--butter); width: 18px; height: 18px; }
.dlg textarea { width: 100%; margin-top: 6px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.lightbox { width: auto; max-width: 96vw; padding: 0; background: transparent; border: 0; box-shadow: none; overflow: visible; }
.lightbox img { max-height: 88vh; max-width: 92vw; border-radius: 18px; border: var(--line); }
.lightbox button { position: absolute; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 50%; width: 44px; height: 44px; display: grid; place-items: center; font: 800 26px/1 var(--body); }
.lb-close { top: -16px; right: -16px; }
.lb-prev { left: -22px; top: 50%; translate: 0 -50%; }
.lb-next { right: -22px; top: 50%; translate: 0 -50%; }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; }
.field > span { font-weight: 800; font-size: 14.5px; }
.field small { color: var(--faint); font-size: 13px; }
:where(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--plum-4); background: var(--plum); color: var(--paper); outline: none; font-weight: 600;
}
textarea { resize: vertical; line-height: 1.45; }
:where(input, select, textarea):focus { border-color: var(--teal); }
input[type=file] { padding: 10px; border: 2px dashed var(--plum-4); border-radius: 12px; width: 100%; background: var(--plum); }
input[type=file]::file-selector-button { border: 2px solid var(--ink); background: var(--butter); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 800; margin-right: 12px; cursor: pointer; }
.form-err { margin: 0; color: var(--ink); background: var(--danger); padding: 9px 12px; border-radius: 10px; font-weight: 700; }
.form-ok { margin: 0; color: var(--ink); background: var(--ok); padding: 9px 12px; border-radius: 10px; font-weight: 700; }
.fine { font-size: 13px; color: var(--faint); margin: 0; }
.fine a { color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 800; font-size: 14.5px; margin-bottom: 8px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.checks label, .check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.checks input, .check input, .seg input { accent-color: var(--butter); width: 18px; height: 18px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { width: 100%; }
.seg label { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--plum); border: 2px solid var(--plum-4); font-weight: 700; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--butter); }
.hues { display: flex; flex-wrap: wrap; gap: 8px; }
.hues legend { width: 100%; }
.hues label { cursor: pointer; }
.hues input { position: absolute; opacity: 0; }
.hues span { display: block; width: 34px; height: 34px; border-radius: 50%; background: hsl(var(--h) 85% 62%); border: 3px solid var(--ink); }
.hues input:checked + span { outline: 3px solid var(--paper); outline-offset: 2px; }
.hues input:focus-visible + span { outline: 3px solid var(--butter); outline-offset: 2px; }
.panel { background: var(--plum-2); border-radius: var(--r-l); padding: 20px 22px; display: grid; gap: 14px; }
.panel h2 { margin: 0; }
.panel.danger { border: 2px solid rgba(255, 90, 95, .4); }
.sub { color: var(--muted); }
.progress { height: 14px; border-radius: 999px; background: var(--plum-3); border: 2px solid var(--ink); overflow: hidden; }
.progress span { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: repeating-linear-gradient(45deg, var(--butter) 0 12px, var(--tang) 12px 24px); transition: transform .2s; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cover-now { border-radius: 12px; border: 2px solid var(--ink); }
.danger-inline { margin-top: 20px; }
.inline { display: inline-flex; gap: 6px; align-items: center; }
.inline input { min-height: 38px !important; width: 160px !important; }

/* ---------- auth ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 480px); min-height: calc(100vh - var(--top)); }
.auth-art { position: relative; background: var(--plum-3) var(--art) center / cover; display: flex; align-items: flex-end; padding: 34px; }
.auth-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(42, 24, 70, .75), transparent 45%); }
.auth-art p { position: relative; z-index: 1; margin: 0; }
.auth-box { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.auth-box h1 { font-size: 40px; margin-bottom: 8px; }
.g-wrap { min-height: 44px; display: flex; justify-content: center; margin: 10px 0 0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 14px; margin: 14px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 2px; background: var(--plum-3); }
.aux { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.aux a { color: var(--butter); font-weight: 700; }

/* ---------- account, profile, studio, admin ---------- */
.profile-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 6px 0 24px; }
.profile-head > div { flex: 1; min-width: 200px; }
.profile-head h1 { margin: 0 0 4px; }
.profile-head p { margin: 0; color: var(--muted); }
.profile-head .bio { color: var(--paper); margin-top: 8px; max-width: 60ch; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--plum-3); margin-bottom: 22px; overflow-x: auto; }
.tabs a { padding: 10px 16px; text-decoration: none; font-weight: 800; color: var(--muted); border-bottom: 4px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.on { color: var(--paper); border-bottom-color: var(--butter); }
.tabs a small { color: var(--faint); font-weight: 700; }
.settings { display: grid; gap: 20px; max-width: 640px; }
.studio-list, .admin { display: grid; gap: 14px; }
.studio-row, .admin-row { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto auto auto; gap: 18px; align-items: center; background: var(--plum-2); border-radius: var(--r); padding: 12px; }
.admin-row { grid-template-columns: 160px minmax(0, 1fr) auto; }
.studio-row img, .admin-row img { border-radius: 10px; border: 2px solid var(--ink); aspect-ratio: 16 / 9; object-fit: cover; width: 160px; height: auto; }
.studio-row h2, .admin-row h2 { font-size: 18px; margin: 0 0 4px; }
.studio-row p, .admin-row p { margin: 0 0 4px; font-size: 14px; }
.note { color: var(--muted); }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: var(--plum-3); }
.status.published { background: var(--ok); color: var(--ink); }
.status.pending { background: var(--butter); color: var(--ink); }
.status.rejected { background: var(--danger); color: var(--ink); }
.status.hidden { background: var(--faint); color: var(--ink); }
.mini { display: flex; gap: 18px; margin: 0; }
.mini div { text-align: center; }
.mini dt { font-size: 12px; color: var(--muted); }
.mini dd { margin: 0; font-weight: 800; font-size: 18px; }
.spark { width: 120px; height: 34px; margin: 0; }
.spark svg { width: 100%; height: 100%; }
.spark rect { fill: var(--teal); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.table { width: 100%; border-collapse: collapse; background: var(--plum-2); border-radius: var(--r); overflow: hidden; font-size: 14.5px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--plum-3); vertical-align: middle; }
.table th { color: var(--muted); font-size: 13px; }
.table small { color: var(--faint); }
.inline-search { max-width: 360px; margin-bottom: 14px; }

/* developers */
.dev-hero { position: relative; min-height: 380px; display: flex; align-items: center; padding: 40px 44px; border-radius: var(--r-l); border: var(--line); background: var(--plum-3) var(--art) center right / cover; overflow: hidden; box-shadow: 0 8px 0 var(--ink); margin-bottom: 34px; }
.dev-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(42, 24, 70, .9), rgba(42, 24, 70, .3) 55%, transparent); }
.dev-hero > div { position: relative; z-index: 1; max-width: 520px; }
.dev-hero h1 { font-size: clamp(36px, 4.6vw, 60px); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); }
.dev-hero p { font-size: 18px; font-weight: 600; }
.steps ol { list-style: none; padding: 0; margin: 0 0 34px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--plum-2); border-radius: var(--r); padding: 18px; position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--butter); color: var(--ink); border: var(--line); font: 400 20px/1 var(--display); margin-bottom: 10px; }
.steps h3 { font-size: 18px; }
.steps p { color: var(--muted); margin: 0; font-size: 15px; }
.steps > h2, .rules > h2 { font: 400 28px/1.1 var(--display); }
.rules { max-width: 76ch; }
.rules ul { padding-left: 1.2em; }
.rules li { margin-bottom: .6em; }
.rules li::marker { color: var(--tang); }
.rules a { color: var(--butter); }

/* text pages */
.textpage { max-width: 720px; margin: 0 auto; }
.textpage > img { width: 140px; height: 140px; margin-bottom: 4px; }

/* ---------- footer, tabbar, toast ---------- */
.foot { position: relative; margin-top: 40px; background: var(--ink); border-top: var(--line); padding: 40px 28px 90px; }
.foot-in { display: grid; grid-template-columns: 170px minmax(200px, 1fr) 2fr; gap: 28px; align-items: start; max-width: 1240px; margin: 0 auto; }
.foot-nix { width: 170px; height: 170px; margin-top: -90px; }
.foot-brand p { color: var(--muted); }
.foot-social a { display: inline-flex; align-items: center; gap: 8px; color: var(--paper); font-weight: 700; text-decoration: none; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.foot-cols h2 { font-size: 15px; color: var(--butter); margin-bottom: 10px; }
.foot-cols a { display: block; padding: 4px 0; color: var(--muted); text-decoration: none; font-weight: 600; }
.foot-cols a:hover { color: var(--paper); }
.foot-legal { max-width: 1240px; margin: 26px auto 0; color: var(--faint); font-size: 12.5px; }
.tabbar { display: none; }
.toast { position: fixed; left: 50%; bottom: 26px; translate: -50% 0; z-index: 95; background: var(--paper); color: var(--ink); font-weight: 800; padding: 10px 18px; border-radius: 999px; border: var(--line); box-shadow: 0 4px 0 var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  :root { --rail: 86px; }
  .brand { width: auto; }
  .rail { padding: 12px 6px; }
  .rail a { flex-direction: column; gap: 3px; padding: 7px 2px; font-size: 11px; text-align: center; line-height: 1.15; }
  .rail a.on { box-shadow: inset 0 -3px 0 var(--butter); }
  .game-cols { grid-template-columns: 1fr; }
  .game-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 30px 24px; min-height: 0; background-image: var(--hero-s); }
  .hero::after { background: linear-gradient(0deg, rgba(42, 24, 70, .9) 0%, rgba(42, 24, 70, .2) 70%); }
  .booth-slide { transform: none; }
  .studio-row { grid-template-columns: 120px minmax(0, 1fr); }
  .studio-row img { width: 120px; }
  .studio-row .mini, .studio-row .spark, .studio-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .player.app-only { grid-template-columns: 1fr; }
  .app-card { border-left: 0; border-top: var(--line); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 220px; }
  .foot-in { grid-template-columns: 1fr; }
  .foot-nix { margin: -100px auto 0; }
  .foot-cols { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
@media (max-width: 760px) {
  :root { --top: 62px; }
  .top { gap: 10px; padding: 0 12px; }
  .brand-nix { width: 38px; height: 38px; }
  .brand-word b { font-size: 21px; }
  .brand-word i { font-size: 12px; }
  .top .search { display: none; }
  .hide-s { display: none; }
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  main { padding: 16px 16px 90px; }
  .hero { padding: 24px 16px 18px; border-radius: 20px; margin-bottom: 26px; }
  .hero-copy h1 { font-size: 40px; }
  .hero-copy p { font-size: 16px; }
  .booth-info { grid-template-columns: auto 1fr; }
  .booth-info .btn { grid-column: 1 / -1; }
  .booth-icon { width: 52px; height: 52px; }
  .row { grid-auto-columns: 72%; gap: 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }
  .card-label { min-height: 40px; padding: 7px 10px; }
  .card-title { font-size: 14px; }
  .card .pill { display: none; }
  .orig-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .orig-body { padding: 10px 12px 12px; }
  .orig-body p { display: none; }
  .orig-body h3 { font-size: 17px; }
  .orig-actions .chip { display: none; }
  .cats, .cats.big { grid-template-columns: repeat(2, 1fr); gap: 34px 14px; }
  .cat, .cats.big .cat { min-height: 120px; padding: 50px 12px 12px; }
  .cat img, .cats.big .cat img { width: 70px; height: 70px; top: -24px; }
  .cat-name, .cats.big .cat-name { font-size: 18px; }
  .maker { grid-template-columns: 1fr; text-align: center; padding: 20px; }
  .maker img { margin: 0 auto; width: 140px; height: 140px; }
  .game-top { margin: -16px -16px 20px; padding: 12px 12px 0; }
  .player { border-radius: 18px; max-height: none; }
  .player.tall { aspect-ratio: 4 / 5; }
  .gb-left h1 { font-size: 21px; }
  .gb { padding: 0 9px; }
  .shot-row img { height: 220px; }
  .dev-hero { padding: 26px 20px; min-height: 300px; }
  .auth-box { padding: 28px 18px 40px; }
  .studio-row, .admin-row { grid-template-columns: 1fr; }
  .studio-row img, .admin-row img { width: 100%; }
  .table { display: block; overflow-x: auto; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: var(--ink); border-top: var(--line); padding: 6px 4px calc(env(safe-area-inset-bottom, 0px) + 6px);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; font-size: 11.5px; font-weight: 700; color: var(--faint); padding: 4px 0; }
  .tabbar a.on { color: var(--butter); }
  .tabbar .ic { width: 24px; height: 24px; }
  .foot { padding-bottom: 110px; }
  .toast { bottom: 86px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* admin: games waiting for review */
.menu summary { position: relative; }
.menu .dot { position: absolute; right: -4px; top: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--gum); color: var(--ink); border: 2px solid var(--ink); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.menu-pop .count { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--gum); color: var(--ink); font-size: 12px; }
.check.rights { align-items: flex-start; background: var(--plum-2); padding: 14px 16px; border-radius: var(--r); line-height: 1.45; }
.check.rights input { margin-top: 3px; flex: none; }
.check.rights a { color: var(--butter); }
.sec-title { font: 400 28px/1.1 var(--display); margin-bottom: 14px; }
.guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 0 0 34px; }
.guide > div { background: var(--plum-2); border-radius: var(--r); padding: 18px 20px; }
.guide h3 { font-size: 18px; color: var(--butter); }
.guide ul { margin: 0; padding-left: 1.1em; }
.guide li { margin-bottom: .45em; color: var(--paper); font-size: 15px; }
.guide code { background: var(--ink); padding: 1px 6px; border-radius: 6px; font-size: 13.5px; }
.faq details { background: var(--plum-2); border-radius: var(--r); padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 800; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--muted); }

/* ---------- competition: leaderboards, XP, streaks, achievements ---------- */
.lvl-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-right: -14px; padding: 4px 20px 4px 6px; border-radius: 999px; background: var(--ink); border: 2px solid var(--plum-4); font-size: 13px; font-weight: 800; }
.lvl-chip b { min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--butter); color: var(--ink); border: 2px solid var(--ink); font: 400 14px/1 var(--display); }
.lvl-chip i { width: 34px; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--teal) var(--p), var(--plum-3) var(--p)); }
.lvl-chip .streak { display: inline-flex; align-items: center; gap: 1px; color: var(--tang); }
.lvl-chip .streak .ic { width: 16px; height: 16px; }
.menu summary { display: flex; align-items: center; border-radius: 999px; }
.rail-lb .ic { width: 34px; height: 34px; padding: 5px; border-radius: 10px; background: var(--butter); color: var(--ink); border: 2px solid var(--ink); }

/* rank lists */
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lb-list li { display: grid; grid-template-columns: 30px 30px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: rgba(20, 10, 38, .35); font-size: 15px; }
.lb-list .rk { font: 400 16px/1 var(--display); text-align: center; color: var(--muted); }
.lb-list .nm { font-weight: 800; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-list .nm:hover { text-decoration: underline; }
.lb-list .lv { font-size: 12px; color: var(--faint); font-weight: 700; }
.lb-list .val { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.lb-list .p1 .rk, .lb-list .p2 .rk, .lb-list .p3 .rk { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); border: 2px solid var(--ink); }
.lb-list .p1 .rk { background: var(--butter); }
.lb-list .p2 .rk { background: #dfe6f2; }
.lb-list .p3 .rk { background: #f0a565; }
.lb-list .p1 { background: rgba(255, 216, 74, .12); }
.lb-list .me { background: rgba(63, 215, 208, .16); outline: 2px solid var(--teal); outline-offset: -2px; }
.lb-list .gap { background: none; padding: 0; display: block; text-align: center; color: var(--faint); line-height: 1; }
.lb-list .none, .none { display: block; color: var(--muted); background: none; font-size: 14.5px; }
.lb-list .ava { --s: 30px; border-width: 2px; }

/* the leaderboard panel on a game page */
.lb { position: relative; padding: 16px; border: var(--line); border-radius: var(--r-l); background: var(--plum-2); box-shadow: 6px 6px 0 var(--butter); }
.lb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 10px; }
.lb-head > .ic { width: 34px; height: 34px; padding: 6px; border-radius: 10px; background: var(--butter); color: var(--ink); border: 2px solid var(--ink); }
.lb-head h2 { font: 400 24px/1 var(--display); margin: 0; }
.lb-reset { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--muted); }
.lb-reset b { color: var(--paper); font-variant-numeric: tabular-nums; }
.lb-name { margin: 0 0 8px; font-weight: 800; }
.lb-name span { color: var(--tang); font-weight: 700; font-size: 13.5px; }
.lb-picks, .seg-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 10px; border-radius: 999px; background: var(--ink); }
.lb-picks button, .seg-tabs button { flex: 1; min-height: 34px; padding: 4px 10px; border: 0; border-radius: 999px; background: none; font-size: 13.5px; font-weight: 800; color: var(--muted); }
.lb-picks button[aria-selected=true], .seg-tabs button[aria-selected=true] { background: var(--paper); color: var(--ink); }
.lb-cta { margin: 12px 0 0; }

/* result card over the player */
.nx-card { position: absolute; z-index: 6; right: 14px; top: 14px; width: min(280px, calc(100% - 28px)); padding: 10px 14px 10px; border: var(--line); border-radius: var(--r-l); background: var(--plum-2); box-shadow: 6px 6px 0 var(--ink); text-align: center; opacity: 0; transform: translateY(-12px) scale(.96); transition: opacity .25s ease-out, transform .35s ease-out; }
.nx-card.in { opacity: 1; transform: none; }
.nx-card.best { box-shadow: 6px 6px 0 var(--teal); }
.nx-card.gold { box-shadow: 6px 6px 0 var(--butter); background: linear-gradient(160deg, #4a2f12, var(--plum-2) 60%); }
.nx-card-x { position: absolute; right: 6px; top: 4px; width: 32px; height: 32px; border: 0; background: none; font-size: 22px; color: var(--muted); }
.nx-k { margin: 0; font-size: 13px; font-weight: 800; color: var(--muted); }
.nx-v { margin: 2px 0; font: 400 32px/1 var(--display); color: var(--butter); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); font-variant-numeric: tabular-nums; }
.nx-v.lvl { font-size: 64px; }
.nx-h { margin: 2px 0 6px; font-weight: 800; font-size: 14.5px; }
.nx-ranks { list-style: none; margin: 0 0 8px; padding: 0; display: flex; justify-content: center; gap: 6px; }
.nx-ranks li { flex: 1; display: grid; padding: 4px; border-radius: 12px; background: var(--ink); line-height: 1.2; }
.nx-ranks span { font-size: 11.5px; color: var(--muted); }
.nx-ranks b { font: 400 20px/1.1 var(--display); color: var(--paper); }
.nx-ranks small { font-size: 11px; color: var(--faint); }
.nx-xp { margin: 0 0 6px; font-weight: 800; color: var(--teal); }
.nx-link { display: block; margin-top: 4px; font-size: 13.5px; font-weight: 800; color: var(--butter); }
.nx-card .btn { margin-top: 2px; }
.nx-card.level .nx-v { animation: pop .45s ease-out; }
@keyframes pop { from { transform: scale(.4); } to { transform: none; } }

/* achievement medals */
.ach-medal { --m: var(--tang); width: 40px; height: 40px; flex: none; border-radius: 50%; border: 3px solid var(--ink); background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55) 0 18%, transparent 19%), var(--m); box-shadow: inset 0 -4px 0 rgba(20, 10, 38, .3); }
.ach-medal.x2 { --m: var(--teal); }
.ach-medal.x3 { --m: var(--gum); }
.ach-medal.x4 { --m: var(--butter); }
.ach-pop { position: fixed; z-index: 80; left: 50%; top: 84px; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 12px; border: var(--line); border-radius: 999px; background: var(--plum-2); box-shadow: 0 6px 0 var(--ink); transform: translate(-50%, -160%); transition: transform .4s ease-out; }
.ach-pop.in { transform: translate(-50%, 0); }
.ach-pop > span:last-child { display: grid; line-height: 1.2; }
.ach-pop small { font-size: 11.5px; color: var(--muted); font-weight: 800; }
.ach-pop em { font-style: normal; font-size: 13px; color: var(--teal); font-weight: 800; }
.achs { margin: 0 0 28px; }
.achs-head { display: flex; align-items: baseline; gap: 12px; }
.achs-head h2 { margin: 0 0 10px; }
.achs-head p { margin: 0; color: var(--muted); }
.achs-head b { color: var(--butter); font: 400 20px/1 var(--display); }
.achs ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.achs li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--plum-2); }
.achs li:not(.have) .ach-medal { filter: grayscale(1) brightness(.55); }
.achs li:not(.have) .ach-t b { color: var(--muted); }
.ach-t { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.ach-t small, .ach-x small { color: var(--faint); font-size: 12.5px; }
.ach-x { display: grid; text-align: right; line-height: 1.3; }
.ach-x em { font-style: normal; font-weight: 800; font-size: 13px; color: var(--teal); }

/* home arena + leaderboards page */
.arena { padding: 0 0 8px; }
.arena-grid, .lb-cols { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 16px; align-items: start; }
.daily, .weektop, .mecard { border: var(--line); border-radius: var(--r-l); background: var(--plum-2); overflow: hidden; }
.daily { --acc: var(--tang); box-shadow: 6px 6px 0 var(--acc); display: grid; grid-template-columns: 1fr; }
.daily.gum { --acc: var(--gum); }
.daily.teal { --acc: var(--teal); }
.daily.butter { --acc: var(--butter); }
.daily-art img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-bottom: var(--line); }
.daily-body { padding: 14px 16px 16px; display: grid; gap: 8px; }
.daily-k { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-weight: 800; color: var(--tang); font-size: 14px; }
.daily-k .ic { width: 18px; height: 18px; }
.daily-k span { color: var(--muted); font-weight: 700; }
.daily-k b { color: var(--paper); font-variant-numeric: tabular-nums; }
.daily h3 { font: 400 26px/1.05 var(--display); margin: 0; }
.daily .sub, .mecard .sub { margin: 0; color: var(--muted); font-size: 14px; }
.daily .btn { justify-self: start; margin-top: 4px; }
.weektop { padding: 14px 14px 16px; }
.wt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.wt-head .ic { width: 32px; height: 32px; padding: 5px; border-radius: 10px; background: var(--gum); color: var(--ink); border: 2px solid var(--ink); }
.wt-head h3 { font: 400 20px/1.1 var(--display); margin: 0; }
.weektop .more { display: inline-block; margin-top: 10px; font-weight: 800; color: var(--butter); }
.mecard { padding: 18px; display: grid; gap: 10px; justify-items: start; }
.mecard.join img { width: 96px; height: 96px; margin: -6px 0 -4px; }
.mecard.join h3 { font: 400 22px/1.1 var(--display); margin: 0; }
.mecard.join p { margin: 0; color: var(--muted); font-size: 14.5px; }
.me-lv { display: flex; align-items: center; gap: 12px; margin: 0; }
.me-lv b { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--butter); color: var(--ink); border: var(--line); box-shadow: 0 4px 0 var(--ink); font: 400 30px/1 var(--display); }
.me-lv span { font: 400 22px/1.1 var(--display); }
.xpbar { width: 100%; height: 14px; border-radius: 999px; background: var(--ink); border: 2px solid var(--ink); overflow: hidden; }
.xpbar i { display: block; height: 100%; width: var(--p); min-width: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--butter)); }
.champs-h { font: 400 20px/1.1 var(--display); margin: 22px 0 10px; }
.champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.champ { --acc: var(--tang); display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 12px; align-items: center; padding: 10px 12px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--plum-2); box-shadow: 4px 4px 0 var(--acc); text-decoration: none; }
.champ.gum { --acc: var(--gum); }
.champ.teal { --acc: var(--teal); }
.champ.butter { --acc: var(--butter); }
.champ:hover { background: var(--plum-3); }
.champ img { grid-row: span 2; width: 52px; height: 52px; border-radius: 14px; border: 2px solid var(--ink); }
.champ-t { display: grid; line-height: 1.2; min-width: 0; }
.champ-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champ-t small { color: var(--faint); font-size: 12.5px; }
.champ-1 { display: flex; align-items: center; gap: 6px; font-size: 14px; min-width: 0; }
.champ-1 .ic { width: 18px; height: 18px; color: var(--butter); }
.champ-1 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champ-1 small { margin-left: auto; font-weight: 800; color: var(--butter); font-variant-numeric: tabular-nums; }
.champ-1.open { color: var(--tang); font-weight: 800; }
.lb-hero { display: flex; align-items: center; gap: 20px; margin: 10px 0 24px; }
.lb-hero img { width: 140px; height: 140px; flex: none; }
.lb-hero p { margin: 0 0 4px; color: var(--muted); max-width: 60ch; }
.lb-cols { margin-bottom: 34px; }
.howxp { margin: 30px 0; }
.howxp ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.howxp li { display: grid; grid-template-columns: 36px 1fr; gap: 2px 12px; padding: 14px; border-radius: var(--r); background: var(--plum-2); }
.howxp .ic { grid-row: span 2; width: 36px; height: 36px; padding: 6px; border-radius: 10px; background: var(--teal); color: var(--ink); border: 2px solid var(--ink); }
.howxp span { color: var(--muted); font-size: 14px; }

/* profile stats */
.pstats { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 16px; margin: 0 0 28px; }
.ps-level { padding: 18px; border: var(--line); border-radius: var(--r-l); background: var(--plum-2); box-shadow: 6px 6px 0 var(--butter); display: grid; gap: 10px; }
.ps-level .sub { margin: 0; color: var(--muted); }
.ps-nums { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ps-nums div { padding: 14px 16px; border-radius: var(--r); background: var(--plum-2); }
.ps-nums dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 700; }
.ps-nums dt .ic { width: 18px; height: 18px; color: var(--tang); }
.ps-nums dd { margin: 4px 0 0; font: 400 34px/1 var(--display); }
.ps-nums dd small { font: 700 13px var(--body); color: var(--faint); }
.pbests, .precent { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.pbests a { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--plum-2); text-decoration: none; }
.pbests img { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--ink); }
.pbests span { display: grid; line-height: 1.25; min-width: 0; }
.pbests span b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbests small, .precent small { color: var(--faint); font-size: 12.5px; }
.pbests em { font: 400 20px/1 var(--display); font-style: normal; color: var(--muted); }
.pbests em.p1 { color: var(--butter); }
.pbests em.p2 { color: #dfe6f2; }
.pbests em.p3 { color: #f0a565; }
.pbests strong { font-variant-numeric: tabular-nums; }
.precent li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--plum-2); }
.precent span:last-child { display: grid; line-height: 1.25; }

@media (max-width: 1100px) {
  .arena-grid, .lb-cols { grid-template-columns: 1fr 1fr; }
  .arena-grid .daily, .lb-cols .daily { grid-column: span 2; grid-template-columns: 1fr 1fr; }
  .daily-art img { height: 100%; aspect-ratio: auto; border-bottom: 0; border-right: var(--line); }
}
@media (max-width: 760px) {
  .arena-grid, .lb-cols, .pstats { grid-template-columns: 1fr; }
  .arena-grid .daily, .lb-cols .daily { grid-column: auto; grid-template-columns: 1fr; }
  .daily-art img { aspect-ratio: 16 / 7; height: auto; border-right: 0; border-bottom: var(--line); }
  .ps-nums div { padding: 10px; }
  .ps-nums dd { font-size: 26px; }
  .lb-hero img { width: 90px; height: 90px; }
  .lvl-chip i { display: none; }
  .nx-card { right: 50%; transform: translate(50%, -12px) scale(.96); }
  .nx-card.in { transform: translate(50%, 0); }
}

/* ---------- site banners (admin: announcement, maintenance) ---------- */
.site-banner { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; padding: 9px 20px; font-weight: 700; font-size: 15px; text-align: center; border-bottom: 2px solid var(--ink); }
.site-banner.info { background: var(--teal); color: var(--ink); }
.site-banner.warn { background: var(--butter); color: var(--ink); }
.site-banner .ic { width: 20px; height: 20px; }
.site-banner a { color: inherit; }

/* ---------- consent banner: accept and reject look the same ---------- */
.consent { position: fixed; z-index: 96; left: 16px; right: 16px; bottom: 16px; max-width: 760px; margin: 0 auto; background: var(--plum-2); border: var(--line); border-radius: var(--r-l); box-shadow: 6px 6px 0 var(--ink); }
.consent-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 18px; padding: 14px 18px; }
.consent-in p { margin: 0; font-size: 14.5px; line-height: 1.45; }
.consent-in a { color: var(--butter); }
.consent-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.consent-btns .btn { min-width: 128px; }
.aset { align-items: flex-start; }
.aset > span { display: grid; gap: 2px; }
.aset small { color: var(--muted); font-weight: 500; font-size: 13.5px; }
.aset input { margin-top: 3px; flex: none; }
#consent-dlg form { display: grid; gap: 12px; }
.foot-link { display: block; padding: 4px 0; background: none; border: 0; color: var(--muted); font-weight: 600; text-align: left; }
.foot-link:hover { color: var(--paper); }

/* ---------- ad slots + house ads: never over the game, always labelled ---------- */
.ad { position: relative; display: grid; gap: 6px; max-width: 1180px; margin: 18px auto 0; }
.ad-k { display: flex; justify-content: space-between; gap: 10px; margin: 0; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.ad-k a { color: var(--muted); text-transform: none; letter-spacing: 0; }
.ad-in:empty { display: none; }
.ad-in { min-height: 90px; border-radius: var(--r); overflow: hidden; background: rgba(20, 10, 38, .35); }
.ad.filled .ad-in { min-height: 0; background: none; }
.grid > .ad { grid-column: 1 / -1; margin: 4px 0; }
.ad-home, .ad-list { margin: 0 0 30px; }
.ad-side { margin: 0; }
.house { --acc: var(--tang); display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 10px 14px 10px 10px; border: var(--line); border-radius: var(--r); background: var(--plum-2); text-decoration: none; box-shadow: 4px 4px 0 var(--acc); transition: transform .12s, box-shadow .12s; }
.house.gum { --acc: var(--gum); } .house.teal { --acc: var(--teal); } .house.butter { --acc: var(--butter); }
.house img { width: 200px; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 10px; border: 2px solid var(--ink); }
.house-t { display: grid; gap: 2px; min-width: 0; }
.house-t small { color: var(--tang); font-weight: 800; font-size: 12.5px; }
.house-t b { font: 400 21px/1.1 var(--display); letter-spacing: .01em; }
.house-t span { color: var(--muted); font-size: 14px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.house:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--acc); }
.ad-side .house { grid-template-columns: 1fr; padding: 10px; }
.ad-side .house img { width: 100%; aspect-ratio: 2 / 3; max-height: 360px; }
@media (max-width: 1180px) { .ad-side { display: none; } }
@media (max-width: 760px) {
  .house { grid-template-columns: 110px minmax(0, 1fr); }
  .house img { width: 110px; }
  .house .btn { grid-column: 1 / -1; }
  .consent { left: 8px; right: 8px; bottom: 82px; }
  .consent-in { grid-template-columns: 1fr; padding: 12px 14px; }
  .consent-btns .btn { flex: 1; min-width: 0; }
}

/* ---------- game of the week, Nixcape Plus ---------- */
.gotw { --acc: var(--tang); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); margin: 0 0 34px; border: var(--line); border-radius: var(--r-l); overflow: hidden; background: var(--plum-2); box-shadow: 6px 6px 0 var(--acc); }
.gotw.gum { --acc: var(--gum); } .gotw.teal { --acc: var(--teal); } .gotw.butter { --acc: var(--butter); }
.gotw-art img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; border-right: var(--line); }
.gotw-body { padding: 22px 26px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; }
.gotw-k { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--butter); font-weight: 800; }
.gotw h2 { font: 400 34px/1.05 var(--display); margin: 2px 0 6px; }
.gotw p { color: var(--muted); }
@media (max-width: 760px) { .gotw { grid-template-columns: 1fr; } .gotw-art img { border-right: 0; border-bottom: var(--line); } .gotw-body { padding: 16px; } .gotw h2 { font-size: 26px; } }
.plus-hero { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin: 10px 0 26px; }
.plus-hero > div { flex: 1; min-width: 240px; }
.plus-hero h1 { margin: 6px 0; }
.plus-hero p { color: var(--muted); font-size: 18px; max-width: 50ch; }
.plus-perks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.plus-perks li { background: var(--plum-2); border-radius: var(--r); padding: 18px; }
.plus-perks h2 { font-size: 19px; color: var(--butter); }
.plus-perks p { margin: 0; color: var(--muted); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- admin: own sidebar, dense tables, KPI cards, SVG charts ---------- */
body.is-admin .shell { grid-template-columns: 228px minmax(0, 1fr); }
body.is-admin main { padding: 18px 22px 60px; }
.adm-rail { padding: 10px 8px 30px; }
.adm-nav { display: flex; flex-direction: column; gap: 1px; }
.adm-nav .adm-h { margin: 12px 12px 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.adm-nav .adm-h:first-child { margin-top: 2px; }
.adm-nav a { display: flex; flex-direction: row; text-align: left; line-height: 1.3; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 14.5px; color: var(--muted); }
.adm-nav a .ic { width: 20px; height: 20px; padding: 0; }
.adm-nav a.sub { padding-left: 42px; font-size: 14px; }
.adm-nav a:hover { background: var(--plum-2); color: var(--paper); }
.adm-nav a.on { background: var(--plum-3); color: var(--paper); box-shadow: inset 4px 0 0 var(--butter); }
.adm-nav a em { margin-left: auto; font-style: normal; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--gum); color: var(--ink); font-size: 12px; font-weight: 800; text-align: center; }
.adm-nav .back { margin-top: 14px; border-top: 2px solid var(--plum-3); padding-top: 12px; border-radius: 0; }
.adm { display: grid; gap: 16px; min-width: 0; }
.adm h1 { font-size: clamp(26px, 3vw, 36px); margin: 0; }
.adm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 18px; }
.adm-head p { margin: 4px 0 0; color: var(--muted); }
.ag-title { display: flex; align-items: center; gap: 14px; }
.ag-title img { border-radius: 14px; border: 2px solid var(--ink); }
.arange { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.arange .sorts a { padding: 5px 11px; font-size: 13.5px; }
.acustom { display: flex; align-items: center; gap: 6px; }
.acustom input[type=date] { min-height: 36px; padding: 4px 8px; width: auto; font-size: 13.5px; }
.arange-l { margin: 0; flex-basis: 100%; text-align: right; color: var(--faint); font-size: 13px; }
.atabs { margin-bottom: 0; }
.akpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.akpi { position: relative; display: grid; gap: 2px; padding: 12px 14px 10px; border-radius: var(--r); background: var(--plum-2); border: 2px solid var(--plum-3); overflow: hidden; }
.ak { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.av { margin: 0; font: 400 28px/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.adelta { font-size: 12.5px; font-weight: 800; color: var(--faint); }
.adelta.up { color: var(--ok); }
.adelta.down { color: var(--danger); }
.aspark { width: 100%; height: 28px; margin-top: 4px; }
.aspark polyline { fill: none; stroke: var(--teal); stroke-width: 2; vector-effect: non-scaling-stroke; }
.anote { margin: -4px 0 0; color: var(--faint); font-size: 13.5px; }
.agrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start; }
.ablock { min-width: 0; background: var(--plum-2); border-radius: var(--r); padding: 12px 14px; }
.ahead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.ahead h3 { margin: 0; font-size: 16px; }
.ahead h3 small { color: var(--faint); }
.ahead .more { margin-left: auto; color: var(--butter); font-weight: 800; font-size: 13.5px; }
.ahead .csv { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--muted); text-decoration: none; padding: 2px 8px; border-radius: 6px; border: 2px solid var(--plum-4); }
.ahead .more + .csv { margin-left: 0; }
.ahead .csv:hover { color: var(--paper); border-color: var(--paper); }
.ascroll { overflow-x: auto; }
.atable { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.atable th, .atable td { padding: 6px 8px; border-bottom: 1px solid var(--plum-3); text-align: left; white-space: nowrap; vertical-align: middle; }
.atable th { color: var(--muted); font-size: 12px; font-weight: 800; background: var(--plum-2); }
.atable .n { text-align: right; }
.atable td.wrap { white-space: normal; min-width: 220px; max-width: 520px; }
.atable td.none { color: var(--muted); white-space: normal; }
.atable tbody tr:hover td { background: rgba(255, 244, 230, .03); }
.atable a { color: var(--paper); font-weight: 700; }
.atable code, .adl code { font-size: 12.5px; background: var(--ink); padding: 1px 5px; border-radius: 5px; white-space: pre-wrap; word-break: break-all; }
.atable pre { margin: 4px 0 0; font-size: 11.5px; color: var(--faint); white-space: pre-wrap; }
.atable td.heat { text-align: right; background: rgba(63, 215, 208, calc(var(--a) * .55)); }
.abar { display: inline-block; vertical-align: middle; width: 70px; height: 8px; margin-right: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--teal) var(--w), var(--plum-3) var(--w)); }
.atable .row-actions { flex-wrap: nowrap; justify-content: flex-start; }
.achart { margin: 0; background: var(--plum-2); border-radius: var(--r); padding: 12px 14px 6px; }
.achart figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.achart h3 { margin: 0; font-size: 16px; }
.alegend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.alegend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--c); }
.achart .s0, .alegend .s0 { --c: var(--teal); color: var(--teal); }
.achart .s1, .alegend .s1 { --c: var(--butter); color: var(--butter); }
.achart .s2, .alegend .s2 { --c: var(--gum); color: var(--gum); }
.achart .s3, .alegend .s3 { --c: var(--tang); color: var(--tang); }
.alegend span { color: var(--muted); }
.achart svg { width: 100%; height: auto; margin-top: 4px; }
.achart .ag { stroke: var(--plum-3); stroke-width: 1; }
.achart .al { fill: var(--faint); font: 600 11px var(--body); }
.achart .al2 { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.achart .aa { fill: currentColor; opacity: .12; }
.achart .ad, .achart .ab { fill: currentColor; }
.achart rect:hover, .achart circle:hover { opacity: .7; }
.alive { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; padding: 10px 14px; border-radius: var(--r); background: var(--plum-2); font-weight: 700; }
.alive b { font: 400 30px/1 var(--display); color: var(--ok); }
.alive small { color: var(--faint); font-weight: 600; }
.pulse-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(107, 227, 160, .6); animation: livepulse 1.8s infinite; }
@keyframes livepulse { 70% { box-shadow: 0 0 0 10px rgba(107, 227, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(107, 227, 160, 0); } }
.aalerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.aalerts li { border-radius: 10px; padding: 8px 12px; border: 2px solid var(--plum-4); font-weight: 700; font-size: 14.5px; }
.aalerts li.warn { border-color: var(--butter); background: rgba(255, 216, 74, .1); }
.aalerts li.bad { border-color: var(--danger); background: rgba(255, 90, 95, .14); }
.aalerts a { color: var(--paper); text-decoration: none; display: block; }
.aalerts a:hover { text-decoration: underline; }
.afunnel { display: grid; gap: 8px; background: var(--plum-2); border-radius: var(--r); padding: 14px; }
.afs { display: grid; grid-template-columns: 150px minmax(0, 1fr) 80px 60px; align-items: center; gap: 12px; font-size: 14px; }
.afl { font-weight: 700; }
.afb { height: 22px; border-radius: 8px; background: var(--plum-3); overflow: hidden; }
.afb i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--teal), var(--butter)); border-radius: 8px; }
.afs b { text-align: right; font-variant-numeric: tabular-nums; }
.afs small { color: var(--muted); text-align: right; }
.afilters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.afilters input[type=search], .afilters select { width: auto; min-height: 38px; padding: 6px 10px; font-size: 14px; }
.afilters input[type=search] { min-width: 220px; flex: 1; max-width: 360px; }
.adl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; }
.adl div { display: grid; gap: 1px; }
.adl dt { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.adl dd { margin: 0; font-weight: 700; word-break: break-word; }
.adl a { color: var(--butter); }
.arow { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.arow-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.arow-form input, .arow-form select { width: auto !important; min-height: 34px; padding: 4px 8px; font-size: 13.5px; }
.arow-form input[name^=text] { min-width: 160px; }
.arow-form input[type=number] { width: 70px !important; }
.arow-form .form-err, .arow-form .form-ok { flex-basis: 100%; }
.asettings { display: grid; gap: 16px; max-width: 860px; }
.aset-g { display: grid; gap: 14px; }
.aset-g legend { float: left; width: 100%; margin: 0; }
.aset-g legend h2 { margin: 0; }
.aset-g textarea { font: 500 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.form-actions.sticky { position: sticky; bottom: 12px; z-index: 5; }
.adel { max-width: 520px; }
.apager { display: flex; gap: 8px; }
.adm .panel { padding: 16px 18px; }
@media (max-width: 1180px) { body.is-admin .shell { grid-template-columns: 196px minmax(0, 1fr); } .adm-nav a.sub { padding-left: 20px; } }
@media (max-width: 760px) {
  body.is-admin .shell { grid-template-columns: 1fr; }
  body.is-admin main { padding: 12px 12px 90px; }
  body.is-admin .adm-rail { display: block; position: sticky; top: var(--top); z-index: 30; height: auto; padding: 6px 8px; overflow-x: auto; background: var(--plum); border-bottom: 2px solid var(--plum-3); }
  .adm-nav { flex-direction: row; gap: 4px; white-space: nowrap; }
  .adm-nav .adm-h { display: none; }
  .adm-nav a, .adm-nav a.sub { padding: 6px 10px; font-size: 13.5px; }
  .adm-nav a .ic { display: none; }
  .adm-nav .back { margin: 0; border: 0; padding-top: 6px; }
  .arange-l { text-align: left; }
  .afs { grid-template-columns: 1fr 70px 50px; }
  .afb { grid-column: 1 / -1; order: 3; }
  .av { font-size: 24px; }
}

/* logo: the fox (Nix) with the Nixcape N as a badge, then the wordmark */
.brand-logo { --s: 46px; position: relative; width: var(--s); height: var(--s); flex: none; }
.brand-fox { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 50% 60%, #ff8a3d55, transparent 70%), var(--plum-3); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); transform: rotate(-6deg); transition: transform .2s ease-out; }
.brand-n { position: absolute; right: -6px; bottom: -4px; width: 46%; height: 46%; padding: 2px; border-radius: 30%; background: var(--ink); border: 2px solid var(--paper); }
.brand:hover .brand-fox { transform: rotate(4deg) translateY(-2px); }
.brand-word.big { display: flex; align-items: center; gap: 12px; }
@media (max-width: 760px) { .brand-logo { --s: 38px; } }
.brand-word .x { color: #7d8bff; }

/* fullscreen and landscape games on phones */
.player:fullscreen { max-width: none; max-height: none; width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
.player:fullscreen .player-close { display: grid; place-items: center; position: absolute; top: calc(env(safe-area-inset-top, 0px) + 8px); left: 8px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: rgba(255, 244, 230, .9); color: var(--ink); }
.rotate-hint { display: none; }
@media (orientation: portrait) and (max-width: 900px) {
  body.playing .player[data-orient=landscape] .rotate-hint { display: grid; position: absolute; inset: 0; z-index: 4; place-content: center; justify-items: center; gap: 14px; padding: 24px; background: rgba(20, 10, 38, .94); text-align: center; font-weight: 800; }
}
.rotate-hint .ic { width: 76px; height: 76px; color: var(--butter); animation: turn-phone 1.8s ease-in-out infinite; }
@keyframes turn-phone { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }

/* consent banner on phones: the two choices side by side at equal size, settings below */
@media (max-width: 760px) {
  .consent-in p { font-size: 13.5px; }
  .consent-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .consent-btns .btn { white-space: nowrap; padding-inline: 8px; }
  .consent-btns .btn.ghost { grid-column: 1 / -1; min-height: 34px; }
  body.playing .consent { bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); }
}
