/* =========================================================
   ORELSAN — mixtape / Caen street / Civilisation mix
   ========================================================= */

:root {
  --bg:           #14110f;
  --bg-2:         #1a1816;
  --bg-deep:      #0a0908;
  --paper:        #ede5d2;
  --paper-muted:  #b8ad94;
  --cream:        #f2ead4;
  --sodium:       #f4c14c;   /* street lamp yellow */
  --sodium-bright:#ffd866;
  --sodium-glow:  rgba(244, 193, 76, 0.40);
  --brick:        #c3543a;
  --brick-deep:   #8a3a26;
  --tag:          #ff5b8e;   /* spray vandal pink */
  --ink:          #1c1a18;
  --muted:        #7a7368;
  --line:         rgba(244, 193, 76, 0.18);
  --line-2:       rgba(244, 193, 76, 0.40);

  --display:  "Bungee Inline", "Anton", sans-serif;
  --block:    "Anton", "Bungee Inline", sans-serif;
  --graff:    "Permanent Marker", cursive;
  --type:     "Special Elite", "Courier New", monospace;
  --mono:     "Space Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg-deep); }

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 55% 45% at 30% 75%, rgba(244, 193, 76, 0.10), transparent 60%),
    radial-gradient(ellipse 40% 35% at 80% 15%, rgba(195, 84, 58, 0.07), transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(255, 91, 142, 0.025), transparent 70%),
    linear-gradient(180deg, #14110f 0%, #0a0908 100%);
  background-attachment: fixed;
  color: var(--cream);
  font-family: var(--type);
  overflow-x: hidden;
  cursor: default;
}

::-webkit-scrollbar { width: 0; height: 0; }
body { scrollbar-width: none; }

#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

/* ---------------- overlays ---------------- */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 70%, rgba(244, 193, 76, 0.10), transparent 45%);
  mix-blend-mode: screen;
}

/* manga screentone halftone dots */
.halftone {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background-image: radial-gradient(circle, rgba(244, 193, 76, 0.06) 1px, transparent 1.2px);
  background-size: 5px 5px;
  mix-blend-mode: overlay;
  opacity: 0.7;
}

/* film grain */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  opacity: 0.10;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.75'/></svg>");
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.85) 100%);
}

/* ---------------- decorative stickers/tags ---------------- */
.sticker {
  position: fixed;
  z-index: 8;
  pointer-events: none;
  font-family: var(--block);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--ink);
  background: var(--paper);
  padding: 6px 10px;
  border: 1px solid var(--ink);
  text-transform: uppercase;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}
.s-1 { top: 90px;  right: 30px;  transform: rotate(8deg);  background: var(--sodium); }
.s-2 { bottom: 100px; left: 30px;  transform: rotate(-6deg); background: var(--brick); color: var(--paper); }

.tag-mark {
  position: fixed;
  z-index: 8;
  pointer-events: none;
  font-family: var(--graff);
  color: var(--tag);
  opacity: 0.55;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.6);
  text-transform: uppercase;
}
.t-1 { top: 18%; right: 4%; font-size: 28px; transform: rotate(-12deg); }
.t-2 { bottom: 22%; left: 3%; font-size: 32px; transform: rotate(7deg); color: var(--sodium); }

/* ---------------- HUD ---------------- */
.hud {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }

/* top bar */
.hud-top {
  position: fixed;
  top: 28px;
  left: 60px;
  right: 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hud-top-left, .hud-top-right { display: flex; align-items: center; gap: 10px; }
.hud-top-right { justify-content: flex-end; }
.hud-top-center { display: flex; align-items: center; gap: 12px; }

.hud-top-center .big {
  font-family: var(--display);
  font-size: 30px;
  color: var(--sodium);
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow: 0 0 14px var(--sodium-glow);
}

.label {
  font-family: var(--display);
  font-size: 16px;
  color: var(--cream);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rec-dot {
  width: 9px;
  height: 9px;
  background: var(--brick);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--brick), 0 0 22px rgba(195, 84, 58, 0.6);
  animation: rec-blink 1.5s steps(2, end) infinite;
}
@keyframes rec-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

.sep   { color: var(--muted); opacity: 0.55; }
.muted { color: var(--muted); }
.small { font-size: 10px; letter-spacing: 0.16em; }
.italic { font-style: italic; text-transform: none; letter-spacing: 0.02em; }
.ok { color: var(--sodium); }

/* left panel */
.hud-left {
  position: fixed;
  left: 60px;
  top: 120px;
  bottom: 140px;
  width: 300px;
  display: flex;
  flex-direction: column;
  transform: none;
}

.panel-title {
  font-family: var(--display);
  font-size: 17px;
  color: var(--sodium);
  letter-spacing: 0.20em;
  margin-bottom: 14px;
  text-transform: uppercase;
  line-height: 1;
}

.dossier-list {
  list-style: none;
  margin-bottom: 14px;
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.dossier-list::-webkit-scrollbar { display: none; }
.dossier-list::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--line-2), var(--line-2), transparent);
}

.dossier-list li {
  position: relative;
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: baseline;
  color: var(--muted);
  transition: color 0.25s, transform 0.25s;
  text-transform: uppercase;
}
.dossier-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: var(--sodium);
  box-shadow: 0 0 8px var(--sodium-glow);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.dossier-list li:hover { color: var(--cream); transform: translateX(3px); }
.dossier-list li.active { color: var(--sodium-bright); }
.dossier-list li.active::before { width: 26px; }

.dossier-list .idx {
  font-family: var(--block);
  color: var(--sodium);
  font-size: 14px;
  text-align: right;
}
.dossier-list .name {
  color: inherit;
  font-family: var(--block);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.dossier-list .meta {
  color: var(--muted);
  font-size: 10px;
  font-family: var(--mono);
}

.panel-hint {
  font-family: var(--graff);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.02em;
  padding-left: 16px;
  transform: rotate(-2deg);
  opacity: 0.7;
}

/* right panel */
.hud-right {
  position: fixed;
  right: 60px;
  top: 120px;
  bottom: 140px;
  width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: none;
}

.meta-card {
  background:
    linear-gradient(180deg, rgba(244, 193, 76, 0.04), rgba(0, 0, 0, 0)),
    rgba(20, 17, 15, 0.75);
  backdrop-filter: blur(8px);
  padding: 18px 20px 14px;
  position: relative;
  border: 1px solid var(--line);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    6px 6px 0 rgba(0, 0, 0, 0.45);
}
/* tape strip across top */
.meta-card::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 16px;
  width: 70px;
  height: 16px;
  background: var(--sodium);
  opacity: 0.85;
  transform: rotate(-2deg);
  box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.5);
}

.meta-card-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.track-id {
  font-family: var(--block);
  font-size: 14px;
  color: var(--brick);
  letter-spacing: 0.16em;
  text-shadow: 0 0 8px rgba(195, 84, 58, 0.4);
}
.track-status {
  color: var(--sodium);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.20em;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

.track-name {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.04em;
  line-height: 1.0;
  margin: 4px 0 14px;
  text-transform: uppercase;
}

.meta-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  margin-bottom: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.meta-thumb:hover {
  border-color: var(--sodium);
  box-shadow: 0 0 24px var(--sodium-glow);
  transform: translate(-1px, -1px);
}
.meta-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.10) brightness(0.55) saturate(0.55);
  opacity: 0.78;
  transition: opacity 0.3s, filter 0.3s, transform 0.5s;
}
.meta-thumb:hover img {
  opacity: 0.95;
  filter: contrast(1.15) brightness(0.7) saturate(0.7);
  transform: scale(1.02);
}
.meta-thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  background: linear-gradient(180deg, rgba(244, 193, 76, 0.10), rgba(0, 0, 0, 0.55));
  pointer-events: none;
}
.play-tri {
  font-size: 28px;
  color: var(--sodium-bright);
  text-shadow: 0 0 16px var(--sodium-bright);
  transition: transform 0.3s;
}
.meta-thumb:hover .play-tri { transform: scale(1.18); }
.play-label {
  font-family: var(--block);
  font-size: 12px;
  color: var(--sodium-bright);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.tape {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.20em;
  color: var(--ink);
  background: var(--sodium);
  padding: 3px 7px;
  text-transform: uppercase;
}

.meta-thumb.no-thumb { background: linear-gradient(135deg, rgba(244, 193, 76, 0.12), rgba(0, 0, 0, 0.6)); }
.meta-thumb.no-thumb img { opacity: 0; }
.meta-thumb.no-thumb::before {
  content: "♪";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 56px;
  color: var(--sodium);
  opacity: 0.35;
}

.meta-grid {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 4px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.meta-grid dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.meta-grid dd {
  color: var(--cream);
}

.meta-tag {
  font-family: var(--graff);
  font-size: 14px;
  color: var(--brick);
  letter-spacing: 0.02em;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  text-transform: uppercase;
  transform: rotate(-1.5deg);
}
.meta-tag span { color: var(--sodium); }

/* bottom timeline */
.hud-bottom {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 50vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hint {
  font-family: var(--graff);
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: opacity 0.6s;
  animation: hint-fade 3.5s ease-in-out infinite;
}
.hint.hide { opacity: 0; }
@keyframes hint-fade {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1;    }
}

.timeline { width: 100%; position: relative; }
.timeline-track {
  position: relative;
  width: 100%;
  height: 2px;
  background: var(--line);
}
.timeline-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--sodium);
  box-shadow: 0 0 8px var(--sodium-glow);
  transition: width 0.08s linear;
}
.timeline-nodes { position: absolute; inset: 0; }
.tnode {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 1px solid var(--sodium);
  background: var(--bg);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.tnode:hover { transform: translate(-50%, -50%) scale(1.3); }
.tnode.active {
  background: var(--sodium);
  box-shadow: 0 0 12px var(--sodium-glow);
}
.tnode-label {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.10em;
  color: var(--muted);
  white-space: nowrap;
  pointer-events: none;
  font-family: var(--mono);
}
.tnode.active .tnode-label { color: var(--sodium-bright); }

/* scroll spacer */
.scroll-spacer {
  position: relative;
  height: 1800vh;
  width: 100%;
  pointer-events: none;
}

/* ---------------- title reveal — chapter / film style ---------------- */
.title-reveal {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  text-align: center;
}
.title-reveal.show {
  animation: title-reveal 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes title-reveal {
  0%   { opacity: 0; transform: translateY(20px) scale(0.96); filter: blur(12px); }
  15%  { opacity: 1; transform: translateY(0)    scale(1);    filter: blur(0);    }
  82%  { opacity: 1; transform: translateY(0)    scale(1);    filter: blur(0);    }
  100% { opacity: 0; transform: translateY(-8px) scale(1.01); filter: blur(0);    }
}
.tr-num {
  font-family: var(--mono);
  font-size: clamp(14px, 1.4vw, 18px);
  color: var(--sodium);
  letter-spacing: 0.40em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.tr-line {
  width: clamp(180px, 28vw, 360px);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--sodium), transparent);
  margin-bottom: 22px;
  box-shadow: 0 0 12px var(--sodium-glow);
}
.tr-name {
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 90px);
  color: var(--cream);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.0;
  text-shadow:
    0 0 30px rgba(244, 193, 76, 0.4),
    0 4px 22px rgba(0, 0, 0, 0.9);
}
.tr-sub {
  margin-top: 18px;
  font-family: var(--type);
  font-size: clamp(13px, 1.4vw, 17px);
  color: var(--paper-muted);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

/* ---------------- modal ---------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.modal.open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 4, 0.88);
  backdrop-filter: blur(10px);
  cursor: pointer;
}
.modal-frame {
  position: relative;
  width: min(960px, 92vw);
  background: var(--bg);
  border: 1px solid var(--sodium);
  box-shadow:
    8px 8px 0 rgba(0, 0, 0, 0.6),
    0 0 60px rgba(244, 193, 76, 0.20);
  animation: modal-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-in {
  0%   { opacity: 0; transform: scale(0.96) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
/* tape strip on modal */
.modal-frame::before {
  content: "MIXTAPE";
  position: absolute;
  top: -14px;
  left: 20px;
  background: var(--sodium);
  color: var(--ink);
  font-family: var(--block);
  font-size: 12px;
  letter-spacing: 0.20em;
  padding: 6px 14px;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.modal-id {
  color: var(--sodium);
  font-family: var(--block);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.modal-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.open-yt {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--sodium);
  color: var(--sodium);
  text-decoration: none;
  font-family: var(--block);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.open-yt:hover {
  color: var(--ink);
  background: var(--sodium);
  box-shadow: 0 0 22px var(--sodium-glow);
}
.modal-close {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cream);
  font-size: 14px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  line-height: 1;
  font-family: var(--mono);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.modal-close:hover {
  color: var(--bg);
  background: var(--brick);
  border-color: var(--brick);
}

.modal-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.modal-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.modal-foot {
  padding: 10px 22px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
  background: linear-gradient(135deg, rgba(244, 193, 76, 0.08), rgba(0, 0, 0, 0.5));
  padding: 40px;
}
.modal-fallback .label-big {
  font-family: var(--display);
  color: var(--sodium-bright);
  font-size: 30px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.modal-fallback .label-sub {
  font-family: var(--graff);
  color: var(--paper-muted);
  font-size: 18px;
  letter-spacing: 0.02em;
}
.modal-fallback .big-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  border: 1px solid var(--sodium);
  color: var(--sodium);
  text-decoration: none;
  font-family: var(--block);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.modal-fallback .big-btn:hover {
  color: var(--ink);
  background: var(--sodium);
  box-shadow: 0 0 32px var(--sodium-glow);
}

/* =========================================================
   EASTER EGGS
   ========================================================= */

/* (1) spray tag — type CAEN or 14 */
.egg-spray {
  position: fixed;
  z-index: 50;
  font-family: var(--graff);
  color: var(--tag);
  font-size: clamp(80px, 14vw, 200px);
  text-shadow: 4px 4px 0 rgba(0,0,0,0.7), 0 0 24px rgba(255, 91, 142, 0.4);
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  animation: spray-in 3.5s ease-out forwards;
  transform: rotate(var(--rot, 0deg));
}
@keyframes spray-in {
  0%   { opacity: 0; transform: scale(0.55) rotate(var(--rot, 0deg)); filter: blur(12px); }
  10%  { opacity: 1; transform: scale(1.10) rotate(var(--rot, 0deg)); filter: blur(0); }
  18%  { transform: scale(1) rotate(var(--rot, 0deg)); }
  72%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1) rotate(var(--rot, 0deg)) translateY(10px); filter: blur(3px); }
}

/* (2) shōnen mode — Konami */
.shonen-lines {
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 8;
  background:
    repeating-conic-gradient(from 0deg at 50% 50%,
      rgba(255,255,255,0.13) 0deg,
      transparent 4deg,
      transparent 8deg);
  mix-blend-mode: screen;
  display: none;
  animation: shonen-rotate 14s linear infinite;
}
body.shonen-mode .shonen-lines { display: block; }
body.shonen-mode .halftone     { opacity: 1; background-size: 3px 3px; }
body.shonen-mode #scene        { filter: saturate(0.25) contrast(1.45) brightness(0.95); }
@keyframes shonen-rotate { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* (3) REC mode — click 14× on rec-dot */
.rec-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  display: none;
}
body.rec-mode .rec-overlay { display: block; }
body.rec-mode #scene       { filter: contrast(1.05) saturate(1.1); }
.rec-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--brick);
  box-shadow: inset 0 0 80px rgba(195, 84, 58, 0.30);
}
.rec-indicator {
  position: absolute;
  top: 22px; right: 22px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--brick);
  background: var(--bg);
  padding: 8px 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--brick);
}
.rec-pulse { animation: rec-blink 1s steps(2) infinite; display: inline-block; }
@keyframes rec-blink { 50% { opacity: 0.25; } }
.rec-vhs {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.04) 0,
    rgba(255,255,255,0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: vhs-scroll 8s linear infinite;
}
@keyframes vhs-scroll {
  from { background-position: 0 0; }
  to   { background-position: 0 60px; }
}

/* (4) fin de bande */
.fin-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
}
body.fin-de-bande .fin-overlay { display: flex; }
.fin-content { animation: fin-in 0.6s ease-out; }
@keyframes fin-in {
  0%   { opacity: 0; transform: scale(0.94); filter: blur(8px); }
  100% { opacity: 1; transform: scale(1);    filter: blur(0); }
}
.fin-title {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 92px);
  color: var(--sodium);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  text-shadow: 0 0 28px var(--sodium-glow);
  line-height: 1;
}
.fin-sub {
  font-family: var(--type);
  font-style: italic;
  color: var(--paper-muted);
  font-size: 16px;
  margin-bottom: 36px;
  letter-spacing: 0.04em;
}
.fin-rewind {
  background: transparent;
  border: 1px solid var(--sodium);
  color: var(--sodium);
  font-family: var(--block);
  font-size: 14px;
  letter-spacing: 0.24em;
  padding: 14px 30px;
  cursor: pointer;
  text-transform: uppercase;
  transition: color 0.25s, background 0.25s, box-shadow 0.25s;
}
.fin-rewind:hover {
  background: var(--sodium);
  color: var(--ink);
  box-shadow: 0 0 30px var(--sodium-glow);
}

/* rewinding visual flicker (during smooth scroll back to top) */
body.rewinding #scene {
  animation: rewind-shake 0.08s steps(2) infinite;
  filter: contrast(1.25) hue-rotate(-8deg);
}
@keyframes rewind-shake {
  0%   { transform: translateX(-2px); }
  100% { transform: translateX(2px); }
}

/* ---------------- loading indicator ---------------- */
.model-loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.30em;
  color: var(--sodium);
  text-transform: uppercase;
  pointer-events: none;
  animation: loading-pulse 1.5s ease-in-out infinite;
  text-shadow: 0 0 12px var(--sodium-glow);
  white-space: nowrap;
}
.model-loading.hidden { display: none; }
@keyframes loading-pulse {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}

/* ---------------- responsive ---------------- */
@media (max-width: 1200px) {
  .hud-left, .hud-right { width: 270px; }
  .hud-left  { left: 30px; }
  .hud-right { right: 30px; }
  .hud-top   { left: 30px; right: 30px; }
  .tag-mark { display: none; }
}
@media (max-width: 940px) {
  .hud-top { left: 18px; right: 18px; top: 18px; grid-template-columns: 1fr; gap: 6px; }
  .hud-top-center, .hud-top-right { display: none; }
  .hud-left { display: none; }
  .sticker, .tag-mark { display: none; }
  .hud-bottom { width: calc(100vw - 60px); bottom: 78px; }

  /* compact mini-player at bottom — leaves the 3D scene mostly visible */
  .hud-right {
    position: fixed;
    left: 12px; right: 12px;
    top: auto; bottom: 14px;
    width: auto;
    transform: none;
    display: block;
  }
  .panel-title { display: none; }
  .meta-card {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
  }
  .meta-card::before, .meta-card::after { display: none; }
  .meta-card-bar { display: none; }
  .meta-grid { display: none; }
  .meta-tag { display: none; }
  .track-name {
    font-size: 16px;
    margin: 0;
    flex: 1;
    line-height: 1.1;
    letter-spacing: 0.02em;
  }
  .meta-thumb {
    display: flex;
    aspect-ratio: auto;
    width: 42px;
    height: 42px;
    max-height: none;
    margin: 0;
    flex-shrink: 0;
    border: 1px solid var(--sodium);
  }
  .meta-thumb img { display: none; }
  .meta-thumb-overlay {
    background: transparent;
    gap: 0;
  }
  .play-tri { font-size: 20px; }
  .play-label { display: none; }
  .tape { display: none; }
  .track-id { display: none; }

  .modal-bar { flex-wrap: wrap; padding: 10px 14px; gap: 8px; }
  .modal-id { flex: 1 1 100%; font-size: 11px; letter-spacing: 0.12em; }
  .modal-bar-actions { flex: 1 1 100%; justify-content: space-between; gap: 8px; }
  .open-yt { padding: 7px 12px; font-size: 10px; flex: 1; text-align: center; }
  .modal-close { width: 36px; height: 36px; }

  .tr-num { font-size: 11px; letter-spacing: 0.28em; }
  .tr-name { font-size: 32px; letter-spacing: 0.04em; }
  .tr-sub { font-size: 12px; }
  .tr-line { margin: 12px 0; }
}
@media (max-width: 480px) {
  .modal { padding: 12px; }
  .modal-foot { display: none; }
}
