/* ==========================================================================
   Mall Security — Shared Stylesheet
   CRT/VHS aesthetic: scanlines, noise overlays, chromatic aberration via SVG filter
   ========================================================================== */

/* --------------------------------------------------------------------------
   @font-face — Fragment Mono (self-hosted, SIL OFL)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Fragment Mono';
  src: url('../Type/Fragment_Mono/FragmentMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fragment Mono';
  src: url('../Type/Fragment_Mono/FragmentMono-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Accent — swap this one value to switch between amber and cyan */
  --accent: #FFAD3B;          /* amber (current) — cyan alt: #00C8FF */
  --accent-dim: color-mix(in srgb, var(--accent) 40%, transparent);
  --accent-tint: color-mix(in srgb, var(--accent) 7%, transparent);

  /* Base palette */
  --bg:       #050505;
  --surface:  #0c0c0c;
  --text:     #e8e8e8;
  --text-dim: #888;
  --border:   #222;

  /* Bezel */
  --bezel-bg:     #111;
  --bezel-radius: 10px;
  --bezel-inset:  4px;

  /* Effect defaults — overridden at runtime by debug panel / CSS custom props */
  --ca-offset:      0px;      /* chromatic aberration pixel shift — dropped for now */
  --scanline-alpha: 0.18;     /* scanline overlay opacity */
  --vignette-str:   0;        /* vignette radial gradient stop opacity — dropped for now */
  --flicker-amp:    0.04;     /* ± fraction of brightness for flicker */
  --pixel-scale:    2px;      /* pixelation grid size */

  /* Typography */
  --font-mono: 'Fragment Mono', ui-monospace, 'Courier New', monospace;
  --fs-xs:  0.65rem;
  --fs-sm:  0.8rem;
  --fs-md:  1rem;
  --fs-lg:  1.35rem;
  --fs-xl:  2rem;
  --fs-2xl: 3.5rem;
  --lh: 1.6;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: #000;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: var(--lh);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

/* --------------------------------------------------------------------------
   Focus styles — bold enough to read through CRT filter
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   CRT wrapper + overlay layers
   ========================================================================

   DOM structure per page:
   
   <div id="bezel">                     ← outer housing (rounded corners, shadow)
     <div id="vignette"></div>          ← OUTSIDE screen (glass, static)
     <div id="glare"></div>             ← OUTSIDE screen (glass reflection)
     <div id="screen">                  ← gets SVG filter applied
       <div class="scanlines"></div>    ← INSIDE filter (phosphor)
       <div class="noise-layer"></div>  ← INSIDE filter (animated grain)
       <!-- page content here -->
     </div>
   </div>

   -------------------------------------------------------------------------- */

/* Bezel */
#bezel {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  background: var(--bezel-bg);
  border-radius: var(--bezel-radius);
  box-shadow:
    inset 0 0 0 var(--bezel-inset) #1a1a1a,
    inset 0 0 30px #000,
    0 0 60px rgba(0,0,0,0.8);
  overflow: hidden;
}

/* Screen — CRT filter target */
#screen {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  /* filter applied by JS once displacement map is generated */
  overflow: hidden;
}

/* Flicker animation on the screen */
@keyframes crt-flicker {
  0%   { filter: url(#crt-filter) brightness(1); }
  2%   { filter: url(#crt-filter) brightness(calc(1 - var(--flicker-amp))); }
  4%   { filter: url(#crt-filter) brightness(1); }
  47%  { filter: url(#crt-filter) brightness(1); }
  48%  { filter: url(#crt-filter) brightness(calc(1 + var(--flicker-amp) * 0.5)); }
  50%  { filter: url(#crt-filter) brightness(calc(1 - var(--flicker-amp))); }
  52%  { filter: url(#crt-filter) brightness(1); }
  100% { filter: url(#crt-filter) brightness(1); }
}

#screen.flicker-on {
  animation: crt-flicker 7s ease-in-out infinite;
}

/* Disable all animations for prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  #screen.flicker-on { animation: none !important; }
  .noise-layer { animation: none !important; }
  .scroll-cue { animation: none !important; }
  .menu-cursor { animation: none !important; }
}

/* Scanlines — inside #screen so they're affected by the filter */
.scanlines {
  position: absolute;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0, var(--scanline-alpha)) 2px,
    rgba(0,0,0, var(--scanline-alpha)) 4px
  );
}

/* Animated noise / static grain — inside #screen */
.noise-layer {
  position: absolute;
  inset: 0;
  z-index: 101;
  pointer-events: none;
  opacity: 0.07;
  overflow: hidden;
}
.noise-layer svg {
  width: 100%;
  height: 100%;
}

/* Noise animation */
@keyframes noise-shift {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-2%, -3%); }
  20%  { transform: translate(3%, 1%); }
  30%  { transform: translate(-1%, 4%); }
  40%  { transform: translate(2%, -2%); }
  50%  { transform: translate(-3%, 0); }
  60%  { transform: translate(1%, 3%); }
  70%  { transform: translate(0, -4%); }
  80%  { transform: translate(-2%, 2%); }
  90%  { transform: translate(3%, -1%); }
  100% { transform: translate(0, 0); }
}

.noise-layer svg {
  animation: noise-shift 0.15s steps(1) infinite;
}

/* Vignette — OUTSIDE #screen (on the glass) */
#vignette {
  position: absolute;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 50%,
    transparent 40%,
    rgba(0,0,0, var(--vignette-str)) 100%
  );
}

/* Glass glare — OUTSIDE #screen */
#glare {
  position: absolute;
  inset: 0;
  z-index: 201;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.02) 0%,
    transparent 50%
  );
}

/* --------------------------------------------------------------------------
   Site header (inner pages)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  background: rgba(5,5,5,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(4px);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
}

.site-header .logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-header .logo-link img,
.site-header .logo-link svg {
  height: 28px;
  width: auto;
  filter: invert(1);   /* SVG is dark on white; invert for dark bg */
}

/* Inner-page nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.header-nav a,
.header-nav details > summary {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-dim);
  padding: 0.55rem 0.75rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
  border: none;
  background: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 2px;
  transition: color 0.15s, background 0.15s;
}

.header-nav a:hover,
.header-nav details[open] > summary,
.header-nav details > summary:hover {
  color: var(--accent);
  background: var(--accent-tint);
  text-decoration: none;
}

/* Music sub-nav dropdown */
.header-nav details {
  position: relative;
}

.header-nav details > .sub-nav {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 180px;
  z-index: 400;
  padding: 0.25rem 0;
}

.header-nav details > .sub-nav a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.header-nav details > .sub-nav a:hover {
  color: var(--accent);
  background: var(--accent-tint);
  text-decoration: none;
}

/* Social icons row */
.social-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.social-icons a {
  color: var(--text-dim);
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  transition: color 0.15s;
}

.social-icons a:hover {
  color: var(--accent);
  text-decoration: none;
}

.social-icons svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* --------------------------------------------------------------------------
   Main page content wrapper (inner pages)
   -------------------------------------------------------------------------- */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

.page-title {
  font-size: var(--fs-xl);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.page-subtitle {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Accordion (details/summary) — shared
   -------------------------------------------------------------------------- */
.accordion-group details {
  border-bottom: 1px solid var(--border);
}

.accordion-group details:first-child {
  border-top: 1px solid var(--border);
}

.accordion-group summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0.5rem;
  min-height: 56px;
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  transition: color 0.15s;
  user-select: none;
}

.accordion-group summary::-webkit-details-marker { display: none; }

.accordion-group summary::before {
  content: '▶';
  font-size: 0.6em;
  color: var(--text-dim);
  transition: transform 0.2s, color 0.15s;
  flex-shrink: 0;
}

.accordion-group details[open] > summary::before {
  transform: rotate(90deg);
  color: var(--accent);
}

.accordion-group summary:hover {
  color: var(--accent);
}

.accordion-content {
  padding: 0.5rem 1.5rem 1.5rem;
  color: var(--text-dim);
  font-size: var(--fs-sm);
  line-height: 1.8;
}

.accordion-content a {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Mailing list form (persistent, every page)
   -------------------------------------------------------------------------- */
.mailing-list-section {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  background: var(--surface);
}

.mailing-list-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.mailing-list-label {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* TODO: wire up once a mailing list service is chosen.
   Replace the form's action attribute with the service endpoint
   (e.g. Mailchimp embed URL, Formspree endpoint, etc.)
   and add any required hidden fields the service needs. */
.mailing-list-form {
  display: flex;
  flex: 1;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.mailing-list-form input[type="email"] {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 0.85rem;
  flex: 1;
  min-width: 200px;
  min-height: 44px;
  outline: none;
  transition: border-color 0.15s;
}

.mailing-list-form input[type="email"]:focus {
  border-color: var(--accent);
}

.mailing-list-form input[type="email"]::placeholder {
  color: var(--text-dim);
}

.mailing-list-form button[type="submit"] {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.65rem 1.25rem;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.mailing-list-form button[type="submit"]:hover {
  background: var(--accent);
  color: #000;
}

.mailing-list-form button[type="submit"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Site footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --------------------------------------------------------------------------
   Inner page layout skeleton (wraps header + content + footer)
   -------------------------------------------------------------------------- */
.inner-page-layout {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.inner-page-layout .page-content {
  flex: 1;
}

/* --------------------------------------------------------------------------
   Shows page
   -------------------------------------------------------------------------- */
.show-date {
  font-size: var(--fs-md);
  font-weight: 400;
}

.show-label {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.show-detail-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.25rem 1rem;
  margin-bottom: 0.5rem;
}

.show-detail-row dt {
  color: var(--text-dim);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-top: 0.1em;
}

.show-detail-row dd {
  color: var(--text);
  font-size: var(--fs-sm);
}

.show-ticket-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.5rem 1rem;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-height: 44px;
  transition: background 0.15s, color 0.15s;
}

.show-ticket-link:hover {
  background: var(--accent);
  color: #000;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Merch grid
   -------------------------------------------------------------------------- */
.merch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.merch-item {
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.merch-item-img {
  aspect-ratio: 1;
  background: var(--border);
  overflow: hidden;
}

.merch-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.merch-item-info {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.merch-item-name {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}

.merch-item-price {
  font-size: var(--fs-xs);
  color: var(--accent);
  letter-spacing: 0.06em;
}

.merch-item-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.5rem;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-height: 44px;
  transition: border-color 0.15s, color 0.15s;
}

.merch-item-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Placeholder state */
.merch-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background: repeating-linear-gradient(
    45deg,
    var(--bg),
    var(--bg) 10px,
    var(--surface) 10px,
    var(--surface) 20px
  );
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   Journal
   -------------------------------------------------------------------------- */
.journal-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.journal-entry {
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}

.journal-entry:first-child {
  border-top: 1px solid var(--border);
}

.journal-entry-meta {
  font-size: var(--fs-xs);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.journal-entry-title {
  font-size: var(--fs-lg);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.journal-entry-body {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 65ch;
}

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */
.contact-email {
  font-size: var(--fs-md);
  color: var(--accent);
  margin-top: 0.25rem;
}

.contact-note {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: 0.5rem;
  line-height: 1.7;
}

/* Contact lines — address stays visible in the collapsed row so it can be
   scanned, found with Cmd+F, and long-pressed to copy on mobile. Only the
   supplementary detail hides behind the accordion. */
.contact-lines summary {
  flex-wrap: wrap;
  row-gap: 0.35rem;
}

.contact-row-label {
  flex-shrink: 0;
}

.contact-row-addr {
  margin-left: auto;
  font-size: var(--fs-sm);
  color: var(--accent);
  letter-spacing: 0.03em;
  text-transform: none;
  white-space: nowrap;
  user-select: text;
}

.contact-mailto {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.5rem 1rem;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-height: 44px;
  transition: background 0.15s, color 0.15s;
}

.contact-mailto:hover {
  background: var(--accent);
  color: #000;
  text-decoration: none;
}

@media (max-width: 640px) {
  /* Stack the address under the label rather than letting it overflow */
  .contact-row-addr {
    margin-left: 0;
    flex-basis: 100%;
    padding-left: 1.5rem;
    white-space: normal;
    word-break: break-all;
  }
}

/* --------------------------------------------------------------------------
   EPK page
   -------------------------------------------------------------------------- */
.epk-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.epk-section:last-child {
  border-bottom: none;
}

.epk-section-title {
  font-size: var(--fs-md);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.epk-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.epk-photo-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: grayscale(30%);
}

.epk-download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.65rem 1.25rem;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-height: 44px;
  margin-top: 0.75rem;
  transition: background 0.15s, color 0.15s;
}

.epk-download-link:hover {
  background: var(--accent);
  color: #000;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   404 page
   -------------------------------------------------------------------------- */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  text-align: center;
  padding: 2rem;
  gap: 1.5rem;
}

.not-found-code {
  font-size: clamp(4rem, 15vw, 10rem);
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  opacity: 0.4;
}

.not-found-title {
  font-size: var(--fs-xl);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.not-found-subtitle {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  max-width: 40ch;
}

.not-found-link {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.75rem 1.5rem;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background 0.15s, color 0.15s;
}

.not-found-link:hover {
  background: var(--accent);
  color: #000;
  text-decoration: none;
}

/* Static glitch bar — 404 decoration */
@keyframes glitch-bar {
  0%   { transform: translateY(0)  scaleX(1); opacity: 0.6; }
  20%  { transform: translateY(-2px) scaleX(1.01); opacity: 0.4; }
  40%  { transform: translateY(3px) scaleX(0.99); opacity: 0.7; }
  60%  { transform: translateY(0); opacity: 0.5; }
  80%  { transform: translateY(-1px); opacity: 0.6; }
  100% { transform: translateY(0); opacity: 0.6; }
}

.glitch-bar {
  width: 100%;
  max-width: 400px;
  height: 4px;
  background: var(--accent);
  opacity: 0.6;
  animation: glitch-bar 1.5s steps(3) infinite;
}

/* --------------------------------------------------------------------------
   Debug / effect-tuning panel
   ============================================================================
   DEV ONLY — shown only when URL includes ?debug=1
   To hide before going public: remove the JS block in crt.js that
   appends this panel, or set the URL param guard to never match.
   ========================================================================== */
#debug-panel {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9999;
  background: rgba(0,0,0,0.9);
  border: 1px solid var(--accent);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text);
  min-width: 260px;
  display: none; /* shown by JS when ?debug=1 */
  flex-direction: column;
  gap: 0.6rem;
}

#debug-panel.visible { display: flex; }

#debug-panel h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.debug-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
}

.debug-row label {
  color: var(--text-dim);
  flex-shrink: 0;
  min-width: 110px;
}

.debug-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
}

.debug-row input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
  width: 14px;
  height: 14px;
}

.debug-row .debug-val {
  color: var(--accent);
  min-width: 36px;
  text-align: right;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .site-header {
    padding: 0 1rem;
    flex-wrap: wrap;
    min-height: auto;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .header-nav {
    gap: 0;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .page-content {
    padding: 2rem 1rem 5rem;
  }

  .page-title {
    font-size: var(--fs-lg);
  }

  .merch-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

  /* Reduce CRT effects on narrow screens for performance/readability */
  :root {
    --ca-offset: 0.75px;
    --scanline-alpha: 0.12;
    --pixel-scale: 1px;
  }
}

/* Header sub-nav: "coming soon" platform (non-interactive span) */
.header-nav details > .sub-nav .is-soon {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  min-height: 44px;
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.32);
  cursor: default;
  text-transform: uppercase;
}

.header-nav details > .sub-nav .is-soon .soon-tag {
  font-size: 0.72em;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.28);
  white-space: nowrap;
}
