/* The Gate v2: the constellation is the interface. */
body.gate-arcade .arcade-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

body.gate-arcade .arcade-header {
  justify-content: flex-start;
}

body.gate-arcade .arcade-title-wrap {
  display: flex;
  align-items: center;
}

body.gate-arcade .gate-screen {
  min-height: 0;
}

body.gate-arcade #gateStarfield {
  background-color: #000;
  background-image:
    radial-gradient(circle at 8% 17%, rgba(255, 255, 255, .72) 0 1px, transparent 1.3px),
    radial-gradient(circle at 71% 29%, rgba(143, 245, 233, .55) 0 1px, transparent 1.35px),
    radial-gradient(circle at 42% 76%, rgba(255, 207, 114, .5) 0 1px, transparent 1.3px),
    radial-gradient(circle at 84% 83%, rgba(255, 255, 255, .48) 0 1px, transparent 1.2px);
  background-size: 83px 79px, 127px 113px, 163px 149px, 211px 197px;
  background-position: 0 0, 19px 31px, 47px 11px, 7px 59px;
}

body.gate-arcade .gate-interface {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  padding: clamp(.75rem, 2vw, 1.35rem);
}

body.gate-arcade .gate-grid {
  place-self: center;
  width: min(64vmin, 34rem, 100%);
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 4 / 5;
}

body.gate-arcade .gate-filaments {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body.gate-arcade .gate-node,
html[data-mode="1999"] body.gate-arcade .gate-node {
  --node-size: clamp(3.5rem, 8vmin, 5rem);
  width: var(--node-size);
  height: var(--node-size);
  padding: 0;
  border: 0 !important;
  border-radius: 50% !important;
  color: rgba(216, 235, 234, .27);
  background: transparent !important;
  box-shadow: none !important;
  transition: color 180ms ease, transform 180ms ease, filter 180ms ease;
}

body.gate-arcade .gate-node .four-point-star {
  width: 48%;
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
}

body.gate-arcade .gate-node:hover,
body.gate-arcade .gate-node:focus-visible,
body.gate-arcade .gate-node.is-touched {
  color: rgba(232, 255, 252, .84);
  border: 0 !important;
  background: transparent !important;
  outline: none !important;
  transform: translate(-50%, -50%) scale(1.08);
}

body.gate-arcade .gate-node:focus-visible .four-point-star {
  filter: drop-shadow(0 0 .5rem var(--arcade-primary));
}

body.gate-arcade .gate-node.collected,
html[data-mode="1999"] body.gate-arcade .gate-node.collected {
  color: var(--arcade-primary);
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: drop-shadow(0 0 .48rem rgba(143, 245, 233, .42));
}

body.gate-arcade .gate-clue {
  position: absolute;
  left: 50%;
  bottom: clamp(.7rem, 2vh, 1.2rem);
  z-index: 20;
  width: min(34rem, calc(100% - 2rem));
  transform: translateX(-50%);
  padding: .62rem .85rem;
  border-top: 1px solid rgba(143, 245, 233, .28);
  border-bottom: 1px solid rgba(143, 245, 233, .18);
  color: var(--arcade-muted);
  background: rgba(0, 7, 8, .86);
  text-align: center;
  pointer-events: none;
}

body.gate-arcade .gate-clue[hidden] {
  display: none !important;
}

body.gate-arcade .gate-clue strong {
  display: block;
  margin-bottom: .22rem;
  color: var(--arcade-primary);
  font-size: clamp(.66rem, 1.3vw, .78rem);
  letter-spacing: .12em;
  text-transform: uppercase;
}

body.gate-arcade .gate-clue span {
  font-size: clamp(.62rem, 1.2vw, .72rem);
  line-height: 1.45;
}

body.gate-arcade .gate-node-index,
body.gate-arcade .gate-screen-label,
body.gate-arcade .gate-console,
body.gate-arcade .arcade-stats,
body.gate-arcade .arcade-footer,
body.gate-arcade .arcade-subtitle {
  display: none !important;
}

html[data-mode="1999"] body.gate-arcade .gate-node {
  color: color-mix(in srgb, var(--arcade-primary) 35%, transparent);
}

html[data-mode="1999"] body.gate-arcade .gate-node.collected {
  color: var(--arcade-secondary);
  filter: drop-shadow(2px 2px 0 #000) drop-shadow(0 0 .35rem var(--arcade-primary));
}

html[data-mode="1999"] body.gate-arcade .gate-node:focus-visible {
  outline: none !important;
}

html[data-mode="1999"] body.gate-arcade .gate-clue {
  border: 2px ridge var(--arcade-line-hard);
  color: var(--arcade-primary);
  background: #000;
  box-shadow: 3px 3px 0 #000;
}

html[data-mode="1999"] body.gate-arcade .gate-clue strong {
  color: var(--arcade-secondary);
}

@media (max-width: 720px) {
  body.gate-arcade .arcade-shell {
    gap: .42rem;
  }

  body.gate-arcade .arcade-header {
    min-height: 3.25rem;
  }

  body.gate-arcade .gate-interface {
    padding: .4rem;
  }

  body.gate-arcade .gate-grid {
    width: min(86vw, 55svh, 29rem);
  }

  body.gate-arcade .gate-node,
  html[data-mode="1999"] body.gate-arcade .gate-node {
    --node-size: clamp(3.25rem, 14vw, 4.4rem);
  }

  body.gate-arcade .gate-clue {
    bottom: .45rem;
    width: calc(100% - 1rem);
    padding: .52rem .62rem;
  }
}

@media (max-height: 650px) {
  body.gate-arcade .gate-grid {
    width: min(76vw, 73svh, 29rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.gate-arcade .gate-node.twinkle .four-point-star {
    animation: none;
  }
}
