/* =====================================================================
   RealKore Systems — v4 stylesheet
   Palette B (Sunset Industrial) with logo-friendly navy tilt
   ===================================================================== */

:root {
  /* ===== PALETTE B ===== */
  --cream: #F0E8D8;
  --cream-deep: #E5DAC2;
  --cream-soft: #F7F1E3;
  --paper: #FAF4E6;

  --amber: #E8893B;
  --amber-deep: #C26F26;
  --amber-soft: #F2A968;
  --amber-pale: #F5C795;

  /* dark anchors — tilted toward navy so logo harmonises */
  --char: #1F2530;
  --char-soft: #2A3142;
  --char-deeper: #161A22;
  --char-warm: #2D3340;   /* used in console */
  --char-tile: #232833;

  --rust: #8E5A26;
  --olive: #6F7556;

  /* tertiary accents — same as logo */
  --navy-deep: #0F1E3D;
  --cyan: #00B8D4;
  --cyan-bright: #1EE0FF;
  --cyan-dim: rgba(0, 184, 212, 0.5);

  /* text */
  --text: #1F2530;
  --text-soft: #4A4F58;
  --text-mute: #888880;
  --text-inverse: #F0E8D8;
  --text-inverse-soft: #C9BFA8;

  /* surfaces & lines */
  --line: rgba(31,37,48,0.10);
  --line-md: rgba(31,37,48,0.20);
  --line-strong: rgba(31,37,48,0.35);
  --line-amber: rgba(232,137,59,0.30);
  --shadow-soft: 0 12px 32px rgba(31,37,48,0.06);
  --shadow-md: 0 22px 56px rgba(31,37,48,0.12);
  --shadow-lg: 0 40px 80px rgba(31,37,48,0.18);

  /* radii */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-xl: 16px;
  --r-pill: 100px;

  /* fonts */
  --f-display: 'Big Shoulders Display', 'Inter', sans-serif;
  --f-body: 'Inter', sans-serif;
  --f-mono: 'IBM Plex Mono', monospace;

  /* easing — humane, not robotic */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 32px; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  color: var(--char);
  letter-spacing: -0.005em;
  text-transform: uppercase;
  line-height: 0.98;
}
h1 { font-size: 84px; }
h2 { font-size: 56px; }
h3 { font-size: 28px; }
h4 { font-size: 20px; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--amber-deep);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  display: inline-block;
}
.eyebrow .sep {
  color: rgba(31,37,48,0.25);
  margin: 0 2px;
}

.lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-soft);
}

.accent { color: var(--amber); }

/* ===== NAV ===== */
.nav {
  padding: 16px 0;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: padding .2s, background .2s;
}
.nav.scrolled {
  padding: 12px 0;
  background: rgba(240, 232, 216, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-brand img {
  height: 38px;
  width: auto;
  transition: transform .2s var(--ease-out);
}
.nav-brand:hover img { transform: rotate(-3deg); }
.nav-links {
  list-style: none;
  display: flex;
  gap: 26px;
  margin-left: 12px;
}
.nav-links a {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color .15s;
  padding: 4px 0;
  position: relative;
}
.nav-links a:hover { color: var(--amber-deep); }
.nav-links a.active { color: var(--char); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 4px; height: 4px;
  background: var(--amber);
  border-radius: 50%;
  transform: translateX(-50%);
}
.nav-cta {
  margin-left: auto;
  background: var(--char);
  color: var(--cream);
  padding: 11px 20px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background .15s, transform .15s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-cta:hover {
  background: var(--amber);
  transform: translateY(-1px);
}
.nav-toggle {
  display: none;
  margin-left: auto;
  color: var(--char);
  cursor: pointer;
}
.nav-new-badge {
  display: inline-block;
  background: var(--amber);
  color: var(--char);
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
  animation: pulse 2.5s var(--ease-in-out) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--cream);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    gap: 18px;
    padding: 40px;
    z-index: 99;
    border-top: 1px solid var(--line);
  }
  .nav.menu-open .nav-links { display: flex; }
  .nav-links a { font-size: 18px; }
  .nav-cta { margin-left: auto; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 8px; }
}

/* ===== BUTTONS ===== */
.btn {
  padding: 14px 24px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .15s var(--ease-out);
  cursor: pointer;
}
.btn-primary {
  background: var(--amber);
  color: var(--char);
}
.btn-primary:hover {
  background: var(--amber-deep);
  color: var(--cream);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.btn-ghost {
  background: transparent;
  color: var(--char);
  border: 1.5px solid var(--char);
}
.btn-ghost:hover {
  background: var(--char);
  color: var(--cream);
}
.btn-dark {
  background: var(--char);
  color: var(--cream);
}
.btn-dark:hover {
  background: var(--char-deeper);
  transform: translateY(-1px);
}
.btn-arrow::after {
  content: "→";
  transition: transform .2s var(--ease-out);
}
.btn-arrow:hover::after { transform: translateX(3px); }

/* ===== SECTION BASICS ===== */
.section {
  padding: 90px 0;
}
.section-tight { padding: 60px 0; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  margin-bottom: 56px;
}
.section-head .head-left h2 { margin-top: 10px; }

/* ===== REVEAL ANIM ===== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

/* ===== HERO STATUS ===== */
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 30px;
}
.hero-status .status-dot {
  width: 7px; height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 2.5s var(--ease-in-out) infinite;
}
.hero-status .status-text { color: var(--amber-deep); }

/* ===== KPI STRIP ===== */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-kpi {
  cursor: pointer;
  transition: transform .2s var(--ease-out);
}
.hero-kpi:hover { transform: translateY(-2px); }
.k-label {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.k-value {
  font-family: var(--f-display);
  font-size: 60px;
  font-weight: 700;
  color: var(--char);
  line-height: 0.95;
}
.k-value .unit { color: var(--amber); font-size: 30px; }

/* ===== MARQUEE ===== */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--cream-soft);
  padding: 18px 0;
}
.marquee-track {
  display: flex;
  gap: 60px;
  animation: marquee-scroll 60s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.marquee-item {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--char);
  display: inline-flex;
  align-items: center;
  gap: 60px;
}
.marquee-item::after {
  content: "→";
  color: var(--amber);
  font-weight: 400;
}
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== CAPABILITY CARDS ===== */
.capabilities {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cap-card {
  background: var(--cream-soft);
  border-radius: var(--r-md);
  padding: 30px 24px;
  border: 1px solid var(--line);
  transition: transform .2s var(--ease-out), box-shadow .2s, background .15s;
  position: relative;
  overflow: hidden;
}
.cap-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: var(--paper);
}
.cap-num {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--amber-deep);
  letter-spacing: 0.16em;
  margin-bottom: 18px;
}
.cap-icon {
  color: var(--amber);
  margin-bottom: 22px;
}
.cap-card h3 {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--char);
  line-height: 1.0;
}
.cap-card p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== INDUSTRY GRID ===== */
.industries {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.ind-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--cream);
  background: var(--char);
  display: block;
}
.ind-bg {
  position: absolute;
  inset: 0;
}
.ind-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) contrast(1.05) saturate(0.95);
  transition: transform .5s var(--ease-out), filter .3s;
}
.ind-card:hover .ind-bg img {
  transform: scale(1.06);
  filter: brightness(0.7) contrast(1.05);
}
.ind-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--char-deeper) 0%, transparent 65%);
}
.ind-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.ind-num {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 0.12em;
}
.ind-num span { color: var(--amber); }
.ind-meta {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}
.ind-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  line-height: 1.0;
}

/* ===== PRODUCT CARDS ===== */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.prod-card {
  background: var(--cream-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.prod-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.prod-img {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--char);
  overflow: hidden;
  cursor: pointer;
}
.prod-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease-out);
}
.prod-card:hover .prod-img img { transform: scale(1.04); }
.prod-play-hint {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(31, 37, 48, 0.82);
  color: var(--amber);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(232, 137, 59, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s, transform .2s var(--ease-out);
  z-index: 3;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.prod-card:hover .prod-play-hint { opacity: 1; transform: translateY(0); }
.prod-play-hint span { font-size: 12px; }
@media (max-width: 760px) {
  .prod-play-hint {
    opacity: 1;
    transform: translateY(0);
    top: 8px; right: 8px;
    font-size: 9px;
    padding: 4px 8px;
  }
}
.prod-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.prod-body h3 {
  font-size: 21px;
  margin-bottom: 10px;
  line-height: 1.05;
  letter-spacing: -0.005em;
}
.prod-body p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}
.prod-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.prod-tag {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--amber-deep);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(232, 137, 59, 0.10);
  border-radius: var(--r-pill);
  border: 1px solid var(--line-amber);
}

/* ===== CTA BAND ===== */
.cta-band {
  background: var(--char);
  color: var(--cream);
  padding: 100px 0;
}
.cta-band h2 { color: var(--cream); }
.cta-band .eyebrow { color: var(--amber); }
.cta-band .lead { color: var(--text-inverse-soft); }
.cta-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
}
.cta-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band .btn-primary { background: var(--amber); color: var(--char); }
.cta-band .btn-ghost { color: var(--cream); border-color: var(--cream); }
.cta-band .btn-ghost:hover { background: var(--cream); color: var(--char); }

/* ===== FOOTER ===== */
.footer {
  background: var(--char-deeper);
  color: var(--cream);
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 50px;
}
.footer-brand img {
  height: 38px;
  margin-bottom: 18px;
  filter: brightness(1.0);
}
.footer-brand p {
  color: var(--text-inverse-soft);
  font-size: 14px;
  line-height: 1.6;
  max-width: 360px;
}
.footer-col h5 {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 0.16em;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.footer-col ul { list-style: none; }
.footer-col ul li {
  margin-bottom: 9px;
  font-size: 14px;
}
.footer-col a {
  color: var(--text-inverse-soft);
  transition: color .15s;
}
.footer-col a:hover { color: var(--amber); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(240, 232, 216, 0.12);
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(240, 232, 216, 0.5);
}
.footer-bottom .fb-right { display: flex; gap: 18px; }

/* ===== MOBILE ===== */
@media (max-width: 1000px) {
  h1 { font-size: 48px; }
  h2 { font-size: 38px; }
  .section { padding: 60px 0; }
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 36px; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .k-value { font-size: 42px; }
  .capabilities { grid-template-columns: repeat(2, 1fr); }
  .industries { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .prod-grid { grid-template-columns: 1fr; }
  .cta-content { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1/-1; }
  .footer-bottom { flex-direction: column; gap: 10px; }
}
.kr-modal-content {
  padding: 18px;
  background: #1F2530;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.kr-game-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 200px);
  margin: 0 auto;
  background: #232833;
  border: 1px solid var(--line-md);
  border-radius: var(--r-lg);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.kr-game-frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}
.kr-game-frame.playing canvas { cursor: crosshair; }
.kr-corners {
  position: absolute; inset: 12px;
  pointer-events: none; z-index: 4;
}
.kr-corners::before, .kr-corners::after,
.kr-corners > i::before, .kr-corners > i::after {
  content: ""; position: absolute;
  width: 16px; height: 16px;
  border-color: var(--cyan); border-style: solid; border-width: 0;
}
.kr-corners::before { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.kr-corners::after  { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.kr-corners > i { position: absolute; inset: 0; }
.kr-corners > i::before { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.kr-corners > i::after  { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.kr-game-footer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 7;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}
.kr-role-switch {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0,184,212,0.30);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  pointer-events: auto;
}
.kr-role {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 14px;
  width: 38px;
  height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-mute);
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background .15s, color .15s;
}
.kr-role:hover { color: #E8DEC7; }
.kr-role.active {
  background: var(--cyan);
  color: #06101F;
}
.kr-scores { display: flex; gap: 14px; }
.kr-scores .kr-score-block {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0,184,212,0.30);
  border-radius: 6px;
  padding: 6px 12px;
  text-align: center;
  backdrop-filter: blur(6px);
}
.kr-scores .kr-score-block .kr-score-l {
  color: var(--text-mute); font-size: 9px; display: block; margin-bottom: 2px;
  font-family: var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase;
}
.kr-scores .kr-score-block .kr-score-v {
  color: var(--cyan); font-size: 16px; font-weight: 600; font-family: var(--f-display);
}
.kr-start {
  position: absolute;
  left: 50%;
  bottom: 90px;
  z-index: 6;
  transform: translateX(-50%);
  background: rgba(0, 184, 212, 0.12);
  border: 1px solid var(--cyan);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 28px;
  border-radius: 100px;
  cursor: pointer;
  color: #E8DEC7;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background .2s, transform .15s, box-shadow .2s;
  white-space: nowrap;
}
.kr-start:hover {
  background: rgba(0, 184, 212, 0.22);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 184, 212, 0.35);
}
.kr-start .kr-start-arrow {
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--cyan);
}
.kr-start small {
  display: block;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--text-mute);
  font-weight: 400;
  text-transform: uppercase;
}
.kr-game-frame.playing .kr-start { display: none; }

/* === Modal === */
#rk-modal-back {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(6, 16, 31, 0.84);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .25s;
}
#rk-modal-back.show { opacity: 1; }
.rk-modal {
  width: min(720px, 100%);
  max-height: 90vh;
  background: #1F2530;
  color: #E8DEC7;
  border: 1px solid rgba(0,184,212,0.30);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(0, 184, 212, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rk-modal-body { color: #E8DEC7; }
.rk-modal-body p, .rk-modal-body div:not([class*="cyan"]):not([class*="amber"]) { color: inherit; }
.rk-modal[data-flavor="game"] { width: min(820px, 100%); }
.rk-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: #161A22;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.rk-modal-close {
  background: none; border: none; color: var(--text-mute);
  cursor: pointer; font-size: 18px; padding: 4px 10px;
  min-width: 36px; min-height: 36px;
}
.rk-modal-close:hover { color: var(--cyan); }
.rk-modal-body { flex: 1; overflow: auto; padding: 0; }

/* === Terminal === */
.rk-terminal {
  font-family: var(--f-mono);
  background: #0E1118;
  color: #4FFFAA;
  padding: 22px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: 1.6;
}
.rk-terminal .term-out {
  white-space: pre-wrap;
  margin-bottom: 8px;
  flex: 1;
  overflow-y: auto;
  text-shadow: 0 0 6px rgba(79, 255, 170, 0.4);
}
.rk-terminal .term-prompt { display: flex; align-items: center; gap: 8px; }
.rk-terminal .term-arrow { color: var(--cyan); }
.rk-terminal .term-in {
  flex: 1; background: transparent; border: none;
  color: #4FFFAA;
  font-family: var(--f-mono);
  font-size: 13px;
  outline: none;
  text-shadow: 0 0 6px rgba(79, 255, 170, 0.4);
  min-height: 32px;
}
.rk-terminal .term-blink {
  width: 8px; height: 14px;
  background: #4FFFAA;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* === Product game shared === */
.prod-game {
  position: relative;
  background: #0E1118;
  min-height: 540px;
}
.prod-game .pg-stage {
  position: relative;
  height: 380px;
  background-size: cover;
  background-position: center;
  filter: brightness(0.5) contrast(1.1);
  overflow: hidden;
  touch-action: none;
  transition: background-image .35s ease, filter .35s ease, background-color .35s ease;
}
/* When game starts: photo is gone, only animation remains on a clean dark stage */
.prod-game .pg-stage.playing {
  background-image: none !important;
  filter: none;
  background-color: #0E1118;
  background-image: radial-gradient(ellipse at center, #1A1E2A 0%, #0A0C12 100%) !important;
}
.prod-game .pg-stage.playing::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 184, 212, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 184, 212, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.prod-game .pg-stage.playing .pg-asset-anim svg {
  width: 85%;
  max-width: 480px;
}
.prod-game .pg-hud {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 3;
  pointer-events: none;
}
.prod-game .pg-hud .pg-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 4px;
}
.prod-game .pg-hud .pg-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  color: #E8DEC7;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
  max-width: 70%;
  line-height: 1.05;
}
.prod-game .pg-score-row {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 3;
  display: flex;
  gap: 10px;
}
.prod-game .pg-score {
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(0,184,212,0.30);
  border-radius: 6px;
  padding: 8px 14px;
  text-align: center;
  backdrop-filter: blur(6px);
}
.prod-game .pg-score-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 2px;
}
.prod-game .pg-score-val {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--cyan);
  line-height: 1;
}
.prod-game .pg-instr {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 18px 22px;
  background: linear-gradient(to top, #1F2530, rgba(10, 20, 40, 0.92));
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--text-soft);
  z-index: 3;
  border-top: 1px solid var(--line);
}
.prod-game .pg-instr strong {
  color: var(--cyan);
  font-family: var(--f-display);
  font-size: 17px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.prod-game .pg-start {
  position: absolute;
  left: 50%;
  top: 190px;
  transform: translateX(-50%);
  background: var(--cyan);
  color: #1F2530;
  border: none;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 14px;
  padding: 14px 28px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 4;
  letter-spacing: 0.02em;
  transition: all .15s;
}
.prod-game .pg-start:hover {
  background: var(--cyan-bright);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 184, 212, 0.4);
}

/* === OPERATE template === */
.pg-energy {
  position: absolute;
  bottom: 12px; left: 16px; right: 16px;
  height: 24px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(0,184,212,0.30);
  border-radius: 4px;
  overflow: hidden;
  z-index: 2;
}
.pg-energy-fill {
  height: 100%; width: 0;
  background: linear-gradient(to right, var(--cyan-dim), var(--cyan));
  transition: width .08s;
  box-shadow: 0 0 12px var(--cyan);
}
.pg-energy-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #E8DEC7;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.pg-floater {
  position: absolute;
  pointer-events: none;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
  animation: float-up .8s ease forwards;
  transform: translate(-50%, -50%);
}
@keyframes float-up {
  0%   { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -150%); }
}

/* === LIFT template === */
.pg-lift-target {
  position: absolute;
  bottom: 70px; left: 50%;
  width: 80px; height: 8px;
  background: rgba(0, 184, 212, 0.25);
  border: 1px solid var(--cyan);
  border-radius: 4px;
  transform: translateX(-50%);
  box-shadow: 0 0 12px var(--cyan);
  z-index: 2;
}
.pg-lift-cargo {
  position: absolute;
  bottom: 90px;
  width: 44px; height: 44px;
  background: var(--cyan);
  color: #1F2530;
  font-size: 28px;
  text-align: center;
  line-height: 44px;
  border-radius: 4px;
  box-shadow: 0 0 16px var(--cyan);
  z-index: 2;
  transition: filter .15s;
}
.pg-lift-cargo.flash-good { filter: brightness(1.6) saturate(1.5); }
.pg-lift-cargo.flash-miss { filter: hue-rotate(160deg) brightness(0.9); }

/* === SCAN targets === */
.pg-target {
  position: absolute;
  width: 50px; height: 50px;
  background: rgba(0, 184, 212, 0.2);
  border: 2px solid var(--cyan);
  border-radius: 50%;
  cursor: crosshair;
  transform: translate(-50%, -50%);
  animation: target-in .2s ease;
  box-shadow: 0 0 20px var(--cyan);
  padding: 0;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.pg-target span {
  position: absolute; inset: 30%;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
}
.pg-target.hit { animation: target-hit .25s ease forwards; }
.pg-target.miss { animation: target-miss .2s ease forwards; }
@keyframes target-in {
  from { transform: translate(-50%, -50%) scale(0); }
  to   { transform: translate(-50%, -50%) scale(1); }
}
@keyframes target-hit {
  to { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}
@keyframes target-miss {
  to { transform: translate(-50%, -50%) scale(0.5); opacity: 0; border-color: #C24A3A; }
}

/* === TRACE template === */
.pg-trace-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}
.pg-trace-cursor {
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan);
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
  transition: filter .1s;
}
.pg-trace-cursor.flash-good { filter: brightness(1.8); }

/* === DRIVE template === */
.pg-player {
  position: absolute;
  width: 20px; height: 20px;
  background: var(--cyan);
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 20px var(--cyan);
  z-index: 2;
  pointer-events: none;
}
.pg-obstacle {
  position: absolute;
  width: 22px; height: 22px;
  background: rgba(255, 80, 80, 0.3);
  border: 1.5px solid #FF5050;
  transform: translate(-50%, -50%) rotate(45deg);
  z-index: 1;
  pointer-events: none;
}

/* === SEQUENCE template === */
.pg-seq-item {
  position: absolute;
  width: 46px; height: 46px;
  background: rgba(0, 184, 212, 0.18);
  border: 2px solid var(--cyan);
  border-radius: 8px;
  color: var(--cyan);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
  transition: all .15s;
  box-shadow: 0 0 12px rgba(0, 184, 212, 0.4);
  -webkit-tap-highlight-color: transparent;
}
.pg-seq-item:hover { background: rgba(0, 184, 212, 0.3); transform: scale(1.05); }
.pg-seq-item.hit { background: var(--cyan); color: #1F2530; transform: scale(0.5); opacity: 0; transition: all .2s; }
.pg-seq-item.miss { background: rgba(255, 80, 80, 0.4); border-color: #FF5050; color: #FF5050; transform: scale(0.5); opacity: 0; transition: all .2s; }

/* === REACT template === */
.pg-react-btn {
  position: absolute;
  width: 56px; height: 56px;
  background: rgba(255, 200, 0, 0.25);
  border: 2px solid #FFC800;
  border-radius: 50%;
  color: #FFC800;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 28px;
  cursor: pointer;
  z-index: 2;
  animation: react-pulse 1s infinite;
  box-shadow: 0 0 18px #FFC800;
  -webkit-tap-highlight-color: transparent;
}
.pg-react-btn span { display: block; line-height: 1; }
.pg-react-btn.hit { background: #4FFFAA; border-color: #4FFFAA; color: #1F2530; animation: none; transform: scale(1.4); opacity: 0; transition: all .2s; }
.pg-react-btn.miss { animation: none; transform: scale(0.4); opacity: 0; transition: all .2s; }
@keyframes react-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* === Toasts === */
#rk-toasts {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.rk-toast {
  background: #1F2530;
  border: 1px solid rgba(0,184,212,0.30);
  border-left: 3px solid var(--cyan);
  padding: 12px 16px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: #E8DEC7;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .25s, transform .25s;
  max-width: 360px;
}
.rk-toast.show { opacity: 1; transform: translateX(0); }
.rk-toast-win { border-left-color: #4FFFAA; }
.rk-toast strong { color: var(--cyan); font-weight: 600; }
.rk-toast-win strong { color: #4FFFAA; }

/* === KPI floater === */
.rk-kpi-float {
  position: fixed; z-index: 9000;
  font-family: var(--f-display); font-weight: 700;
  font-size: 22px;
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
  pointer-events: none;
  animation: kpi-float 1.5s ease forwards;
}
@keyframes kpi-float {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-40px); }
}

/* === Product image play hint === */
.prod-play-hint {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--cyan);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 100px;
  border: 1px solid rgba(0,184,212,0.30);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s, transform .2s;
  z-index: 3;
  backdrop-filter: blur(4px);
}
.prod-card:hover .prod-play-hint { opacity: 1; transform: translateY(0); }
.prod-play-hint span { font-size: 12px; }
@media (max-width: 760px) {
  .prod-play-hint {
    opacity: 1; transform: translateY(0);
    top: 8px; right: 8px;
    font-size: 9px;
    padding: 4px 8px;
  }
}

/* === Logo spin (triple-click) === */
.rk-spin { animation: rk-spin .6s ease 2; }
@keyframes rk-spin { to { transform: rotate(360deg); } }

/* === CRT mode === */
body.crt-mode {
  filter: contrast(1.08) saturate(1.15);
}
body.crt-mode::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0,0,0,0.22) 0,
      rgba(0,0,0,0.22) 1px,
      transparent 1px,
      transparent 3px
    );
  opacity: 0.85;
}
body.crt-mode .crt-badge {
  display: flex;
}
.crt-badge {
  display: none;
  position: fixed;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #4FFFAA;
  background: rgba(6, 16, 31, 0.92);
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid #4FFFAA;
  text-shadow: 0 0 6px #4FFFAA;
  pointer-events: none;
  align-items: center;
}

/* === Mobile-specific refinements === */
@media (max-width: 760px) {
  .kr-game-frame { aspect-ratio: 1 / 1.1; max-width: 100%; }
  .kr-game-footer { padding: 14px; }
  .kr-scores .kr-score-block { padding: 4px 8px; }
  .kr-scores .kr-score-block .kr-score-v { font-size: 14px; }
  .kr-start { bottom: 80px; padding: 12px 22px; font-size: 14px; }
  .prod-game { min-height: auto; }
  .prod-game .pg-stage { height: 300px; }
  .prod-game .pg-hud .pg-title { font-size: 16px; }
  .prod-game .pg-score-val { font-size: 18px; }
  .prod-game .pg-score { padding: 6px 10px; }
  .prod-game .pg-instr { padding: 14px 16px; font-size: 13px; }
  .prod-game .pg-instr strong { font-size: 14px; }
  .pg-target { width: 56px; height: 56px; }
  .pg-react-btn { width: 64px; height: 64px; }
  .pg-seq-item { width: 50px; height: 50px; font-size: 20px; }
  #rk-toasts { top: 70px; right: 12px; left: 12px; }
  .rk-toast { max-width: 100%; font-size: 11px; padding: 10px 12px; }
  .rk-modal { max-height: 95vh; }
  .rk-modal-header { padding: 12px 14px; font-size: 10px; }
  .rk-terminal { padding: 14px; font-size: 12px; min-height: 360px; }
  .rk-terminal .term-in { font-size: 12px; }
  .kr-modal-content { padding: 10px; }
  .pg-lift-target { bottom: 60px; }
  .pg-lift-cargo { bottom: 80px; width: 36px; height: 36px; line-height: 36px; font-size: 22px; }
}

/* === Reduced motion preference === */
@media (prefers-reduced-motion: reduce) {
  .nav-new-badge, .pg-react-btn { animation: none; }
}

/* ============================================================
   K↔R variant bar + role switch (v4 / v5)
   ============================================================ */

/* Variant header — sits ABOVE the canvas frame, full width, horizontal.
   Pulled out of .kr-game-frame so the play area is unobstructed and the
   tabs remain visible while playing. */
.kr-variant-header {
  width: 100%;
  max-width: 480px;
  margin: 0 auto 14px;
  display: flex;
  justify-content: center;
}
.kr-variant-bar {
  display: flex;
  gap: 4px;
  background: rgba(15, 30, 61, 0.6);
  padding: 4px;
  border-radius: 6px;
  border: 1px solid rgba(0, 184, 212, 0.25);
  backdrop-filter: blur(6px);
}
.kr-variant {
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: 3px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(232, 222, 199, 0.65);
  cursor: pointer;
  transition: all .15s cubic-bezier(0.22, 1, 0.36, 1);
}
.kr-variant:hover { color: #E8DEC7; background: rgba(0, 184, 212, 0.10); }
.kr-variant.active {
  background: var(--cyan);
  color: #0F1E3D;
  font-weight: 600;
}

@media (max-width: 760px) {
  .kr-variant-header { margin-bottom: 10px; }
  .kr-variant-bar { padding: 3px; gap: 2px; }
  .kr-variant { padding: 5px 9px; font-size: 9px; letter-spacing: 0.06em; }
  .kr-role { width: 32px; height: 26px; font-size: 13px; }
  .kr-game-footer { padding: 14px 16px; }
}
/* end arcade styles */

/* ============================================================
   Per-product asset animations (v4)
   Renders inside .pg-stage during product game playback
   ============================================================ */
.pg-asset-anim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.pg-asset-anim svg {
  width: 70%;
  max-width: 360px;
  height: auto;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
}
.pg-asset-anim svg [id^="aa-"] {
  will-change: transform;
}
/* Reduce intensity if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pg-asset-anim svg * { transition: none !important; animation: none !important; }
}

.h-display {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(48px, 7.5vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.h-display .accent { color: var(--amber); }
.h-display .ital { font-style: italic; font-weight: 500; text-transform: none; letter-spacing: -0.015em; }

.h-section {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.h-section .accent { color: var(--amber); }

.lead {
  font-family: var(--f-body);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 56ch;
}

.hero-kpis {
  margin-top: 70px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-md);
  border-bottom: 1px solid var(--line-md);
}
.hero-kpi {
  padding: 26px 24px;
  border-right: 1px solid var(--line);
  position: relative;
}
.hero-kpi:last-child { border-right: none; }
.hero-kpi .k-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 12px;
}
.hero-kpi .k-value {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 0.95;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.hero-kpi .k-value .unit { font-size: 0.5em; color: var(--amber); font-weight: 500; }

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
}
.console-chart .chart-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 6px;
}
.console-chart svg { width: 100%; height: calc(100% - 18px); display: block; }

.platform-features { display: flex; flex-direction: column; gap: 0; }
.platform-feature {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: start;
}
.platform-feature:first-child { padding-top: 8px; }
.platform-feature:last-child { border-bottom: none; }
.platform-feature .pf-num {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 0.9;
  color: var(--amber);
}
.platform-feature h4 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  margin-bottom: 8px;
  line-height: 1.1;
}
.platform-feature p { color: var(--text-soft); font-size: 14px; line-height: 1.55; }

@media (max-width: 980px) {
  .platform-grid { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 600px) {
  .console-body { grid-template-columns: 100px 1fr; }
  .console-side .side-item { padding: 8px 10px; font-size: 10px; }
}

/* ============ INDUSTRY GRID ============ */
.industries { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.ind-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--cream-soft);
  border: 1px solid var(--line-md);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.ind-card:hover {
  transform: translateY(-4px);
  border-color: var(--amber);
  box-shadow: 0 20px 50px rgba(0,184,212,0.18);
  color: var(--text);
}
.ind-card .ind-bg { position: absolute; inset: 0; z-index: 0; }
.ind-card .ind-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: opacity .3s, transform .5s;
}
.ind-card:hover .ind-bg img { opacity: 0.7; transform: scale(1.06); }
.ind-card .ind-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,20,40,0.4) 0%, rgba(6,16,31,0.95) 100%);
}
.ind-card .ind-content {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.ind-card .ind-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ind-card .ind-num::after { content: "→"; opacity: 0; transition: opacity .2s, transform .2s; }
.ind-card:hover .ind-num::after { opacity: 1; transform: translateX(4px); }
.ind-card .ind-meta {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  gap: 16px;
}
.footer-bottom .fb-right { display: flex; gap: 18px; }
.footer-bottom .fb-right a { color: var(--text-mute); }
.footer-bottom .fb-right a:hover { color: var(--amber); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

/* ============ PAGE HERO (sub-pages) ============ */
.page-hero { padding: 80px 0 60px; border-bottom: 1px solid var(--line); position: relative; }
.breadcrumb {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 32px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-mute); text-decoration: none; }
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb .sep { color: var(--text-mute); }
.breadcrumb .current { color: var(--amber); }

.page-hero h1 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.page-hero h1 .accent { color: var(--amber); }
.page-hero h1 .ital { font-style: italic; font-weight: 500; text-transform: none; }
.page-hero .lead { max-width: 64ch; }

/* ============ PRODUCT INTRO + GRID ============ */
.intro-panel {
  background: var(--cream-soft);
  border: 1px solid var(--line-md);
  border-radius: var(--r-lg);
  padding: 32px 36px;
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  align-items: start;
}
.intro-panel .ip-mark {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--amber);
  padding-top: 4px;
}
.intro-panel .ip-mark::before { content: "→"; display: block; margin-bottom: 6px; }
.intro-panel p { color: var(--text-soft); font-size: 15px; line-height: 1.6; }
@media (max-width: 600px) { .intro-panel { grid-template-columns: 1fr; padding: 22px 22px; } }

.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 780px) { .products-grid { grid-template-columns: 1fr; } }

.prod-card {
  background: var(--cream-soft);
  border: 1px solid var(--line-md);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
  display: flex; flex-direction: column;
}
.prod-card:hover { border-color: var(--line-amber); transform: translateY(-2px); }
.prod-img { aspect-ratio: 16 / 10; background: var(--char); overflow: hidden; position: relative; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.prod-card:hover .prod-img img { transform: scale(1.04); }
.prod-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(6,16,31,0.6) 100%);
  pointer-events: none;
}
.prod-body { padding: 24px 26px 26px; flex: 1; display: flex; flex-direction: column; }
.prod-card h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  margin-bottom: 12px;
}
.prod-card .prod-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.prod-card .prod-tag {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--cyan-faint);
  color: var(--amber);
  border: 1px solid var(--line-amber);
}
.prod-card .prod-tag.screen { background: rgba(110,143,113,0.10); color: #9FC4A3; border-color: rgba(110,143,113,0.3); }
.prod-card .prod-tag.vr     { background: rgba(0,184,212,0.10); color: var(--amber); border-color: var(--line-amber); }
.prod-card .prod-tag.ar     { background: rgba(201,152,70,0.10); color: #E0B560; border-color: rgba(201,152,70,0.3); }
.prod-card .prod-tag.mr     { background: rgba(217,110,81,0.10); color: #F08770; border-color: rgba(217,110,81,0.3); }
.prod-card .prod-tag.hw     { background: rgba(255,255,255,0.06); color: var(--text-soft); border-color: var(--line-strong); }
.prod-card .prod-tag.motion { background: rgba(30,224,255,0.10); color: var(--amber); border-color: rgba(30,224,255,0.3); }
.prod-card p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}
.prod-card ul { list-style: none; border-top: 1px solid var(--line); padding-top: 14px; }
.prod-card li {
  font-size: 13px;
  color: var(--text-soft);
  padding: 4px 0 4px 18px;
  position: relative;
  line-height: 1.5;
}
.prod-card li::before { content: "›"; position: absolute; left: 0; color: var(--amber); font-family: var(--f-mono); font-weight: 700; }

/* ============ ABOUT PILLARS ============ */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 80px; }
.pillar {
  padding: 36px 32px 32px;
  background: var(--cream-soft);
  border: 1px solid var(--line-md);
  border-radius: var(--r-lg);
  position: relative;
}
.pillar.alt { border-top: 3px solid var(--amber); }
.pillar .p-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 24px;
}
.pillar h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--text);
}
.pillar p { color: var(--text-soft); font-size: 15px; line-height: 1.6; }
@media (max-width: 780px) { .pillars { grid-template-columns: 1fr; } }

.about-stack {
  background: linear-gradient(180deg, var(--char) 0%, var(--char-deeper) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-stack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
}
.about-stack-image img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.about-stack-image::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(45deg, rgba(15,30,61,0.2) 0%, transparent 40%),
    linear-gradient(225deg, rgba(0,184,212,0.08) 0%, transparent 50%);
}
@media (max-width: 820px) { .about-stack-grid { grid-template-columns: 1fr; gap: 32px; } }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--line);
}
.step { padding: 36px 28px 32px; background: var(--char); position: relative; }
.step .s-num { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--amber); margin-bottom: 28px; }
.step h4 { font-family: var(--f-display); font-weight: 600; font-size: 20px; text-transform: uppercase; margin-bottom: 12px; line-height: 1.1; }
.step p { color: var(--text-soft); font-size: 14px; line-height: 1.55; }
@media (max-width: 920px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; }
@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.contact-form {
  background: var(--cream-soft);
  border: 1px solid var(--line-md);
  border-radius: var(--r-lg);
  padding: 40px 36px 36px;
}
.contact-form h3 { font-family: var(--f-display); font-weight: 600; font-size: 28px; text-transform: uppercase; margin-bottom: 8px; }
.contact-form .form-sub { color: var(--text-soft); font-size: 14px; margin-bottom: 32px; }
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--char);
  border: 1px solid var(--line-md);
  border-radius: var(--r-md);
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  transition: border-color .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--amber);
  background: var(--char-deeper);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .field-row { grid-template-columns: 1fr; } }
.form-success {
  background: var(--cyan-faint);
  border: 1px solid var(--line-amber);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
  color: var(--text);
  font-size: 14px;
}
.form-success::before { content: "✓"; color: var(--amber); font-weight: 700; font-size: 18px; }

.contact-info { display: flex; flex-direction: column; gap: 14px; }
.info-card {
  padding: 24px 26px;
  background: var(--cream-soft);
  border: 1px solid var(--line-md);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-card .info-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0;
}
.info-card h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--cyan-deep, #00B8D4);
  line-height: 1.2;
  margin: 0 0 4px 0;
  letter-spacing: 0.01em;
}
.info-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
.info-card a {
  align-self: flex-start;
  margin-top: 4px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(231, 122, 51, 0.4);
  padding-bottom: 2px;
  transition: color 0.18s, border-color 0.18s;
}
.info-card a:hover { color: var(--text); border-color: var(--text); }
.contact-info-list { display: flex; flex-direction: column; gap: 14px; }

/* ============================================================
   Bespoke driving game (v4)
   ============================================================ */
.pg-driving {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(to bottom, #0E1118 0%, #1A1E26 100%);
  z-index: 2;
}
.pg-drive-road {
  position: absolute;
  top: 0; bottom: 0;
  left: 12%; right: 12%;
  background: linear-gradient(to right,
    #1A1E26 0%,
    #2A2F3A 12%,
    #2A2F3A 88%,
    #1A1E26 100%);
  border-left: 3px solid #FFC56F;
  border-right: 3px solid #FFC56F;
}
.pg-drive-lane {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: transparent;
}
.pg-drive-lane:nth-child(1) { left: 25%; }
.pg-drive-lane:nth-child(2) { left: 50%; }
.pg-drive-lane:nth-child(3) { left: 75%; }
.pg-drive-stripes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pg-drv-stripe {
  position: absolute;
  top: 0; bottom: 0;
  width: 4px;
  margin-left: -2px;
  background-image: repeating-linear-gradient(
    to bottom,
    #FFC56F 0px,
    #FFC56F 20px,
    transparent 20px,
    transparent 60px
  );
  background-size: 4px 80px;
  background-repeat: repeat-y;
  opacity: 0.6;
}
.pg-drive-traffic {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pg-drv-other {
  position: absolute;
  width: 44px;
  height: 64px;
  margin-left: -22px;
  margin-top: -32px;
  pointer-events: none;
}
.pg-drv-other-barrel,
.pg-drv-other-gem {
  width: 36px;
  height: 36px;
  margin-left: -18px;
  margin-top: -18px;
}
.pg-drv-other svg { width: 100%; height: 100%; display: block; }
.pg-drv-collected {
  transform: scale(1.6);
  opacity: 0;
  transition: transform .2s, opacity .2s;
}
.pg-drive-car {
  position: absolute;
  bottom: 40px;
  left: 50%;
  width: 44px;
  height: 68px;
  margin-left: -22px;
  transform: none;
  z-index: 5;
  transition: left .12s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.5));
}
.pg-drive-car svg { width: 100%; height: 100%; display: block; }
.pg-drive-hud {
  position: absolute;
  bottom: 14px;
  right: 18px;
  background: rgba(15, 30, 61, 0.7);
  border: 1px solid rgba(0, 184, 212, 0.4);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--f-mono);
  display: flex;
  align-items: baseline;
  gap: 6px;
  backdrop-filter: blur(6px);
  z-index: 6;
}
.pg-drive-speedlabel {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(232, 222, 199, 0.55);
  text-transform: uppercase;
}
.pg-drive-speed {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--cyan);
}
.pg-drive-kmh {
  font-size: 10px;
  color: rgba(232, 222, 199, 0.5);
}
@keyframes pg-drv-shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 2px); }
  40% { transform: translate(5px, -3px); }
  60% { transform: translate(-4px, 3px); }
  80% { transform: translate(3px, 1px); }
}
.pg-drv-shake { animation: pg-drv-shake 0.25s ease; }

/* ============================================================
   BESPOKE GAME STYLES (v5) — crane, drill, shoot, spray,
   screen, stack, monitor, compact, weld, haul
   All overlay .pg-stage with position:absolute;inset:0.
   ============================================================ */

/* Shared hint band for bespoke games */
.pg-crane-hint, .pg-drill-hint, .pg-shoot-hint, .pg-spray-hint,
.pg-screen-hint, .pg-stack-hint, .pg-mon-hint, .pg-compact-hint,
.pg-weld-hint, .pg-haul-hint {
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 222, 199, 0.72);
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  z-index: 6;
}

/* ---- CRANE ------------------------------------------------- */
.pg-crane { position: absolute; inset: 0; overflow: hidden; }
.pg-crane-sky {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(15,30,61,0.10) 0%, rgba(15,30,61,0.55) 60%, rgba(15,30,61,0.85) 100%);
}
.pg-crane-deck {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 22%;
  background: linear-gradient(to bottom, rgba(0,184,212,0.10), rgba(15,30,61,0.4));
  border-top: 1.5px solid rgba(0,184,212,0.55);
}
.pg-crane-target {
  position: absolute;
  bottom: 14%;
  width: 78px;
  height: 12px;
  background: rgba(255,197,111,0.25);
  border: 2px solid #FFC56F;
  border-radius: 4px;
  transform: translateX(-50%);
  box-shadow: 0 0 16px rgba(255,197,111,0.55);
  z-index: 3;
}
.pg-crane-target::before {
  content: ""; position: absolute;
  left: 50%; top: -10px;
  width: 2px; height: 100%;
  background: rgba(255,197,111,0.6);
  transform: translateX(-50%);
}
.pg-crane-rail {
  position: absolute;
  top: 36px; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(to right, transparent 0%, rgba(0,184,212,0.4) 6%, rgba(0,184,212,0.4) 94%, transparent 100%);
  border-bottom: 1px solid rgba(0,184,212,0.5);
  z-index: 2;
}
.pg-crane-trolley {
  position: absolute;
  top: -8px;
  width: 36px; height: 18px;
  background: rgba(0,184,212,0.22);
  border: 1.5px solid var(--cyan);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: left .12s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 4;
}
.pg-crane-cable {
  position: absolute;
  top: 100%; left: 50%;
  width: 2px;
  background: linear-gradient(to bottom, rgba(0,184,212,0.6), rgba(0,184,212,0.3));
  transform-origin: top center;
}
.pg-crane-load {
  position: absolute;
  top: 100%; left: 50%;
  font-size: 36px;
  color: #00B8D4;
  text-shadow: 0 0 12px rgba(0,184,212,0.7);
  pointer-events: none;
}
.pg-cr-falling {
  position: absolute;
  font-size: 36px;
  color: #00B8D4;
  text-shadow: 0 0 14px rgba(0,184,212,0.7);
  pointer-events: none;
  z-index: 5;
}
.pg-cr-hit { color: #FFC56F; text-shadow: 0 0 24px rgba(255,197,111,0.9); }
.pg-cr-miss { color: #FF6B6B; text-shadow: 0 0 14px rgba(255,107,107,0.6); }

/* ---- DRILL ------------------------------------------------- */
.pg-drill { position: absolute; inset: 0; }
.pg-drill-face {
  position: absolute; inset: 12% 8% 18% 8%;
  background: rgba(15,30,61,0.35);
  border: 1px solid rgba(0,184,212,0.30);
  border-radius: 4px;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.4);
}
.pg-drill-spot {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(15,30,61,0.5);
  border: 1.5px solid rgba(0,184,212,0.45);
  transform: translate(-50%, -50%);
  transition: all .18s cubic-bezier(0.22, 1, 0.36, 1);
}
.pg-drill-spot.active {
  background: rgba(0,184,212,0.35);
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0,184,212,0.7);
  animation: pg-pulse-fast 0.9s ease-in-out infinite;
}
.pg-drill-spot.drilled {
  background: #FFC56F;
  border-color: #FFC56F;
  box-shadow: 0 0 14px rgba(255,197,111,0.6);
}
.pg-drill-spot.miss { animation: pg-shake 0.25s ease; }
.pg-drill-crosshair {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 28px;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0,184,212,0.8);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
  user-select: none;
}
@keyframes pg-pulse-fast {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.22); }
}
@keyframes pg-shake {
  0%, 100% { transform: translate(-50%, -50%); }
  25% { transform: translate(-55%, -50%); }
  75% { transform: translate(-45%, -50%); }
}

/* ---- SHOOT ------------------------------------------------- */
.pg-shoot { position: absolute; inset: 0; cursor: crosshair; }
.pg-shoot-range {
  position: absolute; inset: 8%;
  background: radial-gradient(ellipse at center, rgba(15,30,61,0.10), rgba(15,30,61,0.5));
  border: 1px solid rgba(0,184,212,0.20);
}
.pg-shoot-cross {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 26px;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0,184,212,0.8);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 6;
  user-select: none;
}
.pg-shoot-target {
  position: absolute;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, #FF6B6B 30%, rgba(255,107,107,0.2) 75%);
  border: 1.5px solid #FFC56F;
  transform: translate(-50%, -50%) scale(0);
  animation: pg-pop-in 0.18s ease-out forwards;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 0 16px rgba(255,107,107,0.6);
}
.pg-shoot-target.hit {
  background: radial-gradient(circle, #FFC56F 30%, rgba(255,197,111,0.2) 75%);
  border-color: #00B8D4;
  animation: pg-burst-out 0.22s ease-out forwards;
}
.pg-shoot-target.miss {
  border-color: #FF6B6B;
  animation: pg-fade-out 0.20s ease-out forwards;
}
@keyframes pg-pop-in { from { transform: translate(-50%, -50%) scale(0); } to { transform: translate(-50%, -50%) scale(1); } }
@keyframes pg-burst-out { from { transform: translate(-50%, -50%) scale(1); opacity: 1; } to { transform: translate(-50%, -50%) scale(1.7); opacity: 0; } }
@keyframes pg-fade-out { from { opacity: 1; } to { opacity: 0; } }

/* ---- SPRAY ------------------------------------------------- */
.pg-spray { position: absolute; inset: 0; cursor: crosshair; }
.pg-spray canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* ---- SCREEN ------------------------------------------------ */
.pg-screen { position: absolute; inset: 0; cursor: crosshair; }
.pg-screen-frame {
  position: absolute; inset: 8%;
  background: radial-gradient(ellipse at center, rgba(0,184,212,0.04), rgba(15,30,61,0.5));
  border: 1px solid rgba(0,184,212,0.25);
}
.pg-screen-mag {
  position: absolute;
  width: 110px; height: 110px;
  border: 2px solid rgba(0,184,212,0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0,184,212,0.06) 0%, rgba(0,184,212,0.02) 60%, transparent 100%);
  box-shadow: 0 0 30px rgba(0,184,212,0.18), inset 0 0 30px rgba(0,184,212,0.10);
  pointer-events: none;
  z-index: 5;
}
.pg-screen-mag::after {
  content: "";
  position: absolute;
  right: -10px; bottom: -10px;
  width: 20px; height: 5px;
  background: rgba(0,184,212,0.7);
  transform: rotate(45deg);
  border-radius: 2px;
}
.pg-screen-spot {
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255, 107, 107, 0);
  border: 1.5px solid rgba(255, 107, 107, 0);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: background .12s, border-color .12s;
  z-index: 4;
}
.pg-screen-spot.revealed {
  background: rgba(255, 107, 107, 0.30);
  border-color: rgba(255, 107, 107, 0.85);
  box-shadow: 0 0 14px rgba(255, 107, 107, 0.5);
  animation: pg-pulse-fast 1.2s ease-in-out infinite;
}
.pg-screen-spot.found {
  background: rgba(255, 197, 111, 0.4);
  border-color: #FFC56F;
  box-shadow: 0 0 14px rgba(255,197,111,0.6);
  animation: none;
}

/* ---- STACK ------------------------------------------------- */
.pg-stack { position: absolute; inset: 0; }
.pg-stack canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* ---- MONITOR ----------------------------------------------- */
.pg-monitor { position: absolute; inset: 0; padding: 36px 36px 50px; }
.pg-mon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 14px;
  width: 100%; height: 100%;
}
.pg-mon-cell {
  position: relative;
  background: rgba(15,30,61,0.45);
  border: 1px solid rgba(0,184,212,0.25);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.pg-mon-cell:hover { border-color: rgba(0,184,212,0.6); }
.pg-mon-light {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(15,30,61,0.7);
  border: 1.5px solid rgba(0,184,212,0.30);
  transition: all .15s;
}
.pg-mon-light.on {
  background: #FF6B6B;
  border-color: #FF6B6B;
  box-shadow: 0 0 18px rgba(255,107,107,0.8);
  animation: pg-pulse-alarm 0.6s ease-in-out infinite;
}
.pg-mon-light.missed {
  background: rgba(232,137,59,0.4);
  border-color: #E8893B;
}
.pg-mon-label {
  margin-top: 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(232, 222, 199, 0.55);
  text-transform: uppercase;
}
@keyframes pg-pulse-alarm {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* ---- COMPACT ----------------------------------------------- */
.pg-compact { position: absolute; inset: 0; cursor: crosshair; }
.pg-compact canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.pg-compact-roller {
  position: absolute;
  width: 56px; height: 24px;
  background: linear-gradient(to bottom, #0F1E3D 0%, #00B8D4 50%, #0F1E3D 100%);
  border: 2px solid #00B8D4;
  border-radius: 4px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 16px rgba(0,184,212,0.55);
  pointer-events: none;
  z-index: 6;
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

/* ---- WELD -------------------------------------------------- */
.pg-weld { position: absolute; inset: 0; cursor: crosshair; }
.pg-weld canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.pg-weld-stab {
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 8px;
  background: rgba(15,30,61,0.65);
  border: 1px solid rgba(0,184,212,0.35);
  border-radius: 4px;
  overflow: hidden;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.pg-weld-stab-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #00B8D4, #FFC56F);
  box-shadow: 0 0 14px rgba(0,184,212,0.7);
  transition: width .12s linear;
}

/* ---- HAUL -------------------------------------------------- */
.pg-haul { position: absolute; inset: 0; cursor: crosshair; }
.pg-haul canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* Mobile tweaks for bespoke games */
@media (max-width: 760px) {
  .pg-crane-target { width: 60px; }
  .pg-screen-mag { width: 88px; height: 88px; }
  .pg-shoot-target { width: 28px; height: 28px; }
  .pg-monitor { padding: 22px 22px 38px; }
  .pg-mon-grid { gap: 10px; }
  .pg-mon-light { width: 24px; height: 24px; }
  .pg-mon-label { font-size: 9px; }
  .pg-weld-stab { width: 200px; top: 12px; }
  .pg-compact-roller { width: 44px; height: 20px; font-size: 15px; }
  .pg-crane-hint, .pg-drill-hint, .pg-shoot-hint, .pg-spray-hint,
  .pg-screen-hint, .pg-stack-hint, .pg-mon-hint, .pg-compact-hint,
  .pg-weld-hint, .pg-haul-hint {
    font-size: 9px; bottom: 10px; letter-spacing: 0.10em;
  }
}

/* ============================================================
   BESPOKE GAME STYLES (v6) — scoop, drag, swing, descent, conveyor,
   press, assemble, mount, tour, service, lockout, motion
   Each overlays .pg-stage with position:absolute;inset:0.
   ============================================================ */

/* Shared hint band */
.pg-scoop-hint, .pg-drag-hint, .pg-swing-hint, .pg-descent-hint,
.pg-conveyor-hint, .pg-press-hint, .pg-assemble-hint, .pg-mount-hint,
.pg-tour-hint, .pg-service-hint, .pg-lockout-hint, .pg-motion-hint {
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 222, 199, 0.72);
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  z-index: 6;
}

/* ---- SCOOP / DRAG / SWING / DESCENT / CONVEYOR / PRESS / MOUNT / MOTION
       — pure canvas games, just need canvas sizing rules ---- */
.pg-scoop, .pg-drag, .pg-swing, .pg-descent, .pg-conveyor,
.pg-press, .pg-mount, .pg-motion {
  position: absolute; inset: 0;
}
.pg-scoop canvas, .pg-drag canvas, .pg-swing canvas, .pg-descent canvas,
.pg-conveyor canvas, .pg-press canvas, .pg-mount canvas, .pg-motion canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.pg-scoop, .pg-conveyor, .pg-press, .pg-descent, .pg-swing { cursor: crosshair; }
.pg-drag { cursor: grab; }
.pg-drag:active { cursor: grabbing; }
.pg-mount { cursor: none; }   /* mount draws its own large tyre ring as cursor */
.pg-motion { cursor: pointer; }

/* ---- ASSEMBLE — drag-and-drop puzzle ---- */
.pg-assemble {
  position: absolute; inset: 0;
  cursor: grab;
}
.pg-assemble:active { cursor: grabbing; }
.pg-assemble canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* ---- TOUR — DOM hotspots over a floor plan ---- */
.pg-tour {
  position: absolute; inset: 0;
  padding: 22px 22px 50px;
}
.pg-tour-map {
  position: relative;
  width: 100%; height: 100%;
  background: rgba(15, 30, 61, 0.35);
  border: 1px solid rgba(0, 184, 212, 0.30);
  border-radius: 6px;
  background-image:
    linear-gradient(rgba(0, 184, 212, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 184, 212, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}
.pg-tour-room {
  position: absolute;
  background: rgba(0, 184, 212, 0.08);
  border: 1.5px solid rgba(0, 184, 212, 0.30);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s, transform .15s;
}
.pg-tour-room:hover { background: rgba(0, 184, 212, 0.14); }
.pg-tour-room.active {
  background: rgba(255, 197, 111, 0.20);
  border-color: #FFC56F;
  box-shadow: 0 0 18px rgba(255, 197, 111, 0.6);
  animation: pg-tour-pulse 1.1s ease-in-out infinite;
}
.pg-tour-room.visited {
  background: rgba(255, 197, 111, 0.45);
  border-color: #FFC56F;
  transform: scale(0.96);
}
.pg-tour-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(232, 222, 199, 0.85);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.pg-tour-room.active .pg-tour-label { color: #FFC56F; }
@keyframes pg-tour-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* ---- SERVICE — vehicle bay sequence ---- */
.pg-service {
  position: absolute; inset: 0;
  padding: 18px 22px 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pg-service-bay {
  height: 70px;
  background: rgba(0, 184, 212, 0.06);
  border: 1px solid rgba(0, 184, 212, 0.30);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  color: rgba(0, 184, 212, 0.85);
  letter-spacing: 0.10em;
}
.pg-service-vehicle {
  font-size: 24px;
  letter-spacing: 0.3em;
}
.pg-service-sequence {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  background: rgba(15, 30, 61, 0.50);
  border: 1px solid rgba(255, 197, 111, 0.25);
  border-radius: 4px;
  min-height: 36px;
}
.pg-svc-step {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  padding: 4px 8px;
  border-radius: 3px;
  color: rgba(232, 222, 199, 0.55);
  background: rgba(0, 184, 212, 0.06);
  border: 1px solid rgba(0, 184, 212, 0.20);
  transition: all .15s;
}
.pg-svc-step.done {
  color: rgba(255, 197, 111, 0.5);
  background: rgba(255, 197, 111, 0.10);
  border-color: rgba(255, 197, 111, 0.40);
  text-decoration: line-through;
}
.pg-svc-step.now {
  color: #FFC56F;
  background: rgba(255, 197, 111, 0.20);
  border-color: #FFC56F;
  box-shadow: 0 0 12px rgba(255, 197, 111, 0.4);
  animation: pg-pulse-fast 0.9s ease-in-out infinite;
}
.pg-svc-arrow {
  color: rgba(0, 184, 212, 0.45);
  font-size: 14px;
}
.pg-service-stations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  flex: 1;
}
.pg-svc-btn {
  background: rgba(0, 184, 212, 0.08);
  border: 1.5px solid rgba(0, 184, 212, 0.35);
  border-radius: 4px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(232, 222, 199, 0.85);
  cursor: pointer;
  padding: 14px 10px;
  transition: all .15s;
}
.pg-svc-btn:hover {
  background: rgba(0, 184, 212, 0.18);
  border-color: var(--cyan);
}
.pg-svc-btn.hit {
  background: rgba(255, 197, 111, 0.3);
  border-color: #FFC56F;
  color: #FFC56F;
}
.pg-svc-btn.wrong {
  background: rgba(255, 107, 107, 0.3);
  border-color: #FF6B6B;
  color: #FF6B6B;
}

/* ---- LOCKOUT — devices in sequence ---- */
.pg-lockout {
  position: absolute; inset: 0;
  padding: 18px 22px 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pg-lockout-seq {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(15, 30, 61, 0.50);
  border: 1px solid rgba(255, 197, 111, 0.25);
  border-radius: 4px;
}
.pg-lo-step {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(232, 222, 199, 0.55);
  padding: 4px 8px;
  border-radius: 3px;
  background: rgba(0, 184, 212, 0.06);
  border: 1px solid rgba(0, 184, 212, 0.20);
}
.pg-lo-step.done {
  color: rgba(255, 197, 111, 0.5);
  background: rgba(255, 197, 111, 0.10);
  border-color: rgba(255, 197, 111, 0.4);
  text-decoration: line-through;
}
.pg-lo-step.now {
  color: #FFC56F;
  background: rgba(255, 197, 111, 0.20);
  border-color: #FFC56F;
  animation: pg-pulse-fast 0.9s ease-in-out infinite;
}
.pg-lockout-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  flex: 1;
}
.pg-lo-device {
  background: rgba(0, 184, 212, 0.08);
  border: 1.5px solid rgba(0, 184, 212, 0.35);
  border-radius: 6px;
  cursor: pointer;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all .15s;
}
.pg-lo-device:hover {
  background: rgba(0, 184, 212, 0.18);
  border-color: var(--cyan);
}
.pg-lo-icon {
  font-size: 26px;
  color: var(--cyan);
  font-family: var(--f-mono);
}
.pg-lo-name {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  color: rgba(232, 222, 199, 0.7);
}
.pg-lo-device.locked {
  background: rgba(255, 197, 111, 0.20);
  border-color: #FFC56F;
}
.pg-lo-device.locked .pg-lo-icon { color: #FFC56F; }
.pg-lo-device.locked .pg-lo-name { color: #FFC56F; }
.pg-lo-device.wrong {
  background: rgba(255, 107, 107, 0.20);
  border-color: #FF6B6B;
  animation: pg-shake-cell 0.28s ease;
}
@keyframes pg-shake-cell {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Mobile tweaks */
@media (max-width: 760px) {
  .pg-tour { padding: 14px 14px 38px; }
  .pg-tour-label { font-size: 9px; }
  .pg-service { padding: 12px 14px 38px; }
  .pg-svc-btn { padding: 10px 6px; font-size: 9px; }
  .pg-svc-step { font-size: 9px; padding: 3px 6px; }
  .pg-lockout { padding: 12px 14px 38px; }
  .pg-lo-icon { font-size: 22px; }
  .pg-lo-name { font-size: 9px; }
  .pg-lo-step { font-size: 9px; padding: 3px 6px; }
  .pg-scoop-hint, .pg-drag-hint, .pg-swing-hint, .pg-descent-hint,
  .pg-conveyor-hint, .pg-press-hint, .pg-assemble-hint, .pg-mount-hint,
  .pg-tour-hint, .pg-service-hint, .pg-lockout-hint, .pg-motion-hint {
    font-size: 9px; bottom: 10px; letter-spacing: 0.08em;
  }
}
