/* SCRIPTNIGHT // VIEWPORT-CONTAINED GAME SHARING */
.game-page-tools {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.game-page-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 38px;
  padding: 0.55rem 0.78rem;
  border: 1px solid rgba(0, 246, 255, 0.25);
  border-radius: 999px;
  color: #9ffcf7;
  background: rgba(0, 18, 18, 0.68);
  font-family: var(--mono);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.game-page-share svg {
  width: 15px;
  height: 15px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.game-page-share strong {
  font-size: 0.55rem;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.game-page-share:hover,
.game-page-share:focus-visible {
  outline: none;
  color: var(--green-soft);
  border-color: rgba(0, 255, 157, 0.62);
  background: rgba(0, 35, 25, 0.8);
  box-shadow: 0 0 22px rgba(0, 255, 157, 0.1);
  transform: translateY(-1px);
}

.game-page-share[data-state="complete"] {
  color: #00100c;
  border-color: var(--green);
  background: var(--green);
}

.game-page-share[data-state="error"] {
  color: #ffd7e3;
  border-color: rgba(255, 79, 131, 0.58);
}

.game-share-status {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 520px) {
  .game-page-tools { gap: 0.42rem; }
  .game-page-share { min-width: 38px; padding: 0.5rem; }
  .game-page-share strong { display: none; }
}

@media (orientation: landscape) and (max-height: 540px) {
  html.is-playing .game-page-tools { gap: 0.35rem; }
  html.is-playing .game-page-share { min-width: 34px; min-height: 34px; padding: 0.4rem; }
  html.is-playing .game-page-share strong { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .game-page-share { transition: none; }
}
