:root {
  --hg-cinematic-lime: #c8ff38;
  --hg-cinematic-cyan: #49d7ff;
  --hg-cinematic-coral: #ff506c;
}

/* Two clear choices: play the green signal character or enter the creator. */
.entry-character-grid.hg-v2-entry-grid,
.hg-v2-new-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.entry-character-grid .hg-v2-starter.hg-v2-choice,
.hg-v2-new-grid .hg-v2-starter.hg-v2-choice {
  --hg-choice-accent: var(--hg-cinematic-lime);
  position: relative;
  isolation: isolate;
  display: block;
  min-height: clamp(184px, 21vw, 238px);
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(232, 246, 239, 0.2);
  border-radius: 18px;
  background: #06100d;
  color: #f7fbf8;
  text-align: left;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
  transform: translateY(0);
  transition:
    transform 240ms cubic-bezier(0.2, 0.75, 0.25, 1),
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.entry-character-grid .hg-v2-choice-create,
.hg-v2-new-grid .hg-v2-choice-create {
  --hg-choice-accent: var(--hg-cinematic-cyan);
}

.hg-v2-choice::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(1, 7, 5, 0.02) 16%, rgba(1, 7, 5, 0.38) 52%, rgba(1, 7, 5, 0.96) 100%),
    linear-gradient(90deg, rgba(2, 9, 7, 0.76), transparent 72%);
  pointer-events: none;
}

.hg-v2-choice::after {
  position: absolute;
  z-index: 2;
  top: -35%;
  bottom: -35%;
  left: -64%;
  width: 42%;
  content: "";
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--hg-choice-accent) 34%, transparent), transparent);
  filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transform: skewX(-15deg);
}

.hg-v2-choice-art,
.entry-character-grid .hg-v2-choice-art,
.hg-v2-new-grid .hg-v2-choice-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  overflow: hidden;
  background: #06100d;
}

.hg-v2-choice-art img,
.entry-character-grid .hg-v2-choice-art img,
.hg-v2-new-grid .hg-v2-choice-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  filter: saturate(1.04) contrast(1.04);
  transform: scale(1.025);
  transition:
    transform 650ms cubic-bezier(0.18, 0.75, 0.22, 1),
    filter 260ms ease;
}

.hg-v2-choice-create .hg-v2-choice-art img {
  object-position: 64% center;
}

.hg-v2-choice-copy,
.entry-character-grid .hg-v2-choice-copy,
.hg-v2-new-grid .hg-v2-choice-copy {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 13px;
  left: 14px;
  display: grid;
  gap: 5px;
  align-content: end;
  padding: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.82);
  pointer-events: none;
}

.hg-v2-choice-copy > small,
.entry-character-grid .hg-v2-choice-copy > small,
.hg-v2-new-grid .hg-v2-choice-copy > small {
  display: block;
  overflow: visible;
  color: var(--hg-choice-accent);
  font: 850 9px/1.1 system-ui, sans-serif;
  letter-spacing: 0.16em;
  -webkit-line-clamp: unset;
}

.hg-v2-choice-copy > strong,
.entry-character-grid .hg-v2-choice-copy > strong,
.hg-v2-new-grid .hg-v2-choice-copy > strong {
  overflow: visible;
  color: #fff;
  font: 900 clamp(16px, 2vw, 24px)/0.96 system-ui, sans-serif;
  letter-spacing: -0.035em;
  text-overflow: clip;
}

.hg-v2-choice-copy > em {
  display: -webkit-box;
  max-width: 31ch;
  overflow: hidden;
  color: rgba(242, 248, 245, 0.68);
  font: 600 10px/1.35 system-ui, sans-serif;
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.entry-character-grid .hg-v2-choice > i,
.hg-v2-new-grid .hg-v2-choice > i {
  z-index: 4;
  top: 11px;
  right: 11px;
  width: 26px;
  height: 26px;
  border: 1px solid color-mix(in srgb, var(--hg-choice-accent) 72%, white);
  background: var(--hg-choice-accent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--hg-choice-accent) 48%, transparent);
}

.entry-character-grid .hg-v2-choice:hover,
.entry-character-grid .hg-v2-choice:focus-visible,
.entry-character-grid .hg-v2-choice[aria-pressed="true"],
.hg-v2-new-grid .hg-v2-choice:hover,
.hg-v2-new-grid .hg-v2-choice:focus-visible,
.hg-v2-new-grid .hg-v2-choice[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--hg-choice-accent) 76%, white);
  background: #06100d;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.42),
    0 0 0 1px color-mix(in srgb, var(--hg-choice-accent) 18%, transparent),
    0 0 38px color-mix(in srgb, var(--hg-choice-accent) 16%, transparent);
  transform: translateY(-4px);
}

.hg-v2-choice:hover .hg-v2-choice-art img,
.hg-v2-choice:focus-visible .hg-v2-choice-art img,
.hg-v2-choice[aria-pressed="true"] .hg-v2-choice-art img {
  filter: saturate(1.14) contrast(1.08);
  transform: scale(1.085) translate3d(1.5%, -0.5%, 0);
}

.hg-v2-choice:focus-visible {
  outline: 2px solid var(--hg-cinematic-cyan);
  outline-offset: 3px;
}

.hg-v2-choice[aria-pressed="true"]::after {
  opacity: 0.9;
  animation: hg-choice-sweep 2.8s cubic-bezier(0.32, 0.05, 0.22, 1) infinite;
}

/* Let the capture command own the screen while the player is in beacon range. */
.hg-v2-tour.is-capture-action {
  pointer-events: none;
}

.hg-v2-tour .hg-v2-tour-card,
.hg-v2-tour .hg-v2-tour-scrim {
  transition: opacity 170ms ease, transform 220ms ease, visibility 0s linear 0s;
}

.hg-v2-tour.is-capture-action .hg-v2-tour-card,
.hg-v2-tour.is-capture-action .hg-v2-tour-scrim {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.hg-v2-tour.is-capture-action .hg-v2-tour-card {
  transform: translateY(18px) scale(0.985);
}

/* Small, tactile controls; the 3D camera remains the dominant interaction. */
.hg-camera-controls {
  position: fixed;
  z-index: 360;
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 10px));
  left: max(14px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: repeat(3, 44px);
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(232, 246, 239, 0.18);
  border-radius: 16px;
  background: rgba(4, 12, 9, 0.7);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px) saturate(1.15);
}

.hg-camera-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(232, 246, 239, 0.14);
  border-radius: 12px;
  background: rgba(238, 248, 243, 0.055);
  color: #f5faf7;
  font: 700 21px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.hg-camera-controls button:hover,
.hg-camera-controls button:focus-visible {
  border-color: rgba(200, 255, 56, 0.7);
  background: rgba(200, 255, 56, 0.12);
  color: var(--hg-cinematic-lime);
  transform: translateY(-1px);
}

.hg-camera-controls button:focus-visible {
  outline: 2px solid var(--hg-cinematic-cyan);
  outline-offset: 2px;
}

.hg-v2-modal-open .hg-camera-controls {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

@keyframes hg-choice-sweep {
  0%, 20% { left: -64%; }
  64%, 100% { left: 124%; }
}

@media (max-width: 720px) {
  .entry-character-grid .hg-v2-starter.hg-v2-choice,
  .hg-v2-new-grid .hg-v2-starter.hg-v2-choice {
    grid-template-rows: none;
    min-height: 164px;
    border-radius: 14px;
  }

  .hg-v2-choice-copy,
  .entry-character-grid .hg-v2-choice-copy,
  .hg-v2-new-grid .hg-v2-choice-copy {
    right: 10px;
    bottom: 11px;
    left: 11px;
  }

  .hg-v2-choice-copy > strong,
  .entry-character-grid .hg-v2-choice-copy > strong,
  .hg-v2-new-grid .hg-v2-choice-copy > strong {
    font-size: clamp(14px, 4vw, 18px);
  }

  .hg-v2-choice-copy > em {
    font-size: 9px;
  }

  .hg-camera-controls {
    grid-template-columns: repeat(3, 42px);
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
  }

  .hg-camera-controls button {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }
}

@media (max-width: 520px) {
  .entry-character-grid.hg-v2-entry-grid,
  .hg-v2-new-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .entry-character-grid .hg-v2-starter.hg-v2-choice,
  .hg-v2-new-grid .hg-v2-starter.hg-v2-choice {
    min-height: 132px;
  }

  .hg-v2-choice::before {
    background:
      linear-gradient(90deg, rgba(1, 7, 5, 0.92) 0%, rgba(1, 7, 5, 0.58) 49%, rgba(1, 7, 5, 0.06) 100%),
      linear-gradient(180deg, transparent, rgba(1, 7, 5, 0.46));
  }

  .hg-v2-choice-copy,
  .entry-character-grid .hg-v2-choice-copy,
  .hg-v2-new-grid .hg-v2-choice-copy {
    top: 50%;
    right: 42%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .hg-v2-choice-copy > em {
    -webkit-line-clamp: 2;
  }

  .hg-v2-choice-art img,
  .entry-character-grid .hg-v2-choice-art img,
  .hg-v2-new-grid .hg-v2-choice-art img {
    object-position: 72% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hg-v2-choice,
  .hg-v2-choice::after,
  .hg-v2-choice-art img,
  .hg-v2-tour .hg-v2-tour-card,
  .hg-v2-tour .hg-v2-tour-scrim,
  .hg-camera-controls button {
    animation: none !important;
    transition: none !important;
  }

  .hg-v2-choice:hover,
  .hg-v2-choice:focus-visible,
  .hg-v2-choice[aria-pressed="true"] {
    transform: none;
  }
}
