/* ── Stair Dash — full-page dark atmospheric override ──────────────── */

/* 1. Page atmosphere — overrides shared shell top-to-bottom */
.stair-dash-page {
  background: #0a0015;
  color: rgba(210, 185, 255, 0.9);
}

.stair-dash-page .site-header {
  background: rgba(8, 0, 18, 0.96);
  border-bottom: 1px solid rgba(120, 60, 200, 0.22);
  backdrop-filter: blur(14px);
}

.stair-dash-page .site-brand {
  color: rgba(200, 165, 255, 0.92);
}

.stair-dash-page .site-nav a {
  color: rgba(170, 140, 220, 0.72);
}

.stair-dash-page .site-footer {
  background: rgba(5, 0, 12, 0.98);
  border-top: 1px solid rgba(120, 60, 200, 0.2);
  color: rgba(160, 130, 200, 0.65);
}

.stair-dash-page .footer-title {
  color: rgba(200, 165, 255, 0.88);
}

.stair-dash-page .footer-copy,
.stair-dash-page .site-nav.site-nav--footer a {
  color: rgba(150, 120, 190, 0.62);
}

/* 2. Remove the generic tool-shell box — arcade cabinet IS the shell */
.stair-dash-page .tool-shell {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* 3. Section spacing */
.stair-dash-page .section-tool-page {
  padding-block: 12px 24px;
}

/* 4. Header text */
.stair-dash-page .page-title {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow:
    0 0 32px rgba(160, 100, 255, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.6);
}

.stair-dash-page .page-subtitle {
  color: rgba(190, 160, 255, 0.68);
  font-style: italic;
  letter-spacing: 0.03em;
  font-size: 0.98rem;
}

/* 5. Notes card — dark glass instead of generic white card */
.stair-dash-page .tool-notes.card {
  margin-top: 1.25rem;
  background: rgba(14, 5, 32, 0.92);
  border: 1px solid rgba(120, 60, 200, 0.24);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  border-radius: 1.1rem;
  transition: none;
}

.stair-dash-page .tool-notes.card:hover,
.stair-dash-page .tool-notes.card:focus-within {
  transform: none;
  border-color: rgba(140, 80, 220, 0.32);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.38);
}

.stair-dash-page .card-title {
  color: rgba(215, 185, 255, 0.95);
}

.stair-dash-page .card-text {
  color: rgba(180, 150, 220, 0.76);
}

/* ── Arcade cabinet frame ────────────────────────────────────────────── */
.stair-dash-page .arcade-cabinet {
  position: relative;
  display: grid;
  gap: 0.85rem;
  padding: clamp(0.92rem, 2vw, 1.2rem);
  border-radius: 1.85rem;
  border: 1px solid rgba(120, 60, 200, 0.28);
  background:
    radial-gradient(circle at 14% 0%, rgba(160, 80, 255, 0.18), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(60, 20, 140, 0.22), transparent 32%),
    linear-gradient(180deg, rgba(14, 6, 30, 0.99), rgba(8, 2, 20, 0.99));
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(80, 30, 160, 0.15),
    inset 0 1px 0 rgba(160, 120, 255, 0.08);
}

.stair-dash-page .arcade-cabinet::after {
  content: "";
  position: absolute;
  inset: 0.6rem;
  border-radius: 1.45rem;
  border: 1px dashed rgba(140, 80, 220, 0.14);
  pointer-events: none;
}

/* ── Marquee bar ─────────────────────────────────────────────────────── */
.stair-dash-page .arcade-marquee {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.stair-dash-page .arcade-marquee__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.stair-dash-page .arcade-marquee__pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.22rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(140, 80, 220, 0.28);
  background: rgba(30, 10, 60, 0.88);
  color: rgba(190, 160, 255, 0.9);
  font-size: 0.8rem;
  font-weight: 700;
}

/* Override shared button styles for dark arcade theme */
.stair-dash-page .button-primary {
  background: linear-gradient(135deg, rgba(120, 50, 230, 0.95), rgba(80, 20, 180, 0.9));
  border-color: rgba(160, 100, 255, 0.4);
  color: #fff;
  box-shadow: 0 4px 16px rgba(100, 40, 200, 0.4);
}

.stair-dash-page .button-primary:hover,
.stair-dash-page .button-primary:focus-visible {
  background: linear-gradient(135deg, rgba(140, 70, 255, 0.98), rgba(100, 30, 210, 0.95));
  border-color: rgba(180, 130, 255, 0.5);
  box-shadow: 0 6px 22px rgba(120, 50, 230, 0.5);
  transform: translateY(-1px);
}

/* ── Canvas wrapper ──────────────────────────────────────────────────── */
.sd-canvas-wrap {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#sd-canvas {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(120, 80, 200, 0.3);
  background: #1a0a2e;
  touch-action: none;
  margin: 0 auto;
  box-shadow:
    0 0 0 1px rgba(80, 40, 160, 0.2),
    0 4px 24px rgba(80, 0, 160, 0.25);
}

/* ── Mobile tap buttons ──────────────────────────────────────────────── */
.sd-mobile-controls {
  display: none;
  width: 100%;
  max-width: 480px;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

@media (pointer: coarse) {
  .sd-mobile-controls {
    display: grid;
  }
}

.sd-mobile-btn {
  padding: 0.9rem 0;
  border-radius: 0.75rem;
  border: 1px solid rgba(120, 60, 200, 0.3);
  background: rgba(25, 8, 55, 0.75);
  color: rgba(180, 140, 255, 0.92);
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 120ms ease, transform 80ms ease;
  user-select: none;
  -webkit-user-select: none;
}

.sd-mobile-btn:active {
  background: rgba(60, 20, 130, 0.88);
  transform: scale(0.97);
}

/* ── Controls hint ───────────────────────────────────────────────────── */
.sd-controls-hint {
  margin: 0;
  text-align: center;
  color: rgba(160, 120, 230, 0.72);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sd-controls-hint kbd {
  display: inline-block;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  border: 1px solid rgba(140, 80, 220, 0.35);
  background: rgba(40, 12, 80, 0.8);
  color: rgba(200, 170, 255, 0.95);
  font-family: monospace;
  font-size: 0.85em;
  font-style: normal;
  line-height: 1.4;
  vertical-align: middle;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .stair-dash-page .arcade-cabinet {
    padding: 0.82rem;
    border-radius: 1.35rem;
  }

  .stair-dash-page .arcade-cabinet::after {
    inset: 0.45rem;
    border-radius: 1.08rem;
  }

  .stair-dash-page .arcade-marquee__actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
}
