/* =============================================================================
   Scope Creep styles
   =============================================================================
   Mirrors the shared design tokens used across the games (see static/site.css).
   The viewport is wider than it is tall: the camera scrolls horizontally and
   the world is 420px tall, so a 16/9 wrap shows a useful slice of the level.
   ========================================================================== */

.sc-shell {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 0.75rem);
  user-select: none;
}

.sc-status {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3, 0.75rem);
  align-items: center;
  padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
  background: var(--bg-elevated, #131319);
  border: 1px solid var(--border, #2a2a35);
  border-radius: var(--radius-md, 8px);
  font-family: var(--font-mono, ui-monospace);
  font-size: var(--font-size-sm, 0.875rem);
}

.sc-status .label {
  color: var(--text-secondary, #9999a8);
}
.sc-status .value {
  color: var(--text-primary, #e8e8f0);
  font-variant-numeric: tabular-nums;
}
.sc-status .cleared {
  color: var(--accent-cyan, #00f0ff);
}
.sc-status .tries {
  color: var(--accent-magenta, #ff2dd1);
}
.sc-status .right {
  margin-left: auto;
  text-transform: lowercase;
}

.sc-canvas-wrap {
  position: relative;
  width: 100%;
  background: #0a0a0f;
  border: 1px solid var(--border, #2a2a35);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  touch-action: none;
}

.sc-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.sc-canvas:focus-visible {
  outline: 2px solid var(--accent-cyan, #00f0ff);
  outline-offset: -2px;
}

/* The taunt banner: a short line that fades in at the top of a fresh level.
   It is decorative flavor; the level name also lives in the status row. */
.sc-banner {
  position: absolute;
  top: var(--space-3, 0.75rem);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  max-width: 90%;
  padding: var(--space-2, 0.5rem) var(--space-4, 1rem);
  background: rgba(10, 10, 15, 0.82);
  border: 1px solid var(--border, #2a2a35);
  border-radius: var(--radius-md, 8px);
  font-family: var(--font-mono, ui-monospace);
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--text-primary, #e8e8f0);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}
.sc-banner.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .sc-banner {
    transition: none;
  }
}

.sc-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(10, 10, 15, 0.78);
  backdrop-filter: blur(2px);
  padding: var(--space-5, 1.5rem);
}
.sc-overlay[hidden] {
  display: none;
}
.sc-overlay h2 {
  margin: 0 0 var(--space-3, 0.75rem);
  font-size: var(--font-size-xl, 1.5rem);
}
.sc-overlay p {
  color: var(--text-secondary, #9999a8);
  margin: 0 0 var(--space-4, 1rem);
  max-width: 42ch;
}
.sc-overlay button {
  font: inherit;
  cursor: pointer;
  padding: var(--space-2, 0.5rem) var(--space-5, 1.5rem);
  background: var(--accent-cyan, #00f0ff);
  color: #05050a;
  border: none;
  border-radius: var(--radius-md, 8px);
  font-weight: 600;
}
.sc-overlay button:hover {
  filter: brightness(1.1);
}
.sc-overlay button:focus-visible {
  outline: 2px solid var(--text-primary, #e8e8f0);
  outline-offset: 2px;
}
.sc-overlay .submit-state {
  font-family: var(--font-mono, ui-monospace);
  color: var(--text-muted, #5a5a68);
  font-size: var(--font-size-xs, 0.75rem);
  margin-top: var(--space-3, 0.75rem);
  min-height: 1.2em;
}

/* On-screen controls. Always present per the mobile-first rule; the Game
   reveals them with .on at start. Big touch targets, thumb-reachable. */
.sc-touch {
  display: none;
  gap: var(--space-3, 0.75rem);
  align-items: center;
  justify-content: space-between;
}
.sc-touch.on {
  display: flex;
}
.sc-touch .sc-tbtn {
  font: inherit;
  cursor: pointer;
  flex: 1 1 0;
  min-height: 56px;
  background: var(--bg-elevated, #131319);
  color: var(--text-primary, #e8e8f0);
  border: 1px solid var(--border, #2a2a35);
  border-radius: var(--radius-md, 8px);
  font-size: var(--font-size-lg, 1.125rem);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.sc-touch .sc-tbtn:active {
  background: #1d1d28;
  border-color: var(--accent-cyan, #00f0ff);
}
.sc-touch .sc-tbtn.jump {
  flex: 1.4 1 0;
  background: var(--accent-magenta, #ff2dd1);
  color: #05050a;
  border-color: var(--accent-magenta, #ff2dd1);
  font-weight: 600;
  text-transform: lowercase;
}
.sc-touch .sc-tbtn:focus-visible {
  outline: 2px solid var(--accent-cyan, #00f0ff);
  outline-offset: 2px;
}

.sc-help {
  font-size: var(--font-size-xs, 0.75rem);
  color: var(--text-muted, #5a5a68);
  font-family: var(--font-mono, ui-monospace);
  margin: 0;
}
