/* AI Scavenger Hunt - phone-first, uses the sitewide graffiti tokens. */

.sh-tagline { max-width: 46ch; }

.sh-app {
  max-width: 520px;
  margin: 0 auto;
}

/* -- mode picker -- */
.sh-modes {
  display: grid;
  /* minmax(0,1fr) - not 1fr - so the columns can shrink below their content
     instead of forcing the whole page to overflow on narrow phones. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.9rem;
  margin: 1.5rem 0;
}

.sh-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 0; /* let the grid column shrink to the container instead of forcing overflow */
  padding: 1.4rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--paper);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.sh-mode:hover, .sh-mode:focus-visible {
  transform: translateY(-3px);
  border-color: var(--spray-cyan);
}

.sh-mode-icon { font-size: 2.4rem; line-height: 1; }
.sh-mode-name {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.1rem;
}
.sh-mode-sub { font-size: 0.72rem; color: var(--muted-2); text-align: center; }

@media (max-width: 360px) {
  .sh-modes { grid-template-columns: 1fr; }
}

/* -- scoreboard -- */
.sh-scoreboard {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0 1.25rem;
}
.sh-stat { display: flex; flex-direction: column; align-items: center; }
.sh-stat-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  background: var(--graffiti-gradient);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.sh-stat-label {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* -- the hunt -- */
.sh-stage { text-align: center; }

.sh-challenge-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.sh-challenge {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--paper);
  font-size: clamp(1rem, 4.6vw, 1.5rem);
  line-height: 1.15;
  text-wrap: balance;
  overflow-wrap: break-word; /* the wide display font has long words - let them break rather than overflow */
  margin: 0.3rem auto 1rem;
  max-width: 20ch;
  min-height: 2.4em;
}

.sh-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 60vh;
  background: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sh-video, .sh-shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* the live preview is tappable to snap (button can scroll off when zoomed) */
.sh-video { cursor: pointer; }

.sh-tap-hint {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: var(--paper);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none; /* never intercept the tap meant for the video */
}

/* zoom stepper overlaid on the preview - stays put when the page is pinch-zoomed */
.sh-zoom {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.4rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
}
.sh-zoom-btn {
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: var(--paper);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sh-zoom-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.28); }
.sh-zoom-btn:disabled { opacity: 0.3; cursor: default; }
.sh-zoom-label {
  min-width: 2.4ch;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.sh-viewport-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* -- verdict -- */
.sh-verdict {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sh-verdict-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.sh-verdict-badge.is-hit { background: rgba(43, 232, 154, 0.18); color: var(--spray-mint); border: 1px solid rgba(43, 232, 154, 0.4); }
.sh-verdict-badge.is-miss { background: rgba(255, 47, 126, 0.15); color: var(--spray-pink); border: 1px solid rgba(255, 47, 126, 0.4); }
.sh-verdict-points {
  display: inline-block;
  margin-left: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--spray-yellow);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.sh-verdict-text { margin: 0.5rem 0 0; color: var(--paper); line-height: 1.5; }

.sh-status {
  min-height: 1.2em;
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  color: var(--spray-yellow);
}

/* -- controls -- */
.sh-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
}
.sh-controls .btn { min-width: 8rem; }
.sh-upload { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

/* -- high-score line on the start screen -- */
.sh-highline {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
}
.sh-highline strong { color: var(--spray-yellow); font-variant-numeric: tabular-nums; }

/* -- game over -- */
.sh-gameover {
  text-align: center;
  margin-top: 0.5rem;
}
.sh-gameover-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.sh-gameover-score {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 14vw, 4rem);
  line-height: 1;
  margin: 0.2rem 0 0.4rem;
  background: var(--graffiti-gradient);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  animation: hue-drift 14s linear infinite;
}
.sh-gameover-max {
  font-size: 1.2rem;
  color: var(--muted-2);
  -webkit-text-fill-color: var(--muted-2);
}
.sh-gameover-msg {
  color: var(--paper);
  line-height: 1.5;
  margin: 0 auto 1rem;
  max-width: 34ch;
}

.sh-initials {
  margin: 0 auto 1.25rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid rgba(255, 210, 63, 0.4);
  border-radius: var(--radius);
  max-width: 22rem;
}
.sh-initials-label {
  display: block;
  font-size: 0.85rem;
  color: var(--spray-yellow);
  margin-bottom: 0.5rem;
}
.sh-initials-row { display: flex; gap: 0.5rem; justify-content: center; }
.sh-initials-input {
  width: 6rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--paper);
  padding: 0.3rem 0.5rem;
}

.sh-privacy {
  margin-top: 1.75rem;
  font-size: 0.72rem;
  color: var(--muted-2);
  text-align: center;
  line-height: 1.5;
}
