/* ==========================================================================
   GaugePlay Design System — components.css  (v1.0 · 2026-10-04)
   Prefix: gp-  ·  Mobile-first (390px) · min-width breakpoints 600 / 900 / 1200
   Motion rule: the default (no-JS, reduced-motion) state is always the final,
   readable state. Animation only adds on top of it.
   ========================================================================== */

/* Registered so gauges can transition a number; the cell quantization below
   turns that smooth number into a fill that steps one cell at a time. */
@property --gp-v {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

/* ==========================================================================
   1. Layout
   ========================================================================== */
.gp-container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.gp-container--narrow { max-width: var(--container-narrow); }
.gp-section { padding-block: var(--section-y); }
.gp-section--tint { background: var(--bg-2); border-block: 1px solid var(--line); }
.gp-stack { display: flex; flex-direction: column; gap: var(--gap, var(--sp-4)); }
.gp-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, var(--sp-3)); }
.gp-grid { display: grid; gap: var(--gap, var(--sp-4)); grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 240px), 100%), 1fr)); }
.gp-divider { height: 1px; background: var(--line); border: 0; }

/* ==========================================================================
   2. Type
   ========================================================================== */
.gp-display { font-size: var(--fs-display); font-weight: var(--fw-heavy); line-height: 1.04; letter-spacing: var(--tr-display); text-wrap: balance; }
.gp-h1 { font-size: var(--fs-h1); font-weight: var(--fw-heavy); line-height: var(--lh-tight); letter-spacing: var(--tr-display); text-wrap: balance; }
.gp-h2 { font-size: var(--fs-h2); font-weight: var(--fw-heavy); line-height: 1.18; letter-spacing: var(--tr-head); text-wrap: balance; }
.gp-h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); line-height: var(--lh-snug); letter-spacing: -.02em; }
.gp-lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.gp-small { font-size: var(--fs-sm); }
.gp-caption { font-size: var(--fs-2xs); color: var(--muted); }
.gp-muted { color: var(--muted); }
.gp-em { color: var(--primary); font-style: normal; }
.gp-hl { font-style: normal; color: var(--primary); background: linear-gradient(transparent 64%, var(--primary-a16) 64%); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.gp-num { font-family: var(--font-num); font-weight: 400; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.gp-pixel { font-family: var(--font-pixel); font-weight: 400; letter-spacing: 0; }
.gp-text-system { font-family: var(--font-system); letter-spacing: 0; }
.gp-src { font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }

/* Pixel kicker — section eyebrow. Latin caps get +1px tracking on the 12px grid. */
.gp-kicker {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-pixel); font-size: var(--fs-px-1); line-height: 1;
  letter-spacing: var(--tr-px); text-transform: uppercase; color: var(--primary);
}
.gp-kicker--muted { color: var(--muted); }
/* HUD number chip (IR deck v14) */
.gp-hud {
  display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 6px;
  font-family: var(--font-num); font-size: var(--fs-num-1); line-height: 1; letter-spacing: 0;
  color: var(--primary); background: var(--bg); border: 1px solid currentColor; border-radius: var(--r-1);
}
.gp-hud--coral { color: var(--secondary); }

/* ==========================================================================
   3. Icon (sprite: assets/ds/icons.svg)
   ========================================================================== */
.gp-icon { width: var(--icon, 20px); height: var(--icon, 20px); flex: none; display: inline-block; vertical-align: middle; color: inherit; }
.gp-icon--sm { --icon: 16px; }
.gp-icon--lg { --icon: 24px; }
.gp-icon--px { shape-rendering: crispEdges; }

/* ==========================================================================
   4. Buttons — primary / ghost / quiet. Game-key depth: a hard 4px edge that
   the button sinks into on press.
   ========================================================================== */
.gp-btn {
  --btn-bg: var(--primary);
  --btn-fg: var(--on-primary);
  --btn-bd: var(--primary);
  --btn-edge: var(--primary-press);
  --btn-h: 48px;
  --btn-px: 20px;
  --btn-fs: 16px;
  --btn-depth: 4px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--btn-h); padding: 0 var(--btn-px);
  font-family: var(--font-sans); font-size: var(--btn-fs); font-weight: var(--fw-heavy); line-height: 1; letter-spacing: var(--tr-tight);
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: var(--r-4);
  box-shadow: 0 var(--btn-depth) 0 var(--btn-edge);
  margin-bottom: var(--btn-depth);
  white-space: nowrap; text-decoration: none; user-select: none; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast);
}
@media (hover: hover) {
  .gp-btn:hover { transform: translateY(-1px); box-shadow: 0 calc(var(--btn-depth) + 1px) 0 var(--btn-edge), 0 12px 28px -8px rgba(198, 255, 61, .45); }
}
.gp-btn:active { transform: translateY(var(--btn-depth)); box-shadow: 0 0 0 var(--btn-edge); transition-duration: var(--dur-instant); }
.gp-btn .gp-icon { --icon: 18px; }

.gp-btn--ghost { --btn-bg: rgba(255, 255, 255, .02); --btn-fg: var(--ink); --btn-bd: var(--line-2); --btn-edge: var(--line); }
@media (hover: hover) {
  .gp-btn--ghost:hover { --btn-bd: var(--muted); --btn-bg: rgba(255, 255, 255, .05); box-shadow: 0 calc(var(--btn-depth) + 1px) 0 var(--btn-edge); }
}
.gp-btn--quiet { --btn-bg: transparent; --btn-fg: var(--primary); --btn-bd: transparent; --btn-edge: transparent; --btn-depth: 0px; --btn-px: 8px; }
@media (hover: hover) {
  .gp-btn--quiet:hover { transform: none; box-shadow: none; text-decoration: underline; text-underline-offset: 4px; }
}
.gp-btn--quiet:active { transform: translateY(1px); }
/* Tone: coral (HOT channel, party CTA) */
.gp-btn--coral { --btn-bg: var(--secondary); --btn-bd: var(--secondary); --btn-fg: var(--on-secondary); --btn-edge: var(--secondary-press); }
@media (hover: hover) {
  .gp-btn--coral:hover { box-shadow: 0 calc(var(--btn-depth) + 1px) 0 var(--btn-edge), 0 12px 28px -8px rgba(255, 122, 89, .5); }
}

.gp-btn--sm { --btn-h: 40px; --btn-px: 14px; --btn-fs: 14px; --btn-depth: 3px; border-radius: var(--r-3); }
.gp-btn--lg { --btn-h: 56px; --btn-px: 26px; --btn-fs: 18px; }
.gp-btn--block { display: flex; width: 100%; }
.gp-btn--icon { --btn-px: 0; width: var(--btn-h); }
.gp-btn--icon.gp-btn--ghost { border-radius: var(--r-4); }

.gp-btn:disabled, .gp-btn[aria-disabled="true"] {
  --btn-bg: var(--surface-3); --btn-fg: var(--faint); --btn-bd: var(--line); --btn-edge: var(--line);
  transform: none; box-shadow: 0 var(--btn-depth) 0 var(--btn-edge); pointer-events: none;
}
.gp-btn--quiet:disabled, .gp-btn--quiet[aria-disabled="true"] { --btn-bg: transparent; --btn-bd: transparent; --btn-edge: transparent; }

/* Loading: three cells charge up */
.gp-btn[aria-busy="true"] { color: transparent; pointer-events: none; }
.gp-btn[aria-busy="true"] > * { visibility: hidden; }
.gp-btn[aria-busy="true"]::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; margin: -3px 0 0 -13px;
  background: var(--btn-fg); box-shadow: 10px 0 0 var(--btn-fg), 20px 0 0 var(--btn-fg);
  animation: gp-dots 900ms steps(1) infinite;
}

/* ==========================================================================
   5. Chips (filters, toggles)
   ========================================================================== */
.gp-chip {
  position: relative;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 36px; padding: 0 14px;
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: 1; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  white-space: nowrap; cursor: pointer;
  transition: color var(--dur-fast), background-color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-instant);
}
.gp-chip::after { content: ""; position: absolute; inset: -4px 0; } /* 44px hit area */
.gp-chip b { font-family: var(--font-num); font-weight: 400; font-size: var(--fs-num-1); color: var(--ink-2); }
@media (hover: hover) { .gp-chip:hover { color: var(--ink); border-color: var(--line-2); } }
.gp-chip:active { transform: scale(.97); }
.gp-chip__cell { width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 1px; transition: background-color var(--dur-fast); }
.gp-chip[aria-pressed="true"], .gp-chip.is-active {
  color: var(--ink); background: var(--primary-a08); border-color: var(--primary-a60);
}
.gp-chip[aria-pressed="true"] .gp-chip__cell, .gp-chip.is-active .gp-chip__cell { background: var(--primary); border-color: var(--primary); }
.gp-chip--static { cursor: default; }
.gp-chip--static:active { transform: none; }
.gp-chips { display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; padding-block: 4px; scroll-snap-type: x proximity; }
.gp-chips::-webkit-scrollbar { display: none; }
.gp-chips > * { scroll-snap-align: start; }

/* ==========================================================================
   6. Fact labels — rarity of truth (07 label rule). Text carries the meaning;
   fill / border style is the second channel, never color alone.
   ========================================================================== */
.gp-badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 7px;
  font-family: var(--font-pixel); font-size: var(--fs-px-1); font-weight: 400; line-height: 1; letter-spacing: 0;
  color: var(--muted); background: transparent; border: 1px solid var(--line-2); border-radius: var(--r-1);
  white-space: nowrap; vertical-align: middle;
}
.gp-badge::before { content: ""; width: 6px; height: 6px; flex: none; background: currentColor; }
.gp-badge--plain::before { content: none; }
/* 측정됨 — our own data. The only filled label. */
.gp-badge--measured { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
/* 외부 통계 — someone else's number; always followed by a source */
.gp-badge--external { color: var(--ink-2); border-color: var(--muted); }
.gp-badge--external::before { background: transparent; border: 1px solid currentColor; }
/* 가설 — unverified assumption */
.gp-badge--hypothesis { color: var(--muted); border-style: dashed; border-color: var(--muted); }
.gp-badge--hypothesis::before { background: transparent; border: 1px dashed currentColor; }
/* 계획 — our target */
.gp-badge--plan { color: var(--secondary); border-style: dashed; border-color: var(--secondary); }
.gp-badge--plan::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); border: 1px solid currentColor; }
/* 샘플 / 화면 설계안 — illustrative values */
.gp-badge--sample { color: var(--muted); border-style: dotted; border-color: var(--muted); }
.gp-badge--sample::before { content: none; }
/* 예시 · 제휴 아님 — sits on top of real game clips; must read on any image */
.gp-badge--example {
  color: var(--ink); background: var(--on-media); border: 1px dashed rgba(245, 247, 245, .7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.gp-badge--example::before { content: none; }
/* 데모 모드 — no tracker server; events go to console only */
.gp-badge--demo { color: var(--secondary); background: var(--secondary-a10); border-color: var(--secondary-a24); }
.gp-badge--demo::before { animation: gp-blink 1.2s steps(1) infinite; }
/* 유료 광고 포함 — we got money, free keys or goods for this post/placement (KFTC endorsement guideline,
   strategy/02 §1.6). Write it in Korean ("유료 광고 포함" / "유료 광고 · ○○게임즈"), right next to the
   thumbnail or title; never "AD"/"Sponsor" alone, never hidden in a description. Solid coral border =
   commercial; the plate is the same 72% scrim as --example, so it reads on any thumbnail. */
.gp-badge--ad {
  color: var(--ink); background: var(--on-media); border-color: var(--secondary);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.gp-badge--ad::before { background: var(--secondary); }
.gp-badge--lg { height: 24px; padding: 0 9px; }

/* Number delta — sign + arrow + color */
.gp-delta { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-num); font-size: var(--fs-num-1); line-height: 1; letter-spacing: 0; white-space: nowrap; }
.gp-delta--up { color: var(--primary); }
.gp-delta--up::before { content: "▲"; font-size: .8em; }
.gp-delta--down { color: var(--secondary); }
.gp-delta--down::before { content: "▼"; font-size: .8em; }
.gp-delta--flat { color: var(--muted); }
.gp-delta--flat::before { content: "■"; font-size: .6em; }

/* ==========================================================================
   7. Cards
   ========================================================================== */
.gp-card {
  position: relative;
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-5);
  box-shadow: var(--sh-1);
  min-width: 0;
}
@media (min-width: 600px) { .gp-card { padding: var(--sp-6); } }
.gp-card--us { border-color: var(--primary); background: linear-gradient(180deg, var(--primary-a08), var(--surface) 55%); }
.gp-card--hot { border-color: var(--secondary-a24); background: linear-gradient(180deg, var(--secondary-a10), var(--surface) 55%); }
.gp-card--flat { background: var(--bg-2); box-shadow: none; }
a.gp-card, .gp-card--interactive {
  cursor: pointer; text-decoration: none;
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-fast), box-shadow var(--dur-base) var(--ease-out);
}
@media (hover: hover) {
  a.gp-card:hover, .gp-card--interactive:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--sh-2); }
  a.gp-card.gp-card--us:hover, .gp-card--us.gp-card--interactive:hover { border-color: var(--primary); box-shadow: var(--sh-2), var(--glow-1); }
}
a.gp-card:active, .gp-card--interactive:active { transform: translateY(0) scale(.99); transition-duration: var(--dur-instant); }
.gp-card__kicker { font-family: var(--font-pixel); font-size: var(--fs-px-1); line-height: 1; color: var(--muted); }
.gp-card--us .gp-card__kicker { color: var(--primary); }
.gp-card__title { font-size: 1.25rem; font-weight: var(--fw-bold); line-height: 1.3; letter-spacing: -.02em; }
.gp-card__body { color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.gp-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; padding-top: var(--sp-3); margin-top: auto; border-top: 1px solid var(--line); }

/* Media card — thumbnail / clip with overlay labels */
.gp-media { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; color: inherit; text-decoration: none; }
.gp-media__frame {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: var(--ratio, 16 / 9);
  background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--r-4);
}
.gp-media__frame > img, .gp-media__frame > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.gp-media__frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 16, 18, .55) 0, transparent 28%, transparent 55%, rgba(11, 16, 18, .85) 100%); pointer-events: none; }
@media (hover: hover) { .gp-media:hover .gp-media__frame > img { transform: scale(1.04); } }
.gp-media__top, .gp-media__bottom { position: absolute; left: 10px; right: 10px; z-index: 1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gp-media__top { top: 10px; }
.gp-media__bottom { bottom: 10px; justify-content: space-between; }
.gp-media__dur { font-family: var(--font-num); font-size: var(--fs-num-1); line-height: 1; padding: 3px 5px; background: var(--on-media); border-radius: var(--r-1); }
.gp-media__play {
  position: absolute; z-index: 1; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: 56px; height: 56px;
  color: var(--on-primary); background: var(--primary); border-radius: var(--r-4);
  box-shadow: 0 4px 0 var(--primary-press), 0 0 32px rgba(198, 255, 61, .45);
  transition: transform var(--dur-base) var(--ease-pop);
}
.gp-media__play .gp-icon { --icon: 24px; margin-left: 3px; }
@media (hover: hover) { .gp-media:hover .gp-media__play { transform: scale(1.08); } }
.gp-media__title { font-weight: var(--fw-bold); font-size: 1rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gp-media__sub { font-size: var(--fs-xs); color: var(--muted); }

/* ==========================================================================
   8. Gauge — the brand motif.
   --gp-v: 0..1 value · --gp-cells: number of cells. Fill steps cell by cell.
   ========================================================================== */
.gp-gauge {
  --gp-cells: 10;
  --gp-gap: 3px;
  --gp-h: 14px;
  --gp-color: var(--primary);
  --gp-empty: var(--surface-3);
  --gp-q: var(--gp-v);
  display: grid; gap: var(--sp-2);
  min-width: 0;
  transition: --gp-v var(--dur-fill) var(--ease-out);
}
@supports (width: round(down, 1.5px, 1px)) {
  .gp-gauge, .gp-dial { --gp-q: calc(round(down, var(--gp-v) * var(--gp-cells) + .0001, 1) / var(--gp-cells)); }
}
.gp-gauge__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.gp-gauge__label { font-family: var(--font-pixel); font-size: var(--fs-px-1); line-height: 1; letter-spacing: 0; color: var(--muted); }
.gp-gauge__value { font-family: var(--font-num); font-size: var(--fs-num-2); line-height: 1; letter-spacing: 0; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gp-gauge__value small { font-size: var(--fs-num-1); color: var(--muted); margin-left: 2px; }
.gp-gauge__track {
  position: relative;
  padding: var(--gp-gap);
  background: var(--bg); border: 2px solid var(--line); border-radius: var(--r-1);
  transition: border-color var(--dur-base);
}
.gp-gauge__track::before { /* glow under the filled part */
  content: ""; position: absolute; left: var(--gp-gap); top: var(--gp-gap); bottom: var(--gp-gap);
  width: calc(var(--gp-q) * (100% - 2 * var(--gp-gap)));
  box-shadow: 0 0 18px 1px var(--gp-color); opacity: calc(.15 + var(--gp-q) * .35);
  pointer-events: none;
}
.gp-gauge__cells {
  position: relative; overflow: hidden;
  width: calc(100% + var(--gp-gap)); /* last gap falls into the track padding -> symmetric */
  height: var(--gp-h);
  background: var(--gp-empty);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(100% / var(--gp-cells) - var(--gp-gap)), transparent 0 calc(100% / var(--gp-cells)));
  mask: repeating-linear-gradient(90deg, #000 0 calc(100% / var(--gp-cells) - var(--gp-gap)), transparent 0 calc(100% / var(--gp-cells)));
}
.gp-gauge__fill {
  position: absolute; inset: 0 auto 0 0; overflow: hidden;
  width: calc(var(--gp-q) * 100%);
  background: var(--gp-color);
}
.gp-gauge__fill::after { /* moving light: the content never moves, only the light */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent) no-repeat;
  background-size: 35% 100%; background-position: -60% 0;
  animation: gp-sweep var(--dur-charge) linear infinite;
  mix-blend-mode: soft-light;
}
.gp-gauge__scale { display: flex; justify-content: space-between; gap: var(--sp-2); font-family: var(--font-pixel); font-size: var(--fs-px-1); line-height: 1; color: var(--muted); }
.gp-gauge__scale > .is-on { color: var(--primary); }

.gp-gauge--sm { --gp-h: 6px; --gp-gap: 2px; }
.gp-gauge--sm .gp-gauge__track { border-width: 1px; }
.gp-gauge--lg { --gp-h: 28px; --gp-gap: 4px; }
.gp-gauge--lg .gp-gauge__value { font-size: var(--fs-num-3); }
.gp-gauge--lg .gp-gauge__track { border-width: 2px; border-radius: var(--r-2); }
.gp-gauge--coral { --gp-color: var(--secondary); }
.gp-gauge.is-low { --gp-color: var(--secondary); }
.gp-gauge.is-low .gp-gauge__value { color: var(--secondary); }
.gp-gauge.is-full .gp-gauge__track { border-color: var(--gp-color); animation: gp-maxpulse 1.1s var(--ease-out) 2; }
.gp-gauge.is-full .gp-gauge__value { color: var(--gp-color); }
.gp-gauge--timer { transition-timing-function: linear; transition-duration: 200ms; }

/* Stage cells (IR deck STAGE bar) — discrete progress: steps, quiz, pages */
.gp-cells { display: inline-flex; gap: var(--cell-gap, 3px); vertical-align: middle; }
.gp-cells > i { width: var(--cell, 10px); height: var(--cell, 10px); background: var(--line); border-radius: 1px; }
.gp-cells > i.on { background: var(--primary); }
.gp-cells > i.now { background: var(--primary); animation: gp-blink 1s steps(1) infinite; }
.gp-cells--wide > i { width: calc(var(--cell, 10px) * 2.4); }

/* Dial — the logo arc: analog needle over digital cells */
.gp-dial {
  --gp-cells: 20;
  --gp-color: var(--primary);
  --gp-empty: var(--surface-3);
  --gp-q: var(--gp-v);
  --size: 220px;
  --thick: 22px;
  position: relative; display: grid; justify-items: center; gap: var(--sp-2);
  width: var(--size);
  transition: --gp-v var(--dur-fill) var(--ease-out);
}
.gp-dial__arc {
  position: relative; width: 100%; aspect-ratio: 2 / 1;
  background: conic-gradient(from -90deg at 50% 100%, var(--gp-color) 0deg calc(var(--gp-q) * 180deg), var(--gp-empty) calc(var(--gp-q) * 180deg) 180deg, transparent 180deg);
  -webkit-mask:
    radial-gradient(circle at 50% 100%, transparent calc(var(--size) / 2 - var(--thick)), #000 calc(var(--size) / 2 - var(--thick) + .5px) calc(var(--size) / 2 - 1px), transparent calc(var(--size) / 2)),
    repeating-conic-gradient(from -89deg at 50% 100%, #000 0deg calc(180deg / var(--gp-cells) - 2deg), transparent 0deg calc(180deg / var(--gp-cells)));
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle at 50% 100%, transparent calc(var(--size) / 2 - var(--thick)), #000 calc(var(--size) / 2 - var(--thick) + .5px) calc(var(--size) / 2 - 1px), transparent calc(var(--size) / 2)),
    repeating-conic-gradient(from -89deg at 50% 100%, #000 0deg calc(180deg / var(--gp-cells) - 2deg), transparent 0deg calc(180deg / var(--gp-cells)));
  mask-composite: intersect;
  filter: drop-shadow(0 0 10px rgba(198, 255, 61, calc(var(--gp-q) * .35)));
}
.gp-dial__needle {
  position: absolute; left: calc(50% - 2px); top: calc(var(--thick) + 10px);
  width: 4px; height: calc(var(--size) / 2 - var(--thick) - 10px);
  background: var(--ink); border-radius: 2px;
  transform-origin: 50% 100%;
  transform: rotate(calc(var(--gp-v) * 180deg - 90deg));
}
.gp-dial__needle::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; translate: -50% 0;
  background: var(--ink); border: 3px solid var(--bg); border-radius: 50%;
}
.gp-dial__readout { display: grid; justify-items: center; gap: 6px; margin-top: 4px; }
.gp-dial__value { font-family: var(--font-num); font-size: var(--fs-num-3); font-weight: 400; line-height: 1; letter-spacing: 0; }
.gp-dial__label { font-family: var(--font-pixel); font-size: var(--fs-px-1); line-height: 1; color: var(--muted); }
.gp-dial--sm { --size: 140px; --thick: 14px; }
.gp-dial--sm .gp-dial__value { font-size: var(--fs-num-2); }
.gp-dial--coral { --gp-color: var(--secondary); }

/* ==========================================================================
   9. Stat tile — big pixel number + label + source
   ========================================================================== */
.gp-stat {
  container-type: inline-size;
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-4);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-4);
  min-width: 0;
}
.gp-stat__label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--muted); line-height: 1.35; }
.gp-stat__value { font-family: var(--font-num); font-size: var(--fs-num-2); font-weight: 400; line-height: 1; letter-spacing: 0; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gp-stat__value small { font-size: var(--fs-num-1); color: var(--muted); margin-left: 3px; }
.gp-stat__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.gp-stat--hi { border-color: var(--primary-a32); background: linear-gradient(180deg, var(--primary-a08), var(--bg) 70%); }
.gp-stat--hi .gp-stat__value { color: var(--primary); }
.gp-stat--hot .gp-stat__value { color: var(--secondary); }
@container (min-width: 220px) { .gp-stat__value { font-size: var(--fs-num-3); } }
@container (min-width: 340px) { .gp-stat--xl .gp-stat__value { font-size: var(--fs-num-4); } }

/* ==========================================================================
   10. Tabs — underline (default) and segmented. JS (ds.js initTabs) moves the
   ink; without JS the selected tab draws its own underline.
   ========================================================================== */
.gp-tabs { position: relative; display: flex; gap: var(--sp-1); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.gp-tabs::-webkit-scrollbar { display: none; }
.gp-tab {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap); padding: 0 var(--sp-4);
  font-size: .9375rem; font-weight: var(--fw-bold); color: var(--muted);
  transition: color var(--dur-fast);
}
@media (hover: hover) { .gp-tab:hover { color: var(--ink); } }
.gp-tab[aria-selected="true"] { color: var(--ink); }
.gp-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--primary); }
.gp-tab b { font-family: var(--font-num); font-weight: 400; font-size: var(--fs-num-1); color: var(--muted); }
.gp-tab[aria-selected="true"] b { color: var(--primary); }
.gp-tabs.has-ink .gp-tab::after { content: none; }
.gp-tabs__ink {
  position: absolute; left: 0; bottom: 0; height: 3px; width: var(--ink-w, 0);
  transform: translateX(var(--ink-x, 0)); background: var(--primary);
  box-shadow: 0 0 12px rgba(198, 255, 61, .6);
  transition: transform var(--dur-slow) var(--ease-out), width var(--dur-slow) var(--ease-out);
  pointer-events: none;
}
.gp-tabs--seg { gap: 0; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-4); background: var(--bg-2); }
.gp-tabs--seg .gp-tab { flex: 1; justify-content: center; min-height: 40px; border-radius: var(--r-3); z-index: 1; }
.gp-tabs--seg .gp-tab[aria-selected="true"]::after { content: none; }
.gp-tabs--seg .gp-tab[aria-selected="true"] { background: var(--surface-3); }
.gp-tabs--seg.has-ink .gp-tab[aria-selected="true"] { background: transparent; }
.gp-tabs--seg .gp-tabs__ink { top: 4px; bottom: 4px; height: auto; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: var(--r-3); box-shadow: var(--sh-1); }
.gp-tabpanel[hidden] { display: none; }

/* ==========================================================================
   11. Steps (journey / quiz progress) and numeric stepper
   ========================================================================== */
.gp-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; counter-reset: gp-step; }
.gp-steps > li { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; counter-increment: gp-step; }
.gp-steps > li:not(:last-child)::after {
  content: ""; position: absolute; top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 4px, transparent 4px 7px);
}
.gp-steps > li.is-done:not(:last-child)::after { background: var(--primary); }
.gp-steps__dot {
  display: grid; place-items: center; width: 32px; height: 32px;
  font-family: var(--font-num); font-size: var(--fs-num-1); line-height: 1; color: var(--muted);
  background: var(--bg); border: 2px solid var(--line-2); border-radius: var(--r-2);
}
.gp-steps__dot:empty::before { content: counter(gp-step); }
.gp-steps > li.is-done .gp-steps__dot { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.gp-steps > li.is-now .gp-steps__dot { color: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-a16); animation: gp-nowpulse 1.6s var(--ease-in-out) infinite; }
.gp-steps__label { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--muted); line-height: 1.3; }
.gp-steps > li.is-done .gp-steps__label, .gp-steps > li.is-now .gp-steps__label { color: var(--ink); }
.gp-steps__sub { display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 2px; }

.gp-stepper { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-4); }
.gp-stepper__btn {
  display: grid; place-items: center; width: var(--tap); height: var(--tap);
  color: var(--ink); background: var(--surface-3); border: 1px solid var(--line-2); border-radius: var(--r-3);
  transition: background-color var(--dur-fast), transform var(--dur-instant), color var(--dur-fast);
}
@media (hover: hover) { .gp-stepper__btn:hover { background: var(--line); } }
.gp-stepper__btn:active { transform: scale(.94); }
.gp-stepper__btn:disabled, .gp-stepper__btn[aria-disabled="true"] { color: var(--faint); background: transparent; border-color: var(--line); cursor: not-allowed; }
.gp-stepper__btn[aria-disabled="true"]:active { transform: none; }
.gp-stepper__value { min-width: 64px; text-align: center; font-family: var(--font-num); font-size: var(--fs-num-2); line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.gp-stepper__value small { font-family: var(--font-sans); font-size: var(--fs-xs); color: var(--muted); margin-left: 4px; }
.gp-stepper.is-bump .gp-stepper__value { animation: gp-bump var(--dur-base) var(--ease-pop); }

/* ==========================================================================
   12. Overlays — bottom sheet & modal (native <dialog>, driven by ds.js)
   ========================================================================== */
dialog.gp-sheet, dialog.gp-modal {
  padding: 0; border: 1px solid var(--line-2); color: var(--ink); background: var(--surface-2);
  box-shadow: var(--sh-3); overflow: hidden;
}
dialog.gp-sheet[open], dialog.gp-modal[open] { display: flex; flex-direction: column; }
dialog.gp-sheet::backdrop, dialog.gp-modal::backdrop { background: var(--scrim); opacity: 0; transition: opacity var(--dur-slow) var(--ease-out); }
dialog.gp-sheet.is-open::backdrop, dialog.gp-modal.is-open::backdrop { opacity: 1; }
@supports ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  dialog.gp-sheet::backdrop, dialog.gp-modal::backdrop { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
}

dialog.gp-sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto;
  width: 100%; max-width: 560px; max-height: min(88dvh, 760px);
  border-bottom: 0; border-radius: var(--r-6) var(--r-6) 0 0;
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  touch-action: pan-y;
}
dialog.gp-sheet.is-open { transform: translateY(var(--drag, 0px)); }
dialog.gp-sheet.is-dragging { transition: none; }
.gp-sheet__grip { display: grid; place-items: center; padding: 10px 0 2px; cursor: grab; touch-action: none; }
.gp-sheet__grip::before { content: ""; width: 36px; height: 4px; border-radius: 1px; background: repeating-linear-gradient(90deg, var(--line-2) 0 8px, transparent 8px 9.33px); }
.gp-sheet__head, .gp-modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5) var(--sp-3); touch-action: none; }
.gp-sheet__title, .gp-modal__title { font-size: 1.125rem; font-weight: var(--fw-heavy); letter-spacing: -.02em; line-height: 1.3; }
.gp-sheet__body, .gp-modal__body { padding: 0 var(--sp-5) var(--sp-5); overflow-y: auto; overscroll-behavior: contain; color: var(--ink-2); }
.gp-sheet__foot, .gp-modal__foot { display: flex; gap: var(--sp-2); padding: var(--sp-3) var(--sp-5) calc(var(--sp-4) + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface-2); }
.gp-sheet__foot > .gp-btn, .gp-modal__foot > .gp-btn { flex: 1; }
.gp-close {
  display: grid; place-items: center; width: 40px; height: 40px; margin-right: -8px;
  color: var(--muted); border-radius: var(--r-3); transition: color var(--dur-fast), background-color var(--dur-fast);
}
@media (hover: hover) { .gp-close:hover { color: var(--ink); background: var(--surface-3); } }

dialog.gp-modal {
  position: fixed; inset: 0; margin: auto;
  width: calc(100% - 32px); max-width: 460px; max-height: calc(100dvh - 48px); height: fit-content;
  border-radius: var(--r-5);
  opacity: 0; transform: translateY(12px) scale(.97);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-slow) var(--ease-pop);
}
dialog.gp-modal.is-open { opacity: 1; transform: none; }
.gp-modal__head { padding-top: var(--sp-5); }
.gp-modal__foot { padding-bottom: var(--sp-4); }
.gp-modal__art { display: grid; place-items: center; padding: var(--sp-6) 0 0; }
html.gp-locked { overflow: hidden; }

/* ==========================================================================
   13. Toast (ds.js toast()) — auto-dismiss timer drawn as a draining gauge
   ========================================================================== */
.gp-toasts {
  position: fixed; z-index: var(--z-toast);
  left: 12px; right: 12px; bottom: calc(var(--toast-offset, 16px) + var(--safe-b));
  display: flex; flex-direction: column-reverse; align-items: center; gap: var(--sp-2);
  pointer-events: none;
}
.gp-has-tabbar .gp-toasts { --toast-offset: calc(var(--tabbar-h) + 12px); }
@media (min-width: 900px) { .gp-toasts { left: auto; right: 24px; bottom: 24px; align-items: flex-end; } }
.gp-toast {
  pointer-events: auto; position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--sp-3);
  width: 100%; max-width: 420px; padding: 12px 8px 14px 14px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-4);
  box-shadow: var(--sh-3);
  animation: gp-toast-in var(--dur-slow) var(--ease-pop);
}
.gp-toast.is-leaving { animation: gp-toast-out var(--dur-base) var(--ease-in) forwards; }
.gp-toast__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-2); background: var(--surface-3); color: var(--ink); }
.gp-toast__msg { font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: 1.45; color: var(--ink); }
.gp-toast__msg small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
.gp-toast__actions { display: flex; align-items: center; gap: 2px; }
.gp-toast__timer {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: repeating-linear-gradient(90deg, var(--toast-color, var(--muted)) 0 10px, transparent 10px 12px);
  transform-origin: left center;
  animation: gp-drain var(--toast-dur, 4000ms) linear forwards;
}
.gp-toast:hover .gp-toast__timer, .gp-toast:focus-within .gp-toast__timer, .gp-toast.is-paused .gp-toast__timer { animation-play-state: paused; }
.gp-toast--success { --toast-color: var(--primary); }
.gp-toast--success .gp-toast__icon { background: var(--primary); color: var(--on-primary); }
.gp-toast--warn { --toast-color: var(--secondary); border-color: var(--secondary-a24); }
.gp-toast--warn .gp-toast__icon { background: var(--secondary); color: var(--on-secondary); }

/* ==========================================================================
   14. Navigation — top nav, mobile tab bar, logo, announcement
   ========================================================================== */
.gp-logo { display: inline-flex; align-items: center; gap: 9px; font-weight: var(--fw-heavy); font-size: 1.1875rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none; line-height: 1; }
.gp-logo b { color: var(--primary); font-weight: inherit; }
.gp-logo .gp-icon { --icon: 26px; }

.gp-ann { display: block; padding: 9px var(--gutter); text-align: center; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--on-primary); background: var(--primary); }
.gp-ann a { text-decoration: underline; text-underline-offset: 3px; margin-left: 6px; }

.gp-nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: var(--glass); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
.gp-nav__inner { display: flex; align-items: center; gap: var(--sp-4); height: var(--nav-h); max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.gp-nav__links { display: none; }
.gp-nav__actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.gp-nav__actions .gp-btn { margin-bottom: 0; }
.gp-nav__link { position: relative; padding: 8px 12px; border-radius: var(--r-3); font-size: .9375rem; font-weight: var(--fw-semibold); color: var(--muted); transition: color var(--dur-fast), background-color var(--dur-fast); }
@media (hover: hover) { .gp-nav__link:hover { color: var(--ink); background: var(--surface); } }
.gp-nav__link[aria-current="page"] { color: var(--ink); }
.gp-nav__link[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 6px; height: 6px; translate: -50% 0; background: var(--primary); }
@media (min-width: 900px) {
  :root { --nav-h: 64px; }
  .gp-nav__links { display: flex; gap: 2px; margin-left: var(--sp-6); }
}

.gp-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-tabbar);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 6px calc(6px + var(--safe-b));
  background: var(--glass); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
.gp-tabbar__item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 50px; padding: 4px 2px; border-radius: var(--r-3);
  font-size: 11px; font-weight: var(--fw-bold); line-height: 1; color: var(--muted); text-decoration: none;
  transition: color var(--dur-fast);
}
.gp-tabbar__item .gp-icon { --icon: 22px; transition: transform var(--dur-base) var(--ease-pop); }
.gp-tabbar__item:active .gp-icon { transform: scale(.88); }
.gp-tabbar__item[aria-current="page"] { color: var(--ink); }
.gp-tabbar__item[aria-current="page"] .gp-icon { color: var(--primary); }
.gp-tabbar__item[aria-current="page"]::before { content: ""; position: absolute; top: -7px; width: 18px; height: 3px; background: var(--primary); box-shadow: 0 0 10px rgba(198, 255, 61, .7); }
.gp-tabbar__item .gp-tabbar__dot { position: absolute; top: 4px; left: calc(50% + 8px); width: 7px; height: 7px; background: var(--secondary); border: 2px solid var(--bg); box-sizing: content-box; }
.gp-tabbar--inline { position: absolute; } /* inside a phone mock */
.gp-has-tabbar { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); }
@media (min-width: 900px) {
  .gp-tabbar--mobile { display: none; }
  .gp-has-tabbar { padding-bottom: 0; }
}

/* ==========================================================================
   15. Phone frame mockup (desktop showcases of the mobile feed)
   ========================================================================== */
.gp-phone {
  --phone-w: 300px;
  position: relative; flex: none;
  width: var(--phone-w); aspect-ratio: 9 / 19.5;
  padding: calc(var(--phone-w) * .034);
  border-radius: calc(var(--phone-w) * .165);
  background: linear-gradient(160deg, #26323a 0%, #0c1114 38%, #05080a 100%);
  box-shadow: inset 0 0 0 1.5px #3a4851, inset 0 0 0 4px #0a0f12, 0 0 0 1px #000, var(--sh-3);
}
.gp-phone::before, .gp-phone::after { /* side keys */
  content: ""; position: absolute; width: 3px; border-radius: 2px; background: #2a353c;
}
.gp-phone::before { left: -3px; top: 22%; height: 9%; box-shadow: 0 calc(var(--phone-w) * .2) 0 #2a353c; }
.gp-phone::after { right: -3px; top: 28%; height: 13%; }
.gp-phone__screen {
  position: relative; width: 100%; height: 100%; overflow: hidden; isolation: isolate;
  border-radius: calc(var(--phone-w) * .13);
  background: #000; color: var(--ink);
  container-type: inline-size;
}
.gp-phone__island { position: absolute; z-index: 30; top: calc(var(--phone-w) * .03); left: 50%; translate: -50% 0; width: 31%; height: calc(var(--phone-w) * .088); border-radius: 999px; background: #000; }
.gp-phone__status {
  position: absolute; z-index: 29; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(var(--phone-w) * .145); padding: 0 calc(var(--phone-w) * .08) 0 calc(var(--phone-w) * .1);
  font-family: -apple-system, "SF Pro Text", var(--font-sans); font-size: calc(var(--phone-w) * .046); font-weight: 700; letter-spacing: 0;
  color: #fff; pointer-events: none;
}
.gp-phone__status svg { height: calc(var(--phone-w) * .04); width: auto; }
.gp-phone__home { position: absolute; z-index: 29; bottom: calc(var(--phone-w) * .022); left: 50%; translate: -50% 0; width: 36%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .85); pointer-events: none; }
.gp-phone__glare { position: absolute; inset: 0; z-index: 28; pointer-events: none; border-radius: inherit; background: linear-gradient(115deg, rgba(255, 255, 255, .07) 0%, transparent 32%); }
.gp-phone--glow { box-shadow: inset 0 0 0 1.5px #3a4851, inset 0 0 0 4px #0a0f12, 0 0 0 1px #000, var(--sh-3), 0 0 90px -10px rgba(198, 255, 61, .35); }
.gp-phone--float { animation: gp-float 6s var(--ease-in-out) infinite; }

/* Reel kit — vertical clip screen inside a phone or the real /feed */
.gp-reel { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.gp-reel > img, .gp-reel > video, .gp-reel > iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.gp-reel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .5) 0, transparent 20%, transparent 42%, rgba(0, 0, 0, .6) 64%, rgba(0, 0, 0, .94) 100%); pointer-events: none; }
.gp-reel__top { position: absolute; z-index: 2; top: 15cqw; left: 5cqw; right: 5cqw; display: flex; gap: 6px; flex-wrap: wrap; }
.gp-reel__rail { position: absolute; z-index: 2; right: 3.5cqw; bottom: 34cqw; display: grid; gap: 5cqw; justify-items: center; font-size: 3.6cqw; font-weight: 700; }
.gp-reel__rail span { display: grid; justify-items: center; gap: 1cqw; }
.gp-reel__rail .gp-icon { --icon: 8.5cqw; }
.gp-reel__body { position: relative; z-index: 2; display: grid; gap: 3cqw; padding: 0 5cqw 9cqw; padding-right: 18cqw; }
.gp-reel__channel { font-size: 4cqw; font-weight: 800; display: flex; align-items: center; gap: 2cqw; }
.gp-reel__title { font-size: 4.4cqw; line-height: 1.4; color: var(--ink-2); }
.gp-reel__cta { margin-right: -13cqw; }

/* ==========================================================================
   16. Event log — tracked journey events, newest first
   ========================================================================== */
.gp-log { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-4); background: var(--bg); overflow: hidden; }
.gp-log__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); font-family: var(--font-pixel); font-size: var(--fs-px-1); color: var(--muted); line-height: 1; }
.gp-log__list { display: flex; flex-direction: column; max-height: var(--log-h, 320px); overflow-y: auto; }
.gp-log__item {
  position: relative;
  display: grid; grid-template-columns: 6px auto 1fr auto; grid-template-areas: "mark time ev val" "mark detail detail val";
  column-gap: 10px; row-gap: 3px; align-items: center;
  padding: 10px 14px; border-top: 1px solid var(--line);
}
.gp-log__item:first-child { border-top: 0; }
.gp-log__mark { grid-area: mark; align-self: stretch; width: 6px; border-radius: 1px; background: var(--line-2); }
.gp-log__time { grid-area: time; font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gp-log__event { grid-area: ev; font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-log__detail { grid-area: detail; font-size: var(--fs-xs); color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-log__val { grid-area: val; font-family: var(--font-num); font-size: var(--fs-num-1); color: var(--ink-2); white-space: nowrap; }
.gp-log__item[data-kind="impression"] .gp-log__mark { background: var(--line-2); }
.gp-log__item[data-kind="land"] .gp-log__mark { background: var(--muted); }
.gp-log__item[data-kind="play"] .gp-log__mark { background: var(--primary); }
.gp-log__item[data-kind="store"] .gp-log__mark { background: var(--secondary); }
.gp-log__item[data-kind="store"] .gp-log__val { color: var(--secondary); }
.gp-log__item.is-new { animation: gp-flash 1.4s var(--ease-out); }
.gp-log__empty { padding: 28px 14px; text-align: center; font-size: var(--fs-sm); color: var(--muted); }
@media (min-width: 600px) {
  .gp-log__item { grid-template-columns: 6px 66px minmax(96px, max-content) 1fr auto; grid-template-areas: "mark time ev detail val"; column-gap: 14px; }
}

/* ==========================================================================
   17. Empty state & skeleton
   ========================================================================== */
.gp-empty {
  display: grid; justify-items: center; align-content: center; text-align: center; gap: var(--sp-3);
  padding: var(--sp-10) var(--sp-5);
  border: 1px dashed var(--line-2); border-radius: var(--r-5);
  background: radial-gradient(320px 160px at 50% 0, var(--primary-a08), transparent 70%);
}
.gp-empty__art { width: 96px; height: 96px; color: var(--muted); shape-rendering: crispEdges; }
.gp-empty__title { font-size: 1.125rem; font-weight: var(--fw-heavy); letter-spacing: -.02em; }
.gp-empty__text { max-width: 34ch; font-size: var(--fs-sm); color: var(--muted); }
.gp-empty .gp-row { justify-content: center; margin-top: var(--sp-2); }

.gp-skel { position: relative; overflow: hidden; display: block; background: var(--surface-3); border-radius: var(--r-1); }
.gp-skel::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent);
  animation: gp-skel 1.5s var(--ease-in-out) infinite;
}
.gp-skel--line { height: 12px; }
.gp-skel--title { height: 20px; width: 62%; }
.gp-skel--media { aspect-ratio: var(--ratio, 16 / 9); border-radius: var(--r-4); }
.gp-skel--num { height: 30px; width: 40%; }
.gp-skel--pill { height: 36px; width: 88px; border-radius: var(--r-pill); }

/* ==========================================================================
   18. Forms — field, input, choice cards
   ========================================================================== */
.gp-field { display: grid; gap: var(--sp-2); min-width: 0; }
.gp-label { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink-2); }
.gp-label small { font-weight: 400; color: var(--muted); }
.gp-input {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font-size: var(--fs-body); line-height: 1.4; color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--faint); border-radius: var(--r-4); /* faint = 4.2:1 boundary (WCAG 1.4.11) */
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background-color var(--dur-fast);
  appearance: none; -webkit-appearance: none;
}
.gp-input::placeholder { color: var(--muted); opacity: .72; } /* ~4.9:1; examples only — labels carry meaning */
@media (hover: hover) { .gp-input:hover { border-color: var(--muted); } }
.gp-input:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-a16); background: var(--bg); }
.gp-input[aria-invalid="true"] { border-color: var(--secondary); }
.gp-input[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px var(--secondary-a24); }
textarea.gp-input { min-height: 112px; resize: vertical; }
select.gp-input {
  padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a7b0b0' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.gp-hint { font-size: var(--fs-xs); color: var(--muted); }
.gp-error { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--secondary); }
.gp-error[hidden] { display: none; }
.gp-count { font-family: var(--font-num); font-size: var(--fs-num-1); line-height: 1; color: var(--muted); }
.gp-count.is-over { color: var(--secondary); }

.gp-choices { display: grid; gap: var(--sp-2); grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 150px), 100%), 1fr)); border: 0; padding: 0; margin: 0; min-width: 0; }
.gp-choice { position: relative; display: block; cursor: pointer; }
.gp-choice > input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.gp-choice__box {
  position: relative; display: grid; gap: 6px; align-content: start;
  min-height: 88px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-4);
  transition: border-color var(--dur-fast), background-color var(--dur-fast), transform var(--dur-instant), box-shadow var(--dur-base);
}
.gp-choice__box .gp-icon { --icon: 24px; color: var(--muted); transition: color var(--dur-fast); }
.gp-choice__box b { font-size: .9375rem; font-weight: var(--fw-bold); }
.gp-choice__box small { font-size: var(--fs-xs); color: var(--muted); }
.gp-choice__box::after { /* selection cell */
  content: ""; position: absolute; top: 12px; right: 12px; width: 12px; height: 12px;
  border: 2px solid var(--faint); border-radius: 2px; background: transparent;
  transition: background-color var(--dur-fast), border-color var(--dur-fast);
}
@media (hover: hover) { .gp-choice:hover .gp-choice__box { border-color: var(--line-2); } }
.gp-choice:active .gp-choice__box { transform: scale(.98); }
.gp-choice > input:checked + .gp-choice__box { border-color: var(--primary); background: var(--primary-a08); box-shadow: var(--glow-1); }
.gp-choice > input:checked + .gp-choice__box .gp-icon { color: var(--primary); }
.gp-choice > input:checked + .gp-choice__box::after { background: var(--primary); border-color: var(--primary); }
.gp-choice > input:focus-visible + .gp-choice__box { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ==========================================================================
   19. Keyframes
   ========================================================================== */
@keyframes gp-sweep { from { background-position: -60% 0; } to { background-position: 160% 0; } }
@keyframes gp-maxpulse { 0% { box-shadow: 0 0 0 0 var(--primary-a60); } 100% { box-shadow: 0 0 0 10px rgba(198, 255, 61, 0); } }
@keyframes gp-blink { 50% { opacity: .25; } }
@keyframes gp-nowpulse { 50% { box-shadow: 0 0 0 7px rgba(198, 255, 61, .06); } }
@keyframes gp-dots {
  0% { box-shadow: 10px 0 0 transparent, 20px 0 0 transparent; }
  33% { box-shadow: 10px 0 0 var(--btn-fg), 20px 0 0 transparent; }
  66%, 100% { box-shadow: 10px 0 0 var(--btn-fg), 20px 0 0 var(--btn-fg); }
}
@keyframes gp-toast-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes gp-toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes gp-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes gp-flash { from { background-color: var(--primary-a16); } to { background-color: transparent; } }
@keyframes gp-skel { to { transform: translateX(100%); } }
@keyframes gp-float { 50% { transform: translateY(-10px); } }
@keyframes gp-bump { 40% { transform: scale(1.18); } }

@media (prefers-reduced-motion: reduce) {
  .gp-gauge, .gp-dial { transition: none; }
  .gp-gauge__fill::after, .gp-skel::after { content: none; }
  .gp-phone--float { animation: none; }
}

/* Community game card shared by the home and every board view. */
.gp-locale-toggle { display: inline-grid; place-items: center; min-width: 42px; min-height: 40px; padding: 0 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-3); font-family: var(--font-pixel); font-size: var(--fs-px-1); cursor: pointer; }
@media (hover: hover) { .gp-locale-toggle:hover { color: var(--primary); border-color: var(--primary); } }
.game-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--sp-6); }
.game-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-5); background: var(--surface); box-shadow: inset 0 1px rgba(255,255,255,.08), var(--sh-1); }
.game-card > a { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.card-action { padding: 0 var(--sp-5) var(--sp-5); }
.card-action .gp-btn { width: 100%; justify-content: center; }
.reply-badge { align-self: flex-start; padding: var(--sp-1) var(--sp-2); border-radius: var(--r-2); background: var(--primary-a16); color: var(--primary); font-family: var(--font-pixel); font-size: var(--fs-xs); }
.card-art { position: relative; isolation: isolate; aspect-ratio: 16 / 9; padding: var(--sp-4); background: var(--light-top), var(--tex-grid), var(--bg-2); display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-4); overflow: hidden; }
.card-art__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.card-art--image::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(11,16,18,.6), transparent 35%, rgba(11,16,18,.18) 48%, rgba(11,16,18,.9)); }
.card-art__top { display: flex; justify-content: space-between; gap: var(--sp-3); font-family: var(--font-pixel); font-size: var(--fs-px-1); letter-spacing: var(--tr-px); color: var(--primary); }
.card-art__top > :last-child { color: var(--ink); }
.card-art__name { position: relative; max-width: 15ch; font-size: clamp(1.25rem, 2.3vw, 2rem); font-weight: var(--fw-heavy); line-height: 1.04; letter-spacing: -.02em; color: var(--ink); text-shadow: 0 2px 14px var(--bg); overflow-wrap: anywhere; }
.card-art__bottom { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-pixel); font-size: var(--fs-xs); color: var(--ink-2); }
.card-art--coral { background: radial-gradient(ellipse at 80% 0, var(--secondary-a24), transparent 75%), var(--tex-grid), var(--bg-2); }
.card-art--neutral { background: radial-gradient(ellipse at 15% 15%, rgba(255,255,255,.07), transparent 70%), var(--tex-grid), var(--surface-2); }
.card-body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--muted); }
.card-tags span { padding: var(--sp-1) var(--sp-2); background: var(--surface-2); border-radius: var(--r-2); }
.card-body h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); overflow-wrap: anywhere; }
.card-studio { font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
.card-one-line { font-size: var(--fs-body); color: var(--ink-2); overflow-wrap: anywhere; }
.card-foot { margin-top: auto; padding-top: var(--sp-4); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
.card-foot .gp-icon { color: var(--ink); flex-shrink: 0; }
@media (min-width: 600px) { .game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (min-width: 900px) { .game-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .game-card { transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base); }
  .game-card:hover { transform: translateY(-2px); border-color: var(--primary-a16); }
  .game-card .card-art__image { transition: transform var(--dur-base) var(--ease-out); }
  .game-card:hover .card-art__image { transform: scale(1.03); }
}
@media (prefers-reduced-motion: no-preference) {
  .game-card.will-reveal { opacity: 0; transform: translateY(12px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out), border-color var(--dur-base); transition-delay: var(--reveal-delay, 0ms); }
  .game-card.will-reveal.is-visible { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .game-card { animation: none !important; transition: none !important; } }
.gp-badge--original, .gp-badge--community { color: var(--ink-2); border: 1px solid var(--line-2); background: var(--surface); }
