/* ============================================================
 * C4YOS LAND — GAME PAGE
 * The deeper room of the site: the same tokens, type and buttons as
 * styles.css, but the lights are turned down and everything sits on the
 * game table under a lamp. Structure comes from the game itself: the
 * special die, red life chips, circled attack numerals, card backs.
 *
 * Components: shell · die · life chips · numerals · hero table ·
 * what's in the box · loop (tabs) · video screen · fight arena ·
 * run path · card shelf · why · climax · responsive · motion
 * ============================================================ */

/* ---------- shell ---------- */

.g-body {
  --g-ground: #060a1c;
  --g-panel: rgba(4, 7, 22, .72);
  --g-line: rgba(255, 246, 227, .12);
  /* transparent, so the fixed sky painting behind the page shows through */
  background: transparent;
  color: var(--paper);
  font-size: 19px;
}

.g-sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 70% 18%, rgba(255, 198, 41, .07), transparent 70%),
    linear-gradient(180deg, rgba(10, 18, 48, .62) 0%, rgba(10, 18, 48, .8) 45%, rgba(10, 18, 48, .92) 100%),
    url('assets/backgrounds/sky-islands-bg.jpg') center / cover;
  pointer-events: none;
}

.g-header { padding-inline: var(--gutter); }

.g-wrap {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.g-section { position: relative; padding-block: clamp(56px, 7vw, 104px); }

.g-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 52px); }
.g-head--center { margin-inline: auto; text-align: center; }
.g-head--center .g-lead { margin-inline: auto; }
.g-head--row {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
}

.g-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 62px);
  line-height: .98;
  text-transform: uppercase;
  color: var(--paper);
  -webkit-text-stroke: .1em var(--card-black);
  paint-order: stroke fill;
  text-shadow: 0 .07em 0 var(--card-black);
  text-wrap: balance;
}

.g-lead {
  margin: var(--s-4) 0 0;
  max-width: 48ch;
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.45;
  color: var(--paper-dim);
  text-wrap: pretty;
}

.g-caption { margin: var(--s-4) 0 0; font-size: 16px; color: #9c97a8; text-align: center; }
.g-caption--left { text-align: left; }

.g-round-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: var(--card-black);
  border: 2px solid rgba(255, 246, 227, .3);
  border-radius: 50%;
  color: var(--paper);
  cursor: pointer;
  transition: background var(--t-hover), color var(--t-hover), transform var(--t-hover) var(--ease-out), border-color var(--t-hover);
}
.g-round-btn svg { width: 22px; height: 22px; }
.g-round-btn:hover { background: var(--gold); color: #1d1300; border-color: var(--card-black); transform: translateY(-2px); }
.g-round-btn:active { transform: translateY(1px); }
.g-round-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.g-round-btn:disabled { opacity: .35; pointer-events: none; }

.g-tag {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 7px 10px 4px;
  background: var(--paper);
  border: 3px solid var(--card-black);
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1;
  text-transform: uppercase;
  color: #16110a;
  rotate: -4deg;
}
.g-tag--boss, .g-tag.is-boss { background: var(--red); color: var(--paper); }
.g-tag.is-trader { background: var(--purple); color: var(--paper); }

.g-rule {
  display: inline-block;
  padding: 8px 14px 5px;
  background: var(--gold);
  color: #1d1300;
  font-family: var(--font-display);
  font-size: 15px;
  text-transform: uppercase;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
}

/* ============================================================
 * THE SPECIAL DIE — faces 1, 1, 1, 2, 2, 3
 * ============================================================ */

.g-die {
  --s: 56px;
  display: inline-block;
  flex: none;
  width: var(--s);
  height: var(--s);
}
.g-die--xl { --s: clamp(72px, 7vw, 100px); }
.g-die--sm { --s: 38px; }

.g-die-face {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: var(--paper);
  border: calc(var(--s) * .075) solid var(--card-black);
  border-radius: 20%;
  box-shadow: 0 calc(var(--s) * .08) 0 var(--card-black), inset 0 calc(var(--s) * -.07) 0 rgba(0, 0, 0, .13);
}
.g-die-face i {
  position: absolute;
  display: none;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: var(--card-black);
}
.g-die[data-value="1"] i:nth-child(1) { display: block; left: 39%; top: 39%; }
.g-die[data-value="2"] i:nth-child(1) { display: block; left: 16%; top: 16%; }
.g-die[data-value="2"] i:nth-child(2) { display: block; left: 62%; top: 62%; }
.g-die[data-value="3"] i:nth-child(1) { display: block; left: 14%; top: 14%; }
.g-die[data-value="3"] i:nth-child(2) { display: block; left: 39%; top: 39%; }
.g-die[data-value="3"] i:nth-child(3) { display: block; left: 64%; top: 64%; }
.g-die[data-value="3"] .g-die-face { background: var(--gold); }

.g-die.is-lit .g-die-face { background: var(--gold); box-shadow: 0 calc(var(--s) * .08) 0 var(--card-black), 0 0 0 4px rgba(255, 198, 41, .35), 0 0 28px rgba(255, 198, 41, .45); }

@keyframes die-tumble {
  0%   { transform: rotate(0) translateY(0) scale(1); }
  25%  { transform: rotate(-160deg) translateY(-38%) scale(1.08); }
  55%  { transform: rotate(-300deg) translateY(-8%) scale(.96); }
  80%  { transform: rotate(-350deg) translateY(2%) scale(1.02); }
  100% { transform: rotate(-360deg) translateY(0) scale(1); }
}
.g-die.is-rolling .g-die-face { animation: die-tumble 620ms cubic-bezier(.3, .7, .3, 1) both; }

/* ============================================================
 * LIFE CHIPS
 * ============================================================ */

.g-chips {
  --c: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.g-chip {
  width: var(--c);
  height: var(--c);
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ff8a78 0 18%, #e0301f 55%, #a81a10 100%);
  border: 2px solid var(--card-black);
  box-shadow: inset 0 0 0 calc(var(--c) * .16) rgba(255, 255, 255, .28), 0 2px 0 var(--card-black);
  transition: background 260ms, box-shadow 260ms, transform 260ms var(--ease-deal), opacity 260ms;
}
.g-chip.is-lost {
  background: transparent;
  border-color: rgba(255, 246, 227, .22);
  box-shadow: none;
}
.g-chip.is-pop { animation: chip-pop 420ms var(--ease-deal); }
@keyframes chip-pop { 0% { transform: scale(1); } 40% { transform: scale(1.5) rotate(20deg); } 100% { transform: scale(1); } }

.g-chips--you { --c: clamp(20px, 2.1vw, 28px); max-width: calc(var(--c) * 5 + 5px * 4); }
.g-chips--stack { --c: 34px; max-width: calc(34px * 4 + 15px); justify-content: center; }

/* ---------- circled numerals, as printed on the cards ---------- */

.g-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding-top: 3px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--card-black);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
  color: var(--card-black);
}

/* card back — used for decks, run slots, shuffles */
.g-card-back {
  display: block;
  border-radius: 6% / 4%;
  border: 5px solid var(--card-black);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 198, 41, .22) 0 16%, transparent 17%),
    repeating-linear-gradient(45deg, #1a2350 0 9px, #111838 9px 18px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .7), 0 18px 26px -12px rgba(0, 0, 0, .8);
}

/* ============================================================
 * HERO — the table
 * ============================================================ */

.g-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(24px, 4vw, 48px) clamp(48px, 6vw, 88px);
}

.g-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  min-height: clamp(560px, 78svh, 820px);
}

.g-hero-title { margin: 0; }
.g-hero-logo {
  display: block;
  width: clamp(250px, 29vw, 430px);
  height: auto;
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .5));
}
.g-hero-sub {
  display: block;
  margin-top: clamp(10px, 1.4vw, 18px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 3.5vw, 54px);
  line-height: .95;
  text-transform: uppercase;
  color: var(--paper);
  -webkit-text-stroke: .09em var(--card-black);
  paint-order: stroke fill;
  text-shadow: 0 .07em 0 var(--card-black);
  text-wrap: balance;
}
.g-hero-lead {
  margin: var(--s-5) 0 0;
  max-width: 40ch;
  font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.45;
  color: var(--paper);
}
.g-hero-actions {
  margin-top: var(--s-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
}
.g-hero-actions .btn--lg { font-size: clamp(18px, 1.45vw, 22px); }
.g-hero-note { margin: var(--s-4) 0 0; font-size: 17px; color: #a9a4b4; }

/* the table scene */
.g-table {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 1 / .86;
}
.g-table-spot {
  position: absolute;
  inset: -10% -6% -4%;
  background:
    radial-gradient(ellipse 46% 42% at 52% 44%, rgba(255, 214, 140, .2), rgba(255, 214, 140, .06) 55%, transparent 72%),
    radial-gradient(ellipse 50% 12% at 52% 92%, rgba(0, 0, 0, .55), transparent 70%);
  pointer-events: none;
}
.g-layer {
  position: absolute;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 500ms var(--ease-out);
}

.g-table-foe { left: 31%; top: 2%; width: 42%; }
.g-table-card {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5% / 3.4%;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .75), 0 40px 60px -24px rgba(0, 0, 0, .9);
  rotate: 3deg;
}
.g-table-foe-chips { --c: clamp(12px, 1.3vw, 17px); justify-content: center; margin-top: 18px; }

.g-table-hand { left: 0; bottom: 4%; width: 44%; height: 44%; }
.g-hand-card {
  position: absolute;
  bottom: 0;
  width: 44%;
  height: auto;
  border-radius: 5% / 3.4%;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .75), 0 24px 30px -12px rgba(0, 0, 0, .85);
  transform-origin: 50% 110%;
}
.g-hand-card--1 { left: 0; rotate: -16deg; }
.g-hand-card--2 { left: 26%; rotate: -5deg; bottom: 6%; }
.g-hand-card--3 { left: 52%; rotate: 7deg; }

.g-table-die { right: 10%; bottom: 20%; }
.g-table-die .g-die { rotate: -14deg; }

.g-table-you {
  right: 0;
  bottom: 2%;
  display: grid;
  gap: 8px;
  justify-items: end;
}
.g-table-you .g-chips { --c: clamp(12px, 1.3vw, 17px); max-width: calc(var(--c) * 5 + 20px); justify-content: flex-end; }
.g-table-you-label {
  font-family: var(--font-display);
  font-size: 15px;
  text-transform: uppercase;
  color: var(--gold);
}

/* ============================================================
 * WHAT'S IN THE BOX
 * ============================================================ */

.g-what-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.g-what-item h3 {
  margin: var(--s-5) 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 25px);
  text-transform: uppercase;
  color: var(--paper);
}
.g-what-item p { margin: 6px 0 0; font-size: 18px; line-height: 1.4; color: var(--paper-dim); }

.g-what-vis {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(150px, 15vw, 190px);
  border-radius: 14px;
  background: radial-gradient(ellipse 70% 60% at 50% 55%, rgba(255, 214, 140, .1), transparent 70%);
  box-shadow: inset 0 0 0 2px var(--g-line);
}
.g-what-vis--cards img {
  width: clamp(76px, 7.4vw, 104px);
  height: auto;
  border-radius: 5% / 3.4%;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .7), 0 14px 20px -8px rgba(0, 0, 0, .8);
}
.g-what-vis--cards img:first-child { rotate: -9deg; margin-right: -22px; }
.g-what-vis--cards img:last-child { rotate: 7deg; translate: 0 8px; }
.g-what-vis--die { display: grid; grid-template-columns: repeat(3, auto); align-content: center; justify-content: center; gap: 10px; }
.g-what-vis--die .g-die--sm { --s: clamp(30px, 2.8vw, 38px); }

/* ============================================================
 * HOW A FIGHT WORKS — step tabs driving a scene
 * ============================================================ */

.g-loop {
  display: grid;
  grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: stretch;
}

.g-loop-tabs { display: grid; align-content: start; gap: 6px; }

.g-loop-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 10px 16px;
  background: transparent;
  border: 0;
  border-left: 4px solid rgba(255, 246, 227, .14);
  border-radius: 0 10px 10px 0;
  color: #a9a4b4;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.6vw, 22px);
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--t-hover), background 240ms, border-color 240ms;
}
.g-loop-tab .g-num { background: #2a3052; border-color: var(--card-black); color: #a9a4b4; transition: background 240ms, color 240ms, transform 240ms var(--ease-deal); }
.g-loop-tab:hover { color: var(--paper); border-left-color: rgba(255, 198, 41, .5); }
.g-loop-tab[aria-selected="true"] {
  color: var(--paper);
  border-left-color: var(--gold);
  background: linear-gradient(90deg, rgba(255, 198, 41, .16), rgba(255, 198, 41, 0));
}
.g-loop-tab[aria-selected="true"] .g-num { background: var(--gold); color: #1d1300; transform: scale(1.12) rotate(-6deg); }
.g-loop-tab:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.g-loop-stage {
  position: relative;
  min-height: clamp(440px, 36vw, 520px);
  background:
    radial-gradient(ellipse 55% 60% at 32% 50%, rgba(255, 214, 140, .12), transparent 70%),
    var(--g-panel);
  border-radius: 18px;
  box-shadow: inset 0 0 0 2px var(--g-line), 0 40px 70px -40px #000;
  overflow: hidden;
}

.g-loop-panel {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  height: 100%;
  padding: clamp(24px, 3vw, 44px);
  padding-bottom: 88px;
}
.g-loop-panel[hidden] { display: none; }
.g-loop-panel:focus-visible { outline: 3px solid var(--gold); outline-offset: -6px; border-radius: 18px; }

.g-loop-text h3 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.4vw, 50px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
}
.g-loop-text p { margin: 12px 0 18px; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45; color: var(--paper-dim); }
.g-loop-count { margin: 0 !important; font-family: var(--font-display); font-size: 15px !important; color: var(--gold) !important; }

.g-loop-nav {
  position: absolute;
  right: clamp(20px, 3vw, 44px);
  bottom: 22px;
  display: flex;
  gap: 10px;
}

/* scenes */
.g-loop-visual { position: relative; height: 100%; min-height: 320px; }
.g-scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.g-scene img { display: block; border-radius: 5% / 3.4%; box-shadow: 0 3px 0 rgba(0, 0, 0, .75), 0 26px 34px -14px rgba(0, 0, 0, .9); }
.g-scene-card { position: relative; width: clamp(150px, 15vw, 210px); }
.g-scene-card img { width: 100%; height: auto; }

.g-deck { position: relative; width: clamp(110px, 11vw, 150px); aspect-ratio: 460 / 686; margin-right: -30px; rotate: -8deg; }
.g-deck span { position: absolute; inset: 0; }
.g-deck span { border-radius: 6% / 4%; border: 5px solid var(--card-black); background: radial-gradient(circle at 50% 50%, rgba(255, 198, 41, .22) 0 16%, transparent 17%), repeating-linear-gradient(45deg, #1a2350 0 9px, #111838 9px 18px); box-shadow: 0 2px 0 rgba(0, 0, 0, .7); }
.g-deck span:nth-child(2) { translate: 6px 6px; }
.g-deck span:nth-child(3) { translate: 12px 12px; }
.g-deck--gadget span { background: repeating-linear-gradient(45deg, #0e5f8c 0 9px, #0a4c72 9px 18px); }

.g-scene-chips { position: absolute; bottom: 8%; left: 50%; translate: -50% 0; display: flex; align-items: center; gap: 12px; }
.g-scene-chips .g-chips { --c: 16px; flex-wrap: nowrap; }

.g-scene--roll { flex-direction: column; gap: 26px; }
.g-faces { display: flex; gap: 8px; }
.g-face {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding-top: 3px;
  background: rgba(255, 246, 227, .08);
  border: 2px solid rgba(255, 246, 227, .2);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--paper-dim);
}
.g-face.is-hit { background: var(--gold); border-color: var(--card-black); color: #1d1300; box-shadow: 0 4px 0 var(--card-black); translate: 0 -4px; }
.g-scene-dmg { display: flex; align-items: center; gap: 12px; }
.g-scene-dmg .g-chips { --c: 16px; flex-wrap: nowrap; }

.g-burst {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  height: 40px;
  padding: 4px 10px 0;
  background: var(--red);
  border: 3px solid var(--card-black);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--card-black);
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--paper);
  rotate: -8deg;
}
.g-burst--good { background: #36b86a; }

.g-scene--hit { gap: clamp(16px, 2vw, 28px); }
.g-scene--hit .g-scene-card { width: clamp(130px, 12vw, 176px); }
.g-scene-die { display: grid; place-items: center; }
.g-scene-die--small { position: absolute; left: 6%; top: 10%; rotate: -12deg; }

.g-attacks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.g-attacks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 246, 227, .06);
  font-size: 17px;
  line-height: 1.3;
  color: var(--paper-dim);
  transition: background 260ms, color 260ms, transform 260ms var(--ease-deal), box-shadow 260ms;
}
.g-attacks li strong { font-weight: 400; color: var(--paper); }
.g-attacks li.is-hit { background: var(--gold); color: #1d1300; box-shadow: 0 4px 0 var(--card-black); transform: translateX(6px); }
.g-attacks li.is-hit strong { color: #1d1300; }
.g-attacks li.is-hit .g-num { background: var(--card-black); color: var(--gold); }
.g-attacks li.is-locked { opacity: .55; }
.g-attacks--scene li { font-family: var(--font-display); font-size: 16px; text-transform: uppercase; align-items: center; }

.g-scene--loot .g-scene-card { rotate: 6deg; }
.g-scene-hand { display: flex; align-items: flex-end; }
.g-scene-hand img { width: clamp(90px, 8.6vw, 124px); height: auto; margin: 0 -10px; }
.g-scene-hand img:nth-child(1) { rotate: -10deg; }
.g-scene-hand img:nth-child(3) { rotate: 10deg; }
.g-scene-hand img.is-discarding { translate: 0 -34px; rotate: 4deg; opacity: .9; }
.g-scene--adapt { flex-direction: column; gap: 40px; }
.g-scene--adapt .g-scene-chips { position: static; translate: none; }

.g-scene--repeat .g-scene-card { box-shadow: 0 0 0 4px var(--red), 0 0 60px rgba(240, 64, 47, .45); border-radius: 5% / 3.4%; }
.g-scene--repeat .g-tag { left: auto; right: -14px; top: -14px; }

/* ============================================================
 * GAMEPLAY VIDEO — the screen
 * ============================================================ */

.g-video { padding-block: clamp(64px, 8vw, 120px); }

.g-screen {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--card-black);
  border: 10px solid var(--card-black);
  border-radius: 18px;
  box-shadow: 0 0 0 2px rgba(255, 246, 227, .08), 0 60px 100px -40px #000, 0 0 120px -30px rgba(18, 165, 238, .25);
}
.g-screen-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  transform: scale(1.04);
  transition: transform 900ms var(--ease-out), filter 900ms;
  filter: saturate(.85) brightness(.8);
}
.g-screen::before,
.g-screen::after {
  content: '';
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  height: 11%;
  background: var(--card-black);
  transition: transform 700ms var(--ease-out);
  pointer-events: none;
}
.g-screen::before { top: 0; }
.g-screen::after { bottom: 0; }
.g-screen.is-playing::before { transform: translateY(-100%); }
.g-screen.is-playing::after { transform: translateY(100%); }
.g-screen.is-playing .g-screen-video { transform: none; filter: none; }

.g-screen-play {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 0;
  background: radial-gradient(ellipse 40% 40% at 50% 50%, rgba(0, 0, 0, .55), rgba(0, 0, 0, .15) 70%, transparent);
  border: 0;
  color: var(--paper);
  cursor: pointer;
  transition: opacity 300ms;
}
.g-screen-play-die .g-die { --s: clamp(76px, 9vw, 112px); transition: transform 300ms var(--ease-deal); }
.g-screen-play-label {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 28px);
  text-transform: uppercase;
  -webkit-text-stroke: .1em var(--card-black);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--card-black);
}
.g-screen-play:hover .g-die { transform: rotate(-20deg) scale(1.08); }
.g-screen-play:focus-visible { outline: 4px solid var(--gold); outline-offset: -14px; }
.g-screen.is-playing .g-screen-play { opacity: 0; pointer-events: none; }

/* ============================================================
 * PICK A FIGHT — roster + arena
 * ============================================================ */

.g-roster {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}
.g-roster-btn {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 0;
  background: none;
  border: 0;
  color: #a9a4b4;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.05;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
}
.g-roster-btn img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background: #fff;
  border: 4px solid var(--card-black);
  border-radius: 12px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .6);
  filter: saturate(.55) brightness(.8);
  transition: transform 220ms var(--ease-out), filter 220ms, box-shadow 220ms;
}
.g-roster-btn:hover img { filter: none; transform: translateY(-4px); }
.g-roster-btn[aria-pressed="true"] { color: var(--gold); }
.g-roster-btn[aria-pressed="true"] img { filter: none; transform: translateY(-6px); box-shadow: 0 0 0 3px var(--gold), 0 10px 0 rgba(0, 0, 0, .6); }
.g-roster-btn.is-boss::after,
.g-roster-btn.is-trader::after {
  content: 'Boss';
  position: absolute;
  top: -8px;
  right: -6px;
  padding: 4px 6px 2px;
  background: var(--red);
  border: 2px solid var(--card-black);
  border-radius: 4px;
  font-size: 11px;
  color: var(--paper);
  rotate: 8deg;
}
.g-roster-btn.is-trader::after { content: '?'; background: var(--purple); }
.g-roster-btn:focus-visible { outline: none; }
.g-roster-btn:focus-visible img { outline: 3px solid var(--paper); outline-offset: 3px; }

.g-arena {
  margin-top: clamp(24px, 3vw, 36px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 2.4fr);
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(20px, 3vw, 36px);
  background:
    radial-gradient(ellipse 40% 55% at 55% 45%, rgba(255, 214, 140, .1), transparent 70%),
    var(--g-panel);
  border-radius: 18px;
  box-shadow: inset 0 0 0 2px var(--g-line), 0 40px 70px -40px #000;
}

.g-foe-art {
  position: relative;
  max-width: 300px;
  aspect-ratio: 1;
  background: #fff;
  border: 8px solid var(--card-black);
  border-radius: 14px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .6);
  overflow: hidden;
}
.g-foe-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 180ms; }
.g-foe-art.is-swapping img { opacity: 0; }
.g-foe-art.is-hit { animation: foe-hit 380ms ease; }
.g-foe-art.is-hit::after { content: ''; position: absolute; inset: 0; background: rgba(240, 64, 47, .35); animation: fade-out 380ms ease forwards; }
@keyframes foe-hit { 0%, 100% { transform: none; } 20% { transform: translateX(-8px) rotate(-2deg); } 50% { transform: translateX(7px) rotate(1.5deg); } 75% { transform: translateX(-3px); } }
@keyframes fade-out { to { opacity: 0; } }

.g-foe-plate {
  margin: -20px 0 0 12px;
  position: relative;
  display: inline-block;
  padding: 12px 22px 7px;
  background:
    linear-gradient(135deg, transparent 12px, var(--card-black) 0) left / 50.5% 100% no-repeat,
    linear-gradient(225deg, transparent 12px, var(--card-black) 0) right / 50.5% 100% no-repeat;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.6vw, 23px);
  text-transform: uppercase;
  color: var(--paper);
}

.g-foe-life { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.g-life-label { font-family: var(--font-display); font-size: 14px; text-transform: uppercase; color: #a9a4b4; }
.g-foe-life .g-chips { --c: 17px; }
.g-foe-list-label { margin: 18px 0 8px; font-family: var(--font-display); font-size: 14px; text-transform: uppercase; color: #a9a4b4; }

.g-duel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.g-duel-die { padding: 20px; }
.g-duel-status { margin: 0; min-height: 3em; max-width: 30ch; font-size: 19px; line-height: 1.35; color: var(--paper); }
.g-duel-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.g-log { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 34ch; display: grid; gap: 4px; }
.g-log li { font-size: 15px; line-height: 1.3; color: #8d889a; }
.g-log li:first-child { color: var(--paper-dim); }
.g-log li.is-bad::before { content: '● '; color: var(--red); }
.g-log li.is-good::before { content: '● '; color: #5fd98b; }

.g-you { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border-left: 2px dashed var(--g-line); padding-left: clamp(12px, 2vw, 28px); }
.g-you-label { margin: 0; font-family: var(--font-display); font-size: 22px; text-transform: uppercase; color: var(--gold); }

/* ============================================================
 * NO TWO RUNS — the dealt path
 * ============================================================ */

.g-run-board {
  display: grid;
  gap: clamp(28px, 3vw, 40px);
  padding: clamp(24px, 3vw, 40px);
  background: var(--g-panel);
  border-radius: 18px;
  box-shadow: inset 0 0 0 2px var(--g-line);
}

.g-path {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 28px);
}
.g-path::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 52%;
  height: 4px;
  background: repeating-linear-gradient(90deg, rgba(255, 246, 227, .3) 0 14px, transparent 14px 26px);
}
.g-path-slot { position: relative; display: grid; justify-items: center; gap: 10px; }
.g-path-round { font-family: var(--font-display); font-size: 15px; text-transform: uppercase; color: var(--gold); }
.g-path-slot.is-boss .g-path-round { color: #ff6a55; }
.g-path-name { min-height: 2.4em; font-size: 17px; line-height: 1.2; text-align: center; color: var(--paper-dim); }

.g-path-card { width: min(100%, 170px); aspect-ratio: 460 / 686; perspective: 900px; }
.g-path-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 560ms var(--ease-deal);
}
.g-path-card.is-face .g-path-card-inner { transform: rotateY(180deg); }
.g-path-card .g-card-back,
.g-path-face { position: absolute; inset: 0; backface-visibility: hidden; }
.g-path-face { transform: rotateY(180deg); }
.g-path-face img { width: 100%; height: 100%; object-fit: cover; border-radius: 5% / 3.4%; box-shadow: 0 2px 0 rgba(0, 0, 0, .75), 0 22px 30px -14px rgba(0, 0, 0, .9); display: block; }
.g-path-slot.is-boss .g-path-face img { box-shadow: 0 0 0 4px var(--red), 0 0 40px rgba(240, 64, 47, .5); }

.g-run-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px 32px;
}
.g-length { margin: 0; padding: 0; border: 0; min-width: 0; }
.g-length legend { padding: 0; margin-bottom: 10px; font-family: var(--font-display); font-size: 16px; text-transform: uppercase; color: var(--paper); }
.g-length-row { display: flex; flex-wrap: wrap; gap: 10px; }
.g-length-opt { position: relative; cursor: pointer; }
.g-length-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.g-length-opt span {
  display: grid;
  gap: 2px;
  min-width: 150px;
  padding: 10px 14px 8px;
  background: var(--card-black);
  border: 3px solid rgba(255, 246, 227, .22);
  border-radius: 8px;
  transition: border-color var(--t-hover), transform var(--t-hover) var(--ease-out), background var(--t-hover);
}
.g-length-opt strong { font-family: var(--font-display); font-weight: 400; font-size: 17px; text-transform: uppercase; color: var(--paper); }
.g-length-opt small { font-size: 15px; color: #a9a4b4; }
.g-length-opt:hover span { border-color: var(--gold); transform: translateY(-2px); }
.g-length-opt input:checked + span { background: var(--gold); border-color: var(--card-black); box-shadow: 0 4px 0 var(--card-black); transform: translateY(-2px); }
.g-length-opt input:checked + span strong,
.g-length-opt input:checked + span small { color: #1d1300; }
.g-length-opt input:focus-visible + span { outline: 3px solid var(--paper); outline-offset: 3px; }

.g-deck-meter {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(50, minmax(0, 1fr));
  gap: 3px;
}
.g-deck-meter i { height: 22px; border-radius: 3px; background: rgba(255, 246, 227, .08); transition: background 300ms, transform 300ms var(--ease-deal); }
.g-deck-meter i.is-on { background: #2a3a86; }
.g-deck-meter i.is-dealt { background: var(--gold); }
.g-deck-meter i.is-boss { background: var(--red); }
.g-deck-left { grid-column: 1 / -1; margin: -6px 0 0; font-size: 16px; color: #a9a4b4; }

/* ============================================================
 * THE CARDS — shelf
 * ============================================================ */

.g-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.g-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px 7px;
  background: var(--card-black);
  border: 3px solid rgba(255, 246, 227, .24);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 17px;
  text-transform: uppercase;
  color: var(--paper);
  cursor: pointer;
  transition: background var(--t-hover), border-color var(--t-hover), transform var(--t-hover) var(--ease-out);
}
.g-tab-count { padding: 3px 7px 1px; border-radius: 4px; background: rgba(255, 246, 227, .14); font-size: 14px; }
.g-tab:hover { border-color: var(--gold); transform: translateY(-2px); }
.g-tab[aria-selected="true"] { background: var(--gold); color: #1d1300; border-color: var(--card-black); box-shadow: 0 4px 0 var(--card-black); }
.g-tab[aria-selected="true"] .g-tab-count { background: rgba(0, 0, 0, .15); }
.g-tab:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }

.g-shelf[hidden] { display: none; }
.g-shelf-track {
  list-style: none;
  margin: 0;
  display: flex;
  gap: clamp(18px, 2vw, 30px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  padding: 36px max(var(--gutter), calc((100vw - var(--content)) / 2)) 56px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--content)) / 2));
  scrollbar-width: none;
}
.g-shelf-track::-webkit-scrollbar { display: none; }
.g-shelf-item { flex: 0 0 clamp(230px, 23vw, 310px); scroll-snap-align: start; }

.g-card {
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0px;
  display: block;
  width: 100%;
  aspect-ratio: 460 / 686;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 5% / 3.4%;
  cursor: pointer;
  perspective: 1200px;
  transform: translateY(var(--lift)) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 260ms var(--ease-out);
}
.g-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 620ms var(--ease-deal);
}
.g-card[aria-pressed="true"] .g-card-inner { transform: rotateY(180deg); }

.g-card-front,
.g-card .g-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 5% / 3.4%;
}
.g-card-front img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .75), 0 30px 40px -18px rgba(0, 0, 0, .9);
}
.g-card-front::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .3) 50%, transparent 65%);
  background-size: 250% 100%;
  background-position: var(--mx, 50%) 0;
  opacity: 0;
  transition: opacity 200ms;
}

.g-card .g-card-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10% 9%;
  border: 8px solid var(--card-black);
  background:
    linear-gradient(180deg, rgba(255, 246, 227, .96), rgba(244, 232, 205, .96));
  color: #16110a;
  text-align: left;
  box-shadow: 0 30px 40px -18px rgba(0, 0, 0, .9);
  overflow: hidden;
}
.g-card-type { font-size: 15px; color: #6d6047; }
.g-card-name { font-family: var(--font-display); font-size: clamp(20px, 1.9vw, 26px); line-height: 1; text-transform: uppercase; color: var(--card-black); }
.g-card-lines { display: grid; gap: 10px; }
.g-card-line { display: flex; gap: 8px; align-items: flex-start; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.3; }
.g-card-line .g-num { width: 24px; height: 24px; font-size: 13px; border-width: 2px; }
.g-card-line strong { font-weight: 400; font-family: var(--font-display); font-size: .92em; text-transform: uppercase; }
.g-card-badges { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.g-badge { padding: 5px 8px 3px; border: 2px solid var(--card-black); border-radius: 4px; font-family: var(--font-display); font-size: 12px; text-transform: uppercase; background: #fff; }
.g-badge--single { background: var(--card-blush); }
.g-badge--permanent { background: #9fe0b6; }
.g-badge--combo { background: var(--gold); }

@media (hover: hover) and (pointer: fine) {
  .g-card:hover { --lift: -12px; }
  .g-card:hover .g-card-front::after { opacity: 1; }
}
.g-card:focus-visible { outline: none; }
.g-card:focus-visible .g-card-front img,
.g-card:focus-visible .g-card-back { box-shadow: 0 0 0 4px var(--gold), 0 30px 40px -18px rgba(0, 0, 0, .9); }

.g-shelf-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: -20px; }
.g-shelf-nav { display: flex; gap: 10px; }
.g-shelf-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }

/* ============================================================
 * WHY PLAY
 * ============================================================ */

.g-why-grid {
  list-style: none;
  margin: clamp(28px, 4vw, 52px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.g-why-item {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
  padding: clamp(18px, 2.5vw, 32px);
  background: var(--g-panel);
  border-radius: 18px;
  box-shadow: inset 0 0 0 2px var(--g-line);
}
.g-why-text h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
}
.g-why-text p { margin: 10px 0 0; font-size: 18px; line-height: 1.4; color: var(--paper-dim); }

.g-why-vis { position: relative; display: flex; align-items: center; justify-content: center; min-height: 170px; }
.g-why-vis--shuffle .g-card-back { position: absolute; width: 36%; aspect-ratio: 460 / 686; transition: transform 500ms var(--ease-deal); }
.g-why-vis--shuffle .g-card-back:nth-child(1) { transform: translateX(-46%) rotate(-14deg); }
.g-why-vis--shuffle .g-card-back:nth-child(2) { transform: translateX(-16%) rotate(-5deg); }
.g-why-vis--shuffle .g-card-back:nth-child(3) { transform: translateX(14%) rotate(5deg); }
.g-why-vis--shuffle .g-card-back:nth-child(4) { transform: translateX(44%) rotate(14deg); }
.g-why-item:hover .g-why-vis--shuffle .g-card-back:nth-child(1) { transform: translateX(34%) rotate(8deg); }
.g-why-item:hover .g-why-vis--shuffle .g-card-back:nth-child(4) { transform: translateX(-36%) rotate(-10deg); }
.g-why-vis--faces { flex-wrap: wrap; gap: 8px; }
.g-why-vis--combo img { width: 40%; height: auto; border-radius: 5% / 3.4%; box-shadow: 0 2px 0 rgba(0, 0, 0, .7), 0 16px 24px -10px rgba(0, 0, 0, .8); }
.g-why-vis--combo img:first-child { rotate: -8deg; }
.g-why-vis--combo img:last-child { rotate: 8deg; }
.g-plus { margin: 0 -6px; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; padding-top: 4px; border-radius: 50%; background: var(--gold); border: 3px solid var(--card-black); font-family: var(--font-display); font-size: 24px; color: #1d1300; }
.g-why-vis--pvp img { width: 100%; height: auto; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .6)); }

/* ============================================================
 * CLIMAX — the boss is waiting
 * ============================================================ */

.g-climax {
  position: relative;
  overflow: hidden;
  padding-block: clamp(80px, 10vw, 150px);
  background: radial-gradient(ellipse 50% 60% at 30% 50%, rgba(240, 64, 47, .16), transparent 70%);
}
.g-climax-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}
.g-climax-art { position: relative; display: grid; place-items: center; }
.g-climax-glow {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 198, 41, .28), rgba(240, 64, 47, .18) 45%, transparent 70%);
  filter: blur(8px);
}
.g-climax-art img {
  position: relative;
  width: min(100%, 460px);
  height: auto;
  background: #fff;
  border: 12px solid var(--card-black);
  border-radius: 18px;
  box-shadow: 0 14px 0 rgba(0, 0, 0, .55), 0 60px 90px -40px #000;
  rotate: -4deg;
}
.g-climax-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(46px, 6.4vw, 104px);
  line-height: .9;
  text-transform: uppercase;
  color: var(--paper);
  -webkit-text-stroke: .08em var(--card-black);
  paint-order: stroke fill;
  text-shadow: 0 .06em 0 var(--card-black);
  text-wrap: balance;
}
.g-climax-title .glitch { color: var(--paper); }
.g-climax-actions { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-4); }
.g-climax-actions .btn--lg { font-size: clamp(19px, 1.6vw, 24px); }

.g-body .site-footer { margin-top: 0; }

/* ============================================================
 * RESPONSIVE
 * ============================================================ */

@media (max-width: 1100px) {
  .g-arena { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .g-you { grid-column: 1 / -1; flex-direction: row; border-left: 0; border-top: 2px dashed var(--g-line); padding: 16px 0 0; }
  .g-chips--you { max-width: none; }
  .g-roster { grid-template-columns: repeat(9, 110px); overflow-x: auto; padding: 10px 2px 12px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .g-roster::-webkit-scrollbar { display: none; }
  .g-roster-btn { scroll-snap-align: start; }
}

@media (max-width: 1023px) {
  .g-hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .g-table { max-width: min(520px, 100%); margin-inline: auto; }

  .g-what-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .g-loop { grid-template-columns: 1fr; }
  .g-loop-tabs {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .g-loop-tabs::-webkit-scrollbar { display: none; }
  .g-loop-tab { border-left: 0; border-bottom: 4px solid rgba(255, 246, 227, .14); border-radius: 10px 10px 0 0; min-height: 54px; scroll-snap-align: start; }
  .g-loop-tab[aria-selected="true"] { border-bottom-color: var(--gold); background: linear-gradient(0deg, rgba(255, 198, 41, .16), rgba(255, 198, 41, 0)); }

  .g-why-grid { grid-template-columns: 1fr; }
  .g-climax-grid { grid-template-columns: 1fr; }
  .g-climax-art img { width: min(70%, 380px); }
}

@media (max-width: 760px) {
  .g-loop-panel { grid-template-columns: 1fr; padding-bottom: 84px; gap: 8px; }
  .g-loop-visual { min-height: 260px; }
  .g-loop-stage { min-height: 0; }

  .g-arena { grid-template-columns: 1fr; }
  .g-foe { display: grid; grid-template-columns: 120px 1fr; column-gap: 16px; align-items: start; }
  .g-foe-art { grid-row: span 3; border-width: 5px; border-radius: 10px; }
  .g-foe-plate { margin: 0; padding: 10px 16px 5px; font-size: 18px; align-self: end; }
  .g-foe-life { margin-top: 8px; }
  .g-foe-list-label, .g-attacks { grid-column: 1 / -1; }
  .g-foe .g-tag { font-size: 12px; padding: 6px 7px 3px; top: 6px; left: 6px; }
  .g-duel { flex-direction: row; flex-wrap: wrap; }
  .g-duel-die { padding: 6px; }
  .g-duel-status { flex: 1 1 180px; text-align: left; }
  .g-duel-actions { width: 100%; }
  .g-duel-actions .btn { flex: 1 1 auto; }
  .g-log { max-width: none; }
  .g-you { flex-wrap: wrap; }

  .g-run-board { padding: 18px 0 20px; background: transparent; box-shadow: none; }
  /* the path becomes a swipeable row instead of five tiny cards */
  .g-path {
    grid-template-columns: repeat(5, 132px);
    overflow-x: auto;
    padding: 0 var(--gutter) 10px;
    margin-inline: calc(-1 * var(--gutter));
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .g-path::-webkit-scrollbar { display: none; }
  .g-path-slot { scroll-snap-align: start; }
  .g-path::before { left: 60px; right: 60px; }
  .g-run-controls { grid-template-columns: 1fr; }
  .g-run-controls > .btn { width: 100%; }
  .g-length-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-length-opt span { min-width: 0; padding: 8px 8px 6px; }
  .g-length-opt small { font-size: 14px; }
  .g-deck-meter { grid-template-columns: repeat(25, minmax(0, 1fr)); }
  .g-deck-meter i { height: 12px; }

  .g-why-item { grid-template-columns: 1fr; }
  .g-why-vis { min-height: 150px; }

  .g-head--row { align-items: flex-start; }
}

@media (max-width: 640px) {
  .g-body .btn__face { white-space: normal; text-align: center; line-height: 1.1; }
  .g-hero { padding-top: 8px; }
  .g-hero-logo { width: min(64vw, 280px); }
  .g-hero-actions { flex-direction: column; }
  .g-hero-actions .btn, .g-climax-actions .btn { width: 100%; }
  .g-climax-actions { flex-direction: column; }

  .g-table { aspect-ratio: 1 / 1; }
  .g-table-foe { left: 26%; width: 52%; }
  .g-table-hand { left: 7%; width: 50%; }
  .g-hand-card--1 { rotate: -10deg; }
  .g-table-die { right: 4%; bottom: 26%; }

  .g-what-grid { grid-template-columns: 1fr; gap: 28px; }
  .g-what-item { display: grid; grid-template-columns: clamp(96px, 30vw, 132px) minmax(0, 1fr); column-gap: 16px; align-items: center; }
  .g-what-vis { grid-row: span 2; height: 120px; }
  .g-what-item h3 { margin-top: 0; align-self: end; }
  .g-what-item p { align-self: start; }
  .g-what-vis--cards img { width: 58px; }
  .g-what-vis--cards img:first-child { margin-right: -18px; }
  .g-what-vis--die { gap: 5px; }
  .g-what-vis--die .g-die--sm { --s: 28px; }
  .g-chips--stack { --c: 20px; max-width: calc(20px * 5 + 20px); }

  .g-scene-card { width: 140px; }
  .g-scene--hit { flex-direction: column; gap: 12px; }
  .g-scene--hit .g-scene-card { width: 104px; }
  .g-attacks--scene li { font-size: 14px; padding: 6px 10px; }

  .g-screen { border-width: 6px; border-radius: 12px; }
  .g-shelf-item { flex-basis: 72vw; scroll-snap-align: center; }
  .g-shelf-foot { margin-top: -28px; }

  .g-climax-art img { width: 78%; border-width: 8px; }
}

/* ============================================================
 * MOTION
 * ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  @keyframes g-rise { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
  @keyframes g-deal { from { opacity: 0; translate: 0 60px; rotate: -6deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
  @keyframes g-idle { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-9px) rotate(.7deg); } }
  @keyframes g-flip { from { transform: rotateY(90deg) translateX(-30%); opacity: .6; } to { transform: none; opacity: 1; } }
  @keyframes g-draw { from { transform: translate(-60%, 20%) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes g-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }

  /* hero: copy rises, the table is dealt, then the monster breathes */
  .motion-ok .g-hero-copy > * { animation: g-rise 600ms var(--ease-out) both; }
  .motion-ok .g-hero-copy > :nth-child(2) { animation-delay: 80ms; }
  .motion-ok .g-hero-copy > :nth-child(3) { animation-delay: 160ms; }
  .motion-ok .g-hero-copy > :nth-child(4) { animation-delay: 220ms; }
  .motion-ok .g-table-foe { animation: g-deal 800ms var(--ease-deal) 200ms both; }
  .motion-ok .g-table-hand { animation: g-deal 700ms var(--ease-deal) 420ms both; }
  .motion-ok .g-table-die { animation: g-pop 520ms var(--ease-deal) 700ms both; }
  .motion-ok .g-table-you { animation: g-rise 500ms var(--ease-out) 820ms both; }
  .motion-ok .g-idle { animation: g-idle 6.5s ease-in-out 1.2s infinite; }
  .motion-ok .g-idle-slow { animation: g-idle 8s ease-in-out infinite; }

  /* step scenes play their small beat when the step is selected */
  .motion-ok .g-loop-panel.is-entering .g-flip-in { animation: g-flip 560ms var(--ease-deal) both; }
  .motion-ok .g-loop-panel.is-entering .g-draw-in { animation: g-draw 600ms var(--ease-deal) both; }
  .motion-ok .g-loop-panel.is-entering .g-roll-in .g-die-face { animation: die-tumble 700ms cubic-bezier(.3, .7, .3, 1) both; }
  .motion-ok .g-loop-panel.is-entering .g-burst { animation: g-pop 460ms var(--ease-deal) 380ms both; }
  .motion-ok .g-loop-panel.is-entering .g-loop-text > * { animation: g-rise 420ms var(--ease-out) both; }
  .motion-ok .g-loop-panel.is-entering .g-loop-text > :nth-child(3) { animation-delay: 60ms; }
  .motion-ok .g-loop-panel.is-entering .g-loop-text > :nth-child(4) { animation-delay: 120ms; }
  .motion-ok .g-loop-panel.is-entering .g-attacks--scene li.is-hit { animation: g-pop 420ms var(--ease-deal) 420ms both; }

  .motion-ok.reveal-ready [data-reveal] { transition: opacity 620ms var(--ease-out), translate 720ms var(--ease-deal); }
  .motion-ok.reveal-ready [data-reveal]:not(.is-in) { opacity: 0; translate: 0 30px; }
  .motion-ok.reveal-ready .g-what-grid > :nth-child(2),
  .motion-ok.reveal-ready .g-why-grid > :nth-child(2) { transition-delay: 80ms; }
  .motion-ok.reveal-ready .g-what-grid > :nth-child(3),
  .motion-ok.reveal-ready .g-why-grid > :nth-child(3) { transition-delay: 160ms; }
  .motion-ok.reveal-ready .g-what-grid > :nth-child(4),
  .motion-ok.reveal-ready .g-why-grid > :nth-child(4) { transition-delay: 240ms; }
}

@media (prefers-reduced-motion: reduce) {
  .g-layer, .g-card, .g-card-inner, .g-path-card-inner, .g-screen-video, .g-screen::before, .g-screen::after { transition: none !important; }
}
