/* ============================================================
   UTENSIL FEST — STYLESHEET
   Design system: black bg, white strokes, amber accent #D47C20
   Typography: Courier New (monospaced, technical feel)
   All color decisions are derived from CSS variables at the top.
   To change the accent color, update --accent only.
============================================================ */

/* ----------------------------------------------------------
   DESIGN TOKENS
---------------------------------------------------------- */
:root {
  --bg:           #000000;
  --surface:      #0a0a0a;
  --stroke:       #333333;
  --stroke-mid:   #555555;
  --text:         #ffffff;
  --text-muted:   #666666;
  --accent:       #D47C20;       /* amber — hover, active, labels */
  --accent-dim:   rgba(212,124,32,0.08);
  --font:         'Courier New', Courier, monospace;
  --font-heading: 'Syne Mono', monospace;
  --bar-height:   40px;
  --corner-size:  36px;
  --transition:   600ms ease;
  --fade-black:   300ms ease;
}

/* ----------------------------------------------------------
   RESET + BASE
---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  overflow: hidden;
  user-select: none;
  cursor: none;
}

/* Global cursor canvas — pointer-events none so it never blocks clicks */
#cursor-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}
#cursor-canvas.hidden {
  display: none;
}

button {
  font-family: var(--font);
  font-size: 12px;
  background: none;
  border: 0.5px solid var(--stroke-mid);
  color: var(--text-muted);
  cursor: crosshair;
  letter-spacing: 0.1em;
  padding: 5px 10px;
  transition: color 0.2s, border-color 0.2s;
}
button:hover { color: var(--accent); border-color: var(--accent); }

/* ----------------------------------------------------------
   SCREENS — stacked, only .active is visible
---------------------------------------------------------- */
.screen {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.screen.active {
  opacity: 1;
  pointer-events: all;
}

/* ----------------------------------------------------------
   TRANSITION OVERLAY — fades to black between screens
---------------------------------------------------------- */
#transition-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity var(--fade-black);
}
#transition-overlay.fading { opacity: 1; pointer-events: all; }

/* ----------------------------------------------------------
   TOP BAR — shared by map and stage screens
   Grid layout: equal-width side columns keep title truly centered
---------------------------------------------------------- */
.top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--bar-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  border-bottom: 0.5px solid var(--stroke);
  background: var(--bg);
  z-index: 10;
  letter-spacing: 0.12em;
}
.bar-item {
  font-size: 11px;
  color: var(--text-muted);
  width: fit-content;    /* only as wide as the text — hover doesn't fire on empty space */
}
.bar-item:last-child {
  justify-self: end;     /* right-aligned within its grid column */
}
.bar-title {
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
}
.bar-btn { cursor: crosshair; }
.bar-btn:hover { color: var(--accent); }
#stage-set-info {
  cursor: crosshair;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#stage-set-info:hover { color: var(--text); }
#stage-set-info.popup-open { color: var(--accent); }

#audio-bar {
  position: fixed;
  top: calc(var(--bar-height) + 12px);
  right: 20px;
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 0.5px solid var(--stroke);
  padding: 7px 14px;
  min-width: 220px;
  box-sizing: border-box;
  z-index: 110;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
#screen-stage.active #audio-bar { display: flex; }
#audio-bar-pos {
  color: var(--text);
  font-size: 10px;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.audio-bar-line {
  flex: 1;
  position: relative;
  height: 0.5px;
  background: var(--stroke);
}
.audio-bar-line::before,
.audio-bar-line::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0.5px;
  height: 6px;
  background: var(--stroke);
}
.audio-bar-line::before { left: 0; }
.audio-bar-line::after  { right: 0; }
.audio-mute-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0;
  cursor: crosshair;
  line-height: 1;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.audio-mute-btn:hover { color: var(--accent); }
.audio-mute-btn.muted { color: var(--stroke-mid); }

/* ----------------------------------------------------------
   SCREEN 1: LANDING
---------------------------------------------------------- */
#screen-landing { background: var(--bg); }

#landing-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#landing-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0;
  animation: landing-rise 1.8s ease forwards 0.4s;
  pointer-events: none;
}

#landing-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 6vw, 72px);
  font-weight: normal;
  letter-spacing: 0.3em;
  color: var(--text);
  line-height: 1;
}

#landing-subtitle {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 12px;
}

#landing-prompt {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  opacity: 0;
  animation: landing-prompt-rise 1.2s ease forwards 2.2s;
  animation-fill-mode: both;
}

@keyframes landing-rise {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes landing-prompt-rise {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ----------------------------------------------------------
   SCREEN 2: MAP
---------------------------------------------------------- */
#screen-map { background: var(--bg); }

#ripple-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: pixelated;
}

#map-container {
  position: absolute;
  inset: var(--bar-height) 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#festival-map {
  width: 100%;
  max-width: 680px;
  height: auto;
  cursor: crosshair;
}

/* Stage zones on the SVG map */
.map-zone {
  fill: transparent;
  stroke: var(--stroke-mid);
  stroke-width: 0.7px;
  cursor: crosshair;
  transition: stroke 0.2s, fill 0.2s;
}
.map-zone:hover, .map-zone.hovered {
  stroke: var(--accent);
  fill: var(--accent-dim);
}

/* Stage icon linework inside each zone */
.map-stage-icon {
  fill: none;
  stroke: var(--stroke-mid);
  stroke-width: 0.7px;
  pointer-events: none;
  transition: stroke 0.2s;
}
.map-zone-group:hover .map-stage-icon,
.map-zone-group.hovered .map-stage-icon {
  stroke: var(--accent);
}

/* Stage dot */
.map-dot {
  fill: var(--stroke-mid);
  pointer-events: none;
  transition: fill 0.2s;
}
.map-zone-group:hover .map-dot,
.map-zone-group.hovered .map-dot {
  fill: var(--accent);
}

/* Stage labels on SVG map */
.map-zone-label {
  font-family: var(--font);
  font-size: 10px;
  fill: var(--text-muted);
  letter-spacing: 0.1em;
  pointer-events: none;
  transition: fill 0.2s;
}
.map-zone-group:hover .map-zone-label,
.map-zone-group.hovered .map-zone-label {
  fill: var(--accent);
}

.map-label {
  font-family: var(--font-heading);
  font-size: 10px;
  fill: var(--text-muted);
  letter-spacing: 0.14em;
}
.map-label-sm { font-size: 9px; opacity: 0.5; }

/* ----------------------------------------------------------
   THUMBNAIL WEB — HTML layer over map
   Cards position absolutely over the map SVG
---------------------------------------------------------- */
#thumbnail-web-container {
  position: absolute;
  inset: var(--bar-height) 0 0 0;
  pointer-events: none;
}

.thumb-web {
  position: absolute;
  pointer-events: all;
}

.thumb-connector {
  position: absolute;
  background: var(--stroke);
  height: 0.5px;
  transform-origin: left center;
  pointer-events: none;
}

.thumb-card {
  position: absolute;
  width: 64px;
  height: 64px;
  border: 0.5px solid var(--stroke-mid);
  background: var(--surface);
  cursor: crosshair;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  transform: scale(0) translate(-50%, -50%);
}
.thumb-card.visible {
  transform: scale(1) translate(-50%, -50%);
  transition: border-color 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.thumb-card:hover {
  border-color: var(--accent);
  transform: scale(1.08) translate(-50%, -50%);
  z-index: 10;
}
.thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%) contrast(0.8);
}
/* Placeholder shown when no real image is loaded */
.thumb-card .thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  background: #111;
}

/* ----------------------------------------------------------
   SCREEN 3: STAGE VIEW
---------------------------------------------------------- */
#screen-stage { background: var(--bg); }


#stage-canvas-container {
  position: absolute;
  inset: var(--bar-height) 0 0 0;
  z-index: 1;
}

/* Placeholder — remove when Three.js canvas is initialised */
#stage-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg,   transparent, transparent 59px, var(--stroke) 59px, var(--stroke) 60px),
    repeating-linear-gradient(90deg,  transparent, transparent 59px, var(--stroke) 59px, var(--stroke) 60px);
  background-size: 60px 60px;
  opacity: 0.6;
}
#stage-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, transparent 30%, #000 100%);
  pointer-events: none;
}
#stage-placeholder-inner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
/* Expanding radar-ping loader — three staggered rings pulse outward */
.placeholder-loader {
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
}
.placeholder-loader span {
  position: absolute;
  top: 50%; left: 50%;
  width: 48px; height: 48px;
  margin: -24px 0 0 -24px;
  border: 1px solid var(--stroke-mid);
  border-radius: 50%;
  opacity: 0;
  animation: placeholder-ping 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
.placeholder-loader span:nth-child(2) { animation-delay: 0.8s; }
.placeholder-loader span:nth-child(3) { animation-delay: 1.6s; }
.placeholder-loader::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--accent);
  animation: placeholder-core 2.4s ease-in-out infinite;
}
@keyframes placeholder-ping {
  0%   { transform: scale(0.15); opacity: 0; }
  12%  { opacity: 0.9; }
  100% { transform: scale(1); opacity: 0; }
}
@keyframes placeholder-core {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}
.placeholder-loading-label {
  font-family: var(--font-heading);
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--stroke-mid);
}
.placeholder-loading-sub {
  font-family: var(--font-heading);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--stroke);
  margin-top: 2px;
}
#stage-placeholder-inner::before,
#stage-placeholder-inner::after { content: none; }

/* ----------------------------------------------------------
   CORNER CONTROLS — fixed, above process popup, hidden on landing/map
---------------------------------------------------------- */
#corner-controls {
  position: fixed;
  bottom: 4px;
  left: 4px;
  z-index: 110;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#corner-controls.visible {
  opacity: 1;
  pointer-events: all;
}

#corner-btn-main {
  width: var(--corner-size);
  height: var(--corner-size);
  border: 0.5px solid var(--stroke-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  padding: 0;
  transition: color 0.2s, border-color 0.2s;
}
#corner-btn-main:hover { color: var(--accent); border-color: var(--accent); }

/* ----------------------------------------------------------
   TRACK INFO POPUP — appears below top-right bar item on click
---------------------------------------------------------- */
/* Stage details popup — same aesthetic as map info popup */
#stage-details-popup {
  position: fixed;
  top: calc(var(--bar-height) + 48px);
  right: 20px;
  background: var(--surface);
  border: 0.5px solid var(--stroke);
  padding: 14px 18px;
  min-width: 260px;
  max-width: 320px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(-4px);
}
#stage-details-popup.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
#stage-details-label {
  font-family: var(--font-heading);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--stroke-mid);
  margin-bottom: 10px;
  border-bottom: 0.5px solid var(--stroke);
  padding-bottom: 8px;
}
#stage-details-body {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  line-height: 1.8;
  margin-bottom: 12px;
}
#map-info-process-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 0;
  background: transparent;
  border: 0.5px solid var(--stroke);
  border-top: 0.5px solid var(--stroke);
  font-family: var(--font-heading);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--stroke-mid);
  cursor: crosshair;
  transition: color 0.2s, border-color 0.2s;
}
#map-info-process-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ----------------------------------------------------------
   MAP INFO POPUP — corner panel, same pattern as track popup
---------------------------------------------------------- */
#map-info-popup {
  position: fixed;
  top: calc(var(--bar-height) + 6px);
  right: 20px;
  background: var(--surface);
  border: 0.5px solid var(--stroke);
  padding: 14px 18px;
  min-width: 260px;
  max-width: 320px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(-4px);
}
#map-info-popup.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
#map-info-popup-label {
  font-family: var(--font-heading);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--stroke-mid);
  margin-bottom: 10px;
  border-bottom: 0.5px solid var(--stroke);
  padding-bottom: 8px;
}
#map-info-popup-body {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  line-height: 1.8;
  margin-bottom: 10px;
}
#map-info-popup-hint {
  font-size: 9px;
  color: var(--stroke-mid);
  letter-spacing: 0.1em;
  line-height: 1.7;
  border-top: 0.5px solid var(--stroke);
  padding-top: 8px;
}

/* ----------------------------------------------------------
   SPACEBAR FLASH — quick light effect overlay
---------------------------------------------------------- */
#spacebar-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.05s ease;
}
#spacebar-flash.active { opacity: 0.12; }
#spacebar-flash.amberfade { transition: opacity 0.18s ease-in; }
#spacebar-flash.amberfade-out { transition: opacity 0.55s ease-out; }

/* Outdoor stages need transparent background so sky canvas shows through */
#screen-stage.outdoor { background: transparent; }

/* Ripple decay slider — pure SVG, hover via JS class */
#ripple-slider-group.hovered line { stroke: var(--accent); }

/* Time-of-day control — outdoor stages only */
#tod-control { display: none; }

/* TIME TRAVEL section inside details popup */
#tod-time-travel {
  display: none;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 0.5px solid var(--stroke);
}
#stage-details-popup.outdoor #tod-time-travel { display: block; }
#tod-tt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
#tod-tt-label {
  font-family: var(--font-heading);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--stroke-mid);
}
#tod-live-btn {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  border: 0.5px solid rgba(255,255,255,0.25);
  background: transparent;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
#tod-live-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}
#tod-slider { display: none; }
#tod-slider-svg { display: block; margin-top: 2px; }


/* ----------------------------------------------------------
   OVERLAYS — shared by process popup and info
---------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}
.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-inner {
  background: var(--surface);
  border: 0.5px solid var(--stroke);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  position: relative;
}
.overlay-inner h2 {
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0.2em;
  margin-bottom: 16px;
}
.overlay-inner p { font-size: 12px; color: var(--text-muted); line-height: 1.8; margin-bottom: 10px; }
.overlay-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 24px; height: 24px;
  padding: 0;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

.muted { color: var(--text-muted); }

/* ----------------------------------------------------------
   PROCESS POPUP
---------------------------------------------------------- */
#process-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
}

#process-container {
  position: relative;
  width: 100%;
  height: 100%;
}

#process-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--bar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 0.5px solid var(--stroke);
  background: rgba(0,0,0,0.8);
  z-index: 5;
  letter-spacing: 0.15em;
  font-size: 11px;
  color: var(--text-muted);
}

#process-board {
  position: absolute;
  inset: var(--bar-height) 0 0 0;
  overflow: hidden;
}

/* Fullscreen expand backdrop */
.card-expand-backdrop {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 40;
  display: none;
  cursor: default;
}
.card-expand-backdrop.visible { opacity: 0.92; }

/* Process grid cards */
.process-card {
  position: absolute;
  left: 0; top: 0;
  overflow: hidden;
  background: #0d0d0d;
  border: 0.5px solid var(--stroke);
  cursor: grab;
  user-select: none;
  will-change: transform;
}
.process-card:hover {
  border-color: var(--stroke-mid);
  z-index: 5;
}
.process-card.dragging {
  cursor: grabbing;
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(0,0,0,0.85);
  transition: none !important;
}
.process-card.expanded {
  border-color: var(--accent);
}

/* Image fills the square */
.process-img-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.process-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(55%);
  display: block;
  transition: filter 0.3s, transform 0.4s ease;
  pointer-events: none;
}
.process-card:hover .process-img-wrap img {
  filter: grayscale(20%);
  transform: scale(1.04);
}
.process-card.expanded .process-img-wrap img {
  filter: grayscale(5%);
  transform: scale(1.04);
}

/* Placeholder */
.process-img-placeholder {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--stroke-mid);
}

/* Caption — gradient overlay, revealed on click */
.process-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.92) 38%);
  padding: 32px 12px 12px;
  font-size: 10px;
  line-height: 1.7;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.process-card:hover .process-caption,
.process-card.expanded .process-caption {
  opacity: 1;
  transform: translateY(0);
}

.process-card-label { display: none; }

/* ----------------------------------------------------------
   INTRO POPUP — how-to overlay shown over the map on first open
---------------------------------------------------------- */
#intro-popup {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);            /* solid black — fully covers the map behind it */
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#intro-popup.intro-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#intro-panel {
  position: relative;
  width: min(92vw, 460px);
  max-height: 88vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 40px 44px 34px;
  background: var(--surface);
  border: 0.5px solid var(--stroke);
  text-align: center;                /* everything centered */
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.5s ease;
}
#intro-popup.intro-hidden #intro-panel {
  transform: scale(0.96) translateY(10px);
  opacity: 0;
}
#intro-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--stroke-mid);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}
#intro-close:hover { color: var(--accent); }
/* Header + subtitle — colours kept, subtitle smaller (matches info/details labels) */
#intro-title {
  font-family: var(--font-heading);
  font-size: 26px;
  letter-spacing: 0.28em;
  color: var(--text);
}
#intro-subtitle {
  font-family: var(--font-heading);
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--accent);
  margin-top: 10px;
  padding-bottom: 22px;
  border-bottom: 0.5px solid var(--stroke);
}
/* Controls — centered stack; key slightly larger than its description */
#intro-controls {
  margin: 24px 0 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.intro-key {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}
.intro-desc {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--stroke-mid);
  margin-top: 4px;
}
#intro-outro {
  font-size: 9px;
  letter-spacing: 0.1em;
  line-height: 1.7;
  color: var(--stroke-mid);
  padding: 18px 6px 26px;
  border-top: 0.5px solid var(--stroke);
}
#intro-enter {
  display: block;
  width: 100%;
  padding: 13px 0;
  background: transparent;
  border: 0.5px solid var(--stroke);
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--stroke-mid);          /* lighter/softer than white */
  cursor: crosshair;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
#intro-enter:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}


/* ----------------------------------------------------------
   MOBILE — touch-device layout (html.mobile, set in <head>)
---------------------------------------------------------- */
/* Audio bar (position + mute) centered along the top */
html.mobile #audio-bar {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}
/* Exit/back button centered along the bottom */
html.mobile #corner-controls {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  align-items: center;
  bottom: 6px;
}
/* Bigger, finger-friendly tap targets */
html.mobile #corner-btn-main { width: 46px; height: 46px; font-size: 18px; }
html.mobile #btn-audio-mute  { padding: 6px; }
html.mobile .bar-btn         { padding: 4px 2px; }
/* No desktop crosshair cursor / custom cursor canvas on touch */
html.mobile #cursor-canvas { display: none; }
html.mobile * { cursor: default; }

@media (max-width: 640px) {
  #intro-panel { padding: 34px 22px 26px; width: min(92vw, 440px); }
  #intro-title { font-size: 21px; letter-spacing: 0.2em; }
  #audio-bar   { min-width: 0; }
  .bar-title   { font-size: 11px; letter-spacing: 0.14em; }
}
