/* ==========================================================================
 * NEON NULL v1.23.0 — Console dashboard shell (worker C)
 * Fullscreen console-style dashboard. Hardware feel: weighty, deliberate,
 * generous spacing. Press feedback is transform/opacity only — never layout
 * shift. z-index 9000: below the power/reset buttons (9500, worker A).
 * ========================================================================== */

#nn-dashboard {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vh, 42px);
  padding: clamp(20px, 5vw, 48px);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(34, 211, 238, 0.10) 0%, rgba(0, 0, 0, 0) 55%),
    radial-gradient(100% 100% at 50% 110%, rgba(217, 70, 239, 0.08) 0%, rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, #060a12 0%, #030509 100%);
  color: #e8f6ff;
  font-family: 'Montserrat', system-ui, sans-serif;
  overflow: hidden;
  box-sizing: border-box;
}

#nn-dashboard[hidden] { display: none !important; }

/* Subtle scanline texture — decorative only, no content impact. */
#nn-dashboard::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.022) 0px,
    rgba(255, 255, 255, 0.022) 1px,
    transparent 1px,
    transparent 4px
  );
}

/* ------------------------------------------------------------------ header */
.nn-dash-header {
  position: relative;
  z-index: 1;
  text-align: center;
  margin: 0;
}

.nn-dash-title {
  font-family: 'Orbitron', 'Montserrat', sans-serif;
  font-size: clamp(22px, 5.5vw, 44px);
  font-weight: 800;
  letter-spacing: 0.35em;
  text-indent: 0.35em; /* recenter the tracked text */
  margin: 0;
  color: #eafcff;
  text-shadow:
    0 0 18px rgba(34, 211, 238, 0.65),
    0 0 60px rgba(34, 211, 238, 0.25);
  white-space: nowrap;
}

/* v1.23.1: on phones the wide tracking overflowed the viewport and clipped
   the title ("NEON NULL SYSTM"). Tighter tracking + smaller size keeps the
   full "NEON NULL SYSTEM" visible at 390px. */
@media (max-width: 480px) {
  .nn-dash-title {
    font-size: clamp(17px, 4.6vw, 22px);
    letter-spacing: 0.2em;
    text-indent: 0.2em;
  }
}

/* ------------------------------------------------------------------ icon grid */
.nn-dash-grid {
  position: relative;
  z-index: 1;
  display: grid;
  /* Portrait phones (390px): 2 columns. Landscape / larger: 3 then 5. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 4vw, 30px);
  width: 100%;
  max-width: 620px;
  justify-items: stretch;
}

@media (min-width: 560px) {
  .nn-dash-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px), (orientation: landscape) and (min-height: 340px) {
  .nn-dash-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 980px; }
}

.nn-dash-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 168px;
  padding: 26px 14px 22px;
  border-radius: 20px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: linear-gradient(180deg, rgba(17, 28, 44, 0.85) 0%, rgba(8, 14, 24, 0.92) 100%);
  color: #e8f6ff;
  cursor: pointer;
  /* Press feedback: transform + shadow only — never moves siblings. */
  transition: transform 130ms ease-out, box-shadow 130ms ease-out,
              border-color 130ms ease-out, background 200ms ease-out;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-tap-highlight-color: transparent;
}

.nn-dash-icon:hover {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55),
              0 0 26px rgba(34, 211, 238, 0.28),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nn-dash-icon:active,
.nn-dash-icon.nn-pressed {
  transform: scale(0.93);
  opacity: 0.88;
  transition-duration: 60ms;
}

.nn-dash-icon:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 4px;
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.45);
}

/* The game disc gets the hero treatment. */
.nn-dash-icon.nn-ico-disc {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55),
              0 0 34px rgba(34, 211, 238, 0.30),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nn-dash-glyph {
  display: block;
  width: clamp(52px, 12vw, 76px);
  height: clamp(52px, 12vw, 76px);
  flex: none;
}

.nn-dash-glyph svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.55));
}

/* Neon stroke palette — no emojis, CSS/SVG only. */
.nn-dash-glyph .nn-svg-ring { fill: none; stroke: #22d3ee; stroke-width: 3; }
.nn-dash-glyph .nn-svg-thin { fill: none; stroke: #67e8f9; stroke-width: 2; opacity: 0.85; }
.nn-dash-glyph .nn-svg-core { fill: #22d3ee; stroke: none; }
.nn-dash-glyph .nn-svg-cap  { stroke-linecap: round; }

.nn-dash-label {
  font-family: 'Orbitron', 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  white-space: nowrap;
  color: #cdeeff;
  opacity: 0.92;
}

/* ------------------------------------------------------------------ hint */
.nn-dash-hint {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-align: center;
  color: rgba(205, 238, 255, 0.72);
  min-height: 1.4em; /* reserve the line so hiding never shifts the grid */
}

.nn-dash-hint[hidden] { display: block !important; visibility: hidden; }

/* ------------------------------------------------------------------ panel */
.nn-dash-panel {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #05090f 0%, #030509 100%);
  padding: clamp(18px, 4vw, 40px);
  box-sizing: border-box;
  /* Slide + fade: transform/opacity only, no layout reflow. */
  transition: transform 240ms ease-out, opacity 240ms ease-out;
}

.nn-dash-panel[hidden] {
  display: flex !important; /* keep transform cheap while "closed" */
  visibility: hidden;
  opacity: 0;
  transform: translateX(6%);
  pointer-events: none;
}

.nn-dash-panel-head {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: none;
  margin-bottom: 22px;
}

.nn-dash-back {
  flex: none;
  font-family: 'Orbitron', 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.08);
  color: #cdeeff;
  cursor: pointer;
  transition: transform 120ms ease-out, background 150ms ease-out;
}

.nn-dash-back:active { transform: scale(0.94); }
.nn-dash-back:hover  { background: rgba(34, 211, 238, 0.18); }

.nn-dash-back:focus-visible,
.nn-dash-icon:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 3px;
}

.nn-dash-panel-title {
  font-family: 'Orbitron', 'Montserrat', sans-serif;
  font-size: clamp(16px, 3.4vw, 24px);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  margin: 0;
  color: #eafcff;
  text-shadow: 0 0 16px rgba(34, 211, 238, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nn-dash-panel-body {
  flex: 1;
  min-height: 0;
  /* v1.24.11: no-scroll rule — panels must fit, never scroll */
  overflow-y: hidden;
  overflow-x: hidden;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 16px;
  padding: clamp(16px, 3.5vw, 30px);
  background: rgba(10, 18, 30, 0.55);
  box-sizing: border-box;
}

.nn-dash-fallback {
  text-align: center;
  color: rgba(205, 238, 255, 0.7);
  font-size: 15px;
  letter-spacing: 0.08em;
  margin: 48px 0;
}

/* ------------------------------------------------------------------ safe areas */
@supports (padding: max(0px)) {
  #nn-dashboard {
    padding-left: max(clamp(20px, 5vw, 48px), env(safe-area-inset-left));
    padding-right: max(clamp(20px, 5vw, 48px), env(safe-area-inset-right));
  }
}

/* ------------------------------------------------------------------ *
 * MATERIAL NEON (v1.24.176) — the Interface Style layer for the
 * console dashboard. 175 put no Material rules on this surface at
 * all; the tiles are the menu content of the power-on screen and
 * take the Design A card treatment: the 16px card step, a flat
 * tonal fill, and the M3 shadow pair in place of the deep black
 * cast and the hover glow. The dashboard's system buttons (power,
 * reset, music, background picker) are console frame and are NOT
 * touched — console-fx.js states the contract: nn-sysbtn chrome
 * never wears game art. No transitions are introduced; the tiles'
 * own press feedback is untouched.
 * ------------------------------------------------------------------ */
body.iface-material .nn-dash-icon {
  border-radius: 16px;
  background: color-mix(in srgb, #22d3ee 7%, #0A0A10);
  border-color: rgba(34,211,238,.30);
  box-shadow: 0 1px 2px rgba(0,0,0,.30), 0 2px 6px 2px rgba(0,0,0,.15);
}
body.iface-material .nn-dash-icon:hover {
  box-shadow: 0 1px 2px rgba(0,0,0,.30), 0 2px 6px 2px rgba(0,0,0,.15);
}
