/* =============================== */
/* GAMES — niguro.com's games on Sngine's games module (games.php; templates games.tpl, __ng_game_deck.tpl,
   __ng_game_play.tpl, __ng_media_game.tpl; script includes/assets/js/core/niguro-games.js). On top of the
   media pages' CSS (pages/media.css: rows, cards, Most Played minis, the chip row).
   The hub (.ngg--hub): the Sngine v5 games structure - a wide hero, a 300px / 360px left column (nav + Most
   Played) and the main column (bar, featured deck, genre pills, rows, the grid) - composed on the page rather
   than boxed: the nav, Most Played, the bar and the rows sit on the page background; only the hero, the deck
   and the cards are surfaces.
   A game (.ngg--game): niguroapp's page-game.php at its sizes (niguroapp skins/games.css): the player bar
   (title 15.5px, sub 12px), the stage sized to stay above the fold, cards padded 16px / 18px 20px, the title
   24px / 26px from 768px, card titles 16px, the info in two columns (1.45fr / 1fr) from 1024px, 12px / 16px
   between blocks. Colours are Niguro tokens (day and night); the game stage is a dark media surface. */
/* =============================== */

.ngg { --ngg-gap: 12px; --ngg-stage: #0b0b0d; }
@media (min-width: 768px) { .ngg { --ngg-gap: 16px; } }
.ngg [hidden] { display: none !important; }
.ngg-count {
  display: inline-grid; place-items: center; min-width: 26px; height: 22px; margin-left: auto; padding: 0 8px; border-radius: 999px;
  background: var(--ng-fill); color: var(--ng-sub); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.ngg-new {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px;
  background: var(--ng-brand); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1;
}
.ngm-card .ng-mcard__badge.ngm-chip.ngg-new { height: 22px; padding: 0 8px; border-radius: 7px; background: var(--ng-brand); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.ngg-best { color: var(--ng-brand); font-weight: 600; }
.ngg-best::before { content: "·"; margin-right: 6px; color: var(--ng-faint); font-weight: 400; }

/* ------------------------------- */
/* hub: the hero                   */
/* ------------------------------- */
.ngg-hero {
  position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 168px; margin: 0; padding: 22px 18px; border-radius: 20px; color: var(--ng-ink-strong);
  background:
    radial-gradient(70% 120% at 92% 10%, hsl(var(--primary) / .22), transparent 62%),
    radial-gradient(60% 110% at 0% 100%, hsl(var(--primary) / .08), transparent 60%),
    radial-gradient(circle at 1px 1px, hsl(var(--primary) / .12) 1px, transparent 1.6px) 0 0 / 18px 18px,
    var(--ng-card);
}
@media (min-width: 768px) { .ngg-hero { min-height: 220px; padding: 34px 40px; border-radius: 24px; } }
@media (min-width: 1024px) { .ngg-hero { min-height: 236px; padding: 36px 48px; } }
.ngg-hero__text { position: relative; z-index: 2; min-width: 0; max-width: 560px; }
.ngg-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; margin: 0 0 10px; padding: 0 10px; border-radius: 999px;
  background: var(--ng-tile); color: var(--ng-brand); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.ngg-hero__eyebrow .ng-ico { width: 15px; height: 15px; }
.ngg-hero__title { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: var(--ng-ink-strong); }
@media (min-width: 768px) { .ngg-hero__title { font-size: 46px; } }
@media (min-width: 1024px) { .ngg-hero__title { font-size: 54px; } }
.ngg-hero__sub { margin: 8px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--ng-sub); }
@media (min-width: 768px) { .ngg-hero__sub { font-size: 17px; } }
.ngg-hero__stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.ngg-hero__stats li {
  display: inline-flex; align-items: baseline; gap: 5px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--ng-fill); font-size: 12.5px; color: var(--ng-sub); line-height: 30px;
}
.ngg-hero__stats b { font-size: 14px; font-weight: 800; color: var(--ng-ink-strong); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .ngg-hero__stats { margin-top: 18px; } }
@media (max-width: 479.98px) { .ngg-hero__stats li:nth-child(3) { display: none; } }

/* the art: the featured posters fanned, the games tile and two small tiles, soft shapes behind */
.ngg-hero__art { position: relative; z-index: 1; flex: none; width: 116px; height: 104px; }
@media (min-width: 768px) { .ngg-hero__art { width: 300px; height: 168px; margin-right: 4px; } }
@media (min-width: 1024px) { .ngg-hero__art { width: 360px; height: 180px; } }
.ngg-hero__art > i { position: absolute; border-radius: 50%; background: hsl(var(--primary) / .18); }
.ngg-hero__art > i:nth-of-type(1) { width: 46%; aspect-ratio: 1; right: -8%; top: -18%; }
.ngg-hero__art > i:nth-of-type(2) { width: 18%; aspect-ratio: 1; left: 8%; bottom: -6%; background: hsl(var(--primary) / .12); }
.ngg-hero__art > i:nth-of-type(3) { width: 9%; aspect-ratio: 1; left: 40%; top: -2%; background: hsl(var(--primary) / .3); }
.ngg-hero__poster {
  position: absolute; display: block; overflow: hidden; width: 62%; aspect-ratio: 16 / 9; border-radius: 12px;
  background: var(--ng-fill); box-shadow: 0 16px 34px -14px hsl(220 40% 10% / .45), 0 0 0 3px var(--ng-card);
}
.ngg-hero__poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ngg-hero__poster--1 { right: 2%; top: 24%; z-index: 3; rotate: 4deg; }
.ngg-hero__poster--2 { right: 30%; top: 6%; z-index: 2; width: 52%; rotate: -8deg; }
.ngg-hero__poster--3 { right: 20%; bottom: -4%; z-index: 1; width: 46%; rotate: 10deg; }
@media (min-width: 768px) { .ngg-hero__poster { border-radius: 14px; } }
@media (max-width: 767.98px) {
  .ngg-hero__poster--2, .ngg-hero__poster--3 { display: none; }
  .ngg-hero__poster--1 { width: 84%; right: 0; top: 30%; }
}
.ngg-hero__tile {
  position: absolute; z-index: 4; left: 0; top: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 30%; rotate: -8deg;
  background: linear-gradient(var(--ng-tile), var(--ng-tile)) var(--ng-card); color: var(--ng-brand);
  box-shadow: 0 12px 26px -10px hsl(var(--primary) / .55);
}
.ngg-hero__tile .ng-ico { width: 52%; height: 52%; stroke-width: 1.8; }
@media (min-width: 768px) { .ngg-hero__tile { left: 6%; top: 50%; width: 64px; height: 64px; } }
.ngg-hero__spark {
  position: absolute; z-index: 4; display: none; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--ng-card); color: var(--ng-brand); box-shadow: 0 10px 22px -10px hsl(220 40% 10% / .4);
}
.ngg-hero__spark .ng-ico { width: 18px; height: 18px; }
@media (min-width: 768px) {
  .ngg-hero__spark { display: grid; }
  .ngg-hero__spark--1 { right: 0; top: 2%; rotate: 8deg; }
  .ngg-hero__spark--2 { left: 30%; bottom: 0; rotate: -10deg; }
}

/* ------------------------------- */
/* hub: the two columns            */
/* ------------------------------- */
@media (min-width: 1024px) { .ngg-hub.ng-hub--nav { --ng-hub-nav: 300px; gap: 24px; } }
@media (min-width: 1280px) { .ngg-hub.ng-hub--nav { --ng-hub-nav: 360px; } }
.ngg-hub .ng-hub__main { gap: 20px; }
.ngg-hub .ng-hub__nav { gap: 20px; }

/* the nav: big rows on the page, the current one a filled tile */
@media (min-width: 1024px) {
  .ngg .ngg-snav { gap: 6px; padding: 0; background: transparent; }
  .ngg .ngg-snav a {
    display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 12px; border-radius: 16px;
    font-size: 15.5px; font-weight: 700; color: var(--ng-ink-strong); text-decoration: none;
  }
  .ngg .ngg-snav a:hover { background: var(--ng-card); }
  .ngg .ngg-snav a.active { background: var(--ng-brand); color: #fff; box-shadow: 0 10px 24px -12px hsl(var(--primary) / .7); }
  .ngg-snav__ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--ng-card); color: var(--ng-brand); }
  .ngg .ngg-snav a:hover .ngg-snav__ico { background: var(--ng-tile); }
  .ngg .ngg-snav a.active .ngg-snav__ico { background: hsl(0 0% 100% / .2); color: #fff; }
  .ngg .ngg-snav a .ng-ico { width: 20px; height: 20px; color: inherit; }
}
@media (max-width: 1023.98px) {
  .ngg-snav__ico { display: contents; }
}

/* Most Played: three big picture cards, no box around them */
.ngg-most { margin: 0; }
.ngg-most .ng-sechead { margin-bottom: 12px; }
.ngg .ngg-minis { padding: 0; gap: 12px; }
.ngg .ngg-minis .ngm-mini { aspect-ratio: 16 / 9; border-radius: 18px; }
@media (min-width: 1024px) and (max-width: 1279.98px) { .ngg .ngg-minis .ngm-mini { aspect-ratio: 16 / 10; } }
.ngg .ngg-minis .ngm-mini__title { top: 14px; left: 16px; right: 16px; font-size: 16px; }
.ngg .ngg-minis .ngm-mini__play { left: 14px; bottom: 14px; width: 38px; height: 38px; background: var(--ng-brand); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 6px 16px -6px hsl(0 0% 0% / .5); }
.ngg .ngg-minis .ngm-mini__play .ng-ico { width: 18px; height: 18px; }
.ngg .ngg-minis .ngm-mini > .ngm-mini__chip { right: 14px; bottom: 16px; height: 26px; padding: 0 10px; font-size: 12px; }
@media (max-width: 1023.98px) {
  .ngg .ngg-minis { grid-auto-columns: minmax(240px, 1fr); }
}

/* the bar: Games ▾ and the search pill with its genre filter */
.ngg-bar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ngg-bar .ngm-types { flex: none; }
.ngg-bar .ngm-types__btn { height: 44px; padding: 0 14px 0 16px; border-radius: 999px; background: var(--ng-card); }
.ngg-bar .ngm-types__btn:hover { background: var(--ng-fill); }
.ngg-search {
  position: relative; display: flex; align-items: center; flex: 1; min-width: 0; height: 44px; margin: 0; padding: 0 5px 0 16px;
  border-radius: 999px; background: var(--ng-card);
}
.ngg-search__lead { flex: none; width: 19px !important; height: 19px !important; margin-right: 10px; color: var(--ng-sub); }
.ngg-search__input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none;
  color: var(--ng-ink-strong); font-size: 15px;
}
.ngg-search__input::placeholder { color: var(--ng-faint); }
.ngg-search__input::-webkit-search-cancel-button { display: none; }
.ngg-search__input:focus, .ngg-search__input:focus-visible { outline: 0; box-shadow: none; }
.ngg-search__filter { flex: none; }
.ngg-search__btn {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: var(--ng-fill); color: var(--ng-ink-strong); cursor: pointer;
}
.ngg-search__btn:hover { background: var(--ng-fill-2); }
.ngg-search__btn :is(.fa, .ni) { font-size: 15px; }
.ngg-search .dropdown-item { justify-content: space-between; }
.ngg-search .dropdown-item .ngg-count { margin-left: 12px; }
.ngg-search .dropdown-item.active .ngg-count { background: hsl(0 0% 100% / .22); color: inherit; }

/* ------------------------------- */
/* hub: the featured deck          */
/* ------------------------------- */
.ngg-deck { --peek: 22px; --step: 11px; position: relative; }
@media (min-width: 768px) { .ngg-deck { --peek: 44px; --step: 22px; } }
.ngg-deck__stage { position: relative; aspect-ratio: 4 / 3.4; padding-right: var(--peek); }
@media (min-width: 576px) { .ngg-deck__stage { aspect-ratio: 16 / 10; } }
@media (min-width: 768px) { .ngg-deck__stage { aspect-ratio: 16 / 8; } }
.ngg-deck__card {
  position: absolute; top: 0; bottom: 0; left: 0; right: var(--peek); z-index: calc(10 - var(--k, 0));
  display: block; overflow: hidden; isolation: isolate; border-radius: 20px; background: var(--ng-fill); color: #fff; text-decoration: none;
  transform-origin: 100% 50%; transform: translateX(calc(var(--k, 0) * var(--step))) scale(calc(1 - var(--k, 0) * .08));
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .4s ease, filter .4s ease;
  box-shadow: 0 18px 40px -22px hsl(220 40% 8% / .55);
}
@media (min-width: 768px) { .ngg-deck__card { border-radius: 24px; } }
.ngg-deck__card:not(.is-on) { filter: brightness(.72) saturate(.9); }
.ngg-deck__card.is-gone {
  opacity: 0; pointer-events: none; transform: translateX(calc(2 * var(--step))) scale(.84);
}
.ngg-deck__card:hover, .ngg-deck__card:focus { color: #fff; }
.ngg-deck__card:focus-visible { outline: 3px solid var(--ng-brand); outline-offset: 3px; }
.ngg-deck__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: scale .6s ease; }
.ngg-deck__card.is-on:hover .ngg-deck__img { scale: 1.03; }
.ngg-deck__shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, hsl(0 0% 0% / .34) 0%, transparent 28%, transparent 42%, hsl(0 0% 0% / .8) 100%),
    linear-gradient(90deg, hsl(0 0% 0% / .32) 0%, transparent 55%);
}
.ngg-deck__chips { position: absolute; top: 14px; left: 14px; right: 110px; display: flex; flex-wrap: wrap; gap: 6px; }
.ngg-chip--brand { background: var(--ng-brand); text-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.ngg-chip--brand .ng-ico { width: 13px; height: 13px; }
.ngg-deck__foot { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
@media (min-width: 768px) {
  .ngg-deck__chips { top: 22px; left: 24px; }
  .ngg-deck__foot { left: 28px; right: 28px; bottom: 26px; gap: 8px; }
}
.ngg-deck__card:not(.is-on) .ngg-deck__chips, .ngg-deck__card:not(.is-on) .ngg-deck__foot { opacity: 0; transition: opacity .2s; }
.ngg-deck__title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 30ch;
  font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; text-shadow: 0 2px 10px hsl(0 0% 0% / .35);
}
@media (min-width: 768px) { .ngg-deck__title { font-size: 34px; } }
.ngg-deck__line {
  display: none; max-width: 52ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14.5px; color: hsl(0 0% 100% / .86); text-shadow: 0 1px 3px hsl(0 0% 0% / .4);
}
@media (min-width: 768px) { .ngg-deck__line { display: block; } }
.ngg-deck__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.ngg-deck__play { pointer-events: none; }
.ngg-deck__meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: hsl(0 0% 100% / .92); text-shadow: 0 1px 3px hsl(0 0% 0% / .35); }
.ngg-deck__meta .ng-ico { width: 17px; height: 17px; }
.ngg-deck__dots { position: absolute; z-index: 20; top: 16px; right: calc(var(--peek) + 14px); display: flex; align-items: center; gap: 6px; }
@media (min-width: 768px) { .ngg-deck__dots { top: 26px; right: calc(var(--peek) + 24px); } }
.ngg-deck__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: hsl(0 0% 100% / .5); box-shadow: 0 1px 3px hsl(0 0% 0% / .3); cursor: pointer; transition: width .2s, background .2s; }
.ngg-deck__dot.is-on { width: 22px; background: #fff; }
.ngg-deck__dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ngg-deck__nav { z-index: 20; }
.ngg-deck .ng-strip__nav--prev { left: 12px; }
.ngg-deck .ng-strip__nav--next { right: calc(var(--peek) + 12px); }
@media (hover: hover) and (pointer: fine) {
  .ngg-deck:hover .ngg-deck__nav, .ngg-deck__nav:focus-visible { opacity: 1; visibility: visible; scale: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ngg-deck__card, .ngg-deck__img, .ngg-deck__dot { transition: none; }
}

/* the rows and the grid */
.ngg-rows { display: flex; flex-direction: column; gap: 24px; }
.ngg-hub .ngm-sec .ng-sechead { margin-bottom: 12px; }
.ngg .ngm-sec .ng-sechead .ngg-count { margin-left: 0; }
.ngg-guestnote { display: flex; align-items: flex-start; gap: 8px; margin: 4px 2px 0; font-size: 13px; line-height: 1.45; color: var(--ng-sub); }
.ngg-guestnote .ng-ico { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--ng-brand); }
.ngg-guestnote a { color: var(--ng-brand); font-weight: 600; text-decoration: none; }

/* ------------------------------- */
/* a game                          */
/* ------------------------------- */
.ngg-play { display: flex; flex-direction: column; gap: var(--ngg-gap); min-width: 0; }
.ngg--game.ng-hubwrap > * + .ngg-play { margin-top: 12px; }
.ngg-play > .card { margin: 0; }

/* the player bar */
.ngg-pbar { display: flex; flex-direction: row; align-items: center; gap: 6px; min-height: 56px; padding: 8px 10px; border: 0; border-radius: var(--ng-r); background: var(--ng-card); }
@media (min-width: 768px) { .ngg-pbar { gap: 8px; padding: 8px 12px; } }
.ngg-ibtn { flex: none; width: 38px; padding: 0; }
.ngg-ibtn :is(.fa, .ni) { font-size: 16px; }
.ngg-pbar__ttl { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; margin-left: 4px; }
.ngg-pbar__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; color: var(--ng-ink-strong); }
.ngg-pbar__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ng-sub); }
.ngg-pbar__acts { display: flex; align-items: center; gap: 6px; flex: none; }
.ngg-pbar__lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.ngg-pbar__btn:disabled { opacity: .45; cursor: default; }
@media (min-width: 1024px) {
  .ngg-pbar__btn { width: auto; padding: 0 14px 0 12px; }
  .ngg-pbar__lbl { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}

/* the live score */
.ngg-live {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; padding: 0 10px; border-radius: 999px;
  background: var(--ng-tile); color: var(--ng-brand); font-variant-numeric: tabular-nums; transition: background-color .2s, color .2s, opacity .2s;
}
.ngg-live__lbl { display: none; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ngg-live__num { font-size: 15px; font-weight: 700; }
.ngg-live__bar { position: relative; display: none; width: 40px; height: 4px; overflow: hidden; border-radius: 999px; background: hsl(var(--primary) / .2); }
.ngg-live__bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: currentColor; transition: width .25s ease; }
@media (min-width: 640px) { .ngg-live__lbl { display: inline; } .ngg-live__bar { display: block; } }
.ngg-live.no-peak .ngg-live__bar { display: none; }
.ngg-live.is-best { background: var(--ng-brand); color: #fff; }
.ngg-live.is-best .ngg-live__bar { background: hsl(0 0% 100% / .3); }
.ngg-live.is-paused { opacity: .6; }

/* the stage: the game's own shape, never taller than the screen under the header and the bar */
.ngg-stagewrap { overflow: hidden; padding: 0; border: 0; border-radius: var(--ng-r); background: var(--ng-card); }
.ngg-stage { position: relative; background: var(--ngg-stage); }
.ngg-box {
  --ngg-ar: 1.7778;
  position: relative; width: min(100%, calc((100svh - var(--ng-top, 56px) - 56px - 76px) * var(--ngg-ar)));
  aspect-ratio: var(--ngg-ar); margin: 0 auto; overflow: hidden; background: var(--ngg-stage); container-type: size;
}
@media (min-width: 768px) { .ngg-box { width: min(100%, calc((100svh - var(--ng-top, 56px) - 56px - 120px) * var(--ngg-ar))); } }
@media (max-height: 520px) and (orientation: landscape) { .ngg-box { width: min(100%, calc((100svh - var(--ng-top, 56px)) * var(--ngg-ar))); } }
.ngg-box iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: var(--ngg-stage); }
@media (max-width: 767px) and (orientation: portrait) {
  .ngg-stage[data-orientation="any"] .ngg-box {
    aspect-ratio: var(--ngg-ar-phone, .5625);
    width: min(100%, calc((100svh - var(--ng-top, 56px) - 56px - 76px) * var(--ngg-ar-phone, .5625)));
  }
}

/* the start screen */
.ngg-start { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; overflow: hidden; background: var(--ngg-stage); color: #fff; text-align: center; }
.ngg-start__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }
.ngg-start::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, hsl(222 30% 6% / .35), hsl(222 30% 6% / .82)); }
.ngg-start__in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 560px; padding: 16px 20px; }
.ngg-start__title { margin: 0; font-size: clamp(20px, 4.2cqw, 32px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: #fff; text-shadow: 0 2px 12px hsl(0 0% 0% / .45); }
.ngg-start__sub {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin: 0; font-size: 14px; line-height: 1.45; opacity: .88;
}
.ngg-playbtn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; margin-top: 4px; padding: 0 30px 0 24px; border: 0; border-radius: 999px;
  background: var(--ng-brand); color: #fff; font-size: 17px; font-weight: 600; cursor: pointer;
  box-shadow: 0 10px 28px hsl(var(--primary) / .45); transition: transform .15s ease, filter .15s ease;
}
.ngg-playbtn .ng-ico { width: 22px; height: 22px; }
.ngg-playbtn:hover { transform: translateY(-1px) scale(1.02); filter: brightness(1.06); }
.ngg-playbtn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ngg-start__note { margin: 0; font-size: 12px; opacity: .75; }
@container (max-height: 250px) {
  .ngg-start__in { gap: 6px; padding: 10px 16px; }
  .ngg-start__sub { -webkit-line-clamp: 1; font-size: 13px; }
  .ngg-playbtn { height: 46px; margin-top: 2px; font-size: 16px; }
}
.ngg-loading { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--ngg-stage); color: hsl(0 0% 100% / .78); font-size: 14px; }
.ngg-spinner { width: 28px; height: 28px; border: 3px solid hsl(0 0% 100% / .18); border-top-color: var(--ng-brand); border-radius: 50%; animation: ngg-spin .8s linear infinite; }
@keyframes ngg-spin { to { transform: rotate(360deg); } }
.ngg-noscript { margin: 0; padding: 12px; text-align: center; }
.ngg-noscript a { color: #fff; font-weight: 600; }

/* the controls hint, over the game for a moment when a desktop run starts */
.ngg-hint {
  position: absolute; left: 12px; right: 12px; bottom: 14px; z-index: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  pointer-events: none; opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease;
}
.ngg-stage.is-hint .ngg-hint { opacity: 1; transform: none; }
.ngg-hint__item { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: hsl(228 30% 8% / .72); color: #fff; font-size: 13px; font-weight: 600; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ngg-hint kbd, .ngg-keys kbd { padding: 3px 8px; border-radius: 8px; font: 600 12px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ngg-hint kbd { background: hsl(0 0% 100% / .16); box-shadow: inset 0 -2px 0 hsl(0 0% 100% / .12); color: #fff; }

/* focus play: the stage over a dimmed, blurred page, as large as the screen allows, with its own bar under it */
html.ngg-lock, html.ngg-lock body { overflow: hidden !important; overscroll-behavior: none; }
.ngg-backdrop {
  position: fixed; inset: 0; z-index: 1040; opacity: 0; pointer-events: none;
  background: hsl(232 35% 5% / .66); -webkit-backdrop-filter: blur(10px) saturate(.85); backdrop-filter: blur(10px) saturate(.85); transition: opacity .35s ease;
}
body.ngg-focus .ngg-backdrop { opacity: 1; pointer-events: auto; }
.ngg-hud { display: none; }
.ngg-stage.is-focus {
  position: fixed; left: 50%; top: 50%; z-index: 1050; display: flex; flex-direction: column; width: max-content; max-width: 96vw;
  overflow: hidden; border-radius: 16px; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px hsl(0 0% 100% / .08), 0 30px 90px hsl(232 60% 3% / .7), 0 0 60px hsl(var(--primary) / .18);
  animation: ngg-rise .5s cubic-bezier(.2, .9, .25, 1) both;
}
@keyframes ngg-rise { from { opacity: 0; transform: translate(-50%, -42%) scale(.9); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.ngg-stage.is-focus .ngg-box { width: min(96vw, calc((100svh - 120px) * var(--ngg-ar))); max-height: calc(100svh - 120px); }
.ngg-stage.is-focus .ngg-hud { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 8px 10px 8px 14px; background: hsl(228 24% 11%); color: #fff; }
.ngg-hud__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; opacity: .85; }
.ngg-hud__sp { flex: 1 1 auto; }
.ngg-hud .ngg-live { background: hsl(var(--primary) / .22); color: #fff; }
.ngg-hud .ngg-live.is-best { background: var(--ng-brand); }
.ngg-hud__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; height: 36px; padding: 0 12px 0 10px; border: 0; border-radius: 999px;
  background: hsl(0 0% 100% / .08); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .15s, opacity .15s;
}
.ngg-hud__btn :is(.fa, .ni) { font-size: 14px; }
.ngg-hud__btn .ng-ico { width: 17px; height: 17px; }
.ngg-hud__btn:hover:not(:disabled) { background: hsl(0 0% 100% / .16); }
.ngg-hud__btn:disabled { opacity: .4; cursor: default; }
.ngg-hud__btn.is-on { background: var(--ng-brand); color: #fff; }
.ngg-hud__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ngg-hud__exit { background: hsl(0 0% 100% / .14); }
@media (max-width: 899px) {
  .ngg-hud__btn { width: 36px; padding: 0; }
  .ngg-hud__btn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
}

/* full screen: the stage takes the screen, the game keeps its shape, the bar floats over the top corner */
.ngg-stage.is-full {
  position: fixed; inset: 0; z-index: 1060; display: flex; align-items: center; justify-content: center; width: auto; max-width: none;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
  border-radius: 0; transform: none; animation: none; box-shadow: none; background: #000; touch-action: none;
}
.ngg-stage.is-full .ngg-box { width: min(100%, calc(100svh * var(--ngg-ar))); max-height: 100%; }
.ngg-stage[data-orientation="any"].is-full .ngg-box { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; }
.ngg-stage.is-full .ngg-hud {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 8px); right: calc(env(safe-area-inset-right, 0px) + 8px); z-index: 6;
  display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px; background: hsl(228 30% 8% / .55); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ngg-stage.is-full .ngg-hud__title, .ngg-stage.is-full .ngg-hud__sp, .ngg-stage.is-full .ngg-hud .ngg-live__lbl, .ngg-stage.is-full .ngg-hud .ngg-live__bar { display: none; }
.ngg-stage.is-full .ngg-hud__btn { width: 36px; padding: 0; background: transparent; }
.ngg-stage.is-full .ngg-hud__btn.is-on { background: var(--ng-brand); }
.ngg-stage.is-full .ngg-hud__btn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.ngg-stage.is-full .ngg-hud__full { display: none; }
.ngg-stage.is-full:not(.is-focus) .ngg-hud__exit { display: none; }
.ngg-stage.is-full:not(.is-focus) .ngg-hud__full { display: inline-flex; }
.ngg-turn { display: none; }
@media (orientation: portrait) and (max-width: 767px) {
  .ngg-stage.is-full .ngg-turn {
    position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); z-index: 6; display: inline-flex; align-items: center; gap: 8px;
    width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 8px 14px; border-radius: 999px; transform: translateX(-50%); pointer-events: none;
    background: hsl(228 30% 8% / .7); color: #fff; font-size: 13px; font-weight: 600;
  }
  .ngg-turn :is(.fa, .ni) { color: var(--ng-brand); transform: rotate(90deg); }
}
@media (prefers-reduced-motion: reduce) {
  .ngg-stage.is-focus { animation: none; }
  .ngg-backdrop, .ngg-hint, .ngg-playbtn { transition: none; }
  .ngg-playbtn:hover { transform: none; }
}

/* the control strip under the stage: small 30px pills */
.ngg-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; }
@media (min-width: 768px) { .ngg-strip { padding: 12px 16px; } }
.ngg-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 10px; border: 0; border-radius: 999px;
  background: var(--ng-fill); color: var(--ng-ink-strong); font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .15s, opacity .15s;
}
.ngg-chip :is(.fa, .ni) { font-size: 12.5px; }
.ngg-chip:hover:not(:disabled) { background: var(--ng-fill-2); }
.ngg-chip:disabled { opacity: .45; cursor: default; }
.ngg-chip.is-on { background: var(--ng-brand); color: #fff; }
.ngg-strip__plays { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; font-size: 12.5px; color: var(--ng-sub); font-variant-numeric: tabular-nums; }
.ngg-strip__plays .ng-ico { width: 14px; height: 14px; color: var(--ng-brand); }
.ngg-rotate { display: none; align-items: center; gap: 6px; flex: 1 1 100%; margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ng-sub); }
.ngg-rotate :is(.fa, .ni) { color: var(--ng-brand); transform: rotate(90deg); }
@media (max-width: 767px) and (orientation: portrait) { .ngg-rotate { display: flex; } }
.ngg-note { flex: 1 1 100%; margin: 0; font-size: 13px; font-weight: 600; color: var(--ng-brand); }
.ngg-note.is-error { color: hsl(var(--destructive)); }

/* the cards under the stage */
.ngg-info { display: flex; flex-direction: column; gap: var(--ngg-gap); min-width: 0; }
.ngg-col { display: flex; flex-direction: column; gap: var(--ngg-gap); min-width: 0; }
@media (max-width: 1023.98px) {
  .ngg-col { display: contents; }
  .ngg-info > .ngg-col > * { order: 3; }
  .ngg-info > .ngg-col > .ngg-head { order: 1; }
  .ngg-info > .ngg-col > .ngg-score { order: 2; }
}
@media (min-width: 1024px) { .ngg-info { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; } }
.ngg .ngg-card { margin: 0; padding: 16px; border: 0; border-radius: var(--ng-r); background: var(--ng-card); min-width: 0; }
@media (min-width: 768px) { .ngg .ngg-card { padding: 18px 20px; } }
.ngg-card__title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--ng-ink-strong); }
.ngg-card__title .ng-ico { width: 18px; height: 18px; color: var(--ng-brand); }
.ngg-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.ngg-head__title { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; color: var(--ng-ink-strong); }
@media (min-width: 768px) { .ngg-head__title { font-size: 26px; } }
.ngg-head__tag { margin: 6px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ng-sub); }
.ngg-head__desc { margin: 10px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--ng-ink); }
.ngg-head__stats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: 13px; color: var(--ng-sub); }
.ngg-head__stats > span { display: inline-flex; align-items: center; gap: 6px; }
.ngg-head__stats b { color: var(--ng-ink-strong); font-weight: 700; font-variant-numeric: tabular-nums; }
.ngg-head__stats .ng-ico { width: 15px; height: 15px; color: var(--ng-brand); }

.ngg-steps { counter-reset: ngg-step; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ngg-steps li { counter-increment: ngg-step; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; font-size: 14px; line-height: 1.5; color: var(--ng-ink); }
.ngg-steps li::before {
  content: counter(ngg-step); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ng-tile); color: var(--ng-brand); font-size: 12px; font-weight: 600;
}
.ngg-keys { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .ngg-keys { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; } }
.ngg-keys li { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13.5px; line-height: 1.4; }
.ngg-keys kbd { flex: 0 0 auto; max-width: 55%; padding: 4px 9px; background: var(--ng-fill); box-shadow: inset 0 -2px 0 var(--ng-line); color: var(--ng-ink-strong); white-space: normal; }
.ngg-keys span { min-width: 0; color: var(--ng-sub); }

.ngg-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ngg-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--ng-fill); }
.ngg-stat__lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ng-sub); }
.ngg-stat__val { overflow: hidden; text-overflow: ellipsis; font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--ng-ink-strong); }
.ngg-stat--best { background: var(--ng-tile); }
.ngg-stat--best .ngg-stat__val { color: var(--ng-brand); }
.ngg-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 13.5px; }
.ngg-facts dt { font-weight: 400; color: var(--ng-sub); }
.ngg-facts dd { margin: 0; font-weight: 600; color: var(--ng-ink-strong); overflow-wrap: anywhere; }
.ngg-facts--rec { margin-top: 12px; }
.ngg-muted { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--ng-sub); }
.ngg-muted a { color: var(--ng-brand); font-weight: 600; text-decoration: none; }
.ngg-attr { padding-top: 12px; border-top: 1px solid var(--ng-line); }
.ngg-attr a { margin-left: 4px; }
.ngg-play .ngm-sec { margin-top: 4px; }
