/* /dead-pixel-test/ — start panel, steps, the nine test colours and the
   full-screen colour stage. Replaces the page's inline dp- style block.
   Frame, h1 and subline come from games.css. Hardware accent. The pure
   test colours (strip, chips, stage) are the instrument and stay literal. */

/* Start panel: a category panel with the test-colour strip on top. */
.dp-hero.glass-panel {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--cyan);
  background: var(--bg-raised);
  box-shadow: none;
  text-align: center;
}
.dp-hero-strip {
  block-size: 8px;
  inline-size: 100%;
  background: linear-gradient(90deg, #fff 0 11.11%, #f00 11.11% 22.22%, #0f0 22.22% 33.33%, #00f 33.33% 44.44%, #0ff 44.44% 55.55%, #f0f 55.55% 66.66%, #ff0 66.66% 77.77%, #808080 77.77% 88.88%, #000 88.88% 100%);
}
[dir="rtl"] .dp-hero-strip { transform: scaleX(-1); }
.dp-hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-5);
}
.dp-hero-content > * { margin: 0; }
.dp-hero-icon {
  display: grid;
  place-items: center;
  inline-size: 56px;
  block-size: 56px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--cyan);
  color: var(--primary-ink);
  font-size: 1.5rem;
}
.dp-hero-sub { max-inline-size: 52ch; color: var(--text-muted); text-wrap: pretty; }
/* The one filled control: the category CTA. */
.dp-start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-block-size: 52px;
  padding-inline: var(--space-6);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 700;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease);
}
.dp-start-btn:hover { background: color-mix(in srgb, var(--accent) 86%, #fff); }
.dp-start-btn:active { transform: translateY(1px); }
.dp-hero-note { color: var(--text-faint); font-size: var(--step--1); }

/* How it works + the nine colours: side by side on laptops. */
@media (min-width: 1080px) {
  main > .container:has(> .dp-play) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--space-5);
    align-items: start;
  }
  main > .container:has(> .dp-play) > * { grid-column: 1 / -1; }
  main > .container:has(> .dp-play) > .dp-play + .section-box { grid-column: 1; }
  main > .container:has(> .dp-play) > .dp-play + .section-box + .section-box { grid-column: 2; }
}
.dp-steps { margin: 0; padding: 0; list-style: none; counter-reset: dp; }
.dp-steps li {
  position: relative;
  padding-block: var(--space-2);
  padding-inline-start: 2.5rem;
  color: var(--text-muted);
  counter-increment: dp;
}
.dp-steps li + li { border-block-start: 1px solid var(--border); }
.dp-steps li::before {
  content: counter(dp);
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: var(--space-2);
  display: grid;
  place-items: center;
  inline-size: 1.75rem;
  block-size: 1.75rem;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-1));
  color: var(--accent);
  font-family: var(--font-display);
  font-size: var(--step-0);
  line-height: 1;
  padding-block-start: 0.12em;
  font-variant-numeric: tabular-nums;
}
.dp-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--space-2); }
.dp-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-raised);
  color: var(--text-muted);
  font-size: var(--step--1);
  font-weight: 600;
}
.dp-chip { display: block; inline-size: 100%; block-size: 40px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }

/* Full-screen colour stage (in the extra section, above the shell). */
#dp-stage { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: #fff; cursor: pointer; }
#dp-stage.hidden { display: none; }
#dp-ui { position: absolute; inset: 0; pointer-events: none; color: #fff; opacity: 1; transition: opacity var(--dur-med) var(--ease); }
#dp-ui.dp-ui-hidden { opacity: 0; }
#dp-ui.dp-on-light { color: #111; }
/* Controls float on any test colour: a neutral grey plate, no blur. */
#dp-ui :is(.dp-arrow, .dp-exit, .dp-label) {
  border: 1px solid rgb(128 128 128 / 0.55);
  background: rgb(128 128 128 / 0.3);
  color: inherit;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.22);
}
#dp-ui :is(.dp-arrow, .dp-exit) {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  pointer-events: auto;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease);
}
#dp-ui :is(.dp-arrow, .dp-exit):hover { background: rgb(128 128 128 / 0.45); }
#dp-ui .dp-arrow { inset-block-start: 50%; inline-size: 64px; block-size: 64px; font-size: 1.5rem; transform: translateY(-50%); }
#dp-ui .dp-left { left: 22px; }
#dp-ui .dp-right { right: 22px; }
#dp-ui .dp-exit { inset-block-start: 18px; right: 18px; inline-size: 48px; block-size: 48px; font-size: 1.25rem; }
#dp-ui .dp-label {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-pill);
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%);
}
#dp-ui .dp-name { font-family: var(--font-display); font-size: var(--step-2); line-height: 1; padding-block-start: 0.1em; text-transform: uppercase; }
#dp-ui .dp-count { opacity: 0.85; font-variant-numeric: tabular-nums; }
#dp-ui .dp-hint { opacity: 0.8; font-size: var(--step--1); font-weight: 500; }
@media (max-width: 560px) {
  #dp-ui .dp-hint { display: none; }
  #dp-ui .dp-arrow { inline-size: 52px; block-size: 52px; font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  #dp-ui, .dp-start-btn { transition: none; }
}
