/* docs/385 — the explainers and the guide. One layer, #guide, a sibling of #app (app.js
   `guideLayer`), framed exactly like #toasts so a hole measured off #app lands on #app.
   ⛔ transform and opacity only, and nothing here loops except the hole's ring, which stops
   under prefers-reduced-motion. */
#guide { position: fixed; top: 0; left: 0; right: 0; margin-inline: auto;
  width: min(100vw, 412px); height: 100%; height: 100dvh; max-height: 100dvh;
  overflow: hidden; pointer-events: none; z-index: 31; }       /* over #toasts 30, under #fx 33 and #boot 40 */
#guide > * { pointer-events: auto; }
#guide .gx-o { display: contents; }     /* the (i) and the explainer; their own boxes are absolute */
#guide .gc { position: absolute; inset: 0; pointer-events: none; }
#guide .gc > * { pointer-events: auto; }
#guide .gc.free { pointer-events: none; }

/* the (i) — his info symbol on a dark coin */
.gx-i { position: absolute; z-index: 3; width: 32px; height: 32px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid rgba(208, 178, 122, .55);
  background: rgba(20, 14, 12, .78); box-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.gx-i::after { content: ''; position: absolute; inset: -6px; }           /* 46px to the finger */
.gx-i img { width: 18px; height: 18px; }
/* docs/392: the guide's hole already rings around it — a second loop on the same coin was two
   things moving where one should */
.gx-i.nudge { border-color: rgba(243, 212, 138, .95); }

/* the explainer (docs/392): the dark, then pictures on a zigzag path — left, right, left, right,
   each a little lower — landing one after another, a gold arrow bending from one to the next.
   No boxes: the picture is the thing, two or three words beside it. */
.gx { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; }
.gx-dim { position: absolute; inset: 0; background: radial-gradient(90% 70% at 50% 48%, rgba(24, 16, 13, .84), rgba(6, 4, 5, .62));
  animation: gx-fade .3s ease both; }
.gx-col { position: relative; width: calc(100% - 32px); max-width: 340px; display: grid; justify-items: center; }
.gx-t { font: 700 14px var(--mono, monospace); letter-spacing: .34em; color: var(--gold, #d0b27a);
  margin-bottom: 18px; animation: gx-rise .4s cubic-bezier(.2, .9, .3, 1) both; }
.gx-path { width: 100%; display: grid; }
.gx-step { display: flex; align-items: center; gap: 12px; max-width: 82%;
  animation: gx-land .55s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: calc(.25s + var(--i) * .6s); }
.gx-step.l { justify-self: start; }
.gx-step.r { justify-self: end; flex-direction: row-reverse; text-align: right; }
.gx-step.r .gx-txt { justify-items: end; }
.gx-pic { position: relative; flex: none; width: 76px; height: 76px; display: grid; place-items: center; }
.gx-pic::before { content: ''; position: absolute; inset: -6px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(243, 212, 138, .30), rgba(243, 212, 138, 0)); }
.gx-pic img { position: relative; width: 62px; height: 62px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); }
.gx-pic img.px { image-rendering: pixelated; width: 68px; height: 68px; }
.gx-txt { display: grid; gap: 2px; }
.gx-txt b { font: 700 15px var(--mono, monospace); letter-spacing: .1em; color: #f1e6d2; }
.gx-txt small { font: 500 13px/1.25 var(--sans, sans-serif); color: rgba(241, 230, 210, .72); }
/* the bend from one picture to the next; `.gx-rtl` is the same arrow mirrored (right to left) */
.gx-bend { display: block; width: 100%; height: 40px; margin: -4px 0;
  animation: gx-draw .45s ease-out both; animation-delay: calc(var(--i) * .6s - .05s); }
.gx-bend svg { display: block; width: 100%; height: 100%; overflow: visible; }
.gx-bend.gx-rtl svg { transform: scaleX(-1); }
.gx-line { fill: none; stroke: var(--gold, #d0b27a); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 2 7; }
.gx-head { fill: none; stroke: var(--gold, #d0b27a); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.gx-close { margin-top: 22px; font: 600 11px var(--mono, monospace); letter-spacing: .28em; color: rgba(241, 230, 210, .55);
  animation: gx-fade .4s ease both; animation-delay: calc(.4s + var(--i) * .6s); }
/* a finished step: what it paid, pictures in a row, dealt quickly */
.gx.paid .gx-t { color: #f3d48a; font-size: 16px; }
.gx-loot { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 10px; }
.gx-prize { width: 96px; display: grid; justify-items: center; gap: 6px; text-align: center;
  animation: gx-land .5s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(.25s + var(--i) * .18s); }
.gx-prize .gx-pic::before { background: radial-gradient(closest-side, rgba(243, 212, 138, .45), rgba(243, 212, 138, 0)); }
.gx-prize b { font: 700 11px/1.2 var(--mono, monospace); letter-spacing: .06em; color: #f3d48a; }
.gx.paid .gx-close { animation-delay: calc(.5s + var(--i) * .18s); }
@keyframes gx-land { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.6); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes gx-rise { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }
@keyframes gx-draw { from { opacity: 0; transform: translate3d(0, -6px, 0) scaleX(.6); } to { opacity: 1; transform: none; } }
@keyframes gx-fade { from { opacity: 0; } to { opacity: 1; } }

/* the guide: a lit hole over the one thing to press, the rest held by four blockers. The hole and
   the caption are kept and MOVED (app.js `guideCoach`), never redrawn, so it glides from one thing
   to the next instead of jumping. */
.gc-hole { position: absolute; left: 0; top: 0; border-radius: 16px; pointer-events: none !important; transform-origin: 0 0;
  box-shadow: 0 0 0 9999px rgba(8, 5, 6, .3), 0 0 0 2.5px #f3d48a, 0 0 18px 4px rgba(243, 212, 138, .55); }
/* ⛔ docs/392, his: *"the rest of the screen is super darkened all of the time. i cant really see
   anything here. i dont know where stuff is"*. The shade is LIGHT (.3, it was .72): the screen is
   the lesson, and a player who cannot see it learns only "click here". The lit thing is found by
   its gold ring and glow, not by blacking out everything else. */
.gc-hole::after { content: ''; position: absolute; inset: -2px; border-radius: inherit;
  border: 2px solid rgba(243, 212, 138, .8); animation: gc-ring 2.4s ease-out .5s 3 both; }   /* three pulses, then the arrow alone keeps pointing */
@keyframes gc-ring { 0% { opacity: .9; transform: scale(1); } 55%, 100% { opacity: 0; transform: scale(1.2); } }
.gc-b { position: absolute; background: transparent; }
.gc-cap { position: absolute; left: 20px; right: 20px; pointer-events: none !important; text-align: center;
  display: grid; gap: 4px; padding: 10px 14px; border-radius: 12px;
  background: rgba(20, 14, 12, .92); border: 1px solid rgba(208, 178, 122, .4); box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.gc.free .gc-cap { bottom: calc(var(--nav, 86px) + 12px); }
.gc-cap b { font: 600 15px/1.3 var(--sans, sans-serif); color: #f1e6d2; }
/* docs/392: pointing at a hole, the words stand on the dark with no box, and a gold arrow at the
   hole's own x (`--ax`) points at it — the explainer's language. Free (no hole) keeps its box. */
.gc:not(.free) .gc-cap { left: 16px; right: 16px; padding: 0; gap: 4px; background: none; border: 0; box-shadow: none; }
/* the words in a small pill of their own, so they read over a screen that is no longer dark */
.gc-say { justify-self: center; display: grid; gap: 5px; justify-items: center; max-width: 100%;
  padding: 7px 14px 8px; border-radius: 14px; background: rgba(16, 11, 10, .9);
  border: 1px solid rgba(243, 212, 138, .45); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.gc:not(.free) .gc-cap b { font-size: 15px; }
.gc-say em { font: 500 12px/1.25 var(--sans, sans-serif); font-style: normal; color: rgba(241, 230, 210, .7); }
.gc-dots { display: flex; justify-content: center; gap: 7px; }
.gc-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(241, 230, 210, .22); }
.gc-dots i.done { background: rgba(208, 178, 122, .7); }
.gc-dots i.on { background: #f3d48a; transform: scale(1.5); box-shadow: 0 0 6px rgba(243, 212, 138, .8); }
.gc-arrow { justify-self: start; margin-left: calc(var(--ax, 150px) - 4px); width: 24px; height: 30px; position: relative; display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .9)) drop-shadow(0 0 3px rgba(0, 0, 0, .6)); }
.gc-arrow::before { content: ''; position: absolute; left: 11px; top: 4px; bottom: 4px; width: 0; border-left: 2.5px dotted var(--gold, #d0b27a); }
.gc-arrow::after { content: ''; position: absolute; left: 6px; width: 10px; height: 10px; border: solid var(--gold, #d0b27a); border-width: 2.5px 2.5px 0 0; }
.gc-arrow.up::after { top: 2px; transform: rotate(-45deg); }
.gc-arrow.down::after { bottom: 2px; transform: rotate(135deg); }
.gc-arrow.up { animation: gc-bob-up 1.8s ease-in-out infinite; }
.gc-arrow.down { animation: gc-bob-down 1.8s ease-in-out infinite; }
@keyframes gc-bob-up { 0%, 100% { transform: none; } 50% { transform: translateY(-4px); } }
@keyframes gc-bob-down { 0%, 100% { transform: none; } 50% { transform: translateY(4px); } }

@media (prefers-reduced-motion: reduce) {
  .gc-hole::after, .gc-arrow { animation: none; }
  .gx-dim, .gx-t, .gx-step, .gx-bend, .gx-prize, .gx-close { animation: none; opacity: 1; transform: none; }
}

/* docs/393 (`gx-row`, never `row`: the global .row is a 56px menu row): an (i) that joins a row of round doors (the fight's settings, the hub's trophy) wears
   their look — a dark coin with a faint ring — at their size; the size itself is measured */
.gx-i.gx-row { border: 0; background: rgba(25,22,23,.92);
  box-shadow: inset 0 0 0 1px rgba(228,224,216,.3), 0 2px 0 #191617, 0 4px 10px rgba(0,0,0,.45); }
.gx-i.gx-row img { width: 47%; height: 47%; object-fit: contain; }
.gx-i.gx-row.nudge { box-shadow: inset 0 0 0 2px rgba(243,212,138,.95), 0 2px 0 #191617, 0 4px 10px rgba(0,0,0,.45); }
