/* ============================================================
   GameRoch — Achievements: the trophy room (V3 Live Update 1, prefix nxt-)

   Built on the nx- kit (css/next.css). The kit draws the medal; this file
   STAGES it: a cabinet of dark glass inside the screen's one loud panel, a
   lamp and a beam of light over every medal that has been won, the glow of
   its own metal behind it, a glass shelf and the medal's reflection in it.
   What has not been won stands in the dark as a quiet outline.

   Everything that belongs to the THEME uses the theme tokens. Only the metals
   are fixed colours, because a metal means the same thing in every theme.

   Layout follows the SHELL's width (container gr-shell), never the window's.
   The one entrance moment — the medals settling onto the shelf, light crossing
   the glass — is removed under [data-motion=off] and prefers-reduced-motion
   (end of file), and what is left is the same room, fully lit and still.
   ============================================================ */

#gr-complete .nxt {
  --nxt-diamond: #5fd4ff;
  --nxt-platinum: #dbe6f6;
  --nxt-gold: #ffcc44;
  --nxt-bronze: #d98a4e;
  --nxt-silver: #a9b6c8;
  --nxt-crystal: #8fa6ff;
  display: flex; flex-direction: column; min-width: 0;
}
#gr-complete .nxt > * { margin: 0; }
#gr-complete .nxt > * + * { margin-top: var(--nx-gap); }
#gr-complete .nxt > .nx-sect { margin-top: 30px; }
#gr-complete .nxt > .nx-sect + * { margin-top: 14px; }
/* resets carry no weight of their own (:where), so every rule below can still set these */
#gr-complete .nxt :where(ol), #gr-complete .nxt :where(ul) { list-style: none; margin: 0; padding: 0; }
#gr-complete .nxt :where(p), #gr-complete .nxt :where(dl), #gr-complete .nxt :where(dd) { margin: 0; }
/* every control here is a full touch target, at any width (the shell's own minimum is 42px above phone size) */
#gr-complete .nxt button { min-height: 44px; }

/* ---------- the hero: who, how many, and the cabinet ---------- */
#gr-complete .nxt-hero { display: grid; gap: 18px; padding: 24px 28px 22px; }
/* The room is dimmed so the metals are the brightest things in it — and so white
   text holds its contrast where a theme's gradient turns light. */
#gr-complete .nxt-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, #00000029 0%, #0000004d 100%);
}

#gr-complete .nxt-who { display: flex; align-items: center; gap: 16px; min-width: 0; }
#gr-complete .nxt-who-face { display: inline-grid; flex: none; }
#gr-complete .nxt-who-face .nx-face { box-shadow: 0 0 0 3px #ffffffe6, 0 12px 22px -10px #000000b3; }
#gr-complete .nxt-who-id { display: grid; gap: 7px; min-width: 0; }
#gr-complete .nxt-hero h1 { display: grid; gap: 3px; min-width: 0; color: #fff; font: inherit; letter-spacing: 0; }
#gr-complete .nxt-eyebrow {
  color: #fff; font: 700 11.5px/1.2 'DM Sans', sans-serif; letter-spacing: .1em; text-transform: uppercase;
}
#gr-complete .nxt-name {
  color: #fff; font: 800 clamp(26px, 2.6cqi, 34px)/1.08 Outfit, 'DM Sans', sans-serif; letter-spacing: -.02em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere;
}
#gr-complete .nxt-rank { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: #fff; font-size: 13.5px; font-weight: 600; }
#gr-complete .nxt-title { padding: 3px 10px; border-radius: 99px; background: #00000040; font-weight: 700; font-size: 12.5px; }
#gr-complete .nxt-div { display: inline-flex; align-items: center; gap: 6px; }

#gr-complete .nxt-totals { display: flex; gap: 12px; margin-inline-start: auto; flex: none; }
#gr-complete .nxt-total {
  min-width: 108px; padding: 10px 16px; border-radius: 16px;
  background: #00000033; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.25;
}
#gr-complete .nxt-total b {
  display: block; font: 800 34px/1 Outfit, 'DM Sans', sans-serif; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  margin-bottom: 3px;
}
#gr-complete .nxt-total.is-none { display: grid; align-content: center; font: 700 15px/1.25 Outfit, 'DM Sans', sans-serif; }

/* ---------- the cabinet ---------- */
#gr-complete .nxt-cab {
  --nxt-m: 196px;                            /* a medal's width; its box is 1.1 times as tall */
  --nxt-top: 30px;                           /* from the cabinet's top to the top of a medal */
  --nxt-floor: calc(var(--nxt-top) + var(--nxt-m) * .983);   /* where a medal touches the shelf */
  position: relative; overflow: hidden; isolation: isolate; border-radius: calc(var(--nx-r) + 2px);
  /* the back wall: dark, and darker towards its corners */
  background:
    radial-gradient(120% 95% at 50% 30%, transparent 42%, #0000004d 100%),
    linear-gradient(180deg, #0000008f 0%, #00000057 100%);
  box-shadow: inset 0 1px 0 #ffffff26, inset 0 0 0 1px #ffffff14, inset 0 30px 40px -30px #000000cc;
}
/* the cabinet's glass door: a still sheen across one corner */
#gr-complete .nxt-cab::before {
  content: ""; position: absolute; z-index: 3; inset: 0; pointer-events: none;
  background: linear-gradient(112deg, #ffffff1c 0%, #ffffff0a 13%, #fff0 13.2%, #fff0 19%, #ffffff0d 19.2%, #fff0 27%);
}
#gr-complete .nxt-bays {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 980px; margin-inline: auto; padding: var(--nxt-top) 18px 20px;
}
#gr-complete .nxt-bay { position: relative; display: grid; justify-items: center; align-content: start; min-width: 0; }

/* the glass shelf, seen a little from above: its back edge catches the light,
   its surface is brighter than the wall, its front edge closes the cabinet */
#gr-complete .nxt-shelf {
  position: absolute; inset-inline: 0; top: var(--nxt-floor); bottom: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, #ffffffa6 14%, #fffffff2 50%, #ffffffa6 86%, transparent 100%) top / 100% 1.5px no-repeat,
    linear-gradient(180deg, #ffffff3d 0%, #ffffff1a 36%, #ffffff12 100%);
}
#gr-complete .nxt-shelf::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 6px;
  background: linear-gradient(180deg, #ffffff99 0, #ffffff99 1px, #ffffff33 1px, #ffffff14 100%);
}

/* the lamp over a bay — lit only where a medal has been won */
#gr-complete .nxt-bay::before {
  content: ""; position: absolute; z-index: 3; top: calc(var(--nxt-top) * -1); inset-inline: 0; margin-inline: auto;
  width: 58px; height: 5px; border-radius: 0 0 8px 8px; background: #ffffff33;
}
#gr-complete .nxt-bay.is-won::before { background: #fff; box-shadow: 0 0 12px 2px #ffffffb3, 0 0 34px 10px #ffffff47; }
/* …its light on the wall behind the medal, with a faint beam down from the lamp… */
#gr-complete .nxt-bay-light {
  position: absolute; top: calc(var(--nxt-top) * -1); inset-inline: -10%; height: calc(var(--nxt-top) + var(--nxt-m) * .99);
  pointer-events: none; opacity: 0;
  background:
    radial-gradient(ellipse 34% 52% at 50% 56%, #ffffff3d 0%, #ffffff1f 44%, #fff0 78%),
    conic-gradient(from 138deg at 50% 0%, #fff0 0deg, #ffffff1a 16deg, #ffffff47 42deg, #ffffff1a 68deg, #fff0 84deg, #fff0 360deg);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 70%, #0000 100%); mask-image: linear-gradient(180deg, #000 0%, #000 70%, #0000 100%);
}
#gr-complete .nxt-bay.is-won .nxt-bay-light { opacity: 1; }
/* …and the pool it makes on the shelf */
#gr-complete .nxt-bay.is-won::after {
  content: ""; position: absolute; top: calc(var(--nxt-m) * .983); inset-inline: 6%; height: calc(var(--nxt-m) * .2);
  pointer-events: none;
  background: radial-gradient(ellipse 50% 100% at 50% 0%, #ffffff66 0%, #ffffff24 46%, transparent 76%);
}

/* the medal itself, with the glow of its own metal behind it */
#gr-complete .nxt-bay-obj { position: relative; z-index: 2; display: grid; justify-items: center; width: 100%; }
#gr-complete .nxt-bay .nx-medal { width: var(--nxt-m); }
/* a lit medal leans towards the pointer (trophy.js sets the two angles while it is over the cabinet) */
#gr-complete .nxt-bay.is-won .nx-medal svg { transform: rotateY(var(--nxt-ry, -14deg)) rotateX(var(--nxt-rx, 6deg)); }
#gr-complete .nxt-bay.is-won .nxt-bay-obj .nx-medal:hover svg { transform: rotateY(var(--nxt-ry, 10deg)) rotateX(var(--nxt-rx, -4deg)) scale(1.04); }
#gr-complete .nxt-bay.is-won .nxt-bay-obj::before {
  content: ""; position: absolute; z-index: -1; top: 4%; inset-inline: -40%; margin-inline: auto;
  width: calc(var(--nxt-m) * 1.3); aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, var(--nxt-glow) 0%, transparent 72%); opacity: .55;
}
/* …and one glint where the lamp catches its rim */
#gr-complete .nxt-bay.is-won .nxt-bay-obj::after {
  content: ""; position: absolute; z-index: 1; top: calc(var(--nxt-m) * .26); inset-inline: 0; margin-inline: auto;
  width: calc(var(--nxt-m) * .2); aspect-ratio: 1; translate: calc(var(--nxt-m) * .27) 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 7% at 50% 50%, #fff 0%, #fff0 100%),
    radial-gradient(ellipse 7% 50% at 50% 50%, #fff 0%, #fff0 100%),
    radial-gradient(circle at 50% 50%, #ffffffd9 0%, #fff0 26%);
}
#gr-complete .nxt-bay.is-diamond { --nxt-glow: var(--nxt-diamond); }
#gr-complete .nxt-bay.is-platinum { --nxt-glow: var(--nxt-platinum); }
#gr-complete .nxt-bay.is-gold { --nxt-glow: var(--nxt-gold); }
/* a medal not won yet stands unlit: a faint shape, and a dashed ring where it will hang */
#gr-complete .nxt-bay.is-locked .nx-medal svg { filter: grayscale(1) brightness(1.7) contrast(.7) opacity(.22); }
#gr-complete .nxt-bay.is-locked .nxt-bay-obj::after {
  content: ""; position: absolute; top: calc(var(--nxt-m) * .192); inset-inline: 0; margin-inline: auto;
  width: calc(var(--nxt-m) * .783); aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  border: 1.5px dashed #ffffff7a;
}

/* its reflection in the glass: the same medal, turned over and fading */
#gr-complete .nxt-bay-refl {
  position: relative; z-index: 1; display: grid; justify-items: center; width: 100%; overflow: hidden; pointer-events: none;
  height: calc(var(--nxt-m) * .3); margin-top: calc(var(--nxt-m) * -.117);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #0000 96%); mask-image: linear-gradient(180deg, #000 0%, #0000 96%);
  opacity: .42;
}
#gr-complete .nxt-bay-refl .nx-medal { transform: scaleY(-1); margin-top: calc(var(--nxt-m) * -.117); }
#gr-complete .nxt-bay-refl .nx-medal svg { filter: blur(.7px); }
#gr-complete .nxt-bay-refl .nx-medal-shadow { display: none; }

/* the plate lying on the shelf in front of it: the metal, how many, the place it stands for */
#gr-complete .nxt-bay-plate {
  position: relative; z-index: 2; display: grid; justify-items: center; gap: 3px; text-align: center; color: #fff;
  margin-top: calc(var(--nxt-m) * -.06); padding-inline: 6px; max-width: 100%;
}
#gr-complete .nxt-bay-top { display: inline-flex; align-items: baseline; gap: 9px; white-space: nowrap; }
#gr-complete .nxt-bay-name { font: 700 18px/1.15 Outfit, 'DM Sans', sans-serif; letter-spacing: -.01em; }
#gr-complete .nxt-bay-count {
  font: 800 26px/1 Outfit, 'DM Sans', sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px color-mix(in srgb, var(--nxt-glow) 80%, transparent);
}
#gr-complete .nxt-bay-place { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
#gr-complete .nxt-bay-how { font-size: 13px; line-height: 1.35; font-weight: 500; max-width: 24ch; }
/* where there is room, a medal not won yet says how to win it; its place label is for narrow screens */
#gr-complete .nxt-bay.is-locked .nxt-bay-place { display: none; }

/* new since the player was last here: a small gold tag, the one thing in the room that calls out */
#gr-complete .nxt .nx-pill.nxt-new {
  gap: 4px; padding: 3px 9px 3px 7px; font-weight: 800; color: #3a2500;
  background: linear-gradient(180deg, #ffe88f 0%, #ffcb3d 100%); box-shadow: 0 0 0 1px #b96d0040, 0 4px 10px -4px #b96d0099;
}
#gr-complete .nxt .nx-pill.nxt-new svg { width: 12px; height: 12px; }
#gr-complete .nxt-bay-plate .nxt-new { margin-top: 6px; }

/* light crossing the cabinet's glass — drawn only during the entrance */
#gr-complete .nxt-glint {
  position: absolute; z-index: 3; inset-block: 0; inset-inline-start: 0; width: 30%; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent 0%, #ffffff29 40%, #ffffff5c 50%, #ffffff29 60%, transparent 100%);
  transform: translateX(-130%) skewX(-16deg);
}

#gr-complete .nxt-hero-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
#gr-complete .nxt-hero .nxt-hero-line { color: #fff; font-size: 15px; font-weight: 500; line-height: 1.4; }
#gr-complete .nxt-hero .gr-play.nxt-go {
  min-height: 48px; padding: 11px 20px; border-radius: 14px; gap: 9px;
  font: 800 15px/1.2 Outfit, 'DM Sans', sans-serif;
  background: #fff; color: var(--gr-hero); border-bottom-color: #0000002e; box-shadow: 0 14px 26px -12px #000000a6;
}
#gr-complete .nxt-hero .gr-play.nxt-go:hover { background: #fff; filter: brightness(.97); }
#gr-complete .nxt-hero .gr-soft.nxt-go {
  min-height: 46px; padding: 10px 18px; border-radius: 14px; gap: 9px;
  font: 700 14px/1.2 Outfit, 'DM Sans', sans-serif;
  background: #ffffff1f; border: 1px solid #ffffff66; color: #fff;
}
#gr-complete .nxt-hero .gr-soft.nxt-go:hover { background: #ffffff33; border-color: #fff; }
/* the theme's own focus ring is the hero's colour: on the hero it is white */
#gr-complete .nxt-hero button:focus-visible { outline-color: #fff; }

/* ---------- the badge emblem: one hexagon, four metals, and its outline ---------- */
#gr-complete .nxt-emb {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--nxt-emb, 56px); height: var(--nxt-emb, 56px);
}
#gr-complete .nxt-emb-shape {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  filter: drop-shadow(0 calc(var(--nxt-emb, 56px) * .05) calc(var(--nxt-emb, 56px) * .06) #0000003b);
}
/* the family's icon, pressed into the face: dark metal with a lit lower edge */
#gr-complete .nxt-emb > [data-lucide] {
  position: relative; width: 42%; height: 42%; stroke-width: 2.2; color: var(--nxt-ink, var(--gr-sub));
  filter: drop-shadow(0 1px 0 #ffffff99);
}
#gr-complete .nxt-emb.is-bronze { --nxt-ink: #5c300f; --nxt-tone: var(--nxt-bronze); }
#gr-complete .nxt-emb.is-silver { --nxt-ink: #3a4656; --nxt-tone: var(--nxt-silver); }
#gr-complete .nxt-emb.is-gold { --nxt-ink: #684100; --nxt-tone: var(--nxt-gold); }
#gr-complete .nxt-emb.is-crystal { --nxt-ink: #33208f; --nxt-tone: var(--nxt-crystal); }
/* not earned yet: the same emblem as a quiet outline, with a hint of the metal that is waiting */
#gr-complete .nxt-emb.is-ghost .nxt-emb-shape { filter: none; }
#gr-complete .nxt-emb-out {
  fill: color-mix(in srgb, var(--nxt-tone, var(--gr-sub)) 9%, transparent);
  stroke: color-mix(in srgb, var(--nxt-tone, var(--gr-sub)) 62%, var(--gr-sub));
  stroke-width: 2.2; stroke-linejoin: round; stroke-dasharray: 5.2 4.4; stroke-linecap: round;
}
#gr-complete .nxt-emb-in {
  fill: none; stroke: color-mix(in srgb, var(--nxt-tone, var(--gr-sub)) 40%, transparent);
  stroke-width: 1.3; stroke-linejoin: round;
}
#gr-complete .nxt-emb.is-ghost > [data-lucide] {
  color: color-mix(in srgb, var(--nxt-tone, var(--gr-sub)) 45%, var(--gr-sub)); filter: none; stroke-width: 2;
}

/* ---------- progress: the level dots, the bar, the numbers ---------- */
#gr-complete .nxt-lvl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; }
#gr-complete .nxt-lvl-t { color: var(--gr-sub); font-size: 12.5px; font-weight: 600; }
#gr-complete .nxt-dots { display: inline-flex; align-items: center; gap: 6px; }
#gr-complete .nxt-dot {
  width: 11px; height: 11px; border-radius: 50%; flex: none;
  border: 1.5px solid color-mix(in srgb, var(--gr-sub) 60%, transparent);
}
#gr-complete .nxt-dot.is-on { border-color: #0000002e; box-shadow: inset 0 1px 0 #ffffffb3; }
#gr-complete .nxt-dot.is-bronze { background: linear-gradient(135deg, #f3b780, #c0733a); }
#gr-complete .nxt-dot.is-silver { background: linear-gradient(135deg, #f1f5f9, #9facbd); }
#gr-complete .nxt-dot.is-gold { background: linear-gradient(135deg, #ffe27a, #e7a300); }
#gr-complete .nxt-dot.is-crystal { background: linear-gradient(135deg, #b6f0ff, #7d6bff); }
#gr-complete .nxt-prog { display: grid; gap: 6px; min-width: 0; }
#gr-complete .nxt-nums {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px;
  color: var(--gr-sub); font-size: 13px; line-height: 1.3; font-variant-numeric: tabular-nums;
}
#gr-complete .nxt-nums b { color: var(--gr-ink); font-weight: 700; }
#gr-complete .nxt-prog.is-done { justify-items: start; }
#gr-complete .nxt-done {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 99px;
  background: var(--nx-good-soft); color: var(--nx-good); font-size: 13px; font-weight: 700; line-height: 1.3;
}
#gr-complete .nxt-done svg { width: 15px; height: 15px; }
#gr-complete .nxt-note { display: inline-flex; align-items: center; gap: 6px; color: var(--gr-sub); font-size: 12.5px; line-height: 1.3; }
#gr-complete .nxt-note svg { width: 14px; height: 14px; flex: none; }

/* ---------- Next up: one card, one thing to chase ---------- */
#gr-complete .nxt-next {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px 22px; padding: 20px 24px;
  border-color: color-mix(in srgb, var(--gr-blue) 34%, var(--gr-line));
}
#gr-complete .nxt-next-emb {
  display: grid; place-items: center; width: 112px; height: 112px; border-radius: 26px;
  background: var(--gr-tint);
}
#gr-complete .nxt-next-body { display: grid; gap: 5px; min-width: 0; }
#gr-complete .nxt-next-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
#gr-complete .nxt-next-level { color: var(--gr-sub); font-size: 13px; font-weight: 600; }
#gr-complete .nxt-next h2 { font: 800 22px/1.15 Outfit, 'DM Sans', sans-serif; letter-spacing: -.02em; }
#gr-complete .nxt-next-goal { color: var(--gr-ink); font-size: 15px; line-height: 1.4; }
#gr-complete .nxt-next .nxt-prog { margin-top: 8px; max-width: 560px; }
#gr-complete .nxt-next .nx-bar { height: 12px; }
#gr-complete .nxt-next-act .gr-play { min-height: 48px; padding: 12px 20px; font-size: 15px; white-space: nowrap; }
#gr-complete .nxt-next.is-done { grid-template-columns: auto minmax(0, 1fr); }
#gr-complete .nxt-next.is-done .nxt-next-emb { background: color-mix(in srgb, var(--nxt-crystal) 16%, transparent); }

/* ---------- Your medals: one small case per medal won ---------- */
#gr-complete .nxt-wons { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: var(--nx-gap); }
#gr-complete .nxt-wons > li, #gr-complete .nxt-badges > li { display: grid; min-width: 0; }
#gr-complete button.nxt-won {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: stretch; align-content: start; gap: 0;
  width: 100%; padding: 0; overflow: hidden; text-align: start; color: var(--gr-ink);
}
#gr-complete button.nxt-won:hover, #gr-complete button.nxt-badge:hover {
  border-color: color-mix(in srgb, var(--gr-blue) 55%, var(--gr-line)); transform: translateY(-2px);
  box-shadow: 0 14px 26px -16px color-mix(in srgb, var(--gr-ink) 45%, transparent);
}
/* the well the medal stands in: the theme's own tint, the metal's light on the wall, a shelf under it */
#gr-complete .nxt-won-medal {
  --nxt-w: 104px;
  position: relative; display: grid; place-items: center; padding: 16px 0 12px; overflow: hidden;
  background:
    radial-gradient(54% 64% at 50% 44%, color-mix(in srgb, var(--nxt-glow) 46%, transparent) 0%, transparent 74%),
    var(--gr-tint);
  border-bottom: 1px solid var(--gr-line);
}
#gr-complete .nxt-won-medal::after {
  content: ""; position: absolute; inset-inline: 0; top: calc(16px + var(--nxt-w) * .983); bottom: 0;
  background: color-mix(in srgb, var(--gr-ink) 7%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--gr-panel) 80%, transparent);
}
#gr-complete .nxt-won .nx-medal { width: var(--nxt-w); z-index: 1; }
#gr-complete .nxt-won-medal .nxt-new { position: absolute; z-index: 2; top: 10px; inset-inline-end: 10px; }
#gr-complete .nxt-won.is-diamond { --nxt-glow: var(--nxt-diamond); }
#gr-complete .nxt-won.is-platinum { --nxt-glow: var(--nxt-silver); }
#gr-complete .nxt-won.is-gold { --nxt-glow: var(--nxt-gold); }
#gr-complete .nxt-won:hover .nx-medal svg { transform: rotateY(10deg) rotateX(-4deg) scale(1.04); }
#gr-complete .nxt-won-body { display: grid; gap: 5px; padding: 14px 16px 16px; padding-inline-end: 40px; min-width: 0; }
#gr-complete .nxt-won-game { display: flex; align-items: center; gap: 10px; min-width: 0; }
#gr-complete .nxt-won-game img, #gr-complete .nxt-one-game img, #gr-complete .nxt-noart {
  width: 34px; height: 34px; border-radius: 10px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px #00000014;
}
#gr-complete .nxt-noart { display: inline-grid; place-items: center; background: var(--gr-tint); color: var(--gr-blue); }
#gr-complete .nxt-won-game b { font: 700 16.5px/1.2 Outfit, 'DM Sans', sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#gr-complete .nxt-won-facts { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 14px; font-weight: 600; }
#gr-complete .nxt-won-score::before { content: "·"; margin-inline-end: 8px; color: var(--gr-sub); }
#gr-complete .nxt-won-week { color: var(--gr-sub); font-size: 13px; }
#gr-complete .nxt-chev { position: absolute; inset-inline-end: 12px; bottom: 16px; display: inline-grid; color: var(--gr-sub); }
#gr-complete .nxt-chev svg { width: 18px; height: 18px; }

#gr-complete .nxt > .nxt-more { display: flex; justify-content: center; margin-top: 14px; }
#gr-complete .nxt-more .gr-soft { min-height: 44px; padding: 10px 18px; font-size: 14px; }
#gr-complete .nxt-more svg { width: 17px; height: 17px; }

/* no medal yet: three outlines and how to win one */
#gr-complete .nxt-none { display: grid; justify-items: center; gap: 8px; padding: 26px 20px 24px; text-align: center; }
#gr-complete .nxt-none-row { display: flex; gap: 18px; margin-bottom: 4px; }
#gr-complete .nxt-none h3 { font: 700 19px/1.2 Outfit, 'DM Sans', sans-serif; }
#gr-complete .nxt-none p { color: var(--gr-sub); font-size: 14.5px; max-width: 52ch; margin-bottom: 8px; }

/* ---------- Badges: nine families, each at its level ---------- */
#gr-complete .nxt-sect-n { color: var(--gr-sub); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
#gr-complete .nxt-sect-n b { color: var(--gr-ink); font: 800 22px/1 Outfit, 'DM Sans', sans-serif; letter-spacing: -.02em; }
#gr-complete .nxt-badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--nx-gap); }
#gr-complete button.nxt-badge {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; justify-items: stretch; gap: 14px;
  width: 100%; padding: 16px; text-align: start; color: var(--gr-ink);
}
#gr-complete .nxt-badge-emb { display: grid; place-items: center; }
#gr-complete .nxt-badge-body { display: grid; gap: 7px; min-width: 0; }
#gr-complete .nxt-badge-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 22px; }
#gr-complete .nxt-badge-name { font: 700 17px/1.2 Outfit, 'DM Sans', sans-serif; letter-spacing: -.01em; }
#gr-complete .nxt-badge-goal { color: var(--gr-sub); font-size: 13.5px; line-height: 1.35; }
#gr-complete .nxt-badge-goal b { color: var(--gr-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
#gr-complete .nxt-badge.is-next { border-color: color-mix(in srgb, var(--gr-blue) 45%, var(--gr-line)); }
/* a finished family glows in its top metal */
#gr-complete .nxt-badge.is-complete .nxt-emb-shape {
  filter: drop-shadow(0 3px 4px #0000003b) drop-shadow(0 0 10px color-mix(in srgb, var(--nxt-tone) 75%, transparent));
}

/* ---------- a detail page ---------- */
#gr-complete .nxt .gr-link.nxt-back { align-self: flex-start; min-height: 44px; padding-block: 8px; padding-inline: 6px 10px; gap: 6px; font-size: 14px; }
#gr-complete .nxt .gr-link.nxt-back svg { width: 17px; height: 17px; }
#gr-complete .nxt-one { grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); align-items: center; gap: 22px 36px; padding: 26px 30px; }
#gr-complete .nxt-cab.is-solo { --nxt-m: 250px; --nxt-top: 30px; padding: var(--nxt-top) 12px 0; height: calc(var(--nxt-top) + var(--nxt-m) * 1.36); }
#gr-complete .nxt-one-copy { display: grid; justify-items: start; gap: 12px; min-width: 0; }
#gr-complete .nxt-one h1 { font: 800 clamp(28px, 3.1cqi, 42px)/1.05 Outfit, 'DM Sans', sans-serif; letter-spacing: -.02em; }
#gr-complete .nxt-one-game { display: inline-flex; align-items: center; gap: 10px; color: #fff; font: 700 18px/1.2 Outfit, 'DM Sans', sans-serif; }
#gr-complete .nxt-facts { display: flex; flex-wrap: wrap; gap: 10px; }
#gr-complete .nxt-facts > div { display: grid; gap: 2px; padding: 10px 16px; border-radius: 16px; background: #00000038; min-width: 104px; }
#gr-complete .nxt-facts dt { color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
#gr-complete .nxt-facts dd { color: #fff; font: 800 26px/1.1 Outfit, 'DM Sans', sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
#gr-complete .nxt-kept { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 15px; font-weight: 600; }
#gr-complete .nxt-kept svg { width: 18px; height: 18px; flex: none; }
#gr-complete .nxt-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

/* a badge family: its emblem on a lit plinth, then its levels */
#gr-complete .nxt-plinth {
  position: relative; overflow: hidden; display: grid; place-items: center; min-height: 250px; border-radius: calc(var(--nx-r) + 2px);
  background: linear-gradient(180deg, #00000075 0%, #00000042 52%, #00000061 100%);
  box-shadow: inset 0 1px 0 #ffffff26, inset 0 0 0 1px #ffffff14, inset 0 34px 44px -34px #000000cc;
  --nxt-top: 0px; --nxt-m: 240px;
}
#gr-complete .nxt-plinth .nxt-bay-light { opacity: 1; inset-inline: 12%; top: 0; height: 100%; }
#gr-complete .nxt-one.is-new .nxt-plinth .nxt-bay-light { opacity: 0; }
#gr-complete .nxt-plinth .nxt-emb-shape {
  filter: drop-shadow(0 10px 12px #00000059) drop-shadow(0 0 26px color-mix(in srgb, var(--nxt-tone) 60%, transparent));
}
#gr-complete .nxt-plinth .nxt-emb.is-ghost { --nxt-tone: #ffffff; }
#gr-complete .nxt-plinth .nxt-emb.is-ghost .nxt-emb-shape { filter: none; }
#gr-complete .nxt-plinth .nxt-emb.is-ghost .nxt-emb-out { stroke: #ffffffb3; fill: #ffffff0f; }
#gr-complete .nxt-plinth .nxt-emb.is-ghost .nxt-emb-in { stroke: #ffffff59; }
#gr-complete .nxt-plinth .nxt-emb.is-ghost > [data-lucide] { color: #ffffffd9; }
#gr-complete .nxt-one .nxt-eyebrow { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; }
/* the dot belongs to the END of the first part, so a line that has to break never begins with it */
#gr-complete .nxt-one .nxt-eyebrow > span:first-child::after { content: "·"; margin-inline-start: 8px; }
#gr-complete .nxt-one .nxt-one-about { color: #fff; font-size: 16px; line-height: 1.45; max-width: 46ch; }
#gr-complete .nxt-one .nxt-one-count { display: grid; gap: 4px; color: #fff; font: 600 16px/1.3 'DM Sans', sans-serif; }
#gr-complete .nxt-one-count b { font: 800 clamp(44px, 5cqi, 60px)/1 Outfit, 'DM Sans', sans-serif; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
#gr-complete .nxt-one .nxt-note { color: #fff; font-size: 13.5px; font-weight: 500; }

#gr-complete .nxt-levels { display: grid; gap: 10px; }
#gr-complete .nxt-level { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 16px; padding: 14px 18px; }
#gr-complete .nxt-level-id { display: grid; gap: 4px; min-width: 0; }
#gr-complete .nxt-level-n { color: var(--gr-sub); font-size: 12.5px; font-weight: 700; letter-spacing: .04em; }
#gr-complete .nxt-level h3 { font: 700 17px/1.25 Outfit, 'DM Sans', sans-serif; letter-spacing: -.01em; }
#gr-complete .nxt-level .nxt-prog { margin-top: 6px; max-width: 460px; }
#gr-complete .nxt-level-state { display: inline-flex; align-items: center; gap: 6px; color: var(--gr-sub); font-size: 14px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
#gr-complete .nxt-level-state.is-earned { color: var(--nx-good); padding: 5px 12px; border-radius: 99px; background: var(--nx-good-soft); }
#gr-complete .nxt-level-state svg { width: 16px; height: 16px; }
#gr-complete .nxt-level.is-current { border-color: color-mix(in srgb, var(--gr-blue) 45%, var(--gr-line)); }
#gr-complete .nxt-level.is-current .nxt-level-state { color: var(--gr-ink); }

/* ---------- loading ---------- */
#gr-complete .nxt-sk-hero > span { height: 430px; border-radius: calc(var(--nx-r) + 4px); }
#gr-complete .nxt-sk-next > span { height: 152px; border-radius: var(--nx-r); }
#gr-complete .nxt-sk-wons { grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: var(--nx-gap); }
#gr-complete .nxt-sk-wons > span { height: 212px; border-radius: var(--nx-r); }
#gr-complete .nxt-sk-rows > span { height: 84px; border-radius: var(--nx-r); }

/* ---------- narrower shells ---------- */
@container gr-shell (max-width: 1080px) {
  #gr-complete .nxt-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #gr-complete .nxt-cab { --nxt-m: 150px; }
  #gr-complete .nxt-one { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 20px 26px; }
  #gr-complete .nxt-cab.is-solo { --nxt-m: 180px; }
}
@container gr-shell (max-width: 850px) {
  #gr-complete .nxt-hero { padding: 20px; }
  #gr-complete .nxt-who { flex-wrap: wrap; }
  #gr-complete .nxt-totals { margin-inline-start: 0; flex: 1 1 100%; }
  #gr-complete .nxt-total { flex: 1 1 0; }
  #gr-complete .nxt-cab { --nxt-m: 128px; }
  #gr-complete .nxt-next { grid-template-columns: auto minmax(0, 1fr); }
  #gr-complete .nxt-next-act { grid-column: 1 / -1; }
  #gr-complete .nxt-next-act .gr-play { width: 100%; }
  /* beside the sidebar the panel is too narrow for two columns: the object stands over its words, as on a phone */
  #gr-complete .nxt-one { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
@container gr-shell (max-width: 620px) {
  #gr-complete .nxt-hero { gap: 10px; padding: 14px 14px 16px; }
  /* face | name | the two totals, then title and division on one line under the name —
     so the cabinet and its button fit one phone screen */
  #gr-complete .nxt-who {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "face head totals" "face rank rank";
    align-items: center; gap: 5px 10px;
  }
  #gr-complete .nxt-who-face { grid-area: face; }
  #gr-complete .nxt-who-face .nx-face { --nx-face: 48px !important; }
  #gr-complete .nxt-who-id { display: contents; }
  /* the who-row's heading only: a detail page's hero is an .nxt-hero too, and a named area there would tear its copy into columns */
  #gr-complete .nxt-who h1 { grid-area: head; gap: 2px; }
  #gr-complete .nxt-who .nxt-eyebrow { font-size: 10.5px; }
  #gr-complete .nxt-name { font-size: 22px; }
  #gr-complete .nxt-rank { grid-area: rank; font-size: 12.5px; gap: 4px 8px; }
  #gr-complete .nxt-title { font-size: 12px; padding: 2px 9px; }
  #gr-complete .nxt-totals { grid-area: totals; flex-direction: column; gap: 2px; align-items: flex-end; }
  #gr-complete .nxt-total { min-width: 0; padding: 0; border-radius: 0; background: none; font-size: 12.5px; white-space: nowrap; text-align: end; }
  #gr-complete .nxt-total b { display: inline; font-size: 16px; margin: 0; letter-spacing: -.01em; }
  #gr-complete .nxt-total.is-none { display: block; font: 700 12.5px/1.25 'DM Sans', sans-serif; }
  #gr-complete .nxt-cab { --nxt-m: min(104px, 28cqi); --nxt-top: 13px; }
  #gr-complete .nxt-bays { padding-inline: 4px; padding-bottom: 14px; }
  #gr-complete .nxt-bay::before { width: 36px; height: 4px; }
  #gr-complete .nxt-bay-plate { margin-top: calc(var(--nxt-m) * -.1); gap: 2px; padding-inline: 2px; }
  #gr-complete .nxt-bay-top { gap: 5px; }
  #gr-complete .nxt-bay-name { font-size: 14px; }
  #gr-complete .nxt-bay-count { font-size: 20px; }
  #gr-complete .nxt-bay-place { font-size: 10.5px; letter-spacing: .07em; }
  /* three columns this narrow cannot each carry a sentence: the place stands in, the hero's own line says how */
  #gr-complete .nxt-bay.is-locked .nxt-bay-place { display: inline; }
  #gr-complete .nxt-bay-how { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #gr-complete .nxt-hero-foot { gap: 10px; }
  #gr-complete .nxt-hero .nxt-hero-line { font-size: 14px; flex: 1 1 100%; }
  #gr-complete .nxt-hero .nxt-go { width: 100%; }
  /* with medals on the shelf the next thing to do is the card right below, so the quiet button steps aside */
  #gr-complete .nxt-hero .nxt-go.is-quiet { display: none; }

  #gr-complete .nxt-next { padding: 16px; gap: 12px 14px; align-items: start; }
  #gr-complete .nxt-next-emb { width: 76px; height: 76px; border-radius: 20px; }
  #gr-complete .nxt-next-emb .nxt-emb { --nxt-emb: 58px !important; }
  #gr-complete .nxt-next h2 { font-size: 20px; }
  #gr-complete .nxt-next-goal { font-size: 14px; }
  #gr-complete .nxt-next .nxt-prog { grid-column: 1 / -1; }

  /* a medal card lies down: the medal at the start, the facts beside it */
  #gr-complete .nxt-wons { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  #gr-complete button.nxt-won { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  #gr-complete .nxt-won-medal { --nxt-w: 68px; align-self: stretch; padding: 10px 12px 8px; border-bottom: 0; border-inline-end: 1px solid var(--gr-line); }
  #gr-complete .nxt-won-medal::after { top: calc(10px + var(--nxt-w) * .983); }
  #gr-complete .nxt-won-medal .nxt-new { top: 6px; inset-inline-end: 6px; padding: 2px 7px 2px 5px; font-size: 11px; }
  #gr-complete .nxt-bay-plate .nxt-new { margin-top: 4px; font-size: 11px; }
  #gr-complete .nxt-won-body { padding: 12px 14px; padding-inline-end: 36px; }
  #gr-complete .nxt-chev { bottom: calc(50% - 9px); }

  /* a badge card stands up: two columns of them fit a phone */
  #gr-complete .nxt-badges { gap: 10px; }
  #gr-complete button.nxt-badge { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 12px; align-content: start; }
  #gr-complete .nxt-badge-emb { justify-self: start; }
  #gr-complete .nxt-badge-emb .nxt-emb { --nxt-emb: 52px !important; }
  #gr-complete .nxt-badge-name { font-size: 15.5px; }
  #gr-complete .nxt-badge-goal { font-size: 12.5px; }
  #gr-complete .nxt-nums { font-size: 12.5px; }
  #gr-complete .nxt-badge .nxt-lvl { gap: 4px 7px; }
  #gr-complete .nxt-badge .nxt-dots { gap: 4px; }
  #gr-complete .nxt-badge .nxt-dot { width: 9px; height: 9px; }
  #gr-complete .nxt-badge .nxt-lvl-t { font-size: 12px; }

  #gr-complete .nxt-one { gap: 16px; padding: 16px 14px 18px; }
  #gr-complete .nxt-cab.is-solo { --nxt-m: 150px; --nxt-top: 20px; }
  #gr-complete .nxt-plinth { min-height: 190px; }
  #gr-complete .nxt-plinth .nxt-emb { --nxt-emb: 128px !important; }
  #gr-complete .nxt-one-copy { gap: 10px; }
  #gr-complete .nxt-acts, #gr-complete .nxt-acts .nxt-go { width: 100%; }
  #gr-complete .nxt-level { grid-template-columns: auto minmax(0, 1fr); padding: 12px 14px; gap: 8px 12px; }
  #gr-complete .nxt-level-emb .nxt-emb { --nxt-emb: 44px !important; }
  #gr-complete .nxt-level-state { grid-column: 2; justify-self: start; }
  #gr-complete .nxt-level h3 { font-size: 15.5px; }
  #gr-complete .nxt-sk-hero > span { height: 380px; }
}

/* ---------- the one entrance moment: the medals settle, then light crosses the glass ---------- */
#gr-complete .nxt-hero.is-enter .nxt-bay-obj,
#gr-complete .nxt-hero.is-enter .nxt-plinth .nxt-emb {
  animation: nxt-settle 640ms cubic-bezier(.2, .85, .3, 1.18) both;
  animation-delay: calc(var(--nxt-el, 0ms) + 140ms + var(--i, 0) * 130ms);
}
#gr-complete .nxt-hero.is-enter .nxt-bay-light,
#gr-complete .nxt-hero.is-enter .nxt-bay-refl,
#gr-complete .nxt-hero.is-enter .nxt-bay-plate {
  animation: nxt-fade 460ms ease-out both;
  animation-delay: calc(var(--nxt-el, 0ms) + 560ms + var(--i, 0) * 130ms);
}
#gr-complete .nxt-hero.is-enter .nxt-bay.is-won .nxt-bay-obj::after {
  animation: nxt-twinkle 700ms cubic-bezier(.2, .8, .3, 1.4) both;
  animation-delay: calc(var(--nxt-el, 0ms) + 760ms + var(--i, 0) * 130ms);
}
#gr-complete .nxt-hero.is-enter .nxt-glint {
  animation: nxt-glint 900ms cubic-bezier(.3, .55, .4, 1) both;
  animation-delay: calc(var(--nxt-el, 0ms) + 760ms);
}
@keyframes nxt-settle { from { opacity: 0; transform: translateY(-30px) scale(1.07); } 55% { opacity: 1; } }
@keyframes nxt-fade { from { opacity: 0; } }
@keyframes nxt-twinkle { from { opacity: 0; scale: .2; rotate: -40deg; } }
@keyframes nxt-glint {
  from { opacity: 1; transform: translateX(-130%) skewX(-16deg); }
  to { opacity: 1; transform: translateX(470%) skewX(-16deg); }
}

/* ---------- no motion: the same room, fully lit and still ---------- */
/* (the kit lays its medals flat when motion is off; the rules above that turn them must not win over that) */
#gr-complete[data-motion=off] .nxt-bay.is-won .nx-medal svg,
#gr-complete[data-motion=off] .nxt-bay.is-won .nxt-bay-obj .nx-medal:hover svg,
#gr-complete[data-motion=off] .nxt-won:hover .nx-medal svg { transform: none; }
#gr-complete[data-motion=off] button.nxt-won:hover, #gr-complete[data-motion=off] button.nxt-badge:hover { transform: none; }
#gr-complete[data-motion=off] .nxt *, #gr-complete[data-motion=off] .nxt *::before, #gr-complete[data-motion=off] .nxt *::after {
  animation: none !important; transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  #gr-complete .nxt *, #gr-complete .nxt *::before, #gr-complete .nxt *::after { animation: none !important; transition: none !important; }
}
